speccrew 0.7.62 → 0.7.64
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 +5 -5
- package/.speccrew/agents/speccrew-product-manager.md +9 -9
- package/.speccrew/agents/speccrew-system-designer.md +45 -933
- package/.speccrew/agents/speccrew-task-worker.md +15 -15
- package/.speccrew/skills/speccrew-agentflow-manager/SKILL.md +7 -7
- package/.speccrew/skills/speccrew-deploy-build/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-deploy-migrate/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-deploy-smoke-test/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-deploy-startup/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-dev-desktop-electron/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-fd-feature-analyze/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-feature-designer-orchestration/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-pm-module-initializer/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-pm-module-matcher/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-pm-phase0-init/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-pm-phase1-knowledge-check/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-pm-phase2-complexity-assess/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-pm-phase5-subprd-dispatch/SKILL.md +8 -8
- package/.speccrew/skills/speccrew-pm-phase6-verify-confirm/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-product-manager-orchestration/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-sd-backend/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-sd-design-overview-generate/SKILL.md +3 -226
- package/.speccrew/skills/speccrew-sd-design-overview-generate/{workflow.agentflow.xml → SKILL.xml} +40 -0
- package/.speccrew/skills/speccrew-sd-desktop/SKILL.md +3 -284
- package/.speccrew/skills/speccrew-sd-desktop/SKILL.xml +545 -0
- package/.speccrew/skills/speccrew-sd-framework-evaluate/SKILL.md +3 -247
- package/.speccrew/skills/speccrew-sd-framework-evaluate/{workflow.agentflow.xml → SKILL.xml} +39 -0
- package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-system-deployer-orchestration/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-system-designer-orchestration/SKILL.md +4 -4
- package/.speccrew/skills/speccrew-system-developer-orchestration/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-task-worker-execution/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-team-leader-routing/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-test-case-design/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-test-manager-orchestration/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-test-reporter/SKILL.md +2 -2
- package/.speccrew/skills/speccrew-test-runner/SKILL.md +2 -2
- package/package.json +1 -1
- package/.speccrew/skills/speccrew-sd-desktop/workflow.agentflow.xml +0 -288
- /package/.speccrew/skills/speccrew-agentflow-manager/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-deploy-build/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-deploy-migrate/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-deploy-smoke-test/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-deploy-startup/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-dev-backend/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-dev-desktop-electron/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-dev-desktop-tauri/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-dev-frontend/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-dev-mobile/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-dev-review-backend/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-dev-review-desktop/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-dev-review-frontend/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-dev-review-mobile/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-fd-api-contract/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-fd-feature-analyze/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-fd-feature-design/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-feature-designer-orchestration/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-get-timestamp/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-bizs-init-features/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-graph-query/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-graph-write/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-module-summarize/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-system-summarize/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-techs-dispatch/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-techs-generate/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-techs-index/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-techs-init/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-pm-knowledge-detector/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-pm-module-initializer/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-pm-module-matcher/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-pm-phase0-init/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-pm-phase1-knowledge-check/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-pm-phase2-complexity-assess/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-pm-phase5-subprd-dispatch/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-pm-phase6-verify-confirm/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-pm-requirement-analysis/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-pm-requirement-assess/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-pm-requirement-clarify/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-pm-requirement-model/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-pm-requirement-simple/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-pm-sub-prd-generate/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-product-manager-orchestration/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-sd-backend/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-sd-frontend/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-sd-mobile/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-system-deployer-orchestration/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-system-designer-orchestration/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-system-developer-orchestration/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-task-worker-execution/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-team-leader-routing/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-test-case-design/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-test-code-gen/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-test-manager-orchestration/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-test-reporter/{workflow.agentflow.xml → SKILL.xml} +0 -0
- /package/.speccrew/skills/speccrew-test-runner/{workflow.agentflow.xml → SKILL.xml} +0 -0
|
@@ -60,26 +60,20 @@ This agent is an **orchestrator/dispatcher**. For system design execution (Phase
|
|
|
60
60
|
### Agent-Allowed Deliverables
|
|
61
61
|
|
|
62
62
|
This agent MAY directly create/modify ONLY the following files:
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
> Note: `framework-evaluation.md` is generated **ONLY** by the `speccrew-sd-framework-evaluate` skill.
|
|
69
|
-
> The Agent MUST NOT create or modify this file manually.
|
|
70
|
-
|
|
71
|
-
> Note: `DESIGN-OVERVIEW.md` is generated **ONLY** by the `speccrew-sd-design-overview-generate` skill dispatched to a worker agent.
|
|
72
|
-
> The Agent MUST NOT create or modify this file manually.
|
|
63
|
+
- `DISPATCH-PROGRESS.json` (via update-progress.js script only)
|
|
64
|
+
- `.checkpoints.json` (via update-progress.js script only)
|
|
65
|
+
- `INDEX.md` per platform directory (generated by worker dispatched with `index_only: true`)
|
|
66
|
+
- Progress summary messages to user
|
|
73
67
|
|
|
74
68
|
### FORBIDDEN Actions (When Features ≥ 2 OR Platforms ≥ 2)
|
|
75
69
|
|
|
76
|
-
1.
|
|
77
|
-
2.
|
|
78
|
-
3.
|
|
79
|
-
4.
|
|
80
|
-
5.
|
|
81
|
-
6.
|
|
82
|
-
7.
|
|
70
|
+
1. DO NOT invoke `speccrew-sd-backend` skill directly
|
|
71
|
+
2. DO NOT invoke `speccrew-sd-frontend` skill directly
|
|
72
|
+
3. DO NOT invoke `speccrew-sd-mobile` skill directly
|
|
73
|
+
4. DO NOT invoke `speccrew-sd-desktop` skill directly
|
|
74
|
+
5. DO NOT generate `*-design.md` files yourself
|
|
75
|
+
6. DO NOT generate INDEX.md directly — MUST dispatch worker with `index_only: true` in Phase 5.5
|
|
76
|
+
7. DO NOT create design document content as fallback if worker fails
|
|
83
77
|
|
|
84
78
|
### Violation Recovery
|
|
85
79
|
|
|
@@ -133,7 +127,7 @@ This agent MUST execute tasks continuously without unnecessary interruptions.
|
|
|
133
127
|
| Phase 4 | WORKER-DISPATCH + HARD STOP | DESIGN-OVERVIEW.md generation MUST be dispatched to speccrew-task-worker via **Agent tool**. After worker completes, present summary to user and WAIT for confirmation before Phase 5. |
|
|
134
128
|
| Phase 5 | SKILL-ONLY | Platform design workers MUST use platform-specific design skills. Agent MUST NOT write design documents itself |
|
|
135
129
|
| Phase 5 | SKIP-CONFIRMATION | Batch dispatch MUST include `skip_confirmation: true` and `skip_index_generation: true` in worker context. Workers skip Checkpoint A and Step 5 in batch mode |
|
|
136
|
-
| Phase 5 | WORKER-SELF-UPDATE | Batch dispatch MUST include `dispatch_progress_file` and `update_progress_script` in worker context. Workers self-update task status in DISPATCH-PROGRESS.json upon completion
|
|
130
|
+
| Phase 5 | WORKER-SELF-UPDATE | Batch dispatch MUST include `dispatch_progress_file` and `update_progress_script` in worker context. Workers self-update task status in DISPATCH-PROGRESS.json upon completion. Orchestrator's P5-B4-POST serves as fallback |
|
|
137
131
|
| Phase 5.5 | WORKER-DISPATCH-INDEX | After all workers complete, dispatch ONE worker per platform with `index_only: true` to generate INDEX.md. Orchestrator MUST NOT generate INDEX.md directly |
|
|
138
132
|
| Phase 6 | HARD STOP | User must confirm all designs before finalizing |
|
|
139
133
|
| ALL | ABORT ON FAILURE | If any skill invocation fails → STOP and report. Do NOT generate content manually as fallback |
|
|
@@ -159,949 +153,67 @@ This agent MUST execute tasks continuously without unnecessary interruptions.
|
|
|
159
153
|
|
|
160
154
|
# Workflow
|
|
161
155
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
> **Path Variables** (provided by caller as absolute paths):
|
|
165
|
-
> - `workspace_path`: Absolute path to speccrew-workspace directory
|
|
166
|
-
> - `update_progress_script`: `{workspace_path}/scripts/update-progress.js`
|
|
167
|
-
> - `iterations_dir`: `{workspace_path}/iterations`
|
|
168
|
-
|
|
169
|
-
### Step 0.1: Stage Gate — Verify Upstream Completion
|
|
170
|
-
|
|
171
|
-
Before starting system design, verify that Feature Design stage is confirmed:
|
|
172
|
-
|
|
173
|
-
1. **Read WORKFLOW-PROGRESS.json overview**:
|
|
174
|
-
```bash
|
|
175
|
-
node {update_progress_script} read --file {iterations_dir}/{current}/WORKFLOW-PROGRESS.json --overview
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
2. **Validate upstream stage**: Check `stages.02_feature_design.status == "confirmed"` in the output
|
|
179
|
-
|
|
180
|
-
3. **If not confirmed**: STOP — "Feature Design stage has not been confirmed. Please complete Feature Design confirmation first."
|
|
181
|
-
|
|
182
|
-
4. **If confirmed**:
|
|
183
|
-
- Read `02_feature_design.outputs` to get Feature Spec and API Contract paths
|
|
184
|
-
- Update stage status:
|
|
185
|
-
```bash
|
|
186
|
-
node {update_progress_script} update-workflow --file {iterations_dir}/{current}/WORKFLOW-PROGRESS.json --stage 03_system_design --status in_progress
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### Step 0.2: Check Resume State (Resume from Checkpoint)
|
|
190
|
-
|
|
191
|
-
Check if there's existing progress to resume:
|
|
192
|
-
|
|
193
|
-
1. **Read checkpoints** (if file exists):
|
|
194
|
-
```bash
|
|
195
|
-
node {update_progress_script} read --file {iterations_dir}/{current}/03.system-design/.checkpoints.json --checkpoints
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
2. **Determine resume point** based on passed checkpoints:
|
|
199
|
-
- `framework_evaluation.passed == true` → Skip Phase 3 (Framework Evaluation)
|
|
200
|
-
- `design_overview.passed == true` → Skip Phase 4 (DESIGN-OVERVIEW.md generation)
|
|
201
|
-
- `joint_confirmation.passed == true` → Entire stage completed, ask user if they want to redo
|
|
202
|
-
3. **Present resume summary** to user if resuming from checkpoint
|
|
203
|
-
|
|
204
|
-
### Step 0.3: Check Dispatch Resume (Feature×Platform Matrix)
|
|
205
|
-
|
|
206
|
-
Check dispatch progress for parallel task execution:
|
|
207
|
-
|
|
208
|
-
1. **Read dispatch progress summary** (if file exists):
|
|
209
|
-
```bash
|
|
210
|
-
node {update_progress_script} read --file {iterations_dir}/{current}/03.system-design/DISPATCH-PROGRESS.json --summary
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
2. **List task statuses**:
|
|
214
|
-
- `completed`: Skip these tasks
|
|
215
|
-
- `failed`: Retry these tasks
|
|
216
|
-
- `pending`: Execute these tasks
|
|
217
|
-
3. **Show resume summary** to user with counts: total/completed/failed/pending
|
|
218
|
-
|
|
219
|
-
### Step 0.4: Backward Compatibility
|
|
220
|
-
|
|
221
|
-
If WORKFLOW-PROGRESS.json does not exist:
|
|
222
|
-
- Continue with existing logic (Phase 1 onwards)
|
|
223
|
-
- Do not fail if progress files are missing
|
|
224
|
-
|
|
225
|
-
---
|
|
226
|
-
|
|
227
|
-
## Phase 0.5: IDE Directory Detection
|
|
228
|
-
|
|
229
|
-
Before dispatching workers, detect the IDE directory for skill path resolution:
|
|
230
|
-
|
|
231
|
-
### Step 0.5.1: Check IDE Directories (Priority Order)
|
|
232
|
-
|
|
233
|
-
Check in order and use the first existing directory:
|
|
234
|
-
1. `.qoder/` (Qoder IDE)
|
|
235
|
-
2. `.cursor/` (Cursor IDE)
|
|
236
|
-
3. `.claude/` (Claude Code)
|
|
237
|
-
4. `.speccrew/` (SpecCrew default)
|
|
238
|
-
|
|
239
|
-
Set variables:
|
|
240
|
-
- `ide_dir` = detected IDE directory (e.g., `.qoder`)
|
|
241
|
-
- `ide_skills_dir` = `{ide_dir}/skills`
|
|
242
|
-
|
|
243
|
-
### Step 0.5.2: Verify Skills Directory
|
|
244
|
-
|
|
245
|
-
1. **Verify `{ide_skills_dir}` directory exists**
|
|
246
|
-
|
|
247
|
-
2. **If NOT found** (no IDE directory contains a skills folder):
|
|
248
|
-
```
|
|
249
|
-
❌ IDE Skills Directory Not Found
|
|
250
|
-
|
|
251
|
-
Checked directories:
|
|
252
|
-
├── .qoder/skills → ✗
|
|
253
|
-
├── .cursor/skills → ✗
|
|
254
|
-
├── .claude/skills → ✗
|
|
255
|
-
└── .speccrew/skills → ✗
|
|
256
|
-
|
|
257
|
-
REQUIRED ACTION:
|
|
258
|
-
- Ensure IDE configuration is correct
|
|
259
|
-
- Verify SpecCrew installation: npx speccrew init
|
|
260
|
-
- Retry workflow after fixing
|
|
261
|
-
```
|
|
262
|
-
**STOP** — Do not proceed without valid skills directory.
|
|
263
|
-
|
|
264
|
-
3. **If found**, verify platform-specific design skills exist and report:
|
|
265
|
-
```
|
|
266
|
-
✅ IDE Skills Directory: {ide_dir}/skills
|
|
267
|
-
|
|
268
|
-
Available Platform Design Skills:
|
|
269
|
-
├── speccrew-sd-framework-evaluate/SKILL.md {✓ or ✗}
|
|
270
|
-
├── speccrew-sd-frontend/SKILL.md {✓ or ✗}
|
|
271
|
-
├── speccrew-sd-backend/SKILL.md {✓ or ✗}
|
|
272
|
-
├── speccrew-sd-mobile/SKILL.md {✓ or ✗}
|
|
273
|
-
└── speccrew-sd-desktop/SKILL.md {✓ or ✗}
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
- Skills marked ✗ will be skipped during dispatch (platforms without skills cannot be designed)
|
|
277
|
-
- If ALL platform skills are missing → **STOP** and report error
|
|
278
|
-
|
|
279
|
-
---
|
|
280
|
-
|
|
281
|
-
## Phase 1: Preparation
|
|
282
|
-
|
|
283
|
-
> 🛑 **ORCHESTRATOR RULES — Phase 1**
|
|
284
|
-
> - ❌ DO NOT use Glob to explore file system
|
|
285
|
-
> - ❌ DO NOT parse filenames to discover Features
|
|
286
|
-
> - ✅ ONLY read `.prd-feature-list.json` and WORKFLOW-PROGRESS.json
|
|
287
|
-
> - ✅ Build Feature Registry in memory from structured data
|
|
288
|
-
|
|
289
|
-
When user requests to start system design (and Phase 0 gates are passed):
|
|
290
|
-
|
|
291
|
-
### 1.1 Load Feature Registry from Upstream Outputs
|
|
292
|
-
|
|
293
|
-
Read `.prd-feature-list.json` from PRD directory:
|
|
294
|
-
- Path: `{iteration_path}/01.product-requirement/.prd-feature-list.json`
|
|
295
|
-
- Extract: `modules[]`, `features[]` with `feature_id`, `feature_name`, `type`, `module`, `dependencies`
|
|
296
|
-
|
|
297
|
-
Combine with WORKFLOW-PROGRESS.json outputs (already loaded in Phase 0):
|
|
298
|
-
- Extract Feature Spec paths from `stages.02_feature_design.outputs`
|
|
299
|
-
- Extract API Contract paths from `stages.02_feature_design.outputs`
|
|
300
|
-
|
|
301
|
-
Build Feature Registry (in memory only, no file exploration):
|
|
302
|
-
|
|
303
|
-
| Feature ID | Feature Name | Type | Module | Feature Spec Path | API Contract Path |
|
|
304
|
-
|------------|--------------|------|--------|-------------------|-------------------|
|
|
305
|
-
| F-CRM-01 | customer-list | list | CRM | `.../02.feature-design/F-CRM-01-customer-list-feature-spec.md` | `.../02.feature-design/F-CRM-01-customer-list-api-contract.md` |
|
|
306
|
-
| F-CRM-02 | customer-detail | detail | CRM | `.../02.feature-design/F-CRM-02-customer-detail-feature-spec.md` | `.../02.feature-design/F-CRM-02-customer-detail-api-contract.md` |
|
|
307
|
-
|
|
308
|
-
**Registry Build Logic**:
|
|
309
|
-
1. Read `.prd-feature-list.json` to get feature metadata (id, name, type, module)
|
|
310
|
-
2. Match with paths from WORKFLOW-PROGRESS.json `stages.02_feature_design.outputs`
|
|
311
|
-
3. For each feature in `.prd-feature-list.json`, find corresponding paths:
|
|
312
|
-
- Feature Spec path: look for output with pattern `*-feature-spec.md`
|
|
313
|
-
- API Contract path: look for output with pattern `*-api-contract.md`
|
|
314
|
-
4. If paths not found in outputs → mark as missing for 1.2 verification
|
|
315
|
-
|
|
316
|
-
### 1.2 Verify File Existence
|
|
317
|
-
|
|
318
|
-
For each Feature in registry, verify:
|
|
319
|
-
- Feature Spec file exists at the path from WORKFLOW-PROGRESS.json
|
|
320
|
-
- API Contract file exists at the path from WORKFLOW-PROGRESS.json
|
|
321
|
-
- If any missing → STOP and report which files are missing
|
|
322
|
-
|
|
323
|
-
**If files missing**:
|
|
324
|
-
```
|
|
325
|
-
❌ Feature Files Missing
|
|
326
|
-
|
|
327
|
-
Missing Files:
|
|
328
|
-
├── Feature: F-CRM-01 (customer-list)
|
|
329
|
-
│ ├── Feature Spec: .../02.feature-design/F-CRM-01-customer-list-feature-spec.md → ✗ NOT FOUND
|
|
330
|
-
│ └── API Contract: .../02.feature-design/F-CRM-01-customer-list-api-contract.md → ✓ FOUND
|
|
331
|
-
└── Feature: F-ORDER-01 (order-list)
|
|
332
|
-
├── Feature Spec: .../02.feature-design/F-ORDER-01-order-list-feature-spec.md → ✓ FOUND
|
|
333
|
-
└── API Contract: .../02.feature-design/F-ORDER-01-order-list-api-contract.md → ✗ NOT FOUND
|
|
334
|
-
|
|
335
|
-
REQUIRED ACTIONS:
|
|
336
|
-
1. Verify Feature Design stage completed successfully
|
|
337
|
-
2. Check WORKFLOW-PROGRESS.json outputs are correct
|
|
338
|
-
3. Retry after fixing missing files
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
### 1.3 Check Existing Design Documents
|
|
342
|
-
|
|
343
|
-
Check `{iteration_path}/03.system-design/` for existing design files:
|
|
344
|
-
- List existing platform directories
|
|
345
|
-
- Identify any existing design documents
|
|
346
|
-
|
|
347
|
-
### 1.4 Present Design Scope
|
|
348
|
-
|
|
349
|
-
Display Feature Registry table to user and ask for confirmation before proceeding:
|
|
350
|
-
|
|
351
|
-
```
|
|
352
|
-
📊 Design Scope Summary
|
|
353
|
-
|
|
354
|
-
Features Loaded from .prd-feature-list.json: {count}
|
|
355
|
-
├── F-CRM-01: customer-list (type: list, module: CRM)
|
|
356
|
-
├── F-CRM-02: customer-detail (type: detail, module: CRM)
|
|
357
|
-
└── ...
|
|
358
|
-
|
|
359
|
-
Platforms: {count} platforms from techs-manifest
|
|
360
|
-
Total Design Tasks: {feature_count} × {platform_count} = {total_tasks}
|
|
361
|
-
Execution Mode: {Direct invocation / Worker dispatch (N batches)}
|
|
362
|
-
|
|
363
|
-
Proceed with system design? (Confirm/Cancel)
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
### 1.5 Preparation Validation (Gate Check)
|
|
367
|
-
|
|
368
|
-
Before proceeding to Phase 2, verify preparation completeness:
|
|
369
|
-
|
|
370
|
-
**Validation Checklist**:
|
|
371
|
-
- [ ] `.prd-feature-list.json` exists and is readable
|
|
372
|
-
- [ ] Feature Registry built successfully (≥ 1 feature)
|
|
373
|
-
- [ ] All Feature Spec files exist (verified in 1.2)
|
|
374
|
-
- [ ] All API Contract files exist (verified in 1.2)
|
|
375
|
-
- [ ] Design scope presented to user and confirmed
|
|
376
|
-
|
|
377
|
-
**If validation fails**:
|
|
378
|
-
```
|
|
379
|
-
❌ Preparation Validation Failed: {reason}
|
|
380
|
-
|
|
381
|
-
Examples:
|
|
382
|
-
- ".prd-feature-list.json not found in 01.product-requirement/"
|
|
383
|
-
- "No features found in .prd-feature-list.json"
|
|
384
|
-
- "Feature F-CRM-01 has missing Feature Spec file"
|
|
385
|
-
- "WORKFLOW-PROGRESS.json missing 02_feature_design outputs"
|
|
386
|
-
|
|
387
|
-
REQUIRED ACTIONS:
|
|
388
|
-
1. Report specific error to user
|
|
389
|
-
2. Ask: "Fix the issue and retry?" or "Abort workflow?"
|
|
390
|
-
3. IF retry → Return to Phase 1.1
|
|
391
|
-
4. IF abort → END workflow
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
## Phase 2: Resource Verification
|
|
395
|
-
|
|
396
|
-
> 🛑 **ORCHESTRATOR RULES — Phase 2**
|
|
397
|
-
> - ❌ DO NOT read Feature Spec files — Skills will read them when dispatched
|
|
398
|
-
> - ❌ DO NOT read API Contract files — Skills will read them when dispatched
|
|
399
|
-
> - ❌ DO NOT read techs knowledge files — Skills will read them when dispatched
|
|
400
|
-
> - ✅ ONLY verify that required resource files exist
|
|
401
|
-
> - ✅ Pass file paths to Skills via dispatch parameters
|
|
402
|
-
|
|
403
|
-
After user confirmation, verify resources exist (DO NOT read content):
|
|
404
|
-
|
|
405
|
-
### 2.1 Verify Technical Knowledge Base
|
|
406
|
-
|
|
407
|
-
1. Verify `{workspace_path}/knowledges/techs/techs-manifest.json` exists
|
|
408
|
-
2. **IF NOT EXISTS** → STOP and report to user:
|
|
409
|
-
```
|
|
410
|
-
❌ TECHS KNOWLEDGE BASE NOT FOUND
|
|
411
|
-
|
|
412
|
-
The technology knowledge base has not been initialized.
|
|
413
|
-
Required file missing: knowledges/techs/techs-manifest.json
|
|
414
|
-
|
|
415
|
-
Please initialize the techs knowledge base first by asking the Team Leader:
|
|
416
|
-
"Initialize technology knowledge base"
|
|
417
|
-
|
|
418
|
-
This is required for system design to understand your project's technology stack,
|
|
419
|
-
conventions, and architecture patterns.
|
|
420
|
-
```
|
|
421
|
-
→ END workflow (do not proceed to Phase 3)
|
|
422
|
-
3. **IF EXISTS** → Extract platform list from techs-manifest (this is a small config file, Agent MAY read it)
|
|
423
|
-
4. For each platform, verify key files exist (DO NOT read content):
|
|
424
|
-
- `knowledges/techs/{platform_id}/tech-stack.md` — exists?
|
|
425
|
-
- `knowledges/techs/{platform_id}/architecture.md` — exists?
|
|
426
|
-
5. If any critical file missing → WARN user
|
|
427
|
-
|
|
428
|
-
### 2.2 Prepare Dispatch Parameters
|
|
429
|
-
|
|
430
|
-
Build the parameter template for Phase 3 and Phase 5 Skills:
|
|
431
|
-
- `feature_spec_paths`: List of Feature Spec paths (from Phase 1 registry)
|
|
432
|
-
- `api_contract_paths`: List of API Contract paths (from Phase 1 registry)
|
|
433
|
-
- `techs_manifest_path`: Path to techs-manifest.json
|
|
434
|
-
- `techs_knowledge_dir`: Path to techs knowledge directory
|
|
435
|
-
- `platforms`: List of platforms from techs-manifest
|
|
436
|
-
|
|
437
|
-
⚠️ Agent passes PATHS to Skills. Agent does NOT read the files.
|
|
438
|
-
|
|
439
|
-
## Phase 3: Framework Evaluation (🛑 HARD STOP — User Confirmation Required)
|
|
440
|
-
|
|
441
|
-
> 🛑 **WORKER-DISPATCH RULE**: Framework evaluation MUST be dispatched to `speccrew-task-worker` via **Agent tool**. Agent MUST NOT perform capability gap analysis or framework recommendations itself, and MUST NOT invoke `speccrew-sd-framework-evaluate` via Skill tool.
|
|
442
|
-
|
|
443
|
-
> 🛑 **CRITICAL: Phase 3 dispatch-to-worker Protocol**
|
|
444
|
-
>
|
|
445
|
-
> When executing Phase 3 (Framework Evaluation):
|
|
446
|
-
> 1. Use **Agent tool** to create a new sub-Agent
|
|
447
|
-
> 2. Specify sub-Agent role as **speccrew-task-worker**
|
|
448
|
-
> 3. Pass skill_path and all context parameters in Task description
|
|
449
|
-
> 4. **Wait for Worker completion** before proceeding
|
|
450
|
-
>
|
|
451
|
-
> **FORBIDDEN**:
|
|
452
|
-
> - ❌ DO NOT use Skill tool to invoke speccrew-sd-framework-evaluate
|
|
453
|
-
> - ❌ DO NOT read feature spec files yourself for framework evaluation
|
|
454
|
-
> - ❌ DO NOT generate framework-evaluation.md yourself
|
|
455
|
-
|
|
456
|
-
### 3.1 Invoke Framework Evaluation Skill
|
|
457
|
-
|
|
458
|
-
**Skill**: `speccrew-sd-framework-evaluate/SKILL.md`
|
|
459
|
-
|
|
460
|
-
**Parameters**:
|
|
461
|
-
| Parameter | Value | Description |
|
|
462
|
-
|-----------|-------|-------------|
|
|
463
|
-
| `feature_spec_paths` | All Feature Spec paths from Feature Registry | Feature Spec documents to analyze |
|
|
464
|
-
| `api_contract_paths` | All API Contract paths from Feature Registry | API Contract documents to analyze |
|
|
465
|
-
| `techs_knowledge_paths` | Platform knowledge paths from Phase 2 verification | Technology stack knowledge per platform |
|
|
466
|
-
| `iteration_path` | `{iterations_dir}/{current}` | Current iteration directory |
|
|
467
|
-
| `output_path` | `{iterations_dir}/{current}/03.system-design/framework-evaluation.md` | Output report path |
|
|
468
|
-
|
|
469
|
-
**Invocation**: Use **Agent tool** to dispatch `speccrew-task-worker` agent. Pass `skill_path: ${workspace_path}/.speccrew/skills/speccrew-sd-framework-evaluate/SKILL.md` and all context parameters. Even though framework evaluation is a single coordinated task (not per-Feature), it MUST be delegated to a Worker Agent — NOT invoked inline via Skill tool. See workflow.agentflow.xml block P3-B1 for dispatch parameters.
|
|
470
|
-
|
|
471
|
-
### 3.2 Validate Skill Output
|
|
472
|
-
|
|
473
|
-
After skill completes, validate the output:
|
|
474
|
-
|
|
475
|
-
1. **Check Task Completion Report**: Skill outputs a report with `Status: SUCCESS` or `Status: FAILED`
|
|
476
|
-
|
|
477
|
-
2. **If SUCCESS**:
|
|
478
|
-
- Verify `framework-evaluation.md` exists at expected path
|
|
479
|
-
- Read the report to extract:
|
|
480
|
-
- Number of capability gaps found
|
|
481
|
-
- Number of frameworks recommended
|
|
482
|
-
- Framework recommendation details (for user presentation)
|
|
483
|
-
- Proceed to Phase 3.3 (User Confirmation)
|
|
484
|
-
|
|
485
|
-
3. **If FAILED**:
|
|
486
|
-
- Read error details from Task Completion Report
|
|
487
|
-
- **DO NOT attempt to perform framework evaluation yourself**
|
|
488
|
-
- Report error to user and ask: "Retry?" or "Abort?"
|
|
489
|
-
- If retry → Re-dispatch speccrew-task-worker with same or adjusted parameters
|
|
490
|
-
- If abort → END workflow
|
|
491
|
-
|
|
492
|
-
### 3.3 User Confirmation (🛑 HARD STOP)
|
|
493
|
-
|
|
494
|
-
> **DO NOT proceed to Phase 4 without explicit user confirmation.**
|
|
495
|
-
|
|
496
|
-
Present framework evaluation results to user:
|
|
497
|
-
|
|
498
|
-
```
|
|
499
|
-
🛑 FRAMEWORK EVALUATION — AWAITING CONFIRMATION
|
|
500
|
-
|
|
501
|
-
Capability Gaps Identified: {count}
|
|
502
|
-
├── [Gap 1]: {description} → Recommended: {framework}
|
|
503
|
-
├── [Gap 2]: {description} → Recommended: {framework}
|
|
504
|
-
└── No new frameworks needed (if applicable)
|
|
505
|
-
|
|
506
|
-
Do you approve these framework decisions?
|
|
507
|
-
- "Confirm" or "OK" → Proceed to Phase 4 (DESIGN-OVERVIEW generation)
|
|
508
|
-
- "Modify" + specific changes → Re-evaluate with adjusted scope
|
|
509
|
-
- "Cancel" → Abort workflow
|
|
510
|
-
```
|
|
511
|
-
|
|
512
|
-
**MANDATORY**: DO NOT proceed to Phase 4 until user explicitly confirms.
|
|
513
|
-
**MANDATORY**: DO NOT assume user silence means confirmation.
|
|
514
|
-
|
|
515
|
-
If no new frameworks needed, state explicitly:
|
|
516
|
-
```
|
|
517
|
-
✅ No capability gaps identified. Current tech stack is sufficient.
|
|
518
|
-
Proceed to Phase 4? (Confirm/Cancel)
|
|
519
|
-
```
|
|
520
|
-
|
|
521
|
-
### 3.4 Framework Evaluation Error Recovery
|
|
522
|
-
|
|
523
|
-
> ⚠️ **ABORT CONDITIONS — Execution MUST STOP if:**
|
|
524
|
-
> - `speccrew-sd-framework-evaluate` skill reported execution failure
|
|
525
|
-
> - `framework-evaluation.md` was not generated
|
|
526
|
-
> - Report is incomplete (missing required sections)
|
|
527
|
-
|
|
528
|
-
**FORBIDDEN ACTIONS**:
|
|
529
|
-
- DO NOT perform framework evaluation yourself as fallback
|
|
530
|
-
- DO NOT create framework-evaluation.md manually
|
|
531
|
-
- DO NOT proceed to Phase 4 without valid evaluation output
|
|
532
|
-
|
|
533
|
-
**Recovery Actions**:
|
|
534
|
-
1. Report error to user: "Framework evaluation worker failed: {specific reason}"
|
|
535
|
-
2. Ask user: "Retry with additional context?" or "Abort workflow?"
|
|
536
|
-
3. IF retry → Re-dispatch speccrew-task-worker with adjusted parameters
|
|
537
|
-
4. IF abort → END workflow
|
|
538
|
-
|
|
539
|
-
## Phase 4: Generate DESIGN-OVERVIEW.md (L1)
|
|
540
|
-
|
|
541
|
-
> 🛑 **CRITICAL: Phase 4 dispatch-to-worker Protocol**
|
|
542
|
-
>
|
|
543
|
-
> When executing Phase 4 (Design Overview Generation):
|
|
544
|
-
> 1. Use **Agent tool** to create a new sub-Agent
|
|
545
|
-
> 2. Specify sub-Agent role as **speccrew-task-worker**
|
|
546
|
-
> 3. Pass `skill_path`: `${workspace_path}/.speccrew/skills/speccrew-sd-design-overview-generate/SKILL.md`
|
|
547
|
-
> 4. Pass context parameters: workspace_path, iteration_path, feature_registry_path, techs_manifest_path, framework_evaluation_path, output_path
|
|
548
|
-
> 5. **Wait for Worker completion** before proceeding to validation
|
|
549
|
-
>
|
|
550
|
-
> **FORBIDDEN**:
|
|
551
|
-
> - ❌ DO NOT generate DESIGN-OVERVIEW.md yourself
|
|
552
|
-
> - ❌ DO NOT use Skill tool to invoke speccrew-sd-design-overview-generate
|
|
553
|
-
|
|
554
|
-
> ⚠️ **HARD STOP — Phase 4.5: DESIGN-OVERVIEW.md Confirmation**
|
|
555
|
-
> After worker completes and DESIGN-OVERVIEW.md passes validation:
|
|
556
|
-
> 1. Present summary to user: feature count, platform count, matrix entries, key design decisions
|
|
557
|
-
> 2. **STOP** — Wait for user explicit confirmation
|
|
558
|
-
> 3. User responses:
|
|
559
|
-
> - "确认" or "OK" → Update checkpoint, proceed to Phase 5
|
|
560
|
-
> - "修改" + specific changes → Re-dispatch worker with adjustments
|
|
561
|
-
> - "取消" → Abort workflow
|
|
562
|
-
> **FORBIDDEN during HARD STOP**:
|
|
563
|
-
> - ❌ DO NOT update checkpoint until user confirms
|
|
564
|
-
> - ❌ DO NOT suggest next steps
|
|
565
|
-
> - ❌ DO NOT proceed to Phase 5
|
|
566
|
-
> - ❌ DO NOT auto-approve even if all validations pass
|
|
567
|
-
|
|
568
|
-
Create the top-level overview at:
|
|
569
|
-
`{iterations_dir}/{current}/03.system-design/DESIGN-OVERVIEW.md`
|
|
570
|
-
|
|
571
|
-
### Template Structure
|
|
572
|
-
|
|
573
|
-
```markdown
|
|
574
|
-
# System Design Overview - {Iteration Name}
|
|
575
|
-
|
|
576
|
-
## 1. Design Scope
|
|
577
|
-
- **Iteration**: {iteration_number}-{iteration_type}-{iteration_name}
|
|
578
|
-
- **Platforms**: {list from techs-manifest}
|
|
579
|
-
- **Features**: {count} features discovered
|
|
580
|
-
|
|
581
|
-
### 1.1 Feature List
|
|
582
|
-
| Feature ID | Feature Name | Feature Spec | API Contract |
|
|
583
|
-
|------------|--------------|--------------|--------------|
|
|
584
|
-
| F-CRM-01 | customer-list | [link] | [link] |
|
|
585
|
-
| F-CRM-02 | customer-detail | [link] | [link] |
|
|
586
|
-
| ... | ... | ... | ... |
|
|
156
|
+
详细执行流程(Phase 0–6 的具体步骤、命令、脚本调用、模板结构、错误恢复)由 orchestration skill 统一定义。本 Agent 文件只保留决策规则;执行细节见:
|
|
587
157
|
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
## 2. Technology Decisions
|
|
591
|
-
- Framework evaluation results (from Phase 3)
|
|
592
|
-
- New dependencies introduced (if any)
|
|
593
|
-
- Version constraints
|
|
594
|
-
|
|
595
|
-
## 3. Platform Design Index
|
|
596
|
-
| Feature ID | Feature Name | Platform | Platform ID | Skill | Design Directory | Status |
|
|
597
|
-
|------------|--------------|----------|-------------|-------|------------------|--------|
|
|
598
|
-
| F-CRM-01 | customer-list | Web Frontend | web-vue | speccrew-sd-frontend | web-vue/F-CRM-01-customer-list-design.md | pending |
|
|
599
|
-
| F-CRM-01 | customer-list | Backend | backend-spring | speccrew-sd-backend | backend-spring/F-CRM-01-customer-list-design.md | pending |
|
|
600
|
-
| F-CRM-02 | customer-detail | Web Frontend | web-vue | speccrew-sd-frontend | web-vue/F-CRM-02-customer-detail-design.md | pending |
|
|
601
|
-
| ... | ... | ... | ... | ... | ... | ... |
|
|
602
|
-
|
|
603
|
-
> **Notes**:
|
|
604
|
-
> - New Format: Design Directory contains `{feature-id}-{feature-name}` (e.g., `F-CRM-01-customer-list-design.md`)
|
|
605
|
-
> - Legacy Format: Design Directory uses `{module}-design.md`
|
|
606
|
-
|
|
607
|
-
## 4. Feature Summary (Optional)
|
|
608
|
-
|
|
609
|
-
When Feature count is large (>5), add this subsection to provide a summary view:
|
|
610
|
-
|
|
611
|
-
### 4.1 Feature by Module
|
|
612
|
-
| Module | Feature Count | Feature IDs |
|
|
613
|
-
|--------|---------------|-------------|
|
|
614
|
-
| CRM | 3 | F-CRM-01, F-CRM-02, F-CRM-03 |
|
|
615
|
-
| ORDER | 2 | F-ORDER-01, F-ORDER-02 |
|
|
616
|
-
|
|
617
|
-
### 4.2 Feature Type Distribution
|
|
618
|
-
| Type | Count | Features |
|
|
619
|
-
|------|-------|----------|
|
|
620
|
-
| List/Query | 2 | F-CRM-01, F-ORDER-01 |
|
|
621
|
-
| Detail/View | 2 | F-CRM-02, F-ORDER-02 |
|
|
622
|
-
| Create/Update | 1 | F-CRM-03 |
|
|
623
|
-
|
|
624
|
-
## 5. Cross-Platform Concerns
|
|
625
|
-
- Shared data structures
|
|
626
|
-
- Cross-platform API contracts
|
|
627
|
-
- Authentication/authorization strategy
|
|
628
|
-
- Error handling conventions
|
|
629
|
-
|
|
630
|
-
## 6. Design Constraints
|
|
631
|
-
- API Contract is READ-ONLY — do not modify
|
|
632
|
-
- All pseudo-code must use actual framework syntax from techs knowledge
|
|
633
|
-
- Each module design document maps 1:1 to a Feature Spec function
|
|
634
|
-
```
|
|
635
|
-
|
|
636
|
-
### 4.1 DESIGN-OVERVIEW Validation (Gate Check)
|
|
637
|
-
|
|
638
|
-
After generating DESIGN-OVERVIEW.md, validate completeness before proceeding to Phase 5:
|
|
639
|
-
|
|
640
|
-
**Validation Checklist**:
|
|
641
|
-
- [ ] DESIGN-OVERVIEW.md file exists at expected path
|
|
642
|
-
- [ ] File contains "Design Scope" section
|
|
643
|
-
- [ ] File contains "Technology Decisions" section
|
|
644
|
-
- [ ] File contains "Platform Design Index" table
|
|
645
|
-
- [ ] Platform Design Index covers ALL Feature × Platform combinations
|
|
646
|
-
- [ ] Feature count in index matches Feature Registry count
|
|
647
|
-
- [ ] Platform count in index matches techs-manifest platform count
|
|
648
|
-
- [ ] All index entries have Status = "pending"
|
|
649
|
-
|
|
650
|
-
**Spot Check** (random 3 entries from Platform Design Index):
|
|
651
|
-
- [ ] Feature ID format is correct (F-{MODULE}-{NN} or legacy name)
|
|
652
|
-
- [ ] Platform ID matches techs-manifest
|
|
653
|
-
- [ ] Skill name is correct (speccrew-sd-frontend/backend/mobile/desktop)
|
|
654
|
-
- [ ] Design Directory path format is correct
|
|
655
|
-
|
|
656
|
-
**If validation fails**:
|
|
657
|
-
```
|
|
658
|
-
❌ DESIGN-OVERVIEW Validation Failed: {reason}
|
|
659
|
-
|
|
660
|
-
REQUIRED ACTIONS:
|
|
661
|
-
1. Identify missing or incorrect items
|
|
662
|
-
2. Regenerate or fix DESIGN-OVERVIEW.md (return to Phase 4)
|
|
663
|
-
3. Re-validate before proceeding to Phase 5
|
|
664
|
-
```
|
|
665
|
-
|
|
666
|
-
**If validation passes** → Proceed to Phase 5.
|
|
667
|
-
|
|
668
|
-
## Phase 5: Dispatch Per-Platform Skills
|
|
669
|
-
|
|
670
|
-
> 🚨 **MANDATORY WORKER ENFORCEMENT REMINDER**:
|
|
671
|
-
> - This Agent is an **orchestrator ONLY** — it MUST NOT write design documents directly
|
|
672
|
-
> - When Features ≥ 2 OR Platforms ≥ 2: **MUST** dispatch `speccrew-task-worker` agents via Agent tool
|
|
673
|
-
> - **FORBIDDEN**: Direct invocation of `speccrew-sd-*` skills in multi-feature/multi-platform scenarios
|
|
674
|
-
> - **FORBIDDEN**: Creating `*-design.md` or `INDEX.md` files as fallback if workers fail
|
|
675
|
-
> - See **MANDATORY WORKER ENFORCEMENT** section at top of document for complete rules
|
|
676
|
-
|
|
677
|
-
### 5.1 Determine Platform Types
|
|
678
|
-
|
|
679
|
-
Based on platform types in techs-manifest:
|
|
680
|
-
|
|
681
|
-
**Platform type mapping**:
|
|
682
|
-
- `web-*` → dispatch `speccrew-sd-frontend`
|
|
683
|
-
- `mobile-*` → dispatch `speccrew-sd-mobile`
|
|
684
|
-
- `desktop-*` → dispatch `speccrew-sd-desktop`
|
|
685
|
-
- `backend-*` → dispatch `speccrew-sd-backend`
|
|
686
|
-
|
|
687
|
-
### 5.2 Initialize DISPATCH-PROGRESS.json
|
|
688
|
-
|
|
689
|
-
Before dispatching, create or update dispatch tracking:
|
|
690
|
-
|
|
691
|
-
1. **Initialize dispatch progress file with task list**:
|
|
692
|
-
|
|
693
|
-
> ⚠️ Use `--tasks-file` instead of `--tasks` to avoid PowerShell JSON parsing issues.
|
|
694
|
-
|
|
695
|
-
```bash
|
|
696
|
-
# Step 1: Write tasks JSON to temp file inside iteration directory
|
|
697
|
-
# Create .tasks-temp.json with the task array content
|
|
698
|
-
# Step 2: Initialize with --tasks-file
|
|
699
|
-
node {update_progress_script} init --file {iterations_dir}/{current}/03.system-design/DISPATCH-PROGRESS.json --stage 03_system_design --tasks-file {iterations_dir}/{current}/03.system-design/.tasks-temp.json
|
|
700
|
-
# Step 3: Delete .tasks-temp.json after successful init
|
|
701
|
-
```
|
|
702
|
-
|
|
703
|
-
Example `.tasks-temp.json` content:
|
|
704
|
-
```json
|
|
705
|
-
[{"id":"sd-web-vue-F-CRM-01","platform":"web-vue","feature_id":"F-CRM-01","feature_name":"customer-list","skill":"speccrew-sd-frontend","status":"pending"}]
|
|
706
|
-
```
|
|
707
|
-
|
|
708
|
-
**Task ID Format Update**:
|
|
709
|
-
- Legacy Format: `sd-{platform}-{feature}` (e.g., `sd-web-vue-customer-list`)
|
|
710
|
-
- **New Format**: `sd-{platform}-{feature-id}` (e.g., `sd-web-vue-F-CRM-01`)
|
|
711
|
-
- Legacy Compatibility: If no Feature ID, use feature_name (e.g., `sd-web-vue-crm`)
|
|
712
|
-
|
|
713
|
-
2. **Check existing progress** (from Step 0.3) — skip `completed` tasks
|
|
714
|
-
3. **Update status** to `in_progress` for tasks being dispatched:
|
|
715
|
-
4. **If progress file appears out-of-sync** (many tasks show "pending" but output files already exist):
|
|
716
|
-
```bash
|
|
717
|
-
node {update_progress_script} sync --file {iterations_dir}/{current}/03.system-design/DISPATCH-PROGRESS.json --dir {iterations_dir}/{current}/03.system-design --suffix "-design.md"
|
|
718
|
-
```
|
|
719
|
-
This recovers progress from actual files on disk.
|
|
720
|
-
```bash
|
|
721
|
-
node {update_progress_script} update-task --file {iterations_dir}/{current}/03.system-design/DISPATCH-PROGRESS.json --task-id {task_id} --status in_progress
|
|
722
|
-
```
|
|
723
|
-
|
|
724
|
-
### 5.3 Single Feature Spec + Single Platform
|
|
725
|
-
|
|
726
|
-
When there is only one Feature Spec and one platform:
|
|
727
|
-
|
|
728
|
-
1. **Update task status to `in_progress`**:
|
|
729
|
-
```bash
|
|
730
|
-
node {update_progress_script} update-task --file {iterations_dir}/{current}/03.system-design/DISPATCH-PROGRESS.json --task-id {task_id} --status in_progress
|
|
731
|
-
```
|
|
732
|
-
|
|
733
|
-
2. Call skill directly with parameters:
|
|
734
|
-
- Skill path: determined by platform type mapping (see 5.1)
|
|
735
|
-
- Pass context:
|
|
736
|
-
- `task_id`: Task identifier for progress tracking (format: `sd-{platform_id}-{feature_id}` or `sd-{platform_id}-{feature_name}`)
|
|
737
|
-
- `feature_id`: Feature ID (new format e.g., `F-CRM-01`, legacy format is null)
|
|
738
|
-
- `feature_name`: Feature Name (e.g., `customer-list` or `crm`)
|
|
739
|
-
- `platform_id`: Platform identifier from techs-manifest
|
|
740
|
-
- `feature_spec_path`: Path to Feature Spec document (actual path from Feature Registry)
|
|
741
|
-
- `api_contract_path`: Path to API Contract document (actual path from Feature Registry)
|
|
742
|
-
- `techs_paths`: Relevant techs knowledge paths
|
|
743
|
-
- `framework_decisions`: Framework decisions from Phase 3
|
|
744
|
-
|
|
745
|
-
3. **Parse Task Completion Report** from skill output:
|
|
746
|
-
- If `Status: SUCCESS`:
|
|
747
|
-
```bash
|
|
748
|
-
node {update_progress_script} update-task --file {iterations_dir}/{current}/03.system-design/DISPATCH-PROGRESS.json --task-id {task_id} --status completed --output "{output_path}"
|
|
749
|
-
```
|
|
750
|
-
- If `Status: FAILED`:
|
|
751
|
-
```bash
|
|
752
|
-
node {update_progress_script} update-task --file {iterations_dir}/{current}/03.system-design/DISPATCH-PROGRESS.json --task-id {task_id} --status failed --error "{error_message}"
|
|
753
|
-
```
|
|
754
|
-
|
|
755
|
-
### 5.4 Parallel Execution (Feature × Platform)
|
|
756
|
-
|
|
757
|
-
> **IMPORTANT**: Dispatch `speccrew-task-worker` agents (via Agent tool) for parallel design execution. Do NOT call design skills directly — each Feature×Platform combination MUST run in an independent Worker Agent for progress visibility and error isolation.
|
|
758
|
-
|
|
759
|
-
When multiple Feature Specs and/or multiple platforms exist, create a matrix of **Feature × Platform** and dispatch `speccrew-task-worker` agents in parallel:
|
|
760
|
-
|
|
761
|
-
**Worker Matrix:**
|
|
762
|
-
|
|
763
|
-
| | Platform 1 (web-vue) | Platform 2 (backend-spring) | Platform 3 (mobile-uniapp) |
|
|
764
|
-
|---|---|---|---|
|
|
765
|
-
| Feature Spec A | Worker 1 | Worker 2 | Worker 3 |
|
|
766
|
-
| Feature Spec B | Worker 4 | Worker 5 | Worker 6 |
|
|
767
|
-
|
|
768
|
-
Each worker receives:
|
|
769
|
-
- `skill_path`: {ide_skills_dir}/{skill_name}/SKILL.md (per-platform design skill based on platform type, see 5.1)
|
|
770
|
-
- `context`:
|
|
771
|
-
- `task_id`: Unique task identifier (format: `sd-{platform_id}-{feature_id}`, e.g., `sd-web-vue-F-CRM-01`)
|
|
772
|
-
- `feature_id`: Feature ID (new format e.g., `F-CRM-01`, legacy format is null)
|
|
773
|
-
- `feature_name`: Feature Name (e.g., `customer-list`)
|
|
774
|
-
- `platform_id`: Platform identifier from techs-manifest
|
|
775
|
-
- `feature_spec_path`: Path to ONE Feature Spec document (not all, from Feature Registry)
|
|
776
|
-
- `api_contract_path`: API Contract document path (from Feature Registry)
|
|
777
|
-
- `techs_knowledge_paths`: Techs knowledge paths for this platform
|
|
778
|
-
- `framework_decisions`: Framework decisions from Phase 3
|
|
779
|
-
- `output_base_path`: Path to `03.system-design/` directory
|
|
780
|
-
- `dispatch_progress_file`: Path to DISPATCH-PROGRESS.json (enables Worker to self-update task status on completion)
|
|
781
|
-
- `update_progress_script`: Path to update-progress.js script
|
|
782
|
-
|
|
783
|
-
**Before dispatch**: Update each task status to `in_progress`:
|
|
784
|
-
```bash
|
|
785
|
-
node {update_progress_script} update-task --file {iterations_dir}/{current}/03.system-design/DISPATCH-PROGRESS.json --task-id {task_id} --status in_progress
|
|
786
|
-
```
|
|
787
|
-
|
|
788
|
-
**Parallel execution example** (2 features × 3 platforms = 6 workers):
|
|
789
|
-
- Worker 1: speccrew-sd-frontend for F-CRM-01 (customer-list) on web-vue → 03.system-design/web-vue/F-CRM-01-customer-list-design.md
|
|
790
|
-
- Worker 2: speccrew-sd-backend for F-CRM-01 (customer-list) on backend-spring → 03.system-design/backend-spring/F-CRM-01-customer-list-design.md
|
|
791
|
-
- Worker 3: speccrew-sd-mobile for F-CRM-01 (customer-list) on mobile-uniapp → 03.system-design/mobile-uniapp/F-CRM-01-customer-list-design.md
|
|
792
|
-
- Worker 4: speccrew-sd-frontend for F-CRM-02 (customer-detail) on web-vue → 03.system-design/web-vue/F-CRM-02-customer-detail-design.md
|
|
793
|
-
- Worker 5: speccrew-sd-backend for F-CRM-02 (customer-detail) on backend-spring → 03.system-design/backend-spring/F-CRM-02-customer-detail-design.md
|
|
794
|
-
- Worker 6: speccrew-sd-mobile for F-CRM-02 (customer-detail) on mobile-uniapp → 03.system-design/mobile-uniapp/F-CRM-02-customer-detail-design.md
|
|
795
|
-
|
|
796
|
-
All workers execute simultaneously to maximize efficiency.
|
|
797
|
-
|
|
798
|
-
> 🛑 **CRITICAL: Phase 5 dispatch-to-worker Protocol**
|
|
799
|
-
> 1. **ONE Worker per Feature×Platform combination** — DO NOT group
|
|
800
|
-
> 2. Use **Agent tool** to create `speccrew-task-worker` for each task
|
|
801
|
-
> 3. Pass `skill_path`: `${ide_skills_dir}/${skill_name}/SKILL.md` (platform-specific skill)
|
|
802
|
-
> 4. Pass context: task_id, feature_id, feature_name, platform_id, feature_spec_path, api_contract_path, techs_knowledge_paths, framework_decisions, output_base_path, **skip_confirmation: true**, **skip_index_generation: true**, **dispatch_progress_file**, **update_progress_script**
|
|
803
|
-
> 5. Dispatch ALL Workers in the same batch **SIMULTANEOUSLY** in a single turn
|
|
804
|
-
> 6. **Wait** for ALL Workers in the batch to complete before dispatching next batch
|
|
805
|
-
> 7. Update DISPATCH-PROGRESS.json after each Worker completes
|
|
806
|
-
> 8. After ALL workers complete, dispatch ONE worker per platform with `index_only: true` to generate INDEX.md (WORKER-DISPATCH — see Phase 5.5 in orchestration SKILL.md)
|
|
807
|
-
> **FORBIDDEN**:
|
|
808
|
-
> - ❌ DO NOT group multiple features into one Worker
|
|
809
|
-
> - ❌ DO NOT use Skill tool to invoke platform skills (when Features ≥ 2 OR Platforms ≥ 2)
|
|
810
|
-
> - ❌ DO NOT dispatch Workers sequentially — ALL in same batch must be simultaneous
|
|
811
|
-
> - ❌ DO NOT generate *-design.md files yourself as fallback
|
|
812
|
-
> - ❌ DO NOT let individual workers generate INDEX.md in batch mode — set `skip_index_generation: true`; INDEX.md is generated in Phase 5.5 by separate worker with `index_only: true`
|
|
813
|
-
|
|
814
|
-
### 5.5 Update DISPATCH-PROGRESS.json
|
|
815
|
-
|
|
816
|
-
After each worker completes, parse its **Task Completion Report** and update:
|
|
817
|
-
|
|
818
|
-
- On SUCCESS:
|
|
819
|
-
```bash
|
|
820
|
-
node {update_progress_script} update-task --file {iterations_dir}/{current}/03.system-design/DISPATCH-PROGRESS.json --task-id {task_id} --status completed --output "{output_path}"
|
|
821
|
-
```
|
|
822
|
-
- On FAILED:
|
|
823
|
-
```bash
|
|
824
|
-
node {update_progress_script} update-task --file {iterations_dir}/{current}/03.system-design/DISPATCH-PROGRESS.json --task-id {task_id} --status failed --error "{error_message}"
|
|
825
|
-
```
|
|
826
|
-
|
|
827
|
-
Wait for all workers to complete before proceeding to Phase 6.
|
|
828
|
-
|
|
829
|
-
### 5.6 Error Handling & Recovery
|
|
830
|
-
|
|
831
|
-
When any platform design worker reports failure:
|
|
832
|
-
|
|
833
|
-
#### Single Task Failure
|
|
834
|
-
|
|
835
|
-
1. **Identify failed task**: Record task_id, feature_id, platform_id, and error message
|
|
836
|
-
|
|
837
|
-
2. **Update DISPATCH-PROGRESS.json**:
|
|
838
|
-
```bash
|
|
839
|
-
node {update_progress_script} update-task --file {iterations_dir}/{current}/03.system-design/DISPATCH-PROGRESS.json --task-id {task_id} --status failed --error "{error_message}"
|
|
840
|
-
```
|
|
841
|
-
|
|
842
|
-
3. **Continue batch**: Do NOT stop entire batch for single failure. Complete remaining workers.
|
|
843
|
-
|
|
844
|
-
4. **Report to user** after batch completes:
|
|
845
|
-
```
|
|
846
|
-
📊 Phase 5 Batch Result: {success_count}/{total_count} succeeded, {fail_count} failed
|
|
847
|
-
|
|
848
|
-
Failed Tasks:
|
|
849
|
-
├── Task ID: {task_id}
|
|
850
|
-
├── Feature: {feature_id} ({feature_name})
|
|
851
|
-
├── Platform: {platform_id}
|
|
852
|
-
└── Error: {error_message}
|
|
853
|
-
|
|
854
|
-
Retry options:
|
|
855
|
-
- "retry" → Re-dispatch failed task(s) only
|
|
856
|
-
- "skip" → Skip failed task(s), continue to Phase 6
|
|
857
|
-
- "abort" → Stop workflow, save partial results
|
|
858
|
-
```
|
|
859
|
-
|
|
860
|
-
5. **Retry strategy**:
|
|
861
|
-
- If user says "retry" → Re-dispatch only failed tasks in next batch
|
|
862
|
-
- If user says "skip" → Mark as `skipped`, proceed to Phase 6 with partial results
|
|
863
|
-
- If user says "abort" → STOP workflow, report completed designs
|
|
864
|
-
|
|
865
|
-
#### Batch Failure (>50% workers fail)
|
|
866
|
-
|
|
867
|
-
If batch failure rate exceeds 50%:
|
|
868
|
-
|
|
869
|
-
```
|
|
870
|
-
❌ BATCH FAILURE THRESHOLD EXCEEDED
|
|
871
|
-
|
|
872
|
-
Batch Statistics:
|
|
873
|
-
├── Total: {total} tasks
|
|
874
|
-
├── Completed: {success_count}
|
|
875
|
-
├── Failed: {fail_count}
|
|
876
|
-
└── Failure Rate: {rate}% (exceeds 50% threshold)
|
|
877
|
-
|
|
878
|
-
MANDATORY ACTIONS (workflow STOPS):
|
|
879
|
-
1. Report all failure details to user
|
|
880
|
-
2. Ask: "Investigate root cause and retry?" or "Abort workflow?"
|
|
881
|
-
3. IF retry:
|
|
882
|
-
- User investigates root cause (e.g., techs knowledge incomplete, skill misconfigured)
|
|
883
|
-
- Return to Phase 2 (re-load knowledge) or Phase 3 (re-evaluate frameworks) if needed
|
|
884
|
-
- OR: Return to Phase 5 to re-dispatch failed tasks only
|
|
885
|
-
4. IF abort → END workflow, save partial results
|
|
886
|
-
```
|
|
887
|
-
|
|
888
|
-
#### Multi-Batch Partial Completion
|
|
889
|
-
|
|
890
|
-
When executing multiple batches (tasks > 6):
|
|
891
|
-
- If Batch N completes with >50% failure → **STOP** before starting Batch N+1
|
|
892
|
-
- If Batch N has some failures (≤50%) → Ask user before starting Batch N+1
|
|
893
|
-
- If Batch N fully succeeds → Automatically proceed to Batch N+1
|
|
894
|
-
|
|
895
|
-
## Phase 6: Joint Confirmation
|
|
896
|
-
|
|
897
|
-
After all platform designs are complete:
|
|
898
|
-
|
|
899
|
-
1. **Present summary by Feature ID**:
|
|
900
|
-
```
|
|
901
|
-
Feature F-CRM-01 (customer-list):
|
|
902
|
-
├── web-vue/F-CRM-01-customer-list-design.md [SUCCESS]
|
|
903
|
-
├── backend-spring/F-CRM-01-customer-list-design.md [SUCCESS]
|
|
904
|
-
└── mobile-uniapp/F-CRM-01-customer-list-design.md [FAILED]
|
|
905
|
-
|
|
906
|
-
Feature F-CRM-02 (customer-detail):
|
|
907
|
-
├── web-vue/F-CRM-02-customer-detail-design.md [SUCCESS]
|
|
908
|
-
├── backend-spring/F-CRM-02-customer-detail-design.md [SUCCESS]
|
|
909
|
-
└── mobile-uniapp/F-CRM-02-customer-detail-design.md [SUCCESS]
|
|
910
|
-
```
|
|
911
|
-
|
|
912
|
-
2. **Summary statistics**:
|
|
913
|
-
- Total Features: {count}
|
|
914
|
-
- Total Platforms: {count}
|
|
915
|
-
- Total Tasks: {count}
|
|
916
|
-
- Completed: {count}
|
|
917
|
-
- Failed: {count}
|
|
918
|
-
|
|
919
|
-
3. **List all design documents with paths**
|
|
920
|
-
4. **Highlight cross-platform integration points**
|
|
921
|
-
5. **Request user confirmation**
|
|
922
|
-
|
|
923
|
-
### 6.1 User Confirmation (🛑 HARD STOP)
|
|
924
|
-
|
|
925
|
-
> **DO NOT update any checkpoint, workflow status, or design document status before user confirmation.**
|
|
926
|
-
|
|
927
|
-
```
|
|
928
|
-
🛑 JOINT CONFIRMATION — AWAITING USER REVIEW
|
|
929
|
-
|
|
930
|
-
Design Documents Summary:
|
|
931
|
-
├── Total Features: {count}
|
|
932
|
-
├── Total Platforms: {count}
|
|
933
|
-
├── Total Design Tasks: {count}
|
|
934
|
-
├── Completed: {count}
|
|
935
|
-
└── Failed: {count}
|
|
936
|
-
|
|
937
|
-
[Design document tree from Phase 6 intro]
|
|
938
|
-
|
|
939
|
-
Document Status: 📝 Draft (pending your confirmation)
|
|
940
|
-
|
|
941
|
-
Please review all design documents above.
|
|
942
|
-
- "Confirm" or "OK" → Finalize all designs, update workflow status to confirmed
|
|
943
|
-
- "Modify" + specific Feature/Platform → Re-dispatch design workers for specified scope
|
|
944
|
-
- "Cancel" → Abort workflow, save partial results
|
|
945
|
-
```
|
|
946
|
-
|
|
947
|
-
**MANDATORY**: DO NOT proceed to Phase 6.2 (Update Checkpoints) until user explicitly confirms.
|
|
948
|
-
**MANDATORY**: DO NOT update WORKFLOW-PROGRESS.json to "confirmed" before user confirmation.
|
|
949
|
-
**MANDATORY**: DO NOT assume user silence or inactivity means confirmation.
|
|
950
|
-
|
|
951
|
-
### 6.2 DISPATCH-PROGRESS.json Task Entry Format
|
|
952
|
-
|
|
953
|
-
Each task entry contains the following fields:
|
|
954
|
-
```json
|
|
955
|
-
{
|
|
956
|
-
"id": "sd-web-vue-F-CRM-01",
|
|
957
|
-
"platform": "web-vue",
|
|
958
|
-
"feature_id": "F-CRM-01",
|
|
959
|
-
"feature_name": "customer-list",
|
|
960
|
-
"skill": "speccrew-sd-frontend",
|
|
961
|
-
"status": "completed",
|
|
962
|
-
"output": "03.system-design/web-vue/F-CRM-01-customer-list-design.md"
|
|
963
|
-
}
|
|
964
|
-
```
|
|
965
|
-
|
|
966
|
-
Legacy Format Compatibility (no Feature ID):
|
|
967
|
-
```json
|
|
968
|
-
{
|
|
969
|
-
"id": "sd-web-vue-crm",
|
|
970
|
-
"platform": "web-vue",
|
|
971
|
-
"feature_id": null,
|
|
972
|
-
"feature_name": "crm",
|
|
973
|
-
"skill": "speccrew-sd-frontend",
|
|
974
|
-
"status": "completed",
|
|
975
|
-
"output": "03.system-design/web-vue/crm-design.md"
|
|
976
|
-
}
|
|
977
|
-
```
|
|
978
|
-
|
|
979
|
-
### 6.3 Update Checkpoints on Confirmation
|
|
980
|
-
|
|
981
|
-
After user confirms:
|
|
982
|
-
|
|
983
|
-
1. **Write checkpoints**:
|
|
984
|
-
```bash
|
|
985
|
-
node {update_progress_script} write-checkpoint --file {iterations_dir}/{current}/03.system-design/.checkpoints.json --stage 03_system_design --checkpoint framework_evaluation --passed true
|
|
986
|
-
node {update_progress_script} write-checkpoint --file {iterations_dir}/{current}/03.system-design/.checkpoints.json --stage 03_system_design --checkpoint design_overview --passed true
|
|
987
|
-
node {update_progress_script} write-checkpoint --file {iterations_dir}/{current}/03.system-design/.checkpoints.json --stage 03_system_design --checkpoint joint_confirmation --passed true
|
|
988
|
-
```
|
|
989
|
-
|
|
990
|
-
2. **Update WORKFLOW-PROGRESS.json**:
|
|
991
|
-
```bash
|
|
992
|
-
node {update_progress_script} update-workflow --file {iterations_dir}/{current}/WORKFLOW-PROGRESS.json --stage 03_system_design --status confirmed --output "DESIGN-OVERVIEW.md, platform-indexes, module-designs"
|
|
993
|
-
```
|
|
994
|
-
|
|
995
|
-
3. **Designs become baseline** for Dev phase
|
|
158
|
+
<!-- @skill: speccrew-system-designer-orchestration -->
|
|
996
159
|
|
|
997
160
|
# Deliverables
|
|
998
161
|
|
|
999
|
-
| Deliverable | Path |
|
|
1000
|
-
|
|
1001
|
-
| Design Overview | `{iterations_dir}/{
|
|
1002
|
-
| Platform Index | `{iterations_dir}/{
|
|
1003
|
-
| Module Design | `{iterations_dir}/{
|
|
162
|
+
| Deliverable | Path | Generator |
|
|
163
|
+
|-------------|------|-----------|
|
|
164
|
+
| Design Overview | `{iterations_dir}/{current}/03.system-design/DESIGN-OVERVIEW.md` | `speccrew-sd-design-overview-generate` worker |
|
|
165
|
+
| Platform Index | `{iterations_dir}/{current}/03.system-design/{platform_id}/INDEX.md` | `speccrew-task-worker` with `index_only: true` |
|
|
166
|
+
| Module Design | `{iterations_dir}/{current}/03.system-design/{platform_id}/{feature-id}-{feature-name}-design.md` | `speccrew-task-worker` with platform design skill |
|
|
1004
167
|
|
|
1005
168
|
**Output File Naming Rules**:
|
|
1006
169
|
|
|
1007
|
-
1. **New Format** (with Feature ID):
|
|
1008
|
-
|
|
1009
|
-
- Example: `F-CRM-01-customer-list-design.md`
|
|
1010
|
-
- Path: `03.system-design/web-vue/F-CRM-01-customer-list-design.md`
|
|
1011
|
-
|
|
1012
|
-
2. **Legacy Format Compatibility** (no Feature ID):
|
|
1013
|
-
- Format: `{module}-design.md`
|
|
1014
|
-
- Example: `crm-design.md`
|
|
1015
|
-
- Path: `03.system-design/web-vue/crm-design.md`
|
|
1016
|
-
|
|
1017
|
-
**Backward Compatibility Logic**:
|
|
1018
|
-
- If `feature_id` exists → use `{feature-id}-{feature-name}-design.md`
|
|
1019
|
-
- If `feature_id` is null (legacy format) → use `{module}-design.md`
|
|
170
|
+
1. **New Format** (with Feature ID): `{feature-id}-{feature-name}-design.md` (e.g., `F-CRM-01-customer-list-design.md`)
|
|
171
|
+
2. **Legacy Format** (no Feature ID): `{module}-design.md` (e.g., `crm-design.md`)
|
|
1020
172
|
|
|
1021
173
|
# Backward Compatibility
|
|
1022
174
|
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
**Examples**:
|
|
1032
|
-
- `F-CRM-01-customer-list-feature-spec.md`
|
|
1033
|
-
- `F-CRM-01-customer-list-api-contract.md`
|
|
1034
|
-
|
|
1035
|
-
**Characteristics**:
|
|
1036
|
-
- File name starts with `F-`
|
|
1037
|
-
- Contains Feature ID (e.g., `F-CRM-01`)
|
|
1038
|
-
- Feature ID format: `F-{MODULE}-{NN}`
|
|
1039
|
-
|
|
1040
|
-
## Legacy Format (Module-level Feature)
|
|
1041
|
-
|
|
1042
|
-
**File Name Format**:
|
|
1043
|
-
- Feature Spec: `{module-name}-feature-spec.md`
|
|
1044
|
-
- API Contract: `{module-name}-api-contract.md`
|
|
1045
|
-
|
|
1046
|
-
**Examples**:
|
|
1047
|
-
- `crm-feature-spec.md`
|
|
1048
|
-
- `crm-api-contract.md`
|
|
1049
|
-
|
|
1050
|
-
**Characteristics**:
|
|
1051
|
-
- File name does not start with `F-`
|
|
1052
|
-
- No Feature ID
|
|
1053
|
-
- Uses module name as identifier
|
|
1054
|
-
|
|
1055
|
-
## Format Detection Logic
|
|
1056
|
-
|
|
1057
|
-
```
|
|
1058
|
-
File name starts with "F-" and matches regex ^F-[A-Z]+-\d+-
|
|
1059
|
-
→ New format, extract Feature ID
|
|
1060
|
-
Otherwise
|
|
1061
|
-
→ Legacy format, use module name
|
|
1062
|
-
```
|
|
1063
|
-
|
|
1064
|
-
## Backward Compatibility Handling
|
|
175
|
+
| Scenario | New Format | Legacy Format |
|
|
176
|
+
|----------|-----------|---------------|
|
|
177
|
+
| File name pattern | `F-{MODULE}-{NN}-{name}-feature-spec.md` | `{module}-feature-spec.md` |
|
|
178
|
+
| Feature ID | Extracted from filename | `null` |
|
|
179
|
+
| Feature Name | Extracted from filename | Module name |
|
|
180
|
+
| Task ID | `sd-{platform}-{feature-id}` | `sd-{platform}-{feature_name}` |
|
|
181
|
+
| Output Filename | `{feature-id}-{feature-name}-design.md` | `{module}-design.md` |
|
|
182
|
+
| DESIGN-OVERVIEW Feature ID column | Actual ID | `-` |
|
|
1065
183
|
|
|
1066
|
-
|
|
1067
|
-
|----------|----------|
|
|
1068
|
-
| Feature ID | New format: extract `F-{MODULE}-{NN}`; Legacy format: null |
|
|
1069
|
-
| Feature Name | New format: extract from filename; Legacy format: module name |
|
|
1070
|
-
| Task ID | New format: `sd-{platform}-{feature-id}`; Legacy format: `sd-{platform}-{feature_name}` |
|
|
1071
|
-
| Output Filename | New format: `{feature-id}-{feature-name}-design.md`; Legacy format: `{module}-design.md` |
|
|
1072
|
-
| DESIGN-OVERVIEW | Feature ID column shows `-` or actual ID |
|
|
184
|
+
**Format Detection**: File name starts with `F-` and matches regex `^F-[A-Z]+-\d+-` → New format; otherwise → Legacy format.
|
|
1073
185
|
|
|
1074
186
|
# Constraints
|
|
1075
187
|
|
|
1076
188
|
**Must do:**
|
|
1077
189
|
- Phase 0.1: ALWAYS verify Feature Design stage is confirmed before proceeding
|
|
1078
190
|
- Phase 0.5: ALWAYS detect IDE directory and verify skills exist before dispatching
|
|
1079
|
-
- Phase 2: MUST verify ALL techs knowledge files exist
|
|
1080
|
-
- Phase 3: MUST dispatch speccrew-sd-framework-evaluate via speccrew-task-worker (Agent tool)
|
|
1081
|
-
- Phase 3: User MUST confirm framework decisions (
|
|
1082
|
-
- Phase 4: MUST dispatch speccrew-task-worker with speccrew-sd-design-overview-generate skill
|
|
1083
|
-
- Phase 5: MUST use speccrew-task-worker to dispatch platform-specific design skills for parallel execution
|
|
1084
|
-
- Phase 5: MUST use update-progress.js script for ALL progress tracking
|
|
1085
|
-
- Phase 6: MUST collect ALL worker results and present joint summary before requesting user confirmation
|
|
191
|
+
- Phase 2: MUST verify ALL techs knowledge files exist before Phase 3
|
|
192
|
+
- Phase 3: MUST dispatch speccrew-sd-framework-evaluate via speccrew-task-worker (Agent tool)
|
|
193
|
+
- Phase 3: User MUST confirm framework decisions (HARD STOP) before proceeding to Phase 4
|
|
194
|
+
- Phase 4: MUST dispatch speccrew-task-worker with speccrew-sd-design-overview-generate skill BEFORE dispatching platform workers
|
|
195
|
+
- Phase 5: MUST use speccrew-task-worker to dispatch platform-specific design skills for parallel execution
|
|
196
|
+
- Phase 5: MUST use update-progress.js script for ALL progress tracking
|
|
197
|
+
- Phase 6: MUST collect ALL worker results and present joint summary before requesting user confirmation
|
|
1086
198
|
- Phase 6: ONLY after user explicitly confirms → update workflow status and checkpoints
|
|
1087
199
|
- ALL: Verify techs knowledge exists BEFORE dispatching design skills
|
|
1088
200
|
- ALL: Verify API Contract exists and reference it (read-only)
|
|
1089
|
-
- ALL: Parse Feature ID from filename when using new format; maintain backward compatibility
|
|
201
|
+
- ALL: Parse Feature ID from filename when using new format; maintain backward compatibility
|
|
1090
202
|
|
|
1091
203
|
**Must not do:**
|
|
1092
204
|
- DO NOT write actual source code (only pseudo-code in design docs)
|
|
1093
205
|
- DO NOT modify API Contract documents under any circumstances
|
|
1094
|
-
- DO NOT skip framework evaluation checkpoint
|
|
206
|
+
- DO NOT skip framework evaluation checkpoint
|
|
1095
207
|
- DO NOT assume technology stack without verifying techs knowledge exists
|
|
1096
208
|
- DO NOT generate designs for platforms not in techs-manifest
|
|
1097
|
-
- DO NOT generate DESIGN-OVERVIEW.md yourself
|
|
1098
|
-
- DO NOT invoke platform design skills directly when 2+ features or 2+ platforms exist
|
|
1099
|
-
- DO NOT create or manually edit DISPATCH-PROGRESS.json, .checkpoints.json, or WORKFLOW-PROGRESS.json
|
|
209
|
+
- DO NOT generate DESIGN-OVERVIEW.md yourself
|
|
210
|
+
- DO NOT invoke platform design skills directly when 2+ features or 2+ platforms exist
|
|
211
|
+
- DO NOT create or manually edit DISPATCH-PROGRESS.json, .checkpoints.json, or WORKFLOW-PROGRESS.json
|
|
1100
212
|
- DO NOT update WORKFLOW-PROGRESS.json status to "confirmed" before joint user confirmation in Phase 6
|
|
1101
|
-
- DO NOT proceed to the next batch or Phase 6 if any Phase 5 batch worker failure rate > 50%
|
|
1102
|
-
- DO NOT generate INDEX.md directly —
|
|
213
|
+
- DO NOT proceed to the next batch or Phase 6 if any Phase 5 batch worker failure rate > 50%
|
|
214
|
+
- DO NOT generate INDEX.md directly — use worker with `index_only: true`
|
|
1103
215
|
- DO NOT skip backward compatibility checks for old format Feature Specs
|
|
1104
|
-
- DO NOT automatically transition to or invoke the next stage agent
|
|
216
|
+
- DO NOT automatically transition to or invoke the next stage agent
|
|
1105
217
|
|
|
1106
218
|
---
|
|
1107
219
|
|