speccrew 0.3.14 → 0.4.1
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-product-manager.md +381 -131
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +210 -882
- package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/PRD-TEMPLATE.md +29 -14
- package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +272 -0
- package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +350 -0
- package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +52 -90
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +32 -7
- package/package.json +1 -1
|
@@ -86,15 +86,43 @@ If `01_prd.status` is `in_progress` or resuming from an interrupted session:
|
|
|
86
86
|
```
|
|
87
87
|
- If the file does not exist → Start from Phase 1 (no previous progress)
|
|
88
88
|
|
|
89
|
-
2. **
|
|
89
|
+
2. **Check Intermediate Artifacts** (determine resume point based on file existence):
|
|
90
|
+
|
|
91
|
+
| File | If Exists | Resume Point |
|
|
92
|
+
|------|-----------|--------------|
|
|
93
|
+
| `.clarification-summary.md` | Clarification complete | Check next file |
|
|
94
|
+
| `.module-design.md` | Modeling complete (complex) | Check next file |
|
|
95
|
+
| Master PRD file | PRD generation complete | Check Sub-PRD status |
|
|
96
|
+
| Sub-PRD files | Sub-PRD generation complete | Phase 5 (Verification) |
|
|
97
|
+
|
|
98
|
+
3. **Evaluate Checkpoint Status** (detailed resume logic):
|
|
90
99
|
|
|
91
100
|
| Checkpoint | If Passed | Resume Point |
|
|
92
101
|
|------------|-----------|--------------|
|
|
93
|
-
| `requirement_clarification.passed == true` | Skip
|
|
94
|
-
| `
|
|
102
|
+
| `requirement_clarification.passed == true` | Skip Phase 2 | Start from Phase 3 (check complexity) |
|
|
103
|
+
| `requirement_modeling.passed == true` | Skip Phase 3a | Start from Phase 3b (PRD generation) |
|
|
104
|
+
| `sub_prd_dispatch.passed == true` | Skip Phase 4 | Start from Phase 5 (Verification) |
|
|
95
105
|
| `prd_review.passed == true` | All complete | Ask user: "PRD stage already confirmed. Redo?" |
|
|
96
106
|
|
|
97
|
-
|
|
107
|
+
4. **Determine Resume Path Based on Complexity:**
|
|
108
|
+
|
|
109
|
+
**Simple Requirements (from `.clarification-summary.md`):**
|
|
110
|
+
```
|
|
111
|
+
IF .clarification-summary.md exists AND complexity == simple:
|
|
112
|
+
IF Single PRD exists → Resume at Phase 5
|
|
113
|
+
ELSE → Resume at Phase 3 (Simple Path)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Complex Requirements:**
|
|
117
|
+
```
|
|
118
|
+
IF .clarification-summary.md exists AND complexity == complex:
|
|
119
|
+
IF .module-design.md missing → Resume at Phase 3a (Modeling)
|
|
120
|
+
IF Master PRD missing → Resume at Phase 3b (PRD Generation)
|
|
121
|
+
IF Sub-PRDs incomplete → Resume at Phase 4 (Worker Dispatch)
|
|
122
|
+
IF all files exist → Resume at Phase 5
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
5. **Check Sub-PRD Dispatch Resume** (if applicable):
|
|
98
126
|
```bash
|
|
99
127
|
node speccrew-workspace/scripts/update-progress.js read --file speccrew-workspace/iterations/{iteration}/01.product-requirement/DISPATCH-PROGRESS.json --summary
|
|
100
128
|
```
|
|
@@ -102,7 +130,22 @@ If `01_prd.status` is `in_progress` or resuming from an interrupted session:
|
|
|
102
130
|
- Re-execute tasks with `status == "failed"`
|
|
103
131
|
- Execute tasks with `status == "pending"`
|
|
104
132
|
|
|
105
|
-
|
|
133
|
+
6. **Display Resume Summary** and ask user to confirm:
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
📋 Resume Summary
|
|
137
|
+
|
|
138
|
+
Detected Progress:
|
|
139
|
+
├── Clarification: ✅ .clarification-summary.md exists
|
|
140
|
+
├── Modeling: ✅ .module-design.md exists (complex requirement)
|
|
141
|
+
├── Master PRD: ✅ [feature-name]-prd.md exists
|
|
142
|
+
└── Sub-PRDs: ⚠️ 3 of 5 completed
|
|
143
|
+
|
|
144
|
+
Resume Point: Phase 4 (Sub-PRD Worker Dispatch)
|
|
145
|
+
Remaining Tasks: 2 modules pending
|
|
146
|
+
|
|
147
|
+
Proceed with resume? (yes/no)
|
|
148
|
+
```
|
|
106
149
|
|
|
107
150
|
### 0.3 Backward Compatibility
|
|
108
151
|
|
|
@@ -175,106 +218,189 @@ Based on the indicators above:
|
|
|
175
218
|
|
|
176
219
|
---
|
|
177
220
|
|
|
178
|
-
## Phase 2:
|
|
221
|
+
## Phase 2: Requirement Clarification
|
|
222
|
+
|
|
223
|
+
Invoke `speccrew-pm-requirement-clarify` skill to perform requirement clarification.
|
|
224
|
+
|
|
225
|
+
### 2.1 Prepare Parameters
|
|
226
|
+
|
|
227
|
+
Pass the following parameters to the skill:
|
|
179
228
|
|
|
180
|
-
|
|
229
|
+
| Parameter | Value | Description |
|
|
230
|
+
|-----------|-------|-------------|
|
|
231
|
+
| `requirement_file` | Path to user's requirement document | Original requirement input |
|
|
232
|
+
| `iteration_path` | `speccrew-workspace/iterations/{iteration}` | Current iteration directory |
|
|
233
|
+
| `complexity_hint` | `simple` or `complex` (from Phase 1 assessment) | Complexity assessment result |
|
|
181
234
|
|
|
182
|
-
###
|
|
235
|
+
### 2.2 Invoke Clarification Skill
|
|
183
236
|
|
|
184
|
-
|
|
237
|
+
**Action:** Invoke `speccrew-pm-requirement-clarify` skill with the parameters above.
|
|
185
238
|
|
|
186
|
-
|
|
187
|
-
|-----------|-------------|------------|
|
|
188
|
-
| Business Problem Clarity | Is the core business problem clearly understood? | ✅/❌ |
|
|
189
|
-
| Target Users & Scenarios | Are target users and core use cases identified? | ✅/❌ |
|
|
190
|
-
| Scope Boundaries | Are inclusion/exclusion boundaries defined? | ✅/❌ |
|
|
191
|
-
| System Relationship | Is the relationship with existing system understood? | ✅/❌ |
|
|
239
|
+
**Skill Location:** Search with glob `**/speccrew-pm-requirement-clarify/SKILL.md`
|
|
192
240
|
|
|
193
|
-
###
|
|
241
|
+
### 2.3 Wait for Completion
|
|
194
242
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
-
|
|
198
|
-
|
|
199
|
-
|
|
243
|
+
The skill will:
|
|
244
|
+
1. Load requirement document and system knowledge
|
|
245
|
+
2. Execute clarification rounds (chat-based for simple, file-based for complex)
|
|
246
|
+
3. Perform sufficiency checks (4 checks)
|
|
247
|
+
4. Generate `.clarification-summary.md`
|
|
248
|
+
5. Initialize `.checkpoints.json`
|
|
200
249
|
|
|
201
|
-
**
|
|
202
|
-
- **STILL execute at least 1 confirmation round**:
|
|
203
|
-
1. Confirm understanding is correct
|
|
204
|
-
2. Confirm scope boundaries (what's in/out)
|
|
205
|
-
3. Confirm priorities and constraints
|
|
206
|
-
- This ensures alignment even with comprehensive input
|
|
250
|
+
**Wait for skill to complete and return.**
|
|
207
251
|
|
|
208
|
-
###
|
|
252
|
+
### 2.4 Validate Output
|
|
209
253
|
|
|
210
|
-
|
|
254
|
+
**MANDATORY: Check `.clarification-summary.md` exists:**
|
|
211
255
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
-
|
|
256
|
+
```bash
|
|
257
|
+
# Verify file exists (PowerShell compatible)
|
|
258
|
+
Test-Path {iteration_path}/01.product-requirement/.clarification-summary.md
|
|
259
|
+
```
|
|
215
260
|
|
|
216
|
-
|
|
217
|
-
-
|
|
218
|
-
-
|
|
261
|
+
**Validation Checklist:**
|
|
262
|
+
- [ ] `.clarification-summary.md` file exists
|
|
263
|
+
- [ ] File is non-empty (> 500 bytes)
|
|
264
|
+
- [ ] Contains "Complexity" section with `simple` or `complex` value
|
|
265
|
+
- [ ] All 4 sufficiency checks passed
|
|
219
266
|
|
|
220
|
-
###
|
|
267
|
+
### 2.5 Failure Handling (ORCHESTRATOR RULE)
|
|
221
268
|
|
|
222
|
-
|
|
269
|
+
**IF validation fails OR skill reports error:**
|
|
223
270
|
|
|
224
271
|
```
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
272
|
+
❌ Phase 2 FAILED: Requirement Clarification Skill failed
|
|
273
|
+
|
|
274
|
+
Error: [specific error from skill or validation failure]
|
|
275
|
+
|
|
276
|
+
FORBIDDEN ACTIONS (DO NOT DO THESE):
|
|
277
|
+
- DO NOT attempt to clarify requirements yourself
|
|
278
|
+
- DO NOT create .clarification-summary.md manually
|
|
279
|
+
- DO NOT proceed to Phase 3 without valid clarification output
|
|
280
|
+
- DO NOT ask user to skip clarification
|
|
281
|
+
|
|
282
|
+
REQUIRED ACTIONS:
|
|
283
|
+
1. Report error to user with details
|
|
284
|
+
2. Ask: "Retry clarification with additional context?" or "Abort workflow?"
|
|
285
|
+
3. IF retry → Return to Phase 2 with additional context
|
|
286
|
+
4. IF abort → END workflow
|
|
230
287
|
```
|
|
231
288
|
|
|
289
|
+
### 2.6 Success Path
|
|
290
|
+
|
|
291
|
+
**IF validation passes:**
|
|
292
|
+
1. Read `.clarification-summary.md` to extract complexity level
|
|
293
|
+
2. Confirm complexity alignment with Phase 1 assessment
|
|
294
|
+
3. Proceed to Phase 3
|
|
295
|
+
|
|
232
296
|
---
|
|
233
297
|
|
|
234
298
|
⚠️ **MANDATORY CLARIFICATION RULE**:
|
|
235
299
|
- **NEVER skip requirement clarification entirely**
|
|
236
|
-
- **
|
|
237
|
-
- **
|
|
238
|
-
- **If
|
|
300
|
+
- **NEVER proceed to PRD generation without `.clarification-summary.md`**
|
|
301
|
+
- **NEVER assume requirement completeness** — clarification skill handles this
|
|
302
|
+
- **If clarification skill fails: ABORT, do NOT generate clarification yourself**
|
|
239
303
|
|
|
240
304
|
---
|
|
241
305
|
|
|
242
|
-
## Phase 3: Invoke Skill
|
|
306
|
+
## Phase 3: Invoke PRD Skill
|
|
243
307
|
|
|
244
308
|
> ⚠️ **PM AGENT ORCHESTRATION PRINCIPLE (Phase 3-5)**
|
|
245
309
|
> You are the ORCHESTRATOR, NOT the WRITER:
|
|
246
|
-
> - Phase
|
|
310
|
+
> - Phase 3a (Model): DO NOT do ISA-95 analysis yourself → Skill does it
|
|
311
|
+
> - Phase 3b (Generate): DO NOT generate Master PRD yourself → Skill generates it
|
|
247
312
|
> - Phase 4: DO NOT generate Sub-PRD yourself → Workers generate them
|
|
248
313
|
> - Phase 5: DO NOT modify PRD content yourself → Only verify and present
|
|
249
|
-
> - **If Skill fails: STOP and report error to user. DO NOT generate content as fallback.**
|
|
314
|
+
> - **If ANY Skill fails: STOP and report error to user. DO NOT generate content as fallback.**
|
|
315
|
+
|
|
316
|
+
Based on the complexity from `.clarification-summary.md`, invoke the appropriate skill path:
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
### Path A: Simple Requirements
|
|
250
321
|
|
|
251
|
-
|
|
322
|
+
**Condition:** Complexity = `simple` (from `.clarification-summary.md`)
|
|
323
|
+
|
|
324
|
+
**Flow:**
|
|
325
|
+
```
|
|
326
|
+
Invoke speccrew-pm-requirement-simple
|
|
327
|
+
→ Pass: iteration_path, clarification_file
|
|
328
|
+
→ Wait for: Single PRD file
|
|
329
|
+
→ Validate: PRD file exists and size > 2KB
|
|
330
|
+
→ IF fails → ABORT (ORCHESTRATOR rule)
|
|
331
|
+
→ IF succeeds → Skip Phase 4, go to Phase 5
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
**Parameters:**
|
|
335
|
+
| Parameter | Value |
|
|
336
|
+
|-----------|-------|
|
|
337
|
+
| `iteration_path` | `speccrew-workspace/iterations/{iteration}` |
|
|
338
|
+
| `clarification_file` | `{iteration_path}/01.product-requirement/.clarification-summary.md` |
|
|
339
|
+
|
|
340
|
+
---
|
|
252
341
|
|
|
253
|
-
|
|
254
|
-
- Find `speccrew-pm-requirement-simple/SKILL.md` in the skills directory
|
|
342
|
+
### Path B: Complex Requirements
|
|
255
343
|
|
|
256
|
-
**
|
|
257
|
-
- Find `speccrew-pm-requirement-analysis/SKILL.md` in the skills directory
|
|
344
|
+
**Condition:** Complexity = `complex` (from `.clarification-summary.md`)
|
|
258
345
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
346
|
+
**Flow:**
|
|
347
|
+
```
|
|
348
|
+
Step 3a: Invoke speccrew-pm-requirement-model
|
|
349
|
+
→ Pass: iteration_path, clarification_file
|
|
350
|
+
→ Wait for: .module-design.md
|
|
351
|
+
→ Validate: .module-design.md exists + module count >= 2
|
|
352
|
+
→ IF fails → ABORT (ORCHESTRATOR rule: do NOT do module decomposition yourself)
|
|
353
|
+
|
|
354
|
+
Step 3b: Invoke speccrew-pm-requirement-analysis
|
|
355
|
+
→ Pass: iteration_path, clarification_file, module_design_file
|
|
356
|
+
→ Wait for: Master PRD + Dispatch Plan
|
|
357
|
+
→ Validate: Master PRD exists + Dispatch Plan has modules array
|
|
358
|
+
→ IF fails → ABORT (ORCHESTRATOR rule: do NOT generate PRD yourself)
|
|
359
|
+
→ IF succeeds → MANDATORY: Execute Phase 4 (Sub-PRD Worker Dispatch)
|
|
360
|
+
```
|
|
264
361
|
|
|
265
|
-
|
|
362
|
+
**Step 3a Parameters:**
|
|
363
|
+
| Parameter | Value |
|
|
364
|
+
|-----------|-------|
|
|
365
|
+
| `iteration_path` | `speccrew-workspace/iterations/{iteration}` |
|
|
366
|
+
| `clarification_file` | `{iteration_path}/01.product-requirement/.clarification-summary.md` |
|
|
266
367
|
|
|
267
|
-
**Step
|
|
368
|
+
**Step 3b Parameters:**
|
|
369
|
+
| Parameter | Value |
|
|
370
|
+
|-----------|-------|
|
|
371
|
+
| `iteration_path` | `speccrew-workspace/iterations/{iteration}` |
|
|
372
|
+
| `clarification_file` | `{iteration_path}/01.product-requirement/.clarification-summary.md` |
|
|
373
|
+
| `module_design_file` | `{iteration_path}/01.product-requirement/.module-design.md` |
|
|
268
374
|
|
|
269
|
-
|
|
270
|
-
- IF Skill SUCCEEDED → Go to **Phase 3b: Validate & Route**
|
|
375
|
+
---
|
|
271
376
|
|
|
272
|
-
### Phase 3a: Error Recovery (Skill Failed)
|
|
377
|
+
### Phase 3a: Error Recovery (Model Skill Failed)
|
|
273
378
|
|
|
274
379
|
> ⚠️ **ABORT CONDITIONS — Execution MUST STOP:**
|
|
275
|
-
> -
|
|
276
|
-
> -
|
|
277
|
-
> -
|
|
380
|
+
> - `speccrew-pm-requirement-model` reported execution failure
|
|
381
|
+
> - `.module-design.md` was not generated
|
|
382
|
+
> - Module count < 2 (for complex requirements)
|
|
383
|
+
>
|
|
384
|
+
> **FORBIDDEN ACTIONS:**
|
|
385
|
+
> - DO NOT perform ISA-95 analysis yourself
|
|
386
|
+
> - DO NOT create module decomposition yourself
|
|
387
|
+
> - DO NOT create `.module-design.md` manually
|
|
388
|
+
> - DO NOT proceed to Phase 3b
|
|
389
|
+
|
|
390
|
+
**Actions:**
|
|
391
|
+
1. Report error to user: "Modeling skill failed: [specific reason]"
|
|
392
|
+
2. Ask user: "Retry with additional clarification?" or "Abort current workflow?"
|
|
393
|
+
3. IF retry → Return to Phase 2 with additional context
|
|
394
|
+
4. IF abort → END workflow
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
### Phase 3b: Error Recovery (Generate Skill Failed)
|
|
399
|
+
|
|
400
|
+
> ⚠️ **ABORT CONDITIONS — Execution MUST STOP:**
|
|
401
|
+
> - `speccrew-pm-requirement-analysis` reported execution failure
|
|
402
|
+
> - Master PRD was not generated
|
|
403
|
+
> - Dispatch Plan is missing or incomplete
|
|
278
404
|
>
|
|
279
405
|
> **FORBIDDEN ACTIONS:**
|
|
280
406
|
> - DO NOT generate Master PRD as fallback
|
|
@@ -282,32 +408,33 @@ Pass the following context to the Skill:
|
|
|
282
408
|
> - DO NOT create partial PRD documents
|
|
283
409
|
> - DO NOT proceed to Phase 4 or Phase 5
|
|
284
410
|
|
|
285
|
-
Actions
|
|
286
|
-
1. Report error to user: "
|
|
287
|
-
2. Ask user: "Retry with additional
|
|
288
|
-
3. IF retry → Return to Phase
|
|
411
|
+
**Actions:**
|
|
412
|
+
1. Report error to user: "PRD generation skill failed: [specific reason]"
|
|
413
|
+
2. Ask user: "Retry with additional context?" or "Abort current workflow?"
|
|
414
|
+
3. IF retry → Return to Phase 3a (re-run modeling if needed) or Phase 2
|
|
289
415
|
4. IF abort → END workflow
|
|
290
416
|
|
|
291
|
-
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
### Phase 3c: Validate & Route (Skills Succeeded)
|
|
420
|
+
|
|
421
|
+
**For Simple Path:**
|
|
422
|
+
1. Validate Single PRD exists and size > 2KB
|
|
423
|
+
2. IF valid → Skip Phase 4, go to Phase 5
|
|
292
424
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
-
|
|
425
|
+
**For Complex Path:**
|
|
426
|
+
1. **Validate Master PRD:**
|
|
427
|
+
- [ ] File exists and is readable
|
|
428
|
+
- [ ] Size > 2KB
|
|
296
429
|
|
|
297
|
-
2. **Validate Dispatch Plan
|
|
298
|
-
- [ ]
|
|
299
|
-
- [ ]
|
|
300
|
-
- [ ] Each module has: module_name, module_key, module_scope, module_entities
|
|
430
|
+
2. **Validate Dispatch Plan:**
|
|
431
|
+
- [ ] Contains module list (count ≥ 2)
|
|
432
|
+
- [ ] Each module has: module_name, module_key, module_scope
|
|
301
433
|
- [ ] template_path and output_dir are defined
|
|
302
|
-
|
|
303
|
-
IF ANY validation fails:
|
|
304
|
-
→ STOP. Report: "Dispatch Plan incomplete: [missing items]"
|
|
305
|
-
→ Ask user to retry Skill execution
|
|
306
|
-
→ DO NOT proceed to Phase 4
|
|
307
434
|
|
|
308
435
|
3. **Route**:
|
|
309
|
-
-
|
|
310
|
-
-
|
|
436
|
+
- All validations pass → **MANDATORY: Execute Phase 4**
|
|
437
|
+
- Any validation fails → STOP and report error
|
|
311
438
|
|
|
312
439
|
> ⚠️ **DO NOT present results to user before Phase 4 completes (for complex requirements).**
|
|
313
440
|
> The Master PRD alone is incomplete without Sub-PRDs.
|
|
@@ -315,18 +442,39 @@ Actions:
|
|
|
315
442
|
---
|
|
316
443
|
|
|
317
444
|
> ⚠️ **MANDATORY RULES FOR PHASE 3:**
|
|
318
|
-
> 1. DO NOT
|
|
319
|
-
> 2. DO NOT generate
|
|
320
|
-
> 3. DO NOT
|
|
321
|
-
> 4.
|
|
445
|
+
> 1. DO NOT perform ISA-95 analysis yourself — it MUST be done by `speccrew-pm-requirement-model`
|
|
446
|
+
> 2. DO NOT generate Master PRD yourself — it MUST be generated by Skill
|
|
447
|
+
> 3. DO NOT generate any PRD content as fallback if Skill fails
|
|
448
|
+
> 4. DO NOT skip Skill failure validation
|
|
449
|
+
> 5. MUST validate Dispatch Plan completeness before entering Phase 4
|
|
322
450
|
>
|
|
323
451
|
> **ABORT CONDITIONS:**
|
|
324
|
-
> - IF
|
|
452
|
+
> - IF Phase 3a (model) fails → STOP and report to user
|
|
453
|
+
> - IF Phase 3b (generate) fails → STOP and report to user
|
|
325
454
|
> - IF PRD output is missing or incomplete → STOP and report to user
|
|
326
|
-
> - IF PM Agent attempts to generate
|
|
455
|
+
> - IF PM Agent attempts to generate content itself → STOP (ORCHESTRATOR ONLY)
|
|
327
456
|
|
|
328
457
|
---
|
|
329
458
|
|
|
459
|
+
> ⚠️ **ORCHESTRATOR ONLY PRINCIPLE — EXTENDED RULES**
|
|
460
|
+
>
|
|
461
|
+
> The PM Agent is the ORCHESTRATOR, NOT the WRITER. This principle applies to ALL skill invocations:
|
|
462
|
+
>
|
|
463
|
+
> | Phase | Skill | ORCHESTRATOR Rule |
|
|
464
|
+
> |-------|-------|-------------------|
|
|
465
|
+
> | Phase 2 | `speccrew-pm-requirement-clarify` | DO NOT clarify requirements yourself — Skill handles all clarification rounds |
|
|
466
|
+
> | Phase 3a | `speccrew-pm-requirement-model` | DO NOT perform ISA-95 analysis or module decomposition yourself |
|
|
467
|
+
> | Phase 3b | `speccrew-pm-requirement-analysis` | DO NOT generate Master PRD or Dispatch Plan yourself |
|
|
468
|
+
> | Phase 4 | `speccrew-pm-sub-prd-generate` (via workers) | DO NOT generate Sub-PRD content yourself |
|
|
469
|
+
> | Phase 5 | PM Agent verification | DO NOT modify PRD content — only verify and present |
|
|
470
|
+
>
|
|
471
|
+
> **UNIVERSAL ABORT RULE:**
|
|
472
|
+
> - IF ANY skill fails → STOP and report to user
|
|
473
|
+
> - DO NOT generate content as fallback
|
|
474
|
+
> - DO NOT proceed to next phase
|
|
475
|
+
>
|
|
476
|
+
> ---
|
|
477
|
+
>
|
|
330
478
|
> ⚠️ **MANDATORY RULES FOR PHASE 4 (Sub-PRD Worker Dispatch):**
|
|
331
479
|
> These rules apply to ALL complex requirements (3+ modules). Violation = workflow failure.
|
|
332
480
|
>
|
|
@@ -492,55 +640,151 @@ Update `.checkpoints.json` → `sub_prd_dispatch.passed = true` (only if all suc
|
|
|
492
640
|
|
|
493
641
|
## Phase 5: Verification & Confirmation
|
|
494
642
|
|
|
495
|
-
### 5.1
|
|
643
|
+
### 5.1 Run Verification Checklist
|
|
644
|
+
|
|
645
|
+
**Simple Requirements Checklist:**
|
|
646
|
+
- [ ] Single PRD file exists
|
|
647
|
+
- [ ] File size > 2KB
|
|
648
|
+
- [ ] Feature Breakdown section (3.4) exists and has ≥ 1 feature
|
|
649
|
+
- [ ] Content Boundary Compliance: Sample check for technical terms (API, DB, SQL, etc.)
|
|
650
|
+
|
|
651
|
+
**Complex Requirements Checklist:**
|
|
652
|
+
- [ ] Master PRD file exists and size > 2KB
|
|
653
|
+
- [ ] All Sub-PRD files exist (match Dispatch Plan module count)
|
|
654
|
+
- [ ] Each Sub-PRD size > 3KB
|
|
655
|
+
- [ ] Master PRD Sub-PRD Index matches actual files
|
|
656
|
+
- [ ] Each Sub-PRD contains Feature Breakdown (Section 3.4)
|
|
657
|
+
- [ ] Content Boundary Compliance: Sample check for technical terms
|
|
496
658
|
|
|
497
|
-
|
|
498
|
-
- Verify Master PRD exists and size > 2KB (for complex requirements)
|
|
499
|
-
- Verify all Sub-PRD files exist and each size > 3KB (for complex requirements)
|
|
500
|
-
- Verify Master PRD Sub-PRD Index matches actual files (for complex requirements)
|
|
501
|
-
- Verify each Sub-PRD contains Feature Breakdown (Section 3.4) (for complex requirements)
|
|
502
|
-
- Verify Single PRD exists and size > 2KB (for simple requirements)
|
|
659
|
+
**Content Boundary Spot Check (5.1.1):**
|
|
503
660
|
|
|
504
|
-
|
|
505
|
-
-
|
|
506
|
-
-
|
|
661
|
+
Randomly select 3 sections from PRD(s) and verify:
|
|
662
|
+
- NO API definitions (GET/POST, JSON schemas, endpoints)
|
|
663
|
+
- NO database structures (tables, columns, SQL)
|
|
664
|
+
- NO code snippets or pseudocode
|
|
665
|
+
- NO technical terminology (UUID, JWT, REST, Microservice)
|
|
666
|
+
|
|
667
|
+
**IF boundary violations found:**
|
|
668
|
+
- Report violations to user
|
|
669
|
+
- Ask: "Proceed anyway?" or "Regenerate with stricter constraints?"
|
|
670
|
+
- IF regenerate → Return to appropriate Phase (3a/3b/4)
|
|
671
|
+
|
|
672
|
+
**After verification passes, update `.checkpoints.json`:**
|
|
673
|
+
```bash
|
|
674
|
+
node speccrew-workspace/scripts/update-progress.js write-checkpoint \
|
|
675
|
+
--file {iteration_path}/01.product-requirement/.checkpoints.json \
|
|
676
|
+
--checkpoint verification_checklist \
|
|
677
|
+
--passed true
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
---
|
|
507
681
|
|
|
508
682
|
### 5.2 Present Documents for User Review
|
|
509
683
|
|
|
510
|
-
|
|
684
|
+
**5.2.1 List All Generated Documents**
|
|
511
685
|
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
-
|
|
686
|
+
```
|
|
687
|
+
📋 PRD Documents Ready for Review
|
|
688
|
+
|
|
689
|
+
Generated Files:
|
|
690
|
+
├── Master PRD: {path} ({size} KB)
|
|
691
|
+
├── Sub-PRD 1: {path} ({size} KB)
|
|
692
|
+
├── Sub-PRD 2: {path} ({size} KB)
|
|
693
|
+
└── ...
|
|
694
|
+
|
|
695
|
+
Verification Results:
|
|
696
|
+
├── File existence: ✅ All files present
|
|
697
|
+
├── Size validation: ✅ All files valid
|
|
698
|
+
├── Feature Breakdown: ✅ All sections present
|
|
699
|
+
└── Content Boundary: ✅ No violations detected
|
|
700
|
+
```
|
|
518
701
|
|
|
519
|
-
|
|
702
|
+
**5.2.2 Summarize Content**
|
|
520
703
|
|
|
521
|
-
|
|
704
|
+
| Document | Key Sections | Feature Count |
|
|
705
|
+
|----------|--------------|---------------|
|
|
706
|
+
| Master PRD | Background, Module List, Dependencies | N/A |
|
|
707
|
+
| Sub-PRD 1 | User Stories, Requirements, Features | {count} |
|
|
708
|
+
| ... | ... | ... |
|
|
522
709
|
|
|
523
|
-
|
|
524
|
-
- Set `prd_review.passed = true`
|
|
525
|
-
- Set `prd_review.confirmed_at` via: `node -e "console.log(new Date().toISOString())"`
|
|
710
|
+
**5.2.3 HARD STOP — Wait for User Confirmation**
|
|
526
711
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
712
|
+
⚠️ **CRITICAL: DO NOT proceed without explicit user confirmation.**
|
|
713
|
+
|
|
714
|
+
**Actions:**
|
|
715
|
+
- Present document summary
|
|
716
|
+
- Ask: "Please review the PRD documents. Reply '确认' or 'OK' when ready to proceed."
|
|
717
|
+
- Wait for explicit confirmation
|
|
718
|
+
|
|
719
|
+
**IF user requests changes:**
|
|
720
|
+
1. Identify which document(s) need changes
|
|
721
|
+
2. Identify which Phase to re-run:
|
|
722
|
+
- Content changes → Return to Phase 3b (regenerate PRD)
|
|
723
|
+
- Module structure changes → Return to Phase 3a (re-run modeling)
|
|
724
|
+
- Requirement changes → Return to Phase 2 (re-run clarification)
|
|
725
|
+
3. Re-invoke appropriate skill with updated context
|
|
726
|
+
4. Return to Phase 5 after re-generation
|
|
727
|
+
|
|
728
|
+
**IF user confirms:**
|
|
729
|
+
- Proceed to Phase 5.3
|
|
730
|
+
|
|
731
|
+
---
|
|
732
|
+
|
|
733
|
+
### 5.3 Finalize
|
|
734
|
+
|
|
735
|
+
**5.3.1 Update Checkpoints**
|
|
736
|
+
|
|
737
|
+
```bash
|
|
738
|
+
node speccrew-workspace/scripts/update-progress.js write-checkpoint \
|
|
739
|
+
--file {iteration_path}/01.product-requirement/.checkpoints.json \
|
|
740
|
+
--checkpoint prd_review \
|
|
741
|
+
--passed true
|
|
742
|
+
```
|
|
743
|
+
|
|
744
|
+
**5.3.2 Update WORKFLOW-PROGRESS.json**
|
|
745
|
+
|
|
746
|
+
```bash
|
|
747
|
+
node speccrew-workspace/scripts/update-progress.js update-workflow \
|
|
748
|
+
--file speccrew-workspace/iterations/{iteration}/WORKFLOW-PROGRESS.json \
|
|
749
|
+
--stage 01_prd --status completed \
|
|
750
|
+
--completed-at $(node -e "console.log(new Date().toISOString())")
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
**5.3.3 Update PRD Status**
|
|
754
|
+
|
|
755
|
+
Change document status markers:
|
|
756
|
+
- From: `Status: 📝 Draft`
|
|
757
|
+
- To: `Status: ✅ Confirmed`
|
|
758
|
+
|
|
759
|
+
Use `search_replace` to update status lines in all PRD files.
|
|
760
|
+
|
|
761
|
+
**5.3.4 Output Completion Message**
|
|
762
|
+
|
|
763
|
+
```
|
|
764
|
+
✅ PRD Stage Complete
|
|
765
|
+
|
|
766
|
+
All documents confirmed:
|
|
767
|
+
├── Master PRD: ✅ Confirmed
|
|
768
|
+
├── Sub-PRD 1: ✅ Confirmed
|
|
769
|
+
└── ...
|
|
770
|
+
|
|
771
|
+
Next Steps:
|
|
772
|
+
When you are ready to proceed with Feature Design, start a new conversation
|
|
773
|
+
and invoke the Feature Designer Agent (speccrew-feature-designer).
|
|
774
|
+
|
|
775
|
+
DO NOT proceed to Feature Design in this conversation.
|
|
776
|
+
```
|
|
777
|
+
|
|
778
|
+
**END** — Do not invoke or suggest transitioning to the next stage agent.
|
|
537
779
|
|
|
538
780
|
# Deliverables
|
|
539
781
|
|
|
540
782
|
| Deliverable | Path | Notes |
|
|
541
783
|
|-------------|------|-------|
|
|
542
|
-
|
|
|
543
|
-
|
|
|
784
|
+
| Clarification Summary | `speccrew-workspace/iterations/{number}-{type}-{name}/01.product-requirement/.clarification-summary.md` | Generated by `speccrew-pm-requirement-clarify` |
|
|
785
|
+
| Module Design (complex) | `speccrew-workspace/iterations/{number}-{type}-{name}/01.product-requirement/.module-design.md` | Generated by `speccrew-pm-requirement-model` |
|
|
786
|
+
| Master PRD (complex) | `speccrew-workspace/iterations/{number}-{type}-{name}/01.product-requirement/[feature-name]-prd.md` | Generated by `speccrew-pm-requirement-analysis` |
|
|
787
|
+
| Single PRD (simple) | `speccrew-workspace/iterations/{number}-{type}-{name}/01.product-requirement/[feature-name]-prd.md` | Generated by `speccrew-pm-requirement-simple` |
|
|
544
788
|
| 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 |
|
|
545
789
|
|
|
546
790
|
# Constraints
|
|
@@ -554,9 +798,10 @@ Phase 0 → Phase 1 → Phase 2 → Phase 3 → Phase 4 (if complex) → Phase 5
|
|
|
554
798
|
|
|
555
799
|
### MANDATORY CLARIFICATION RULE
|
|
556
800
|
|
|
557
|
-
- **NEVER skip requirement clarification**
|
|
558
|
-
- **NEVER proceed to PRD generation without
|
|
559
|
-
- **NEVER assume requirement completeness** —
|
|
801
|
+
- **NEVER skip requirement clarification** — Phase 2 MUST invoke `speccrew-pm-requirement-clarify`
|
|
802
|
+
- **NEVER proceed to PRD generation without `.clarification-summary.md`**
|
|
803
|
+
- **NEVER assume requirement completeness** — clarification skill handles all verification
|
|
804
|
+
- **IF clarification skill fails: ABORT** — do NOT generate clarification yourself
|
|
560
805
|
|
|
561
806
|
### MANDATORY WORKER DISPATCH RULE
|
|
562
807
|
|
|
@@ -578,8 +823,10 @@ Phase 0 → Phase 1 → Phase 2 → Phase 3 → Phase 4 (if complex) → Phase 5
|
|
|
578
823
|
- Read business module list to confirm boundaries between requirements and existing features
|
|
579
824
|
- Use templates from `speccrew-pm-requirement-analysis/templates/`
|
|
580
825
|
- Explicitly prompt user for review and confirmation after PRD completion
|
|
581
|
-
-
|
|
582
|
-
-
|
|
826
|
+
- **Phase 2: MUST invoke `speccrew-pm-requirement-clarify` skill** — do NOT clarify yourself
|
|
827
|
+
- **Phase 3a (complex): MUST invoke `speccrew-pm-requirement-model` skill** — do NOT do ISA-95 analysis yourself
|
|
828
|
+
- **Phase 3b: MUST invoke PRD generation skill** (`speccrew-pm-requirement-simple` or `speccrew-pm-requirement-analysis`)
|
|
829
|
+
- Pass clarification context and complexity assessment to the skills
|
|
583
830
|
- Perform Complexity Assessment & Skill Routing at Phase 1 to determine simple vs complex workflow
|
|
584
831
|
- For complex requirements (3+ modules), dispatch Sub-PRD generation to parallel workers using `speccrew-pm-sub-prd-generate/SKILL.md`
|
|
585
832
|
|
|
@@ -587,7 +834,10 @@ Phase 0 → Phase 1 → Phase 2 → Phase 3 → Phase 4 (if complex) → Phase 5
|
|
|
587
834
|
- Do not make technical solution decisions (that's speccrew-planner's responsibility)
|
|
588
835
|
- Do not skip manual confirmation to directly start the next stage
|
|
589
836
|
- Do not assume business rules on your own; clarify unclear requirements with the user
|
|
590
|
-
- Do
|
|
837
|
+
- **Do NOT perform requirement clarification yourself** — MUST use `speccrew-pm-requirement-clarify` skill
|
|
838
|
+
- **Do NOT perform ISA-95 analysis or module decomposition yourself** — MUST use `speccrew-pm-requirement-model` skill
|
|
839
|
+
- **Do NOT generate PRD content yourself** — MUST use PRD generation skills
|
|
840
|
+
- **Do NOT generate content as fallback if ANY skill fails** — MUST abort and report error
|
|
591
841
|
- Do not automatically transition to or invoke the next stage agent (Feature Designer). The user will start the next stage in a new conversation window.
|
|
592
842
|
- Do not create WORKFLOW-PROGRESS.json or DISPATCH-PROGRESS.json manually when the script is available
|
|
593
843
|
- Do not search for PRD templates outside the skill's templates/ directory
|