Claude fork context
This generated Claude Code skill runs with context: fork. The rules in this section take precedence over the shared verify body below.
When no change name is provided, run spectra list --json and consider only active changes with implementation tasks. Auto-select only when exactly one matching active change exists. If there are zero matching active changes or more than one matching active change, return the candidate list or empty-state message and ask the main thread to rerun /spectra-verify <change-name>. Do NOT ask an interactive selection question inside the fork.
Verify that an implementation matches the change artifacts (specs, tasks, design).
Input: Optionally specify a change name after /spectra-verify (e.g., /spectra-verify add-auth). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
Prerequisites: This skill requires the spectra CLI. If any spectra command fails with "command not found" or similar, report the error and STOP.
Steps
If no change name provided, prompt for selection
Run spectra list --json to get available changes. Use the AskUserQuestion tool to let the user select (if this tool is not available, ask as plain text and wait for the user's response).
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
spectra status --change "<name>" --json
Parse 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
spectra instructions apply --change "<name>" --json
This 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: " 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: "
- Recommendation: "Implement requirement X: "
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: "
- Recommendation: "Review : 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: "
- Recommendation: "Add test or implementation for scenario: "
Example Traceability:
- For each
##### Example: in delta specs:
- Check if a test exists that uses the same input values from the example's GIVEN/WHEN/THEN
- If the example has a table, check if parameterized tests cover all rows
- If examples appear untested, add WARNING: "Spec example not covered by test: " with recommendation to add a test using the GIVEN/WHEN/THEN from the example
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: "
- 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: "
- Recommendation: "Consider following project pattern: "
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):
- Incomplete tasks
- Missing requirement implementations
- Each with specific, actionable recommendation
WARNING (Should fix):
- Spec/design divergences
- Missing scenario coverage
- Each with specific recommendation
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 only warnings: "No critical issues. Y warning(s) to consider. Ready for archive (with noted improvements)."
- If all clear: "All checks passed. Ready for archive."
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
Graceful Degradation
- If only tasks.md exists: verify task completion only, skip spec/design checks
- If tasks + specs exist: verify completeness and correctness, skip design
- If full artifacts: verify all three dimensions
- Always note which checks were skipped and why
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"
1---2name: spectra-verify3description: Verify implementation matches artifacts4license: MIT5---67## Claude fork context89This generated Claude Code skill runs with `context: fork`. The rules in this section take precedence over the shared `verify` body below.1011When no change name is provided, run `spectra list --json` and consider only active changes with implementation tasks. Auto-select only when exactly one matching active change exists. If there are zero matching active changes or more than one matching active change, return the candidate list or empty-state message and ask the main thread to rerun `/spectra-verify <change-name>`. Do NOT ask an interactive selection question inside the fork.1213---1415Verify that an implementation matches the change artifacts (specs, tasks, design).1617**Input**: Optionally specify a change name after `/spectra-verify` (e.g., `/spectra-verify add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.1819**Prerequisites**: This skill requires the `spectra` CLI. If any `spectra` command fails with "command not found" or similar, report the error and STOP.2021**Steps**22231. **If no change name provided, prompt for selection**2425 Run `spectra list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select (if this tool is not available, ask as plain text and wait for the user's response).2627 Show changes that have implementation tasks (tasks artifact exists).28 Include the schema used for each change if available.29 Mark changes with incomplete tasks as "(In Progress)".3031 **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.32332. **Check status to understand the schema**3435 ```bash36 spectra status --change "<name>" --json37 ```3839 Parse the JSON to understand:40 - `schemaName`: The workflow being used (e.g., "spec-driven")41 - Which artifacts exist for this change42433. **Get the change directory and load artifacts**4445 ```bash46 spectra instructions apply --change "<name>" --json47 ```4849 This returns the change directory and context files. Read all available artifacts from `contextFiles`.50514. **Initialize verification report structure**5253 Create a report structure with three dimensions:54 - **Completeness**: Track tasks and spec coverage55 - **Correctness**: Track requirement implementation and scenario coverage56 - **Coherence**: Track design adherence and pattern consistency5758 Each dimension can have CRITICAL, WARNING, or SUGGESTION issues.59605. **Verify Completeness**6162 **Task Completion**:63 - If tasks.md exists in contextFiles, read it64 - Parse checkboxes: `- [ ]` (incomplete) vs `- [x]` (complete)65 - Count complete vs total tasks66 - If incomplete tasks exist:67 - Add CRITICAL issue for each incomplete task68 - Recommendation: "Complete task: <description>" or "Mark as done if already implemented"6970 **Spec Coverage**:71 - If delta specs exist in `openspec/changes/<name>/specs/`:72 - Extract all requirements (marked with "### Requirement:")73 - For each requirement:74 - Search codebase for keywords related to the requirement75 - Assess if implementation likely exists76 - If requirements appear unimplemented:77 - Add CRITICAL issue: "Requirement not found: <requirement name>"78 - Recommendation: "Implement requirement X: <description>"79806. **Verify Correctness**8182 **Requirement Implementation Mapping**:83 - For each requirement from delta specs:84 - Search codebase for implementation evidence85 - If found, note file paths and line ranges86 - Assess if implementation matches requirement intent87 - If divergence detected:88 - Add WARNING: "Implementation may diverge from spec: <details>"89 - Recommendation: "Review <file>:<lines> against requirement X"9091 **Scenario Coverage**:92 - For each scenario in delta specs (marked with "#### Scenario:"):93 - Check if conditions are handled in code94 - Check if tests exist covering the scenario95 - If scenario appears uncovered:96 - Add WARNING: "Scenario not covered: <scenario name>"97 - Recommendation: "Add test or implementation for scenario: <description>"9899 **Example Traceability**:100 - For each `##### Example:` in delta specs:101 - Check if a test exists that uses the same input values from the example's GIVEN/WHEN/THEN102 - If the example has a table, check if parameterized tests cover all rows103 - If examples appear untested, add WARNING: "Spec example not covered by test: <example name>" with recommendation to add a test using the GIVEN/WHEN/THEN from the example1041057. **Verify Coherence**106107 **Design Adherence**:108 - If design.md exists in contextFiles:109 - Extract key decisions (look for sections like "Decision:", "Approach:", "Architecture:")110 - Verify implementation follows those decisions111 - If contradiction detected:112 - Add WARNING: "Design decision not followed: <decision>"113 - Recommendation: "Update implementation or revise design.md to match reality"114 - If no design.md: Skip design adherence check, note "No design.md to verify against"115116 **Code Pattern Consistency**:117 - Review new code for consistency with project patterns118 - Check file naming, directory structure, coding style119 - If significant deviations found:120 - Add SUGGESTION: "Code pattern deviation: <details>"121 - Recommendation: "Consider following project pattern: <example>"1221238. **Generate Verification Report**124125 **Summary Scorecard**:126127 ```128 ## Verification Report: <change-name>129130 ### Summary131 | Dimension | Status |132 |--------------|------------------|133 | Completeness | X/Y tasks, N reqs|134 | Correctness | M/N reqs covered |135 | Coherence | Followed/Issues |136 ```137138 **Issues by Priority**:139 1. **CRITICAL** (Must fix before archive):140 - Incomplete tasks141 - Missing requirement implementations142 - Each with specific, actionable recommendation143144 2. **WARNING** (Should fix):145 - Spec/design divergences146 - Missing scenario coverage147 - Each with specific recommendation148149 3. **SUGGESTION** (Nice to fix):150 - Pattern inconsistencies151 - Minor improvements152 - Each with specific recommendation153154 **Final Assessment**:155 - If CRITICAL issues: "X critical issue(s) found. Fix before archiving."156 - If only warnings: "No critical issues. Y warning(s) to consider. Ready for archive (with noted improvements)."157 - If all clear: "All checks passed. Ready for archive."158159**Verification Heuristics**160161- **Completeness**: Focus on objective checklist items (checkboxes, requirements list)162- **Correctness**: Use keyword search, file path analysis, reasonable inference - don't require perfect certainty163- **Coherence**: Look for glaring inconsistencies, don't nitpick style164- **False Positives**: When uncertain, prefer SUGGESTION over WARNING, WARNING over CRITICAL165- **Actionability**: Every issue must have a specific recommendation with file/line references where applicable166167**Graceful Degradation**168169- If only tasks.md exists: verify task completion only, skip spec/design checks170- If tasks + specs exist: verify completeness and correctness, skip design171- If full artifacts: verify all three dimensions172- Always note which checks were skipped and why173174**Output Format**175176Use clear markdown with:177178- Table for summary scorecard179- Grouped lists for issues (CRITICAL/WARNING/SUGGESTION)180- Code references in format: `file.ts:123`181- Specific, actionable recommendations182- No vague suggestions like "consider reviewing"