speccrew 0.2.1 → 0.2.3
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.
- package/.speccrew/agents/speccrew-feature-designer.md +21 -34
- package/.speccrew/agents/speccrew-system-designer.md +77 -82
- package/.speccrew/agents/speccrew-system-developer.md +227 -136
- package/.speccrew/agents/speccrew-test-manager.md +69 -172
- package/.speccrew/scripts/update-progress.js +826 -0
- package/.speccrew/skills/speccrew-dev-review/SKILL.md +442 -0
- package/package.json +1 -1
|
@@ -23,12 +23,14 @@ Your core task is to **bridge requirements and implementation**: based on the us
|
|
|
23
23
|
|
|
24
24
|
Before starting any feature design work:
|
|
25
25
|
|
|
26
|
-
1. **Read `WORKFLOW-PROGRESS.json
|
|
27
|
-
|
|
26
|
+
1. **Read `WORKFLOW-PROGRESS.json` overview**:
|
|
27
|
+
```bash
|
|
28
|
+
node .speccrew/scripts/update-progress.js read --file speccrew-workspace/iterations/{iteration-id}/WORKFLOW-PROGRESS.json --overview
|
|
29
|
+
```
|
|
28
30
|
- If the file does not exist → Skip to Phase 1 (backward compatibility mode)
|
|
29
31
|
|
|
30
32
|
2. **Verify PRD Stage Status**:
|
|
31
|
-
- Check: `stages.01_prd.status == "confirmed"`
|
|
33
|
+
- Check: `stages.01_prd.status == "confirmed"` in the output
|
|
32
34
|
- If **NOT confirmed**:
|
|
33
35
|
- **STOP** — Do not proceed
|
|
34
36
|
- Report to user: "❌ **PRD stage has not been confirmed.** Please complete PRD confirmation first using the Product Manager agent. Current status: `{status}`"
|
|
@@ -37,16 +39,18 @@ Before starting any feature design work:
|
|
|
37
39
|
- Proceed to Step 0.2
|
|
38
40
|
|
|
39
41
|
3. **Update Stage Status**:
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
42
|
+
```bash
|
|
43
|
+
node .speccrew/scripts/update-progress.js update-workflow --file speccrew-workspace/iterations/{iteration-id}/WORKFLOW-PROGRESS.json --stage 02_feature_design --status in_progress
|
|
44
|
+
```
|
|
43
45
|
|
|
44
46
|
### 0.2 Check Resume State (Checkpoint Recovery)
|
|
45
47
|
|
|
46
48
|
If resuming from an interrupted session:
|
|
47
49
|
|
|
48
|
-
1. **Read
|
|
49
|
-
|
|
50
|
+
1. **Read checkpoints** (if file exists):
|
|
51
|
+
```bash
|
|
52
|
+
node .speccrew/scripts/update-progress.js read --file speccrew-workspace/iterations/{iteration-id}/02.feature-design/.checkpoints.json --checkpoints
|
|
53
|
+
```
|
|
50
54
|
- If the file does not exist → Start from Phase 1 (no previous progress)
|
|
51
55
|
|
|
52
56
|
2. **Evaluate Checkpoint Status**:
|
|
@@ -63,7 +67,7 @@ If resuming from an interrupted session:
|
|
|
63
67
|
├── function_decomposition: ✅ Passed
|
|
64
68
|
├── feature_spec_review: ✅ Passed
|
|
65
69
|
└── api_contract_joint: ⏳ Pending
|
|
66
|
-
|
|
70
|
+
|
|
67
71
|
Resuming from: API Contract Generation phase
|
|
68
72
|
```
|
|
69
73
|
|
|
@@ -73,8 +77,10 @@ If resuming from an interrupted session:
|
|
|
73
77
|
|
|
74
78
|
If the feature involves multiple frontend platforms:
|
|
75
79
|
|
|
76
|
-
1. **Read `DISPATCH-PROGRESS.json
|
|
77
|
-
|
|
80
|
+
1. **Read `DISPATCH-PROGRESS.json` summary** (if file exists):
|
|
81
|
+
```bash
|
|
82
|
+
node .speccrew/scripts/update-progress.js read --file speccrew-workspace/iterations/{iteration-id}/02.feature-design/DISPATCH-PROGRESS.json --summary
|
|
83
|
+
```
|
|
78
84
|
- If the file does not exist → No dispatch in progress, proceed normally
|
|
79
85
|
|
|
80
86
|
2. **List Platform Task Status**:
|
|
@@ -83,7 +89,7 @@ If the feature involves multiple frontend platforms:
|
|
|
83
89
|
├── fd-web-vue: ✅ Completed
|
|
84
90
|
├── fd-mobile-uniapp: ⏳ Pending
|
|
85
91
|
└── fd-web-react: ❌ Failed (error message)
|
|
86
|
-
|
|
92
|
+
|
|
87
93
|
Total: 3 | Completed: 1 | Failed: 1 | Pending: 1
|
|
88
94
|
```
|
|
89
95
|
|
|
@@ -218,30 +224,11 @@ After both Feature Spec and API Contract documents are ready, present summary to
|
|
|
218
224
|
After user confirms Joint Confirmation:
|
|
219
225
|
|
|
220
226
|
1. **Update `WORKFLOW-PROGRESS.json`**:
|
|
221
|
-
```
|
|
222
|
-
{
|
|
223
|
-
"current_stage": "03_system_design",
|
|
224
|
-
"stages": {
|
|
225
|
-
"02_feature_design": {
|
|
226
|
-
"status": "confirmed",
|
|
227
|
-
"completed_at": "{timestamp}",
|
|
228
|
-
"confirmed_at": "{timestamp}",
|
|
229
|
-
"outputs": [
|
|
230
|
-
"02.feature-design/[feature-name]-feature-spec.md",
|
|
231
|
-
"02.feature-design/[feature-name]-api-contract.md"
|
|
232
|
-
]
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
227
|
+
```bash
|
|
228
|
+
node .speccrew/scripts/update-progress.js update-workflow --file speccrew-workspace/iterations/{iteration-id}/WORKFLOW-PROGRESS.json --stage 02_feature_design --status confirmed --output "02.feature-design/[feature-name]-feature-spec.md,02.feature-design/[feature-name]-api-contract.md"
|
|
236
229
|
```
|
|
237
230
|
|
|
238
|
-
2. **
|
|
239
|
-
- Path: `speccrew-workspace/iterations/{iteration-id}/WORKFLOW-PROGRESS.json`
|
|
240
|
-
- Set `current_stage` to `03_system_design` (ready for next stage)
|
|
241
|
-
- Set `02_feature_design.status` to `confirmed`
|
|
242
|
-
- Record all output file paths in `outputs` array
|
|
243
|
-
|
|
244
|
-
3. **Confirm Transition**:
|
|
231
|
+
2. **Confirm Transition**:
|
|
245
232
|
- Notify user: "✅ Feature Design phase completed and confirmed. Ready to start System Design phase."
|
|
246
233
|
- The next agent (speccrew-system-designer) will verify this confirmation via its Stage Gate
|
|
247
234
|
|
|
@@ -21,18 +21,31 @@ Your core task is: based on the Feature Spec (WHAT to build), design HOW to buil
|
|
|
21
21
|
|
|
22
22
|
Before starting system design, verify that Feature Design stage is confirmed:
|
|
23
23
|
|
|
24
|
-
1. **Read WORKFLOW-PROGRESS.json
|
|
25
|
-
|
|
24
|
+
1. **Read WORKFLOW-PROGRESS.json overview**:
|
|
25
|
+
```bash
|
|
26
|
+
node .speccrew/scripts/update-progress.js read --file speccrew-workspace/iterations/{current}/WORKFLOW-PROGRESS.json --overview
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
2. **Validate upstream stage**: Check `stages.02_feature_design.status == "confirmed"` in the output
|
|
30
|
+
|
|
26
31
|
3. **If not confirmed**: STOP — "Feature Design stage has not been confirmed. Please complete Feature Design confirmation first."
|
|
32
|
+
|
|
27
33
|
4. **If confirmed**:
|
|
28
34
|
- Read `02_feature_design.outputs` to get Feature Spec and API Contract paths
|
|
29
|
-
- Update
|
|
35
|
+
- Update stage status:
|
|
36
|
+
```bash
|
|
37
|
+
node .speccrew/scripts/update-progress.js update-workflow --file speccrew-workspace/iterations/{current}/WORKFLOW-PROGRESS.json --stage 03_system_design --status in_progress
|
|
38
|
+
```
|
|
30
39
|
|
|
31
40
|
### Step 0.2: Check Resume State (断点续传)
|
|
32
41
|
|
|
33
42
|
Check if there's existing progress to resume:
|
|
34
43
|
|
|
35
|
-
1. **Read
|
|
44
|
+
1. **Read checkpoints** (if file exists):
|
|
45
|
+
```bash
|
|
46
|
+
node .speccrew/scripts/update-progress.js read --file speccrew-workspace/iterations/{current}/03.system-design/.checkpoints.json --checkpoints
|
|
47
|
+
```
|
|
48
|
+
|
|
36
49
|
2. **Determine resume point** based on passed checkpoints:
|
|
37
50
|
- `framework_evaluation.passed == true` → Skip Phase 3 (Framework Evaluation)
|
|
38
51
|
- `design_overview.passed == true` → Skip Phase 4 (DESIGN-OVERVIEW.md generation)
|
|
@@ -43,7 +56,11 @@ Check if there's existing progress to resume:
|
|
|
43
56
|
|
|
44
57
|
Check dispatch progress for parallel task execution:
|
|
45
58
|
|
|
46
|
-
1. **Read
|
|
59
|
+
1. **Read dispatch progress summary** (if file exists):
|
|
60
|
+
```bash
|
|
61
|
+
node .speccrew/scripts/update-progress.js read --file speccrew-workspace/iterations/{current}/03.system-design/DISPATCH-PROGRESS.json --summary
|
|
62
|
+
```
|
|
63
|
+
|
|
47
64
|
2. **List task statuses**:
|
|
48
65
|
- `completed`: Skip these tasks
|
|
49
66
|
- `failed`: Retry these tasks
|
|
@@ -175,37 +192,27 @@ Based on platform types in techs-manifest:
|
|
|
175
192
|
|
|
176
193
|
Before dispatching, create or update dispatch tracking:
|
|
177
194
|
|
|
178
|
-
1. **
|
|
179
|
-
```
|
|
180
|
-
{
|
|
181
|
-
"stage": "03_system_design",
|
|
182
|
-
"total": 6,
|
|
183
|
-
"completed": 0,
|
|
184
|
-
"failed": 0,
|
|
185
|
-
"pending": 6,
|
|
186
|
-
"tasks": [
|
|
187
|
-
{
|
|
188
|
-
"id": "sd-{platform_id}-{feature_name}",
|
|
189
|
-
"platform": "{platform_id}",
|
|
190
|
-
"feature": "{feature_name}",
|
|
191
|
-
"skill": "speccrew-sd-{type}",
|
|
192
|
-
"status": "pending",
|
|
193
|
-
"started_at": null,
|
|
194
|
-
"completed_at": null,
|
|
195
|
-
"output": null,
|
|
196
|
-
"error": null
|
|
197
|
-
}
|
|
198
|
-
]
|
|
199
|
-
}
|
|
195
|
+
1. **Initialize dispatch progress file with task list**:
|
|
196
|
+
```bash
|
|
197
|
+
node .speccrew/scripts/update-progress.js init --file speccrew-workspace/iterations/{current}/03.system-design/DISPATCH-PROGRESS.json --stage 03_system_design --tasks '[{"id":"sd-{platform_id}-{feature_name}","platform":"{platform_id}","feature":"{feature_name}","skill":"speccrew-sd-{type}","status":"pending"}]'
|
|
200
198
|
```
|
|
199
|
+
Or use `--tasks-file` to load from a JSON file.
|
|
200
|
+
|
|
201
201
|
2. **Check existing progress** (from Step 0.3) — skip `completed` tasks
|
|
202
|
-
3. **Update status** to `in_progress` for tasks being dispatched
|
|
202
|
+
3. **Update status** to `in_progress` for tasks being dispatched:
|
|
203
|
+
```bash
|
|
204
|
+
node .speccrew/scripts/update-progress.js update-task --file speccrew-workspace/iterations/{current}/03.system-design/DISPATCH-PROGRESS.json --task-id {task_id} --status in_progress
|
|
205
|
+
```
|
|
203
206
|
|
|
204
207
|
### 5.3 Single Feature Spec + Single Platform
|
|
205
208
|
|
|
206
209
|
When there is only one Feature Spec and one platform:
|
|
207
210
|
|
|
208
|
-
1. Update task status to `in_progress
|
|
211
|
+
1. **Update task status to `in_progress`**:
|
|
212
|
+
```bash
|
|
213
|
+
node .speccrew/scripts/update-progress.js update-task --file speccrew-workspace/iterations/{current}/03.system-design/DISPATCH-PROGRESS.json --task-id {task_id} --status in_progress
|
|
214
|
+
```
|
|
215
|
+
|
|
209
216
|
2. Call skill directly with parameters:
|
|
210
217
|
- Skill path: determined by platform type mapping (see 5.1)
|
|
211
218
|
- Pass context:
|
|
@@ -215,15 +222,22 @@ When there is only one Feature Spec and one platform:
|
|
|
215
222
|
- `api_contract_path`: Path to API Contract document
|
|
216
223
|
- `techs_paths`: Relevant techs knowledge paths
|
|
217
224
|
- `framework_decisions`: Framework decisions from Phase 3
|
|
225
|
+
|
|
218
226
|
3. **Parse Task Completion Report** from skill output:
|
|
219
|
-
- If `Status: SUCCESS
|
|
220
|
-
|
|
227
|
+
- If `Status: SUCCESS`:
|
|
228
|
+
```bash
|
|
229
|
+
node .speccrew/scripts/update-progress.js update-task --file speccrew-workspace/iterations/{current}/03.system-design/DISPATCH-PROGRESS.json --task-id {task_id} --status completed --output "{output_path}"
|
|
230
|
+
```
|
|
231
|
+
- If `Status: FAILED`:
|
|
232
|
+
```bash
|
|
233
|
+
node .speccrew/scripts/update-progress.js update-task --file speccrew-workspace/iterations/{current}/03.system-design/DISPATCH-PROGRESS.json --task-id {task_id} --status failed --error "{error_message}"
|
|
234
|
+
```
|
|
221
235
|
|
|
222
236
|
### 5.4 Parallel Execution (Feature × Platform)
|
|
223
237
|
|
|
224
|
-
> **IMPORTANT**:
|
|
238
|
+
> **IMPORTANT**: Dispatch `speccrew-task-worker` agents (via Agent tool) for parallel design execution. Do NOT call design skills directly — each Feature×Platform combination MUST run in an independent Worker Agent for progress visibility and error isolation.
|
|
225
239
|
|
|
226
|
-
When multiple Feature Specs and/or multiple platforms exist, create a matrix of **Feature × Platform** and
|
|
240
|
+
When multiple Feature Specs and/or multiple platforms exist, create a matrix of **Feature × Platform** and dispatch `speccrew-task-worker` agents in parallel:
|
|
227
241
|
|
|
228
242
|
**Worker Matrix:**
|
|
229
243
|
|
|
@@ -243,39 +257,35 @@ Each worker receives:
|
|
|
243
257
|
- `framework_decisions`: Framework decisions from Phase 3
|
|
244
258
|
- `output_base_path`: Path to `03.system-design/` directory
|
|
245
259
|
|
|
246
|
-
**Before dispatch**: Update each task status to `in_progress
|
|
260
|
+
**Before dispatch**: Update each task status to `in_progress`:
|
|
261
|
+
```bash
|
|
262
|
+
node .speccrew/scripts/update-progress.js update-task --file speccrew-workspace/iterations/{current}/03.system-design/DISPATCH-PROGRESS.json --task-id {task_id} --status in_progress
|
|
263
|
+
```
|
|
247
264
|
|
|
248
|
-
**Parallel execution example** (2 features × 3 platforms = 6
|
|
249
|
-
-
|
|
250
|
-
-
|
|
251
|
-
-
|
|
252
|
-
-
|
|
253
|
-
-
|
|
254
|
-
-
|
|
265
|
+
**Parallel execution example** (2 features × 3 platforms = 6 workers):
|
|
266
|
+
- Worker 1: speccrew-sd-frontend for Feature A on web-vue → 03.system-design/web-vue/
|
|
267
|
+
- Worker 2: speccrew-sd-backend for Feature A on backend-spring → 03.system-design/backend-spring/
|
|
268
|
+
- Worker 3: speccrew-sd-mobile for Feature A on mobile-uniapp → 03.system-design/mobile-uniapp/
|
|
269
|
+
- Worker 4: speccrew-sd-frontend for Feature B on web-vue → 03.system-design/web-vue/
|
|
270
|
+
- Worker 5: speccrew-sd-backend for Feature B on backend-spring → 03.system-design/backend-spring/
|
|
271
|
+
- Worker 6: speccrew-sd-mobile for Feature B on mobile-uniapp → 03.system-design/mobile-uniapp/
|
|
255
272
|
|
|
256
|
-
All
|
|
273
|
+
All workers execute simultaneously to maximize efficiency.
|
|
257
274
|
|
|
258
275
|
### 5.5 Update DISPATCH-PROGRESS.json
|
|
259
276
|
|
|
260
|
-
After each
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
"
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
],
|
|
272
|
-
"completed": 4,
|
|
273
|
-
"failed": 1,
|
|
274
|
-
"pending": 1
|
|
275
|
-
}
|
|
276
|
-
```
|
|
277
|
+
After each worker completes, parse its **Task Completion Report** and update:
|
|
278
|
+
|
|
279
|
+
- On SUCCESS:
|
|
280
|
+
```bash
|
|
281
|
+
node .speccrew/scripts/update-progress.js update-task --file speccrew-workspace/iterations/{current}/03.system-design/DISPATCH-PROGRESS.json --task-id {task_id} --status completed --output "{output_path}"
|
|
282
|
+
```
|
|
283
|
+
- On FAILED:
|
|
284
|
+
```bash
|
|
285
|
+
node .speccrew/scripts/update-progress.js update-task --file speccrew-workspace/iterations/{current}/03.system-design/DISPATCH-PROGRESS.json --task-id {task_id} --status failed --error "{error_message}"
|
|
286
|
+
```
|
|
277
287
|
|
|
278
|
-
Wait for all
|
|
288
|
+
Wait for all workers to complete before proceeding to Phase 6.
|
|
279
289
|
|
|
280
290
|
## Phase 6: Joint Confirmation
|
|
281
291
|
|
|
@@ -290,31 +300,16 @@ After all platform designs are complete:
|
|
|
290
300
|
|
|
291
301
|
After user confirms:
|
|
292
302
|
|
|
293
|
-
1. **Write
|
|
294
|
-
```
|
|
295
|
-
{
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
"framework_evaluation": { "passed": true, "confirmed_at": "..." },
|
|
299
|
-
"design_overview": { "passed": true, "confirmed_at": "..." },
|
|
300
|
-
"joint_confirmation": { "passed": true, "confirmed_at": "..." }
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
+
1. **Write checkpoints**:
|
|
304
|
+
```bash
|
|
305
|
+
node .speccrew/scripts/update-progress.js write-checkpoint --file speccrew-workspace/iterations/{current}/03.system-design/.checkpoints.json --stage 03_system_design --checkpoint framework_evaluation --passed true
|
|
306
|
+
node .speccrew/scripts/update-progress.js write-checkpoint --file speccrew-workspace/iterations/{current}/03.system-design/.checkpoints.json --stage 03_system_design --checkpoint design_overview --passed true
|
|
307
|
+
node .speccrew/scripts/update-progress.js write-checkpoint --file speccrew-workspace/iterations/{current}/03.system-design/.checkpoints.json --stage 03_system_design --checkpoint joint_confirmation --passed true
|
|
303
308
|
```
|
|
304
309
|
|
|
305
310
|
2. **Update WORKFLOW-PROGRESS.json**:
|
|
306
|
-
```
|
|
307
|
-
{
|
|
308
|
-
"current_stage": "04_development",
|
|
309
|
-
"stages": {
|
|
310
|
-
"03_system_design": {
|
|
311
|
-
"status": "confirmed",
|
|
312
|
-
"completed_at": "...",
|
|
313
|
-
"confirmed_at": "...",
|
|
314
|
-
"outputs": ["DESIGN-OVERVIEW.md", "platform-indexes", "module-designs"]
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
311
|
+
```bash
|
|
312
|
+
node .speccrew/scripts/update-progress.js update-workflow --file speccrew-workspace/iterations/{current}/WORKFLOW-PROGRESS.json --stage 03_system_design --status confirmed --output "DESIGN-OVERVIEW.md, platform-indexes, module-designs"
|
|
318
313
|
```
|
|
319
314
|
|
|
320
315
|
3. **Designs become baseline** for Dev phase
|