speccrew 0.7.54 → 0.7.56
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-system-designer.md +21 -6
- package/.speccrew/skills/speccrew-sd-design-overview-generate/SKILL.md +240 -0
- package/.speccrew/skills/speccrew-sd-design-overview-generate/workflow.agentflow.xml +161 -0
- package/.speccrew/skills/speccrew-system-designer-orchestration/SKILL.md +15 -1
- package/.speccrew/skills/speccrew-system-designer-orchestration/workflow.agentflow.xml +32 -14
- package/package.json +1 -1
|
@@ -31,8 +31,8 @@ Phase 2: Resource Verification
|
|
|
31
31
|
Phase 3: Framework Evaluation (HARD STOP)
|
|
32
32
|
└── Dispatch speccrew-sd-framework-evaluate skill → User confirms
|
|
33
33
|
↓
|
|
34
|
-
Phase 4: Generate DESIGN-OVERVIEW.md
|
|
35
|
-
└──
|
|
34
|
+
Phase 4: Generate DESIGN-OVERVIEW.md (WORKER-DISPATCH)
|
|
35
|
+
└── Dispatch speccrew-sd-design-overview-generate skill → Wait for worker → Validate output
|
|
36
36
|
↓
|
|
37
37
|
Phase 5: Dispatch Per-Platform Skills
|
|
38
38
|
├── Single Feature + Single Platform → Direct skill invocation
|
|
@@ -57,7 +57,6 @@ This agent is an **orchestrator/dispatcher**. For system design execution (Phase
|
|
|
57
57
|
### Agent-Allowed Deliverables
|
|
58
58
|
|
|
59
59
|
This agent MAY directly create/modify ONLY the following files:
|
|
60
|
-
- ✅ `DESIGN-OVERVIEW.md`
|
|
61
60
|
- ✅ `DISPATCH-PROGRESS.json` (via update-progress.js script only)
|
|
62
61
|
- ✅ `.checkpoints.json` (via update-progress.js script only)
|
|
63
62
|
- ✅ Progress summary messages to user
|
|
@@ -65,6 +64,9 @@ This agent MAY directly create/modify ONLY the following files:
|
|
|
65
64
|
> Note: `framework-evaluation.md` is generated **ONLY** by the `speccrew-sd-framework-evaluate` skill.
|
|
66
65
|
> The Agent MUST NOT create or modify this file manually.
|
|
67
66
|
|
|
67
|
+
> Note: `DESIGN-OVERVIEW.md` is generated **ONLY** by the `speccrew-sd-design-overview-generate` skill dispatched to a worker agent.
|
|
68
|
+
> The Agent MUST NOT create or modify this file manually.
|
|
69
|
+
|
|
68
70
|
### FORBIDDEN Actions (When Features ≥ 2 OR Platforms ≥ 2)
|
|
69
71
|
|
|
70
72
|
1. ❌ DO NOT invoke `speccrew-sd-backend` skill directly
|
|
@@ -124,7 +126,7 @@ This agent MUST execute tasks continuously without unnecessary interruptions.
|
|
|
124
126
|
| Phase 2 | KNOWLEDGE-FIRST | MUST load ALL techs knowledge before Phase 3. DO NOT assume technology stack |
|
|
125
127
|
| Phase 3 | WORKER-DISPATCH | Framework evaluation MUST be dispatched to speccrew-task-worker via **Agent tool**. Agent MUST NOT invoke speccrew-sd-framework-evaluate via Skill tool. |
|
|
126
128
|
| Phase 3 | HARD STOP | User must confirm framework decisions before proceeding to Phase 4 |
|
|
127
|
-
| Phase 4 |
|
|
129
|
+
| Phase 4 | WORKER-DISPATCH | DESIGN-OVERVIEW.md generation MUST be dispatched to speccrew-task-worker via **Agent tool**. Agent MUST NOT generate this file inline. |
|
|
128
130
|
| Phase 5 | SKILL-ONLY | Platform design workers MUST use platform-specific design skills. Agent MUST NOT write design documents itself |
|
|
129
131
|
| Phase 6 | HARD STOP | User must confirm all designs before finalizing |
|
|
130
132
|
| ALL | ABORT ON FAILURE | If any skill invocation fails → STOP and report. Do NOT generate content manually as fallback |
|
|
@@ -529,6 +531,19 @@ Proceed to Phase 4? (Confirm/Cancel)
|
|
|
529
531
|
|
|
530
532
|
## Phase 4: Generate DESIGN-OVERVIEW.md (L1)
|
|
531
533
|
|
|
534
|
+
> 🛑 **CRITICAL: Phase 4 dispatch-to-worker Protocol**
|
|
535
|
+
>
|
|
536
|
+
> When executing Phase 4 (Design Overview Generation):
|
|
537
|
+
> 1. Use **Agent tool** to create a new sub-Agent
|
|
538
|
+
> 2. Specify sub-Agent role as **speccrew-task-worker**
|
|
539
|
+
> 3. Pass `skill_path`: `${workspace_path}/.speccrew/skills/speccrew-sd-design-overview-generate/SKILL.md`
|
|
540
|
+
> 4. Pass context parameters: workspace_path, iteration_path, feature_registry_path, techs_manifest_path, framework_evaluation_path, output_path
|
|
541
|
+
> 5. **Wait for Worker completion** before proceeding to validation
|
|
542
|
+
>
|
|
543
|
+
> **FORBIDDEN**:
|
|
544
|
+
> - ❌ DO NOT generate DESIGN-OVERVIEW.md yourself
|
|
545
|
+
> - ❌ DO NOT use Skill tool to invoke speccrew-sd-design-overview-generate
|
|
546
|
+
|
|
532
547
|
Create the top-level overview at:
|
|
533
548
|
`{iterations_dir}/{current}/03.system-design/DESIGN-OVERVIEW.md`
|
|
534
549
|
|
|
@@ -1025,7 +1040,7 @@ Otherwise
|
|
|
1025
1040
|
- Phase 2: MUST verify ALL techs knowledge files exist (manifest + platform-specific stacks) before Phase 3
|
|
1026
1041
|
- Phase 3: MUST dispatch speccrew-sd-framework-evaluate via speccrew-task-worker (Agent tool) — DO NOT evaluate yourself and DO NOT invoke via Skill tool
|
|
1027
1042
|
- Phase 3: User MUST confirm framework decisions (🛑 HARD STOP) before proceeding to Phase 4
|
|
1028
|
-
- Phase 4: MUST generate DESIGN-OVERVIEW.md
|
|
1043
|
+
- Phase 4: MUST dispatch speccrew-task-worker with speccrew-sd-design-overview-generate skill to generate DESIGN-OVERVIEW.md BEFORE dispatching platform workers
|
|
1029
1044
|
- Phase 5: MUST use speccrew-task-worker to dispatch platform-specific design skills for parallel execution (never direct skill invocation for batch)
|
|
1030
1045
|
- Phase 5: MUST use update-progress.js script for ALL progress tracking (DISPATCH-PROGRESS.json, .checkpoints.json, WORKFLOW-PROGRESS.json)
|
|
1031
1046
|
- Phase 6: MUST collect ALL worker results and present joint summary before requesting user confirmation (🛑 HARD STOP)
|
|
@@ -1040,7 +1055,7 @@ Otherwise
|
|
|
1040
1055
|
- DO NOT skip framework evaluation checkpoint — user confirmation is mandatory
|
|
1041
1056
|
- DO NOT assume technology stack without verifying techs knowledge exists
|
|
1042
1057
|
- DO NOT generate designs for platforms not in techs-manifest
|
|
1043
|
-
- DO NOT generate
|
|
1058
|
+
- DO NOT generate DESIGN-OVERVIEW.md yourself — dispatch speccrew-task-worker with speccrew-sd-design-overview-generate skill. Agent does NOT directly generate ANY system design documents.
|
|
1044
1059
|
- DO NOT invoke platform design skills directly when 2+ features or 2+ platforms exist — use speccrew-task-worker
|
|
1045
1060
|
- DO NOT create or manually edit DISPATCH-PROGRESS.json, .checkpoints.json, or WORKFLOW-PROGRESS.json — use update-progress.js script only
|
|
1046
1061
|
- DO NOT update WORKFLOW-PROGRESS.json status to "confirmed" before joint user confirmation in Phase 6
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-sd-design-overview-generate
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: Design Overview Generation Skill for System Designer. Reads Feature Registry, techs-manifest platforms, and framework evaluation results to generate a comprehensive DESIGN-OVERVIEW.md with Feature×Platform matrix index. Invoked by System Designer Agent during Phase 4 via worker dispatch.
|
|
5
|
+
tools: Read, Write, Glob, Grep
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Trigger Scenarios
|
|
9
|
+
|
|
10
|
+
- System Designer Agent dispatches this skill during Phase 4 to generate DESIGN-OVERVIEW.md
|
|
11
|
+
- User requests a design overview document for the current iteration
|
|
12
|
+
- Need to establish a Feature×Platform matrix index before per-platform system design begins
|
|
13
|
+
|
|
14
|
+
## AgentFlow Definition
|
|
15
|
+
|
|
16
|
+
<!-- @agentflow: workflow.agentflow.xml -->
|
|
17
|
+
|
|
18
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
|
|
19
|
+
|
|
20
|
+
## Workflow
|
|
21
|
+
|
|
22
|
+
## Absolute Constraints
|
|
23
|
+
|
|
24
|
+
> **These rules apply to ALL steps. Violation = task failure.**
|
|
25
|
+
|
|
26
|
+
1. **READ-ONLY on Feature Spec and API Contract** — NEVER modify Feature Spec or API Contract documents. Only read for reference.
|
|
27
|
+
2. **READ-ONLY on techs-manifest.json** — NEVER modify the techs manifest. Only read for platform information.
|
|
28
|
+
3. **READ-ONLY on framework-evaluation.md** — NEVER modify the framework evaluation report. Only read for technology decisions.
|
|
29
|
+
4. **Single Output Only** — Only create DESIGN-OVERVIEW.md at the specified output_path. No other files.
|
|
30
|
+
5. **Direct-to-File Output** — Write all content directly to DESIGN-OVERVIEW.md. DO NOT display document content in conversation.
|
|
31
|
+
|
|
32
|
+
## Step 1: Read Inputs
|
|
33
|
+
|
|
34
|
+
**Input Parameters** (from agent context):
|
|
35
|
+
|
|
36
|
+
| Parameter | Type | Required | Description |
|
|
37
|
+
|-----------|------|----------|-------------|
|
|
38
|
+
| `workspace_path` | string | Yes | speccrew-workspace root directory path |
|
|
39
|
+
| `iteration_path` | string | Yes | Current iteration directory path |
|
|
40
|
+
| `feature_registry_path` | string | Yes | Path to .prd-feature-list.json |
|
|
41
|
+
| `techs_manifest_path` | string | Yes | Path to techs-manifest.json |
|
|
42
|
+
| `framework_evaluation_path` | string | Yes | Path to framework-evaluation.md |
|
|
43
|
+
| `output_path` | string | No | Output file path (default: iteration_path/03.system-design/DESIGN-OVERVIEW.md) |
|
|
44
|
+
|
|
45
|
+
Read in order:
|
|
46
|
+
|
|
47
|
+
1. **Read .prd-feature-list.json** — Extract features array:
|
|
48
|
+
- `feature_id` (e.g., F-CRM-01) or `module_name` for legacy format
|
|
49
|
+
- `feature_name` or `module_name`
|
|
50
|
+
- `feature_spec` path
|
|
51
|
+
- `api_contract` path
|
|
52
|
+
- `module`
|
|
53
|
+
- `type`
|
|
54
|
+
|
|
55
|
+
2. **Read techs-manifest.json** — Extract platforms array:
|
|
56
|
+
- `platform_id` (e.g., web-react, backend-nodejs)
|
|
57
|
+
- `friendly_name`
|
|
58
|
+
- `tech_stack`
|
|
59
|
+
|
|
60
|
+
3. **Read framework-evaluation.md** — Extract Technology Decisions:
|
|
61
|
+
- Framework evaluation results
|
|
62
|
+
- New dependencies introduced (if any)
|
|
63
|
+
- Version constraints
|
|
64
|
+
|
|
65
|
+
## Step 2: Build Feature×Platform Matrix
|
|
66
|
+
|
|
67
|
+
For each feature × platform combination, generate one matrix row:
|
|
68
|
+
|
|
69
|
+
| Field | Source |
|
|
70
|
+
|-------|--------|
|
|
71
|
+
| `feature_id` | feature.feature_id (or "-" for legacy format) |
|
|
72
|
+
| `feature_name` | feature.feature_name (or feature.module_name for legacy) |
|
|
73
|
+
| `platform` | platform.friendly_name |
|
|
74
|
+
| `platform_id` | platform.platform_id |
|
|
75
|
+
| `skill` | Map platform_id prefix → speccrew-sd-{type} (see below) |
|
|
76
|
+
| `design_directory` | {platform_id}/{feature_id}-{feature_name}-design.md (new) or {platform_id}/{module}-design.md (legacy) |
|
|
77
|
+
| `status` | Always "pending" |
|
|
78
|
+
|
|
79
|
+
### Platform ID Prefix → Skill Mapping
|
|
80
|
+
|
|
81
|
+
| Platform ID Prefix | Target Skill |
|
|
82
|
+
|-------------------|--------------|
|
|
83
|
+
| web-* | speccrew-sd-frontend |
|
|
84
|
+
| backend-* | speccrew-sd-backend |
|
|
85
|
+
| mobile-* | speccrew-sd-mobile |
|
|
86
|
+
| desktop-* | speccrew-sd-desktop |
|
|
87
|
+
|
|
88
|
+
### Legacy Format Compatibility
|
|
89
|
+
|
|
90
|
+
If a feature does NOT have a Feature ID (no "F-" prefix):
|
|
91
|
+
- Feature ID column displays `-`
|
|
92
|
+
- Use `module_name` as Feature Name
|
|
93
|
+
- Design Directory uses `{platform_id}/{module_name}-design.md` (legacy format)
|
|
94
|
+
|
|
95
|
+
## Step 3: Generate DESIGN-OVERVIEW.md
|
|
96
|
+
|
|
97
|
+
Write the design overview document to `output_path`.
|
|
98
|
+
|
|
99
|
+
### Document Structure
|
|
100
|
+
|
|
101
|
+
```markdown
|
|
102
|
+
# System Design Overview - {Iteration Name}
|
|
103
|
+
|
|
104
|
+
## 1. Design Scope
|
|
105
|
+
|
|
106
|
+
- **Iteration**: {iteration_identifier}
|
|
107
|
+
- **Platforms**: {platform_list}
|
|
108
|
+
- **Features**: {count} features discovered
|
|
109
|
+
|
|
110
|
+
### 1.1 Feature List
|
|
111
|
+
|
|
112
|
+
| Feature ID | Feature Name | Feature Spec | API Contract |
|
|
113
|
+
|------------|--------------|--------------|--------------|
|
|
114
|
+
| (from feature registry, one row per feature) |
|
|
115
|
+
|
|
116
|
+
> **Legacy Format Compatibility**: If file uses legacy format (no Feature ID), Feature ID column shows `-`, using module name as Feature Name
|
|
117
|
+
|
|
118
|
+
## 2. Technology Decisions
|
|
119
|
+
|
|
120
|
+
(from framework-evaluation.md - Phase 3 results)
|
|
121
|
+
|
|
122
|
+
- Framework evaluation results
|
|
123
|
+
- New dependencies introduced (if any)
|
|
124
|
+
- Version constraints
|
|
125
|
+
|
|
126
|
+
## 3. Platform Design Index
|
|
127
|
+
|
|
128
|
+
| Feature ID | Feature Name | Platform | Platform ID | Skill | Design Directory | Status |
|
|
129
|
+
|------------|--------------|----------|-------------|-------|------------------|--------|
|
|
130
|
+
| (Feature × Platform matrix from Step 2) |
|
|
131
|
+
|
|
132
|
+
> **Notes**:
|
|
133
|
+
> - New Format: Design Directory contains `{feature-id}-{feature-name}` (e.g., `F-CRM-01-customer-list-design.md`)
|
|
134
|
+
> - Legacy Format: Design Directory uses `{module}-design.md`
|
|
135
|
+
|
|
136
|
+
## 4. Feature Summary (Optional - when Feature count > 5)
|
|
137
|
+
|
|
138
|
+
### 4.1 Feature by Module
|
|
139
|
+
|
|
140
|
+
| Module | Feature Count | Feature IDs |
|
|
141
|
+
|--------|---------------|-------------|
|
|
142
|
+
| (group features by module) |
|
|
143
|
+
|
|
144
|
+
### 4.2 Feature Type Distribution
|
|
145
|
+
|
|
146
|
+
| Type | Count | Features |
|
|
147
|
+
|------|-------|----------|
|
|
148
|
+
| (group features by type) |
|
|
149
|
+
|
|
150
|
+
## 5. Cross-Platform Concerns
|
|
151
|
+
|
|
152
|
+
- Shared data structures
|
|
153
|
+
- Cross-platform API contracts
|
|
154
|
+
- Authentication/authorization strategy
|
|
155
|
+
- Error handling conventions
|
|
156
|
+
|
|
157
|
+
## 6. Design Constraints
|
|
158
|
+
|
|
159
|
+
- API Contract is READ-ONLY — do not modify
|
|
160
|
+
- All pseudo-code must use actual framework syntax from techs knowledge
|
|
161
|
+
- Each module design document maps 1:1 to a Feature Spec function
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Step 4: Validate Output
|
|
165
|
+
|
|
166
|
+
After writing DESIGN-OVERVIEW.md, verify:
|
|
167
|
+
|
|
168
|
+
- [ ] File exists at output_path
|
|
169
|
+
- [ ] Contains "## 1. Design Scope" section
|
|
170
|
+
- [ ] Contains "## 2. Technology Decisions" section
|
|
171
|
+
- [ ] Contains "## 3. Platform Design Index" table
|
|
172
|
+
- [ ] Platform Design Index covers all Feature × Platform combinations
|
|
173
|
+
- [ ] Feature count matches feature registry
|
|
174
|
+
- [ ] Platform count matches techs-manifest
|
|
175
|
+
- [ ] All index entries have status "pending"
|
|
176
|
+
|
|
177
|
+
## Step 5: Output Task Completion Report
|
|
178
|
+
|
|
179
|
+
After validation, output:
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
--- TASK COMPLETION REPORT ---
|
|
183
|
+
Task: Design Overview Generation
|
|
184
|
+
Status: SUCCESS
|
|
185
|
+
Output: {output_path}
|
|
186
|
+
Features: {feature_count}
|
|
187
|
+
Platforms: {platform_count}
|
|
188
|
+
Matrix Entries: {feature_count × platform_count}
|
|
189
|
+
--- END REPORT ---
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
If any step fails:
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
--- TASK COMPLETION REPORT ---
|
|
196
|
+
Task: Design Overview Generation
|
|
197
|
+
Status: FAILED
|
|
198
|
+
Error: {specific error description}
|
|
199
|
+
Failed At: Step {N}
|
|
200
|
+
--- END REPORT ---
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## OUTPUT EFFICIENCY RULES
|
|
204
|
+
|
|
205
|
+
When executing this skill:
|
|
206
|
+
|
|
207
|
+
1. **Direct-to-File Output**: All design overview content MUST be written directly to DESIGN-OVERVIEW.md
|
|
208
|
+
2. **Minimal Conversation Output**: Only output:
|
|
209
|
+
- Block execution announcements (1 line each): `[Block XX] Building matrix...`
|
|
210
|
+
- Error messages requiring attention
|
|
211
|
+
- Task Completion Report (final summary)
|
|
212
|
+
3. **FORBIDDEN in conversation**:
|
|
213
|
+
- Full document sections or drafts
|
|
214
|
+
- Feature × Platform matrix tables
|
|
215
|
+
- Feature list tables
|
|
216
|
+
- Technology decision excerpts longer than 2 lines
|
|
217
|
+
4. **Rationale**: Workers run in batch mode. Displaying design content in conversation wastes context window and provides no value since content goes to file anyway.
|
|
218
|
+
|
|
219
|
+
# Key Rules
|
|
220
|
+
|
|
221
|
+
| Rule | Description |
|
|
222
|
+
|------|-------------|
|
|
223
|
+
| **FORBIDDEN: Input Modification** | Do NOT modify feature specs, API contracts, techs-manifest, or framework-evaluation |
|
|
224
|
+
| **FORBIDDEN: Extra Files** | Do NOT create any files other than DESIGN-OVERVIEW.md |
|
|
225
|
+
| **FORBIDDEN: Conversation Output** | Do NOT display DESIGN-OVERVIEW content in conversation — write directly to file |
|
|
226
|
+
| **MANDATORY: Complete Matrix** | Platform Design Index MUST cover ALL Feature × Platform combinations |
|
|
227
|
+
| **MANDATORY: Pending Status** | ALL Platform Design Index entries MUST have status "pending" |
|
|
228
|
+
|
|
229
|
+
# Checklist
|
|
230
|
+
|
|
231
|
+
- [ ] .prd-feature-list.json read and features array extracted
|
|
232
|
+
- [ ] techs-manifest.json read and platforms array extracted
|
|
233
|
+
- [ ] framework-evaluation.md read and technology decisions extracted
|
|
234
|
+
- [ ] Feature format detected (new or legacy)
|
|
235
|
+
- [ ] Feature × Platform matrix built with all combinations
|
|
236
|
+
- [ ] Platform ID prefix correctly mapped to target skills
|
|
237
|
+
- [ ] DESIGN-OVERVIEW.md generated with all required sections
|
|
238
|
+
- [ ] Feature Summary section included only when feature count > 5
|
|
239
|
+
- [ ] Output validated against checklist
|
|
240
|
+
- [ ] Task Completion Report output
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<workflow id="sd-design-overview-generate-main" status="pending" version="1.0.0" desc="Design Overview Generation workflow">
|
|
3
|
+
|
|
4
|
+
<!-- ============================================================
|
|
5
|
+
Input Parameters Definition
|
|
6
|
+
============================================================ -->
|
|
7
|
+
<block type="input" id="I1" desc="Workflow input parameters">
|
|
8
|
+
<field name="workspace_path" required="true" type="string" desc="speccrew-workspace root directory path"/>
|
|
9
|
+
<field name="iteration_path" required="true" type="string" desc="Current iteration directory path"/>
|
|
10
|
+
<field name="feature_registry_path" required="true" type="string" desc="Path to .prd-feature-list.json"/>
|
|
11
|
+
<field name="techs_manifest_path" required="true" type="string" desc="Path to techs-manifest.json"/>
|
|
12
|
+
<field name="framework_evaluation_path" required="true" type="string" desc="Path to framework-evaluation.md"/>
|
|
13
|
+
<field name="output_path" required="false" type="string" desc="Output file path (default: iteration_path/03.system-design/DESIGN-OVERVIEW.md)"/>
|
|
14
|
+
</block>
|
|
15
|
+
|
|
16
|
+
<!-- ============================================================
|
|
17
|
+
Global Rules
|
|
18
|
+
============================================================ -->
|
|
19
|
+
<block type="rule" id="R1" level="forbidden" desc="Input File Protection">
|
|
20
|
+
<field name="text">DO NOT modify any input files (feature specs, API contracts, techs-manifest.json, framework-evaluation.md)</field>
|
|
21
|
+
</block>
|
|
22
|
+
|
|
23
|
+
<block type="rule" id="R2" level="forbidden" desc="Single Output Only">
|
|
24
|
+
<field name="text">DO NOT create any files other than DESIGN-OVERVIEW.md at the specified output_path</field>
|
|
25
|
+
</block>
|
|
26
|
+
|
|
27
|
+
<block type="rule" id="R3" level="mandatory" desc="Direct-to-File Output">
|
|
28
|
+
<field name="text">Write all design content directly to DESIGN-OVERVIEW.md. DO NOT display document content in conversation.</field>
|
|
29
|
+
</block>
|
|
30
|
+
|
|
31
|
+
<block type="rule" id="R4" level="mandatory" desc="Complete Matrix Coverage">
|
|
32
|
+
<field name="text">Platform Design Index MUST cover ALL Feature × Platform combinations. No feature or platform may be omitted.</field>
|
|
33
|
+
</block>
|
|
34
|
+
|
|
35
|
+
<!-- ============================================================
|
|
36
|
+
Main Processing Sequence
|
|
37
|
+
============================================================ -->
|
|
38
|
+
<sequence id="S1" name="Design Overview Generation" status="pending" desc="Generate DESIGN-OVERVIEW.md with Feature×Platform matrix">
|
|
39
|
+
|
|
40
|
+
<!-- Step 1: Read Feature Registry -->
|
|
41
|
+
<block type="task" id="B1" action="read-file" status="pending" desc="Read Feature Registry (.prd-feature-list.json)">
|
|
42
|
+
<field name="path" value="${feature_registry_path}"/>
|
|
43
|
+
<field name="output" var="feature_registry"/>
|
|
44
|
+
</block>
|
|
45
|
+
|
|
46
|
+
<!-- Step 2: Read Techs Manifest -->
|
|
47
|
+
<block type="task" id="B2" action="read-file" status="pending" desc="Read Techs Manifest (techs-manifest.json)">
|
|
48
|
+
<field name="path" value="${techs_manifest_path}"/>
|
|
49
|
+
<field name="output" var="techs_manifest"/>
|
|
50
|
+
</block>
|
|
51
|
+
|
|
52
|
+
<!-- Step 3: Read Framework Evaluation -->
|
|
53
|
+
<block type="task" id="B3" action="read-file" status="pending" desc="Read Framework Evaluation Report">
|
|
54
|
+
<field name="path" value="${framework_evaluation_path}"/>
|
|
55
|
+
<field name="output" var="framework_evaluation"/>
|
|
56
|
+
</block>
|
|
57
|
+
|
|
58
|
+
<!-- Step 4: Determine Feature Format -->
|
|
59
|
+
<block type="gateway" id="G1" mode="exclusive" desc="Check Feature ID format">
|
|
60
|
+
<branch test="${feature_registry.features[0].feature_id} exists and starts with 'F-'" name="New Format">
|
|
61
|
+
<block type="event" id="E1" action="log" level="info" desc="New format detected">
|
|
62
|
+
<field name="message">Feature registry uses new format with F- prefixed Feature IDs</field>
|
|
63
|
+
</block>
|
|
64
|
+
<field name="format" var="feature_format" value="new"/>
|
|
65
|
+
</branch>
|
|
66
|
+
<branch default="true" name="Legacy Format">
|
|
67
|
+
<block type="event" id="E2" action="log" level="info" desc="Legacy format detected">
|
|
68
|
+
<field name="message">Feature registry uses legacy format (no Feature IDs)</field>
|
|
69
|
+
</block>
|
|
70
|
+
<field name="format" var="feature_format" value="legacy"/>
|
|
71
|
+
</branch>
|
|
72
|
+
</block>
|
|
73
|
+
|
|
74
|
+
<!-- Step 5: Build Feature × Platform Matrix -->
|
|
75
|
+
<block type="task" id="B4" action="compute" status="pending" desc="Build Feature×Platform matrix index">
|
|
76
|
+
<field name="input" value="${feature_registry.features}">${techs_manifest.platforms}</field>
|
|
77
|
+
<field name="logic">
|
|
78
|
+
For each feature in feature_registry.features:
|
|
79
|
+
For each platform in techs_manifest.platforms:
|
|
80
|
+
- feature_id: feature.feature_id (or "-" for legacy)
|
|
81
|
+
- feature_name: feature.feature_name (or feature.module_name for legacy)
|
|
82
|
+
- platform: platform.friendly_name
|
|
83
|
+
- platform_id: platform.platform_id
|
|
84
|
+
- skill: map platform_id prefix → speccrew-sd-{type}
|
|
85
|
+
(web-* → frontend, backend-* → backend, mobile-* → mobile, desktop-* → desktop)
|
|
86
|
+
- design_directory: {platform_id}/{feature_id}-{feature_name}-design.md (new)
|
|
87
|
+
or {platform_id}/{module_name}-design.md (legacy)
|
|
88
|
+
- status: "pending"
|
|
89
|
+
</field>
|
|
90
|
+
<field name="output" var="platform_design_index"/>
|
|
91
|
+
</block>
|
|
92
|
+
|
|
93
|
+
<!-- Step 6: Check if Feature Summary needed -->
|
|
94
|
+
<block type="gateway" id="G2" mode="exclusive" desc="Feature count check for optional summary">
|
|
95
|
+
<branch test="${feature_registry.features.length} > 5" name="Large Feature Set">
|
|
96
|
+
<block type="event" id="E3" action="log" level="info" desc="Large feature set">
|
|
97
|
+
<field name="message">Feature count > 5, including Feature Summary section</field>
|
|
98
|
+
</block>
|
|
99
|
+
<field name="include_summary" var="include_feature_summary" value="true"/>
|
|
100
|
+
</branch>
|
|
101
|
+
<branch default="true" name="Small Feature Set">
|
|
102
|
+
<block type="event" id="E4" action="log" level="info" desc="Small feature set">
|
|
103
|
+
<field name="message">Feature count <= 5, skipping Feature Summary section</field>
|
|
104
|
+
</block>
|
|
105
|
+
<field name="include_summary" var="include_feature_summary" value="false"/>
|
|
106
|
+
</branch>
|
|
107
|
+
</block>
|
|
108
|
+
|
|
109
|
+
<!-- Step 7: Generate DESIGN-OVERVIEW.md -->
|
|
110
|
+
<block type="task" id="B5" action="write-file" status="pending" desc="Generate DESIGN-OVERVIEW.md with all sections">
|
|
111
|
+
<field name="path">${output_path}</field>
|
|
112
|
+
<field name="encoding">utf8</field>
|
|
113
|
+
<field name="content">
|
|
114
|
+
Section 1: Design Scope (iteration, platforms, features count, Feature List table)
|
|
115
|
+
Section 2: Technology Decisions (from framework_evaluation)
|
|
116
|
+
Section 3: Platform Design Index (from platform_design_index matrix)
|
|
117
|
+
Section 4: Feature Summary (ONLY if include_feature_summary == true)
|
|
118
|
+
- 4.1 Feature by Module
|
|
119
|
+
- 4.2 Feature Type Distribution
|
|
120
|
+
Section 5: Cross-Platform Concerns
|
|
121
|
+
Section 6: Design Constraints
|
|
122
|
+
</field>
|
|
123
|
+
</block>
|
|
124
|
+
|
|
125
|
+
<!-- Step 8: Validate Output -->
|
|
126
|
+
<block type="checkpoint" id="CP1" name="design_overview_validation" desc="Validate DESIGN-OVERVIEW.md completeness">
|
|
127
|
+
<field name="conditions">
|
|
128
|
+
file_exists: ${output_path} exists,
|
|
129
|
+
has_design_scope: contains "## 1. Design Scope",
|
|
130
|
+
has_tech_decisions: contains "## 2. Technology Decisions",
|
|
131
|
+
has_platform_index: contains "## 3. Platform Design Index",
|
|
132
|
+
matrix_complete: index row count == feature_count × platform_count,
|
|
133
|
+
all_pending: all status entries are "pending"
|
|
134
|
+
</field>
|
|
135
|
+
</block>
|
|
136
|
+
|
|
137
|
+
<!-- Step 9: Output Task Completion Report -->
|
|
138
|
+
<block type="event" id="E5" action="log" level="info" desc="Output completion report">
|
|
139
|
+
<field name="message">--- TASK COMPLETION REPORT ---
|
|
140
|
+
Task: Design Overview Generation
|
|
141
|
+
Status: SUCCESS
|
|
142
|
+
Output: ${output_path}
|
|
143
|
+
Features: ${feature_registry.features.length}
|
|
144
|
+
Platforms: ${techs_manifest.platforms.length}
|
|
145
|
+
Matrix Entries: ${feature_registry.features.length * techs_manifest.platforms.length}
|
|
146
|
+
--- END REPORT ---</field>
|
|
147
|
+
</block>
|
|
148
|
+
|
|
149
|
+
</sequence>
|
|
150
|
+
|
|
151
|
+
<!-- ============================================================
|
|
152
|
+
Output Results
|
|
153
|
+
============================================================ -->
|
|
154
|
+
<block type="output" id="O1" desc="Workflow output results">
|
|
155
|
+
<field name="design_overview_path" value="${output_path}" type="string" desc="Path to generated DESIGN-OVERVIEW.md"/>
|
|
156
|
+
<field name="feature_count" from="${feature_registry.features.length}" type="number" desc="Number of features in the matrix"/>
|
|
157
|
+
<field name="platform_count" from="${techs_manifest.platforms.length}" type="number" desc="Number of platforms in the matrix"/>
|
|
158
|
+
<field name="matrix_entries" from="${feature_registry.features.length * techs_manifest.platforms.length}" type="number" desc="Total Feature×Platform combinations"/>
|
|
159
|
+
</block>
|
|
160
|
+
|
|
161
|
+
</workflow>
|
|
@@ -35,7 +35,7 @@ System Designer 的核心编排技能,负责:
|
|
|
35
35
|
2. **Preparation** - 加载 Feature Registry,验证文件存在性
|
|
36
36
|
3. **Resource Verification** - 验证技术知识库可用性
|
|
37
37
|
4. **Framework Evaluation** - 派发单个 worker agent 执行框架评估技能,等待 worker 完成并验证 framework-evaluation.md 生成后进入下一阶段(HARD STOP 等待用户确认)
|
|
38
|
-
5. **Design Overview** -
|
|
38
|
+
5. **Design Overview** - 派发 worker agent 执行 speccrew-sd-design-overview-generate 技能生成 DESIGN-OVERVIEW.md,等待 worker 完成并验证输出
|
|
39
39
|
6. **Platform Dispatch** - 分发各平台设计任务给 Worker
|
|
40
40
|
7. **Joint Confirmation** - 联合确认所有设计文档
|
|
41
41
|
|
|
@@ -105,6 +105,18 @@ This skill MUST execute tasks continuously without unnecessary interruptions.
|
|
|
105
105
|
|
|
106
106
|
**CRITICAL**: The `Agent tool` creates a NEW agent session — this is completely different from the `Skill tool` which executes inline.
|
|
107
107
|
|
|
108
|
+
### Phase 4 Execution Method — Worker Agent Dispatch
|
|
109
|
+
|
|
110
|
+
**HOW TO DISPATCH**: When executing Phase 4 block P4-B1 (action="dispatch-to-worker"):
|
|
111
|
+
1. Use the **Agent tool** to create a new `speccrew-task-worker` agent
|
|
112
|
+
2. Pass `skill_path` to the worker: `${workspace_path}/.speccrew/skills/speccrew-sd-design-overview-generate/SKILL.md`
|
|
113
|
+
3. Pass context parameters: workspace_path, iteration_path, feature_registry_path (.prd-feature-list.json path), techs_manifest_path (techs-manifest.json path), framework_evaluation_path (framework-evaluation.md path), output_path
|
|
114
|
+
4. **Wait** for the worker agent to complete and return results
|
|
115
|
+
5. After worker completes, verify DESIGN-OVERVIEW.md exists at output_path
|
|
116
|
+
6. Then proceed to Phase 4 checkpoint validation (P4-CP1)
|
|
117
|
+
|
|
118
|
+
**CRITICAL**: The `Agent tool` creates a NEW agent session — this is completely different from the `Skill tool` which executes inline.
|
|
119
|
+
|
|
108
120
|
### HARD STOP Checkpoints
|
|
109
121
|
|
|
110
122
|
This workflow has **mandatory HARD STOP** checkpoints at:
|
|
@@ -130,3 +142,5 @@ DO NOT proceed past these checkpoints without explicit user confirmation.
|
|
|
130
142
|
- **DO NOT create scripts for batch analysis** — Workers handle this via their own skill
|
|
131
143
|
- **DO NOT fallback to inline execution if worker fails** — ABORT instead
|
|
132
144
|
- **DO NOT skip reading workflow.agentflow.xml** — XML is the execution authority
|
|
145
|
+
- **DO NOT generate DESIGN-OVERVIEW.md yourself** — Dispatch speccrew-task-worker with speccrew-sd-design-overview-generate skill
|
|
146
|
+
- **DO NOT use Skill tool for Phase 4 design overview generation** — Skill tool executes inline, Agent tool creates a worker
|
|
@@ -245,25 +245,43 @@
|
|
|
245
245
|
</block>
|
|
246
246
|
</sequence>
|
|
247
247
|
|
|
248
|
-
<!-- ========== Phase 4: Generate DESIGN-OVERVIEW.md ========== -->
|
|
249
|
-
<sequence name="Phase 4: Generate DESIGN-OVERVIEW.md">
|
|
250
|
-
<block type="rule" id="P4-
|
|
251
|
-
<field name="text">DESIGN-OVERVIEW.md
|
|
248
|
+
<!-- ========== Phase 4: Generate DESIGN-OVERVIEW.md (WORKER-DISPATCH) ========== -->
|
|
249
|
+
<sequence name="Phase 4: Generate DESIGN-OVERVIEW.md (WORKER-DISPATCH)">
|
|
250
|
+
<block type="rule" id="P4-R0" level="forbidden" desc="Phase 4 Worker Dispatch Enforcement">
|
|
251
|
+
<field name="text">FORBIDDEN: Do NOT inline-generate DESIGN-OVERVIEW.md yourself</field>
|
|
252
|
+
<field name="text">MANDATORY: DESIGN-OVERVIEW.md generation MUST be delegated to worker agent via block P4-B1</field>
|
|
253
|
+
<field name="text">TOOL MAPPING: action="dispatch-to-worker" → Use Agent tool (NOT Skill tool) to create speccrew-task-worker agent</field>
|
|
254
|
+
<field name="text">If worker dispatch fails, ABORT — do NOT fallback to inline generation</field>
|
|
252
255
|
</block>
|
|
253
256
|
|
|
254
|
-
<block type="task" id="P4-B1" action="
|
|
255
|
-
desc="
|
|
256
|
-
<field name="
|
|
257
|
-
<field name="
|
|
258
|
-
<field name="
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
257
|
+
<block type="task" id="P4-B1" action="dispatch-to-worker" status="pending"
|
|
258
|
+
desc="Dispatch single worker agent for design overview generation. Use Agent tool, NOT Skill tool.">
|
|
259
|
+
<field name="agent">speccrew-task-worker</field>
|
|
260
|
+
<field name="skill">speccrew-sd-design-overview-generate</field>
|
|
261
|
+
<field name="skill_path">${workspace_path}/.speccrew/skills/speccrew-sd-design-overview-generate/SKILL.md</field>
|
|
262
|
+
<field name="context">
|
|
263
|
+
workspace_path: ${workspace_path},
|
|
264
|
+
iteration_path: ${iterations_dir}/${current_iteration},
|
|
265
|
+
feature_registry_path: ${iterations_dir}/${current_iteration}/01.product-requirement/.prd-feature-list.json,
|
|
266
|
+
techs_manifest_path: ${workspace_path}/knowledges/techs/techs-manifest.json,
|
|
267
|
+
framework_evaluation_path: ${iterations_dir}/${current_iteration}/03.system-design/framework-evaluation.md,
|
|
268
|
+
output_path: ${iterations_dir}/${current_iteration}/03.system-design/DESIGN-OVERVIEW.md
|
|
263
269
|
</field>
|
|
270
|
+
<field name="note">Worker receives ALL context above and generates DESIGN-OVERVIEW.md. Orchestrator MUST NOT read feature files or generate this document itself.</field>
|
|
271
|
+
</block>
|
|
272
|
+
|
|
273
|
+
<block type="gateway" id="P4-GW1" mode="wait" desc="Wait for design overview worker to complete">
|
|
274
|
+
<field name="wait_for">P4-B1</field>
|
|
275
|
+
<field name="timeout">300</field>
|
|
276
|
+
</block>
|
|
277
|
+
|
|
278
|
+
<block type="task" id="P4-B2" action="read-file" status="pending"
|
|
279
|
+
desc="Verify DESIGN-OVERVIEW.md was generated by worker">
|
|
280
|
+
<field name="path">${iterations_dir}/${current_iteration}/03.system-design/DESIGN-OVERVIEW.md</field>
|
|
281
|
+
<field name="output" var="design_overview_content"/>
|
|
264
282
|
</block>
|
|
265
283
|
|
|
266
|
-
<!--
|
|
284
|
+
<!-- Validation Checkpoint -->
|
|
267
285
|
<block type="checkpoint" id="P4-CP1" name="design_overview" desc="DESIGN-OVERVIEW validation">
|
|
268
286
|
<field name="conditions">file_exists, has_design_scope_section, has_tech_decisions_section, has_platform_design_index, index_covers_all_feature_platform_combinations</field>
|
|
269
287
|
</block>
|