speccrew 0.3.10 → 0.3.12
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.
|
@@ -50,9 +50,9 @@ Before starting work, check the workflow progress state:
|
|
|
50
50
|
3. **If WORKFLOW-PROGRESS.json does not exist**:
|
|
51
51
|
- **MUST use script to initialize:**
|
|
52
52
|
```bash
|
|
53
|
-
node speccrew-workspace/scripts/update-progress.js
|
|
53
|
+
node speccrew-workspace/scripts/update-progress.js update-workflow \
|
|
54
54
|
--file speccrew-workspace/iterations/{iteration}/WORKFLOW-PROGRESS.json \
|
|
55
|
-
--
|
|
55
|
+
--stage 01_prd --status in_progress
|
|
56
56
|
```
|
|
57
57
|
- **Fallback** (ONLY if script file does not exist):
|
|
58
58
|
Create manually with the following structure:
|
|
@@ -273,9 +273,21 @@ When the invoked skill returns:
|
|
|
273
273
|
>
|
|
274
274
|
> 1. **DO NOT skip Phase 4 when Master-Sub structure is present** — If the Skill output indicates "Master-Sub PRD structure", Phase 4 MUST execute.
|
|
275
275
|
> 2. **DO NOT generate Sub-PRDs yourself** — Each Sub-PRD MUST be generated by invoking `speccrew-task-worker` with `speccrew-pm-sub-prd-generate/SKILL.md`. You are the orchestrator, NOT the writer.
|
|
276
|
-
> 3. **DO NOT create DISPATCH-PROGRESS.json manually** — Use the script: `node speccrew-workspace/scripts/update-progress.js init
|
|
276
|
+
> 3. **DO NOT create DISPATCH-PROGRESS.json manually** — Use the script: `node speccrew-workspace/scripts/update-progress.js init --stage sub_prd_dispatch --tasks '<JSON_ARRAY>'`.
|
|
277
277
|
> 4. **DO NOT dispatch Sub-PRDs sequentially** — All workers MUST execute in parallel (batch of 6 if modules > 6).
|
|
278
278
|
> 5. **DO NOT proceed to Phase 5 without verification** — After ALL workers complete, execute Phase 5 Verification Checklist before presenting to user.
|
|
279
|
+
>
|
|
280
|
+
> **ABORT CONDITIONS for Phase 4:**
|
|
281
|
+
> - IF Dispatch Plan was not generated by Skill → STOP and return to Skill
|
|
282
|
+
> - IF DISPATCH-PROGRESS.json initialization failed → STOP and report error
|
|
283
|
+
> - IF PM Agent attempts to generate Sub-PRD content itself → STOP (you are ORCHESTRATOR, not WRITER)
|
|
284
|
+
>
|
|
285
|
+
> **FORBIDDEN ACTIONS in Phase 4:**
|
|
286
|
+
> - DO NOT ask user to select which modules to generate first
|
|
287
|
+
> - DO NOT ask user to provide or select templates (template path comes from Skill output)
|
|
288
|
+
> - DO NOT offer strategy choices (generate all / generate 3 first / pick priority)
|
|
289
|
+
> - DO NOT generate any Sub-PRD document content directly
|
|
290
|
+
> - JUST DISPATCH ALL WORKERS AND WAIT FOR COMPLETION
|
|
279
291
|
|
|
280
292
|
## Phase 4: Sub-PRD Worker Dispatch (Master-Sub Structure Only)
|
|
281
293
|
|
|
@@ -300,9 +312,10 @@ From the Skill's Step 12c output, collect:
|
|
|
300
312
|
|
|
301
313
|
**MANDATORY: Initialize dispatch tracking with script:**
|
|
302
314
|
```bash
|
|
303
|
-
node speccrew-workspace/scripts/update-progress.js init
|
|
315
|
+
node speccrew-workspace/scripts/update-progress.js init \
|
|
304
316
|
--file speccrew-workspace/iterations/{iteration}/01.product-requirement/DISPATCH-PROGRESS.json \
|
|
305
|
-
--
|
|
317
|
+
--stage sub_prd_dispatch \
|
|
318
|
+
--tasks '[{"id":"module-key-1","name":"Module 1 Name"},{"id":"module-key-2","name":"Module 2 Name"}]'
|
|
306
319
|
```
|
|
307
320
|
|
|
308
321
|
> ⚠️ DO NOT create DISPATCH-PROGRESS.json manually with PowerShell or any other method.
|
|
@@ -324,7 +337,24 @@ node speccrew-workspace/scripts/update-progress.js update-task \
|
|
|
324
337
|
|
|
325
338
|
### 4.3 Dispatch Workers
|
|
326
339
|
|
|
327
|
-
|
|
340
|
+
**PM Agent Role: ORCHESTRATOR ONLY**
|
|
341
|
+
|
|
342
|
+
You are the dispatcher, NOT the writer. Your job is to:
|
|
343
|
+
1. Invoke `speccrew-task-worker` for EACH module
|
|
344
|
+
2. Pass the correct skill_path and context
|
|
345
|
+
3. Wait for all workers to complete
|
|
346
|
+
4. Collect results
|
|
347
|
+
|
|
348
|
+
**Implementation:**
|
|
349
|
+
|
|
350
|
+
For EACH module in the dispatch plan, invoke a new `speccrew-task-worker` agent:
|
|
351
|
+
- **skill_path**: Search with glob `**/speccrew-pm-sub-prd-generate/SKILL.md`
|
|
352
|
+
- **context**:
|
|
353
|
+
- `module_name`: from dispatch plan
|
|
354
|
+
- `module_key`: from dispatch plan
|
|
355
|
+
- `master_prd_path`: path to Master PRD
|
|
356
|
+
- `template_path`: PRD template path (from Step 7 glob search result)
|
|
357
|
+
- `output_dir`: `speccrew-workspace/iterations/{iteration}/01.product-requirement/`
|
|
328
358
|
|
|
329
359
|
Each worker receives:
|
|
330
360
|
- `skill_path`: `speccrew-pm-sub-prd-generate/SKILL.md`
|
|
@@ -342,6 +372,10 @@ Each worker receives:
|
|
|
342
372
|
- `template_path`: Path to PRD-TEMPLATE.md
|
|
343
373
|
- `output_path`: `{output_dir}/{feature_name}-sub-{module_key}.md`
|
|
344
374
|
|
|
375
|
+
**Batch Strategy:**
|
|
376
|
+
- If modules ≤ 6: dispatch ALL in parallel
|
|
377
|
+
- If modules > 6: dispatch in batches of 6, wait for batch completion before next batch
|
|
378
|
+
|
|
345
379
|
**Parallel execution pattern:**
|
|
346
380
|
```
|
|
347
381
|
Worker 1: Module "customer" → crm-system-sub-customer.md
|
|
@@ -351,7 +385,12 @@ Worker 3: Module "opportunity" → crm-system-sub-opportunity.md
|
|
|
351
385
|
Worker N: Module "{module-N}" → crm-system-sub-{module-N}.md
|
|
352
386
|
```
|
|
353
387
|
|
|
354
|
-
**All workers execute simultaneously.** Wait for all workers to complete before proceeding.
|
|
388
|
+
**All workers execute simultaneously (or in batches).** Wait for all workers to complete before proceeding.
|
|
389
|
+
|
|
390
|
+
**Before proceeding to Phase 5, verify:**
|
|
391
|
+
- [ ] All workers were dispatched via speccrew-task-worker
|
|
392
|
+
- [ ] No Sub-PRD was generated by PM Agent directly
|
|
393
|
+
- [ ] All workers completed (check DISPATCH-PROGRESS.json)
|
|
355
394
|
|
|
356
395
|
### 4.4 Collect Results
|
|
357
396
|
|
|
@@ -435,9 +474,9 @@ After user confirms (HARD STOP passed), update `.checkpoints.json`:
|
|
|
435
474
|
|
|
436
475
|
| Deliverable | Path | Notes |
|
|
437
476
|
|-------------|------|-------|
|
|
438
|
-
| PRD Document | `speccrew-workspace/iterations/{number}-{type}-{name}/01.
|
|
439
|
-
| Business Modeling (complex) | `speccrew-workspace/iterations/{number}-{type}-{name}/01.
|
|
440
|
-
| Sub-PRD Documents (complex) | `speccrew-workspace/iterations/{number}-{type}-{name}/01.
|
|
477
|
+
| PRD Document | `speccrew-workspace/iterations/{number}-{type}-{name}/01.product-requirement/[feature-name]-prd.md` | Based on template from `speccrew-pm-requirement-analysis/templates/PRD-TEMPLATE.md` |
|
|
478
|
+
| Business Modeling (complex) | `speccrew-workspace/iterations/{number}-{type}-{name}/01.product-requirement/[feature-name]-bizs-modeling.md` | ISA-95 six-stage modeling, only for complex requirements |
|
|
479
|
+
| Sub-PRD Documents (complex) | `speccrew-workspace/iterations/{number}-{type}-{name}/01.product-requirement/[feature-name]-sub-[module].md` | One per module, generated by worker dispatch |
|
|
441
480
|
|
|
442
481
|
# Constraints
|
|
443
482
|
|
|
@@ -76,32 +76,122 @@ Use progressive questioning to clarify requirements. Do NOT ask all questions at
|
|
|
76
76
|
> - **Domain Glossary**: Unify key business terms to eliminate ambiguity across stakeholders.
|
|
77
77
|
> These elements should naturally flow into the clarification summary, NOT as a separate document.
|
|
78
78
|
|
|
79
|
-
###
|
|
79
|
+
### File-Based Clarification Workflow
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
> ⚠️ **All clarification rounds use file-based interaction, NOT chat-based.**
|
|
82
|
+
> This prevents users from having to copy-paste large amounts of content in chat.
|
|
82
83
|
|
|
83
|
-
|
|
84
|
-
|----------|---------|
|
|
85
|
-
| What problem does this feature solve? What is the business context? | Confirm background and motivation |
|
|
86
|
-
| Who are the target users and what are the core usage scenarios? | Identify user scope and mainstream use cases |
|
|
84
|
+
**Round 1: Core Understanding**
|
|
87
85
|
|
|
88
|
-
|
|
86
|
+
1. **Create** `.clarification-summary.md` in the iteration's `01.product-requirement/` directory:
|
|
87
|
+
```
|
|
88
|
+
speccrew-workspace/iterations/{iteration}/01.product-requirement/.clarification-summary.md
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
2. **Write** Round 1 questions to the file using this format:
|
|
92
|
+
|
|
93
|
+
```markdown
|
|
94
|
+
# Requirements Clarification
|
|
95
|
+
|
|
96
|
+
## Round 1: Core Understanding
|
|
97
|
+
|
|
98
|
+
> **Instructions**: Please fill in your answers directly after each "**Answer:**" marker below, then save the file and notify me that you have completed your responses.
|
|
99
|
+
|
|
100
|
+
### 1. Business Background & Goals
|
|
101
|
+
|
|
102
|
+
Based on the requirement document, the system aims to solve:
|
|
103
|
+
- [PM's understanding point 1]
|
|
104
|
+
- [PM's understanding point 2]
|
|
105
|
+
- ...
|
|
106
|
+
|
|
107
|
+
**Answer:** <!-- Fill your confirmation or corrections here -->
|
|
108
|
+
|
|
109
|
+
### 2. Target Users & Scenarios
|
|
110
|
+
|
|
111
|
+
The document identifies the following user roles:
|
|
112
|
+
- Role 1: description
|
|
113
|
+
- Role 2: description
|
|
114
|
+
|
|
115
|
+
Questions:
|
|
116
|
+
- Are there additional roles not mentioned?
|
|
117
|
+
- [Other specific questions]
|
|
118
|
+
|
|
119
|
+
**Answer:** <!-- Fill your answers here -->
|
|
120
|
+
|
|
121
|
+
### 3. System Scope & Boundaries
|
|
122
|
+
|
|
123
|
+
The functional scope includes:
|
|
124
|
+
- Module 1
|
|
125
|
+
- Module 2
|
|
126
|
+
- ...
|
|
127
|
+
|
|
128
|
+
Questions:
|
|
129
|
+
- Are all modules required for Phase 1?
|
|
130
|
+
- [Other scope questions]
|
|
131
|
+
|
|
132
|
+
**Answer:** <!-- Fill your answers here -->
|
|
133
|
+
```
|
|
89
134
|
|
|
90
|
-
|
|
135
|
+
3. **Notify user** with a brief message:
|
|
136
|
+
```
|
|
137
|
+
📝 Clarification questions written to:
|
|
138
|
+
`01.product-requirement/.clarification-summary.md`
|
|
139
|
+
|
|
140
|
+
Please open the file, fill in your answers after each "**Answer:**" marker, save, and let me know when done.
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
4. **HARD STOP** — Wait for user to confirm they have answered.
|
|
144
|
+
|
|
145
|
+
5. **Read** the updated `.clarification-summary.md` file.
|
|
146
|
+
|
|
147
|
+
6. **Evaluate** if answers are sufficient for Sufficiency Checks.
|
|
148
|
+
|
|
149
|
+
**Round 2 (if needed): Scope & Boundaries**
|
|
150
|
+
|
|
151
|
+
7. **Append** Round 2 questions to the SAME file:
|
|
152
|
+
|
|
153
|
+
```markdown
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Round 2: Scope & Boundaries
|
|
157
|
+
|
|
158
|
+
> Based on your Round 1 answers, I need to clarify the following details.
|
|
159
|
+
> Please fill in your answers after each "**Answer:**" marker.
|
|
160
|
+
|
|
161
|
+
### 1. Out-of-Scope Items
|
|
162
|
+
|
|
163
|
+
Based on the requirement, the following appear to be out of scope:
|
|
164
|
+
- [Item 1]
|
|
165
|
+
- [Item 2]
|
|
166
|
+
|
|
167
|
+
Questions:
|
|
168
|
+
- Are there any explicit exclusions?
|
|
169
|
+
- [Other boundary questions]
|
|
170
|
+
|
|
171
|
+
**Answer:** <!-- Fill your answers here -->
|
|
172
|
+
|
|
173
|
+
### 2. Existing System Relationship
|
|
174
|
+
|
|
175
|
+
Questions:
|
|
176
|
+
- Does this overlap with any existing system capabilities?
|
|
177
|
+
- Should this reuse or replace existing functionality?
|
|
178
|
+
|
|
179
|
+
**Answer:** <!-- Fill your answers here -->
|
|
180
|
+
|
|
181
|
+
### 3. Constraints
|
|
182
|
+
|
|
183
|
+
Questions:
|
|
184
|
+
- Are there timeline constraints?
|
|
185
|
+
- Technology or budget constraints?
|
|
186
|
+
|
|
187
|
+
**Answer:** <!-- Fill your answers here -->
|
|
188
|
+
```
|
|
91
189
|
|
|
92
|
-
|
|
93
|
-
|----------|---------|
|
|
94
|
-
| What is explicitly out of scope? | Clarify boundaries |
|
|
95
|
-
| Does this overlap with any existing system capabilities? | Identify reuse vs new build |
|
|
96
|
-
| Are there constraints (timeline, technology, budget)? | Clarify constraints early |
|
|
190
|
+
8. **Notify user** again and wait for response.
|
|
97
191
|
|
|
98
|
-
|
|
192
|
+
9. **Read** the updated file and evaluate Sufficiency Checks.
|
|
99
193
|
|
|
100
|
-
|
|
101
|
-
|----------|---------|
|
|
102
|
-
| What does "done" look like? Any specific acceptance criteria? | Confirm definition of done |
|
|
103
|
-
| Are there non-functional requirements (performance, security)? | Identify NFRs |
|
|
104
|
-
| What is the priority relative to other work? | Confirm priority |
|
|
194
|
+
**Round 3 (if still needed): Detail & Acceptance** — Same pattern: append to the file, notify, wait, read.
|
|
105
195
|
|
|
106
196
|
### Sufficiency Check
|
|
107
197
|
|
|
@@ -114,41 +204,35 @@ Sufficient to proceed when ALL of:
|
|
|
114
204
|
- [ ] Scope boundaries (in/out) are defined
|
|
115
205
|
- [ ] Relationship to existing system is understood
|
|
116
206
|
|
|
117
|
-
If ANY is unclear →
|
|
118
|
-
If ALL are clear → proceed to
|
|
207
|
+
If ANY is unclear → append follow-up questions to the clarification file
|
|
208
|
+
If ALL are clear → proceed to Finalize Clarification File
|
|
119
209
|
```
|
|
120
210
|
|
|
121
|
-
###
|
|
211
|
+
### Finalize Clarification File
|
|
122
212
|
|
|
123
|
-
After Sufficiency Check
|
|
213
|
+
After all clarification rounds complete, append the Sufficiency Check results and Key Decisions to the file:
|
|
124
214
|
|
|
125
|
-
```
|
|
126
|
-
Path: speccrew-workspace/iterations/{iteration}/01.product-requirement/.clarification-summary.md
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
**Content template:**
|
|
130
215
|
```markdown
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
## Input Type
|
|
134
|
-
- [ ] Complete requirement document provided
|
|
135
|
-
- [ ] Incomplete input (progressive clarification performed)
|
|
216
|
+
---
|
|
136
217
|
|
|
137
|
-
##
|
|
138
|
-
- Round 1 (Core Understanding): [Summary of Q&A]
|
|
139
|
-
- Round 2 (Scope & Boundaries): [Summary of Q&A]
|
|
140
|
-
- Round 3 (Detail & Acceptance): [If applicable, Summary of Q&A]
|
|
218
|
+
## Sufficiency Check
|
|
141
219
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
220
|
+
| Check Item | Status |
|
|
221
|
+
|-----------|--------|
|
|
222
|
+
| Core business problem clearly defined | ✅ |
|
|
223
|
+
| Target user roles and permissions identified | ✅ |
|
|
224
|
+
| System scope and boundaries confirmed | ✅ |
|
|
225
|
+
| Key business rules clarified | ✅ |
|
|
147
226
|
|
|
148
227
|
## Key Decisions
|
|
149
|
-
|
|
228
|
+
|
|
229
|
+
| # | Decision | Rationale |
|
|
230
|
+
|---|----------|----------|
|
|
231
|
+
| 1 | [Decision] | [From user's answer in Round X] |
|
|
232
|
+
| 2 | [Decision] | [From user's answer in Round X] |
|
|
150
233
|
|
|
151
234
|
## Proceed Gate
|
|
235
|
+
|
|
152
236
|
✅ All checks passed. Ready for Step 2.
|
|
153
237
|
```
|
|
154
238
|
|
|
@@ -579,17 +663,17 @@ Before writing any file, create a complete list of ALL files to generate:
|
|
|
579
663
|
|
|
580
664
|
| # | File | Path |
|
|
581
665
|
|---|------|------|
|
|
582
|
-
| 1 | PRD | {iteration}/01.
|
|
666
|
+
| 1 | PRD | {iteration}/01.product-requirement/{feature-name}-prd.md |
|
|
583
667
|
|
|
584
668
|
**For Master-Sub Structure (present this table to user):**
|
|
585
669
|
|
|
586
670
|
| # | File Type | Module | Path |
|
|
587
671
|
|---|-----------|--------|------|
|
|
588
|
-
| 1 | Master PRD | (system overview) | {iteration}/01.
|
|
589
|
-
| 2 | Sub-PRD | {module-1-name} | {iteration}/01.
|
|
590
|
-
| 3 | Sub-PRD | {module-2-name} | {iteration}/01.
|
|
672
|
+
| 1 | Master PRD | (system overview) | {iteration}/01.product-requirement/{feature-name}-prd.md |
|
|
673
|
+
| 2 | Sub-PRD | {module-1-name} | {iteration}/01.product-requirement/{feature-name}-sub-{module-1-key}.md |
|
|
674
|
+
| 3 | Sub-PRD | {module-2-name} | {iteration}/01.product-requirement/{feature-name}-sub-{module-2-key}.md |
|
|
591
675
|
| ... | ... | ... | ... |
|
|
592
|
-
| N+1 | Sub-PRD | {module-N-name} | {iteration}/01.
|
|
676
|
+
| N+1 | Sub-PRD | {module-N-name} | {iteration}/01.product-requirement/{feature-name}-sub-{module-N-key}.md |
|
|
593
677
|
|
|
594
678
|
Total files: 1 (Master) + N (Sub-PRDs) = N+1 files.
|
|
595
679
|
|
|
@@ -600,7 +684,7 @@ Total files: 1 (Master) + N (Sub-PRDs) = N+1 files.
|
|
|
600
684
|
### Step 12b: Generate Master PRD
|
|
601
685
|
|
|
602
686
|
1. Read `templates/PRD-TEMPLATE.md` (already loaded in Step 7)
|
|
603
|
-
2. Create document using `create_file` at: `{iteration}/01.
|
|
687
|
+
2. Create document using `create_file` at: `{iteration}/01.product-requirement/{feature-name}-prd.md`
|
|
604
688
|
|
|
605
689
|
3. Fill content using `search_replace` per section:
|
|
606
690
|
|
|
@@ -37,7 +37,19 @@ This skill applies ISA-95 Stages 1-3 in lightweight mode:
|
|
|
37
37
|
|
|
38
38
|
### Step 1: Quick Clarification
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
**For simple requirements with 1-3 questions:**
|
|
41
|
+
- Ask directly in chat (acceptable for very short clarifications)
|
|
42
|
+
|
|
43
|
+
**For requirements needing 4+ questions:**
|
|
44
|
+
- Use file-based clarification (same as complex skill):
|
|
45
|
+
1. Write questions to `.clarification-summary.md` in the iteration's `01.product-requirement/` directory
|
|
46
|
+
2. User fills answers in file after each "**Answer:**" marker
|
|
47
|
+
3. User notifies PM
|
|
48
|
+
4. PM reads and proceeds
|
|
49
|
+
|
|
50
|
+
> **Default to chat-based** for simple requirements unless the clarification content is lengthy.
|
|
51
|
+
|
|
52
|
+
Clarification topics:
|
|
41
53
|
|
|
42
54
|
1. **What to change**: Which page/function/module is affected?
|
|
43
55
|
2. **What the change is**: Add field? Modify logic? New sub-feature?
|