openspec-verify-change
Verify implementation matches change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving.
By fission-ai · 1,660 installs
npx skills add fission-ai/openspec --skill openspec-verify-change
Source repository · Upstream listing
Verify that an implementation matches the change artifacts (specs, tasks, design).
Store selection: If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run openspec store list json to discover registered store ids, then pass store <id on the commands that read or write specs and changes ( new change , status , instructions , list , show , validate , archive , doctor , context , schemas , view ). Once selected, treat store <id as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run openspec status change "<name " json store "<id " , not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow ups. Without a store, commands act on the nearest local openspec/ root.
Project check: These steps expect a project that already uses OpenSpec. Before the first step that writes anything ( new change , archive , sync specs , or authoring an artifact file), confirm the project has a root: run openspec list json (with store <id when a store is selected, since the store is then the root) and read root . A root object means the project is set up. "root": null means it is not there is no openspec/ directory here, and a write such as openspec new change would create one as a side effect. The command also exits non zero, which is that answer rather than a broken CLI, so read the JSON instead of retrying or working around it.
One "root": null is not about setup: when a status error message starts with Declared in or Invalid store declaration in and names this project's openspec/config.yaml (or config.yml ), the project does use OpenSpec through a store it declares, which this machine cannot resolve (the store is not registered, or the store: line is malformed). Do not treat it as uninitialized and skip the branches below: stop before writing and show the user that error's message and fix .
Otherwise, with no root, what happens next depends on how this workflow was reached:
Auto selected : you chose this workflow yourself, without the user naming OpenSpec, naming this skill, or running its slash command. Stop using OpenSpec and answer the request normally, as you would with no OpenSpec installed. Do not ask them to set anything up and do not mention OpenSpec setup.
Explicit OpenSpec request : the user named OpenSpec, named this skill, or ran its slash command. Stop before writing and ask how to proceed: set this project up ( openspec init ), target a store they already have ( store <id ), or continue without OpenSpec for this request. Wait for their answer.
In both branches, never create the root as a side effect: do not run openspec init until the user asks for it, do not hand create openspec/ files, and do not let a command create it.
Input : Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
Steps
1. Select the change
If a name is provided, use it. Otherwise:
Infer from conversation context if the user mentioned a change
Auto select if only one active change exists
If ambiguous, run openspec list json to get available changes and ask the user to select one
When prompting, show all active changes returned by the list, including changes with status: "no tasks" .
Include the schema used for each change if available.
Mark changes with incomplete tasks as "(In Progress)".
Always announce: "Using change: <name " and how to override (e.g., /openspec verify change <other ).
2. Check status to understand the schema
Parse the JSON to understand:
schemaName : The workflow being used (e.g., "spec driven")
planningHome , changeRoot , artifactPaths , and actionContext : path and scope context
Which artifacts exist for this change
3. Get planning context and load artifacts
This returns the change directory, contextFiles (artifact ID array of concrete file paths), taskTrackingConfigured , and top level tasks and progress aggregated from every concrete file matched by the schema's apply.tracks configuration that could be read. Read all available artifacts from contextFiles .
Treat apply state and instruction as context, not a verification verdict. Do not implement tasks or archive the change during verification.
4. Initialize verification report structure
Create a report structure with three dimensions:
Completeness : Track tasks and spec coverage
Correctness : Track requirement implementation and scenario coverage
Coherence : Track design adherence and pattern consistency
Each dimension can have CRITICAL, WARNING, or SUGGESTION issues.
Verification is advisory. Respect intentional omissions such as skip specs: true , optional design documents, and schemas without task tracking. Do not require or invent optional or intentionally omitted artifacts to obtain a clean report. Not verified describes a limit of this report, not a new archive prerequisite. Archive retains its own checks and user confirmation behavior.
Mark checks the schema does not define, or artifacts the status reports as intentionally skipped, as Not applicable . The correctness checks of a change whose readable delta specs contain REMOVED or RENAMED requirements but no ADDED or MODIFIED requirements are also Not applicable (see step 6). Exclude them from skipped check counts and the archive readiness assessment. Reserve Not verified for applicable checks whose evidence is missing or unusable.
If only task evidence is available for applicable checks, verify task completion only and mark the remaining applicable checks, including Code Pattern Consistency , as not verified with the reason "Only task evidence available".
If artifacts cannot be read or contain no usable requirements, scenarios, or design decisions, mark the affected checks as not verified with the specific reason. Continue checks supported by the remaining evidence, but a partially checked input set is not a fully verified check. Missing requirements affect Spec Coverage and Requirement Implementation Mapping; missing scenarios affect Scenario Coverage; missing design decisions affect Design Adherence.
5. Verify Completeness
Task Completion :
If taskTrackingConfigured is false, report Task Completion as not applicable. Do not treat empty tasks as missing evidence.
Otherwise, use the top level tasks and progress fields. They already aggregate every readable concrete file matched by apply.tracks , regardless of the tracked artifact's ID; do not infer tracking from a contextFiles key.
If unavailableTrackingFiles is nonempty, mark Task Completion as not verified and include every unavailable path and reason. Continue using any readable task evidence, but do not infer completion from the partial tasks and progress fields.
If taskTrackingConfigured is true and tasks is empty, mark Task Completion as not verified and record the reason from apply state and instruction . Nonzero totals alone do not establish evaluable task descriptions.
Report complete vs total tasks from progress .
If progress.remaining is greater than 0:
Add CRITICAL issue for each listed incomplete task. If the remaining count exceeds the listed incomplete tasks, also report the incomplete checkboxes without descriptions and recommend adding descriptions and completing them. Do not infer completion from the listed tasks alone.
Recommendation: "Complete task: <description " or "Mark as done if already implemented"
Spec Coverage :
If status marks the spec artifact skipped by skip specs: true , or the schema defines no spec artifact (no artifact whose artifactPaths.<id .outputPath is under specs/ ), report the spec dependent checks as not applicable.
Otherwise, contextFiles is keyed by artifact id, and artifact ids come from the active schema, so do not assume an id such as specs . The spec artifacts are those whose artifactPaths.<id .outputPath is under specs/ ; read their files from contextFiles.<id . If those spec files are absent or empty, mark Spec Coverage , Requirement Implementation Mapping , and Scenario Coverage as not verified; do not treat any of them as clean.
If delta specs exist in those spec files:
Extract all requirements (marked with " Requirement:", or listed as FROM: / TO: pairs under RENAMED Requirements ) and note the delta section each one sits under: ADDED , MODIFIED , REMOVED , or RENAMED Requirements . The section decides what the check looks for.
For each ADDED or MODIFIED requirement (for MODIFIED, check the text in the delta, not the old wording):
Search codebase for keywords related to the requirement
Assess if implementation likely exists
If ADDED or MODIFIED requirements appear unimplemented:
Add CRITICAL issue: "Requirement not found: <requirement name "
Recommendation: "Implement requirement X: <description "
For each REMOVED requirement, the change asks for the behavior to be gone, so invert the check:
A REMOVED block carries only the requirement name and any Reason / Migration notes, so the delta does not describe the behavior itself. Before searching, read the baseline requirement in the main spec at <planningHome.root /openspec/specs/<capability path /spec.md , using the same capability path as the delta spec. Match it by exact normalized name, the rule OpenSpec uses when it applies REMOVED blocks: the heading text after Requirement: , trimmed, with a closing run dropped only when a space or tab precedes it (so C keeps its ), compared case sensitively. A similarly worded heading is not a match; a rename belongs under RENAMED. Its body and scenarios are the evidence for the behavior that must be gone; never search from the requirement name alone.
If that file holds no requirement with that exact normalized name for example because an earlier sync already applied the removal, or a similarly named ADDED requirement replaced it recover the baseline from the same file's history, in the planning repository rather than the current directory: git C "<planningHome.root " log p openspec/specs/<capability path /spec.md , or git C "<planningHome.root " show <commit ^:./openspec/specs/<capability path /spec.md once you have identified the commit that applied the removal. Empty output means the pathspec matched nothing, not that there is no baseline: git log reports an unmatched path as success, so re check the path before drawing any conclusion from silence.
A baseline that adds nothing to its own title no body beyond a restatement of the name, no scenarios is unusable evidence, the same as a missing one. If no usable baseline is available in either place, mark Spec Coverage as not verified for that entry with the reason and stop there: do not search, and never count an unsearched removal as passing.
Search codebase for that behavior. Matches in openspec/ artifacts or docs, or in code that serves only the Migration note or an ADDED requirement, are not evidence by themselves. Report any code path that still delivers the removed behavior, including one shared with an ADDED requirement.
Finding no implementation is the expected result, but only once the baseline behavior was the thing you searched for. Never report a REMOVED requirement as "Requirement not found" or recommend implementing it.
If the behavior is still present:
Add CRITICAL issue: "Removed requirement still implemented: <requirement name "
Recommendati