speccrew 0.7.74 → 0.7.76

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 (71) hide show
  1. package/.speccrew/agents/speccrew-feature-designer.md +4 -647
  2. package/.speccrew/agents/speccrew-product-manager.md +5 -480
  3. package/.speccrew/agents/speccrew-system-deployer.md +6 -457
  4. package/.speccrew/agents/speccrew-system-developer.md +9 -913
  5. package/.speccrew/agents/speccrew-test-manager.md +403 -1112
  6. package/.speccrew/skills/speccrew-agentflow-manager/SKILL.md +6 -149
  7. package/.speccrew/skills/speccrew-deploy-build/SKILL.md +2 -59
  8. package/.speccrew/skills/speccrew-deploy-migrate/SKILL.md +2 -64
  9. package/.speccrew/skills/speccrew-deploy-smoke-test/SKILL.md +2 -75
  10. package/.speccrew/skills/speccrew-deploy-startup/SKILL.md +2 -70
  11. package/.speccrew/skills/speccrew-dev-backend/SKILL.md +2 -381
  12. package/.speccrew/skills/speccrew-dev-desktop-electron/SKILL.md +2 -369
  13. package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +2 -362
  14. package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +2 -304
  15. package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +2 -294
  16. package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +2 -204
  17. package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +2 -173
  18. package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +2 -169
  19. package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +2 -173
  20. package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +2 -251
  21. package/.speccrew/skills/speccrew-fd-feature-analyze/SKILL.md +2 -254
  22. package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +2 -748
  23. package/.speccrew/skills/speccrew-feature-designer-orchestration/SKILL.md +6 -105
  24. package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +6 -33
  25. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +3 -138
  26. package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/SKILL.md +3 -283
  27. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +3 -1014
  28. package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +4 -343
  29. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +4 -235
  30. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +6 -72
  31. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +3 -534
  32. package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/SKILL.md +3 -432
  33. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +4 -391
  34. package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +3 -98
  35. package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +3 -92
  36. package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +3 -181
  37. package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +3 -148
  38. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +3 -330
  39. package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +6 -159
  40. package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +3 -142
  41. package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/SKILL.md +3 -568
  42. package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +3 -180
  43. package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +3 -154
  44. package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +3 -176
  45. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +3 -135
  46. package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +4 -88
  47. package/.speccrew/skills/speccrew-pm-module-initializer/SKILL.md +4 -178
  48. package/.speccrew/skills/speccrew-pm-module-matcher/SKILL.md +3 -102
  49. package/.speccrew/skills/speccrew-pm-phase0-init/SKILL.md +5 -78
  50. package/.speccrew/skills/speccrew-pm-phase1-knowledge-check/SKILL.md +5 -85
  51. package/.speccrew/skills/speccrew-pm-phase2-complexity-assess/SKILL.md +4 -100
  52. package/.speccrew/skills/speccrew-pm-phase5-subprd-dispatch/SKILL.md +14 -106
  53. package/.speccrew/skills/speccrew-pm-phase6-verify-confirm/SKILL.md +7 -84
  54. package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +6 -66
  55. package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +4 -96
  56. package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +4 -131
  57. package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +6 -79
  58. package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +4 -76
  59. package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +3 -281
  60. package/.speccrew/skills/speccrew-product-manager-orchestration/SKILL.md +6 -165
  61. package/.speccrew/skills/speccrew-system-deployer-orchestration/SKILL.md +6 -79
  62. package/.speccrew/skills/speccrew-system-designer-orchestration/SKILL.md +2 -35
  63. package/.speccrew/skills/speccrew-system-developer-orchestration/SKILL.md +6 -98
  64. package/.speccrew/skills/speccrew-task-worker-execution/SKILL.md +6 -94
  65. package/.speccrew/skills/speccrew-team-leader-routing/SKILL.md +6 -79
  66. package/.speccrew/skills/speccrew-test-case-design/SKILL.md +2 -58
  67. package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +2 -61
  68. package/.speccrew/skills/speccrew-test-manager-orchestration/SKILL.md +6 -94
  69. package/.speccrew/skills/speccrew-test-reporter/SKILL.md +2 -102
  70. package/.speccrew/skills/speccrew-test-runner/SKILL.md +3 -121
  71. package/package.json +1 -1
