speccrew 0.6.6 → 0.6.9
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 +25 -20
- package/.speccrew/agents/speccrew-product-manager.md +143 -48
- package/.speccrew/agents/speccrew-system-designer.md +33 -28
- package/.speccrew/agents/speccrew-system-developer.md +34 -29
- package/.speccrew/agents/speccrew-task-worker.md +6 -0
- package/.speccrew/agents/speccrew-test-manager.md +47 -42
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +104 -69
- package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +10 -4
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +33 -24
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +23 -6
- package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +8 -4
- package/package.json +1 -1
- package/workspace-template/scripts/path-utils.js +134 -0
|
@@ -180,11 +180,16 @@ This agent MUST execute tasks continuously without unnecessary interruptions.
|
|
|
180
180
|
|
|
181
181
|
## Phase 0: Workflow Progress Management
|
|
182
182
|
|
|
183
|
+
> **Path Variables** (provided by caller as absolute paths):
|
|
184
|
+
> - `workspace_path`: Absolute path to speccrew-workspace directory
|
|
185
|
+
> - `update_progress_script`: `{workspace_path}/scripts/update-progress.js`
|
|
186
|
+
> - `iterations_dir`: `{workspace_path}/iterations`
|
|
187
|
+
|
|
183
188
|
### Step 0.1: Stage Gate — Verify Upstream Completion
|
|
184
189
|
|
|
185
190
|
**Read `WORKFLOW-PROGRESS.json` overview**:
|
|
186
191
|
```bash
|
|
187
|
-
node
|
|
192
|
+
node {update_progress_script} read --file {workspace_path}/WORKFLOW-PROGRESS.json --overview
|
|
188
193
|
```
|
|
189
194
|
|
|
190
195
|
**Validation Rules:**
|
|
@@ -193,14 +198,14 @@ node speccrew-workspace/scripts/update-progress.js read --file speccrew-workspac
|
|
|
193
198
|
|
|
194
199
|
**Update Current Stage**:
|
|
195
200
|
```bash
|
|
196
|
-
node
|
|
201
|
+
node {update_progress_script} update-workflow --file {workspace_path}/WORKFLOW-PROGRESS.json --stage 06_system_test --status in_progress
|
|
197
202
|
```
|
|
198
203
|
|
|
199
204
|
### Step 0.2: Check Resume State (断点续传)
|
|
200
205
|
|
|
201
206
|
**Read Checkpoints** (if file exists):
|
|
202
207
|
```bash
|
|
203
|
-
node
|
|
208
|
+
node {update_progress_script} read --file {iterations_dir}/{number}-{type}-{name}/06.system-test/.checkpoints.json --checkpoints
|
|
204
209
|
```
|
|
205
210
|
|
|
206
211
|
**Resume Decision Matrix:**
|
|
@@ -221,7 +226,7 @@ node speccrew-workspace/scripts/update-progress.js read --file speccrew-workspac
|
|
|
221
226
|
|
|
222
227
|
**Read Dispatch Progress Summary** (if file exists):
|
|
223
228
|
```bash
|
|
224
|
-
node
|
|
229
|
+
node {update_progress_script} read --file {iterations_dir}/{number}-{type}-{name}/06.system-test/DISPATCH-PROGRESS.json --summary
|
|
225
230
|
```
|
|
226
231
|
|
|
227
232
|
**Parse Task Status by Phase:**
|
|
@@ -307,7 +312,7 @@ When user requests to start testing:
|
|
|
307
312
|
### 1.1 Identify Iteration Path
|
|
308
313
|
|
|
309
314
|
User must specify one of the following:
|
|
310
|
-
- Iteration path: `
|
|
315
|
+
- Iteration path: `{iterations_dir}/{number}-{type}-{name}/`
|
|
311
316
|
- Feature name (will search for matching iteration)
|
|
312
317
|
|
|
313
318
|
### 1.2 Identify Input Documents
|
|
@@ -315,17 +320,17 @@ User must specify one of the following:
|
|
|
315
320
|
Locate all required input documents:
|
|
316
321
|
|
|
317
322
|
**Feature Design Documents:**
|
|
318
|
-
- Path pattern: `
|
|
323
|
+
- Path pattern: `{iterations_dir}/{number}-{type}-{name}/02.feature-design/`
|
|
319
324
|
- Look for: `[feature-name]-feature-spec.md`, `[feature-name]-api-contract.md`
|
|
320
325
|
|
|
321
326
|
**System Design Documents:**
|
|
322
|
-
- Path pattern: `
|
|
327
|
+
- Path pattern: `{iterations_dir}/{number}-{type}-{name}/03.system-design/`
|
|
323
328
|
- Look for: `DESIGN-OVERVIEW.md`, `{platform_id}/INDEX.md`
|
|
324
329
|
|
|
325
330
|
### 1.3 Check Existing Test Artifacts
|
|
326
331
|
|
|
327
332
|
Check if test artifacts already exist:
|
|
328
|
-
- Check path: `
|
|
333
|
+
- Check path: `{iterations_dir}/{number}-{type}-{name}/06.system-test/`
|
|
329
334
|
- Look for existing: `cases/`, `code/`, `reports/`, `bugs/` directories
|
|
330
335
|
|
|
331
336
|
### 1.4 User Confirmation
|
|
@@ -356,12 +361,12 @@ After user confirmation, load knowledge in the following order:
|
|
|
356
361
|
### Read on Demand
|
|
357
362
|
|
|
358
363
|
**Testing Conventions:**
|
|
359
|
-
- For each platform_id: `
|
|
364
|
+
- For each platform_id: `{workspace_path}/knowledges/techs/{platform_id}/conventions-system-test.md`
|
|
360
365
|
- Contains: E2E, integration, API contract testing conventions, test framework, test file organization, naming conventions
|
|
361
|
-
- Fallback: `
|
|
366
|
+
- Fallback: `{workspace_path}/knowledges/techs/{platform_id}/conventions-unit-test.md` (for unit testing conventions)
|
|
362
367
|
|
|
363
368
|
**Business Context:**
|
|
364
|
-
- `
|
|
369
|
+
- `{workspace_path}/knowledges/bizs/system-overview.md`
|
|
365
370
|
- For understanding business domain context when designing test cases
|
|
366
371
|
|
|
367
372
|
### Do Not Load
|
|
@@ -474,15 +479,15 @@ Before dispatching, create dispatch tracking:
|
|
|
474
479
|
```bash
|
|
475
480
|
# Write tasks to temp file, then use --tasks-file
|
|
476
481
|
# Create .tasks-temp.json with task array content inside iteration directory
|
|
477
|
-
echo '[{"id":"test-case-{platform_id}","platform":"{platform_id}","phase":"test_case_design","skill":"speccrew-test-case-design","status":"pending"}]' >
|
|
482
|
+
echo '[{"id":"test-case-{platform_id}","platform":"{platform_id}","phase":"test_case_design","skill":"speccrew-test-case-design","status":"pending"}]' > {iterations_dir}/{number}-{type}-{name}/06.system-test/.tasks-temp.json
|
|
478
483
|
|
|
479
|
-
node
|
|
480
|
-
--file
|
|
484
|
+
node {update_progress_script} init \
|
|
485
|
+
--file {iterations_dir}/{number}-{type}-{name}/06.system-test/DISPATCH-PROGRESS.json \
|
|
481
486
|
--stage 06_system_test \
|
|
482
|
-
--tasks-file
|
|
487
|
+
--tasks-file {iterations_dir}/{number}-{type}-{name}/06.system-test/.tasks-temp.json
|
|
483
488
|
|
|
484
489
|
# Delete .tasks-temp.json after successful init
|
|
485
|
-
rm
|
|
490
|
+
rm {iterations_dir}/{number}-{type}-{name}/06.system-test/.tasks-temp.json
|
|
486
491
|
```
|
|
487
492
|
|
|
488
493
|
> **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.
|
|
@@ -509,11 +514,11 @@ Dispatch `speccrew-task-worker` agents for `speccrew-test-case-design` for each
|
|
|
509
514
|
For each completed worker, parse Task Completion Report and update:
|
|
510
515
|
- On SUCCESS:
|
|
511
516
|
```bash
|
|
512
|
-
node
|
|
517
|
+
node {update_progress_script} update-task --file {iterations_dir}/{number}-{type}-{name}/06.system-test/DISPATCH-PROGRESS.json --task-id test-case-{platform_id} --status completed --output "{output_path}"
|
|
513
518
|
```
|
|
514
519
|
- On FAILED:
|
|
515
520
|
```bash
|
|
516
|
-
node
|
|
521
|
+
node {update_progress_script} update-task --file {iterations_dir}/{number}-{type}-{name}/06.system-test/DISPATCH-PROGRESS.json --task-id test-case-{platform_id} --status failed --error "{error_message}"
|
|
517
522
|
```
|
|
518
523
|
|
|
519
524
|
### 3.4 Re-dispatch Failed Tasks
|
|
@@ -522,7 +527,7 @@ After all initial workers complete:
|
|
|
522
527
|
|
|
523
528
|
1. **Query failed tasks:**
|
|
524
529
|
```bash
|
|
525
|
-
node
|
|
530
|
+
node {update_progress_script} read --file {iterations_dir}/{number}-{type}-{name}/06.system-test/DISPATCH-PROGRESS.json --status failed
|
|
526
531
|
```
|
|
527
532
|
|
|
528
533
|
2. **For each failed task (max 2 re-dispatches, total 3 attempts):**
|
|
@@ -531,7 +536,7 @@ After all initial workers complete:
|
|
|
531
536
|
|
|
532
537
|
3. **After max attempts, mark permanently failed:**
|
|
533
538
|
```bash
|
|
534
|
-
node
|
|
539
|
+
node {update_progress_script} update-task --file {iterations_dir}/{number}-{type}-{name}/06.system-test/DISPATCH-PROGRESS.json --task-id {task_id} --status failed --error "Max re-dispatch attempts (3) exceeded"
|
|
535
540
|
```
|
|
536
541
|
|
|
537
542
|
### 3.5 Checkpoint A: Test Case Review
|
|
@@ -555,11 +560,11 @@ After test case design completes for all platforms:
|
|
|
555
560
|
**Write Checkpoint File:**
|
|
556
561
|
|
|
557
562
|
```bash
|
|
558
|
-
node
|
|
563
|
+
node {update_progress_script} write-checkpoint --file {iterations_dir}/{number}-{type}-{name}/06.system-test/.checkpoints.json --stage 06_system_test --checkpoint test_case_coverage --passed true --description "Test case coverage review (Checkpoint A)"
|
|
559
564
|
```
|
|
560
565
|
|
|
561
566
|
**Output Path:**
|
|
562
|
-
- `
|
|
567
|
+
- `{iterations_dir}/{number}-{type}-{name}/06.system-test/cases/{platform_id}/[feature]-test-cases.md`
|
|
563
568
|
|
|
564
569
|
## Phase 4: Test Code Generation
|
|
565
570
|
|
|
@@ -599,15 +604,15 @@ Append new tasks for test_code_gen phase by reading existing file and adding tas
|
|
|
599
604
|
```bash
|
|
600
605
|
# Write tasks to temp file, then use --tasks-file
|
|
601
606
|
# Create .tasks-temp.json with task array content inside iteration directory
|
|
602
|
-
echo '[{"id":"test-code-{platform_id}","platform":"{platform_id}","phase":"test_code_gen","skill":"speccrew-test-code-gen","status":"pending"}]' >
|
|
607
|
+
echo '[{"id":"test-code-{platform_id}","platform":"{platform_id}","phase":"test_code_gen","skill":"speccrew-test-code-gen","status":"pending"}]' > {iterations_dir}/{number}-{type}-{name}/06.system-test/.tasks-temp.json
|
|
603
608
|
|
|
604
|
-
node
|
|
605
|
-
--file
|
|
609
|
+
node {update_progress_script} init \
|
|
610
|
+
--file {iterations_dir}/{number}-{type}-{name}/06.system-test/DISPATCH-PROGRESS-test-code-gen.json \
|
|
606
611
|
--stage 06_system_test \
|
|
607
|
-
--tasks-file
|
|
612
|
+
--tasks-file {iterations_dir}/{number}-{type}-{name}/06.system-test/.tasks-temp.json
|
|
608
613
|
|
|
609
614
|
# Delete .tasks-temp.json after successful init
|
|
610
|
-
rm
|
|
615
|
+
rm {iterations_dir}/{number}-{type}-{name}/06.system-test/.tasks-temp.json
|
|
611
616
|
```
|
|
612
617
|
> **Note**: In practice, maintain a single DISPATCH-PROGRESS.json with all phases by merging task arrays.
|
|
613
618
|
|
|
@@ -627,11 +632,11 @@ Dispatch `speccrew-task-worker` agents for `speccrew-test-code-gen` for each pla
|
|
|
627
632
|
For each completed worker, parse Task Completion Report:
|
|
628
633
|
- On SUCCESS:
|
|
629
634
|
```bash
|
|
630
|
-
node
|
|
635
|
+
node {update_progress_script} update-task --file {iterations_dir}/{number}-{type}-{name}/06.system-test/DISPATCH-PROGRESS.json --task-id test-code-{platform_id} --status completed --output "{output_path}"
|
|
631
636
|
```
|
|
632
637
|
- On FAILED:
|
|
633
638
|
```bash
|
|
634
|
-
node
|
|
639
|
+
node {update_progress_script} update-task --file {iterations_dir}/{number}-{type}-{name}/06.system-test/DISPATCH-PROGRESS.json --task-id test-code-{platform_id} --status failed --error "{error_message}"
|
|
635
640
|
```
|
|
636
641
|
|
|
637
642
|
### 4.4 Review Verification (MANDATORY)
|
|
@@ -696,12 +701,12 @@ After test code generation completes for all platforms:
|
|
|
696
701
|
**Update Checkpoint File:**
|
|
697
702
|
|
|
698
703
|
```bash
|
|
699
|
-
node
|
|
704
|
+
node {update_progress_script} write-checkpoint --file {iterations_dir}/{number}-{type}-{name}/06.system-test/.checkpoints.json --stage 06_system_test --checkpoint test_code_review --passed true --description "Test code generation review (Checkpoint B)"
|
|
700
705
|
```
|
|
701
706
|
|
|
702
707
|
**Output:**
|
|
703
708
|
- Test code: Written to project source test directories
|
|
704
|
-
- Test code plan: `
|
|
709
|
+
- Test code plan: `{iterations_dir}/{number}-{type}-{name}/06.system-test/code/{platform_id}/[feature]-test-code-plan.md`
|
|
705
710
|
|
|
706
711
|
## Phase 5: Test Execution & Bug Reporting
|
|
707
712
|
|
|
@@ -739,11 +744,11 @@ Execute tests and generate reports:
|
|
|
739
744
|
For each completed worker, parse Task Completion Report:
|
|
740
745
|
- On SUCCESS:
|
|
741
746
|
```bash
|
|
742
|
-
node
|
|
747
|
+
node {update_progress_script} update-task --file {iterations_dir}/{number}-{type}-{name}/06.system-test/DISPATCH-PROGRESS.json --task-id test-run-{platform_id} --status completed --output "{output_path}"
|
|
743
748
|
```
|
|
744
749
|
- On FAILED:
|
|
745
750
|
```bash
|
|
746
|
-
node
|
|
751
|
+
node {update_progress_script} update-task --file {iterations_dir}/{number}-{type}-{name}/06.system-test/DISPATCH-PROGRESS.json --task-id test-run-{platform_id} --status failed --error "{error_message}"
|
|
747
752
|
```
|
|
748
753
|
|
|
749
754
|
### 5.3 Stage 2: Test Reporter Dispatch
|
|
@@ -786,8 +791,8 @@ For each deviation identified:
|
|
|
786
791
|
- Link to related feature requirement
|
|
787
792
|
|
|
788
793
|
**Output Paths:**
|
|
789
|
-
- Test Report: `
|
|
790
|
-
- Bug Reports: `
|
|
794
|
+
- Test Report: `{iterations_dir}/{number}-{type}-{name}/06.system-test/reports/[feature]-test-report.md`
|
|
795
|
+
- Bug Reports: `{iterations_dir}/{number}-{type}-{name}/06.system-test/bugs/[feature]-bug-{序号}.md`
|
|
791
796
|
|
|
792
797
|
## Phase 6: Delivery Summary
|
|
793
798
|
|
|
@@ -868,13 +873,13 @@ Test Report: {path}/test-summary-report.md
|
|
|
868
873
|
**Update Checkpoint File:**
|
|
869
874
|
|
|
870
875
|
```bash
|
|
871
|
-
node
|
|
876
|
+
node {update_progress_script} write-checkpoint --file {iterations_dir}/{number}-{type}-{name}/06.system-test/.checkpoints.json --stage 06_system_test --checkpoint test_execution_report --passed true --description "Test execution final report"
|
|
872
877
|
```
|
|
873
878
|
|
|
874
879
|
**Update Workflow Progress:**
|
|
875
880
|
|
|
876
881
|
```bash
|
|
877
|
-
node
|
|
882
|
+
node {update_progress_script} update-workflow --file {workspace_path}/WORKFLOW-PROGRESS.json --stage 06_system_test --status confirmed --output "06.system-test/cases/,06.system-test/code/,06.system-test/reports/,06.system-test/bugs/"
|
|
878
883
|
```
|
|
879
884
|
|
|
880
885
|
> **Note**: `current_stage` does not advance — 06_system_test is the final stage of the pipeline.
|
|
@@ -883,11 +888,11 @@ node speccrew-workspace/scripts/update-progress.js update-workflow --file speccr
|
|
|
883
888
|
|
|
884
889
|
| Deliverable | Path | Notes |
|
|
885
890
|
|-------------|------|-------|
|
|
886
|
-
| Test Case Documents | `
|
|
887
|
-
| Test Code Plan | `
|
|
888
|
-
| Test Execution Results | `
|
|
889
|
-
| Test Report | `
|
|
890
|
-
| Bug Reports | `
|
|
891
|
+
| Test Case Documents | `{iterations_dir}/{number}-{type}-{name}/06.system-test/cases/{platform_id}/[feature]-test-cases.md` | Based on template from `speccrew-test-case-design/templates/TEST-CASE-DESIGN-TEMPLATE.md` |
|
|
892
|
+
| Test Code Plan | `{iterations_dir}/{number}-{type}-{name}/06.system-test/code/{platform_id}/[feature]-test-code-plan.md` | Based on template from `speccrew-test-code-gen/templates/TEST-CODE-PLAN-TEMPLATE.md` |
|
|
893
|
+
| Test Execution Results | `{iterations_dir}/{number}-{type}-{name}/06.system-test/results/{platform_id}/[feature]-test-execution-results.md` | Based on template from `speccrew-test-runner/templates/TEST-EXECUTION-RESULT-TEMPLATE.md` |
|
|
894
|
+
| Test Report | `{iterations_dir}/{number}-{type}-{name}/06.system-test/reports/[feature]-test-report.md` | Based on template from `speccrew-test-reporter/templates/TEST-REPORT-TEMPLATE.md` |
|
|
895
|
+
| Bug Reports | `{iterations_dir}/{number}-{type}-{name}/06.system-test/bugs/[feature]-bug-{序号}.md` | Based on template from `speccrew-test-reporter/templates/BUG-REPORT-TEMPLATE.md` |
|
|
891
896
|
|
|
892
897
|
# Pipeline Position
|
|
893
898
|
|