You are helping the user verify a spec-driven change before archiving.
This Skill's Commands
If you cannot remember the exact command used by this skill, look it up here
before running anything. Do not guess.
modify: node {{SKILL_DIR}}/scripts/spec-driven.js modify
verify: node {{SKILL_DIR}}/scripts/spec-driven.js verify <name>
verify-spec-mappings: node {{SKILL_DIR}}/scripts/spec-driven.js verify-spec-mappings
apply: node {{SKILL_DIR}}/scripts/spec-driven.js apply <name>
audit-spec-mapping-coverage: node {{SKILL_DIR}}/scripts/spec-driven.js audit-spec-mapping-coverage <spec-path> [--implementation <repo-path> ...] [--tests <repo-path> ...]
audit-unmapped-spec-evidence: node {{SKILL_DIR}}/scripts/spec-driven.js audit-unmapped-spec-evidence [--implementation <repo-path> ...] [--tests <repo-path> ...]
Prerequisites
The .spec-driven/ directory must exist at the project root. Before proceeding, verify:
ls .spec-driven/
If this fails, the project is not initialized. Run /spec-driven-init first.
Steps
Select the change — run node {{SKILL_DIR}}/scripts/spec-driven.js modify to list active changes. Ask which change to verify. If already specified, use it.
Format check — run:
node {{SKILL_DIR}}/scripts/spec-driven.js verify <name>
Report any errors (blocking) or warnings (non-blocking).
- Treat any testing-readiness error from the script as CRITICAL, including
missing
## Testing, missing lint/validation coverage, missing unit test
coverage, or required testing tasks with no explicit runnable command.
Also run:
node {{SKILL_DIR}}/scripts/spec-driven.js verify-spec-mappings
Treat malformed spec mapping frontmatter, missing mapping fields, or missing
mapped files as CRITICAL findings for affected main specs.
Task completion check — run:
node {{SKILL_DIR}}/scripts/spec-driven.js apply <name>
If remaining > 0, list the incomplete tasks. These are CRITICAL issues.
Open questions check — read .spec-driven/changes/<name>/questions.md and scan for - [ ] Q: entries:
- Any open question is CRITICAL
- The script also reports these as errors; treat them as CRITICAL here
Implementation evidence check — for each completed task in tasks.md:
- Identify what code or files the task should have changed
- Verify the change actually exists (read relevant files)
- If a completed task claims implementation, test, or spec work and there is
no visible evidence, treat that as CRITICAL unless the ambiguity is
clearly documented in
questions.md
Build a mapping evidence set — before judging mapping quality, build a
change-local evidence set from:
- each touched delta spec file under
.spec-driven/changes/<name>/specs/
- implementation files actually changed for the completed behavior
- test files actually changed for the completed behavior
- files explicitly relied on to provide or directly verify the completed behavior
Prefer the smallest confident evidence set. Do not infer semantic coverage
from distant helpers when the main implementation or direct test files are clear.
For each touched delta spec file, run:
node {{SKILL_DIR}}/scripts/spec-driven.js audit-spec-mapping-coverage <spec-path> [--implementation <repo-path> ...] [--tests <repo-path> ...]
Use the evidence set you built as the explicit --implementation and --tests inputs.
Also run:
node {{SKILL_DIR}}/scripts/spec-driven.js audit-unmapped-spec-evidence [--implementation <repo-path> ...] [--tests <repo-path> ...]
Use the same evidence set to identify implementation or test files that are
not mapped by any main spec.
Spec alignment check — read .spec-driven/specs/, .spec-driven/config.yaml, .spec-driven/changes/<name>/proposal.md, and all files in .spec-driven/changes/<name>/specs/:
- Does the implementation match what was proposed?
- Do the delta files in
changes/<name>/specs/ accurately describe what was implemented? Empty specs/ with real behavior changes is a CRITICAL.
- Does each delta file mirror its corresponding main spec file path? Mismatched paths mean the merge will fail.
- Do the delta files use the standard format (
### Requirement: <name>, RFC 2119 keywords, #### Scenario: blocks)? Non-conforming format is a CRITICAL — the spec format is mandatory.
- For each touched delta spec file, compare
mapping.implementation and
mapping.tests against the change-local evidence set using the audit
output from node {{SKILL_DIR}}/scripts/spec-driven.js audit-spec-mapping-coverage <spec-path> [--implementation <repo-path> ...] [--tests <repo-path> ...].
- If the evidence clearly shows that a touched spec depends on an
implementation file or directly verifying test file missing from the
mapping, report that omission as CRITICAL.
- If the evidence is ambiguous, prefer the smaller confident set and report
the ambiguity instead of inventing semantic coverage.
- Report repo-wide structural mapping errors from
verify-spec-mappings
separately from change-local mapping omissions using the result from
node {{SKILL_DIR}}/scripts/spec-driven.js verify-spec-mappings.
- If the unmapped-evidence audit shows that a primary implementation file
or directly verifying test file from this change is not mapped by any
main spec, report that as CRITICAL when the gap leaves this change's spec
coverage incomplete.
- If the unmapped-evidence audit only finds files outside this change scope
or weakly related candidates, report them separately as REPO DEBT or
lower-confidence WARNINGs.
- If config.yaml has a
rules field (including any fileMatch entries), check whether the implementation and artifacts comply — violations are WARNINGs
- If proposal.md has an Unchanged Behavior section with content, verify the implementation has not violated any listed behaviors — violations are CRITICALs
- Flag misalignments as WARNINGs or CRITICALs
Output a tiered report:
CRITICAL (blocks archive):
- [list or "none"]
REPO DEBT (outside this change):
- [list or "none"]
WARNING (should address):
- [list or "none"]
SUGGESTION (optional improvements):
- [list or "none"]
Recommend next step:
- If CRITICAL issues: address them before archiving
- If only WARNINGs: ask user if they want to address them or proceed
- If clean: suggest
/spec-driven-review <name>
Rules
- Be honest — don't pass a change just because tasks are checked off
- CRITICALs are things that would make the change incorrect or incomplete
- REPO DEBT is pre-existing repository state outside the change scope; report it
clearly and separately from change-local findings
- WARNINGs are things that reduce confidence but don't necessarily block
- SUGGESTIONs are optional quality improvements
- Keep implementation and test mappings in frontmatter, not in requirement
prose
1---2name: spec-driven-verify3description: Verify a spec-driven change is complete and correctly implemented. Checks task completion, implementation evidence, and spec alignment.4---56You are helping the user verify a spec-driven change before archiving.78## This Skill's Commands910If you cannot remember the exact command used by this skill, look it up here11before running anything. Do not guess.1213```yaml14modify: node {{SKILL_DIR}}/scripts/spec-driven.js modify15verify: node {{SKILL_DIR}}/scripts/spec-driven.js verify <name>16verify-spec-mappings: node {{SKILL_DIR}}/scripts/spec-driven.js verify-spec-mappings17apply: node {{SKILL_DIR}}/scripts/spec-driven.js apply <name>18audit-spec-mapping-coverage: node {{SKILL_DIR}}/scripts/spec-driven.js audit-spec-mapping-coverage <spec-path> [--implementation <repo-path> ...] [--tests <repo-path> ...]19audit-unmapped-spec-evidence: node {{SKILL_DIR}}/scripts/spec-driven.js audit-unmapped-spec-evidence [--implementation <repo-path> ...] [--tests <repo-path> ...]20```2122## Prerequisites2324The `.spec-driven/` directory must exist at the **project root**. Before proceeding, verify:25```26ls .spec-driven/27```28If this fails, the project is not initialized. Run `/spec-driven-init` first.2930## Steps31321. **Select the change** — run `node {{SKILL_DIR}}/scripts/spec-driven.js modify` to list active changes. Ask which change to verify. If already specified, use it.33342. **Format check** — run:35 ```36 node {{SKILL_DIR}}/scripts/spec-driven.js verify <name>37 ```38 Report any errors (blocking) or warnings (non-blocking).39 - Treat any testing-readiness error from the script as CRITICAL, including40 missing `## Testing`, missing lint/validation coverage, missing unit test41 coverage, or required testing tasks with no explicit runnable command.4243 Also run:44 ```45 node {{SKILL_DIR}}/scripts/spec-driven.js verify-spec-mappings46 ```47 Treat malformed spec mapping frontmatter, missing mapping fields, or missing48 mapped files as CRITICAL findings for affected main specs.49503. **Task completion check** — run:51 ```52 node {{SKILL_DIR}}/scripts/spec-driven.js apply <name>53 ```54 If `remaining > 0`, list the incomplete tasks. These are CRITICAL issues.55564. **Open questions check** — read `.spec-driven/changes/<name>/questions.md` and scan for `- [ ] Q:` entries:57 - Any open question is CRITICAL58 - The script also reports these as errors; treat them as CRITICAL here59605. **Implementation evidence check** — for each completed task in tasks.md:61 - Identify what code or files the task should have changed62 - Verify the change actually exists (read relevant files)63 - If a completed task claims implementation, test, or spec work and there is64 no visible evidence, treat that as CRITICAL unless the ambiguity is65 clearly documented in `questions.md`66676. **Build a mapping evidence set** — before judging mapping quality, build a68 change-local evidence set from:69 - each touched delta spec file under `.spec-driven/changes/<name>/specs/`70 - implementation files actually changed for the completed behavior71 - test files actually changed for the completed behavior72 - files explicitly relied on to provide or directly verify the completed behavior7374 Prefer the smallest confident evidence set. Do not infer semantic coverage75 from distant helpers when the main implementation or direct test files are clear.7677 For each touched delta spec file, run:78 ```79 node {{SKILL_DIR}}/scripts/spec-driven.js audit-spec-mapping-coverage <spec-path> [--implementation <repo-path> ...] [--tests <repo-path> ...]80 ```81 Use the evidence set you built as the explicit `--implementation` and `--tests` inputs.8283 Also run:84 ```85 node {{SKILL_DIR}}/scripts/spec-driven.js audit-unmapped-spec-evidence [--implementation <repo-path> ...] [--tests <repo-path> ...]86 ```87 Use the same evidence set to identify implementation or test files that are88 not mapped by any main spec.89907. **Spec alignment check** — read `.spec-driven/specs/`, `.spec-driven/config.yaml`, `.spec-driven/changes/<name>/proposal.md`, and all files in `.spec-driven/changes/<name>/specs/`:91 - Does the implementation match what was proposed?92 - Do the delta files in `changes/<name>/specs/` accurately describe what was implemented? Empty `specs/` with real behavior changes is a CRITICAL.93 - Does each delta file mirror its corresponding main spec file path? Mismatched paths mean the merge will fail.94 - Do the delta files use the standard format (`### Requirement: <name>`, RFC 2119 keywords, `#### Scenario:` blocks)? Non-conforming format is a CRITICAL — the spec format is mandatory.95 - For each touched delta spec file, compare `mapping.implementation` and96 `mapping.tests` against the change-local evidence set using the audit97 output from `node {{SKILL_DIR}}/scripts/spec-driven.js audit-spec-mapping-coverage <spec-path> [--implementation <repo-path> ...] [--tests <repo-path> ...]`.98 - If the evidence clearly shows that a touched spec depends on an99 implementation file or directly verifying test file missing from the100 mapping, report that omission as CRITICAL.101 - If the evidence is ambiguous, prefer the smaller confident set and report102 the ambiguity instead of inventing semantic coverage.103 - Report repo-wide structural mapping errors from `verify-spec-mappings`104 separately from change-local mapping omissions using the result from105 `node {{SKILL_DIR}}/scripts/spec-driven.js verify-spec-mappings`.106 - If the unmapped-evidence audit shows that a primary implementation file107 or directly verifying test file from this change is not mapped by any108 main spec, report that as CRITICAL when the gap leaves this change's spec109 coverage incomplete.110 - If the unmapped-evidence audit only finds files outside this change scope111 or weakly related candidates, report them separately as REPO DEBT or112 lower-confidence WARNINGs.113 - If config.yaml has a `rules` field (including any `fileMatch` entries), check whether the implementation and artifacts comply — violations are WARNINGs114 - If proposal.md has an **Unchanged Behavior** section with content, verify the implementation has not violated any listed behaviors — violations are CRITICALs115 - Flag misalignments as WARNINGs or CRITICALs1161178. **Output a tiered report**:118 ```119 CRITICAL (blocks archive):120 - [list or "none"]121122 REPO DEBT (outside this change):123 - [list or "none"]124125 WARNING (should address):126 - [list or "none"]127128 SUGGESTION (optional improvements):129 - [list or "none"]130 ```1311329. **Recommend next step**:133 - If CRITICAL issues: address them before archiving134 - If only WARNINGs: ask user if they want to address them or proceed135 - If clean: suggest `/spec-driven-review <name>`136137## Rules138- Be honest — don't pass a change just because tasks are checked off139- CRITICALs are things that would make the change incorrect or incomplete140- REPO DEBT is pre-existing repository state outside the change scope; report it141 clearly and separately from change-local findings142- WARNINGs are things that reduce confidence but don't necessarily block143- SUGGESTIONs are optional quality improvements144- Keep implementation and test mappings in frontmatter, not in requirement145 prose