mainis the integration branch. All changes land via pull request.- Feature branches:
feat/<short-desc>,fix/<short-desc>,chore/<short-desc>. - Long-lived claude-assisted branches follow
claude/<task>(e.g.claude/production-readiness-XXXXX).
- Imperative mood, sentence case:
Add readiness endpoint, notAddedoradds. Keep the subject ≤ 72 chars. - Body (optional) explains the why, not the what.
- One logical change per commit; separate refactors from behaviour changes.
Checklist before requesting review:
-
npm run lintclean (0 errors; warnings allowed but noted). -
npm run typecheckclean. -
npm testclean. -
npm run buildclean. - If you added a route, it has auth middleware (or an explicit note in the PR description explaining why it's public).
- If you added LLM usage, it's in
services/ai-assistant.ts(or a sibling underservices/ai/) and updates AI_GOVERNANCE.md. - If you added a secret, it's in
.env.examplewith a comment. - If you changed schema, you ran
npm run db:generate.
- TypeScript strict mode; avoid
any— ESLint enforces this as an error. - Prefer the Prisma singleton from
server/src/utils/prisma.ts; do notnew PrismaClient()ad-hoc. - Use the shared
AppErrorfamily fromserver/src/utils/errors.tsfor thrown errors; the central error handler formats them consistently. - Use
validateBody(zodSchema)middleware rather than in-handler parsing. - Server logs: use
loggerfromutils/logger.tsorreq.logfrom pino-http. Noconsole.login request-path code.
npm test # all
npm run test:server # server only
npm run test:client # client only
npm run test:watch -w server # watch modeServer tests mock Prisma by default. See
server/src/api/health/__tests__/readiness.test.ts for the mocking
pattern.
Include:
- What you expected to happen.
- What actually happened.
- Steps to reproduce.
- A correlating
x-request-idif the bug is server-side.