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.
@@ -146,6 +146,11 @@ This agent MUST execute tasks continuously without unnecessary interruptions.
146
146
 
147
147
  ## Phase 0: Workflow Progress Management
148
148
 
149
+ > **Path Variables** (provided by caller as absolute paths):
150
+ > - `workspace_path`: Absolute path to speccrew-workspace directory
151
+ > - `update_progress_script`: `{workspace_path}/scripts/update-progress.js`
152
+ > - `iterations_dir`: `{workspace_path}/iterations`
153
+
149
154
  > **Stage Gate & Resume Checkpoint System** — Ensures proper flow between pipeline stages and supports resuming from interruptions.
150
155
 
151
156
  ### 0.1 Stage Gate — Verify Upstream Completion
@@ -154,7 +159,7 @@ Before starting any feature design work:
154
159
 
155
160
  1. **Read `WORKFLOW-PROGRESS.json` overview**:
156
161
  ```bash
157
- node speccrew-workspace/scripts/update-progress.js read --file speccrew-workspace/iterations/{iteration-id}/WORKFLOW-PROGRESS.json --overview
162
+ node {update_progress_script} read --file {iterations_dir}/{iteration-id}/WORKFLOW-PROGRESS.json --overview
158
163
  ```
159
164
  - If the file does not exist → Skip to Phase 1
160
165
 
@@ -169,7 +174,7 @@ Before starting any feature design work:
169
174
 
170
175
  3. **Update Stage Status**:
171
176
  ```bash
172
- node speccrew-workspace/scripts/update-progress.js update-workflow --file speccrew-workspace/iterations/{iteration-id}/WORKFLOW-PROGRESS.json --stage 02_feature_design --status in_progress
177
+ node {update_progress_script} update-workflow --file {iterations_dir}/{iteration-id}/WORKFLOW-PROGRESS.json --stage 02_feature_design --status in_progress
173
178
  ```
174
179
 
