speccrew 0.7.3 → 0.7.5
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 +6 -0
- package/.speccrew/agents/speccrew-product-manager.md +6 -0
- package/.speccrew/agents/speccrew-system-deployer.md +6 -0
- package/.speccrew/agents/speccrew-system-designer.md +6 -0
- package/.speccrew/agents/speccrew-system-developer.md +6 -0
- package/.speccrew/agents/speccrew-task-worker.md +5 -0
- package/.speccrew/agents/speccrew-team-leader.md +7 -1
- package/.speccrew/agents/speccrew-test-manager.md +6 -0
- package/.speccrew/skills/speccrew-feature-designer-orchestration/SKILL.md +117 -0
- package/.speccrew/skills/speccrew-feature-designer-orchestration/workflow.agentflow.xml +463 -0
- package/.speccrew/skills/speccrew-product-manager-orchestration/SKILL.md +111 -0
- package/.speccrew/skills/speccrew-product-manager-orchestration/workflow.agentflow.xml +534 -0
- package/.speccrew/skills/speccrew-system-deployer-orchestration/SKILL.md +91 -0
- package/.speccrew/skills/speccrew-system-deployer-orchestration/workflow.agentflow.xml +309 -0
- package/.speccrew/skills/speccrew-system-designer-orchestration/SKILL.md +102 -0
- package/.speccrew/skills/speccrew-system-designer-orchestration/workflow.agentflow.xml +375 -0
- package/.speccrew/skills/speccrew-system-developer-orchestration/SKILL.md +110 -0
- package/.speccrew/skills/speccrew-system-developer-orchestration/workflow.agentflow.xml +422 -0
- package/.speccrew/skills/speccrew-task-worker-execution/SKILL.md +106 -0
- package/.speccrew/skills/speccrew-task-worker-execution/workflow.agentflow.xml +177 -0
- package/.speccrew/skills/speccrew-team-leader-routing/SKILL.md +91 -0
- package/.speccrew/{agents → skills/speccrew-team-leader-routing}/workflow.agentflow.xml +1 -1
- package/.speccrew/skills/speccrew-test-manager-orchestration/SKILL.md +106 -0
- package/.speccrew/skills/speccrew-test-manager-orchestration/workflow.agentflow.xml +442 -0
- package/package.json +1 -1
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<workflow id="system-designer-orchestration" status="pending">
|
|
3
|
+
|
|
4
|
+
<block type="input" id="I1" desc="System Designer orchestration input">
|
|
5
|
+
<field name="workspace_path" required="true" type="string" desc="speccrew-workspace root directory path"/>
|
|
6
|
+
<field name="iterations_dir" required="true" type="string" desc="iterations directory path"/>
|
|
7
|
+
<field name="update_progress_script" required="true" type="string" desc="Path to update-progress.js script"/>
|
|
8
|
+
<field name="current_iteration" required="false" type="string" desc="Current active iteration identifier"/>
|
|
9
|
+
</block>
|
|
10
|
+
|
|
11
|
+
<!-- ========== Phase 0: Stage Gate & Resume ========== -->
|
|
12
|
+
<sequence name="Phase 0: Stage Gate & Resume">
|
|
13
|
+
|
|
14
|
+
<!-- Step 0.1: Verify Upstream Completion -->
|
|
15
|
+
<block type="task" id="P0-B1" action="run-script" status="pending"
|
|
16
|
+
desc="Read WORKFLOW-PROGRESS.json overview">
|
|
17
|
+
<field name="command">node ${update_progress_script} read --file ${iterations_dir}/${current_iteration}/WORKFLOW-PROGRESS.json --overview</field>
|
|
18
|
+
<field name="output" var="workflow_progress"/>
|
|
19
|
+
</block>
|
|
20
|
+
|
|
21
|
+
<block type="gateway" id="P0-G1" mode="exclusive" desc="Check Feature Design stage status">
|
|
22
|
+
<branch test="${workflow_progress.stages.02_feature_design.status} == 'confirmed'" name="Feature Design Confirmed">
|
|
23
|
+
<block type="task" id="P0-B2" action="run-script" status="pending"
|
|
24
|
+
desc="Update System Design stage status to in_progress">
|
|
25
|
+
<field name="command">node ${update_progress_script} update-workflow --file ${iterations_dir}/${current_iteration}/WORKFLOW-PROGRESS.json --stage 03_system_design --status in_progress</field>
|
|
26
|
+
</block>
|
|
27
|
+
</branch>
|
|
28
|
+
<branch default="true" name="Feature Design Not Confirmed">
|
|
29
|
+
<block type="event" id="P0-E1" action="log" desc="Report Feature Design not confirmed">
|
|
30
|
+
<field name="message">Feature Design stage has not been confirmed. Please complete Feature Design confirmation first.</field>
|
|
31
|
+
</block>
|
|
32
|
+
<block type="event" id="P0-E2" action="abort" desc="Stop workflow"/>
|
|
33
|
+
</branch>
|
|
34
|
+
</block>
|
|
35
|
+
|
|
36
|
+
<!-- Step 0.2: Check Resume State -->
|
|
37
|
+
<block type="task" id="P0-B3" action="run-script" status="pending"
|
|
38
|
+
desc="Read checkpoints for resume state">
|
|
39
|
+
<field name="command">node ${update_progress_script} read --file ${iterations_dir}/${current_iteration}/03.system-design/.checkpoints.json --checkpoints</field>
|
|
40
|
+
<field name="output" var="checkpoints"/>
|
|
41
|
+
</block>
|
|
42
|
+
|
|
43
|
+
<!-- Step 0.3: Check Dispatch Resume -->
|
|
44
|
+
<block type="task" id="P0-B4" action="run-script" status="pending"
|
|
45
|
+
desc="Read dispatch progress summary">
|
|
46
|
+
<field name="command">node ${update_progress_script} read --file ${iterations_dir}/${current_iteration}/03.system-design/DISPATCH-PROGRESS.json --summary</field>
|
|
47
|
+
<field name="output" var="dispatch_progress"/>
|
|
48
|
+
</block>
|
|
49
|
+
</sequence>
|
|
50
|
+
|
|
51
|
+
<!-- ========== Phase 0.5: IDE Directory Detection ========== -->
|
|
52
|
+
<sequence name="Phase 0.5: IDE Directory Detection">
|
|
53
|
+
<block type="task" id="P05-B1" action="read-file" status="pending"
|
|
54
|
+
desc="Detect IDE directory and skills">
|
|
55
|
+
<field name="path">${workspace_path}/.qoder/skills</field>
|
|
56
|
+
<field name="output" var="ide_skills_dir"/>
|
|
57
|
+
</block>
|
|
58
|
+
|
|
59
|
+
<block type="rule" id="P05-R1" level="mandatory" desc="IDE skills directory verification">
|
|
60
|
+
<field name="text">Verify skills directory exists in priority order: .qoder/skills, .cursor/skills, .claude/skills, .speccrew/skills</field>
|
|
61
|
+
<field name="text">If NO IDE directory contains skills folder → STOP and report error</field>
|
|
62
|
+
</block>
|
|
63
|
+
|
|
64
|
+
<block type="gateway" id="P05-G1" mode="exclusive" desc="Verify platform design skills">
|
|
65
|
+
<branch test="${ide_skills_dir} exists" name="Skills Directory Found">
|
|
66
|
+
<block type="event" id="P05-E1" action="log" desc="Report available platform design skills">
|
|
67
|
+
<field name="template">skills-availability-check</field>
|
|
68
|
+
<field name="skills">speccrew-sd-framework-evaluate, speccrew-sd-frontend, speccrew-sd-backend, speccrew-sd-mobile, speccrew-sd-desktop</field>
|
|
69
|
+
</block>
|
|
70
|
+
</branch>
|
|
71
|
+
<branch default="true" name="Skills Directory Not Found">
|
|
72
|
+
<block type="event" id="P05-E2" action="log" desc="Report missing skills directory">
|
|
73
|
+
<field name="message">IDE Skills Directory Not Found. Ensure IDE configuration is correct or run: npx speccrew init</field>
|
|
74
|
+
</block>
|
|
75
|
+
<block type="event" id="P05-E3" action="abort" desc="Stop workflow"/>
|
|
76
|
+
</branch>
|
|
77
|
+
</block>
|
|
78
|
+
</sequence>
|
|
79
|
+
|
|
80
|
+
<!-- ========== Phase 1: Preparation ========== -->
|
|
81
|
+
<sequence name="Phase 1: Preparation">
|
|
82
|
+
<block type="rule" id="P1-R1" level="forbidden" desc="Phase 1 Mandatory Constraints">
|
|
83
|
+
<field name="text">DO NOT use Glob to explore file system</field>
|
|
84
|
+
<field name="text">DO NOT parse filenames to discover Features</field>
|
|
85
|
+
<field name="text">ONLY read .prd-feature-list.json and WORKFLOW-PROGRESS.json</field>
|
|
86
|
+
</block>
|
|
87
|
+
|
|
88
|
+
<!-- Step 1.1: Load Feature Registry -->
|
|
89
|
+
<block type="task" id="P1-B1" action="read-file" status="pending"
|
|
90
|
+
desc="Load Feature Registry from .prd-feature-list.json">
|
|
91
|
+
<field name="path">${iterations_dir}/${current_iteration}/01.product-requirement/.prd-feature-list.json</field>
|
|
92
|
+
<field name="output" var="feature_registry"/>
|
|
93
|
+
</block>
|
|
94
|
+
|
|
95
|
+
<!-- Step 1.2: Verify File Existence -->
|
|
96
|
+
<block type="gateway" id="P1-G1" mode="exclusive" desc="Verify Feature Spec and API Contract files exist">
|
|
97
|
+
<branch test="${feature_registry.files} all_exist" name="All Files Exist">
|
|
98
|
+
<block type="event" id="P1-E1" action="log" desc="Report files verified"/>
|
|
99
|
+
</branch>
|
|
100
|
+
<branch default="true" name="Some Files Missing">
|
|
101
|
+
<block type="event" id="P1-E2" action="log" desc="Report missing files">
|
|
102
|
+
<field name="template">missing-files-report</field>
|
|
103
|
+
</block>
|
|
104
|
+
<block type="event" id="P1-E3" action="abort" desc="Stop workflow"/>
|
|
105
|
+
</branch>
|
|
106
|
+
</block>
|
|
107
|
+
|
|
108
|
+
<!-- Step 1.4: Present Design Scope -->
|
|
109
|
+
<block type="event" id="P1-E4" action="log" desc="Display Design Scope Summary">
|
|
110
|
+
<field name="template">design-scope-summary</field>
|
|
111
|
+
<field name="data" value="${feature_registry}"/>
|
|
112
|
+
</block>
|
|
113
|
+
|
|
114
|
+
<!-- Step 1.5: Preparation Validation -->
|
|
115
|
+
<block type="checkpoint" id="P1-CP1" name="preparation_validated" desc="Preparation validation gate">
|
|
116
|
+
<field name="conditions">feature_registry_exists, files_verified, scope_presented</field>
|
|
117
|
+
</block>
|
|
118
|
+
</sequence>
|
|
119
|
+
|
|
120
|
+
<!-- ========== Phase 2: Resource Verification ========== -->
|
|
121
|
+
<sequence name="Phase 2: Resource Verification">
|
|
122
|
+
<block type="rule" id="P2-R1" level="forbidden" desc="Phase 2 Mandatory Constraints">
|
|
123
|
+
<field name="text">DO NOT read Feature Spec files — Skills will read them when dispatched</field>
|
|
124
|
+
<field name="text">DO NOT read API Contract files — Skills will read them when dispatched</field>
|
|
125
|
+
<field name="text">DO NOT read techs knowledge files — Skills will read them when dispatched</field>
|
|
126
|
+
<field name="text">ONLY verify that required resource files exist</field>
|
|
127
|
+
</block>
|
|
128
|
+
|
|
129
|
+
<!-- Step 2.1: Verify Techs Knowledge Base -->
|
|
130
|
+
<block type="task" id="P2-B1" action="read-file" status="pending"
|
|
131
|
+
desc="Check techs-manifest.json exists">
|
|
132
|
+
<field name="path">${workspace_path}/knowledges/techs/techs-manifest.json</field>
|
|
133
|
+
<field name="output" var="techs_manifest"/>
|
|
134
|
+
</block>
|
|
135
|
+
|
|
136
|
+
<block type="gateway" id="P2-G1" mode="exclusive" desc="Check techs knowledge base availability">
|
|
137
|
+
<branch test="${techs_manifest} exists" name="Techs Knowledge Exists">
|
|
138
|
+
<block type="event" id="P2-E1" action="log" desc="Extract platform list from manifest"/>
|
|
139
|
+
</branch>
|
|
140
|
+
<branch default="true" name="Techs Knowledge Not Found">
|
|
141
|
+
<block type="event" id="P2-E2" action="log" desc="Report techs knowledge missing">
|
|
142
|
+
<field name="message">TECHS KNOWLEDGE BASE NOT FOUND. Required file missing: knowledges/techs/techs-manifest.json. Please initialize the techs knowledge base first.</field>
|
|
143
|
+
</block>
|
|
144
|
+
<block type="event" id="P2-E3" action="abort" desc="Stop workflow"/>
|
|
145
|
+
</branch>
|
|
146
|
+
</block>
|
|
147
|
+
|
|
148
|
+
<!-- Step 2.2: Prepare Dispatch Parameters -->
|
|
149
|
+
<block type="event" id="P2-E4" action="log" desc="Build dispatch parameter template">
|
|
150
|
+
<field name="template">build-dispatch-params</field>
|
|
151
|
+
<field name="output" var="dispatch_params"/>
|
|
152
|
+
</block>
|
|
153
|
+
</sequence>
|
|
154
|
+
|
|
155
|
+
<!-- ========== Phase 3: Framework Evaluation (HARD STOP) ========== -->
|
|
156
|
+
<sequence name="Phase 3: Framework Evaluation">
|
|
157
|
+
<block type="rule" id="P3-R1" level="mandatory" desc="Skill-Only Rule">
|
|
158
|
+
<field name="text">Framework evaluation MUST use speccrew-sd-framework-evaluate skill</field>
|
|
159
|
+
<field name="text">Agent MUST NOT perform capability gap analysis or framework recommendations itself</field>
|
|
160
|
+
</block>
|
|
161
|
+
|
|
162
|
+
<!-- Step 3.1: Invoke Framework Evaluation Skill -->
|
|
163
|
+
<block type="task" id="P3-B1" action="run-skill" status="pending"
|
|
164
|
+
desc="Invoke framework evaluation skill">
|
|
165
|
+
<field name="skill">speccrew-sd-framework-evaluate</field>
|
|
166
|
+
<field name="params">
|
|
167
|
+
feature_spec_paths: ${feature_registry.feature_spec_paths},
|
|
168
|
+
api_contract_paths: ${feature_registry.api_contract_paths},
|
|
169
|
+
techs_knowledge_paths: ${dispatch_params.techs_knowledge_paths},
|
|
170
|
+
iteration_path: ${iterations_dir}/${current_iteration},
|
|
171
|
+
output_path: ${iterations_dir}/${current_iteration}/03.system-design/framework-evaluation.md
|
|
172
|
+
</field>
|
|
173
|
+
<field name="output" var="framework_result"/>
|
|
174
|
+
</block>
|
|
175
|
+
|
|
176
|
+
<!-- Step 3.2: Validate Skill Output -->
|
|
177
|
+
<block type="gateway" id="P3-G1" mode="exclusive" desc="Check framework evaluation result">
|
|
178
|
+
<branch test="${framework_result.status} == 'SUCCESS'" name="Framework Evaluation Success">
|
|
179
|
+
<block type="event" id="P3-E1" action="log" desc="Framework evaluation completed"/>
|
|
180
|
+
</branch>
|
|
181
|
+
<branch default="true" name="Framework Evaluation Failed">
|
|
182
|
+
<block type="event" id="P3-E2" action="log" desc="Report framework evaluation failure">
|
|
183
|
+
<field name="message">Framework evaluation skill failed: ${framework_result.error}</field>
|
|
184
|
+
</block>
|
|
185
|
+
<block type="event" id="P3-E3" action="abort" desc="Stop workflow"/>
|
|
186
|
+
</branch>
|
|
187
|
+
</block>
|
|
188
|
+
|
|
189
|
+
<!-- Step 3.3: User Confirmation (HARD STOP) -->
|
|
190
|
+
<block type="event" id="P3-E4" action="confirm" desc="Request user confirmation for framework decisions">
|
|
191
|
+
<field name="prompt">🛑 FRAMEWORK EVALUATION — AWAITING CONFIRMATION. Do you approve these framework decisions? (确认/修改/取消)</field>
|
|
192
|
+
<field name="template">framework-evaluation-summary</field>
|
|
193
|
+
<field name="data" value="${framework_result}"/>
|
|
194
|
+
</block>
|
|
195
|
+
|
|
196
|
+
<block type="gateway" id="P3-G2" mode="exclusive" desc="Handle user confirmation response">
|
|
197
|
+
<branch test="${user_response} == '确认' or ${user_response} == 'OK'" name="User Confirmed">
|
|
198
|
+
<block type="event" id="P3-E5" action="log" desc="Proceed to Phase 4"/>
|
|
199
|
+
</branch>
|
|
200
|
+
<branch test="${user_response} == '取消'" name="User Cancelled">
|
|
201
|
+
<block type="event" id="P3-E6" action="abort" desc="Abort workflow"/>
|
|
202
|
+
</branch>
|
|
203
|
+
<branch default="true" name="User Requests Modification">
|
|
204
|
+
<block type="event" id="P3-E7" action="log" desc="Re-evaluate with adjusted scope"/>
|
|
205
|
+
</branch>
|
|
206
|
+
</block>
|
|
207
|
+
|
|
208
|
+
<block type="checkpoint" id="P3-CP1" name="framework_evaluation" desc="Framework evaluation confirmed">
|
|
209
|
+
<field name="passed" value="true"/>
|
|
210
|
+
</block>
|
|
211
|
+
</sequence>
|
|
212
|
+
|
|
213
|
+
<!-- ========== Phase 4: Generate DESIGN-OVERVIEW.md ========== -->
|
|
214
|
+
<sequence name="Phase 4: Generate DESIGN-OVERVIEW.md">
|
|
215
|
+
<block type="rule" id="P4-R1" level="mandatory" desc="Agent-Owned Rule">
|
|
216
|
+
<field name="text">DESIGN-OVERVIEW.md generation is Agent responsibility (not skill-dispatched)</field>
|
|
217
|
+
</block>
|
|
218
|
+
|
|
219
|
+
<block type="task" id="P4-B1" action="write-file" status="pending"
|
|
220
|
+
desc="Generate DESIGN-OVERVIEW.md">
|
|
221
|
+
<field name="path">${iterations_dir}/${current_iteration}/03.system-design/DESIGN-OVERVIEW.md</field>
|
|
222
|
+
<field name="template">design-overview-template</field>
|
|
223
|
+
<field name="data">
|
|
224
|
+
iteration: ${current_iteration},
|
|
225
|
+
platforms: ${techs_manifest.platforms},
|
|
226
|
+
features: ${feature_registry.features},
|
|
227
|
+
framework_decisions: ${framework_result.decisions}
|
|
228
|
+
</field>
|
|
229
|
+
</block>
|
|
230
|
+
|
|
231
|
+
<!-- Step 4.1: Validation -->
|
|
232
|
+
<block type="checkpoint" id="P4-CP1" name="design_overview" desc="DESIGN-OVERVIEW validation">
|
|
233
|
+
<field name="conditions">file_exists, has_design_scope_section, has_tech_decisions_section, has_platform_design_index, index_covers_all_feature_platform_combinations</field>
|
|
234
|
+
</block>
|
|
235
|
+
</sequence>
|
|
236
|
+
|
|
237
|
+
<!-- ========== Phase 5: Dispatch Per-Platform Skills ========== -->
|
|
238
|
+
<sequence name="Phase 5: Dispatch Per-Platform Skills">
|
|
239
|
+
<block type="rule" id="P5-R1" level="mandatory" desc="Worker Enforcement Rules">
|
|
240
|
+
<field name="text">This Agent is an orchestrator ONLY — MUST NOT write design documents directly</field>
|
|
241
|
+
<field name="text">When Features ≥ 2 OR Platforms ≥ 2: MUST dispatch speccrew-task-worker agents via Agent tool</field>
|
|
242
|
+
<field name="text">FORBIDDEN: Direct invocation of speccrew-sd-* skills in multi-feature/multi-platform scenarios</field>
|
|
243
|
+
<field name="text">FORBIDDEN: Creating *-design.md or INDEX.md files as fallback if workers fail</field>
|
|
244
|
+
</block>
|
|
245
|
+
|
|
246
|
+
<!-- Step 5.1: Determine Platform Types -->
|
|
247
|
+
<block type="event" id="P5-E1" action="log" desc="Map platform types to skills">
|
|
248
|
+
<field name="template">platform-skill-mapping</field>
|
|
249
|
+
<field name="output" var="platform_skill_map"/>
|
|
250
|
+
</block>
|
|
251
|
+
|
|
252
|
+
<!-- Step 5.2: Initialize DISPATCH-PROGRESS.json -->
|
|
253
|
+
<block type="task" id="P5-B1" action="run-script" status="pending"
|
|
254
|
+
desc="Initialize dispatch progress with task list">
|
|
255
|
+
<field name="command">node ${update_progress_script} init --file ${iterations_dir}/${current_iteration}/03.system-design/DISPATCH-PROGRESS.json --stage 03_system_design --tasks-file ${iterations_dir}/${current_iteration}/03.system-design/.tasks-temp.json</field>
|
|
256
|
+
</block>
|
|
257
|
+
|
|
258
|
+
<!-- Step 5.3/5.4: Dispatch Decision -->
|
|
259
|
+
<block type="gateway" id="P5-G1" mode="exclusive" desc="Determine dispatch mode">
|
|
260
|
+
<branch test="${feature_count} == 1 AND ${platform_count} == 1" name="Single Feature Single Platform">
|
|
261
|
+
<!-- Direct skill invocation allowed -->
|
|
262
|
+
<block type="task" id="P5-B2" action="run-script" status="pending"
|
|
263
|
+
desc="Update task status to in_progress">
|
|
264
|
+
<field name="command">node ${update_progress_script} update-task --file ${iterations_dir}/${current_iteration}/03.system-design/DISPATCH-PROGRESS.json --task-id ${task_id} --status in_progress</field>
|
|
265
|
+
</block>
|
|
266
|
+
<block type="task" id="P5-B3" action="run-skill" status="pending"
|
|
267
|
+
desc="Invoke platform design skill directly">
|
|
268
|
+
<field name="skill">${platform_skill_map.skill}</field>
|
|
269
|
+
<field name="params">
|
|
270
|
+
task_id: ${task_id},
|
|
271
|
+
feature_id: ${feature_id},
|
|
272
|
+
feature_name: ${feature_name},
|
|
273
|
+
platform_id: ${platform_id},
|
|
274
|
+
feature_spec_path: ${feature_spec_path},
|
|
275
|
+
api_contract_path: ${api_contract_path},
|
|
276
|
+
techs_paths: ${techs_paths},
|
|
277
|
+
framework_decisions: ${framework_result.decisions}
|
|
278
|
+
</field>
|
|
279
|
+
</block>
|
|
280
|
+
</branch>
|
|
281
|
+
<branch default="true" name="Multi Feature/Platform - Worker Dispatch Required">
|
|
282
|
+
<!-- Parallel Worker Dispatch -->
|
|
283
|
+
<block type="rule" id="P5-R2" level="mandatory" desc="Parallel dispatch rule">
|
|
284
|
+
<field name="text">Dispatch ALL platform workers IN PARALLEL — DO NOT execute sequentially</field>
|
|
285
|
+
<field name="text">Each Worker runs independently — dispatch all at once, then monitor completion</field>
|
|
286
|
+
</block>
|
|
287
|
+
<block type="task" id="P5-B4" action="dispatch-to-worker" status="pending"
|
|
288
|
+
desc="Dispatch workers for Feature×Platform matrix">
|
|
289
|
+
<field name="worker">speccrew-task-worker</field>
|
|
290
|
+
<field name="max_concurrent">6</field>
|
|
291
|
+
<field name="tasks">${dispatch_tasks_matrix}</field>
|
|
292
|
+
<field name="note">Each worker receives: skill_path, task_id, feature_id, feature_name, platform_id, feature_spec_path, api_contract_path, techs_knowledge_paths, framework_decisions, output_base_path</field>
|
|
293
|
+
</block>
|
|
294
|
+
</branch>
|
|
295
|
+
</block>
|
|
296
|
+
|
|
297
|
+
<!-- Step 5.5: Update DISPATCH-PROGRESS.json after completion -->
|
|
298
|
+
<block type="task" id="P5-B5" action="run-script" status="pending"
|
|
299
|
+
desc="Update task status based on completion">
|
|
300
|
+
<field name="command">node ${update_progress_script} update-task --file ${iterations_dir}/${current_iteration}/03.system-design/DISPATCH-PROGRESS.json --task-id ${task_id} --status ${completion_status} --output "${output_path}"</field>
|
|
301
|
+
</block>
|
|
302
|
+
|
|
303
|
+
<!-- Step 5.6: Error Handling -->
|
|
304
|
+
<block type="gateway" id="P5-G2" mode="exclusive" desc="Check batch failure rate">
|
|
305
|
+
<branch test="${failure_rate} > 0.5" name="Batch Failure Threshold Exceeded">
|
|
306
|
+
<block type="event" id="P5-E2" action="log" desc="Report batch failure">
|
|
307
|
+
<field name="message">❌ BATCH FAILURE THRESHOLD EXCEEDED. Failure Rate: ${failure_rate}% (exceeds 50% threshold)</field>
|
|
308
|
+
</block>
|
|
309
|
+
<block type="event" id="P5-E3" action="abort" desc="Stop workflow"/>
|
|
310
|
+
</branch>
|
|
311
|
+
<branch default="true" name="Within Failure Threshold">
|
|
312
|
+
<block type="event" id="P5-E4" action="log" desc="Continue with remaining tasks"/>
|
|
313
|
+
</branch>
|
|
314
|
+
</block>
|
|
315
|
+
</sequence>
|
|
316
|
+
|
|
317
|
+
<!-- ========== Phase 6: Joint Confirmation (HARD STOP) ========== -->
|
|
318
|
+
<sequence name="Phase 6: Joint Confirmation">
|
|
319
|
+
<!-- Step 6.1: Present summary by Feature ID -->
|
|
320
|
+
<block type="event" id="P6-E1" action="log" desc="Display design documents summary by Feature">
|
|
321
|
+
<field name="template">design-documents-summary</field>
|
|
322
|
+
<field name="data" value="${dispatch_progress}"/>
|
|
323
|
+
</block>
|
|
324
|
+
|
|
325
|
+
<!-- Step 6.1: User Confirmation (HARD STOP) -->
|
|
326
|
+
<block type="event" id="P6-E2" action="confirm" desc="Request joint confirmation">
|
|
327
|
+
<field name="prompt">🛑 JOINT CONFIRMATION — AWAITING USER REVIEW. Please review all design documents. (确认/修改/取消)</field>
|
|
328
|
+
</block>
|
|
329
|
+
|
|
330
|
+
<block type="gateway" id="P6-G1" mode="exclusive" desc="Handle joint confirmation response">
|
|
331
|
+
<branch test="${user_response} == '确认' or ${user_response} == 'OK'" name="User Confirmed">
|
|
332
|
+
<block type="event" id="P6-E3" action="log" desc="Proceed to finalize"/>
|
|
333
|
+
</branch>
|
|
334
|
+
<branch test="${user_response} == '取消'" name="User Cancelled">
|
|
335
|
+
<block type="event" id="P6-E4" action="abort" desc="Abort workflow"/>
|
|
336
|
+
</branch>
|
|
337
|
+
<branch default="true" name="User Requests Modification">
|
|
338
|
+
<block type="event" id="P6-E5" action="log" desc="Re-dispatch design workers for specified scope"/>
|
|
339
|
+
</branch>
|
|
340
|
+
</block>
|
|
341
|
+
|
|
342
|
+
<!-- Step 6.3: Update Checkpoints on Confirmation -->
|
|
343
|
+
<block type="task" id="P6-B1" action="run-script" status="pending"
|
|
344
|
+
desc="Write framework_evaluation checkpoint">
|
|
345
|
+
<field name="command">node ${update_progress_script} write-checkpoint --file ${iterations_dir}/${current_iteration}/03.system-design/.checkpoints.json --stage 03_system_design --checkpoint framework_evaluation --passed true</field>
|
|
346
|
+
</block>
|
|
347
|
+
|
|
348
|
+
<block type="task" id="P6-B2" action="run-script" status="pending"
|
|
349
|
+
desc="Write design_overview checkpoint">
|
|
350
|
+
<field name="command">node ${update_progress_script} write-checkpoint --file ${iterations_dir}/${current_iteration}/03.system-design/.checkpoints.json --stage 03_system_design --checkpoint design_overview --passed true</field>
|
|
351
|
+
</block>
|
|
352
|
+
|
|
353
|
+
<block type="task" id="P6-B3" action="run-script" status="pending"
|
|
354
|
+
desc="Write joint_confirmation checkpoint">
|
|
355
|
+
<field name="command">node ${update_progress_script} write-checkpoint --file ${iterations_dir}/${current_iteration}/03.system-design/.checkpoints.json --stage 03_system_design --checkpoint joint_confirmation --passed true</field>
|
|
356
|
+
</block>
|
|
357
|
+
|
|
358
|
+
<block type="task" id="P6-B4" action="run-script" status="pending"
|
|
359
|
+
desc="Update WORKFLOW-PROGRESS.json to confirmed">
|
|
360
|
+
<field name="command">node ${update_progress_script} update-workflow --file ${iterations_dir}/${current_iteration}/WORKFLOW-PROGRESS.json --stage 03_system_design --status confirmed --output "DESIGN-OVERVIEW.md, platform-indexes, module-designs"</field>
|
|
361
|
+
</block>
|
|
362
|
+
|
|
363
|
+
<block type="checkpoint" id="P6-CP1" name="joint_confirmation" desc="Joint confirmation completed">
|
|
364
|
+
<field name="passed" value="true"/>
|
|
365
|
+
</block>
|
|
366
|
+
</sequence>
|
|
367
|
+
|
|
368
|
+
<block type="output" id="O1" desc="System Designer execution result">
|
|
369
|
+
<field name="status" from="${execution.status}" type="string" desc="success / partial / failed"/>
|
|
370
|
+
<field name="output_files" from="${execution.output_files}" type="array" desc="Generated design documents"/>
|
|
371
|
+
<field name="summary" from="${execution.summary}" type="string" desc="Execution summary"/>
|
|
372
|
+
<field name="next_steps" from="${execution.next_steps}" type="array" desc="Suggested next actions"/>
|
|
373
|
+
</block>
|
|
374
|
+
|
|
375
|
+
</workflow>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-system-developer-orchestration
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: System Developer 的核心编排技能,负责读取系统设计蓝图、协调跨平台开发任务分发、加载技术知识、验证环境就绪、分发各平台开发技能、执行集成检查、交付开发完成报告。支持 web、mobile、desktop 和 backend 平台。
|
|
5
|
+
tools: Read, Write, Glob, Grep, Bash
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
> **⚠️ MANDATORY EXECUTION PROTOCOL — READ BEFORE EXECUTING ANY BLOCK**
|
|
9
|
+
>
|
|
10
|
+
> **Step 1**: Load XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md` — this defines all block types and action-to-tool mappings
|
|
11
|
+
>
|
|
12
|
+
> **Step 2**: Execute this SKILL.md's XML workflow **block by block in document order**. For EVERY block, you MUST follow this 3-step cycle:
|
|
13
|
+
>
|
|
14
|
+
> ```
|
|
15
|
+
> 📋 Block [ID] (action=[action]) — [desc]
|
|
16
|
+
> 🔧 Tool: [which IDE tool to call]
|
|
17
|
+
> ✅ Result: [output or status]
|
|
18
|
+
> ```
|
|
19
|
+
>
|
|
20
|
+
> Action-to-tool mapping:
|
|
21
|
+
> - `action="run-skill"` → Invoke via **Skill tool** (pass the `<field name="skill">` value EXACTLY)
|
|
22
|
+
> - `action="run-script"` → Execute via **Terminal tool** (pass the `<field name="command">` value EXACTLY)
|
|
23
|
+
> - `action="dispatch-to-worker"` → Create **Task** via **Task tool** for `speccrew-task-worker`
|
|
24
|
+
> - `action="read-file"` → Read via **Read tool**
|
|
25
|
+
> - `action="log"` → Output message directly
|
|
26
|
+
> - `action="confirm"` → Present to user and wait for response
|
|
27
|
+
>
|
|
28
|
+
> **Step 3**: Execute ALL blocks sequentially without pausing (only stop at explicit `<event action="confirm">` blocks)
|
|
29
|
+
|
|
30
|
+
# System Developer Orchestration
|
|
31
|
+
|
|
32
|
+
System Developer 的核心编排技能,负责:
|
|
33
|
+
|
|
34
|
+
1. **Stage Gate** - 验证 System Design 阶段已确认
|
|
35
|
+
2. **Read System Design** - 读取设计文档,识别平台模块
|
|
36
|
+
3. **Load Techs Knowledge** - 加载平台技术栈和 API Contract
|
|
37
|
+
4. **Environment Pre-check** - 验证运行时、依赖、服务
|
|
38
|
+
5. **Dispatch Dev Workers** - 分发开发任务给 Worker
|
|
39
|
+
6. **Integration Check** - 验证跨平台 API 和数据一致性
|
|
40
|
+
7. **Delivery Report** - 交付报告和确认
|
|
41
|
+
|
|
42
|
+
## Invocation Method
|
|
43
|
+
|
|
44
|
+
**CRITICAL**: This skill is loaded directly by System Developer Agent — do NOT invoke via Worker Agent.
|
|
45
|
+
|
|
46
|
+
```xml
|
|
47
|
+
<block type="task" action="run-skill" desc="System Developer orchestration workflow">
|
|
48
|
+
<field name="skill">speccrew-system-developer-orchestration</field>
|
|
49
|
+
</block>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Input Parameters
|
|
53
|
+
|
|
54
|
+
| Parameter | Type | Required | Description |
|
|
55
|
+
|-----------|------|----------|-------------|
|
|
56
|
+
| `workspace_path` | string | Yes | speccrew-workspace root directory path |
|
|
57
|
+
| `iterations_dir` | string | Yes | iterations directory path |
|
|
58
|
+
| `update_progress_script` | string | Yes | Path to update-progress.js script |
|
|
59
|
+
| `current_iteration` | string | No | Current active iteration identifier |
|
|
60
|
+
|
|
61
|
+
## Output
|
|
62
|
+
|
|
63
|
+
- `status` - Execution status (success / partial / failed)
|
|
64
|
+
- `output_files` - List of generated source files and task records
|
|
65
|
+
- `summary` - Execution summary
|
|
66
|
+
- `next_steps` - Suggested next actions
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## AgentFlow Definition
|
|
71
|
+
|
|
72
|
+
<!-- @agentflow: workflow.agentflow.xml -->
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## CONTINUOUS EXECUTION RULES
|
|
77
|
+
|
|
78
|
+
This skill MUST execute tasks continuously without unnecessary interruptions.
|
|
79
|
+
|
|
80
|
+
### FORBIDDEN Interruptions
|
|
81
|
+
|
|
82
|
+
1. DO NOT ask user "Should I continue?" after completing a subtask
|
|
83
|
+
2. DO NOT suggest "Let me split this into batches" or "Let's do this in parts"
|
|
84
|
+
3. DO NOT pause to list what you plan to do next — just do it
|
|
85
|
+
4. DO NOT ask for confirmation before generating output files
|
|
86
|
+
5. DO NOT warn about "large number of files" — proceed with generation
|
|
87
|
+
6. DO NOT offer "Should I proceed with the remaining items?"
|
|
88
|
+
|
|
89
|
+
### When to Pause (ONLY these cases)
|
|
90
|
+
|
|
91
|
+
1. CHECKPOINT gates defined in workflow (user confirmation required by design)
|
|
92
|
+
2. Ambiguous requirements that genuinely need clarification
|
|
93
|
+
3. Unrecoverable errors that prevent further progress
|
|
94
|
+
4. Security-sensitive operations (e.g., deleting existing files)
|
|
95
|
+
|
|
96
|
+
### CRITICAL CONSTRAINT
|
|
97
|
+
|
|
98
|
+
**This skill is a pure orchestrator/dispatcher. It MUST NOT:**
|
|
99
|
+
- Create source code files (*.java, *.vue, *.ts, *.py, *.dart, etc.)
|
|
100
|
+
- Invoke dev skills directly (only via speccrew-task-worker)
|
|
101
|
+
- Write implementation code in any language
|
|
102
|
+
- Create code as fallback if worker fails
|
|
103
|
+
|
|
104
|
+
### HARD STOP Checkpoints
|
|
105
|
+
|
|
106
|
+
This workflow has **mandatory HARD STOP** checkpoints at:
|
|
107
|
+
- **Phase 4.2a**: Task list review confirmation
|
|
108
|
+
- **Phase 6.6.5**: Delivery report confirmation
|
|
109
|
+
|
|
110
|
+
DO NOT proceed past these checkpoints without explicit user confirmation.
|