/agent-forge:spec-trace-gate [spec path] [tasks path] [tests dir]from agent-forge
Machine-checks that every requirement in a spec is covered by a task and every task is verified by a test that actually exists (spec to task to test traceability), failing on any dropped requirement, phantom reference or missing test. Use when writing acceptance criteria, breaking a spec into tasks, checking whether an implementation really closes over its spec, or adding a requirements-coverage gate to CI.
Ships in agent-forge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Spec-driven workflows (GitHub Spec Kit, AWS Kiro, BMAD) give you Specify → Plan → Tasks → Implement, but nothing proves the finished code closed over the spec. Drift is caught by a human, if at all. This skill turns that proof into a pass/fail command.
Three inputs:
Spec: acceptance criteria, each tagged with a stable id AC-N and written in EARS
(references/ears.md).
Tasks: one block per task:
## T-3 — Race-safe idempotency under concurrent duplicates
Serialise the check-then-insert so N concurrent duplicates yield exactly one result.
covers: AC-3
verified_by: test_concurrent_duplicate_key_single_posting
Tests directory of the project (Python, TS/JS, Go, Java/Kotlin, Ruby and C# file
conventions are recognised by default; override with --test-glob).
The gate fails on any of:
| Violation | Meaning |
|---|---|
| UNCOVERED acceptance criterion | An AC-N in the spec that no task covers:. A requirement was dropped. |
| ORPHAN task reference | A task covers: an AC-N that is not in the spec. Phantom work, or a typo. |
| UNVERIFIED task | A verified_by: name that does not appear, as a whole identifier, in any test file. |
Find or write the spec. If the user has none, draft one from their request with
assets/spec-template.md and show it to them before going on. Each AC states one observable
behaviour, uses an EARS pattern, and keeps its id forever (never renumber; retire ids instead).
Write the tasks file with assets/tasks-template.md. Small, single-responsibility tasks,
ordered so earlier ones unblock later ones. If a test does not exist yet, name the exact test
that must be written and say so in the task body.
Structure check, right after planning (no tests needed yet):
python <this-skill-dir>/scripts/trace_gate.py --spec <spec.md> --tasks <tasks.md> \
--tests-dir <tests/> --structure-only
Full check, after implementation: the same command without --structure-only.
On FAIL, fix the cause, never the report:
verified_by: at the real test name.
Never shorten a selector to a generic fragment just to make it match.Report the verdict line exactly as printed (TRACE: PASS / TRACE: FAIL) together with
the violation lines. Do not paraphrase a gate result.
CI (optional, ask the user first): assets/ci-github-actions.yml runs the full gate on every
push and pull request.
scripts/trace_gate.py needs Python 3.10+ and the standard library only. It reads the three
inputs, prints a report and exits 0 or 1. It writes nothing and makes no network calls.test_replay does not match test_replay_across_restart.AC-N ids passes trivially. If you see acceptance criteria: 0, the spec is not
in the expected shape; fix that first.--test-glob patterns (e.g. --test-glob '*.rs').What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ces107/agent-forge --plugin agent-forgeOther plugins' skills for the same job
6 skills in this plugin
/adversarial-review-gateAdversarial code review that tries to break a change instead of approving it, and only counts a finding when a failing test reproduces it, ending in a GATE PASS or GATE FAIL verdict. Use when reviewing a diff, pull request or freshly AI-generated code for race conditions, idempotency, partial-failure, boundary and security bugs, or when you need a review step that cannot rubber-stamp./done-gateFree Claude Code hook that stops a coding agent from saying "done", "fixed" or "all tests pass" without proof. After a code edit, the agent cannot end its turn until a real test command has run and passed after its last change; piped, masked or failing runs do not count. Use when you want Claude Code to prove its work before it reports success, or when an agent keeps claiming tests pass without running them./