Run before proposing, committing, or pushing a change. Encodes the review knowledge that
otherwise lives in the maintainer's head so review catches issues automatically — the why
behind each item is in AGENTS.md (Conventions, Verification, Security) and docs/.
- No real secrets staged:
.env,.env.local,.env.productionstay gitignored; only.env.example(placeholders) is tracked. No tokens/PII in code or logs. - gitleaks passes on the staged diff (
gitleaks git --staged -c config/gitleaks.toml .); thesecrets-scanCI job and the.githooks/pre-commithook both gate on it. - No files >1 MB staged (pre-commit blocks them;
ALLOW_BIG_FILES=1only if truly intended) and no leftover merge-conflict markers.
- Backend: no
null— useundefined; ES2022+ ESMasync/await; functions over classes. - All inputs validated with Zod (frontend and server-side).
- ADRs in
docs/adr/are append-only — supersede with a new ADR, never rewrite. - DB schema change → Alembic migration is reversible (CI round-trips
downgrade -1→upgrade head); ship a rollback plan; migrations are user-applied, not auto-run. - Route/API change →
docs/reference/api-endpoint-matrix.md+ thedocs/api/doc updated, count matchesopenapi.yaml(bun run check-endpoint-matrix), andgenerated.tsregenerated (bun run generate:types). Note breaking vs non-breaking. - i18n change →
bun run generate-locales; en/nl key parity holds; committed locale TS is in sync. - Packaging or persistence edit → native PostgreSQL and attachment paths stay inside the application data directory, and backup/restore coverage passes.
-
bun run lintandbun run lint:backend— ESLint clean (frontend + backend). -
bun run typecheck(frontend strict) andcd apps/node-backend && bunx tsc -p tsconfig.check.json. -
bun run test(backend vitest) andbun run test:frontend— scale depth to risk per AGENTS.md. -
bun run validate-localesandbun run check-endpoint-matrixpass. - High-risk (security / migration / destructive) also:
bun run build. One-shot:bun run check. - CI (workflow CI, required check CI Complete) expected green;
.githooks/pre-pushmirrors the cheap jobs locally.
- Signed commit (SSH Secure Enclave key;
commit.gpgsign/tag.gpgsignon) — don't bypass hooks. - Conventional Commit message
type(scope): subject(enforced by.githooks/commit-msg); commit tomaindirectly (no feature branch). - Documentation impact evaluated after implementation; affected pages updated via
update-vision-docs, or the completion report explains why no update was required.