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
|
@@ -19,25 +19,25 @@ Your core task is: coordinate three-phase testing workflow (test case design →
|
|
|
19
19
|
|
|
20
20
|
### Step 0.1: Stage Gate — Verify Upstream Completion
|
|
21
21
|
|
|
22
|
-
**Read `WORKFLOW-PROGRESS.json
|
|
23
|
-
```
|
|
24
|
-
speccrew-workspace/WORKFLOW-PROGRESS.json
|
|
22
|
+
**Read `WORKFLOW-PROGRESS.json` overview**:
|
|
23
|
+
```bash
|
|
24
|
+
node .speccrew/scripts/update-progress.js read --file speccrew-workspace/WORKFLOW-PROGRESS.json --overview
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
**Validation Rules:**
|
|
28
|
-
- Verify `stages.04_development.status == "confirmed"`
|
|
28
|
+
- Verify `stages.04_development.status == "confirmed"` in the output
|
|
29
29
|
- If not confirmed → **STOP** with message: "Development stage has not been confirmed. Please complete and confirm the development stage before starting system test."
|
|
30
30
|
|
|
31
|
-
**Update Current Stage
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
31
|
+
**Update Current Stage**:
|
|
32
|
+
```bash
|
|
33
|
+
node .speccrew/scripts/update-progress.js update-workflow --file speccrew-workspace/WORKFLOW-PROGRESS.json --stage 05_system_test --status in_progress
|
|
34
|
+
```
|
|
35
35
|
|
|
36
36
|
### Step 0.2: Check Resume State (断点续传)
|
|
37
37
|
|
|
38
|
-
**Read
|
|
39
|
-
```
|
|
40
|
-
speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/.checkpoints.json
|
|
38
|
+
**Read Checkpoints** (if file exists):
|
|
39
|
+
```bash
|
|
40
|
+
node .speccrew/scripts/update-progress.js read --file speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/.checkpoints.json --checkpoints
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
**Resume Decision Matrix:**
|
|
@@ -56,9 +56,9 @@ speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/.checkpoints
|
|
|
56
56
|
|
|
57
57
|
### Step 0.3: Check Dispatch Resume (多平台断点续传)
|
|
58
58
|
|
|
59
|
-
**Read Dispatch Progress** (if exists):
|
|
60
|
-
```
|
|
61
|
-
speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/DISPATCH-PROGRESS.json
|
|
59
|
+
**Read Dispatch Progress Summary** (if file exists):
|
|
60
|
+
```bash
|
|
61
|
+
node .speccrew/scripts/update-progress.js read --file speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/DISPATCH-PROGRESS.json --summary
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
**Parse Task Status by Phase:**
|
|
@@ -163,7 +163,7 @@ Design test cases based on loaded knowledge:
|
|
|
163
163
|
|
|
164
164
|
After reading `DESIGN-OVERVIEW.md`:
|
|
165
165
|
- **Single Platform**: Invoke Skill directly
|
|
166
|
-
- **Multiple Platforms**:
|
|
166
|
+
- **Multiple Platforms**: Dispatch `speccrew-task-worker` agents in parallel (via Agent tool)
|
|
167
167
|
|
|
168
168
|
### 3.2 Single Platform Execution
|
|
169
169
|
|
|
@@ -177,40 +177,23 @@ Invoke Skill directly with parameters:
|
|
|
177
177
|
|
|
178
178
|
### 3.3 Multi-Platform Parallel Execution
|
|
179
179
|
|
|
180
|
-
> **IMPORTANT**:
|
|
180
|
+
> **IMPORTANT**: Dispatch `speccrew-task-worker` agents (via Agent tool) for parallel test execution. Do NOT call test skills directly — each platform MUST run in an independent Worker Agent for progress visibility and error isolation.
|
|
181
181
|
|
|
182
182
|
> **DISPATCH-PROGRESS Strategy**: Append mode — each test phase appends its tasks to the existing DISPATCH-PROGRESS.json with a distinct `phase` field. Previous phase records are preserved for full traceability.
|
|
183
183
|
|
|
184
184
|
**Initialize Dispatch Progress File:**
|
|
185
185
|
|
|
186
|
-
Before dispatching, create
|
|
187
|
-
```
|
|
188
|
-
{
|
|
189
|
-
"stage": "05_system_test",
|
|
190
|
-
"phase": "test_case_design",
|
|
191
|
-
"total": {platform_count},
|
|
192
|
-
"completed": 0,
|
|
193
|
-
"failed": 0,
|
|
194
|
-
"pending": {platform_count},
|
|
195
|
-
"tasks": [
|
|
196
|
-
{
|
|
197
|
-
"id": "test-case-{platform_id}",
|
|
198
|
-
"platform": "{platform_id}",
|
|
199
|
-
"phase": "test_case_design",
|
|
200
|
-
"skill": "speccrew-test-case-design",
|
|
201
|
-
"status": "pending",
|
|
202
|
-
"started_at": null,
|
|
203
|
-
"completed_at": null,
|
|
204
|
-
"output": null,
|
|
205
|
-
"error": null
|
|
206
|
-
}
|
|
207
|
-
]
|
|
208
|
-
}
|
|
186
|
+
Before dispatching, create dispatch tracking:
|
|
187
|
+
```bash
|
|
188
|
+
node .speccrew/scripts/update-progress.js init --file speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/DISPATCH-PROGRESS.json --stage 05_system_test --tasks '[{"id":"test-case-{platform_id}","platform":"{platform_id}","phase":"test_case_design","skill":"speccrew-test-case-design","status":"pending"}]'
|
|
209
189
|
```
|
|
190
|
+
Or use `--tasks-file` to load from a JSON file.
|
|
191
|
+
|
|
192
|
+
> **Note**: For subsequent phases (test_code_gen, test_execution), append tasks to the same file by reading the existing file and adding new tasks with the appropriate `phase` field.
|
|
210
193
|
|
|
211
194
|
**Dispatch Workers:**
|
|
212
195
|
|
|
213
|
-
|
|
196
|
+
Dispatch `speccrew-task-worker` agents for `speccrew-test-case-design` for each platform in parallel:
|
|
214
197
|
- Each worker receives:
|
|
215
198
|
- `skill_name`: `speccrew-test-case-design`
|
|
216
199
|
- `context`:
|
|
@@ -227,10 +210,15 @@ Use the **Skill tool** to invoke `speccrew-test-case-design` for each platform i
|
|
|
227
210
|
|
|
228
211
|
**Update Progress on Completion:**
|
|
229
212
|
|
|
230
|
-
For each completed worker, parse Task Completion Report and update
|
|
231
|
-
- On SUCCESS:
|
|
232
|
-
|
|
233
|
-
-
|
|
213
|
+
For each completed worker, parse Task Completion Report and update:
|
|
214
|
+
- On SUCCESS:
|
|
215
|
+
```bash
|
|
216
|
+
node .speccrew/scripts/update-progress.js update-task --file speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/DISPATCH-PROGRESS.json --task-id test-case-{platform_id} --status completed --output "{output_path}"
|
|
217
|
+
```
|
|
218
|
+
- On FAILED:
|
|
219
|
+
```bash
|
|
220
|
+
node .speccrew/scripts/update-progress.js update-task --file speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/DISPATCH-PROGRESS.json --task-id test-case-{platform_id} --status failed --error "{error_message}"
|
|
221
|
+
```
|
|
234
222
|
|
|
235
223
|
### 3.4 Checkpoint A: Test Case Review
|
|
236
224
|
|
|
@@ -252,18 +240,8 @@ After test case design completes for all platforms:
|
|
|
252
240
|
|
|
253
241
|
**Write Checkpoint File:**
|
|
254
242
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
{
|
|
258
|
-
"stage": "05_system_test",
|
|
259
|
-
"checkpoints": {
|
|
260
|
-
"test_case_coverage": {
|
|
261
|
-
"passed": true,
|
|
262
|
-
"confirmed_at": "{ISO8601_timestamp}",
|
|
263
|
-
"description": "Test case coverage review (Checkpoint A)"
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}
|
|
243
|
+
```bash
|
|
244
|
+
node .speccrew/scripts/update-progress.js write-checkpoint --file speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/.checkpoints.json --stage 05_system_test --checkpoint test_case_coverage --passed true --description "Test case coverage review (Checkpoint A)"
|
|
267
245
|
```
|
|
268
246
|
|
|
269
247
|
**Output Path:**
|
|
@@ -294,34 +272,15 @@ Invoke Skill directly:
|
|
|
294
272
|
|
|
295
273
|
**Initialize Dispatch Progress File:**
|
|
296
274
|
|
|
297
|
-
|
|
298
|
-
```
|
|
299
|
-
{
|
|
300
|
-
"stage": "05_system_test",
|
|
301
|
-
"phase": "test_code_gen",
|
|
302
|
-
"total": {platform_count},
|
|
303
|
-
"completed": 0,
|
|
304
|
-
"failed": 0,
|
|
305
|
-
"pending": {platform_count},
|
|
306
|
-
"tasks": [
|
|
307
|
-
{
|
|
308
|
-
"id": "test-code-{platform_id}",
|
|
309
|
-
"platform": "{platform_id}",
|
|
310
|
-
"phase": "test_code_gen",
|
|
311
|
-
"skill": "speccrew-test-code-gen",
|
|
312
|
-
"status": "pending",
|
|
313
|
-
"started_at": null,
|
|
314
|
-
"completed_at": null,
|
|
315
|
-
"output": null,
|
|
316
|
-
"error": null
|
|
317
|
-
}
|
|
318
|
-
]
|
|
319
|
-
}
|
|
275
|
+
Append new tasks for test_code_gen phase by reading existing file and adding tasks:
|
|
276
|
+
```bash
|
|
277
|
+
node .speccrew/scripts/update-progress.js init --file speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/DISPATCH-PROGRESS-test-code-gen.json --stage 05_system_test --tasks '[{"id":"test-code-{platform_id}","platform":"{platform_id}","phase":"test_code_gen","skill":"speccrew-test-code-gen","status":"pending"}]'
|
|
320
278
|
```
|
|
279
|
+
> **Note**: In practice, maintain a single DISPATCH-PROGRESS.json with all phases by merging task arrays.
|
|
321
280
|
|
|
322
281
|
**Dispatch Workers:**
|
|
323
282
|
|
|
324
|
-
|
|
283
|
+
Dispatch `speccrew-task-worker` agents for `speccrew-test-code-gen` for each platform in parallel:
|
|
325
284
|
- `context`:
|
|
326
285
|
- `test_cases_path`: Path to the platform-specific test cases document
|
|
327
286
|
- `system_design_path`: Path to the platform system design document
|
|
@@ -331,10 +290,15 @@ Use the **Skill tool** to invoke `speccrew-test-code-gen` for each platform in p
|
|
|
331
290
|
|
|
332
291
|
**Update Progress on Completion:**
|
|
333
292
|
|
|
334
|
-
For each completed worker, parse Task Completion Report
|
|
335
|
-
- On SUCCESS:
|
|
336
|
-
|
|
337
|
-
-
|
|
293
|
+
For each completed worker, parse Task Completion Report:
|
|
294
|
+
- On SUCCESS:
|
|
295
|
+
```bash
|
|
296
|
+
node .speccrew/scripts/update-progress.js update-task --file speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/DISPATCH-PROGRESS.json --task-id test-code-{platform_id} --status completed --output "{output_path}"
|
|
297
|
+
```
|
|
298
|
+
- On FAILED:
|
|
299
|
+
```bash
|
|
300
|
+
node .speccrew/scripts/update-progress.js update-task --file speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/DISPATCH-PROGRESS.json --task-id test-code-{platform_id} --status failed --error "{error_message}"
|
|
301
|
+
```
|
|
338
302
|
|
|
339
303
|
### 4.4 Checkpoint B: Code Review
|
|
340
304
|
|
|
@@ -356,23 +320,8 @@ After test code generation completes for all platforms:
|
|
|
356
320
|
|
|
357
321
|
**Update Checkpoint File:**
|
|
358
322
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
{
|
|
362
|
-
"stage": "05_system_test",
|
|
363
|
-
"checkpoints": {
|
|
364
|
-
"test_case_coverage": {
|
|
365
|
-
"passed": true,
|
|
366
|
-
"confirmed_at": "{timestamp}",
|
|
367
|
-
"description": "Test case coverage review (Checkpoint A)"
|
|
368
|
-
},
|
|
369
|
-
"test_code_review": {
|
|
370
|
-
"passed": true,
|
|
371
|
-
"confirmed_at": "{ISO8601_timestamp}",
|
|
372
|
-
"description": "Test code generation review (Checkpoint B)"
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
}
|
|
323
|
+
```bash
|
|
324
|
+
node .speccrew/scripts/update-progress.js write-checkpoint --file speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/.checkpoints.json --stage 05_system_test --checkpoint test_code_review --passed true --description "Test code generation review (Checkpoint B)"
|
|
376
325
|
```
|
|
377
326
|
|
|
378
327
|
**Output:**
|
|
@@ -403,34 +352,15 @@ Invoke Skill directly:
|
|
|
403
352
|
|
|
404
353
|
**Initialize Dispatch Progress File:**
|
|
405
354
|
|
|
406
|
-
|
|
407
|
-
```
|
|
408
|
-
{
|
|
409
|
-
"stage": "05_system_test",
|
|
410
|
-
"phase": "test_execution",
|
|
411
|
-
"total": {platform_count},
|
|
412
|
-
"completed": 0,
|
|
413
|
-
"failed": 0,
|
|
414
|
-
"pending": {platform_count},
|
|
415
|
-
"tasks": [
|
|
416
|
-
{
|
|
417
|
-
"id": "test-exec-{platform_id}",
|
|
418
|
-
"platform": "{platform_id}",
|
|
419
|
-
"phase": "test_execution",
|
|
420
|
-
"skill": "speccrew-test-execute",
|
|
421
|
-
"status": "pending",
|
|
422
|
-
"started_at": null,
|
|
423
|
-
"completed_at": null,
|
|
424
|
-
"output": null,
|
|
425
|
-
"error": null
|
|
426
|
-
}
|
|
427
|
-
]
|
|
428
|
-
}
|
|
355
|
+
Append new tasks for test_execution phase:
|
|
356
|
+
```bash
|
|
357
|
+
node .speccrew/scripts/update-progress.js init --file speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/DISPATCH-PROGRESS-test-exec.json --stage 05_system_test --tasks '[{"id":"test-exec-{platform_id}","platform":"{platform_id}","phase":"test_execution","skill":"speccrew-test-execute","status":"pending"}]'
|
|
429
358
|
```
|
|
359
|
+
> **Note**: In practice, maintain a single DISPATCH-PROGRESS.json with all phases by merging task arrays.
|
|
430
360
|
|
|
431
361
|
**Dispatch Workers:**
|
|
432
362
|
|
|
433
|
-
|
|
363
|
+
Dispatch `speccrew-task-worker` agents for `speccrew-test-execute` for each platform in parallel:
|
|
434
364
|
- `context`:
|
|
435
365
|
- `test_code_path`: Path to the platform test code directory
|
|
436
366
|
- `platform_id`: Platform identifier
|
|
@@ -439,10 +369,15 @@ Use the **Skill tool** to invoke `speccrew-test-execute` for each platform in pa
|
|
|
439
369
|
|
|
440
370
|
**Update Progress on Completion:**
|
|
441
371
|
|
|
442
|
-
For each completed worker, parse Task Completion Report
|
|
443
|
-
- On SUCCESS:
|
|
444
|
-
|
|
445
|
-
-
|
|
372
|
+
For each completed worker, parse Task Completion Report:
|
|
373
|
+
- On SUCCESS:
|
|
374
|
+
```bash
|
|
375
|
+
node .speccrew/scripts/update-progress.js update-task --file speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/DISPATCH-PROGRESS.json --task-id test-exec-{platform_id} --status completed --output "{output_path}"
|
|
376
|
+
```
|
|
377
|
+
- On FAILED:
|
|
378
|
+
```bash
|
|
379
|
+
node .speccrew/scripts/update-progress.js update-task --file speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/DISPATCH-PROGRESS.json --task-id test-exec-{platform_id} --status failed --error "{error_message}"
|
|
380
|
+
```
|
|
446
381
|
|
|
447
382
|
### 5.4 Deviation Detection
|
|
448
383
|
|
|
@@ -505,52 +440,14 @@ Provide clear recommendation:
|
|
|
505
440
|
|
|
506
441
|
**Update Checkpoint File:**
|
|
507
442
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
{
|
|
511
|
-
"stage": "05_system_test",
|
|
512
|
-
"checkpoints": {
|
|
513
|
-
"test_case_coverage": {
|
|
514
|
-
"passed": true,
|
|
515
|
-
"confirmed_at": "{timestamp}",
|
|
516
|
-
"description": "Test case coverage review (Checkpoint A)"
|
|
517
|
-
},
|
|
518
|
-
"test_code_review": {
|
|
519
|
-
"passed": true,
|
|
520
|
-
"confirmed_at": "{timestamp}",
|
|
521
|
-
"description": "Test code generation review (Checkpoint B)"
|
|
522
|
-
},
|
|
523
|
-
"test_execution_report": {
|
|
524
|
-
"passed": true,
|
|
525
|
-
"confirmed_at": "{ISO8601_timestamp}",
|
|
526
|
-
"description": "Test execution final report"
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
}
|
|
443
|
+
```bash
|
|
444
|
+
node .speccrew/scripts/update-progress.js write-checkpoint --file speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/.checkpoints.json --stage 05_system_test --checkpoint test_execution_report --passed true --description "Test execution final report"
|
|
530
445
|
```
|
|
531
446
|
|
|
532
447
|
**Update Workflow Progress:**
|
|
533
448
|
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
{
|
|
537
|
-
"iteration": "{iteration_name}",
|
|
538
|
-
"current_stage": "05_system_test",
|
|
539
|
-
"stages": {
|
|
540
|
-
"05_system_test": {
|
|
541
|
-
"status": "confirmed",
|
|
542
|
-
"started_at": "{timestamp}",
|
|
543
|
-
"completed_at": "{timestamp}",
|
|
544
|
-
"confirmed_at": "{ISO8601_timestamp}",
|
|
545
|
-
"outputs": [
|
|
546
|
-
"05.system-test/cases/",
|
|
547
|
-
"05.system-test/code/",
|
|
548
|
-
"05.system-test/reports/",
|
|
549
|
-
"05.system-test/bugs/"
|
|
550
|
-
]
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
}
|
|
449
|
+
```bash
|
|
450
|
+
node .speccrew/scripts/update-progress.js update-workflow --file speccrew-workspace/WORKFLOW-PROGRESS.json --stage 05_system_test --status confirmed --output "05.system-test/cases/,05.system-test/code/,05.system-test/reports/,05.system-test/bugs/"
|
|
554
451
|
```
|
|
555
452
|
|
|
556
453
|
> **Note**: `current_stage` does not advance — 05_system_test is the final stage of the pipeline.
|
|
@@ -575,7 +472,7 @@ Update `WORKFLOW-PROGRESS.json`:
|
|
|
575
472
|
**Must do:**
|
|
576
473
|
- Execute three phases in strict order: test case design → code generation → test execution
|
|
577
474
|
- Each phase must have a Checkpoint with user confirmation before proceeding
|
|
578
|
-
- Multi-platform scenarios must
|
|
475
|
+
- Multi-platform scenarios must dispatch `speccrew-task-worker` agents (via Agent tool) for parallel execution per platform
|
|
579
476
|
- Test cases must be traceable to Feature Spec requirements
|
|
580
477
|
- Bug reports must reference specific test case IDs
|
|
581
478
|
- Use platform_id from design overview as directory names
|