6aspec 2.0.0-dev.15 → 2.0.0-dev.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/.6aspec/rules/brown/brown_archive_sop.md +3 -3
  2. package/.6aspec/rules/brown/brown_continue_sop.md +3 -0
  3. package/.6aspec/rules/brown/brown_design_sop.md +3 -1
  4. package/.6aspec/rules/brown/brown_ff_sop.md +20 -10
  5. package/.6aspec/rules/brown/brown_impact_sop.md +79 -16
  6. package/.6aspec/rules/brown/brown_implement_sop.md +3 -3
  7. package/.6aspec/rules/brown/brown_new_sop.md +26 -18
  8. package/.6aspec/rules/brown/brown_proposal_sop.md +111 -31
  9. package/.6aspec/rules/brown/brown_rollback_sop.md +21 -11
  10. package/.6aspec/rules/brown/brown_specs_sop.md +134 -23
  11. package/.6aspec/rules/brown/brown_status_sop.md +15 -5
  12. package/.6aspec/rules/brown/brown_tasks_sop.md +3 -3
  13. package/.6aspec/rules/brown/brown_understand_sop.md +75 -12
  14. package/.6aspec/rules/brown/brown_verify_sop.md +1 -1
  15. package/.claude/commands/opsx/apply.md +152 -0
  16. package/.claude/commands/opsx/archive.md +157 -0
  17. package/.claude/commands/opsx/bulk-archive.md +242 -0
  18. package/.claude/commands/opsx/continue.md +114 -0
  19. package/.claude/commands/opsx/explore.md +174 -0
  20. package/.claude/commands/opsx/ff.md +94 -0
  21. package/.claude/commands/opsx/new.md +69 -0
  22. package/.claude/commands/opsx/onboard.md +525 -0
  23. package/.claude/commands/opsx/sync.md +134 -0
  24. package/.claude/commands/opsx/verify.md +164 -0
  25. package/.cursor/commands/opsx-apply.md +152 -0
  26. package/.cursor/commands/opsx-archive.md +157 -0
  27. package/.cursor/commands/opsx-bulk-archive.md +242 -0
  28. package/.cursor/commands/opsx-continue.md +114 -0
  29. package/.cursor/commands/opsx-explore.md +174 -0
  30. package/.cursor/commands/opsx-ff.md +94 -0
  31. package/.cursor/commands/opsx-new.md +69 -0
  32. package/.cursor/commands/opsx-onboard.md +525 -0
  33. package/.cursor/commands/opsx-sync.md +134 -0
  34. package/.cursor/commands/opsx-verify.md +164 -0
  35. package/package.json +1 -1
