forge-trace-matrix
Skill2 starsChanged 5 months agoMITView on GitHub
Generate the full ID x stage traceability matrix and a gap report,
In this repository46 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- forge-opencode/CLAUDE.mdCLAUDE.md
- forge-adoptSkill
- forge-arch-proSkill
- forge-archSkill
- forge-autopilotSkill
- forge-autopilot-stopSkill
- forge-build-proSkill
- forge-buildSkill
- forge-deploySkill
- forge-doctorSkill
- dreamer-runSkill
- forge-evalSkill
- forge-feedbackSkill
- flowSkill
- forge-force-advanceSkill
- graduateSkill
- health-checkSkill
- forge-initSkill
- forge-monitorSkill
- forge-orchestrateSkill
- forge-plan-proSkill
- forge-planSkill
- preflightSkill
- forge-product-proSkill
- forge-productSkill
- forge-releaseSkill
- forge-resolveSkill
- forge-resumeSkill
- forge-retroSkill
- forge-reviewSkill
- forge-rulesSkill
- forge-set-profileSkill
- skill-creatorSkill
- forge-spec-proSkill
- forge-specSkill
- forge-sprint-proSkill
- forge-sprintSkill
- forge-srs-proSkill
- forge-srsSkill
- forge-statusSkill
- forge-uninstallSkill
- forge-validateSkill
- watchSkill
- watch-stopSkill
- forge-whySkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 55
Read agents/traceability-matrix.md and adopt that persona for this run.
- Very specific: line 65
If the user asks who owns a specific id's gap, name the (stage, agent) pair directly from the gap table rather than making them look it up.
- Very specific: line 79
Every gap row has a (stage, agent) pair, or explicitly unassigned if the file's path didn't resolve to a known stage directory (never …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/forge:trace-matrix — full traceability matrix & gap attribution
/forge:trace-matrix runs scripts/trace-matrix.py, which adopts the
Traceability Auditor persona (agents/traceability-matrix.md) to produce:
- A matrix — every id found anywhere under
pipeline/as a row, every stage directory with activity on it as a column, showing where each id is defined vs merely referenced. - A gap report — the same four categories
/forge:validatechecks (malformed, misplaced, duplicate, unimplemented), each one attributed to the specific(stage, agent)responsible for fixing it.
Unlike /forge:validate (a pass/fail gate-style check), this skill's primary
output is the matrix — a map of the whole pipeline's ID coverage — with the gap
list as a secondary, attributed punch list.
When to Use
/forge:trace-matrix— generate and present the current matrix + gap report.- The user asks "which requirements haven't been picked up," "who's responsible for X," or wants to see ID coverage across every stage at once.
- Periodically during a long-running project, or before a milestone review, to catch drift the per-stage gates don't surface on their own.
When NOT to Use
- The user wants a pass/fail gate check →
/forge:validate(same underlying gap categories, but framed as a report you can act on immediately, not a matrix). - The user wants the pipeline advanced →
/forge:orchestrateor a specific stage's/forge:*command.
Relationship to /forge:validate
Both are built on scripts/_trace_scan.py and detect the same four gap
categories. /forge:validate also rolls up the pre-existing gate/traceability
scripts into a pass/fail report; /forge:trace-matrix instead emphasizes the
full id x stage matrix and writes the responsible-agent attribution to
.forge/traceability-gaps.jsonl for advisory surfacing. Run either, or both —
they don't conflict, and running one doesn't invalidate the other's output.
Steps
- Read
agents/traceability-matrix.mdand adopt that persona for this run. - Run the generator:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/trace-matrix.py --cwd . \ --plugin-dir ${CLAUDE_PLUGIN_ROOT} - Present the full report verbatim — the matrix table, then the gap table.
- Summarize the gap table grouped by responsible agent so the user sees ownership at a glance, e.g.: "Stage 5 (planner) has 2 open gaps: REQ-004 and NFR-001 were never referenced in task-dag.md."
- If the user asks who owns a specific id's gap, name the
(stage, agent)pair directly from the gap table rather than making them look it up. - Mention that
.forge/traceability-gaps.jsonlwas refreshed, and that the responsible agent will see an advisory note the next time their stage becomes active (viahooks/session-start.py) — this is informational only; nothing is blocked by it.
Verification
pipeline/traceability-matrix.mdexists and its matrix rows match every id actually present inpipeline/**/*.md..forge/traceability-gaps.jsonlis a fresh, complete snapshot (fully overwritten, not appended) — a gap that was fixed since the last run must not still appear.- Every gap row has a
(stage, agent)pair, or explicitlyunassignedif the file's path didn't resolve to a known stage directory (never silently dropped). - Re-running after a fix should show that gap gone from both the report and the jsonl snapshot.
Examples
User: "/forge:trace-matrix"
Claude: [adopts the persona, runs trace-matrix.py] "Traceability matrix generated — 5 ids tracked across stages 1, 2, and 5.
Gaps by responsible agent:
- Stage 1 (requirements-analyst):
req-002malformed (lowercase prefix),FEAT-001never referenced back in the SRS. - Stage 2 (product-designer):
REQ-001misplaced — redefined in prd.md instead of just referenced. - Stage 5 (planner):
REQ-004,NFR-001never referenced in task-dag.md.
Written to pipeline/traceability-matrix.md; gap snapshot refreshed in
.forge/traceability-gaps.jsonl — each responsible agent will see their items
surfaced next time their stage is active."
User: "who owns the REQ-004 gap?"
Claude: "REQ-004 is attributed to Stage 5 — the planner — since task-dag.md is the earliest downstream doc that should have referenced it but doesn't."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