@@ -8,178 +8,11 @@ tools: Read, Glob, Grep
8
8
 
9
9
  - When speccrew-system-developer dispatches frontend code review for a completed module
10
10
  - When user requests "Review this frontend module's implementation"
11
- - When user asks "Check if frontend code matches design"
12
11
  - When incremental review is needed after partial frontend implementation
13
12
 
14
- # Input Parameters
15
-
16
- | Parameter | Required | Description |
17
- |-----------|----------|-------------|
18
- | `design_doc_path` | Yes | Path to frontend module design document |
19
- | `implementation_report_path` | Yes | Path to frontend development report |
20
- | `source_root` | Yes | Root directory of frontend source code |
21
- | `platform_id` | Yes | Frontend platform (web-vue, web-react) |
22
- | `api_contract_path` | No | Path to API contract file |
23
- | `task_id` | Yes | Task identifier from dispatch context |
24
- | `previous_review_path` | No | Path to previous review report |
25
-
26
13
  ## AgentFlow Definition
27
14
 
28
15
  <!-- @agentflow: SKILL.xml -->
29
16
 
30
- > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
31
-
32
- ---
33
-
34
- ## Workflow
35
-
36
- ### Absolute Constraints
37
-
38
- > **Violation = review failure.**
39
-
40
- 1. **READ-ONLY OPERATION** — NEVER modify source code files.
41
- 2. **FORBIDDEN: Code fixes** — Do NOT attempt to fix issues. Only document them.
42
- 3. **MANDATORY: Actionable output** — PARTIAL/FAIL results MUST include specific "Re-dispatch Guidance".
43
- 4. **INCREMENTAL REVIEW SUPPORT** — Skip items already marked as passed in previous review.
44
-
45
- ## Step 1: Load Documents
46
-
47
- ### 1.1 Validate Inputs
48
-
49
- Verify all required parameters provided. If any missing → Report error, stop.
50
-
51
- ### 1.2 Read Design Document
52
-
53
- Extract: Module Overview, Component Structure, Store Modules, Routes, API Integration points.
54
-
55
- ### 1.3 Read Implementation Report
56
-
57
- Extract: Completed Files, Implementation Status, Known Issues.
58
-
59
- ### 1.4 Read API Contract (if provided)
60
-
61
- Extract API endpoints for validation against frontend API calls.
62
-
63
- ## Step 2: File Completeness Check
64
-
65
- ### 2.1 Build Expected File List
66
-
67
- Frontend file categories:
68
-
69
- | Category | Pattern | Example |
70
- |----------|---------|---------|
71
- | Components | `components/**/*.vue` or `**/*.tsx` | `components/UserForm.vue` |
72
- | Views/Pages | `views/**/*.vue` or `pages/**/*.tsx` | `views/UserList.vue` |
73
- | Store | `store/**/*.ts` or `stores/**/*.ts` | `store/userStore.ts` |
74
- | API Clients | `api/**/*.ts` or `services/**/*.ts` | `api/userApi.ts` |
75
- | Routes | `router/**/*.ts` | `router/index.ts` |
76
- | Styles | `styles/**/*.scss` or `**/*.module.css` | `styles/variables.scss` |
77
-
78
- ### 2.2 Scan Actual Files
79
-
80
- Use `Glob` to scan `source_root` for implemented files.
81
-
82
- ### 2.3 Calculate Completeness
83
-
84
- Generate completeness matrix and percentage.
85
-
86
- ## Step 3: Frontend-Specific Compliance Check
87
-
88
- ### 3.1 Component Structure Check
89
-
90
- | Check | Rule | Severity |
91
- |-------|------|----------|
92
- | Directory Structure | Components in correct directories per design | ERROR |
93
- | Component Granularity | Components appropriately sized and reusable | WARN |
94
- | Naming Convention | PascalCase for components, camelCase for composables | ERROR |
95
- | Props Definition | Props properly typed and documented | WARN |
96
-
97
- ### 3.2 State Management Check
98
-
99
- | Check | Rule | Severity |
100
- |-------|------|----------|
101
- | Store Design | Store modules match design specification | ERROR |
102
- | Data Flow | Unidirectional data flow followed | WARN |
103
- | State Mutations | Mutations/actions properly defined | ERROR |
104
-
105
- ### 3.3 API Call Consistency
106
-
107
- | Check | Rule | Severity |
108
- |-------|------|----------|
109
- | Endpoint Match | API calls match API contract | ERROR |
110
- | Error Handling | API errors properly handled | ERROR |
111
- | Loading States | Loading states implemented | WARN |
112
-
113
- ### 3.4 Route Definition Validation
114
-
115
- | Check | Rule | Severity |
116
- |-------|------|----------|
117
- | Route Match | Routes match design document | ERROR |
118
- | Lazy Loading | Routes use lazy loading where appropriate | WARN |
119
- | Navigation Guards | Auth guards implemented where required | ERROR |
120
-
121
- ### 3.5 Style and Layout Compliance
122
-
123
- | Check | Rule | Severity |
124
- |-------|------|----------|
125
- | Style Guide | Follows project style guide | WARN |
126
- | Responsive | Responsive design implemented | ERROR |
127
- | Accessibility | Basic accessibility (a11y) compliance | WARN |
128
-
129
- ## Step 4: Generate Review Report
130
-
131
- ### 4.1 Determine Result
132
-
133
- | Result | Criteria |
134
- |--------|----------|
135
- | **PASS** | 100% files created, 0 ERROR-level issues |
136
- | **PARTIAL** | 70-99% files created, or non-critical ERROR issues |
137
- | **FAIL** | <70% files created, or critical blockers present |
138
-
139
- ### 4.2 Write Report
140
-
141
- Generate report at: `speccrew-workspace/iterations/{number}-{type}-{name}/04.development/{platform_id}/[module]-review-report.md`
142
-
143
- Use template from `templates/REVIEW-REPORT-TEMPLATE.md`.
144
-
145
- ## Step 5: Task Completion Report
146
-
147
- ```markdown
148
- ## Task Completion Report
149
- - **Status**: SUCCESS
150
- - **Task ID**: review-{original_task_id}
151
- - **Platform**: {platform_id}
152
- - **Module**: {module_name}
153
- - **Output Files**: {review_report_path}
154
- - **Summary**: Review {result}: {completed}/{total} files, {error_count} errors
155
- ```
156
-
157
- # Severity Levels
158
-
159
- | Level | Definition | Action Required |
160
- |-------|------------|-----------------|
161
- | **ERROR** | Blocking functionality or violating core requirements | Must fix before PASS |
162
- | **WARN** | Best practice violation or missing documentation | Should fix |
163
- | **LOW** | Code style or minor optimization suggestion | Optional |
164
-
165
- # Key Rules
166
-
167
- | Rule | Description |
168
- |------|-------------|
169
- | **Read-Only** | NEVER modify any source code |
170
- | **Blueprint-Driven** | Validate against design document specifications |
171
- | **Actionable Output** | PARTIAL/FAIL must include specific fix guidance |
172
- | **Completeness First** | File existence is primary check before content validation |
173
-
174
- # Checklist
175
-
176
- - [ ] All required inputs validated
177
- - [ ] Design document loaded and parsed
178
- - [ ] File completeness check completed
179
- - [ ] Component structure validated
180
- - [ ] State management checked
181
- - [ ] API calls validated against contract
182
- - [ ] Routes verified against design
183
- - [ ] Styles checked for compliance
184
- - [ ] Review report written with clear verdict
185
- - [ ] Re-dispatch guidance provided for PARTIAL/FAIL
17
+ > **REQUIRED**: Before executing this workflow, read the XML workflow specification: speccrew-workspace/docs/rules/agentflow-spec.md
18
+ > Then read and execute the XML workflow in SKILL.xml block-by-block as the authoritative execution plan.
@@ -8,182 +8,11 @@ tools: Read, Glob, Grep
8
8
 
