speccrew 0.3.11 → 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 init-workflow \
53
+ node speccrew-workspace/scripts/update-progress.js update-workflow \
54
54
  --file speccrew-workspace/iterations/{iteration}/WORKFLOW-PROGRESS.json \
55
- --iteration {iteration}
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-dispatch`.
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-dispatch \
315
+ node speccrew-workspace/scripts/update-progress.js init \
304
316
  --file speccrew-workspace/iterations/{iteration}/01.product-requirement/DISPATCH-PROGRESS.json \
305
- --tasks "module-key-1,module-key-2,module-key-3,..."
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
- Invoke `speccrew-task-worker` agents in parallel, one per module:
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.prd/[feature-name]-prd.md` | Based on template from `speccrew-pm-requirement-analysis/templates/PRD-TEMPLATE.md` |
439
- | Business Modeling (complex) | `speccrew-workspace/iterations/{number}-{type}-{name}/01.prd/[feature-name]-bizs-modeling.md` | ISA-95 six-stage modeling, only for complex requirements |
440
- | Sub-PRD Documents (complex) | `speccrew-workspace/iterations/{number}-{type}-{name}/01.prd/[feature-name]-sub-[module].md` | One per module, generated by worker dispatch |
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
 
@@ -663,17 +663,17 @@ Before writing any file, create a complete list of ALL files to generate:
663
663
 
664
664
  | # | File | Path |
665
665
  |---|------|------|
666
- | 1 | PRD | {iteration}/01.prd/{feature-name}-prd.md |
666
+ | 1 | PRD | {iteration}/01.product-requirement/{feature-name}-prd.md |
667
667
 
668
668
  **For Master-Sub Structure (present this table to user):**
669
669
 
670
670
  | # | File Type | Module | Path |
671
671
  |---|-----------|--------|------|
672
- | 1 | Master PRD | (system overview) | {iteration}/01.prd/{feature-name}-prd.md |
673
- | 2 | Sub-PRD | {module-1-name} | {iteration}/01.prd/{feature-name}-sub-{module-1-key}.md |
674
- | 3 | Sub-PRD | {module-2-name} | {iteration}/01.prd/{feature-name}-sub-{module-2-key}.md |
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 |
675
675
  | ... | ... | ... | ... |
676
- | N+1 | Sub-PRD | {module-N-name} | {iteration}/01.prd/{feature-name}-sub-{module-N-key}.md |
676
+ | N+1 | Sub-PRD | {module-N-name} | {iteration}/01.product-requirement/{feature-name}-sub-{module-N-key}.md |
677
677
 
678
678
  Total files: 1 (Master) + N (Sub-PRDs) = N+1 files.
679
679
 
@@ -684,7 +684,7 @@ Total files: 1 (Master) + N (Sub-PRDs) = N+1 files.
684
684
  ### Step 12b: Generate Master PRD
685
685
 
686
686
  1. Read `templates/PRD-TEMPLATE.md` (already loaded in Step 7)
687
- 2. Create document using `create_file` at: `{iteration}/01.prd/{feature-name}-prd.md`
687
+ 2. Create document using `create_file` at: `{iteration}/01.product-requirement/{feature-name}-prd.md`
688
688
 
689
689
  3. Fill content using `search_replace` per section:
690
690
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {