speccrew 0.4.0 → 0.4.2
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.
|
@@ -503,6 +503,27 @@ Step 3b: Invoke speccrew-pm-requirement-analysis
|
|
|
503
503
|
|
|
504
504
|
After the Skill generates the Master PRD and outputs the dispatch plan, the PM Agent takes over to generate Sub-PRDs in parallel using worker agents.
|
|
505
505
|
|
|
506
|
+
> **Phase 4 Execution Flow:**
|
|
507
|
+
> ```
|
|
508
|
+
> Generate Skill outputs Dispatch Plan
|
|
509
|
+
> ↓
|
|
510
|
+
> PM reads Dispatch Plan (module list + contexts)
|
|
511
|
+
> ↓
|
|
512
|
+
> PM initializes DISPATCH-PROGRESS.json (via script)
|
|
513
|
+
> ↓
|
|
514
|
+
> PM invokes speccrew-task-worker × N (one per module)
|
|
515
|
+
> └─ Each worker internally calls speccrew-pm-sub-prd-generate
|
|
516
|
+
> ↓
|
|
517
|
+
> Workers complete → PM updates progress (via script)
|
|
518
|
+
> ↓
|
|
519
|
+
> ALL workers done → Phase 5
|
|
520
|
+
> ```
|
|
521
|
+
>
|
|
522
|
+
> **NOT this flow:**
|
|
523
|
+
> ```
|
|
524
|
+
> PM reads Dispatch Plan → PM generates Sub-PRDs directly ← VIOLATION
|
|
525
|
+
> ```
|
|
526
|
+
|
|
506
527
|
### 4.1 Read Dispatch Plan
|
|
507
528
|
|
|
508
529
|
From the Skill's Step 12c output, collect:
|
|
@@ -531,8 +552,11 @@ node speccrew-workspace/scripts/update-progress.js init \
|
|
|
531
552
|
> 2. Read file content in the command: `node scripts/update-progress.js init --stage sub_prd_dispatch --tasks (Get-Content tasks-temp.json -Raw)`
|
|
532
553
|
> 3. Or use: `Get-Content tasks-temp.json | node scripts/update-progress.js init --stage sub_prd_dispatch --tasks -`
|
|
533
554
|
|
|
534
|
-
>
|
|
535
|
-
>
|
|
555
|
+
> 🛑 **HARD STOP: DISPATCH-PROGRESS.json MUST be created by script ONLY**
|
|
556
|
+
> - MUST use: `node speccrew-workspace/scripts/update-progress.js init --stage sub_prd_dispatch --tasks '<JSON_ARRAY>'`
|
|
557
|
+
> - DO NOT create DISPATCH-PROGRESS.json manually (PowerShell, create_file, or any other method)
|
|
558
|
+
> - IF script fails → STOP workflow immediately, report error to user, ask "Retry or Abort?"
|
|
559
|
+
> - DO NOT proceed to Worker dispatch without successful script execution
|
|
536
560
|
|
|
537
561
|
After each worker completes:
|
|
538
562
|
```bash
|
|
@@ -550,13 +574,22 @@ node speccrew-workspace/scripts/update-progress.js update-task \
|
|
|
550
574
|
|
|
551
575
|
### 4.3 Dispatch Workers
|
|
552
576
|
|
|
553
|
-
**PM Agent Role: ORCHESTRATOR ONLY**
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
1.
|
|
557
|
-
2.
|
|
558
|
-
3.
|
|
559
|
-
4.
|
|
577
|
+
**PM Agent Role: ORCHESTRATOR ONLY — Phase 4 EXPLICIT RULES**
|
|
578
|
+
|
|
579
|
+
**MANDATORY — PM MUST:**
|
|
580
|
+
1. Read the Dispatch Plan from generate skill output
|
|
581
|
+
2. Initialize DISPATCH-PROGRESS.json via update-progress.js script
|
|
582
|
+
3. For EACH module in dispatch plan: invoke `speccrew-task-worker` with `skill_path: speccrew-pm-sub-prd-generate/SKILL.md`
|
|
583
|
+
4. Pass ALL required context parameters to each worker
|
|
584
|
+
5. Wait for ALL workers to complete
|
|
585
|
+
6. Update DISPATCH-PROGRESS.json via script after each worker completes
|
|
586
|
+
|
|
587
|
+
🛑 **FORBIDDEN — PM MUST NOT:**
|
|
588
|
+
- Generate Sub-PRD files directly (via create_file, write, or any file creation)
|
|
589
|
+
- Invoke speccrew-pm-sub-prd-generate skill directly (ONLY speccrew-task-worker invokes it)
|
|
590
|
+
- Create or edit any Sub-PRD content as fallback if worker fails
|
|
591
|
+
- Skip worker dispatch and generate Sub-PRDs inline
|
|
592
|
+
- IF PM attempts ANY of above → WORKFLOW VIOLATION → STOP immediately
|
|
560
593
|
|
|
561
594
|
**Implementation:**
|
|
562
595
|
|
|
@@ -63,7 +63,15 @@ Applies ISA-95 Stages 2-3 outputs for PRD generation:
|
|
|
63
63
|
|
|
64
64
|
**Actions:**
|
|
65
65
|
1. Read `.clarification-summary.md` — extract: key decisions, clarified scope, business rules
|
|
66
|
-
2. Read `.module-design.md` — extract:
|
|
66
|
+
2. Read `.module-design.md` — extract:
|
|
67
|
+
- **Module count**: from `## Module List (Total: N modules)` heading (parse the number N)
|
|
68
|
+
- **Module list**: rows from Module List table
|
|
69
|
+
- **Dependency matrix**: rows from Dependency Matrix table
|
|
70
|
+
- **Implementation phases**: items from Implementation Phases section
|
|
71
|
+
|
|
72
|
+
**Validation:**
|
|
73
|
+
- IF module_count >= 2 → MANDATORY: Use Master-Sub Structure
|
|
74
|
+
- IF module_count < 2 → Use Single PRD Structure
|
|
67
75
|
|
|
68
76
|
## Step 2: Read PRD Template
|
|
69
77
|
|
|
@@ -304,6 +312,18 @@ ELSE:
|
|
|
304
312
|
→ After ALL workers complete → PM Agent executes Phase 5 Verification
|
|
305
313
|
```
|
|
306
314
|
|
|
315
|
+
🛑 **CRITICAL HANDOFF — PM Agent MUST NOT:**
|
|
316
|
+
- Generate Sub-PRD files directly
|
|
317
|
+
- Invoke speccrew-pm-sub-prd-generate as its own operation
|
|
318
|
+
- Create Sub-PRD content using create_file or any file write
|
|
319
|
+
- Skip speccrew-task-worker and directly produce Sub-PRD documents
|
|
320
|
+
|
|
321
|
+
**PM Agent MUST:**
|
|
322
|
+
1. Use Dispatch Plan above to invoke speccrew-task-worker for EACH module
|
|
323
|
+
2. Each worker uses skill_path: speccrew-pm-sub-prd-generate/SKILL.md
|
|
324
|
+
3. Initialize DISPATCH-PROGRESS.json via update-progress.js script (NOT manually)
|
|
325
|
+
4. After ALL workers complete → Execute Phase 5 Verification
|
|
326
|
+
|
|
307
327
|
**IF Single PRD Structure:** Skip dispatch plan (no Sub-PRDs needed).
|
|
308
328
|
|
|
309
329
|
---
|
|
@@ -80,7 +80,10 @@ Applies ISA-95 Stages 1-3 as structured analysis framework:
|
|
|
80
80
|
### Domain Description
|
|
81
81
|
- **System Boundary**: [what's included/excluded]
|
|
82
82
|
- **Actors**: [user roles, external systems]
|
|
83
|
-
- **Domain Glossary**:
|
|
83
|
+
- **Domain Glossary**:
|
|
84
|
+
| Term | Definition |
|
|
85
|
+
|------|-----------|
|
|
86
|
+
| [term] | [definition] |
|
|
84
87
|
```
|
|
85
88
|
|
|
86
89
|
**Checkpoint A:** Present to user for confirmation.
|
|
@@ -164,12 +167,14 @@ Ready to proceed with module decomposition? Reply "确认".
|
|
|
164
167
|
|
|
165
168
|
**Output format:**
|
|
166
169
|
```markdown
|
|
167
|
-
## Module List
|
|
170
|
+
## Module List (Total: {N} modules)
|
|
168
171
|
| Module | Key | Scope | Key Entities | Owner Domain |
|
|
169
172
|
|--------|-----|-------|-------------|--------------|
|
|
170
173
|
| [Name] | [key] | [scope] | [entities] | [domain] |
|
|
171
174
|
```
|
|
172
175
|
|
|
176
|
+
> ⚠️ **MANDATORY:** Replace `{N}` with the actual module count. This count is used by downstream skills for structure validation.
|
|
177
|
+
|
|
173
178
|
### 3.2 Cross-Module Dependency Matrix
|
|
174
179
|
|
|
175
180
|
**Actions:**
|
|
@@ -226,7 +231,10 @@ Please review. Reply "确认" to finalize or request changes.
|
|
|
226
231
|
### Domain Description
|
|
227
232
|
- **System Boundary**: [description]
|
|
228
233
|
- **Actors**: [list]
|
|
229
|
-
- **Domain Glossary**:
|
|
234
|
+
- **Domain Glossary**:
|
|
235
|
+
| Term | Definition |
|
|
236
|
+
|------|-----------|
|
|
237
|
+
| [term] | [definition] |
|
|
230
238
|
|
|
231
239
|
### Domain Functions (WBS)
|
|
232
240
|
[WBS structure]
|
|
@@ -238,7 +246,7 @@ Please review. Reply "确认" to finalize or request changes.
|
|
|
238
246
|
| Should | [fn] | [rationale] |
|
|
239
247
|
| Could | [fn] | [rationale] |
|
|
240
248
|
|
|
241
|
-
## Module List
|
|
249
|
+
## Module List (Total: {N} modules)
|
|
242
250
|
| Module | Key | Scope | Key Entities | Owner Domain | Phase |
|
|
243
251
|
|--------|-----|-------|-------------|--------------|-------|
|
|
244
252
|
| [name] | [key] | [scope] | [entities] | [domain] | [1/2/3] |
|