9
9
  - When speccrew-system-developer dispatches mobile code review for a completed module
10
10
  - When user requests "Review this mobile module's implementation"
11
- - When user asks "Check if mobile code matches design"
12
11
  - When incremental review is needed after partial mobile implementation
13
12
 
14
- # Input Parameters
15
-
16
- | Parameter | Required | Description |
17
- |-----------|----------|-------------|
18
- | `design_doc_path` | Yes | Path to mobile module design document |
19
- | `implementation_report_path` | Yes | Path to mobile development report |
20
- | `source_root` | Yes | Root directory of mobile source code |
21
- | `platform_id` | Yes | Mobile platform (mobile-uniapp, mobile-flutter, mobile-react-native) |
22
- | `api_contract_path` | No | Path to API contract file |
23
- | `task_id` | Yes | Task identifier from dispatch context |
24
- | `previous_review_path` | No | Path to previous review report |
25
-
26
13
  ## AgentFlow Definition
27
14
 
28
15
  <!-- @agentflow: SKILL.xml -->
29
16
 
30
- > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
31
-
32
- ---
33
-
34
- ## Workflow
35
-
36
- ### Absolute Constraints
37
-
38
- > **Violation = review failure.**
39
-
40
- 1. **READ-ONLY OPERATION** — NEVER modify source code files.
41
- 2. **FORBIDDEN: Code fixes** — Do NOT attempt to fix issues. Only document them.
42
- 3. **MANDATORY: Actionable output** — PARTIAL/FAIL results MUST include specific "Re-dispatch Guidance".
43
- 4. **INCREMENTAL REVIEW SUPPORT** — Skip items already marked as passed in previous review.
44
-
45
- ## Step 1: Load Documents
46
-
47
- ### 1.1 Validate Inputs
48
-
49
- Verify all required parameters provided. If any missing → Report error, stop.
50
-
51
- ### 1.2 Read Design Document
52
-
53
- Extract: Module Overview, Page/Component Structure, Native Features, Offline Support requirements.
54
-
55
- ### 1.3 Read Implementation Report
56
-
57
- Extract: Completed Files, Implementation Status, Known Issues.
58
-
59
- ### 1.4 Read API Contract (if provided)
60
-
61
- Extract API endpoints for validation against mobile API calls.
62
-
63
- ## Step 2: File Completeness Check
64
-
65
- ### 2.1 Build Expected File List
66
-
67
- Mobile file categories:
68
-
69
- | Category | Pattern | Example |
70
- |----------|---------|---------|
71
- | Pages | `pages/**/*` or `screens/**/*` | `pages/user/index.vue` |
72
- | Components | `components/**/*` | `components/UserCard.vue` |
73
- | Store | `store/**/*` | `store/user.js` |
74
- | API | `api/**/*` or `services/**/*` | `api/user.js` |
75
- | Utils | `utils/**/*` | `utils/permission.js` |
76
- | Native Modules | `native/**/*` or `plugins/**/*` | `native/bridge.js` |
77
-
78
- ### 2.2 Scan Actual Files
79
-
80
- Use `Glob` to scan `source_root` for implemented files.
81
-
82
- ### 2.3 Calculate Completeness
83
-
84
- Generate completeness matrix and percentage.
85
-
86
- ## Step 3: Mobile-Specific Compliance Check
87
-
88
- ### 3.1 Mobile Component Check
89
-
90
- | Check | Rule | Severity |
91
- |-------|------|----------|
92
- | Platform Components | Uses correct platform-specific components | ERROR |
93
- | Component Reuse | Components appropriately reusable | WARN |
94
- | Native Component Usage | Proper use of native UI components | WARN |
95
-
96
- ### 3.2 Platform Adaptation Validation
97
-
98
- | Check | Rule | Severity |
99
- |-------|------|----------|
100
- | iOS/Android Differences | Platform-specific differences handled | ERROR |
101
- | Screen Adaptation | Different screen sizes handled | ERROR |
102
- | Safe Area | Safe area insets respected | ERROR |
103
- | Platform APIs | Platform-specific APIs correctly used | WARN |
104
-
105
- ### 3.3 Permission Handling Check
106
-
107
- | Check | Rule | Severity |
108
- |-------|------|----------|
109
- | Runtime Permissions | Runtime permission requests implemented | ERROR |
110
- | Permission Rationale | User-friendly permission explanations | WARN |
111
- | Denial Handling | Graceful handling of permission denial | ERROR |
112
-
113
- ### 3.4 Offline Support Validation
114
-
115
- | Check | Rule | Severity |
116
- |-------|------|----------|
117
- | Local Storage | Data caching implemented where required | ERROR |
118
- | Sync Mechanism | Offline data sync strategy implemented | ERROR |
119
- | Network State | Network connectivity handling | ERROR |
120
- | Queue Management | Pending request queue management | WARN |
121
-
122
- ### 3.5 Performance Check
123
-
124
- | Check | Rule | Severity |
125
- |-------|------|----------|
126
- | List Rendering | Virtual scrolling for long lists | ERROR |
127
- | Image Optimization | Image lazy loading and caching | WARN |
128
- | Memory Management | Proper cleanup of listeners/timers | ERROR |
129
- | Bundle Size | Code splitting where appropriate | WARN |
130
-
131
- ## Step 4: Generate Review Report
132
-
133
- ### 4.1 Determine Result
134
-
135
- | Result | Criteria |
136
- |--------|----------|
137
- | **PASS** | 100% files created, 0 ERROR-level issues |
138
- | **PARTIAL** | 70-99% files created, or non-critical ERROR issues |
139
- | **FAIL** | <70% files created, or critical blockers present |
140
-
141
- ### 4.2 Write Report
142
-
143
- Generate report at: `speccrew-workspace/iterations/{number}-{type}-{name}/04.development/{platform_id}/[module]-review-report.md`
144
-
145
- Use template from `templates/REVIEW-REPORT-TEMPLATE.md`.
146
-
147
- ## Step 5: Task Completion Report
148
-
149
- ```markdown
150
- ## Task Completion Report
151
- - **Status**: SUCCESS
152
- - **Task ID**: review-{original_task_id}
153
- - **Platform**: {platform_id}
154
- - **Module**: {module_name}
155
- - **Output Files**: {review_report_path}
156
- - **Summary**: Review {result}: {completed}/{total} files, {error_count} errors
157
- ```
158
-
159
- # Severity Levels
160
-
161
- | Level | Definition | Action Required |
162
- |-------|------------|-----------------|
163
- | **CRITICAL** | Security vulnerability or data integrity issue | Must fix immediately |
164
- | **ERROR** | Blocking functionality or violating core requirements | Must fix before PASS |
165
- | **WARN** | Best practice violation or missing documentation | Should fix |
166
- | **LOW** | Code style or minor optimization suggestion | Optional |
167
-
168
- # Key Rules
169
-
170
- | Rule | Description |
171
- |------|-------------|
172
- | **Read-Only** | NEVER modify any source code |
173
- | **Blueprint-Driven** | Validate against design document specifications |
174
- | **Actionable Output** | PARTIAL/FAIL must include specific fix guidance |
175
- | **Platform-Specific** | Consider iOS/Android platform differences |
176
- | **Completeness First** | File existence is primary check before content validation |
177
-
178
- # Checklist
179
-
180
- - [ ] All required inputs validated
181
- - [ ] Design document loaded and parsed
182
- - [ ] File completeness check completed
183
- - [ ] Mobile components validated
184
- - [ ] Platform adaptation checked
185
- - [ ] Permission handling verified
186
- - [ ] Offline support validated
187
- - [ ] Performance checks completed
188
- - [ ] Review report written with clear verdict
189
- - [ ] Re-dispatch guidance provided for PARTIAL/FAIL
17
+ > **REQUIRED**: Before executing this workflow, read the XML workflow specification: speccrew-workspace/docs/rules/agentflow-spec.md
18
+ > Then read and execute the XML workflow in SKILL.xml block-by-block as the authoritative execution plan.
@@ -5,259 +5,10 @@ tools: Read, Write, Glob, Grep
5
5
  ---
