A definition of done is a list the team agrees on. Work that does not meet it is not done, however finished it looks.
A starting list
- The acceptance criteria of the issue are met, each one checked.
- Tests cover the new behaviour, and the whole suite passes in CI on the final commit.
- Lint and typecheck pass.
- No unrelated changes in the diff.
- Documentation and the changelog are updated where users are affected.
- Security-relevant changes are reviewed by someone who knows the area.
- A person other than the author has reviewed and accepted the change.
- Findings, decisions and failed attempts from the work are recorded.
- The change can be rolled back, or the plan to do so is written.
Who says it is done
The author’s view is the least reliable, whether the author is a person or an agent. Done is a decision by the reviewer with evidence: criteria, fetched checks, the diff.
Review the list
Look at it each quarter. Remove items nobody checks and add what recent incidents showed.