agentleFS
200iqlabs200iqlabs/shared-skills/.github/skills/openspec-verify-change/SKILL.md

openspec-verify-change

Skill4 starsChanged 12 days agoApache-2.0View on GitHub

Verify implementation matches OpenSpec change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving. Also use when the user says "openspec verify" or "opsx verify".

78 other projects use a version of this, 74 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use openspec-onboard, draft-openspec-docs and 7 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    openspec-onboard

    Guided onboarding for OpenSpec - walk through a complete workflow cycle with narration and real codebase work.

    Also in 57 projects that use this

  • goernSkill

    draft-openspec-docs

    Collaborative page-drafting mode for the OpenSpec docs. Builds a scratch plan inside the target page (purpose, structure, numbered draft steps), iterates on it with the user, then drafts one section per approved step and cleans up after itself. Use when a page needs a from-scratch rewrite or a new page is being shaped with the user in the loop.

    Also in 3 projects that use this

  • goernSkill

    release-openspec

    Use this skill when releasing OpenSpec: audit merged work and changeset coverage, decide whether a catch-up changeset PR is needed, prepare or resume the Changesets Version Packages PR, cut a beta or stable release, verify publishing, and polish GitHub release notes. Also use when asked whether an open release PR is complete, what the next release step is, or to continue a release paused for human approval.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    openspec-update-change

    Update an OpenSpec change by revising its existing planning artifacts and keeping them coherent with one another. Use when the user wants to revise a change's plan, fold new decisions into it, or reconcile its artifacts after an edit. Never edits code.

    Also in 20 projects that use this

  • SentrySkill

    code-simplifier

    Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Use when asked to "simplify code", "clean up code", "refactor for clarity", "improve readability", or review recently modified code for elegance. Focuses on project-specific best practices.

    Also in 3 projects that use this

  • OpenAISkill

    requesting-code-review

    Use when completing tasks, implementing major features, or before merging to verify work meets requirements

    Also in 3 projects that use this

  • +2 more from goern

The file

Show its rules and text

We split this skill into the rules it gives an agent

