Verify an OpenSpec implementation
Check that code actually satisfies a change's specs, tasks, and design —
after implementation, before archiving — and report gaps with actionable,
file-referenced recommendations.
Steps
- Select the change. If not given, run
openspec list --json, show
changes with implementation tasks, mark ones with incomplete tasks
"(In Progress)", and let the user choose. Never guess.
- Check the schema:
openspec status --change "<name>" --json.
- Load artifacts:
openspec instructions apply --change "<name>" --json
returns contextFiles (artifact ID -> paths); read everything available.
- Verify completeness. Tasks: parse
- [ ]/- [x] in every
contextFiles.tasks file; each incomplete task is CRITICAL with a
recommendation ("Complete task: " or "Mark done if already
implemented"). Spec coverage: for each requirement in delta specs, search
the codebase for implementation evidence; an apparently-unimplemented
requirement is CRITICAL ("Requirement not found: ").
- Verify correctness. For each requirement, search for implementation
evidence and assess whether it matches intent; a divergence is WARNING
with a file/line-referenced recommendation. For each scenario, check
whether code and tests cover it; an uncovered scenario is WARNING.
- Verify coherence. If
design.md exists, extract key decisions and
check the implementation follows them; a contradiction is WARNING. No
design.md means skipping this check and noting it. Check new code
against project naming/structure/style conventions; a significant
deviation is SUGGESTION.
- Generate the report: a summary scorecard (Completeness /
Correctness / Coherence), issues grouped CRITICAL / WARNING / SUGGESTION
each with a specific recommendation and
file.ts:123-style references,
and a final assessment — "X critical issue(s) found, fix before
archiving" / "No critical issues, Y warning(s) to consider, ready for
archive" / "All checks passed, ready for archive".
Heuristics
Completeness leans on objective checklist items; correctness and coherence
use keyword search and reasonable inference, not certainty. When uncertain,
prefer SUGGESTION over WARNING, WARNING over CRITICAL. Every issue needs a
specific, actionable recommendation — never "consider reviewing".
Graceful degradation
Only tasks.md exists -> verify task completion only. Tasks + specs exist ->
skip design coherence. Full artifacts -> verify all three dimensions. Always
state which checks were skipped and why.
Completion
Complete when all three dimensions were assessed (or their skip was stated
and why), every issue has a severity, a file reference, and an actionable
recommendation, and the final assessment names whether the change is ready
to archive.
1---2name: openspec-verify-change3description: Verifies that an implementation matches its OpenSpec change's artifacts — completeness (tasks, spec coverage), correctness (requirement and scenario coverage), and coherence (design adherence, pattern consistency) — post-implementation, before archiving. Use for "verify this change", "does the code match the spec", or "is this ready to archive". For pre- implementation artifact-to-artifact consistency, use openspec-audit-change instead.4---56# Verify an OpenSpec implementation78Check that code actually satisfies a change's specs, tasks, and design —9after implementation, before archiving — and report gaps with actionable,10file-referenced recommendations.1112## Steps13141. **Select the change.** If not given, run `openspec list --json`, show15 changes with implementation tasks, mark ones with incomplete tasks16 "(In Progress)", and let the user choose. Never guess.172. **Check the schema:** `openspec status --change "<name>" --json`.183. **Load artifacts:** `openspec instructions apply --change "<name>" --json`19 returns `contextFiles` (artifact ID -> paths); read everything available.204. **Verify completeness.** Tasks: parse `- [ ]`/`- [x]` in every21 `contextFiles.tasks` file; each incomplete task is CRITICAL with a22 recommendation ("Complete task: <description>" or "Mark done if already23 implemented"). Spec coverage: for each requirement in delta specs, search24 the codebase for implementation evidence; an apparently-unimplemented25 requirement is CRITICAL ("Requirement not found: <name>").265. **Verify correctness.** For each requirement, search for implementation27 evidence and assess whether it matches intent; a divergence is WARNING28 with a file/line-referenced recommendation. For each scenario, check29 whether code and tests cover it; an uncovered scenario is WARNING.306. **Verify coherence.** If `design.md` exists, extract key decisions and31 check the implementation follows them; a contradiction is WARNING. No32 `design.md` means skipping this check and noting it. Check new code33 against project naming/structure/style conventions; a significant34 deviation is SUGGESTION.357. **Generate the report**: a summary scorecard (Completeness /36 Correctness / Coherence), issues grouped CRITICAL / WARNING / SUGGESTION37 each with a specific recommendation and `file.ts:123`-style references,38 and a final assessment — "X critical issue(s) found, fix before39 archiving" / "No critical issues, Y warning(s) to consider, ready for40 archive" / "All checks passed, ready for archive".4142## Heuristics4344Completeness leans on objective checklist items; correctness and coherence45use keyword search and reasonable inference, not certainty. When uncertain,46prefer SUGGESTION over WARNING, WARNING over CRITICAL. Every issue needs a47specific, actionable recommendation — never "consider reviewing".4849## Graceful degradation5051Only `tasks.md` exists -> verify task completion only. Tasks + specs exist ->52skip design coherence. Full artifacts -> verify all three dimensions. Always53state which checks were skipped and why.5455## Completion5657Complete when all three dimensions were assessed (or their skip was stated58and why), every issue has a severity, a file reference, and an actionable59recommendation, and the final assessment names whether the change is ready60to archive.