Use when verifying a repository against its authoritative spec — spec-to-code audits, implementation-completeness reviews, release verification, behavior inventories, repo-wide acceptance testing, or when asked whether every documented requirement is implemented and actually works.
Ships in trace. 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.
None: SKILL.md is the whole skill.
Maintain exactly one canonical UTF-8 CSV named behavior_verification.csv at the repository root. It is the source of truth for every required behavior and every externally observable repository capability, including implementation evidence, executable verification, defects, fixes, and current status.
A TRACE run succeeds only when the CSV and the executed repository behavior agree.
behavior_verification.csv — the only canonical verification matrix and the only required mutable record..scratch/ — gitignored disposable scripts, test data, logs, captures, and evidence generated during the run.scenarios.jsonl — reusable scenarios promoted only after they pass. Create it when at least one reusable scenario exists.Do not create a second verification CSV, a renamed copy, a backup CSV, or per-agent CSV fragments anywhere in the repository.
TRACE performs no version-control writes. Do not commit, branch, or push unless the operator explicitly instructs it; list every created and modified file in the final report instead.
behavior_verification.csv.TRACE-0001, TRACE-0002, and so on. Never renumber, recycle, or repurpose an existing ID. Assign each new ID as one greater than the highest ID ever used, even after a row was removed.Verified is earned, not inferred. A row becomes Verified only after a passing execution, any required fix and re-test, a fresh-eyes review, and a CSV evidence audit.The header must match this exact order and spelling:
ID,Area,Capability,Actor,Story,Expected behavior from spec/code,Interface / entrypoint,Source,Test method,Status,Defects,Defect type,Actual result,Notes / open questions
Allowed Status values:
Spec'd — discovered and mapped, but not yet successfully executed and reviewed.Tested-Pass — execution passed; fresh-eyes review and CSV audit are still pending.Tested-Fail — execution failed or observed behavior contradicted the expected behavior.Fixed — a scoped fix was applied; passing re-test is still pending.Verified — execution passed after any fix, review found no unresolved issue, and the CSV matches the evidence.Allowed Defect type values:
FunctionalLogisticalUXDocumentationTestabilityEnvironmentUnknownLeave Defect type blank when there is no defect. Do not invent additional status or defect values.
| Column | Required content |
|---|---|
ID | Stable TRACE-NNNN identifier. |
Area | Product or system area, such as Auth, CLI, API, Persistence, Worker, Export, or Build. |
Capability | Concise name for one externally observable behavior. |
Actor | Human role, external system, operator, developer, scheduler, or other initiator. |
Story | Actor-centered scenario, normally "As …, when …, I can …". |
Expected behavior from spec/code | Atomic, observable pass condition. Preserve spec intent and note code behavior when it differs. |
Interface / entrypoint | Public route, command, binary, function export, queue, event, UI path, config surface, or other callable boundary. |
Source | Precise evidence such as spec:path:lines, code:path:symbol, test name, manifest, route registration, or code-only. Include both sides of a mismatch. |
Test method | Strongest practical method, dependencies, setup, invocation, assertions, and cleanup. |
Status | One allowed lifecycle value. |
Defects | Concrete observed defect, mismatch, blocker, or empty. Avoid vague phrases such as "doesn't work." |
Defect type | One allowed classification or empty. |
Actual result | Executed evidence: timestamp, command or manual procedure, exit code, observed result, concise output/log summary, and evidence path when useful. |
Notes / open questions | Ambiguity, scope disposition, attempt count, credentials, decisions, cleanup caveats, or next action. |
Use one-line cells where practical. Quote cells correctly when commas, quotes, or newlines are unavoidable. Preserve UTF-8 without a byte-order mark.
Use a compact, factual structure in Actual result:
2026-08-18T15:04:05Z | command: <exact command or manual procedure> | exit: <code or n/a> | observed: <what happened> | output: <key stdout/stderr/log summary> | evidence: <optional .scratch path>
Do not paste enormous logs into the CSV. Put full disposable logs under .scratch/evidence/<ID>/ and retain the exact command and decisive output summary in the row.
Use the actual execution time in each timestamp (for example from date -u +%Y-%m-%dT%H:%M:%SZ); never a placeholder or a rounded guess. When a row is re-tested, append a new entry; never overwrite prior failing evidence.
Normal no-fix path:
Spec'd -> Tested-Pass -> Verified
Normal defect path:
Spec'd -> Tested-Fail -> Fixed -> Tested-Pass -> Verified
A failed re-test returns the row to Tested-Fail. A fresh-eyes finding also returns the affected row to Tested-Fail unless a fix has already been applied, in which case use Fixed until re-tested.
Never change a failed row directly to Verified based on inspection, confidence, or a code diff.
The order is fixed: passing execution, then fresh-eyes review, then the fresh-context CSV audit. Only the audit promotes Tested-Pass to Verified.
Write each transition to the CSV as it occurs; never batch transitions. A fixed-but-not-yet-re-tested row must read Fixed in the CSV, not be held back until it can be written as Tested-Pass.
behavior_verification.csv.
/.scratch/ or .scratch/ is present in the repository root .gitignore.scenarios.jsonl; do not overwrite passing scenarios.python3 <skill-directory>/scripts/trace_csv.py validate --repo .
The main thread may use the helper to initialize the CSV. Reviewers must use only read-only commands.
Build a factual map before extracting requirements or designing scenarios.
Detect and record:
Use manifests, route registration, command registration, export declarations, generated API schemas, configuration loading, and runtime introspection—not filenames alone.
Identify the authoritative specification and record its path or source. Use this precedence unless the user specifies another:
Executable code wins over secondary documentation when determining current behavior. It does not erase an unmet authoritative requirement.
Before Phase 1, state internally how capability coverage will be obtained. Use at least these independent passes:
Decide how each dependency will run locally or in a sandbox. Record missing services, credentials, destructive risks, or unavailable platforms immediately; do not defer them until testing.
For every normative requirement:
Source.Spec'd.Normative cues include "must," "shall," "should" when acceptance depends on it, explicit acceptance criteria, error behavior, authorization rules, data persistence rules, limits, defaults, and compatibility guarantees.
Enumerate every externally observable capability exposed by the repository, even when absent from the authoritative spec. Add one row per atomic capability with Source beginning with code-only and note one of these dispositions:
Scope disposition: verify
or
Scope disposition: out-of-scope/code-only — <reason>
An out-of-scope disposition must be explicit and reasoned. It cannot conceal an open Functional, Logistical, or UX defect. An out-of-scope row keeps its current status — normally Spec'd — and is exempted from the exit criteria rather than verified.
Typical code-only surfaces include undocumented routes, flags, environment-controlled behavior, importable exports, migration commands, maintenance jobs, debug endpoints, compatibility aliases, and error modes.
When spec and code disagree:
Expected behavior from spec/code;Notes / open questions;Functional unless the discrepancy is purely documentation;After the first matrix is built, perform an independent review against the spec and repository surface.
Prefer a fresh subagent or reviewer when available. It must be read-only and return a structured list containing proposed row, evidence, and reason. The main thread decides and writes.
When no independent context is available, perform a second pass from manifests, route/command/export registration, generated schemas, and runtime help — or, when the repository lacks such artifacts, an independent re-reading of its public entrypoints — without reading rows sequentially. Compare the resulting capability list to the CSV, then add omissions and remove or qualify unsupported claims.
Do not begin scenario testing until every required spec row has all of the following:
A required row that fails this gate stays Spec'd. Record the missing evidence or blocker and report it immediately with a table:
CSV ID | Requirement | Missing evidence or implementation | Blocker | Next action
Examples of gate failures:
Continue the verification loop for rows that individually pass the gate; a run with any gate-blocked required row cannot report SUCCESS. An implementation that exists but misbehaves is not a gate failure — test it and log the defect.
Do not use mocks or static inspection to force a required row through the gate.
Enter this loop for rows that pass the spec-completion gate. Gate-blocked required rows stay Spec'd and keep the overall run from reporting SUCCESS.
For each row not Verified, use the strongest practical method in this order:
Static analysis never advances a row to Tested-Pass or Verified.
Prefer black-box assertions on externally observable behavior. Use internal inspection only to explain failures or assert state that has no public observation path.
Put disposable scenario scripts, captures, logs, temporary data, and local orchestration under:
.scratch/
Recommended layout:
.scratch/
evidence/<TRACE-ID>/
scripts/
fixtures/
state/
Do not commit scratch artifacts. Ensure cleanup is safe and idempotent.
For every unverified row:
Tested-Pass or Tested-Fail and update defect fields factually.A test is not strong merely because it passes. It must be capable of failing when the required behavior is broken.
For each logged Functional, Logistical, or UX defect:
Fixed.Defects, Actual result, or Notes / open questions.Fix Documentation, Testability, Environment, or Unknown defects only when the correction is obvious, safe, and needs no product decision. Otherwise record the next action and stop or continue according to the gate and safety rules.
Re-run the exact failing scenario and any directly affected regression or neighboring scenario.
Tested-Pass, append the new execution evidence after the preserved failing evidence in Actual result, then perform fresh-eyes review.Tested-Fail, preserve the attempt evidence, increment the cycle count, and return to diagnosis if below the safety cap.Never mark Verified merely because tests compile, a unit test passes while the public scenario still fails, or the diff appears correct.
After a passing execution, inspect the touched code, tests, scenario, and CSV row for:
Log every material finding as a new row or update the affected row. Fix and re-test scoped Functional, Logistical, and UX findings. A row can advance to Verified only when this review is clear.
After each write batch and before final reporting:
Verified without passing execution evidence.behavior_verification.csv exists.python3 <skill-directory>/scripts/trace_csv.py validate --repo .
When the audit passes, change eligible Tested-Pass rows to Verified and run the validator again.
Promote a passing scratch scenario to root-level scenarios.jsonl when it is deterministic, safe, reusable, and exercises a public behavior boundary. Store one JSON object per line.
Recommended record shape:
{"id":"scenario-trace-0007-happy-path","capability_ids":["TRACE-0007"],"name":"Create and retrieve a record through the public API","preconditions":["service running","TEST_DATABASE_URL set"],"command":"python3 scenarios/create_and_get.py","expected":{"exit_code":0,"assertions":["created id is returned","retrieved payload matches"]},"cleanup":"scenario deletes its disposable record","last_verified":"2026-08-18T15:04:05Z"}
Rules:
capability_ids.scenarios/; a promoted scenario must never reference .scratch/.Track failed test/fix/re-test cycles per capability in Notes / open questions:
Cycle 1/3: ...
Cycle 2/3: ...
Cycle 3/3: ...
After three failed cycles for one capability:
Tested-Fail.Do not reset the attempt count by renaming the capability, creating a new row, or slightly changing the test.
Report success only when all conditions are true:
Verified;Verified or explicitly marked Scope disposition: out-of-scope/code-only with no open Functional, Logistical, or UX defect;Functional, Logistical, or UX defects remain;scenarios.jsonl;behavior_verification.csv exists;Return:
SUCCESS, BLOCKED AT SPEC-COMPLETION GATE, or INCOMPLETE — TEST FAILURES REMAIN. When gate blockers and test failures both remain, report BLOCKED AT SPEC-COMPLETION GATE and include the failures.scenarios.jsonl entries.Do not claim complete verification when any success condition is unmet.
Never:
Verified before re-test and review;What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/trace:tracefrom trace
trace@2389-research is listed by 2389-research/claude-plugins — review the source before installing
npx claudepluginhub 2389-research/claude-plugins --plugin trace