Definition of done
Work is done when every item below is true. Not before.
Code
- Behavior matches the request; edge cases named in the request are handled.
- Tests exist and pass locally (
pnpm test), including one that fails without the change. - Lint and typecheck pass with zero new warnings.
- No secrets, credentials, or environment-specific values in the diff.
Review
- Another human reviewed the diff (agent review does not count).
- Provenance exists for convention or architecture claims made during the work.
Knowledge
- If this work changed a team decision, the decision document was updated - not just the code.
- Anything a future session must know is written where agents retrieve it: the repo's knowledge bundle, a linked OKF concept, or an ADR.
The last section is the one teams skip and regret. Code explains itself to the compiler; only recorded knowledge explains it to the next agent.