speccrew 0.7.65 → 0.7.67
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.
|
@@ -8,10 +8,101 @@
|
|
|
8
8
|
<field name="current_iteration" required="false" type="string" desc="Current active iteration identifier"/>
|
|
9
9
|
</block>
|
|
10
10
|
|
|
11
|
+
<!-- ========== Workflow Loading Announcement ========== -->
|
|
12
|
+
<sequence name="工作流加载播报">
|
|
13
|
+
<block type="event" id="LOAD-ANNOUNCE" action="log" desc="Workflow loading announcement">
|
|
14
|
+
<field name="message">🔄 正在加载系统设计工作流...
|
|
15
|
+
|
|
16
|
+
阶段流程图:
|
|
17
|
+
Phase 0: Stage Gate & Resume (阶段门控与恢复)
|
|
18
|
+
├── Step 0.1: 验证上游阶段完成状态
|
|
19
|
+
├── Step 0.2: 检查恢复状态
|
|
20
|
+
├── Step 0.3: 检查调度进度恢复
|
|
21
|
+
└── Step 0.4: 同步恢复(如有需要)
|
|
22
|
+
Phase 0.5: IDE Directory Detection (IDE目录检测)
|
|
23
|
+
└── Step 0.5.1: 检测IDE目录和技能可用性
|
|
24
|
+
Phase 1: Preparation (准备阶段)
|
|
25
|
+
├── Step 1.1: 加载Feature Registry
|
|
26
|
+
├── Step 1.2: 验证文件存在性
|
|
27
|
+
├── Step 1.4: 展示设计范围摘要
|
|
28
|
+
└── Step 1.5: 验证准备完成
|
|
29
|
+
Phase 2: Resource Verification (资源验证)
|
|
30
|
+
├── Step 2.1: 验证技术知识库
|
|
31
|
+
└── Step 2.2: 准备调度参数
|
|
32
|
+
Phase 3: Framework Evaluation (框架评估) ⛔ HARD STOP
|
|
33
|
+
├── Step 3.1: 派发Worker执行框架评估
|
|
34
|
+
├── Step 3.2: 等待Worker完成
|
|
35
|
+
├── Step 3.3: 验证输出
|
|
36
|
+
└── Step 3.5: 用户确认 ⛔
|
|
37
|
+
Phase 4: Design Overview (设计概览) ⛔ HARD STOP
|
|
38
|
+
├── Step 4.1: 派发Worker生成DESIGN-OVERVIEW.md
|
|
39
|
+
├── Step 4.2: 等待Worker完成
|
|
40
|
+
├── Step 4.3: 验证输出
|
|
41
|
+
└── Step 4.5: 用户确认 ⛔
|
|
42
|
+
Phase 5: Platform Dispatch (平台调度)
|
|
43
|
+
├── Step 5.1: 确定平台类型
|
|
44
|
+
├── Step 5.2: 初始化调度进度
|
|
45
|
+
├── Step 5.3-5.4: 批量派发Worker
|
|
46
|
+
├── Step 5.5: 生成平台INDEX.md
|
|
47
|
+
└── Step 5.6: 错误处理
|
|
48
|
+
Phase 6: Joint Confirmation (联合确认) ⛔ HARD STOP
|
|
49
|
+
├── Step 6.1: 展示设计文档摘要
|
|
50
|
+
├── Step 6.2: 用户确认 ⛔
|
|
51
|
+
└── Step 6.3: 更新检查点</field>
|
|
52
|
+
</block>
|
|
53
|
+
|
|
54
|
+
<block type="rule" id="R-EXEC-PROTOCOL" level="mandatory" desc="Mandatory Execution Protocol">
|
|
55
|
+
<field name="text">Execute ALL blocks in document order sequentially without unnecessary pausing</field>
|
|
56
|
+
<field name="text">ONLY stop at explicit confirm blocks (HARD STOP checkpoints) — no other interruptions</field>
|
|
57
|
+
<field name="text">Action-to-tool mapping: run-skill → Skill tool | run-script → Terminal tool | dispatch-to-worker → Agent tool (create speccrew-task-worker) | read-file → Read tool | log → Output directly | confirm → Present and wait</field>
|
|
58
|
+
</block>
|
|
59
|
+
|
|
60
|
+
<block type="rule" id="R-CONTINUOUS" level="forbidden" desc="Continuous Execution Enforcement">
|
|
61
|
+
<field name="text">FORBIDDEN: Asking "Should I continue?" or "Should I proceed?" after completing a subtask</field>
|
|
62
|
+
<field name="text">FORBIDDEN: Suggesting "Let me split this into batches" or "Let's do this in parts"</field>
|
|
63
|
+
<field name="text">FORBIDDEN: Pausing to list what you plan to do next — just do it</field>
|
|
64
|
+
<field name="text">FORBIDDEN: Asking for confirmation before generating output files</field>
|
|
65
|
+
<field name="text">FORBIDDEN: Warning about "large number of files" — proceed with generation</field>
|
|
66
|
+
<field name="text">FORBIDDEN: Offering "Should I proceed with the remaining items?"</field>
|
|
67
|
+
</block>
|
|
68
|
+
|
|
69
|
+
<block type="rule" id="R-PAUSE-CASES" level="mandatory" desc="When to Pause (ONLY these cases)">
|
|
70
|
+
<field name="text">CHECKPOINT gates defined in workflow (user confirmation required by design)</field>
|
|
71
|
+
<field name="text">Ambiguous requirements that genuinely need clarification</field>
|
|
72
|
+
<field name="text">Unrecoverable errors that prevent further progress</field>
|
|
73
|
+
<field name="text">Security-sensitive operations (e.g., deleting existing files)</field>
|
|
74
|
+
</block>
|
|
75
|
+
|
|
76
|
+
<block type="rule" id="R-HARD-STOPS" level="mandatory" desc="Consolidated HARD STOP Checkpoints">
|
|
77
|
+
<field name="text">⛔ Phase 3.5: Framework evaluation confirmation — user MUST approve framework decisions before Phase 4</field>
|
|
78
|
+
<field name="text">⛔ Phase 4.5: Design overview confirmation — user MUST approve DESIGN-OVERVIEW.md before Phase 5 dispatch</field>
|
|
79
|
+
<field name="text">⛔ Phase 6.1: Joint design confirmation — user MUST approve all designs</field>
|
|
80
|
+
<field name="text">DO NOT proceed past these checkpoints without explicit user confirmation</field>
|
|
81
|
+
</block>
|
|
82
|
+
|
|
83
|
+
<block type="rule" id="R-ORCHESTRATOR" level="mandatory" desc="Orchestrator Execution Rules">
|
|
84
|
+
<field name="text">This Agent is an orchestrator ONLY — MUST NOT write design documents directly</field>
|
|
85
|
+
<field name="text">Wait for worker completion before verifying output — do not proceed until worker returns</field>
|
|
86
|
+
<field name="text">If worker dispatch fails, ABORT — do NOT fallback to inline execution</field>
|
|
87
|
+
<field name="text">Pass skill_path explicitly to worker — worker cannot find skills via glob on first run</field>
|
|
88
|
+
<field name="text">DO NOT create scripts for batch analysis — Workers handle this via their own skill</field>
|
|
89
|
+
</block>
|
|
90
|
+
</sequence>
|
|
91
|
+
|
|
11
92
|
<!-- ========== Phase 0: Stage Gate & Resume ========== -->
|
|
12
93
|
<sequence name="Phase 0: Stage Gate & Resume">
|
|
13
|
-
|
|
94
|
+
<block type="event" id="P0-ANNOUNCE" action="log" desc="Phase 0 announcement">
|
|
95
|
+
<field name="message">📍 [Phase 0] Stage Gate & Resume (阶段门控与恢复)
|
|
96
|
+
├── [P0-B1] 验证上游阶段完成状态
|
|
97
|
+
├── [P0-B3] 检查恢复状态
|
|
98
|
+
├── [P0-B4] 检查调度进度恢复
|
|
99
|
+
└── [P0-R1] 同步恢复(如有需要)</field>
|
|
100
|
+
</block>
|
|
101
|
+
|
|
14
102
|
<!-- Step 0.1: Verify Upstream Completion -->
|
|
103
|
+
<block type="event" id="P0-S1-LOG" action="log" desc="Step 0.1: 验证上游阶段完成状态">
|
|
104
|
+
<field name="message">[Block P0-B1] 验证上游阶段完成状态</field>
|
|
105
|
+
</block>
|
|
15
106
|
<block type="task" id="P0-B1" action="run-script" status="pending"
|
|
16
107
|
desc="Read WORKFLOW-PROGRESS.json overview">
|
|
17
108
|
<field name="command">node ${update_progress_script} read --file ${iterations_dir}/${current_iteration}/WORKFLOW-PROGRESS.json --overview</field>
|
|
@@ -34,6 +125,9 @@
|
|
|
34
125
|
</block>
|
|
35
126
|
|
|
36
127
|
<!-- Step 0.2: Check Resume State -->
|
|
128
|
+
<block type="event" id="P0-S2-LOG" action="log" desc="Step 0.2: 检查恢复状态">
|
|
129
|
+
<field name="message">[Block P0-B3] 检查恢复状态</field>
|
|
130
|
+
</block>
|
|
37
131
|
<block type="task" id="P0-B3" action="run-script" status="pending"
|
|
38
132
|
desc="Read checkpoints for resume state">
|
|
39
133
|
<field name="command">node ${update_progress_script} read --file ${iterations_dir}/${current_iteration}/03.system-design/.checkpoints.json --checkpoints</field>
|
|
@@ -41,6 +135,9 @@
|
|
|
41
135
|
</block>
|
|
42
136
|
|
|
43
137
|
<!-- Step 0.3: Check Dispatch Resume -->
|
|
138
|
+
<block type="event" id="P0-S3-LOG" action="log" desc="Step 0.3: 检查调度进度恢复">
|
|
139
|
+
<field name="message">[Block P0-B4] 检查调度进度恢复</field>
|
|
140
|
+
</block>
|
|
44
141
|
<block type="task" id="P0-B4" action="run-script" status="pending"
|
|
45
142
|
desc="Read dispatch progress summary">
|
|
46
143
|
<field name="command">node ${update_progress_script} read --file ${iterations_dir}/${current_iteration}/03.system-design/DISPATCH-PROGRESS.json --summary</field>
|
|
@@ -59,6 +156,14 @@
|
|
|
59
156
|
|
|
60
157
|
<!-- ========== Phase 0.5: IDE Directory Detection ========== -->
|
|
61
158
|
<sequence name="Phase 0.5: IDE Directory Detection">
|
|
159
|
+
<block type="event" id="P05-ANNOUNCE" action="log" desc="Phase 0.5 announcement">
|
|
160
|
+
<field name="message">📍 [Phase 0.5] IDE Directory Detection (IDE目录检测)
|
|
161
|
+
└── [P05-B1] 检测IDE目录和技能可用性</field>
|
|
162
|
+
</block>
|
|
163
|
+
|
|
164
|
+
<block type="event" id="P05-S1-LOG" action="log" desc="Step 0.5.1: 检测IDE目录和技能">
|
|
165
|
+
<field name="message">[Block P05-B1] 检测IDE目录和技能可用性</field>
|
|
166
|
+
</block>
|
|
62
167
|
<block type="task" id="P05-B1" action="read-file" status="pending"
|
|
63
168
|
desc="Detect IDE directory and skills">
|
|
64
169
|
<field name="path">${workspace_path}/.qoder/skills</field>
|
|
@@ -88,6 +193,14 @@
|
|
|
88
193
|
|
|
89
194
|
<!-- ========== Phase 1: Preparation ========== -->
|
|
90
195
|
<sequence name="Phase 1: Preparation">
|
|
196
|
+
<block type="event" id="P1-ANNOUNCE" action="log" desc="Phase 1 announcement">
|
|
197
|
+
<field name="message">📍 [Phase 1] Preparation (准备阶段)
|
|
198
|
+
├── [P1-B1] 加载Feature Registry
|
|
199
|
+
├── [P1-G1] 验证文件存在性
|
|
200
|
+
├── [P1-E4] 展示设计范围摘要
|
|
201
|
+
└── [P1-CP1] 验证准备完成</field>
|
|
202
|
+
</block>
|
|
203
|
+
|
|
91
204
|
<block type="rule" id="P1-R1" level="forbidden" desc="Phase 1 Mandatory Constraints">
|
|
92
205
|
<field name="text">DO NOT use Glob to explore file system</field>
|
|
93
206
|
<field name="text">DO NOT parse filenames to discover Features</field>
|
|
@@ -95,6 +208,9 @@
|
|
|
95
208
|
</block>
|
|
96
209
|
|
|
97
210
|
<!-- Step 1.1: Load Feature Registry -->
|
|
211
|
+
<block type="event" id="P1-S1-LOG" action="log" desc="Step 1.1: 加载Feature Registry">
|
|
212
|
+
<field name="message">[Block P1-B1] 加载Feature Registry</field>
|
|
213
|
+
</block>
|
|
98
214
|
<block type="task" id="P1-B1" action="read-file" status="pending"
|
|
99
215
|
desc="Load Feature Registry from .prd-feature-list.json">
|
|
100
216
|
<field name="path">${iterations_dir}/${current_iteration}/01.product-requirement/.prd-feature-list.json</field>
|
|
@@ -102,6 +218,9 @@
|
|
|
102
218
|
</block>
|
|
103
219
|
|
|
104
220
|
<!-- Step 1.2: Verify File Existence -->
|
|
221
|
+
<block type="event" id="P1-S2-LOG" action="log" desc="Step 1.2: 验证文件存在性">
|
|
222
|
+
<field name="message">[Block P1-G1] 验证文件存在性</field>
|
|
223
|
+
</block>
|
|
105
224
|
<block type="gateway" id="P1-G1" mode="exclusive" desc="Verify Feature Spec and API Contract files exist">
|
|
106
225
|
<branch test="${feature_registry.files} all_exist" name="All Files Exist">
|
|
107
226
|
<block type="event" id="P1-E1" action="log" desc="Report files verified"/>
|
|
@@ -115,12 +234,18 @@
|
|
|
115
234
|
</block>
|
|
116
235
|
|
|
117
236
|
<!-- Step 1.4: Present Design Scope -->
|
|
237
|
+
<block type="event" id="P1-S4-LOG" action="log" desc="Step 1.4: 展示设计范围摘要">
|
|
238
|
+
<field name="message">[Block P1-E4] 展示设计范围摘要</field>
|
|
239
|
+
</block>
|
|
118
240
|
<block type="event" id="P1-E4" action="log" desc="Display Design Scope Summary">
|
|
119
241
|
<field name="template">design-scope-summary</field>
|
|
120
242
|
<field name="data" value="${feature_registry}"/>
|
|
121
243
|
</block>
|
|
122
244
|
|
|
123
245
|
<!-- Step 1.5: Preparation Validation -->
|
|
246
|
+
<block type="event" id="P1-S5-LOG" action="log" desc="Step 1.5: 验证准备完成">
|
|
247
|
+
<field name="message">[Block P1-CP1] 验证准备完成</field>
|
|
248
|
+
</block>
|
|
124
249
|
<block type="checkpoint" id="P1-CP1" name="preparation_validated" desc="Preparation validation gate">
|
|
125
250
|
<field name="conditions">feature_registry_exists, files_verified, scope_presented</field>
|
|
126
251
|
</block>
|
|
@@ -128,6 +253,12 @@
|
|
|
128
253
|
|
|
129
254
|
<!-- ========== Phase 2: Resource Verification ========== -->
|
|
130
255
|
<sequence name="Phase 2: Resource Verification">
|
|
256
|
+
<block type="event" id="P2-ANNOUNCE" action="log" desc="Phase 2 announcement">
|
|
257
|
+
<field name="message">📍 [Phase 2] Resource Verification (资源验证)
|
|
258
|
+
├── [P2-B1] 验证技术知识库
|
|
259
|
+
└── [P2-E4] 准备调度参数</field>
|
|
260
|
+
</block>
|
|
261
|
+
|
|
131
262
|
<block type="rule" id="P2-R1" level="forbidden" desc="Phase 2 Mandatory Constraints">
|
|
132
263
|
<field name="text">DO NOT read Feature Spec files — Skills will read them when dispatched</field>
|
|
133
264
|
<field name="text">DO NOT read API Contract files — Skills will read them when dispatched</field>
|
|
@@ -136,6 +267,9 @@
|
|
|
136
267
|
</block>
|
|
137
268
|
|
|
138
269
|
<!-- Step 2.1: Verify Techs Knowledge Base -->
|
|
270
|
+
<block type="event" id="P2-S1-LOG" action="log" desc="Step 2.1: 验证技术知识库">
|
|
271
|
+
<field name="message">[Block P2-B1] 验证技术知识库</field>
|
|
272
|
+
</block>
|
|
139
273
|
<block type="task" id="P2-B1" action="read-file" status="pending"
|
|
140
274
|
desc="Check techs-manifest.json exists">
|
|
141
275
|
<field name="path">${workspace_path}/knowledges/techs/techs-manifest.json</field>
|
|
@@ -155,6 +289,9 @@
|
|
|
155
289
|
</block>
|
|
156
290
|
|
|
157
291
|
<!-- Step 2.2: Prepare Dispatch Parameters -->
|
|
292
|
+
<block type="event" id="P2-S2-LOG" action="log" desc="Step 2.2: 准备调度参数">
|
|
293
|
+
<field name="message">[Block P2-E4] 准备调度参数</field>
|
|
294
|
+
</block>
|
|
158
295
|
<block type="event" id="P2-E4" action="log" desc="Build dispatch parameter template">
|
|
159
296
|
<field name="template">build-dispatch-params</field>
|
|
160
297
|
<field name="output" var="dispatch_params"/>
|
|
@@ -163,6 +300,14 @@
|
|
|
163
300
|
|
|
164
301
|
<!-- ========== Phase 3: Framework Evaluation (HARD STOP) ========== -->
|
|
165
302
|
<sequence name="Phase 3: Framework Evaluation">
|
|
303
|
+
<block type="event" id="P3-ANNOUNCE" action="log" desc="Phase 3 announcement">
|
|
304
|
+
<field name="message">📍 [Phase 3] Framework Evaluation (框架评估) ⛔ HARD STOP
|
|
305
|
+
├── [P3-B1] 派发Worker执行框架评估
|
|
306
|
+
├── [P3-GW1] 等待Worker完成
|
|
307
|
+
├── [P3-B2] 验证输出
|
|
308
|
+
└── [P3-E4] 用户确认 ⛔</field>
|
|
309
|
+
</block>
|
|
310
|
+
|
|
166
311
|
<block type="rule" id="P3-R0" level="forbidden" desc="Phase 3 Worker Dispatch Enforcement">
|
|
167
312
|
<field name="text">FORBIDDEN: Do NOT inline-call or directly invoke speccrew-sd-framework-evaluate skill</field>
|
|
168
313
|
<field name="text">FORBIDDEN: Do NOT create scripts or read feature files yourself for framework evaluation</field>
|
|
@@ -178,6 +323,9 @@
|
|
|
178
323
|
</block>
|
|
179
324
|
|
|
180
325
|
<!-- Step 3.1: Dispatch Worker Agent for Framework Evaluation -->
|
|
326
|
+
<block type="event" id="P3-S1-LOG" action="log" desc="Step 3.1: 派发Worker执行框架评估">
|
|
327
|
+
<field name="message">[Block P3-B1] 派发Worker执行框架评估</field>
|
|
328
|
+
</block>
|
|
181
329
|
<block type="task" id="P3-B1" action="dispatch-to-worker" status="pending"
|
|
182
330
|
desc="Dispatch single worker agent for framework evaluation. Use /speccrew-task-worker agent, NOT Skill tool">
|
|
183
331
|
<field name="agent">speccrew-task-worker</field>
|
|
@@ -196,12 +344,18 @@
|
|
|
196
344
|
</block>
|
|
197
345
|
|
|
198
346
|
<!-- Step 3.2: Wait for Worker Completion -->
|
|
347
|
+
<block type="event" id="P3-S2-LOG" action="log" desc="Step 3.2: 等待框架评估Worker完成">
|
|
348
|
+
<field name="message">[Block P3-GW1] 等待Worker完成</field>
|
|
349
|
+
</block>
|
|
199
350
|
<block type="gateway" id="P3-GW1" mode="wait" desc="Wait for framework evaluation worker to complete">
|
|
200
351
|
<field name="wait_for">P3-B1</field>
|
|
201
352
|
<field name="timeout">600</field>
|
|
202
353
|
</block>
|
|
203
354
|
|
|
204
355
|
<!-- Step 3.3: Validate Worker Output -->
|
|
356
|
+
<block type="event" id="P3-S3-LOG" action="log" desc="Step 3.3: 验证框架评估输出">
|
|
357
|
+
<field name="message">[Block P3-B2] 验证输出</field>
|
|
358
|
+
</block>
|
|
205
359
|
<block type="task" id="P3-B2" action="read-file" status="pending"
|
|
206
360
|
desc="Verify framework-evaluation.md was generated">
|
|
207
361
|
<field name="path">${iterations_dir}/${current_iteration}/03.system-design/framework-evaluation.md</field>
|
|
@@ -222,6 +376,9 @@
|
|
|
222
376
|
</block>
|
|
223
377
|
|
|
224
378
|
<!-- Step 3.5: User Confirmation (HARD STOP) -->
|
|
379
|
+
<block type="event" id="P3-S5-LOG" action="log" desc="Step 3.5: ⛔ 用户确认框架评估结果">
|
|
380
|
+
<field name="message">[Block P3-E4] 用户确认</field>
|
|
381
|
+
</block>
|
|
225
382
|
<block type="event" id="P3-E4" action="confirm" desc="Request user confirmation for framework decisions">
|
|
226
383
|
<field name="prompt">🛑 FRAMEWORK EVALUATION — AWAITING CONFIRMATION. Do you approve these framework decisions? (确认/修改/取消)</field>
|
|
227
384
|
<field name="template">framework-evaluation-summary</field>
|
|
@@ -247,6 +404,14 @@
|
|
|
247
404
|
|
|
248
405
|
<!-- ========== Phase 4: Generate DESIGN-OVERVIEW.md (WORKER-DISPATCH) ========== -->
|
|
249
406
|
<sequence name="Phase 4: Generate DESIGN-OVERVIEW.md (WORKER-DISPATCH)">
|
|
407
|
+
<block type="event" id="P4-ANNOUNCE" action="log" desc="Phase 4 announcement">
|
|
408
|
+
<field name="message">📍 [Phase 4] Design Overview (设计概览) ⛔ HARD STOP
|
|
409
|
+
├── [P4-B1] 派发Worker生成DESIGN-OVERVIEW.md
|
|
410
|
+
├── [P4-GW1] 等待Worker完成
|
|
411
|
+
├── [P4-B2] 验证输出
|
|
412
|
+
└── [P4-HS1] 用户确认 ⛔</field>
|
|
413
|
+
</block>
|
|
414
|
+
|
|
250
415
|
<block type="rule" id="P4-R0" level="forbidden" desc="Phase 4 Worker Dispatch Enforcement">
|
|
251
416
|
<field name="text">FORBIDDEN: Do NOT inline-generate DESIGN-OVERVIEW.md yourself</field>
|
|
252
417
|
<field name="text">MANDATORY: DESIGN-OVERVIEW.md generation MUST be delegated to worker agent via block P4-B1</field>
|
|
@@ -254,6 +419,9 @@
|
|
|
254
419
|
<field name="text">If worker dispatch fails, ABORT — do NOT fallback to inline generation</field>
|
|
255
420
|
</block>
|
|
256
421
|
|
|
422
|
+
<block type="event" id="P4-S1-LOG" action="log" desc="Step 4.1: 派发Worker生成DESIGN-OVERVIEW.md">
|
|
423
|
+
<field name="message">[Block P4-B1] 派发Worker生成DESIGN-OVERVIEW.md</field>
|
|
424
|
+
</block>
|
|
257
425
|
<block type="task" id="P4-B1" action="dispatch-to-worker" status="pending"
|
|
258
426
|
desc="Dispatch single worker agent for design overview generation. Use Agent tool, NOT Skill tool.">
|
|
259
427
|
<field name="agent">speccrew-task-worker</field>
|
|
@@ -270,11 +438,17 @@
|
|
|
270
438
|
<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
439
|
</block>
|
|
272
440
|
|
|
441
|
+
<block type="event" id="P4-S2-LOG" action="log" desc="Step 4.2: 等待设计概览Worker完成">
|
|
442
|
+
<field name="message">[Block P4-GW1] 等待Worker完成</field>
|
|
443
|
+
</block>
|
|
273
444
|
<block type="gateway" id="P4-GW1" mode="wait" desc="Wait for design overview worker to complete">
|
|
274
445
|
<field name="wait_for">P4-B1</field>
|
|
275
446
|
<field name="timeout">300</field>
|
|
276
447
|
</block>
|
|
277
448
|
|
|
449
|
+
<block type="event" id="P4-S3-LOG" action="log" desc="Step 4.3: 验证DESIGN-OVERVIEW.md输出">
|
|
450
|
+
<field name="message">[Block P4-B2] 验证输出</field>
|
|
451
|
+
</block>
|
|
278
452
|
<block type="task" id="P4-B2" action="read-file" status="pending"
|
|
279
453
|
desc="Verify DESIGN-OVERVIEW.md was generated by worker">
|
|
280
454
|
<field name="path">${iterations_dir}/${current_iteration}/03.system-design/DESIGN-OVERVIEW.md</field>
|
|
@@ -287,6 +461,9 @@
|
|
|
287
461
|
</block>
|
|
288
462
|
|
|
289
463
|
<!-- Phase 4.5: HARD STOP — User must confirm DESIGN-OVERVIEW.md -->
|
|
464
|
+
<block type="event" id="P4-S5-LOG" action="log" desc="Step 4.5: ⛔ 用户确认DESIGN-OVERVIEW.md">
|
|
465
|
+
<field name="message">[Block P4-HS1] 用户确认</field>
|
|
466
|
+
</block>
|
|
290
467
|
<block type="rule" id="P4-HS1" level="mandatory" desc="HARD STOP — DESIGN-OVERVIEW.md confirmation required">
|
|
291
468
|
<field name="text">⚠️ HARD STOP — WAIT FOR USER CONFIRMATION</field>
|
|
292
469
|
<field name="text">Present DESIGN-OVERVIEW.md summary to user (feature count, platform count, matrix entries, key sections)</field>
|
|
@@ -298,6 +475,15 @@
|
|
|
298
475
|
|
|
299
476
|
<!-- ========== Phase 5: Dispatch Per-Platform Skills ========== -->
|
|
300
477
|
<sequence name="Phase 5: Dispatch Per-Platform Skills">
|
|
478
|
+
<block type="event" id="P5-ANNOUNCE" action="log" desc="Phase 5 announcement">
|
|
479
|
+
<field name="message">📍 [Phase 5] Platform Dispatch (平台调度)
|
|
480
|
+
├── [P5-E1] 确定平台类型
|
|
481
|
+
├── [P5-B1] 初始化调度进度
|
|
482
|
+
├── [P5-G1] 批量派发Worker (每批次最多6个并行)
|
|
483
|
+
├── [P5-IDX-R1] 生成平台INDEX.md (Worker派发)
|
|
484
|
+
└── [P5-B5] 错误处理</field>
|
|
485
|
+
</block>
|
|
486
|
+
|
|
301
487
|
<block type="rule" id="P5-R1" level="mandatory" desc="Worker Enforcement Rules">
|
|
302
488
|
<field name="text">This Agent is an orchestrator ONLY — MUST NOT write design documents directly</field>
|
|
303
489
|
<field name="text">When Features ≥ 2 OR Platforms ≥ 2: MUST dispatch speccrew-task-worker agents via Agent tool</field>
|
|
@@ -306,18 +492,27 @@
|
|
|
306
492
|
</block>
|
|
307
493
|
|
|
308
494
|
<!-- Step 5.1: Determine Platform Types -->
|
|
495
|
+
<block type="event" id="P5-S1-LOG" action="log" desc="Step 5.1: 确定平台类型映射">
|
|
496
|
+
<field name="message">[Block P5-E1] 确定平台类型</field>
|
|
497
|
+
</block>
|
|
309
498
|
<block type="event" id="P5-E1" action="log" desc="Map platform types to skills">
|
|
310
499
|
<field name="template">platform-skill-mapping</field>
|
|
311
500
|
<field name="output" var="platform_skill_map"/>
|
|
312
501
|
</block>
|
|
313
502
|
|
|
314
503
|
<!-- Step 5.2: Initialize DISPATCH-PROGRESS.json -->
|
|
504
|
+
<block type="event" id="P5-S2-LOG" action="log" desc="Step 5.2: 初始化调度进度">
|
|
505
|
+
<field name="message">[Block P5-B1] 初始化调度进度</field>
|
|
506
|
+
</block>
|
|
315
507
|
<block type="task" id="P5-B1" action="run-script" status="pending"
|
|
316
508
|
desc="Initialize dispatch progress with task list">
|
|
317
509
|
<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>
|
|
318
510
|
</block>
|
|
319
511
|
|
|
320
512
|
<!-- Step 5.3/5.4: Dispatch Decision -->
|
|
513
|
+
<block type="event" id="P5-S3-LOG" action="log" desc="Step 5.3: 确定调度模式(单平台直接/多平台Worker派发)">
|
|
514
|
+
<field name="message">[Block P5-G1] 确定调度模式(单平台直接/多平台Worker派发)</field>
|
|
515
|
+
</block>
|
|
321
516
|
<block type="gateway" id="P5-G1" mode="exclusive" desc="Determine dispatch mode">
|
|
322
517
|
<branch test="${feature_count} == 1 AND ${platform_count} == 1" name="Single Feature Single Platform">
|
|
323
518
|
<!-- Direct skill invocation allowed -->
|
|
@@ -353,6 +548,9 @@
|
|
|
353
548
|
</block>
|
|
354
549
|
|
|
355
550
|
<!-- Compute batch plan from dispatch_tasks_matrix -->
|
|
551
|
+
<block type="event" id="P5-S4-LOG" action="log" desc="Step 5.4: 计算批量调度计划">
|
|
552
|
+
<field name="message">[Block P5-B4-BATCH] 计算批量调度计划</field>
|
|
553
|
+
</block>
|
|
356
554
|
<block type="task" id="P5-B4-BATCH" action="compute-batches" status="pending"
|
|
357
555
|
desc="Calculate batch plan from Feature×Platform matrix">
|
|
358
556
|
<field name="items" value="${dispatch_tasks_matrix}"/>
|
|
@@ -429,6 +627,9 @@
|
|
|
429
627
|
<!-- Use when orchestrator needs to batch-update multiple task statuses at once -->
|
|
430
628
|
|
|
431
629
|
<!-- Phase 5.5: Generate Platform INDEX.md (WORKER-DISPATCH) -->
|
|
630
|
+
<block type="event" id="P5-S5-LOG" action="log" desc="Step 5.5: 派发Worker生成各平台INDEX.md">
|
|
631
|
+
<field name="message">[Block P5-IDX-R1] 生成平台INDEX.md (Worker派发)</field>
|
|
632
|
+
</block>
|
|
432
633
|
<block type="rule" id="P5-IDX-R1" level="mandatory" desc="INDEX.md Generation via Worker Dispatch">
|
|
433
634
|
<field name="text">
|
|
434
635
|
After ALL Feature×Platform workers complete, dispatch ONE worker per platform to generate INDEX.md.
|
|
@@ -460,6 +661,9 @@
|
|
|
460
661
|
<block type="gateway" id="P5-IDX-GW1" mode="wait" desc="Wait for all INDEX.md workers to complete"/>
|
|
461
662
|
|
|
462
663
|
<!-- Step 5.5: Read final dispatch progress -->
|
|
664
|
+
<block type="event" id="P5-S6-LOG" action="log" desc="Step 5.6: 读取最终调度进度并检查错误">
|
|
665
|
+
<field name="message">[Block P5-B5] 错误处理</field>
|
|
666
|
+
</block>
|
|
463
667
|
<block type="task" id="P5-B5" action="run-script" status="pending"
|
|
464
668
|
desc="Read final dispatch progress summary">
|
|
465
669
|
<field name="command">node "${update_progress_script}" read --file "${iterations_dir}/${current_iteration}/03.system-design/DISPATCH-PROGRESS.json" --summary</field>
|
|
@@ -482,13 +686,26 @@
|
|
|
482
686
|
|
|
483
687
|
<!-- ========== Phase 6: Joint Confirmation (HARD STOP) ========== -->
|
|
484
688
|
<sequence name="Phase 6: Joint Confirmation">
|
|
689
|
+
<block type="event" id="P6-ANNOUNCE" action="log" desc="Phase 6 announcement">
|
|
690
|
+
<field name="message">📍 [Phase 6] Joint Confirmation (联合确认) ⛔ HARD STOP
|
|
691
|
+
├── [P6-E1] 展示设计文档摘要
|
|
692
|
+
├── [P6-E2] 用户确认 ⛔
|
|
693
|
+
└── [P6-B1] 更新检查点</field>
|
|
694
|
+
</block>
|
|
695
|
+
|
|
485
696
|
<!-- Step 6.1: Present summary by Feature ID -->
|
|
697
|
+
<block type="event" id="P6-S1-LOG" action="log" desc="Step 6.1: 展示设计文档摘要">
|
|
698
|
+
<field name="message">[Block P6-E1] 展示设计文档摘要</field>
|
|
699
|
+
</block>
|
|
486
700
|
<block type="event" id="P6-E1" action="log" desc="Display design documents summary by Feature">
|
|
487
701
|
<field name="template">design-documents-summary</field>
|
|
488
702
|
<field name="data" value="${dispatch_progress}"/>
|
|
489
703
|
</block>
|
|
490
704
|
|
|
491
|
-
<!-- Step 6.
|
|
705
|
+
<!-- Step 6.2: User Confirmation (HARD STOP) -->
|
|
706
|
+
<block type="event" id="P6-S2-LOG" action="log" desc="Step 6.2: ⛔ 用户联合确认">
|
|
707
|
+
<field name="message">[Block P6-E2] 用户确认</field>
|
|
708
|
+
</block>
|
|
492
709
|
<block type="event" id="P6-E2" action="confirm" desc="Request joint confirmation">
|
|
493
710
|
<field name="prompt">🛑 JOINT CONFIRMATION — AWAITING USER REVIEW. Please review all design documents. (确认/修改/取消)</field>
|
|
494
711
|
</block>
|
|
@@ -506,6 +723,9 @@
|
|
|
506
723
|
</block>
|
|
507
724
|
|
|
508
725
|
<!-- Step 6.3: Update Checkpoints on Confirmation -->
|
|
726
|
+
<block type="event" id="P6-S3-LOG" action="log" desc="Step 6.3: 更新检查点和工作流状态">
|
|
727
|
+
<field name="message">[Block P6-B1] 更新检查点</field>
|
|
728
|
+
</block>
|
|
509
729
|
<block type="task" id="P6-B1" action="run-script" status="pending"
|
|
510
730
|
desc="Write framework_evaluation checkpoint">
|
|
511
731
|
<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>
|