Skip to content

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.


  • ruff with no errors.
  • mypy with no errors. Where a third-party library lacks inline types (no py.typed), install its stub package as a dev dependency (e.g. boto3-stubs[<service>]). Only ignore_missing_imports when no stubs exist.
  • No commented-out code or unresolved TODO comments left in the diff. Intentional TODOs must link to a follow-up issue.
  • 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.
  • backend/openapi.yaml regenerated and committed if any FastAPI route, schema, or security scheme changed.
  • CI openapi-check diff 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.
  • 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.
  • New Lambda code uses Logger and Metrics from AWS Lambda Powertools; no print-style statements.
  • Authorization header (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.
  • 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.
  • Infracost diff reviewed; cost delta is acceptable or justified in the PR body.
  • Terraform plan reviewed for unintended resource replacements before applying.
  • PR title and body follow the org PR title and PR template rules.
  • No unannotated [ ] items in the PR body.
  • 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.
  • 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.