@@ -0,0 +1,164 @@
1
+ ---
2
+ name: /opsx-verify
3
+ id: opsx-verify
4
+ category: Workflow
5
+ description: Verify implementation matches change artifacts before archiving
6
+ ---
7
+
8
+ Verify that an implementation matches the change artifacts (specs, tasks, design).
9
+
10
+ **Input**: Optionally specify a change name after `/opsx:verify` (e.g., `/opsx:verify add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
11
+
12
+ **Steps**
13
+
14
+ 1. **If no change name provided, prompt for selection**
15
+
16
+ Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
17
+
18
+ Show changes that have implementation tasks (tasks artifact exists).
19
+ Include the schema used for each change if available.
20
+ Mark changes with incomplete tasks as "(In Progress)".
21
+
22
+ **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
23
+
24
+ 2. **Check status to understand the schema**
25
+ ```bash
26
+ openspec status --change "<name>" --json
27
+ ```
28
+ Parse the JSON to understand:
29
+ - `schemaName`: The workflow being used (e.g., "spec-driven")
30
+ - Which artifacts exist for this change
31
+
32
+ 3. **Get the change directory and load artifacts**
33
+
34
+ ```bash
35
+ openspec instructions apply --change "<name>" --json
36
+ ```
37
+
38
+ This returns the change directory and context files. Read all available artifacts from `contextFiles`.
39
+
40
+ 4. **Initialize verification report structure**
41
+
42
+ Create a report structure with three dimensions:
43
+ - **Completeness**: Track tasks and spec coverage
44
+ - **Correctness**: Track requirement implementation and scenario coverage
45
+ - **Coherence**: Track design adherence and pattern consistency
46
+
47
+ Each dimension can have CRITICAL, WARNING, or SUGGESTION issues.
48
+
49
+ 5. **Verify Completeness**
50
+
51
+ **Task Completion**:
52
+ - If tasks.md exists in contextFiles, read it
53
+ - Parse checkboxes: `- [ ]` (incomplete) vs `- [x]` (complete)
54
+ - Count complete vs total tasks
55
+ - If incomplete tasks exist:
56
+ - Add CRITICAL issue for each incomplete task
57
+ - Recommendation: "Complete task: <description>" or "Mark as done if already implemented"
58
+
59
+ **Spec Coverage**:
60
+ - If delta specs exist in `openspec/changes/<name>/specs/`:
61
+ - Extract all requirements (marked with "### Requirement:")
62
+ - For each requirement:
63
+ - Search codebase for keywords related to the requirement
64
+ - Assess if implementation likely exists
65
+ - If requirements appear unimplemented:
66
+ - Add CRITICAL issue: "Requirement not found: <requirement name>"
67
+ - Recommendation: "Implement requirement X: <description>"
68
+
69
+ 6. **Verify Correctness**
70
+
71
+ **Requirement Implementation Mapping**:
72
+ - For each requirement from delta specs:
73
+ - Search codebase for implementation evidence
74
+ - If found, note file paths and line ranges
75
+ - Assess if implementation matches requirement intent
76
+ - If divergence detected:
77
+ - Add WARNING: "Implementation may diverge from spec: <details>"
78
+ - Recommendation: "Review <file>:<lines> against requirement X"
79
+
80
+ **Scenario Coverage**:
81
+ - For each scenario in delta specs (marked with "#### Scenario:"):
82
+ - Check if conditions are handled in code
83
+ - Check if tests exist covering the scenario
84
+ - If scenario appears uncovered:
85
+ - Add WARNING: "Scenario not covered: <scenario name>"
86
+ - Recommendation: "Add test or implementation for scenario: <description>"
87
+
88
+ 7. **Verify Coherence**
89
+
90
+ **Design Adherence**:
91
+ - If design.md exists in contextFiles:
92
+ - Extract key decisions (look for sections like "Decision:", "Approach:", "Architecture:")
93
+ - Verify implementation follows those decisions
94
+ - If contradiction detected:
95
+ - Add WARNING: "Design decision not followed: <decision>"
96
+ - Recommendation: "Update implementation or revise design.md to match reality"
97
+ - If no design.md: Skip design adherence check, note "No design.md to verify against"
98
+
99
+ **Code Pattern Consistency**:
100
+ - Review new code for consistency with project patterns
101
+ - Check file naming, directory structure, coding style
102
+ - If significant deviations found:
103
+ - Add SUGGESTION: "Code pattern deviation: <details>"
104
+ - Recommendation: "Consider following project pattern: <example>"
105
+
106
+ 8. **Generate Verification Report**
107
+
108
+ **Summary Scorecard**:
109
+ ```
110
+ ## Verification Report: <change-name>
111
+
112
+ ### Summary
113
+ | Dimension | Status |
114
+ |--------------|------------------|
115
+ | Completeness | X/Y tasks, N reqs|
116
+ | Correctness | M/N reqs covered |
117
+ | Coherence | Followed/Issues |
118
+ ```
119
+
120
+ **Issues by Priority**:
121
+
122
+ 1. **CRITICAL** (Must fix before archive):
123
+ - Incomplete tasks
124
+ - Missing requirement implementations
125
+ - Each with specific, actionable recommendation
126
+
127
+ 2. **WARNING** (Should fix):
128
+ - Spec/design divergences
129
+ - Missing scenario coverage
130
+ - Each with specific recommendation
131
+
132
+ 3. **SUGGESTION** (Nice to fix):
133
+ - Pattern inconsistencies
134
+ - Minor improvements
135
+ - Each with specific recommendation
136
+
137
+ **Final Assessment**:
138
+ - If CRITICAL issues: "X critical issue(s) found. Fix before archiving."
139
+ - If only warnings: "No critical issues. Y warning(s) to consider. Ready for archive (with noted improvements)."
140
+ - If all clear: "All checks passed. Ready for archive."
141
+
142
+ **Verification Heuristics**
143
+
144
+ - **Completeness**: Focus on objective checklist items (checkboxes, requirements list)
145
+ - **Correctness**: Use keyword search, file path analysis, reasonable inference - don't require perfect certainty
146
+ - **Coherence**: Look for glaring inconsistencies, don't nitpick style
147
+ - **False Positives**: When uncertain, prefer SUGGESTION over WARNING, WARNING over CRITICAL
148
+ - **Actionability**: Every issue must have a specific recommendation with file/line references where applicable
149
+
150
+ **Graceful Degradation**
151
+
152
+ - If only tasks.md exists: verify task completion only, skip spec/design checks
153
+ - If tasks + specs exist: verify completeness and correctness, skip design
154
+ - If full artifacts: verify all three dimensions
155
+ - Always note which checks were skipped and why
156
+
157
+ **Output Format**
158
+
159
+ Use clear markdown with:
160
+ - Table for summary scorecard
161
+ - Grouped lists for issues (CRITICAL/WARNING/SUGGESTION)
162
+ - Code references in format: `file.ts:123`
163
+ - Specific, actionable recommendations
164
+ - No vague suggestions like "consider reviewing"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "6aspec",
3
- "version": "2.0.0-dev.15",
3
+ "version": "2.0.0-dev.17",
4
4
  "description": "6Aspec - 轻量级 spec 驱动开发框架,支持 Cursor 和 Claude Code",
5
5
  "main": "lib/installer.js",
6
6
  "bin": {