speccrew 0.2.2 → 0.2.4

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.
@@ -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`** from:
27
- - Path: `speccrew-workspace/iterations/{iteration-id}/WORKFLOW-PROGRESS.json`
26
+ 1. **Read `WORKFLOW-PROGRESS.json` overview**:
27
+ ```bash
28
+ node speccrew-workspace/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
- - Set `stages.02_feature_design.status = "in_progress"`
41
- - Set `stages.02_feature_design.started_at = "{current_timestamp}"`
42
- - Write the updated `WORKFLOW-PROGRESS.json`
42
+ ```bash
43
+ node speccrew-workspace/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 `.checkpoints.json`** from:
49
- - Path: `speccrew-workspace/iterations/{iteration-id}/02.feature-design/.checkpoints.json`
50
+ 1. **Read checkpoints** (if file exists):
51
+ ```bash
52
+ node speccrew-workspace/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`** from:
77
- - Path: `speccrew-workspace/iterations/{iteration-id}/02.feature-design/DISPATCH-PROGRESS.json`
80
+ 1. **Read `DISPATCH-PROGRESS.json` summary** (if file exists):
81
+ ```bash
82
+ node speccrew-workspace/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
- ```json
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-workspace/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. **Write Updated Progress File**:
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** from `speccrew-workspace/iterations/{current}/WORKFLOW-PROGRESS.json`
25
- 2. **Validate upstream stage**: Check `stages.02_feature_design.status == "confirmed"`
24
+ 1. **Read WORKFLOW-PROGRESS.json overview**:
25
+ ```bash
26
+ node speccrew-workspace/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 `03_system_design.status` to `in_progress`, record `started_at` timestamp
35
+ - Update stage status:
36
+ ```bash
37
+ node speccrew-workspace/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 .checkpoints.json** from `speccrew-workspace/iterations/{current}/03.system-design/.checkpoints.json` (if exists)
44
+ 1. **Read checkpoints** (if file exists):
45
+ ```bash
46
+ node speccrew-workspace/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 DISPATCH-PROGRESS.json** from `speccrew-workspace/iterations/{current}/03.system-design/DISPATCH-PROGRESS.json` (if exists)
59
+ 1. **Read dispatch progress summary** (if file exists):
60
+ ```bash
61
+ node speccrew-workspace/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. **Create task entries** for each Feature × Platform combination:
179
- ```json
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-workspace/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-workspace/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` with `started_at` timestamp
211
+ 1. **Update task status to `in_progress`**:
212
+ ```bash
213
+ node speccrew-workspace/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,9 +222,16 @@ 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` → Update task to `completed`, record `output` path
220
- - If `Status: FAILED` → Update task to `failed`, record `error` details
227
+ - If `Status: SUCCESS`:
228
+ ```bash
229
+ node speccrew-workspace/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-workspace/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
 
@@ -243,7 +257,10 @@ 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` with `started_at` timestamp.
260
+ **Before dispatch**: Update each task status to `in_progress`:
261
+ ```bash
262
+ node speccrew-workspace/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
265
  **Parallel execution example** (2 features × 3 platforms = 6 workers):
249
266
  - Worker 1: speccrew-sd-frontend for Feature A on web-vue → 03.system-design/web-vue/
@@ -259,21 +276,14 @@ All workers execute simultaneously to maximize efficiency.
259
276
 
260
277
  After each worker completes, parse its **Task Completion Report** and update:
261
278
 
262
- ```json
263
- {
264
- "tasks": [
265
- {
266
- "id": "sd-web-vue-feature-a",
267
- "status": "completed",
268
- "completed_at": "2026-01-15T10:30:00Z",
269
- "output": "03.system-design/web-vue/feature-a-design.md"
270
- }
271
- ],
272
- "completed": 4,
273
- "failed": 1,
274
- "pending": 1
275
- }
276
- ```
279
+ - On SUCCESS:
280
+ ```bash
281
+ node speccrew-workspace/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-workspace/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
288
  Wait for all workers to complete before proceeding to Phase 6.
279
289
 
@@ -290,31 +300,16 @@ After all platform designs are complete:
290
300
 
291
301
  After user confirms:
292
302
 
293
- 1. **Write .checkpoints.json**:
294
- ```json
295
- {
296
- "stage": "03_system_design",
297
- "checkpoints": {
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-workspace/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-workspace/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-workspace/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
- ```json
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-workspace/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