feat(skills): add tracing-acceptance-criteria skill#1981
Open
katspaugh wants to merge 1 commit into
Open
Conversation
c4f1755 to
4360ad4
Compare
Thread acceptance-criteria traceability through the existing brainstorming → writing-plans → TDD → verification flow: give each criterion a stable COMPONENT-N ID in the spec, tag the proving test with an `@ac <ID>` marker, and run an ad-hoc `rg` check that reports uncovered / orphan / duplicate IDs. No tooling to install. Complements the AC-authoring approach in obra#1112: that skill focuses on writing good criteria (Given/When/Then, SMART); this one is the traceability half — it assumes criteria exist and links them to the tests that prove them. Criteria live in the design doc under docs/superpowers/specs/ (test-first: coverage means a test proves it), not a third-party tracker.
4360ad4 to
c313b6f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Who is submitting this PR?
claude-opus-4-8What problem are you trying to solve?
The flow produces a spec with acceptance criteria and a plan, but nothing links a
criterion to the test that proves it. At
verification-before-completionthere isno cheap way to answer "which criteria are actually demonstrated by a test, and are
any of my requirement references stale?" In practice a criterion silently goes
unproven, or a code comment references a requirement ID that no longer exists in any
spec, and nobody notices until review.
What does this PR change?
Adds a
tracing-acceptance-criteriaskill: give each acceptance criterion a stableCOMPONENT-NID in itsdocs/superpowers/specs/design doc, tag the proving testwith an
@ac <ID>marker during TDD, and run an ad-hocrgcheck at verificationthat reports uncovered (defined ID with no test marker), orphan (marker
whose ID is in no spec), and duplicate (same ID across specs) IDs. No tooling to
install. Also adds one catalog line to the README.
Is this change appropriate for the core library?
domain-agnostic; the check is a plain ripgrep over any test suite.
docs/superpowers/specs/artifact and integrates with the existingbrainstorming → writing-plans → TDD → verification skills. No third-party service.
@acmarkers + coverage scan) is the piece missingfrom the current flow; it's adapted from acai.sh's "specsmaxxing".
What alternatives did you consider?
#1112/ the AC-authoring step — rejected as a bundle. feat: add acceptance-criteria skill #1112 isabout writing good criteria (Given/When/Then, SMART). This is the orthogonal
traceability half. Keeping them separate lets either land on its own; this skill
is deliberately named
tracing-acceptance-criteriato avoid colliding with feat: add acceptance-criteria skill #1112.rgcommands the agent runs and reasons about; a script adds install/maintenance
surface for no judgment the agent can't do inline. It is report-only, not a gate.
test-first, so "covered" must mean a test proves it; the coverage scan is scoped
to test files and a production-only marker never counts as covered.
Does this PR contain multiple unrelated changes?
No. One skill (
skills/tracing-acceptance-criteria/SKILL.md) plus its one-lineREADME catalog entry.
Existing PRs
acceptance-criteriaskill for authoring criteria (GWT/SMART). This PR is thetraceability half (IDs +
@acmarkers +rgcoverage scan) and uses a distinctname/path to avoid collision. The two compose: author with feat: add acceptance-criteria skill #1112, trace with this.
feature ACs. Different problem.
execution; this proves tests cover criteria after implementation. Adjacent, not
overlapping.
Environment tested
claude-opus-4-8(1M context)Evaluation
Followed
superpowers:writing-skills. Three layers of testing, honestly scoped:1. Command correctness (dry-run). Ran the Check commands against a scratch fixture
(a test file with
@ac AUTH-1/AUTH-2/AUTH-9, a spec definingAUTH-1/2/3, aproduction-only
@ac AUTH-4). Confirmed: covered = {AUTH-1, AUTH-2}, UNCOVERED =AUTH-3, ORPHAN = AUTH-9, production-only AUTH-4 not counted. Also confirmed the ID
regex
[A-Z]+-\d+rejects malformed IDs (1AUTH-2) and that the tree-wide scan doessurface an
@acID quoted inside a string literal — which is why the skill calls thescan a text match, not a parser.
2. RED/GREEN behavioral eval (paired subagents, 5 reps per arm). Built a fixture
where the discriminating case is AUTH-3: marked with
@acon production code only,no test (correct answer: UNCOVERED, coverage 2/3). Ten fresh agents got the same
natural-language question ("which acceptance criteria are covered by tests?"); the
skill arm additionally had the SKILL.md available.
production marker and reported 3/3 — the exact failure the skill's test-scoping
rule targets. (Several noted AUTH-3 "has no test" as a caveat, yet still counted it.)
AUTH-9 orphan, no duplicates, 2/3. Two reps reproduced the skill's example report
format; one explicitly confirmed the markers weren't string false-positives.
Fully separated distributions, zero variance on the verdict: 3/3 (wrong) → 2/3 (right).
3. Drill scenario authored (not yet executed). I wrote a
applying-tracing-acceptance-criteriascenario (story.md/setup.sh/checks.sh) in the superpowers-evals format, encoding the same discriminator asverifier acceptance criteria. I could not execute the official
evals/drill harnessin my environment (no
ANTHROPIC_API_KEY, nouv; it runs real multi-minute agentsessions). The scenario is ready for a follow-up PR to
superpowers-evalsand amulti-rep run by anyone with a key.
Still a draft because: the human diff review below is pending, and the official
multi-backend drill run (Codex/Gemini as well as Claude) hasn't been executed —
the subagent eval above covers the Claude backend only.
Rigor
superpowers:writing-skillsskill on the production-only-marker trap, 5 reps per arm: 5/5 baseline wrong (3/3),
5/5 skill correct (2/3), fully separated. Edge cases covered (production-only
marker, malformed ID, string-literal false positive). Caveat: Claude backend only;
the official multi-backend drill run is pending (scenario authored).
"human partner" language, or any existing skill)
Human review