- Read
ERRORS.mdbefore proposing changes or code reviews - If a new recurring mistake occurs, append one line to
ERRORS.mdusing[YYYY-MM-DD] <scope>: <wrong> -> <right>
- Dev:
npm start(alias:npm run dev) - Debug:
npm run debug - Tests:
npm test/npm run test:unit(one-shot) ornpm run test:watch(watch) - Coverage:
npm run test:coverage - Lint:
npm run lint - Lint fix:
npm run lint:fix - Format:
npm run format - Seed:
npm run seed:dev - Commit:
npm run commit - Release (CI):
npm run release:auto
Use .github/prompts/*.prompt.md for guided workflows:
| Task | Prompt file |
|---|---|
| Verify | .github/prompts/verify.prompt.md |
| Feature | .github/prompts/feature.prompt.md |
| Create module | .github/prompts/create-module.prompt.md |
| Update stack | .github/prompts/update-stack.prompt.md |
| Naming | .github/prompts/naming.prompt.md |
- Never commit secrets or credentials (
.env*,secrets/**, keys, tokens) - Do not introduce cross-module coupling without explicit justification
- Avoid risky renames or moves of core stack paths used by downstream merges
- Keep changes minimal and merge-friendly for downstream projects
- Flag security or mergeability risks explicitly in reviews
- Every new or modified function must have a JSDoc header: one-line description,
@paramfor each argument,@returnsfor any non-void return value (always include@returnsfor async functions to document the resolved value)
- Layer order is strict: Routes → Controllers → Services → Repositories → Models
- Controllers must not call repositories directly — always go through services
- Each module is self-contained in
modules/{name}/ - Shared code goes in
lib/helpers/orlib/services/with explicit justification - Keep tests in
modules/*/tests/
- Folders: kebab-case
- Controllers:
{module}[.{name}].controller.js - Services:
{module}[.{name}].service.js - Repositories:
{module}.repository.js - Models (Mongoose):
{module}.model.mongoose.js - Schemas:
{module}.schema.js - Policies:
{module}[.{name}].policy.js - Routes:
{module}.routes.js - Tests:
{module}.{type}.tests.js
npm run lintpassesnpm testpasses- Cross-module impact is documented and justified when present