Definition of Done Template
Copy the checklist below into the Story issue or PR body and fill it out before requesting review. Annotate items per the org checklist convention.
Definition of Done
Section titled “Definition of Done”Code quality
Section titled “Code quality”-
ruffwith no errors. -
mypywith no errors. Where a third-party library lacks inline types (nopy.typed), install its stub package as a dev dependency (e.g.boto3-stubs[<service>]). Onlyignore_missing_importswhen no stubs exist. - No commented-out code or unresolved
TODOcomments left in the diff. Intentional TODOs must link to a follow-up issue.
Test coverage (RAG006)
Section titled “Test coverage (RAG006)”- Backend: the coverage gate passes (90% aggregate and 70% per file on combined line + branch), or marked N/A if the story does not change the backend.
- SPA: the coverage gate passes (90% aggregate and 70% per file on each of lines, branches, functions and statements), or marked N/A if the story does not change the SPA.
- All tests use Given / When / Then structure (org dev standards).
- Integration tests added where the story touches an AWS service boundary (Aurora Data API, Bedrock, API Gateway) — or marked N/A with reason.
API contract (RAG005)
Section titled “API contract (RAG005)”-
backend/openapi.yamlregenerated and committed if any FastAPI route, schema, or security scheme changed. - CI
openapi-checkdiff passes (no drift between committed spec and what FastAPI produces). - Sign-off obtained for spec changes per the org API contract rules — or marked N/A if spec is unchanged.
Architecture and decisions
Section titled “Architecture and decisions”- ADR written or updated if an architectural decision was made or reversed — or marked N/A if no new decision.
- C4 model updated if a new component, relationship, or deployment boundary was added — or marked N/A.
Observability (RAG020)
Section titled “Observability (RAG020)”- New Lambda code uses
LoggerandMetricsfrom AWS Lambda Powertools; noprint-style statements. -
Authorizationheader (and any other secrets) confirmed absent from log output; test asserts scrubbing if the story touches the authorizer or request-logging path. - Any new CloudWatch log group sets its retention from the environment root’s retention variable, never infinite.
Secrets and security (RAG009)
Section titled “Secrets and security (RAG009)”- No secrets, API keys, or credentials appear in code, config files, or committed test fixtures.
- New Lambda roles follow least-privilege.
- Secrets Manager paths follow the per-env naming convention; no cross-env secret references.
Infrastructure and cost
Section titled “Infrastructure and cost”- Infracost diff reviewed; cost delta is acceptable or justified in the PR body.
- Terraform plan reviewed for unintended resource replacements before applying.
PR standards (org dev standards)
Section titled “PR standards (org dev standards)”- PR title and body follow the org PR title and PR template rules.
- No unannotated
[ ]items in the PR body.
QA exit criteria
Section titled “QA exit criteria”- Story deployed to QA (auto on merge to
main). - Manual smoke test performed in QA against the acceptance criteria in the Story issue.
- No regressions observed in CloudWatch logs or alarms during the QA smoke test.
- QA CloudWatch alarm is in OK state at time of Prod approval request.
Documentation
Section titled “Documentation”- Any operator-facing procedure introduced by this story (e.g., key issuance CLI, migration step) is documented in the relevant guide or runbook page.
- This DoD checklist is complete and honest; no item is left unannotated.
© 2026 Benjamin Arunski