6
6
 
7
7
  # Trigger Scenarios
8
-
9
8
  - Automatically triggered by speccrew-fd-feature-design Skill after feature spec document completion
10
9
  - User requests "Generate API documentation" or "Define API contract"
11
10
 
12
11
  ## AgentFlow Definition
13
-
14
12
  <!-- @agentflow: SKILL.xml -->
15
-
16
- > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
17
-
18
- ## Workflow
19
-
20
- ## Absolute Constraints
21
-
22
- > **These rules apply to ALL steps. Violation = task failure.**
23
-
24
- 1. **FORBIDDEN: `create_file` for documents** — NEVER use `create_file` to write the API contract document. It MUST be created by copying the template (Step 4a) then filling sections with `search_replace` (Step 4b). `create_file` produces truncated output on large files.
25
-
26
- 2. **FORBIDDEN: Full-file rewrite** — NEVER replace the entire document content in a single operation. Always use targeted `search_replace` on specific sections.
27
-
28
- 3. **MANDATORY: Template-first workflow** — Step 4a (copy template) MUST execute before Step 4b (fill sections). Skipping Step 4a and writing content directly is FORBIDDEN.
29
-
30
- 4. **ABORT CONDITIONS** — If any of the following occur, STOP immediately and report to user:
31
- - Feature Spec document (`feature_spec_path`) does not exist or is empty → STOP
32
- - API Contract template file does not exist → STOP
33
- - `node ... update-progress.js` script execution fails → **HARD STOP**: Do NOT manually create or edit JSON progress files. Report the script error and wait for user resolution.
34
-
35
- ### Error Categories
36
-
37
- | Category | Condition | Recovery |
38
- |----------|-----------|----------|
39
- | `DEPENDENCY_MISSING` | Feature Spec document not found or empty | Ensure feature design phase completed for this feature |
40
- | `DEPENDENCY_MISSING` | API Contract template not found | Verify skill installation integrity |
41
- | `VALIDATION_ERROR` | Feature Spec missing required API sections | Review and fix feature spec content |
42
- | `RUNTIME_ERROR` | update-progress.js script execution failed | Check script errors; do NOT manually edit JSON |
43
-
44
- > **NOTE**: This skill does NOT include user confirmation. Confirmation is handled at the orchestrator/dispatcher level after all features are processed. This enables continuous batch execution.
45
-
46
- ## Step 1: Read Input
47
-
48
- ### Input Parameters
49
-
50
- | Parameter | Required | Description |
51
- |-----------|----------|-------------|
52
- | `feature_id` | Optional | Feature 唯一标识符,如 `F-CRM-01`(向后兼容:不传则使用当前逻辑) |
53
- | `feature_name` | Optional | Feature 名称,如 `customer-list`(向后兼容:不传则使用当前逻辑) |
54
-
55
- ### Input Files
56
-
57
- 1. **Feature Spec 文档**:
58
- - **新格式(推荐)**:`speccrew-workspace/iterations/{number}-{type}-{name}/02.feature-design/{feature-id}-{feature-name}-feature-spec.md`
59
- - **旧格式(向后兼容)**:`speccrew-workspace/iterations/{number}-{type}-{name}/02.feature-design/[feature-name]-feature-spec.md`
60
- - 优先检查新格式,不存在则回退到旧格式
61
-
62
- 2. API Contract template: `speccrew-fd-api-contract/templates/API-CONTRACT-TEMPLATE.md`
63
- 3. System architecture (API specification part): Refer to project tech-stack-mappings.json for API naming conventions
64
-
65
- ## Step 2: Organize API List
66
-
67
- Extract all APIs from feature spec document and organize into a list:
68
-
69
- | API Name | Method | URL | Description | Caller |
70
- |----------|--------|-----|-------------|--------|
71
- | [API] | GET/POST/PUT/DELETE | `/api/v1/...` | [Description] | Frontend |
72
-
73
- Naming conventions:
74
- - URL uses RESTful style, plural nouns
75
- - Follow API specifications in project tech-stack-mappings.json
76
-
77
- ## Step 3: Define Contract for Each API
78
-
79
- Complete definition for each API:
80
- - Request method, URL, authentication required or not
81
- - Request parameters (including type, required or not, example values)
82
- - Response structure (including type and description for each field)
83
- - Success response example (JSON)
84
- - Error code list
85
-
86
- ## Step 4: Write API Contract Document
87
-
88
- ### 4a Copy Template to Document Path
89
-
90
- 1. **Read the template file**: `templates/API-CONTRACT-TEMPLATE.md`
91
- 2. **Replace top-level placeholders** (feature name, date, feature_id if provided, etc.)
92
- 3. **Create the document** using `create_file`:
93
- - **新格式(当提供了 feature_id 时)**:`speccrew-workspace/iterations/{number}-{type}-{name}/03.api-contract/{feature-id}-{feature-name}-api-contract.md`
94
- - 示例:`F-CRM-01-customer-list-api-contract.md`
95
- - **旧格式(向后兼容,未提供 feature_id 时)**:`speccrew-workspace/iterations/{number}-{type}-{name}/03.api-contract/[feature-name]-api-contract.md`
96
- - Content: Template with top-level placeholders replaced
97
- 4. **Verify**: Document has complete section structure ready for filling
98
-
99
- ### 4b Fill Each Section Using search_replace
100
-
101
- Fill each section with API contract details from Step 2 and Step 3.
102
-
103
- > ⚠️ **CRITICAL CONSTRAINTS:**
104
- > - **FORBIDDEN: `create_file` to rewrite the entire document** — it destroys template structure
105
- > - **MUST use `search_replace` to fill each section individually**
106
- > - **All section titles MUST be preserved**
107
-
108
- **Section Filling Order:**
109
-
110
- | Section | Content Source |
111
- |---------|---------------|
112
- | **API List Overview** | API list table from Step 2 |
113
- | **API Contract Details** | Full contract definitions from Step 3 (per API) |
114
- | **Error Code Summary** | Aggregated error codes across all APIs |
115
-
116
- For each API, locate its section anchor in the template and use `search_replace` to fill request parameters, response structure, success example, and error codes.
117
-
118
- ## Step 5: Update Progress Files
119
-
120
- > **SCRIPT ENFORCEMENT RULE**: All `.checkpoints.json` and `WORKFLOW-PROGRESS.json` updates MUST be performed via `node speccrew-workspace/scripts/update-progress.js` commands. Manually creating or editing these JSON files is FORBIDDEN. If the script fails, STOP and report the error — do NOT attempt manual JSON construction.
121
-
122
- ### 5a: Update Checkpoints File
123
-
124
- Update the `.checkpoints.json` file to record confirmation status.
125
-
126
- Write/Update `.checkpoints.json`:
127
-
128
- - Path: `speccrew-workspace/iterations/{iteration-id}/02.feature-design/.checkpoints.json`
129
-
130
- **情况 A:提供了 feature_id(Feature 粒度)**
131
- ```json
132
- {
133
- "stage": "02_feature_design",
134
- "feature_checkpoints": {
135
- "{feature_id}": {
136
- "feature_spec_review": {
137
- "passed": true,
138
- "confirmed_at": "..."
139
- },
140
- "api_contract_joint": {
141
- "passed": true,
142
- "confirmed_at": "{current_timestamp}",
143
- "description": "API contract joint confirmation passed for {feature_id}"
144
- }
145
- }
146
- },
147
- "checkpoints": {
148
- "function_decomposition": {
149
- "passed": true,
150
- "confirmed_at": "..."
151
- }
152
- }
153
- }
154
- ```
155
-
156
- - 使用 `feature_checkpoints.{feature_id}` 作为 key 存储单个 Feature 的状态
157
- - 保留原有的 `checkpoints` 用于全局检查点
158
- - Log: "✅ Checkpoint (api_contract_joint) passed and recorded for Feature {feature_id}"
159
-
160
- **情况 B:未提供 feature_id(向后兼容,模块级)**
161
- ```json
162
- {
163
- "stage": "02_feature_design",
164
- "checkpoints": {
165
- "function_decomposition": {
166
- "passed": true,
167
- "confirmed_at": "..."
168
- },
169
- "feature_spec_review": {
170
- "passed": true,
171
- "confirmed_at": "..."
172
- },
173
- "api_contract_joint": {
174
- "passed": true,
175
- "confirmed_at": "{current_timestamp}",
176
- "description": "API contract joint confirmation passed"
177
- }
178
- }
179
- }
180
- ```
181
-
182
- - Preserve existing checkpoint statuses when updating
183
- - Log: "✅ Checkpoint (api_contract_joint) passed and recorded"
184
-
185
- ### 5b: Update Workflow Progress
186
-
187
- Update `WORKFLOW-PROGRESS.json` to reflect current feature/module status.
188
-
189
- - Path: `speccrew-workspace/iterations/{iteration-id}/WORKFLOW-PROGRESS.json`
190
-
191
- **情况 A:提供了 feature_id(Feature 粒度)**
192
- ```json
193
- {
194
- "current_stage": "02_feature_design",
195
- "stages": {
196
- "02_feature_design": {
197
- "status": "in_progress",
198
- "features": {
199
- "{feature_id}": {
200
- "status": "confirmed",
201
- "completed_at": "{current_timestamp}",
202
- "confirmed_at": "{current_timestamp}",
203
- "outputs": [
204
- "02.feature-design/{feature-id}-{feature-name}-feature-spec.md",
205
- "03.api-contract/${feature_id}-${feature_name}-api-contract.md"
206
- ]
207
- }
208
- }
209
- }
210
- }
211
- }
212
- ```
213
-
214
- - **重要**:单个 Feature 完成时,**不修改** `02_feature_design.status`(保持 `in_progress`)
215
- - **重要**:**不修改** `current_stage`(保持 `02_feature_design`)
216
- - 仅在 `stages.02_feature_design.features.{feature_id}` 中记录该 Feature 的完成状态
217
- - Log: "✅ Feature {feature_id} API Contract confirmed. Feature Designer Agent will update global stage status when all features are completed."
218
-
219
- **情况 B:未提供 feature_id(向后兼容,模块级)**
220
- ```json
221
- {
222
- "current_stage": "03_system_design",
223
- "stages": {
224
- "02_feature_design": {
225
- "status": "confirmed",
226
- "completed_at": "{current_timestamp}",
227
- "confirmed_at": "{current_timestamp}",
228
- "outputs": [
229
- "02.feature-design/[feature-name]-feature-spec.md",
230
- "03.api-contract/${feature_name}-api-contract.md"
231
- ]
232
- }
233
- }
234
- }
235
- ```
236
-
237
- - Set `02_feature_design.status` to `confirmed`
238
- - Set `current_stage` to `03_system_design`
239
- - Record all output file paths
240
- - Log: "✅ Stage 02_feature_design confirmed. Ready for System Design phase."
241
-
242
- > **Note**: On Windows PowerShell, do not use backslash (`\`) for line continuation. Write the entire command on a single line.
243
-
244
- **关于全局状态管理的说明**:
245
- > Feature 粒度的 API Contract 完成后,全局阶段状态(`02_feature_design.status` 和 `current_stage`)**不由本 Skill 更新**。
246
- > 全局状态由 **Feature Designer Agent** 统一管理,当检测到所有 Feature 都完成时,统一更新为 `confirmed` 并推进到下一阶段。
247
-
248
- ### 5.3 Backward Compatibility
249
-
250
- If `WORKFLOW-PROGRESS.json` does not exist:
251
- - Log: "⚠️ No workflow progress file found. Skipping workflow update."
252
- - Still update `.checkpoints.json` if the directory exists
253
-
254
- ---
255
-
256
- # Checklist
257
-
258
- - [ ] All APIs mentioned in feature spec have defined contracts
259
- - [ ] Each API has complete request/response structure definition
260
- - [ ] URL naming conforms to backend architecture specifications
261
- - [ ] Error code list is complete
262
- - [ ] File has been written to correct path (with proper naming convention based on feature_id)
263
- - [ ] API Contract document has been generated at the correct path
13
+ > **REQUIRED**: Before executing this workflow, read the XML workflow specification: speccrew-workspace/docs/rules/agentflow-spec.md
14
+ > Then read and execute the XML workflow in SKILL.xml block-by-block as the authoritative execution plan.