# Error Classes

Errors are **generated** from command/query documentation into `lib/errors.generated.ts`.

## What to review

- Every error code in `docs/commands/*.md` has a corresponding class in `lib/errors.generated.ts`
- Command implementations import errors from `../lib/errors.generated`
- Generated error codes are prefixed with the module name (e.g., doc code `UNIT_NOT_FOUND` becomes `PRIMITIVES_UNIT_NOT_FOUND`)
- If errors are missing, re-run `erp-kit module generate code -p <path>`
