/sdd:sdd-verifyfrom sdd
Verifies that an implementation matches a change's SDD artifacts across six dimensions (Completeness, Scope, Contract, Coverage, Coherence, Conformance) with three severity levels.
Ships in sdd. 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.
Verify that the implementation satisfies the contracts stated in the change's specs. Produces a structured report across six dimensions (Completeness, Scope, Contract, Coverage, Coherence, Conformance) with three severity levels.
Specs are contracts — property statements about observable state (see references/sdd-spec-formats.md § 1).
Scenarios are evidence that samples those contracts, not the contracts themselves (§ 1.5).
sdd-verify checks evidence: it confirms that the cited tests and outputs demonstrate each contract claim and cover the claim's input space.
It does not formally prove universal properties — strong claims supported by thin evidence are a risk flag, not a failure.
It does not search for defects beyond the cited evidence.
That search has no stopping point inside verify, so re-runs on unchanged code would keep finding new defects.
Defect search belongs to code-review and security-scan, which verify offers at the end of every run (Phase 9).
SPECS_ROOTis resolved by thesddrouter before this skill runs. Replace.specs/with your project's actual specs root in all paths below.
Write the report and its findings in the voice of a professional technical writer. Prefer ASD-STE100 Simplified Technical English: short sentences, one instruction per sentence, active voice, and one term per concept. Keep identifiers, commands, paths, and RFC 2119 keywords exact.
sdd-sync — confirm implementation matches the change before syncing specs.specs/changes/<name>/ is missing) — the skill is change-scoped; use sdd-derive to retrofit specs from existing code insteadsdd-apply to drive work; verify aftersdd-verify.
Skip the notice when the user asked for the skill by name or slash command; spelling and spacing need not match.
A phrase from this skill's own trigger list is not a name — naming the work is not naming the skill.Before starting, check .specs/changes/<name>/tasks.md:
tasks.md is missing, warn: "No tasks.md for this change — completeness check will be skipped."
Offer to proceed anyway.tasks.md exists but no tasks are marked complete, warn: "No completed tasks yet — verify output will be limited."
Offer to proceed anyway.| Dimension | Question | What to check |
|---|---|---|
| Completeness | Is everything done? | All tasks checked off, all delta spec requirements implemented |
| Scope | Is everything in scope, and no more? | Every meaningful code change traces to a requirement; every requirement and change traces up to a user story; no unspecified behavior and no value-less over-engineering |
| Contract | Does the implementation satisfy the spec contract? | Cited evidence demonstrates each requirement's scenarios and covers the input space of the claim stated in the text |
| Coverage | Do scenarios meaningfully sample the contract? | Scenarios span happy path, boundaries, and plausible failure modes — not trivially-passing cases |
| Coherence | Does it follow the design? | Implementation follows decisions in design.md |
| Conformance | Do schemas match the specs? | Generated schema diff confirms spec requirements are reflected in the schema |
| Level | Meaning | Action required |
|---|---|---|
| CRITICAL | Implementation contradicts a requirement or design decision | Must fix before proceeding |
| WARNING | Implementation partially meets a requirement or deviates from design | Should address |
| SUGGESTION | Minor improvement opportunity | Optional |
A classification or severity follows from what the evidence shows. When the evidence meets a rule's condition, apply the rule. Reasons the deviation exists, its intent, and its possible remedies go in the finding's text; they never lower its classification or severity.
Severity is not the same thing as sync gating.
A finding can keep its original severity and still be non-blocking when the user explicitly authorizes that exception and it is recorded per references/sdd-change-formats.md.
Evidence classification (VERIFIED / TESTED / INSPECTED / WAIVED), the SHALL/INSPECTED → CRITICAL sufficiency rule, the waiver format and provenance check, and the citation format are defined in references/evidence-rules.md.
Read that file before Phase 4 — both the orchestrator and any subagents need it.
Hard rule: SHALL at INSPECTED → CRITICAL unless waived. Static reading is never sufficient for a SHALL.
Verification overrides are separate from waivers:
Overrides never change severity; they only affect blocking status. Use them to preserve decision continuity, not to erase or reclassify findings.
Phases 4–6 (Evidence, Contract, Coverage) SHALL be evaluated against the parallel-subagent gate before Phase 3 begins. Single-agent execution is permitted only when the gate routes you there — it is not the default.
The gate evaluation runs as a required step within Phase 2.
The full availability gate, granularity proposal, model resolution, dispatch protocol, and synthesis steps live in references/parallel-subagent-path.md.
Read all available artifacts (graceful degradation — proceed with what exists):
.specs/changes/<name>/tasks.md — task completion status.specs/changes/<name>/proposal.md — user stories, scope, and any ## Resolved Questions.specs/changes/<name>/design.md — design decisions and any ## Spec Changes / ## Verification Waivers / ## Verification Overrides (if exists).specs/changes/<name>/specs/ — delta specs (if exist).specs/specs/ — baseline specs for full context.specs/changes/<name>/.verify/<run-id>/report.md from the newest run directory (if one exists) — the previous run's findings, which Phase 9 re-checksRun the project's full test suite before any other checks. Verification claims rest on observed behavior, so a green suite is the baseline evidence that the implementation actually works.
Discover the test command by checking, in order:
CONTRIBUTING.md, README.md, AGENTS.md, CLAUDE.md.Makefile targets, package.json scripts.test, pyproject.toml [tool.pytest.ini_options] or [tool.poetry.scripts], tox.ini, noxfile.py, Cargo.toml..github/workflows/*test*.yml, .gitlab-ci.yml.Run the full suite with per-test-ID output — do not narrow to changed files or a single test path.
Subagents confirm citations by searching the log for individual test names, so the output must show each test's pass/fail status by name.
Common flags: pytest -v, jest --verbose, go test -v, nox -- -v.
For machine-readable output use pytest --junit-xml=<path> and point subagents at the XML.
If the runner cannot produce per-test-ID output, treat all requirements as INSPECTED and note this as a WARNING.
Capture the output, and any JUnit XML, in this run's directory: .specs/changes/<name>/.verify/<run-id>/test-output.log.
Read references/test-run.md § 1 before you create the directory: it defines the run id, the -dirty and -no-git suffixes, and the first-run .gitignore question.
If any tests fail or error, flag each failure as CRITICAL in the report and stop the verify run by default — do not proceed to later phases.
Write the report (Phase 9) with these failures before you stop, so that sdd-sync and the next run see this run.
Do not offer code-review or security-scan for a stopped run; code-review runs the project's hooks and test suite first, and does not start while one fails.
A failing suite invalidates Contract, Coverage, and Coherence conclusions, and there is no reliable way to localize "affected area" without a test→requirement map.
Re-run after fixes.
If the user explicitly says they already know about the failing suite and wants to proceed anyway, continue only in the failing-suite override mode that references/test-run.md § 2 defines.
If the project has no runnable test suite, note this as a WARNING and continue — every requirement will land at INSPECTED at best.
Do not modify, skip, or xfail tests to make the suite pass — that is itself a CRITICAL finding.
You SHALL run this gate after Phase 2 and before Phase 3. Single-agent execution is allowed only when the gate routes you there.
Checklist — do all four:
Read references/parallel-subagent-path.md § 1 (Availability Gate) and § 2 (Granularity).
Count delta spec requirements across all in-scope capabilities.
Apply the gate table in § 1 (first match wins) to determine the path.
Announce the outcome to the user using this template, then wait for confirmation if parallel:
Parallel gate: <N> requirements across <K> capabilities.
Path: <single-agent | parallel> — <reason from gate table row>.
<If parallel:> Proposing <P> subagents at <per-capability | per-requirement> granularity. Confirm or override.
If the gate sends you to single-agent, proceed to Phase 3 yourself.
If the gate sends you to parallel, wait for user confirmation and resolve the model per references/parallel-subagent-path.md § 3.
Then run Phase 3 and Phase 4's Enumerate Write-Sites step yourself, because the schema diff and the write-site enumeration are dispatch inputs.
Dispatch per § 4 only after both are done.
Audit rule. If no gate-outcome announcement appears in the run, the gate was not evaluated and the next phase must not begin.
Read references/schema-checks.md § 1 on every run.
It generates the "after" snapshots when .specs/.sdd/schema-config.yaml exists, and sets the policy when it does not.
This is the first per-requirement phase — eligible for subagent dispatch (see references/parallel-subagent-path.md).
On the parallel path, subagents run steps 1–5 below; the subsections marked as orchestrator work stay with you.
tasks.md.references/evidence-rules.md §§ 1, 3, 5:
evidence-rules.md § 2):
design.md (then WAIVED, subject to the provenance check in § 4).If Phase 2 is in failing-suite override mode, passing tests from that run may still be cited for requirement-local evidence, but the report must state that the overall suite is failing and that downstream conclusions are advisory.
The output of this phase is a per-requirement evidence table that drives Phase 5 and the final report. On the parallel path, the orchestrator assembles this table from subagent findings during synthesis.
Read references/change-level-checks.md and run its five checks yourself, on the single-agent and the parallel path alike:
On the single-agent path, read references/requirement-checks.md § 1 and apply it to each implemented requirement at TESTED or VERIFIED.
On the parallel path, the subagents run it; do not run it again.
On the single-agent path, read references/requirement-checks.md § 2 and apply its coverage smells to each requirement.
On the parallel path, the subagents run it; do not run it again.
Read references/schema-checks.md § 2 when Phase 3 produced a schema diff or schemas/expected.md exists.
If design.md exists:
design.md, verify the implementation follows it via static reading.If Phase 2 is in failing-suite override mode, Coherence findings remain worth reporting, but they do not outweigh the CRITICAL failing-suite status.
Coherence findings are static reads by design — design.md records HOW choices, not external contracts, so the evidence-tier rule does not apply here.
A decision either is or is not reflected in code; if the decision needs runtime confirmation, it should have been promoted to a spec requirement.
The report is a derived snapshot of one run, not a source of truth.
Present it in chat, and write it to .specs/changes/<name>/.verify/<run-id>/report.md on every run, beside the test log it cites.
The next run reads it to re-check its blocking findings.
Whether git tracks it follows the user's choice for .verify/ (Phase 2).
Never write it to the change root, where it would read as one of the change's authored artifacts.
A report describes the code and specs of its own run, and goes stale the moment either moves.
Its durable consequences do not live in the report: waivers and overrides are recorded in design.md, and remediation tasks in tasks.md.
The report only echoes them.
Re-check the previous run. When Phase 1 found a previous report, account for each of its blocking findings in this report as one of:
A finding a run does not notice again is not resolved. Detection varies between runs, so without this step a later run can pass a change an earlier run blocked, without anything having changed. The re-check covers findings only; it does not limit what this run looks for.
Then read references/report.md and follow it in order: classify blocking status, carry the override records into the report, write the report from its template, choose the Summary, and offer the review handoff.
| Missing artifact | Behavior |
|---|---|
tasks.md | Skip completeness check, warn before proceeding |
design.md | Skip coherence check and waiver lookups, note in report |
| Delta specs | Skip contract and coverage checks, note in report |
schema-config.yaml | Skip Phase 3 snapshot and Phase 7 conformance check, note in report |
schemas/expected.md | Skip expected-vs-actual diff within conformance; run drift detection only |
| No git diff available | Skip scope check (Phase 4 step), flag as WARNING, note in report |
No user stories / NORTH-STAR.md | Skip value-alignment check (Phase 4 step), note in report |
| No proposal commit | Skip spec-drift check (Phase 4 step), flag as WARNING, no clean pass |
"Warn before proceeding" means a conversational message to the user. "Note in report" means adding a note inside the verification report itself.
references/sdd-spec-formats.md § 1.5 — scenarios are evidence, not definition).evidence-rules.md.evidence-rules.md § 4) — waivers added in the same branch as the implementation, especially after a failed verify, need to be surfaced.references/parallel-subagent-path.md § 6.references/evidence-rules.md — tiers, sufficiency rule, waivers, provenance check, citation formatreferences/parallel-subagent-path.md — availability gate, granularity, dispatch, synthesisreferences/verify-subagent.md — canonical job description for subagents on the parallel pathreferences/sdd-spec-formats.md — contract shapes (§ 1.1), scenarios as evidence (§ 1.5), partition heuristic (§ 1.6), claims that need generated evidence (§ 1.7)references/sdd-change-formats.md — task format (§ 3), contract-relevant write-site definition (§ 3.1), spec-drift check (§ 5.5), and changes since a verify run (§ 7)references/sdd-schema.md — schema evidence annotations (§ 1) and lifecycle policy (§ 4)scripts/check_modified_completeness.py — deterministic dropped-scenario check (scenario names only, not body sub-clauses); exits non-zero on dropped baseline scenarios, wireable as a pre-commit/CI gatereferences/change-level-checks.md — the five orchestrator checks of Phase 4: write-sites, scope, value alignment, MODIFIED delta integrity, spec driftreferences/requirement-checks.md — contract satisfaction (Phase 5) and scenario coverage (Phase 6), shared by the orchestrator and the subagentsreferences/schema-checks.md — schema snapshot (Phase 3) and conformance (Phase 7)references/report.md — blocking classification, report template, Summary rules, review handoff (Phase 9)references/test-run.md — run-directory naming and the failing-suite override (Phase 2)scripts/check_verify_ignored.py — reports whether git ignores .verify/ and whether this is the repository's first verify run; --add writes the .verify/ rule to <specs-root>/.gitignorereferences/change-level-checks.md (opens in a new tab)references/evidence-rules.md (opens in a new tab)references/parallel-subagent-path.md (opens in a new tab)references/report.md (opens in a new tab)references/requirement-checks.md (opens in a new tab)references/schema-checks.md (opens in a new tab)references/sdd-change-formats.md (opens in a new tab)references/sdd-schema.md (opens in a new tab)references/sdd-spec-formats.md (opens in a new tab)references/test-run.md (opens in a new tab)references/verify-subagent.md (opens in a new tab)scripts/check_modified_completeness.py (opens in a new tab)scripts/check_verify_ignored.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
10 skills in this plugin
/formal-verificationUse when the user asks for formal verification or formal methods: writing or checking a design model (TLA+, Alloy, P, Quint), proving code against contracts (Dafny, Verus, SPARK, Frama-C, Lean, Rocq), model checking, invariants, liveness, vacuous passes, or counterexamples; deciding whether a design or requirement warrants formal verification; or keeping existing formal specs and proofs current. Not for prose requirements or "spec this out" (use sdd)./sddUse when the user wants any spec-driven development action — exploring before speccing, deriving specs from code or translating specs from another system, proposing a change, applying or implementing, verifying, syncing delta specs, or archiving. Triggers: 'spec this out', 'create a change', 'apply tasks', 'verify implementation', 'sync specs', 'archive change', or any mention of 'specs' or 'sdd'./sdd-applyUse when implementing tasks from a change's tasks.md. Triggers: "apply tasks", "implement the change", "work through tasks", "start implementing", "continue implementing", "apply the change"./sdd-archiveUse when completing and archiving a change after all tasks are done and specs are synced. Triggers: "archive the change", "complete this change", "close out the change", "finish the change", "archive"./sdd-deriveUse when deriving SDD specs from existing code or retroactively documenting implemented behavior. Triggers: "derive specs", "generate specs from code", "document this code in SDD", "retrofit specs", "spec out what's already built"./sdd-exploreUse when the user wants to think through ideas, investigate problems, or clarify requirements before or during any SDD path. Triggers: "explore", "think through", "help me figure out", "what should I build", "I'm not sure where to start", "let's brainstorm", "investigate this", "I want to explore".npx claudepluginhub ahgraber/skills --plugin sdd