Map acceptance criteria to tests
"Done" is a claim; the matrix is the proof. This skill links each acceptance criterion to the test that exercises it, and surfaces both untested criteria and orphan tests.
Procedure
List every criterion
AC-01..AC-nnfromAC.mdas a row intrace.md.For each row name the test that verifies it, with its full path and test name:
tests/test_checkout.py::test_retry_does_not_double_charge.Fill the
layercolumn (unit,integration,e2e,manual) and confirm high-risk criteria have a test belowe2e; ane2e-only safety net is slow and flaky.Find untested criteria: rows with no test path. Each is an unproven requirement, not a pass.
Find orphan tests: tests that map to no criterion. Decide whether they guard an implicit requirement (add the criterion) or are dead weight (delete them).
For manual rows write the exact steps and the expected observation so anyone can repeat them.
Re-run the mapped tests and paste the summary counts beside each row.
Freeze the matrix with the release; a criterion with no test at ship time should block or be explicitly waived with a name.
Include the migration or backfill path as a row if it changes user data, and map it to its own test.
Check that the mapped tests fail when the feature is disabled, or they are not guarding it.
Store the matrix where it is regenerated on each release, not hand-maintained in a wiki.
Pitfalls
Mapping many criteria to one broad
e2etest, so one failure hides which requirement broke.Counting test line coverage instead of criterion coverage; 90% line coverage can still leave a criterion unproven.
Letting the matrix drift from the tests as they are renamed; regenerate it in CI.
Marking a criterion
manualto avoid writing the test it actually needs.Asserting the happy path only and skipping the negative criterion you wrote.
Trusting a green suite without checking that each mapped test actually exercises its criterion.
Mapping a criterion to a test that asserts something adjacent, like rendering without behaviour.
Leaving a criterion mapped to a skipped or quarantined test and counting it as covered.
Verification
grep -c 'AC-' trace.md; grep -cE 'tests/.*::' trace.md
Passes when every AC- row has a test path or a manual step and the counts match. Report untested criteria and orphan tests.