openspec-verify-change
できること
このスキルは、アーカイブの前に、コードが変更の計画文書と本当に一致しているかを確認します。機能が完全で正しいことを確かめたい開発者のためのものです。
使う場面
- ✓アーカイブの前に、実装が完全であることを確かめたいとき。
- ✓OpenSpecの変更のスペックとタスクに照らして、コードを確認したいとき。
- ✓コードと計画文書がもう一致していないと疑うとき。
スキルのリンク
https://github.com/fengshao1227/ccg-workflow/blob/main/.agents/skills/openspec-verify-change/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“アーカイブする前に、OpenSpecにある私の支払い機能がスペックとタスクに一致しているか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは変更の文書を読み込み、完全性、正しさ、設計の一貫性を確認し、タスクとスペックを実装されたコードと比べます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Verify that an implementation matches the change artifacts (specs, tasks, design).
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
If no change name provided, prompt for selection
Run
openspec list --jsonto get available changes. Use the AskUserQuestion tool to let the user select.Show changes that have implementation tasks (tasks artifact exists). Include the schema used for each change if available. Mark changes with incomplete tasks as "(In Progress)".
IMPORTANT: Do NOT guess or auto-select a change. Always let the user choose.
Check status to understand the schema
openspec status --change "<name>" --jsonParse the JSON to understand:
schemaName: The workflow being used (e.g., "spec-driven")- Which artifacts exist for this change
Get the change directory and load artifacts
openspec instructions apply --change "<name>" --jsonThis returns the change directory and context files. Read all available artifacts from
contextFiles.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.
Verify Completeness
Task Completion:
- If tasks.md exists in contextFiles, read it
- Parse checkboxes:
- [ ](incomplete) vs- [x](complete) - Count complete vs total tasks
- If incomplete tasks exist:
- Add CRITICAL issue for each incomplete task
- Recommendation: "Complete task: <description>" or "Mark as done if already implemented"
Spec Coverage:
- If delta specs exist in
openspec/changes/<name>/specs/:- Extract all requirements (marked with "### Requirement:")
- For each requirement:
- Search codebase for keywords related to the requirement
- Assess if implementation likely exists
- If requirements appear unimplemented:
- Add CRITICAL issue: "Requirement not found: <requirement name>"
- Recommendation: "Implement requirement X: <description>"
Verify Correctness
Requirement Implementation Mapping:
- For each requirement from delta specs:
- 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 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>"
- For each requirement from delta specs:
Verify Coherence
Design Adherence:
- If design.md exists in contextFiles:
- 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"
- If no design.md: Skip design adherence check, note "No design.md to verify against"
Code Pattern Consistency:
- 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>"
- If design.md exists in contextFiles:
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 |Issues by Priority:
- CRITICAL (Must fix before archive):
- Incompl
- CRITICAL (Must fix before archive):
よくある質問
何を確認しますか?
タスクとスペックの完全性、実装の正しさ、設計が一貫しているかを確認します。
変更を自動で選びますか?
いいえ。確認する変更を選んでもらいます。
いつ実行すべきですか?
実装が終わった後、アーカイブの前に実行します。
詳細
作者による元の説明
Verify implementation matches change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving.
人気
- GitHubのスター
- 6.0k
- ランキング
- #14521
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
openspec-bulk-archive-change
6.0k完了した複数のOpenSpecの変更を、アーカイブの前にそれぞれのタスクとスペックを確認しながら、一度にアーカイブするよう支援します。
openspec-continue-change
6.0kOpenSpecの変更の次の成果物(提案、スペック、設計、タスク一覧など)を作って、変更を進めるようエージェントを支援します。
openspec-ff-change
6.0kOpenSpecの変更に必要な成果物をすべて一度に作り、ひとつずつ進めなくても実装を始められるようにするようエージェントを支援します。
openspec-new-change
6.0k機能や修正のために新しいOpenSpecの変更を始め、そのフォルダを作り、次に書くべき成果物を示すようエージェントを支援します。
似ているスキル
test-driven-development
311k機能や修正を作る前に、まず失敗するテストを書き、それが失敗するのを確認してから、合格させる最小のコードを書くようエージェントに教えます。
verification-before-completion
311kタスク、修正、ビルドが完了した、または合格したと主張する前に、実際のチェックを実行し、その出力を読むようエージェントに教えます。
migrate-to-shoehorn
310kテストファイル内の危険な型キャストを、shoehornライブラリに置き換え、テストが部分的なデータを使いつつ型チェックを通るようにします。