2.8 KiB
2.8 KiB
Definition of Done — applies to every phase
A phase is done only when all of the following are true. Each phase file adds its own phase-specific criteria on top of this shared baseline.
Code
- The full scope in the phase file is implemented — no laziness, no unsanctioned stubs. Anything not real is mocked behind a DI seam and recorded in the mock registry.
- It follows the project conventions exactly (server
CLAUDE.md+CONVENTIONS.md, or clientCLAUDE.md+ the frontend-designer skill) and the relevant conventions checklist. - No dead code (unused vars/imports/usings/params/members). Comments explain why, not what.
- Best practices honoured: (backend) clean-arch boundaries, projected/paginated reads, caching where
it pays, idempotency/locks on the money path, IRR
BIGINTmoney, validation at the boundary; (frontend) RSC/client boundary, query caching + no needless refetch, minimal re-renders, MUI primitives reused, i18n in both locales, tokens-based colours, RTL-correct.
Gate
- Backend:
dotnet build Baya.slnhas zero new warnings anddotnet test Baya.slnpasses, including the tests this phase adds. - Frontend:
npm run checkpasses andnpm run test:cipasses if a shared component was touched/added;en.jsonandfa.jsonare in sync.
Documentation
- The relevant architecture map is updated in the same change (server Project map / client Project Structure / root Repository layout) if the structure changed.
- Any business rule discovered/decided is reflected in the
product/docs (no invented rules). - New reusable patterns/seams are noted in the relevant
CLAUDE.md/CONVENTIONS.md.
Contracts & handoff
- Backend: the API contract for what shipped is written to
dev/contracts/domains/<domain>.mdand theswagger.jsonsnapshot is published perdev/contracts/openapi/README.md. - Frontend: types/services are derived from the published contract (not guessed); any contract
gap is appended to
dev/shared-working-context/frontend/requests/for-backend.md. - The handoff note
dev/shared-working-context/<lane>/...is written (backend: a newhandoff/after-backend-phase-N.md; both lanes: a STATUS append).
Reporting & memory
- The per-phase report
dev/shared-working-context/reports/<lane>-phase-N-report.mdis written: what was built, what is now testable and exactly how, what is mocked + how to make it real, contracts produced/consumed, follow-ups. - The mock registry
dev/shared-working-context/reports/mocks-registry.mdis updated for every seam this phase mocked/touched. - Persistent memory is saved for any non-obvious decision/seam/gotcha, with a
MEMORY.mdpointer.