speccrew 0.6.5 → 0.6.8
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-feature-designer.md +25 -20
- package/.speccrew/agents/speccrew-product-manager.md +99 -47
- package/.speccrew/agents/speccrew-system-designer.md +33 -28
- package/.speccrew/agents/speccrew-system-developer.md +34 -29
- package/.speccrew/agents/speccrew-test-manager.md +47 -42
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +119 -142
- package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +162 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +76 -115
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +23 -6
- package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +8 -4
- package/package.json +1 -1
- package/workspace-template/scripts/path-utils.js +134 -0
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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: `
|
|
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: `
|
|
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 `
|
|
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
|
-
|
|
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 `
|
|
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
|
|
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`: `
|
|
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
|
|
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
|
|
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
|
|
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`: `
|
|
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`: `
|
|
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
|
|
672
|
-
--file
|
|
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 | `
|
|
686
|
-
| API Contract | `
|
|
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
|
|
|
@@ -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
|
-
- `
|
|
32
|
-
- `
|
|
33
|
-
- `
|
|
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 `
|
|
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 `
|
|
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
|
|
75
|
-
mkdir -p
|
|
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}
|
|
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` = `
|
|
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 `
|
|
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
|
|
98
|
-
--file
|
|
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
|
|
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
|
|
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,49 @@ 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
|
|
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
|
+
>
|
|
250
|
+
> **Output Path Rule:**
|
|
251
|
+
> - Features files: `{sync_state_bizs_dir}/features-{platform}.json`
|
|
252
|
+
> - Entry-dirs files: `{sync_state_bizs_dir}/entry-dirs-{platform}.json`
|
|
253
|
+
> - NEVER write to `knowledges/techs/*/sync-state/` or any other location
|
|
254
|
+
|
|
218
255
|
> All knowledge base operations are executed via **Worker Agents** to preserve PM Agent context.
|
|
219
256
|
> PM Agent only makes decisions based on Worker results — never reads large files directly.
|
|
220
257
|
|
|
@@ -224,7 +261,11 @@ Detect current IDE environment and determine skill loading strategy:
|
|
|
224
261
|
|
|
225
262
|
| Parameter | Value |
|
|
226
263
|
|-----------|-------|
|
|
227
|
-
| `workspace_path` | `
|
|
264
|
+
| `workspace_path` | `{workspace_path}` (absolute path from Phase 0.6) |
|
|
265
|
+
| `sync_state_bizs_dir` | `{sync_state_bizs_dir}` (absolute path from Phase 0.6) |
|
|
266
|
+
| `configs_dir` | `{configs_dir}` (absolute path from Phase 0.6) |
|
|
267
|
+
|
|
268
|
+
> **MANDATORY**: Dispatch Worker with the detector skill. DO NOT manually search directories or check file existence yourself.
|
|
228
269
|
|
|
229
270
|
**Worker returns** a JSON status object:
|
|
230
271
|
|
|
@@ -261,6 +302,7 @@ Feature inventory exists but detailed analysis may be incomplete.
|
|
|
261
302
|
| `requirement_text` | User's requirement description |
|
|
262
303
|
| `features_files` | From detector result |
|
|
263
304
|
| `language` | Detected user language |
|
|
305
|
+
| `sync_state_bizs_dir` | `{sync_state_bizs_dir}` (absolute path from Phase 0.6) |
|
|
264
306
|
|
|
265
307
|
2. **Worker returns** matched modules with confidence levels
|
|
266
308
|
|
|
@@ -321,8 +363,16 @@ No knowledge base exists. A lightweight feature inventory scan is triggered to d
|
|
|
321
363
|
| Parameter | Value |
|
|
322
364
|
|-----------|-------|
|
|
323
365
|
| `skill` | `speccrew-knowledge-bizs-init-features` |
|
|
324
|
-
| `workspace_path` | `
|
|
366
|
+
| `workspace_path` | `{workspace_path}` (absolute path from Phase 0.6) |
|
|
325
367
|
| `language` | Detected user language |
|
|
368
|
+
| `sync_state_bizs_dir` | `{sync_state_bizs_dir}` (absolute path from Phase 0.6) |
|
|
369
|
+
| `configs_dir` | `{configs_dir}` (absolute path from Phase 0.6) |
|
|
370
|
+
| `ide_skills_dir` | `{ide_skills_dir}` (absolute path from Phase 0.6) |
|
|
371
|
+
|
|
372
|
+
> 🛑 **MANDATORY**: You MUST dispatch this as a Worker Agent task with the exact skill name above.
|
|
373
|
+
> **DO NOT** skip the Worker dispatch and perform the scan yourself.
|
|
374
|
+
> **DO NOT** manually create features-*.json files — they MUST be generated by the script inside the skill.
|
|
375
|
+
> **DO NOT** write any files to `knowledges/techs/*/` — output goes to `knowledges/base/sync-state/knowledge-bizs/` ONLY.
|
|
326
376
|
|
|
327
377
|
- Worker scans project structure to discover platforms and modules
|
|
328
378
|
- Worker generates `features-*.json` files (metadata: module names, feature counts, file paths)
|
|
@@ -416,7 +466,7 @@ Pass the following parameters to the skill:
|
|
|
416
466
|
| Parameter | Value | Description |
|
|
417
467
|
|-----------|-------|-------------|
|
|
418
468
|
| `requirement_file` | Path to user's requirement document | Original requirement input |
|
|
419
|
-
| `iteration_path` | `
|
|
469
|
+
| `iteration_path` | `{iterations_dir}/{iteration}` (absolute path from Phase 0.6) | Current iteration directory |
|
|
420
470
|
| `complexity_hint` | `simple` or `complex` (from Phase 2 assessment) | Complexity assessment result |
|
|
421
471
|
| `knowledge_status` | `full` / `lite` / `none` (from Phase 1) | Knowledge base availability for clarification strategy |
|
|
422
472
|
|
|
@@ -534,7 +584,7 @@ Clarification File: {iteration_path}/01.product-requirement/.clarification-summa
|
|
|
534
584
|
- **IF user confirms** (explicit "确认" or "OK"):
|
|
535
585
|
1. Update checkpoint to record user confirmation:
|
|
536
586
|
```bash
|
|
537
|
-
node
|
|
587
|
+
node "{update_progress_script}" write-checkpoint \
|
|
538
588
|
--file {iteration_path}/01.product-requirement/.checkpoints.json \
|
|
539
589
|
--stage 01_prd \
|
|
540
590
|
--checkpoint requirement_clarification_confirmed \
|
|
@@ -586,7 +636,7 @@ Invoke speccrew-pm-requirement-simple
|
|
|
586
636
|
**Parameters:**
|
|
587
637
|
| Parameter | Value |
|
|
588
638
|
|-----------|-------|
|
|
589
|
-
| `iteration_path` | `
|
|
639
|
+
| `iteration_path` | `{iterations_dir}/{iteration}` (absolute path from Phase 0.6) |
|
|
590
640
|
| `clarification_file` | `{iteration_path}/01.product-requirement/.clarification-summary.md` |
|
|
591
641
|
|
|
592
642
|
---
|
|
@@ -614,13 +664,13 @@ Step 4b: Invoke speccrew-pm-requirement-analysis
|
|
|
614
664
|
**Step 4a Parameters:**
|
|
615
665
|
| Parameter | Value |
|
|
616
666
|
|-----------|-------|
|
|
617
|
-
| `iteration_path` | `
|
|
667
|
+
| `iteration_path` | `{iterations_dir}/{iteration}` (absolute path from Phase 0.6) |
|
|
618
668
|
| `clarification_file` | `{iteration_path}/01.product-requirement/.clarification-summary.md` |
|
|
619
669
|
|
|
620
670
|
**Step 4b Parameters:**
|
|
621
671
|
| Parameter | Value |
|
|
622
672
|
|-----------|-------|
|
|
623
|
-
| `iteration_path` | `
|
|
673
|
+
| `iteration_path` | `{iterations_dir}/{iteration}` (absolute path from Phase 0.6) |
|
|
624
674
|
| `clarification_file` | `{iteration_path}/01.product-requirement/.clarification-summary.md` |
|
|
625
675
|
| `module_design_file` | `{iteration_path}/01.product-requirement/.module-design.md` |
|
|
626
676
|
|
|
@@ -732,7 +782,7 @@ Step 4b: Invoke speccrew-pm-requirement-analysis
|
|
|
732
782
|
>
|
|
733
783
|
> 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
784
|
> 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
|
|
785
|
+
> 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
786
|
> 4. **DO NOT dispatch Sub-PRDs sequentially** — All workers MUST execute in parallel (batch of 6 if modules > 6).
|
|
737
787
|
> 5. **DO NOT proceed to Phase 6 without verification** — After ALL workers complete, execute Phase 6 Verification Checklist before presenting to user.
|
|
738
788
|
>
|
|
@@ -866,36 +916,36 @@ From the Skill's Step 12c output, collect:
|
|
|
866
916
|
```bash
|
|
867
917
|
# Write tasks to temp file inside iteration directory
|
|
868
918
|
# Create .tasks-temp.json with task array content
|
|
869
|
-
node
|
|
870
|
-
--file
|
|
919
|
+
node "{update_progress_script}" init \
|
|
920
|
+
--file {iterations_dir}/{iteration}/01.product-requirement/DISPATCH-PROGRESS.json \
|
|
871
921
|
--stage sub_prd_dispatch \
|
|
872
|
-
--tasks-file
|
|
922
|
+
--tasks-file {iterations_dir}/{iteration}/01.product-requirement/.tasks-temp.json
|
|
873
923
|
# Delete .tasks-temp.json after successful init
|
|
874
924
|
```
|
|
875
925
|
|
|
876
926
|
> **PowerShell Compatibility Note:**
|
|
877
927
|
> PowerShell cannot properly parse JSON in command-line arguments. Use file-based approach:
|
|
878
928
|
> 1. Write tasks JSON to a temporary file (e.g., `tasks-temp.json`)
|
|
879
|
-
> 2. Read file content in the command: `node
|
|
880
|
-
> 3. Or use: `Get-Content tasks-temp.json | node
|
|
929
|
+
> 2. Read file content in the command: `node "{update_progress_script}" init --stage sub_prd_dispatch --tasks (Get-Content tasks-temp.json -Raw)`
|
|
930
|
+
> 3. Or use: `Get-Content tasks-temp.json | node "{update_progress_script}" init --stage sub_prd_dispatch --tasks -`
|
|
881
931
|
|
|
882
932
|
> 🛑 **HARD STOP: DISPATCH-PROGRESS.json MUST be created by script ONLY**
|
|
883
|
-
> - MUST use: `node
|
|
933
|
+
> - MUST use: `node "{update_progress_script}" init --stage sub_prd_dispatch --tasks-file <TASKS_FILE>`
|
|
884
934
|
> - DO NOT create DISPATCH-PROGRESS.json manually (PowerShell, create_file, or any other method)
|
|
885
935
|
> - IF script fails → STOP workflow immediately, report error to user, ask "Retry or Abort?"
|
|
886
936
|
> - DO NOT proceed to Worker dispatch without successful script execution
|
|
887
937
|
|
|
888
938
|
After each worker completes:
|
|
889
939
|
```bash
|
|
890
|
-
node
|
|
891
|
-
--file
|
|
940
|
+
node "{update_progress_script}" update-task \
|
|
941
|
+
--file {iterations_dir}/{iteration}/01.product-requirement/DISPATCH-PROGRESS.json \
|
|
892
942
|
--task {module_key} --status completed
|
|
893
943
|
```
|
|
894
944
|
|
|
895
945
|
If a worker fails:
|
|
896
946
|
```bash
|
|
897
|
-
node
|
|
898
|
-
--file
|
|
947
|
+
node "{update_progress_script}" update-task \
|
|
948
|
+
--file {iterations_dir}/{iteration}/01.product-requirement/DISPATCH-PROGRESS.json \
|
|
899
949
|
--task {module_key} --status failed --error "{error_message}"
|
|
900
950
|
```
|
|
901
951
|
|
|
@@ -927,7 +977,7 @@ For EACH module in the dispatch plan, invoke a new `speccrew-task-worker` agent:
|
|
|
927
977
|
- `module_key`: from dispatch plan
|
|
928
978
|
- `master_prd_path`: path to Master PRD
|
|
929
979
|
- `template_path`: PRD template path (from Step 7 glob search result)
|
|
930
|
-
- `output_dir`: `
|
|
980
|
+
- `output_dir`: `{iterations_dir}/{iteration}/01.product-requirement/` (absolute path from Phase 0.6)
|
|
931
981
|
|
|
932
982
|
Each worker receives:
|
|
933
983
|
- `skill_path`: `speccrew-pm-sub-prd-generate/SKILL.md`
|
|
@@ -1169,13 +1219,13 @@ Now update all checkpoints (user has confirmed):
|
|
|
1169
1219
|
|
|
1170
1220
|
```bash
|
|
1171
1221
|
# Update verification_checklist checkpoint
|
|
1172
|
-
node
|
|
1222
|
+
node "{update_progress_script}" write-checkpoint \
|
|
1173
1223
|
--file {iteration_path}/01.product-requirement/.checkpoints.json \
|
|
1174
1224
|
--checkpoint verification_checklist \
|
|
1175
1225
|
--passed true
|
|
1176
1226
|
|
|
1177
1227
|
# Update prd_review checkpoint
|
|
1178
|
-
node
|
|
1228
|
+
node "{update_progress_script}" write-checkpoint \
|
|
1179
1229
|
--file {iteration_path}/01.product-requirement/.checkpoints.json \
|
|
1180
1230
|
--checkpoint prd_review \
|
|
1181
1231
|
--passed true
|
|
@@ -1184,8 +1234,8 @@ node speccrew-workspace/scripts/update-progress.js write-checkpoint \
|
|
|
1184
1234
|
**5.3.2 Update WORKFLOW-PROGRESS.json**
|
|
1185
1235
|
|
|
1186
1236
|
```bash
|
|
1187
|
-
node
|
|
1188
|
-
--file
|
|
1237
|
+
node "{update_progress_script}" update-workflow \
|
|
1238
|
+
--file {iterations_dir}/{iteration}/WORKFLOW-PROGRESS.json \
|
|
1189
1239
|
--stage 01_prd --status completed
|
|
1190
1240
|
```
|
|
1191
1241
|
|
|
@@ -1220,17 +1270,17 @@ DO NOT proceed to Feature Design in this conversation.
|
|
|
1220
1270
|
|
|
1221
1271
|
| Deliverable | Path | Notes |
|
|
1222
1272
|
|-------------|------|-------|
|
|
1223
|
-
| Clarification Summary | `
|
|
1224
|
-
| Module Design (complex) | `
|
|
1225
|
-
| Master PRD (complex) | `
|
|
1226
|
-
| Single PRD (simple) | `
|
|
1227
|
-
| Sub-PRD Documents (complex) | `
|
|
1273
|
+
| Clarification Summary | `{iterations_dir}/{number}-{type}-{name}/01.product-requirement/.clarification-summary.md` | Generated by `speccrew-pm-requirement-clarify` |
|
|
1274
|
+
| Module Design (complex) | `{iterations_dir}/{number}-{type}-{name}/01.product-requirement/.module-design.md` | Generated by `speccrew-pm-requirement-model` |
|
|
1275
|
+
| Master PRD (complex) | `{iterations_dir}/{number}-{type}-{name}/01.product-requirement/[feature-name]-prd.md` | Generated by `speccrew-pm-requirement-analysis` |
|
|
1276
|
+
| Single PRD (simple) | `{iterations_dir}/{number}-{type}-{name}/01.product-requirement/[feature-name]-prd.md` | Generated by `speccrew-pm-requirement-simple` |
|
|
1277
|
+
| 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
1278
|
|
|
1229
1279
|
# Script Usage Reference
|
|
1230
1280
|
|
|
1231
1281
|
## update-progress.js Commands
|
|
1232
1282
|
|
|
1233
|
-
The `
|
|
1283
|
+
The `{update_progress_script}` script supports the following commands:
|
|
1234
1284
|
|
|
1235
1285
|
| Command | Purpose | Key Parameters |
|
|
1236
1286
|
|---------|---------|----------------|
|
|
@@ -1242,6 +1292,8 @@ The `speccrew-workspace/scripts/update-progress.js` script supports the followin
|
|
|
1242
1292
|
| `update-workflow` | Update workflow stage status | `--file`, `--stage`, `--status` |
|
|
1243
1293
|
| `init-tasks` | Generate tasks from feature-spec files | `--file`, `--stage`, `--features-dir`, `--platforms` |
|
|
1244
1294
|
|
|
1295
|
+
> **Note**: All script invocations MUST use `{update_progress_script}` variable (absolute path from Phase 0.6) instead of relative path.
|
|
1296
|
+
|
|
1245
1297
|
## PowerShell JSON Parameter Handling
|
|
1246
1298
|
|
|
1247
1299
|
> ⚠️ **CRITICAL: PowerShell cannot reliably pass JSON strings as command-line arguments.**
|
|
@@ -1253,12 +1305,12 @@ The `speccrew-workspace/scripts/update-progress.js` script supports the followin
|
|
|
1253
1305
|
|
|
1254
1306
|
```powershell
|
|
1255
1307
|
# ❌ WRONG — PowerShell will mangle the JSON string
|
|
1256
|
-
node
|
|
1308
|
+
node "{update_progress_script}" init --file progress.json --stage "01_prd" --tasks '[{"id":"task1"}]'
|
|
1257
1309
|
|
|
1258
1310
|
# ✅ CORRECT — Write JSON to a temp file first, then use --tasks-file
|
|
1259
1311
|
# Step 1: Write tasks to a temp file inside speccrew-workspace
|
|
1260
1312
|
# Step 2: Use --tasks-file parameter
|
|
1261
|
-
node
|
|
1313
|
+
node "{update_progress_script}" init --file progress.json --stage "sub_prd_dispatch" --tasks-file {iterations_dir}/{iteration}/01.product-requirement/.tasks-temp.json
|
|
1262
1314
|
# Step 3: Delete the temp file after use
|
|
1263
1315
|
```
|
|
1264
1316
|
|