Definition of Done
Validates completed work across all dimensions: code quality, test coverage, security review, documentation, accessibility. This is the intersection of all roles' acceptance criteria.
Domain Context
Definition of Done (DoD) is the collective agreement about what "complete" means. Without it, developers ship code they think is done, QA finds problems, and conflicts arise over who's responsible.
The critical insight: DoD is not just about code quality. It's about:
- Engineer — Code follows standards, unit tests pass, no obvious bugs
- QA — Feature works as designed, test coverage is adequate, edge cases pass
- Security — No known vulnerabilities, secrets are not committed, OWASP risks mitigated
- Designer — Matches design spec, accessibility standards met, responsive on target devices
- Tech Lead — Documentation is written, team can maintain this, deployment is safe
A feature is "done" when all five perspectives agree it's production-ready.
ISO/IEC 12207 Reference:
- 5.3.6 Implementation (code review, unit testing)
- 5.3.7 Integration (integration testing)
- 5.3.8 Verification (acceptance testing)
- 5.3.9 Transition (deployment readiness)
Instructions
Step 1: Engineer Perspective — Code Quality
Check:
- Code Review: Has the code been reviewed by at least one other engineer?
- Standards: Does it follow the team's code style, naming conventions, patterns?
- Linting: Do static analysis tools pass? (no warnings, no complexity violations)
- Unit Tests: Are unit tests written? Do they pass? Coverage >= threshold?
- No Obvious Bugs: Does the implementation match the design? Are error cases handled?
- Refactoring Debt: Is the code ready for production, or does it need cleanup?
- Comments/Clarity: Is the code readable? Are complex sections documented?
Output: Code quality checklist
Step 2: QA Perspective — Test Coverage and Functionality
Check:
- Functional Testing: Does the feature work as designed in the acceptance criteria?
- Edge Cases: Have edge cases been tested? (empty inputs, boundary conditions, race conditions)
- Error Cases: Does the system gracefully handle errors? (network failures, invalid data, timeouts)
- Integration Testing: Does this integrate correctly with other systems?
- Regression Testing: Did this break anything else? (related features, adjacent code paths)
- Test Coverage: Is the coverage above the team's threshold?
- Test Documentation: Are tests clear enough for others to maintain them?
Output: Test coverage checklist
Step 3: Security Perspective — Vulnerability Scanning and Review
Check:
- Secrets Scan: No API keys, passwords, or credentials in code/logs?
- Dependency Audit: Any high or critical CVEs in dependencies?
- SAST Scan: Static analysis found no security issues? (SQL injection, XSS, CSRF, etc.)
- DAST Scope: For APIs/web features: scanning queued or completed?
- Access Control: Are permissions correctly enforced? Is data properly isolated?
- Data Handling: PII/sensitive data encrypted at rest and in transit?
- Security Review: Has security team reviewed the implementation?
Output: Security checklist
Step 4: Designer Perspective — Design Fidelity and Accessibility
Check:
- Visual Design: Does the UI match the design specification?
- Responsive: Does it work on target devices/screen sizes?
- Interactions: Do animations, transitions, and interactions match the design?
- Accessibility:
- WCAG 2.1 AA compliant (color contrast, font sizes, focus states)?
- Screen reader compatible?
- Keyboard navigable?
- Reduced motion respected?
- Content: Copy/microcopy matches approved content?
- Internationalization: If multi-language, is text extracted and localized correctly?
Output: Design and accessibility checklist
Step 5: Tech Lead Perspective — Documentation, Maintainability, Deployment
Check:
- Code Documentation: Modules, complex functions documented? README updated?
- API Documentation: If this exposes an API, is it documented?
- Runbook: For ops-sensitive changes, is a runbook written?
- Team Knowledge: Can another team member understand and maintain this?
- Deployment Safety: Is there a rollback procedure? Are deployment steps documented?
- Performance: Have baselines been captured? Will this regress performance?
- Monitoring: Are the right metrics/logs instrumented to monitor in production?
- Release Notes: Is the feature described for release communications?
Output: Documentation and deployment checklist
Step 6: Consolidate the DoD Checklist
DoD Checklist for [Feature/PR]: [Title]
[ ] Engineer
[ ] Code reviewed (at least 1 reviewer)
[ ] Follows team standards and conventions
[ ] Linting and static analysis passing
[ ] Unit tests written and passing
[ ] Coverage >= [threshold]%
[ ] No obvious bugs; error cases handled
[ ] Code is clear and documented
[ ] QA
[ ] Feature works as per acceptance criteria
[ ] Edge cases tested and passing
[ ] Error cases tested
[ ] Integration testing complete
[ ] Regression testing shows no breaks
[ ] Test coverage adequate
[ ] Tests are maintainable and clear
[ ] Security
[ ] Secrets scan passed (no credentials in code)
[ ] Dependency audit passed (no high/critical CVEs)
[ ] SAST scan passed
[ ] DAST scan queued or completed
[ ] Access control correctly enforced
[ ] Data sensitivity handled properly
[ ] Security team reviewed
[ ] Designer
[ ] UI matches design specification
[ ] Responsive on all target devices
[ ] Interactions match design
[ ] WCAG 2.1 AA compliance verified
[ ] Screen reader tested
[ ] Keyboard navigable
[ ] Copy/content approved
[ ] Tech Lead
[ ] Code documented (README, inline comments)
[ ] API documented (if applicable)
[ ] Runbook written (if ops-sensitive)
[ ] Maintainability verified
[ ] Deployment strategy documented
[ ] Rollback procedure documented
[ ] Monitoring/logging configured
[ ] Performance baseline captured
[ ] Release notes prepared
Done? [ ] Yes (all boxes checked) [ ] No (see blocking issues below)
Step 7: Identify Failing Criteria
For each unchecked box:
- What failed? (specific failing test, code review comment, security issue)
- Who fixes it? (engineer, QA, security, designer, tech lead)
- How long? (estimate in hours)
- Blocks deployment? (critical, high, medium, low priority)
Critical/high issues block production deployment.
Step 8: Make the Done/Not Done Decision
Done Decision:
- All boxes are checked
- No critical issues remain
- Document: "Feature is done and approved for deployment. Sign-offs: [engineer], [QA], [security], [designer], [tech lead]."
Not Done Decision:
- Critical issues remain
- Document: "Feature is not done. Blocker issues: [list]. Required fixes: [list]. Estimated re-check: [date/time]."
Anti-Patterns
DoD that's too strict
- Mistake: "Every feature must have 90%+ coverage and 100% documentation"
- Correct: DoD should reflect team risk tolerance and product maturity
- Fix: Adjust DoD based on team data; don't optimize away shipping
DoD that's only about code
- Mistake: "DoD is just linting, tests, and code review"
- Correct: DoD includes security, design, ops, and documentation
- Fix: Require sign-off from QA, security, and designer; not just engineers
Skipping the security review because "it's low-risk"
- Mistake: "This is just adding a button; security review not needed"
- Correct: Every feature should pass the same DoD bar
- Fix: Empower security to do fast sign-off for low-risk items
DoD that changes per sprint
- Mistake: "This week we're busy, so let's relax DoD"
- Correct: DoD should be stable; if you're too busy, the sprint is too big
- Fix: Protect DoD; adjust sprint scope instead
Using DoD to avoid accountability
- Mistake: "DoD says tests must pass, but we shipped without running them"
- Correct: DoD requires verification, not just paperwork
- Fix: Automate DoD checks (CI/CD pipelines); require explicit sign-off
Not evolving DoD based on incidents
- Mistake: "A security bug shipped because DoD didn't catch it, but we don't update DoD"
- Correct: Every production incident should trigger a DoD improvement
- Fix: Retro question: "Does this incident suggest a DoD change?"
Further Reading
- Scrum Guide — Schwaber, K. & Sutherland, J., Definition of Done (https://scrumguides.org/)
- Continuous Delivery — Humble, J. & Farley, D., "Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation" (Addison-Wesley)
- Quality Standards — ISO/IEC 9126, Software Product Quality
1---2name: definition-of-done3description: Definition of Done4---5# Definition of Done67Validates completed work across all dimensions: code quality, test coverage, security review, documentation, accessibility. This is the intersection of all roles' acceptance criteria.89## Domain Context1011**Definition of Done** (DoD) is the collective agreement about what "complete" means. Without it, developers ship code they think is done, QA finds problems, and conflicts arise over who's responsible.1213The critical insight: **DoD is not just about code quality.** It's about:1415- **Engineer** — Code follows standards, unit tests pass, no obvious bugs16- **QA** — Feature works as designed, test coverage is adequate, edge cases pass17- **Security** — No known vulnerabilities, secrets are not committed, OWASP risks mitigated18- **Designer** — Matches design spec, accessibility standards met, responsive on target devices19- **Tech Lead** — Documentation is written, team can maintain this, deployment is safe2021A feature is "done" when all five perspectives agree it's production-ready.2223**ISO/IEC 12207 Reference:**2425- 5.3.6 Implementation (code review, unit testing)26- 5.3.7 Integration (integration testing)27- 5.3.8 Verification (acceptance testing)28- 5.3.9 Transition (deployment readiness)2930## Instructions3132### Step 1: Engineer Perspective — Code Quality3334Check:3536- **Code Review**: Has the code been reviewed by at least one other engineer?37- **Standards**: Does it follow the team's code style, naming conventions, patterns?38- **Linting**: Do static analysis tools pass? (no warnings, no complexity violations)39- **Unit Tests**: Are unit tests written? Do they pass? Coverage >= threshold?40- **No Obvious Bugs**: Does the implementation match the design? Are error cases handled?41- **Refactoring Debt**: Is the code ready for production, or does it need cleanup?42- **Comments/Clarity**: Is the code readable? Are complex sections documented?4344Output: Code quality checklist4546### Step 2: QA Perspective — Test Coverage and Functionality4748Check:4950- **Functional Testing**: Does the feature work as designed in the acceptance criteria?51- **Edge Cases**: Have edge cases been tested? (empty inputs, boundary conditions, race conditions)52- **Error Cases**: Does the system gracefully handle errors? (network failures, invalid data, timeouts)53- **Integration Testing**: Does this integrate correctly with other systems?54- **Regression Testing**: Did this break anything else? (related features, adjacent code paths)55- **Test Coverage**: Is the coverage above the team's threshold?56- **Test Documentation**: Are tests clear enough for others to maintain them?5758Output: Test coverage checklist5960### Step 3: Security Perspective — Vulnerability Scanning and Review6162Check:6364- **Secrets Scan**: No API keys, passwords, or credentials in code/logs?65- **Dependency Audit**: Any high or critical CVEs in dependencies?66- **SAST Scan**: Static analysis found no security issues? (SQL injection, XSS, CSRF, etc.)67- **DAST Scope**: For APIs/web features: scanning queued or completed?68- **Access Control**: Are permissions correctly enforced? Is data properly isolated?69- **Data Handling**: PII/sensitive data encrypted at rest and in transit?70- **Security Review**: Has security team reviewed the implementation?7172Output: Security checklist7374### Step 4: Designer Perspective — Design Fidelity and Accessibility7576Check:7778- **Visual Design**: Does the UI match the design specification?79- **Responsive**: Does it work on target devices/screen sizes?80- **Interactions**: Do animations, transitions, and interactions match the design?81- **Accessibility**:82 - WCAG 2.1 AA compliant (color contrast, font sizes, focus states)?83 - Screen reader compatible?84 - Keyboard navigable?85 - Reduced motion respected?86- **Content**: Copy/microcopy matches approved content?87- **Internationalization**: If multi-language, is text extracted and localized correctly?8889Output: Design and accessibility checklist9091### Step 5: Tech Lead Perspective — Documentation, Maintainability, Deployment9293Check:9495- **Code Documentation**: Modules, complex functions documented? README updated?96- **API Documentation**: If this exposes an API, is it documented?97- **Runbook**: For ops-sensitive changes, is a runbook written?98- **Team Knowledge**: Can another team member understand and maintain this?99- **Deployment Safety**: Is there a rollback procedure? Are deployment steps documented?100- **Performance**: Have baselines been captured? Will this regress performance?101- **Monitoring**: Are the right metrics/logs instrumented to monitor in production?102- **Release Notes**: Is the feature described for release communications?103104Output: Documentation and deployment checklist105106### Step 6: Consolidate the DoD Checklist107```108109DoD Checklist for [Feature/PR]: [Title]110111[ ] Engineer112[ ] Code reviewed (at least 1 reviewer)113[ ] Follows team standards and conventions114[ ] Linting and static analysis passing115[ ] Unit tests written and passing116[ ] Coverage >= [threshold]%117[ ] No obvious bugs; error cases handled118[ ] Code is clear and documented119120[ ] QA121[ ] Feature works as per acceptance criteria122[ ] Edge cases tested and passing123[ ] Error cases tested124[ ] Integration testing complete125[ ] Regression testing shows no breaks126[ ] Test coverage adequate127[ ] Tests are maintainable and clear128129[ ] Security130[ ] Secrets scan passed (no credentials in code)131[ ] Dependency audit passed (no high/critical CVEs)132[ ] SAST scan passed133[ ] DAST scan queued or completed134[ ] Access control correctly enforced135[ ] Data sensitivity handled properly136[ ] Security team reviewed137138[ ] Designer139[ ] UI matches design specification140[ ] Responsive on all target devices141[ ] Interactions match design142[ ] WCAG 2.1 AA compliance verified143[ ] Screen reader tested144[ ] Keyboard navigable145[ ] Copy/content approved146147[ ] Tech Lead148[ ] Code documented (README, inline comments)149[ ] API documented (if applicable)150[ ] Runbook written (if ops-sensitive)151[ ] Maintainability verified152[ ] Deployment strategy documented153[ ] Rollback procedure documented154[ ] Monitoring/logging configured155[ ] Performance baseline captured156[ ] Release notes prepared157158Done? [ ] Yes (all boxes checked) [ ] No (see blocking issues below)159160```161162### Step 7: Identify Failing Criteria163164For each unchecked box:165- **What failed?** (specific failing test, code review comment, security issue)166- **Who fixes it?** (engineer, QA, security, designer, tech lead)167- **How long?** (estimate in hours)168- **Blocks deployment?** (critical, high, medium, low priority)169170Critical/high issues block production deployment.171172### Step 8: Make the Done/Not Done Decision173174**Done Decision:**175- All boxes are checked176- No critical issues remain177- Document: "Feature is done and approved for deployment. Sign-offs: [engineer], [QA], [security], [designer], [tech lead]."178179**Not Done Decision:**180- Critical issues remain181- Document: "Feature is not done. Blocker issues: [list]. Required fixes: [list]. Estimated re-check: [date/time]."182183## Anti-Patterns1841851. **DoD that's too strict**186 - Mistake: "Every feature must have 90%+ coverage and 100% documentation"187 - Correct: DoD should reflect team risk tolerance and product maturity188 - Fix: Adjust DoD based on team data; don't optimize away shipping1891902. **DoD that's only about code**191 - Mistake: "DoD is just linting, tests, and code review"192 - Correct: DoD includes security, design, ops, and documentation193 - Fix: Require sign-off from QA, security, and designer; not just engineers1941953. **Skipping the security review because "it's low-risk"**196 - Mistake: "This is just adding a button; security review not needed"197 - Correct: Every feature should pass the same DoD bar198 - Fix: Empower security to do fast sign-off for low-risk items1992004. **DoD that changes per sprint**201 - Mistake: "This week we're busy, so let's relax DoD"202 - Correct: DoD should be stable; if you're too busy, the sprint is too big203 - Fix: Protect DoD; adjust sprint scope instead2042055. **Using DoD to avoid accountability**206 - Mistake: "DoD says tests must pass, but we shipped without running them"207 - Correct: DoD requires verification, not just paperwork208 - Fix: Automate DoD checks (CI/CD pipelines); require explicit sign-off2092106. **Not evolving DoD based on incidents**211 - Mistake: "A security bug shipped because DoD didn't catch it, but we don't update DoD"212 - Correct: Every production incident should trigger a DoD improvement213 - Fix: Retro question: "Does this incident suggest a DoD change?"214215## Further Reading216217- **Scrum Guide** — Schwaber, K. & Sutherland, J., Definition of Done (https://scrumguides.org/)218- **Continuous Delivery** — Humble, J. & Farley, D., "Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation" (Addison-Wesley)219- **Quality Standards** — ISO/IEC 9126, Software Product Quality