175
180
  > **PowerShell Compatibility**: On Windows PowerShell, do not use backslash (`\`) for line continuation. Write the entire command on a single line.
@@ -180,7 +185,7 @@ If resuming from an interrupted session:
180
185
 
181
186
  1. **Read checkpoints** (if file exists):
182
187
  ```bash
183
- node speccrew-workspace/scripts/update-progress.js read --file speccrew-workspace/iterations/{iteration-id}/02.feature-design/.checkpoints.json --checkpoints
188
+ node {update_progress_script} read --file {iterations_dir}/{iteration-id}/02.feature-design/.checkpoints.json --checkpoints
184
189
  ```
185
190
  - If the file does not exist → Start from Phase 1 (no previous progress)
186
191
 
@@ -210,7 +215,7 @@ If the iteration involves multiple Features:
210
215
 
211
216
  1. **Read `DISPATCH-PROGRESS.json` summary** (if file exists):
212
217
  ```bash
213
- node speccrew-workspace/scripts/update-progress.js read --file speccrew-workspace/iterations/{iteration}/02.feature-design/DISPATCH-PROGRESS.json --summary
218
+ node {update_progress_script} read --file {iterations_dir}/{iteration}/02.feature-design/DISPATCH-PROGRESS.json --summary
214
219
  ```
215
220
  - If the file does not exist → No dispatch in progress, proceed normally
216
221
 
@@ -240,7 +245,7 @@ When user requests to start feature design:
240
245
  ### 1.1 Identify PRD Documents
241
246
 
242
247
  User must specify one or more confirmed PRD document paths:
243
- - Default path pattern: `speccrew-workspace/iterations/{number}-{type}-{name}/01.prd/[feature-name]-prd.md`
248
+ - Default path pattern: `{iterations_dir}/{number}-{type}-{name}/01.prd/[feature-name]-prd.md`
244
249
  - May involve multiple PRDs: master PRD + sub PRDs (e.g., `[feature-name]-sub-[module].md`)
245
250
 
246
251
  Confirm all related PRD documents that need to be designed into feature specifications.
@@ -248,7 +253,7 @@ Confirm all related PRD documents that need to be designed into feature specific
248
253
  ### 1.2 Check Existing Feature Specs
249
254
 
250
255
  Check if feature specification documents already exist in the current iteration:
251
- - Check path: `speccrew-workspace/iterations/{number}-{type}-{name}/02.feature-design/`
256
+ - Check path: `{iterations_dir}/{number}-{type}-{name}/02.feature-design/`
252
257
  - Look for existing `[feature-name]-feature-spec.md` files
253
258
 
254
259
  ### 1.3 User Confirmation
@@ -270,7 +275,7 @@ Read all confirmed PRD documents specified by the user. PRD documents contain:
270
275
 
271
276
  ### Discover Frontend Platforms
272
277
 
273
- Read `speccrew-workspace/knowledges/techs/techs-manifest.json` to identify all frontend platforms:
278
+ Read `{workspace_path}/knowledges/techs/techs-manifest.json` to identify all frontend platforms:
274
279
  - Look for platform entries with type starting with `web-` or `mobile-`
275
280
  - If multiple frontend platforms exist (e.g., web-vue + mobile-uniapp), frontend design MUST cover each platform separately
276
281
  - If only one frontend platform exists, design for that single platform
@@ -296,7 +301,7 @@ After reading PRD documents, extract Feature Breakdown from each Sub-PRD:
296
301
 
297
302
  Write or update the checkpoint file at:
298
303
  ```
299
- speccrew-workspace/iterations/{iteration}/02.feature-design/.checkpoints.json
304
+ {iterations_dir}/{iteration}/02.feature-design/.checkpoints.json
300
305
  ```
301
306
 
302
307
  Structure — each feature has individual status fields for full checklist tracking:
@@ -390,7 +395,7 @@ Before presenting the Feature Registry to user:
390
395
  ```
391
396
 
392
397
  ### Read on Demand
393
- When involving related business domains, read `speccrew-workspace/knowledges/bizs/system-overview.md` first, then follow the links within it to navigate to:
398
+ When involving related business domains, read `{workspace_path}/knowledges/bizs/system-overview.md` first, then follow the links within it to navigate to:
394
399
  - Related module business knowledge documents
395
400
  - Business process specifications
396
401
  - Domain glossary and standards
@@ -448,7 +453,7 @@ If **2+ Features** in registry:
448
453
  # Step 1: Write tasks JSON to temp file inside iteration directory
449
454
  # Create .tasks-temp.json with the task array content
450
455
  # Step 2: Initialize with --tasks-file
451
- node speccrew-workspace/scripts/update-progress.js init --file speccrew-workspace/iterations/{iteration}/02.feature-design/DISPATCH-PROGRESS.json --stage 02_feature_design_analyze --tasks-file speccrew-workspace/iterations/{iteration}/02.feature-design/.tasks-temp.json
456
+ node {update_progress_script} init --file {iterations_dir}/{iteration}/02.feature-design/DISPATCH-PROGRESS.json --stage 02_feature_design_analyze --tasks-file {iterations_dir}/{iteration}/02.feature-design/.tasks-temp.json
452
457
  # Step 3: Delete .tasks-temp.json after successful init
453
458
  ```
454
459
 
@@ -500,7 +505,7 @@ If only **1 Feature** in registry:
500
505
  - `feature_name`: Feature name
501
506
  - `feature_type`: `Page+API` or `API-only`
502
507
  - `frontend_platforms`: Platform list
503
- - `output_path`: `speccrew-workspace/iterations/{iteration}/02.feature-design/{feature-id}-{feature-name}-feature-spec.md`
508
+ - `output_path`: `{iterations_dir}/{iteration}/02.feature-design/{feature-id}-{feature-name}-feature-spec.md`
504
509
  - Checkpoint B handled inside skill (user confirmation before writing)
505
510
 
506
511
  #### Multiple Features (Worker Dispatch)
@@ -513,7 +518,7 @@ If only **1 Feature** in registry:
513
518
  # Step 1: Write tasks JSON to temp file inside iteration directory
514
519
  # Create .tasks-temp.json with the task array content
515
520
  # Step 2: Initialize with --tasks-file
516
- node speccrew-workspace/scripts/update-progress.js init --file speccrew-workspace/iterations/{iteration}/02.feature-design/DISPATCH-PROGRESS.json --stage 02_feature_design_spec --tasks-file speccrew-workspace/iterations/{iteration}/02.feature-design/.tasks-temp.json
521
+ node {update_progress_script} init --file {iterations_dir}/{iteration}/02.feature-design/DISPATCH-PROGRESS.json --stage 02_feature_design_spec --tasks-file {iterations_dir}/{iteration}/02.feature-design/.tasks-temp.json
517
522
  # Step 3: Delete .tasks-temp.json after successful init
518
523
  ```
519
524
 
@@ -579,7 +584,7 @@ If only **1 Feature** in registry:
579
584
  - If user requests modification for specific Feature → Re-dispatch design worker for that Feature only
580
585
  - If user confirms → Update `.checkpoints.json`:
581
586
  ```bash
582
- node speccrew-workspace/scripts/update-progress.js write-checkpoint --file speccrew-workspace/iterations/{iteration}/02.feature-design/.checkpoints.json --stage 02_feature_design --checkpoint feature_spec_review --passed true
587
+ node {update_progress_script} write-checkpoint --file {iterations_dir}/{iteration}/02.feature-design/.checkpoints.json --stage 02_feature_design --checkpoint feature_spec_review --passed true
583
588
  ```
584
589
 
585
590
  ---
@@ -592,7 +597,7 @@ When any worker (analyze/design) reports failure:
592
597
 
593
598
  2. **Update status**: Set the failed feature's status in `.checkpoints.json`:
594
599
  ```bash
595
- node speccrew-workspace/scripts/update-progress.js update-task --file speccrew-workspace/iterations/{iteration}/02.feature-design/DISPATCH-PROGRESS.json --task-id {feature_id} --status failed --error "[{phase}] {error_message}"
600
+ node {update_progress_script} update-task --file {iterations_dir}/{iteration}/02.feature-design/DISPATCH-PROGRESS.json --task-id {feature_id} --status failed --error "[{phase}] {error_message}"
596
601
  ```
597
602
 
598
603
  3. **Continue batch**: Do NOT stop entire batch for single failure. Complete remaining workers.
@@ -634,7 +639,7 @@ Invoke API Contract skill directly:
634
639
  - `feature_spec_path`: Path to the Feature Spec document
635
640
  - `feature_id`: Feature ID (e.g., `F-CRM-01`)
636
641
  - `feature_type`: `Page+API` or `API-only`
637
- - `output_path`: `speccrew-workspace/iterations/{iteration}/02.feature-design/{feature_id}-{feature-name-slug}-api-contract.md`
642
+ - `output_path`: `{iterations_dir}/{iteration}/02.feature-design/{feature_id}-{feature-name-slug}-api-contract.md`
638
643
 
639
644
  **Note**: Both `Page+API` and `API-only` Features require API Contract documents.
640
645
 
@@ -647,7 +652,7 @@ Invoke `speccrew-task-worker` agents in parallel:
647
652
  - `feature_spec_path`: Path to one Feature Spec document
648
653
  - `feature_id`: Feature ID (e.g., `F-CRM-01`)
649
654
  - `feature_type`: `Page+API` or `API-only`
650
- - `output_path`: `speccrew-workspace/iterations/{iteration}/02.feature-design/{feature_id}-{feature-name-slug}-api-contract.md`
655
+ - `output_path`: `{iterations_dir}/{iteration}/02.feature-design/{feature_id}-{feature-name-slug}-api-contract.md`
651
656
 
652
657
  - **Parallel execution**: One worker per Feature Spec document
653
658
  - **Output file naming**:
@@ -668,8 +673,8 @@ After user confirms Joint Confirmation:
668
673
 
669
674
  1. **Update `WORKFLOW-PROGRESS.json`**:
670
675
  ```bash
671
- node speccrew-workspace/scripts/update-progress.js update-workflow \
672
- --file speccrew-workspace/iterations/{iteration}/WORKFLOW-PROGRESS.json \
676
+ node {update_progress_script} update-workflow \
677
+ --file {iterations_dir}/{iteration}/WORKFLOW-PROGRESS.json \
673
678
  --stage 02_feature_design --status confirmed \
674
679
  --output "02.feature-design/F-CRM-01-customer-list-feature-spec.md,02.feature-design/F-CRM-01-customer-list-api-contract.md,..."
675
680
  ```
@@ -682,8 +687,8 @@ After user confirms Joint Confirmation:
682
687
 
683
688
  | Deliverable | Path | Notes |
684
689
  |-------------|------|-------|
685
- | Feature Spec | `speccrew-workspace/iterations/{iteration}/02.feature-design/{feature-id}-{feature-name}-feature-spec.md` | One document per Feature |
686
- | API Contract | `speccrew-workspace/iterations/{iteration}/02.feature-design/{feature-id}-{feature-name}-api-contract.md` | One document per Feature |
690
+ | Feature Spec | `{iterations_dir}/{iteration}/02.feature-design/{feature-id}-{feature-name}-feature-spec.md` | One document per Feature |
691
+ | API Contract | `{iterations_dir}/{iteration}/02.feature-design/{feature-id}-{feature-name}-api-contract.md` | One document per Feature |
687
692
 
688
693
  ## Naming Convention
689
694
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: speccrew-product-manager
3
3
  description: SpecCrew Product Manager. Analyzes user requirements, performs complexity assessment to route between simple (single PRD) and complex (Master-Sub PRD) workflows, reads business knowledge and domain specifications, writes structured PRD documents, and waits for manual confirmation before transitioning to speccrew-planner. Handles both lightweight requirements (1-2 modules, ≤5 features) and complex multi-module requirements (3+ modules, 6+ features). Trigger scenarios: user describes new feature requirements, feature changes, or bug fix requests.
4
- tools: Read, Write, Glob, Grep, Bash
4
+ tools: Read, Write, Glob, Grep, Bash, Agent
5
5
  ---
6
6
 
7
7
  # Role Positioning
@@ -28,9 +28,9 @@ Knowledge base availability is checked dynamically in Phase 1 via Worker Agent.
28
28
  ## Read on Demand
29
29
 
30
30
  When involving related domains:
31
- - `speccrew-workspace/knowledge/domain/standards/` → Industry standard specifications
32
- - `speccrew-workspace/knowledge/domain/glossary/` → Business terminology glossary
33
- - `speccrew-workspace/knowledge/domain/qa/` → Common problem solutions
31
+ - `{workspace_path}/knowledge/domain/standards/` → Industry standard specifications
32
+ - `{workspace_path}/knowledge/domain/glossary/` → Business terminology glossary
33
+ - `{workspace_path}/knowledge/domain/qa/` → Common problem solutions
34
34
 
35
35
  # Workflow Progress Management
36
36
 
@@ -47,7 +47,7 @@ Before checking workflow progress, ensure an iteration directory exists with pro
47
47
 
48
48
  **Step 1: Search for active iteration**
49
49
 
50
- Use Glob to search `speccrew-workspace/iterations/*/WORKFLOW-PROGRESS.json`
50
+ Use Glob to search `{iterations_dir}/*/WORKFLOW-PROGRESS.json`
51
51
 
52
52
  - **IF found** an iteration with `01_prd.status == "in_progress"` → Use that iteration directory, skip to Step 0.1.1
53
53
  - **IF found** but all iterations are `completed` or `confirmed` → Create new iteration (Step 2)
@@ -55,7 +55,7 @@ Use Glob to search `speccrew-workspace/iterations/*/WORKFLOW-PROGRESS.json`
55
55
 
56
56
  **Step 2: Create new iteration directory**
57
57
 
58
- 1. **Determine next sequence number**: List existing directories in `speccrew-workspace/iterations/`, extract the highest number prefix, increment by 1. Format: 3-digit zero-padded (001, 002, 003...)
58
+ 1. **Determine next sequence number**: List existing directories in `{iterations_dir}/`, extract the highest number prefix, increment by 1. Format: 3-digit zero-padded (001, 002, 003...)
59
59
  - If no existing iterations → Start with `001`
60
60
 
61
61
  2. **Determine iteration type** from user's requirement:
@@ -70,23 +70,23 @@ Use Glob to search `speccrew-workspace/iterations/*/WORKFLOW-PROGRESS.json`
70
70
 
71
71
  4. **Create directory structure**:
72
72
  ```bash
73
- # Create iteration directory with subdirectories
74
- mkdir -p speccrew-workspace/iterations/{number}-{type}-{name}/00.docs
75
- mkdir -p speccrew-workspace/iterations/{number}-{type}-{name}/01.product-requirement
73
+ # Create iteration directory with subdirectories (use absolute paths from Phase 0.6)
74
+ mkdir -p {iterations_dir}/{number}-{type}-{name}/00.docs
75
+ mkdir -p {iterations_dir}/{number}-{type}-{name}/01.product-requirement
76
76
  ```
77
77
 
78
78
  5. **Copy requirement document**: Copy user's requirement document to `{iteration}/00.docs/`
79
79
  ```bash
80
- cp {user_requirement_file} speccrew-workspace/iterations/{number}-{type}-{name}/00.docs/
80
+ cp {user_requirement_file} {iterations_dir}/{number}-{type}-{name}/00.docs/
81
81
  ```
82
82
 
83
83
  6. **Store iteration path** for use in subsequent phases:
84
- - `iteration_path` = `speccrew-workspace/iterations/{number}-{type}-{name}`
84
+ - `iteration_path` = `{iterations_dir}/{number}-{type}-{name}`
85
85
  - `iteration_name` = `{number}-{type}-{name}`
86
86
 
87
87
  ### 0.1.1 Load or Initialize Workflow Progress
88
88
 
89
- 1. **Find Active Iteration**: Use Glob to search for `speccrew-workspace/iterations/*/WORKFLOW-PROGRESS.json`
89
+ 1. **Find Active Iteration**: Use Glob to search for `{iterations_dir}/*/WORKFLOW-PROGRESS.json`
90
90
  2. **If WORKFLOW-PROGRESS.json exists**:
91
91
  - Read the file to get current stage and status
92
92
  - If `current_stage` is not `01_prd`, this iteration may already be in progress at a later stage
@@ -94,8 +94,8 @@ Use Glob to search `speccrew-workspace/iterations/*/WORKFLOW-PROGRESS.json`
94
94
  3. **If WORKFLOW-PROGRESS.json does not exist**:
95
95
  - **MUST use script to initialize:**
96
96
  ```bash
97
- node speccrew-workspace/scripts/update-progress.js update-workflow \
98
- --file speccrew-workspace/iterations/{iteration}/WORKFLOW-PROGRESS.json \
97
+ node "{update_progress_script}" update-workflow \
98
+ --file {iterations_dir}/{iteration}/WORKFLOW-PROGRESS.json \
99
99
  --stage 01_prd --status in_progress
100
100
  ```
101
101
  - **Fallback** (ONLY if script file does not exist):
@@ -127,7 +127,7 @@ If `01_prd.status` is `in_progress` or resuming from an interrupted session:
127
127
 
128
128
  1. **Read checkpoints** (if file exists):
129
129
  ```bash
130
- node speccrew-workspace/scripts/update-progress.js read --file speccrew-workspace/iterations/{iteration}/01.product-requirement/.checkpoints.json --checkpoints
130
+ node "{update_progress_script}" read --file {iterations_dir}/{iteration}/01.product-requirement/.checkpoints.json --checkpoints
131
131
  ```
132
132
  - If the file does not exist → Start from Phase 1 (no previous progress)
133
133
 
@@ -170,7 +170,7 @@ IF .clarification-summary.md exists AND complexity == complex:
170
170
 
171
171
  5. **Check Sub-PRD Dispatch Resume** (if applicable):
172
172
  ```bash
173
- node speccrew-workspace/scripts/update-progress.js read --file speccrew-workspace/iterations/{iteration}/01.product-requirement/DISPATCH-PROGRESS.json --summary
173
+ node "{update_progress_script}" read --file {iterations_dir}/{iteration}/01.product-requirement/DISPATCH-PROGRESS.json --summary
174
174
  ```
175
175
  - Skip tasks with `status == "completed"`
176
176
  - Re-execute tasks with `status == "failed"`
@@ -209,12 +209,50 @@ Detect current IDE environment and determine skill loading strategy:
209
209
 
210
210
  1. **Detect IDE**: Check environment variables or context to identify current IDE (Claude Code, Cursor, Qoder, etc.)
211
211
  2. **Set skill_path**: Based on IDE detection result, set the appropriate skill search path
212
- 3. **Proceed to Knowledge Base Availability Check**
212
+ 3. **Proceed to Path Initialization**
213
+
214
+ ---
215
+
216
+ ## Phase 0.6: Path Initialization
217
+
218
+ After IDE detection, compute and store all absolute paths as workflow context variables. These paths MUST be used in ALL subsequent Worker dispatches and script invocations.
219
+
220
+ **Compute the following paths** (all MUST be absolute paths):
221
+
222
+ | Variable | Derivation | Example |
223
+ |----------|-----------|---------|
224
+ | `workspace_path` | Project root + `/speccrew-workspace` | `d:/dev/litemes/speccrew-workspace` |
225
+ | `sync_state_bizs_dir` | `{workspace_path}/knowledges/base/sync-state/knowledge-bizs` | `d:/dev/litemes/speccrew-workspace/knowledges/base/sync-state/knowledge-bizs` |
226
+ | `iterations_dir` | `{workspace_path}/iterations` | `d:/dev/litemes/speccrew-workspace/iterations` |
227
+ | `update_progress_script` | `{workspace_path}/scripts/update-progress.js` | `d:/dev/litemes/speccrew-workspace/scripts/update-progress.js` |
228
+ | `ide_skills_dir` | `{project_root}/{ide_config_dir}/skills` (from Phase 0.5) | `d:/dev/litemes/.qoder/skills` |
229
+ | `configs_dir` | `{workspace_path}/docs/configs` | `d:/dev/litemes/speccrew-workspace/docs/configs` |
230
+
231
+ > **MANDATORY**: These variables MUST be passed to every Worker dispatch. Workers MUST NOT construct paths themselves.
213
232
 
214
233
  ---
215
234
 
216
235
  ## Phase 1: Knowledge Base Availability Check
217
236
 
237
+ > 🛑 **CRITICAL CONSTRAINTS for Phase 1:**
238
+ >
239
+ > **MANDATORY — Skill-Based Execution:**
240
+ > - Step 1.1 (Knowledge Detection): MUST dispatch Worker with `speccrew-pm-knowledge-detector` skill. DO NOT manually search directories or construct status reports yourself.
241
+ > - Path B (Module Matching): MUST dispatch Worker with `speccrew-pm-module-matcher` skill.
242
+ > - Path C (Feature Inventory): MUST dispatch Worker with `speccrew-knowledge-bizs-init-features` skill. The Worker MUST execute `generate-inventory.js` script via terminal.
243
+ >
244
+ > **FORBIDDEN — Manual File Operations:**
245
+ > - DO NOT create `features-*.json` files manually via file write/create operations
246
+ > - DO NOT create `entry-dirs-*.json` files manually via file write/create operations
247
+ > - DO NOT create `sync-state` directories under `knowledges/techs/` — sync-state ONLY exists under `knowledges/base/`
248
+ > - ALL features and entry-dirs files MUST be generated by scripts executed via `run_in_terminal`
249
+ > - ⛔ PM Agent MUST NOT execute knowledge-base scripts (generate-inventory.js, etc.) via Bash — ALL script execution MUST happen inside Worker Agents
250
+ >
251
+ > **Output Path Rule:**
252
+ > - Features files: `{sync_state_bizs_dir}/features-{platform}.json`
253
+ > - Entry-dirs files: `{sync_state_bizs_dir}/entry-dirs-{platform}.json`
254
+ > - NEVER write to `knowledges/techs/*/sync-state/` or any other location
255
+
218
256
  > All knowledge base operations are executed via **Worker Agents** to preserve PM Agent context.
219
257
  > PM Agent only makes decisions based on Worker results — never reads large files directly.
220
258
 
@@ -224,7 +262,23 @@ Detect current IDE environment and determine skill loading strategy:
224
262
 
225
263
  | Parameter | Value |
226
264
  |-----------|-------|
227
- | `workspace_path` | `speccrew-workspace` |
265
+ | `workspace_path` | `{workspace_path}` (absolute path from Phase 0.6) |
266
+ | `sync_state_bizs_dir` | `{sync_state_bizs_dir}` (absolute path from Phase 0.6) |
267
+ | `configs_dir` | `{configs_dir}` (absolute path from Phase 0.6) |
268
+
269
+ > **MANDATORY**: Dispatch Worker with the detector skill. DO NOT manually search directories or check file existence yourself.
270
+
271
+ **Agent Tool Invocation Format**:
272
+ ```
273
+ Use the Agent tool to invoke speccrew-task-worker:
274
+ - agent: speccrew-task-worker
275
+ - task: Execute speccrew-pm-knowledge-detector skill
276
+ - context:
277
+ skill: speccrew-pm-knowledge-detector
278
+ workspace_path: {workspace_path}
279
+ sync_state_bizs_dir: {sync_state_bizs_dir}
280
+ configs_dir: {configs_dir}
281
+ ```
228
282
 
229
283
  **Worker returns** a JSON status object:
230
284
 
@@ -261,6 +315,17 @@ Feature inventory exists but detailed analysis may be incomplete.
261
315
  | `requirement_text` | User's requirement description |
262
316
  | `features_files` | From detector result |
263
317
  | `language` | Detected user language |
318
+ | `sync_state_bizs_dir` | `{sync_state_bizs_dir}` (absolute path from Phase 0.6) |
319
+
320
+ **Agent Tool Invocation Format**:
321
+ ```
322
+ Use the Agent tool to invoke speccrew-task-worker:
323
+ - agent: speccrew-task-worker
324
+ - task: Execute speccrew-pm-module-matcher skill
325
+ - context:
326
+ skill: speccrew-pm-module-matcher
327
+ sync_state_bizs_dir: {sync_state_bizs_dir}
328
+ ```
264
329
 
265
330
  2. **Worker returns** matched modules with confidence levels
266
331
 
@@ -321,8 +386,36 @@ No knowledge base exists. A lightweight feature inventory scan is triggered to d
321
386
  | Parameter | Value |
322
387
  |-----------|-------|
323
388
  | `skill` | `speccrew-knowledge-bizs-init-features` |
324
- | `workspace_path` | `speccrew-workspace` |
389
+ | `workspace_path` | `{workspace_path}` (absolute path from Phase 0.6) |
325
390
  | `language` | Detected user language |
391
+ | `sync_state_bizs_dir` | `{sync_state_bizs_dir}` (absolute path from Phase 0.6) |
392
+ | `configs_dir` | `{configs_dir}` (absolute path from Phase 0.6) |
393
+ | `ide_skills_dir` | `{ide_skills_dir}` (absolute path from Phase 0.6) |
394
+
395
+ > 🛑 **MANDATORY**: You MUST dispatch this as a Worker Agent task with the exact skill name above.
396
+ > **DO NOT** skip the Worker dispatch and perform the scan yourself.
397
+ > **DO NOT** manually create features-*.json files — they MUST be generated by the script inside the skill.
398
+ > **DO NOT** write any files to `knowledges/techs/*/` — output goes to `knowledges/base/sync-state/knowledge-bizs/` ONLY.
399
+
400
+ **Agent Tool Invocation Format** (you MUST follow this exact format):
401
+ ```
402
+ Use the Agent tool to invoke speccrew-task-worker:
403
+ - agent: speccrew-task-worker
404
+ - task: Execute speccrew-knowledge-bizs-init-features skill
405
+ - context:
406
+ skill: speccrew-knowledge-bizs-init-features
407
+ workspace_path: {workspace_path}
408
+ language: {language}
409
+ sync_state_bizs_dir: {sync_state_bizs_dir}
410
+ configs_dir: {configs_dir}
411
+ ide_skills_dir: {ide_skills_dir}
412
+ ```
413
+
414
+ > ⛔ **CRITICAL ENFORCEMENT**:
415
+ > - You MUST use the **Agent tool** to invoke `speccrew-task-worker` — this is the ONLY permitted way to execute this step
416
+ > - DO NOT use Bash tool to run generate-inventory.js directly — PM Agent must NOT execute knowledge scripts itself
417
+ > - DO NOT use Write tool to manually create features-*.json or entry-dirs-*.json
418
+ > - If you lack the Agent tool → STOP and REPORT ERROR to user before proceeding
326
419
 
327
420
  - Worker scans project structure to discover platforms and modules
328
421
  - Worker generates `features-*.json` files (metadata: module names, feature counts, file paths)
@@ -416,7 +509,7 @@ Pass the following parameters to the skill:
416
509
  | Parameter | Value | Description |
417
510
  |-----------|-------|-------------|
418
511
  | `requirement_file` | Path to user's requirement document | Original requirement input |
419
- | `iteration_path` | `speccrew-workspace/iterations/{iteration}` | Current iteration directory |
512
+ | `iteration_path` | `{iterations_dir}/{iteration}` (absolute path from Phase 0.6) | Current iteration directory |
420
513
  | `complexity_hint` | `simple` or `complex` (from Phase 2 assessment) | Complexity assessment result |
421
514
  | `knowledge_status` | `full` / `lite` / `none` (from Phase 1) | Knowledge base availability for clarification strategy |
422
515
 
@@ -534,7 +627,7 @@ Clarification File: {iteration_path}/01.product-requirement/.clarification-summa
534
627
  - **IF user confirms** (explicit "确认" or "OK"):
535
628
  1. Update checkpoint to record user confirmation:
536
629
  ```bash
537
- node speccrew-workspace/scripts/update-progress.js write-checkpoint \
630
+ node "{update_progress_script}" write-checkpoint \
538
631
  --file {iteration_path}/01.product-requirement/.checkpoints.json \
539
632
  --stage 01_prd \
540
633
  --checkpoint requirement_clarification_confirmed \
@@ -586,7 +679,7 @@ Invoke speccrew-pm-requirement-simple
586
679
  **Parameters:**
587
680
  | Parameter | Value |
588
681
  |-----------|-------|
589
- | `iteration_path` | `speccrew-workspace/iterations/{iteration}` |
682
+ | `iteration_path` | `{iterations_dir}/{iteration}` (absolute path from Phase 0.6) |
590
683
  | `clarification_file` | `{iteration_path}/01.product-requirement/.clarification-summary.md` |
591
684
 
592
685
  ---
@@ -614,13 +707,13 @@ Step 4b: Invoke speccrew-pm-requirement-analysis
614
707
  **Step 4a Parameters:**
615
708
  | Parameter | Value |
616
709
  |-----------|-------|
617
- | `iteration_path` | `speccrew-workspace/iterations/{iteration}` |
710
+ | `iteration_path` | `{iterations_dir}/{iteration}` (absolute path from Phase 0.6) |
618
711
  | `clarification_file` | `{iteration_path}/01.product-requirement/.clarification-summary.md` |
619
712
 
620
713
  **Step 4b Parameters:**
621
714
  | Parameter | Value |
622
715
  |-----------|-------|
623
- | `iteration_path` | `speccrew-workspace/iterations/{iteration}` |
716
+ | `iteration_path` | `{iterations_dir}/{iteration}` (absolute path from Phase 0.6) |
624
717
  | `clarification_file` | `{iteration_path}/01.product-requirement/.clarification-summary.md` |
625
718
  | `module_design_file` | `{iteration_path}/01.product-requirement/.module-design.md` |
626
719
 
@@ -732,7 +825,7 @@ Step 4b: Invoke speccrew-pm-requirement-analysis
732
825
  >
733
826
  > 1. **DO NOT skip Phase 5 when Master-Sub structure is present** — If the Skill output indicates "Master-Sub PRD structure", Phase 5 MUST execute.
734
827
  > 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.
735
- > 3. **DO NOT create DISPATCH-PROGRESS.json manually** — Use the script: `node speccrew-workspace/scripts/update-progress.js init --stage sub_prd_dispatch --tasks-file <TASKS_FILE>`.
828
+ > 3. **DO NOT create DISPATCH-PROGRESS.json manually** — Use the script: `node "{update_progress_script}" init --stage sub_prd_dispatch --tasks-file <TASKS_FILE>`.
736
829
  > 4. **DO NOT dispatch Sub-PRDs sequentially** — All workers MUST execute in parallel (batch of 6 if modules > 6).
737
830
  > 5. **DO NOT proceed to Phase 6 without verification** — After ALL workers complete, execute Phase 6 Verification Checklist before presenting to user.
738
831
  >
@@ -866,36 +959,36 @@ From the Skill's Step 12c output, collect:
866
959
  ```bash
867
960
  # Write tasks to temp file inside iteration directory
868
961
  # Create .tasks-temp.json with task array content
869
- node speccrew-workspace/scripts/update-progress.js init \
870
- --file speccrew-workspace/iterations/{iteration}/01.product-requirement/DISPATCH-PROGRESS.json \
962
+ node "{update_progress_script}" init \
963
+ --file {iterations_dir}/{iteration}/01.product-requirement/DISPATCH-PROGRESS.json \
871
964
  --stage sub_prd_dispatch \
872
- --tasks-file speccrew-workspace/iterations/{iteration}/01.product-requirement/.tasks-temp.json
965
+ --tasks-file {iterations_dir}/{iteration}/01.product-requirement/.tasks-temp.json
873
966
  # Delete .tasks-temp.json after successful init
874
967
  ```
875
968
 
876
969
  > **PowerShell Compatibility Note:**
877
970
  > PowerShell cannot properly parse JSON in command-line arguments. Use file-based approach:
878
971
  > 1. Write tasks JSON to a temporary file (e.g., `tasks-temp.json`)
879
- > 2. Read file content in the command: `node scripts/update-progress.js init --stage sub_prd_dispatch --tasks (Get-Content tasks-temp.json -Raw)`
880
- > 3. Or use: `Get-Content tasks-temp.json | node scripts/update-progress.js init --stage sub_prd_dispatch --tasks -`
972
+ > 2. Read file content in the command: `node "{update_progress_script}" init --stage sub_prd_dispatch --tasks (Get-Content tasks-temp.json -Raw)`
973
+ > 3. Or use: `Get-Content tasks-temp.json | node "{update_progress_script}" init --stage sub_prd_dispatch --tasks -`
881
974
 
882
975
  > 🛑 **HARD STOP: DISPATCH-PROGRESS.json MUST be created by script ONLY**
883
- > - MUST use: `node speccrew-workspace/scripts/update-progress.js init --stage sub_prd_dispatch --tasks-file <TASKS_FILE>`
976
+ > - MUST use: `node "{update_progress_script}" init --stage sub_prd_dispatch --tasks-file <TASKS_FILE>`
884
977
  > - DO NOT create DISPATCH-PROGRESS.json manually (PowerShell, create_file, or any other method)
885
978
  > - IF script fails → STOP workflow immediately, report error to user, ask "Retry or Abort?"
886
979
  > - DO NOT proceed to Worker dispatch without successful script execution
887
980
 
888
981
  After each worker completes:
889
982
  ```bash
890
- node speccrew-workspace/scripts/update-progress.js update-task \
891
- --file speccrew-workspace/iterations/{iteration}/01.product-requirement/DISPATCH-PROGRESS.json \
983
+ node "{update_progress_script}" update-task \
984
+ --file {iterations_dir}/{iteration}/01.product-requirement/DISPATCH-PROGRESS.json \
892
985
  --task {module_key} --status completed
893
986
  ```
894
987
 
895
988
  If a worker fails:
896
989
  ```bash
897
- node speccrew-workspace/scripts/update-progress.js update-task \
898
- --file speccrew-workspace/iterations/{iteration}/01.product-requirement/DISPATCH-PROGRESS.json \
990
+ node "{update_progress_script}" update-task \
991
+ --file {iterations_dir}/{iteration}/01.product-requirement/DISPATCH-PROGRESS.json \
899
992
  --task {module_key} --status failed --error "{error_message}"
900
993
  ```
901
994
 
@@ -927,7 +1020,7 @@ For EACH module in the dispatch plan, invoke a new `speccrew-task-worker` agent:
927
1020
  - `module_key`: from dispatch plan
928
1021
  - `master_prd_path`: path to Master PRD
929
1022
  - `template_path`: PRD template path (from Step 7 glob search result)
930
- - `output_dir`: `speccrew-workspace/iterations/{iteration}/01.product-requirement/`
1023
+ - `output_dir`: `{iterations_dir}/{iteration}/01.product-requirement/` (absolute path from Phase 0.6)
931
1024
 
932
1025
  Each worker receives:
933
1026
  - `skill_path`: `speccrew-pm-sub-prd-generate/SKILL.md`
@@ -1169,13 +1262,13 @@ Now update all checkpoints (user has confirmed):
1169
1262
 
1170
1263
  ```bash
1171
1264
  # Update verification_checklist checkpoint
1172
- node speccrew-workspace/scripts/update-progress.js write-checkpoint \
1265
+ node "{update_progress_script}" write-checkpoint \
1173
1266
  --file {iteration_path}/01.product-requirement/.checkpoints.json \
1174
1267
  --checkpoint verification_checklist \
1175
1268
  --passed true
1176
1269
 
1177
1270
  # Update prd_review checkpoint
1178
- node speccrew-workspace/scripts/update-progress.js write-checkpoint \
1271
+ node "{update_progress_script}" write-checkpoint \
1179
1272
  --file {iteration_path}/01.product-requirement/.checkpoints.json \
1180
1273
  --checkpoint prd_review \
1181
1274
  --passed true
@@ -1184,8 +1277,8 @@ node speccrew-workspace/scripts/update-progress.js write-checkpoint \
1184
1277
  **5.3.2 Update WORKFLOW-PROGRESS.json**
1185
1278
 
1186
1279
  ```bash
1187
- node speccrew-workspace/scripts/update-progress.js update-workflow \
1188
- --file speccrew-workspace/iterations/{iteration}/WORKFLOW-PROGRESS.json \
1280
+ node "{update_progress_script}" update-workflow \
1281
+ --file {iterations_dir}/{iteration}/WORKFLOW-PROGRESS.json \
1189
1282
  --stage 01_prd --status completed
1190
1283
  ```
1191
1284
 
@@ -1220,17 +1313,17 @@ DO NOT proceed to Feature Design in this conversation.
1220
1313
 
1221
1314
  | Deliverable | Path | Notes |
1222
1315
  |-------------|------|-------|
1223
- | Clarification Summary | `speccrew-workspace/iterations/{number}-{type}-{name}/01.product-requirement/.clarification-summary.md` | Generated by `speccrew-pm-requirement-clarify` |
1224
- | Module Design (complex) | `speccrew-workspace/iterations/{number}-{type}-{name}/01.product-requirement/.module-design.md` | Generated by `speccrew-pm-requirement-model` |
1225
- | Master PRD (complex) | `speccrew-workspace/iterations/{number}-{type}-{name}/01.product-requirement/[feature-name]-prd.md` | Generated by `speccrew-pm-requirement-analysis` |
1226
- | Single PRD (simple) | `speccrew-workspace/iterations/{number}-{type}-{name}/01.product-requirement/[feature-name]-prd.md` | Generated by `speccrew-pm-requirement-simple` |
1227
- | 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 |
1316
+ | Clarification Summary | `{iterations_dir}/{number}-{type}-{name}/01.product-requirement/.clarification-summary.md` | Generated by `speccrew-pm-requirement-clarify` |
1317
+ | Module Design (complex) | `{iterations_dir}/{number}-{type}-{name}/01.product-requirement/.module-design.md` | Generated by `speccrew-pm-requirement-model` |
1318
+ | Master PRD (complex) | `{iterations_dir}/{number}-{type}-{name}/01.product-requirement/[feature-name]-prd.md` | Generated by `speccrew-pm-requirement-analysis` |
1319
+ | Single PRD (simple) | `{iterations_dir}/{number}-{type}-{name}/01.product-requirement/[feature-name]-prd.md` | Generated by `speccrew-pm-requirement-simple` |
1320
+ | Sub-PRD Documents (complex) | `{iterations_dir}/{number}-{type}-{name}/01.product-requirement/[feature-name]-sub-[module].md` | One per module, generated by worker dispatch |
1228
1321
 
1229
1322
  # Script Usage Reference
1230
1323
 
1231
1324
  ## update-progress.js Commands
1232
1325
 
1233
- The `speccrew-workspace/scripts/update-progress.js` script supports the following commands:
1326
+ The `{update_progress_script}` script supports the following commands:
1234
1327
 
1235
1328
  | Command | Purpose | Key Parameters |
1236
1329
  |---------|---------|----------------|
@@ -1242,6 +1335,8 @@ The `speccrew-workspace/scripts/update-progress.js` script supports the followin
1242
1335
  | `update-workflow` | Update workflow stage status | `--file`, `--stage`, `--status` |
1243
1336
  | `init-tasks` | Generate tasks from feature-spec files | `--file`, `--stage`, `--features-dir`, `--platforms` |
1244
1337
 
1338
+ > **Note**: All script invocations MUST use `{update_progress_script}` variable (absolute path from Phase 0.6) instead of relative path.
1339
+
1245
1340
  ## PowerShell JSON Parameter Handling
1246
1341
 
1247
1342
  > ⚠️ **CRITICAL: PowerShell cannot reliably pass JSON strings as command-line arguments.**
@@ -1253,12 +1348,12 @@ The `speccrew-workspace/scripts/update-progress.js` script supports the followin
1253
1348
 
1254
1349
  ```powershell
1255
1350
  # ❌ WRONG — PowerShell will mangle the JSON string
1256
- node speccrew-workspace/scripts/update-progress.js init --file progress.json --stage "01_prd" --tasks '[{"id":"task1"}]'
1351
+ node "{update_progress_script}" init --file progress.json --stage "01_prd" --tasks '[{"id":"task1"}]'
1257
1352
 
1258
1353
  # ✅ CORRECT — Write JSON to a temp file first, then use --tasks-file
1259
1354
  # Step 1: Write tasks to a temp file inside speccrew-workspace
1260
1355
  # Step 2: Use --tasks-file parameter
1261
- node speccrew-workspace/scripts/update-progress.js init --file progress.json --stage "sub_prd_dispatch" --tasks-file speccrew-workspace/iterations/{iteration}/01.product-requirement/.tasks-temp.json
1356
+ node "{update_progress_script}" init --file progress.json --stage "sub_prd_dispatch" --tasks-file {iterations_dir}/{iteration}/01.product-requirement/.tasks-temp.json
1262
1357
  # Step 3: Delete the temp file after use
1263
1358
  ```
1264
1359