52 rules. 24 are common, 17 are distinctive, and 11 are very specific to this project.

  • 24

    Common

    Most of the 76 edited versions we read keep these.

  • 17

    Distinctive

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Common:

    Verify that an implementation matches the change artifacts (specs, tasks, design).

    line 13
  2. Distinctive:

    If a name is provided, use it.

    line 34
  3. Very specific:

    If ambiguous, run openspec list --json to get available changes and ask the user to select one

    line 37
  4. Very specific:

    When prompting, show all active changes returned by the list, including changes with status: "no-tasks".

    line 39
  5. Very specific:

    Always announce: "Using change: <name>" and how to override (e.g., /opsx-verify <other>).

    line 43
  6. Very specific:

    Treat apply state and instruction as context, not a verification verdict.

    line 62
  7. Common:

    Create a report structure with three dimensions:

    line 66
  8. Distinctive:

    If only task evidence is available for applicable checks, verify task completion only and mark the remaining applicable checks, including …

    line 77
  9. Very specific:

    If taskTrackingConfigured is false, report Task Completion as not applicable.

    line 84
  10. Very specific:

    If unavailableTrackingFiles is nonempty, mark Task Completion as not verified and include every unavailable path and reason.

    line 86
  11. Very specific:

    If taskTrackingConfigured is true and tasks is empty, mark Task Completion as not verified and record the reason from apply state and …

    line 87
  12. Very specific:

    If progress.remaining is greater than 0:

    line 89
  13. Distinctive:

    Add CRITICAL issue for each listed incomplete task.

    line 90
  14. Very specific:

    If status marks the spec artifact skipped by skip_specs: true, or the schema defines no spec artifact (no artifact whose …

    line 94
  15. Distinctive:

    If delta specs exist in those spec files:

    line 96
  16. Common:

    Search codebase for keywords related to the requirement

    line 99
  17. Distinctive:

    If ADDED or MODIFIED requirements appear unimplemented:

    line 101
  18. Common:

    Add CRITICAL issue: "Requirement not found: <requirement name>"

    line 102
  19. Distinctive:

    If the behavior is still present:

    line 110
  20. Distinctive:

    Add CRITICAL issue: "Removed requirement still implemented: <requirement name>"

    line 111
  21. Distinctive:

    Do not report the FROM name as missing, and do not require code symbols, identifiers, or file names to be renamed.

    line 114
  22. Distinctive:

    If the TO name also appears under MODIFIED, its behavior is checked there against the MODIFIED text.

    line 115
  23. Distinctive:

    Search codebase for that behavior and assess if it is still implemented.

    line 117
  24. Distinctive:

    If it appears unimplemented:

    line 118
  25. Common:

    Add CRITICAL issue: "Renamed requirement not found: <TO name>"

    line 119
  26. Distinctive:

    If the baseline requirement cannot be found or read, mark Spec Coverage as not verified for that entry with the reason.

    line 121
  27. Common:

    Search codebase for implementation evidence

    line 129
  28. Common:

    If found, note file paths and line ranges

    line 130
  29. Common:

    Add WARNING: "Implementation may diverge from spec: <details>"

    line 133
  30. Common:

    Check if conditions are handled in code

    line 138
  31. Common:

    Check if tests exist covering the scenario

    line 139
  32. Common:

    If scenario appears uncovered:

    line 140
  33. Common:

    Add WARNING: "Scenario not covered: <scenario name>"

    line 141
  34. Very specific:

    If the schema defines no design artifact (no artifact with id design, and none whose artifactPaths.<id>.outputPath is or ends in …

    line 148
  35. Very specific:

    If the design artifact's contextFiles.<id> file exists:

    line 149
  36. Common:

    Verify implementation follows those decisions

    line 151
  37. Common:

    Add WARNING: "Design decision not followed: <decision>"

    line 153
  38. Distinctive:

    If implementation changes cannot be identified, mark Code Pattern Consistency as not verified and explain the missing evidence.

    line 158
  39. Common:

    Check file naming, directory structure, coding style

    line 160
  40. Common:

    If significant deviations found:

    line 161
  41. Common:

    Add SUGGESTION: "Code pattern deviation: <details>"

    line 162
  42. Distinctive:

    If CRITICAL issues: "X critical issue(s) found.

    line 201
  43. Common:

    If no CRITICAL issues, one or more warnings, and no checks were skipped: "No critical issues.

    line 202
  44. Distinctive:

    If only suggestions and no checks were skipped: "No critical issues or warnings.

    line 203
  45. Distinctive:

    If no issues and no checks were skipped: "All checks passed.

    line 204
  46. Distinctive:

    If any check was skipped and there are no CRITICAL issues: do not claim readiness.

    line 205
  47. Common:

    Correctness: Use keyword search, file path analysis, reasonable inference - don't require perfect certainty

    line 211
  48. Common:

    Coherence: Look for glaring inconsistencies, don't nitpick style

    line 212
  49. Common:

    False Positives: When uncertain, prefer SUGGESTION over WARNING, WARNING over CRITICAL

    line 213
  50. Common:

    Actionability: Every issue must have a specific recommendation with file/line references where applicable

    line 214
  51. Common:

    Use clear markdown with:

    line 218
  52. Common:

    No vague suggestions like "consider reviewing"

    line 223

“Common” is measured: kept by at least 6 in 10 of the 76 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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., /opsx-verify <other>).

  2. Check status to understand the schema
    openspec status --change "<name>" --json
    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

    openspec instructions apply --change "<name>" --json

    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>"
          • Recommendation: "Remove the remaining implementation at <file>:<lines>, following the requirement's Migration note if it has one"
      • For each RENAMED entry (FROM:/TO:), the name changes but the behavior stays, so check the TO requirement for that unchanged behavior:
        • Do not report the FROM name as missing, and do not require code symbols, identifiers, or file names to be renamed.
        • If the TO name also appears under MODIFIED, its behavior is checked there against the MODIFIED text; skip it here.
        • Otherwise, 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: the requirement under the FROM name, or under the TO name only when the FROM name is absent because the main spec is already synced. Its body and scenarios are the evidence for the behavior the TO requirement keeps.
        • Search codebase for that behavior and assess if it is still implemented.
        • If it appears unimplemented:
          • Add CRITICAL issue: "Renamed requirement not found: <TO name>"
          • Recommendation: "Restore the behavior of <TO name> (renamed from <FROM name>); a rename must not change behavior"
        • If the baseline requirement cannot be found or read, mark Spec Coverage as not verified for that entry with the reason. Never count an unchecked rename as passing.
  6. Verify Correctness

    If the delta specs are readable and contain at least one REMOVED or RENAMED requirement but no ADDED or MODIFIED requirements (the change only removes or renames requirements), report Requirement Implementation Mapping and Scenario Coverage as Not applicable. The REMOVED and RENAMED checks under Spec Coverage are the evidence for such a change (each REMOVED and RENAMED entry with a usable baseline is checked there against its baseline behavior, and an entry already marked not verified there stays not verified), so do not mark these two checks as not verified. A delta spec with no parseable requirements at all is unusable evidence, not a removal-only change: mark these checks as not verified.

    Requirement Implementation Mapping:

    • For each ADDED or MODIFIED requirement from delta specs (REMOVED entries, and RENAMED entries without a MODIFIED block, were settled under Spec Coverage):
      • Search codebase for implementation evidence
      • If found, note file paths and line ranges
      • Assess if implementation matches requirement intent
      • If divergence detected:
        • Add WARNING: "Implementation may diverge from spec: <details>"
        • Recommendation: "Review <file>:<lines> against requirement X"

    Scenario Coverage:

    • For each scenario under an ADDED or MODIFIED requirement in delta specs (marked with "#### Scenario:"):
      • Check if conditions are handled in code
      • Check if tests exist covering the scenario
      • If scenario appears uncovered:
        • Add WARNING: "Scenario not covered: <scenario name>"
        • Recommendation: "Add test or implementation for scenario: <description>"
    • Skip scenarios under a REMOVED requirement; that behavior is meant to be gone.
  7. Verify Coherence

    Design Adherence:

    • If the schema defines no design artifact (no artifact with id design, and none whose artifactPaths.<id>.outputPath is or ends in design.md), report Design Adherence as not applicable.
    • If the design artifact's contextFiles.<id> file exists:
      • Extract key decisions (look for sections like "Decision:", "Approach:", "Architecture:")
      • Verify implementation follows those decisions
      • If contradiction detected:
        • Add WARNING: "Design decision not followed: <decision>"
        • Recommendation: "Update implementation or revise design.md to match reality"
    • Otherwise, if the design artifact's contextFiles.<id> file is absent or empty: mark Design Adherence as not verified. With other supporting artifacts, Code Pattern Consistency still runs; the task-only case remains limited to task completion.

    Code Pattern Consistency:

    • If implementation changes cannot be identified, mark Code Pattern Consistency as not verified and explain the missing evidence.
    • Otherwise, review new code for consistency with project patterns
    • Check file naming, directory structure, coding style
    • If significant deviations found:
      • Add SUGGESTION: "Code pattern deviation: <details>"
      • Recommendation: "Consider following project pattern: <example>"
  8. Generate Verification Report

    Summary Scorecard:

    ## Verification Report: <change-name>
    
    ### Summary
    | Dimension    | Status           |
    |--------------|------------------|
    | Completeness | X/Y tasks, N reqs|
    | Correctness  | M/N reqs covered |
    | Coherence    | Followed/Issues  |

    In each Status cell, report the results of checks that ran and Not verified (<reason>) for every skipped check. If all checks in a dimension were skipped, start the cell with Not verified. Never score a skipped check as passing. Treat every not verified or partially verified check as skipped in the final assessment. Count only ADDED and MODIFIED requirements in N, and report REMOVED and RENAMED requirements separately (for example, "1 removal confirmed, 1 rename verified", or "1 removal not verified (baseline unavailable)"). For a change that only removes or renames requirements, the Correctness cell reads Not applicable (no ADDED or MODIFIED requirements).

    Issues by Priority:

    1. CRITICAL (Must fix before archive):
      • Incomplete tasks
      • Missing requirement implementations
      • Removed requirements still implemented
      • Renamed requirements whose behavior is no longer implemented
      • Each with specific, actionable recommendation
    2. WARNING (Should fix):
      • Spec/design divergences
      • Missing scenario coverage
      • Each with specific recommendation
    3. SUGGESTION (Nice to fix):
      • Pattern inconsistencies
      • Minor improvements
      • Each with specific recommendation

    Final Assessment:

    • If CRITICAL issues: "X critical issue(s) found. Fix before archiving." If any check was skipped, also name every skipped check and its reason.
    • If no CRITICAL issues, one or more warnings, and no checks were skipped: "No critical issues. Y warning(s) to consider. Ready for archive (with noted improvements)."
    • If only suggestions and no checks were skipped: "No critical issues or warnings. Z suggestion(s) to consider. Ready for archive (with noted improvements)."
    • If no issues and no checks were skipped: "All checks passed. Ready for archive."
    • If any check was skipped and there are no CRITICAL issues: do not claim readiness. Say "No critical issues found in the checks that ran. <check(s)> not verified: <reason>." Include the warning count when nonzero.
    • Include the suggestion count when nonzero in every final assessment.

Verification Heuristics

  • Completeness: Focus on objective checklist items (checkboxes, requirements list)
  • Correctness: Use keyword search, file path analysis, reasonable inference - don't require perfect certainty
  • Coherence: Look for glaring inconsistencies, don't nitpick style
  • False Positives: When uncertain, prefer SUGGESTION over WARNING, WARNING over CRITICAL
  • Actionability: Every issue must have a specific recommendation with file/line references where applicable

Output Format

Use clear markdown with:

  • Table for summary scorecard
  • Grouped lists for issues (CRITICAL/WARNING/SUGGESTION)
  • Code references in format: file.ts:123
  • Specific, actionable recommendations
  • No vague suggestions like "consider reviewing"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.