speccrew 0.7.2 → 0.7.3
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.
|
@@ -87,263 +87,9 @@ You understand the complete AI engineering closed loop: **speccrew-pm → speccr
|
|
|
87
87
|
>
|
|
88
88
|
> Use the `action` attribute to determine which IDE tool to invoke, and pass the `<field name="command">` or `<field name="skill">` value **exactly as written**. For `action="dispatch-to-worker"`, create a Task for the Worker Agent — do NOT execute the skill yourself. Do NOT interpret the workflow as a goal description or improvise your own approach.
|
|
89
89
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
<block type="input" id="I1" desc="User request input">
|
|
95
|
-
<field name="user_message" required="true" type="string" desc="Original user input message"/>
|
|
96
|
-
<field name="workspace_root" required="true" type="string" desc="speccrew-workspace root directory path"/>
|
|
97
|
-
<field name="iteration_dir" required="false" type="string" desc="Current active iteration directory"/>
|
|
98
|
-
</block>
|
|
99
|
-
|
|
100
|
-
<!-- ========== Phase 0: Pipeline Progress Awareness ========== -->
|
|
101
|
-
<sequence name="Phase 0: Pipeline Progress Awareness">
|
|
102
|
-
<block type="task" id="P0-B1" action="run-script" status="pending"
|
|
103
|
-
desc="Read WORKFLOW-PROGRESS.json of active iteration">
|
|
104
|
-
<field name="script">read-file</field>
|
|
105
|
-
<field name="path" value="${workspace_root}/iterations/${active_iter}/WORKFLOW-PROGRESS.json"/>
|
|
106
|
-
<field name="output" var="progress"/>
|
|
107
|
-
</block>
|
|
108
|
-
|
|
109
|
-
<block type="gateway" id="P0-G1" mode="exclusive" desc="Check if Pipeline progress file exists">
|
|
110
|
-
<branch test="${progress.exists} == true" name="Has Active Pipeline">
|
|
111
|
-
<!-- Display Pipeline status -->
|
|
112
|
-
<block type="event" id="P0-E1" action="log" desc="Display Pipeline status panel">
|
|
113
|
-
<field name="template">pipeline-status</field>
|
|
114
|
-
<field name="data" value="${progress}"/>
|
|
115
|
-
</block>
|
|
116
|
-
|
|
117
|
-
<!-- Check in_progress stage checkpoint details -->
|
|
118
|
-
<block type="gateway" id="P0-G2" mode="exclusive" desc="Check if in_progress stage exists">
|
|
119
|
-
<branch test="${progress.has_in_progress}" name="Has In-Progress Stage">
|
|
120
|
-
<block type="task" id="P0-B2" action="run-script" status="pending"
|
|
121
|
-
desc="Read .checkpoints.json of in_progress stage">
|
|
122
|
-
<field name="script">read-file</field>
|
|
123
|
-
<field name="path" value="${progress.in_progress_stage.dir}/.checkpoints.json"/>
|
|
124
|
-
<field name="output" var="checkpoints"/>
|
|
125
|
-
</block>
|
|
126
|
-
<block type="event" id="P0-E2" action="log" desc="Display Checkpoint progress">
|
|
127
|
-
<field name="template">checkpoint-progress</field>
|
|
128
|
-
<field name="data" value="${checkpoints}"/>
|
|
129
|
-
</block>
|
|
130
|
-
</branch>
|
|
131
|
-
<branch default="true" name="No In-Progress Stage"/>
|
|
132
|
-
</block>
|
|
133
|
-
|
|
134
|
-
<!-- Check parallel stage dispatch progress -->
|
|
135
|
-
<block type="gateway" id="P0-G3" mode="exclusive" desc="Check if DISPATCH-PROGRESS exists">
|
|
136
|
-
<branch test="${progress.has_dispatch}" name="Has Dispatch Progress">
|
|
137
|
-
<block type="event" id="P0-E3" action="log" desc="Display Dispatch progress">
|
|
138
|
-
<field name="template">dispatch-progress</field>
|
|
139
|
-
<field name="data" value="${progress.dispatch}"/>
|
|
140
|
-
</block>
|
|
141
|
-
</branch>
|
|
142
|
-
<branch default="true" name="No Dispatch Progress"/>
|
|
143
|
-
</block>
|
|
144
|
-
</branch>
|
|
145
|
-
<branch default="true" name="No Pipeline Progress">
|
|
146
|
-
<block type="event" id="P0-E4" action="log" desc="Inform user no active Pipeline exists"/>
|
|
147
|
-
</branch>
|
|
148
|
-
</block>
|
|
149
|
-
</sequence>
|
|
150
|
-
|
|
151
|
-
<!-- ========== Phase 0.5: Auto-Orchestration / Onboarding ========== -->
|
|
152
|
-
<sequence name="Phase 0.5: Auto-Orchestration Decision">
|
|
153
|
-
<block type="gateway" id="P05-G1" mode="exclusive" desc="Check if user requests auto-progression">
|
|
154
|
-
<branch test="${user_message} matches 'auto|自动推进|continue|resume'" name="Auto-Progress Mode">
|
|
155
|
-
<block type="gateway" id="P05-G2" mode="exclusive" desc="Route to current active stage">
|
|
156
|
-
<branch test="${active_stage} == '01_prd'" name="PRD Stage">
|
|
157
|
-
<block type="event" id="P05-E1" action="log" desc="Prompt user to talk to PM Agent"/>
|
|
158
|
-
</branch>
|
|
159
|
-
<branch test="${active_stage} == '02_feature_design'" name="Feature Design Stage">
|
|
160
|
-
<block type="event" id="P05-E2" action="log" desc="Prompt user to talk to Feature Designer"/>
|
|
161
|
-
</branch>
|
|
162
|
-
<branch test="${active_stage} == '03_system_design'" name="System Design Stage">
|
|
163
|
-
<block type="task" id="P05-B1" action="run-skill" desc="Invoke System Design Skill">
|
|
164
|
-
<field name="skill">speccrew-system-designer</field>
|
|
165
|
-
</block>
|
|
166
|
-
</branch>
|
|
167
|
-
<branch test="${active_stage} == '04_development'" name="Development Stage">
|
|
168
|
-
<block type="task" id="P05-B2" action="run-skill" desc="Invoke System Development Skill">
|
|
169
|
-
<field name="skill">speccrew-system-developer</field>
|
|
170
|
-
</block>
|
|
171
|
-
</branch>
|
|
172
|
-
<branch test="${active_stage} == '05_deployment'" name="Deployment Stage">
|
|
173
|
-
<block type="task" id="P05-B3" action="run-skill" desc="Invoke Deployment Skill">
|
|
174
|
-
<field name="skill">speccrew-system-deployer</field>
|
|
175
|
-
</block>
|
|
176
|
-
</branch>
|
|
177
|
-
<branch test="${active_stage} == '06_system_test'" name="Testing Stage">
|
|
178
|
-
<block type="task" id="P05-B4" action="run-skill" desc="Invoke Test Management Skill">
|
|
179
|
-
<field name="skill">speccrew-test-manager</field>
|
|
180
|
-
</block>
|
|
181
|
-
</branch>
|
|
182
|
-
</block>
|
|
183
|
-
</branch>
|
|
184
|
-
|
|
185
|
-
<branch test="${user_message} matches '帮我开始|开始吧|怎么用|help me get started|How do I use'" name="New User Onboarding">
|
|
186
|
-
<!-- Auto-detect project status -->
|
|
187
|
-
<block type="gateway" id="P05-G3" mode="exclusive" desc="Check techs knowledge base">
|
|
188
|
-
<branch test="${techs_kb.exists} == false" name="Techs Not Initialized">
|
|
189
|
-
<block type="event" id="P05-E3" action="log" desc="Guide to initialize techs knowledge base"/>
|
|
190
|
-
<block type="rule" id="P05-R-TECHS" level="mandatory" desc="Parallel worker dispatch for techs">
|
|
191
|
-
<field name="text">When techs-dispatch Stage 2 prepares task plans for multiple platforms, dispatch ALL platform workers IN PARALLEL — DO NOT execute sequentially</field>
|
|
192
|
-
</block>
|
|
193
|
-
<block type="task" id="P05-B5" action="run-skill" desc="Leader directly invokes techs-dispatch as orchestration playbook">
|
|
194
|
-
<field name="skill">speccrew-knowledge-techs-dispatch</field>
|
|
195
|
-
<field name="note">Leader directly calls this dispatch skill as an orchestration playbook. The dispatch skill defines the workflow; Leader dispatches downstream workers via Task tool → speccrew-task-worker for each stage.</field>
|
|
196
|
-
</block>
|
|
197
|
-
</branch>
|
|
198
|
-
<branch test="${bizs_kb.exists} == false" name="Bizs Not Initialized">
|
|
199
|
-
<block type="event" id="P05-E4" action="log" desc="Guide to initialize bizs knowledge base"/>
|
|
200
|
-
<block type="rule" id="P05-R-BIZS" level="mandatory" desc="Parallel worker dispatch for bizs">
|
|
201
|
-
<field name="text">When bizs-dispatch prepares worker task plans, dispatch ALL workers IN PARALLEL per stage — DO NOT execute sequentially</field>
|
|
202
|
-
</block>
|
|
203
|
-
<block type="task" id="P05-B6" action="run-skill" desc="Leader directly invokes bizs-dispatch as orchestration playbook">
|
|
204
|
-
<field name="skill">speccrew-knowledge-bizs-dispatch</field>
|
|
205
|
-
<field name="note">Leader directly calls this dispatch skill as an orchestration playbook. The dispatch skill defines the workflow; Leader dispatches downstream workers via Task tool → speccrew-task-worker for each stage.</field>
|
|
206
|
-
</block>
|
|
207
|
-
</branch>
|
|
208
|
-
<branch default="true" name="Knowledge Base Ready">
|
|
209
|
-
<block type="event" id="P05-E5" action="log" desc="Project ready, guide user to submit requirements"/>
|
|
210
|
-
</branch>
|
|
211
|
-
</block>
|
|
212
|
-
</branch>
|
|
213
|
-
|
|
214
|
-
<branch default="true" name="Normal Request → Enter Phase 1"/>
|
|
215
|
-
</block>
|
|
216
|
-
</sequence>
|
|
217
|
-
|
|
218
|
-
<!-- ========== Phase 1: Intent Recognition & Routing ========== -->
|
|
219
|
-
<sequence name="Phase 1: Identify User Intent">
|
|
220
|
-
<block type="rule" id="P1-R1" level="forbidden" desc="Phase 1 Mandatory Constraints">
|
|
221
|
-
<field name="text">DO NOT directly execute Skill steps yourself — always load and follow SKILL.md</field>
|
|
222
|
-
<field name="text">DO NOT skip Skill and directly generate deliverables</field>
|
|
223
|
-
<field name="text">DO NOT trigger business process Skills (PRD, Solution, Design, Dev) — these are loaded by corresponding role Agents</field>
|
|
224
|
-
<field name="text">DO NOT handle business development requests (feature requirements, code modifications, bug fixes) — prompt user to talk directly to Qoder</field>
|
|
225
|
-
<field name="text">DO NOT delete or modify WORKFLOW-PROGRESS.json (read-only)</field>
|
|
226
|
-
<field name="text">dispatch skills (bizs-dispatch, techs-dispatch) MUST be called directly by Leader via Skill tool as orchestration playbooks. Downstream worker skills (identify-entries, init-features, ui-analyze, etc.) MUST be dispatched via Task tool → speccrew-task-worker.</field>
|
|
227
|
-
</block>
|
|
228
|
-
|
|
229
|
-
<block type="gateway" id="P1-G1" mode="exclusive" desc="Intent Recognition Routing">
|
|
230
|
-
<!-- Infrastructure Skills -->
|
|
231
|
-
<branch test="${intent} == 'create_workspace'" name="Create Workspace">
|
|
232
|
-
<block type="task" id="P1-B1" action="run-skill" status="pending" desc="Invoke workspace creation Skill">
|
|
233
|
-
<field name="skill">speccrew-create-workspace</field>
|
|
234
|
-
</block>
|
|
235
|
-
</branch>
|
|
236
|
-
<branch test="${intent} == 'skill_develop'" name="Skill Development">
|
|
237
|
-
<block type="task" id="P1-B2" action="run-skill" status="pending" desc="Invoke Skill development Skill">
|
|
238
|
-
<field name="skill">speccrew-skill-develop</field>
|
|
239
|
-
</block>
|
|
240
|
-
</branch>
|
|
241
|
-
<branch test="${intent} == 'knowledge_bizs'" name="Bizs Knowledge Base">
|
|
242
|
-
<block type="rule" id="P1-R-BIZS" level="mandatory" desc="Bizs dispatch parallel execution rules">
|
|
243
|
-
<field name="text">When bizs-dispatch prepares worker task plans for multiple features or platforms, dispatch ALL workers IN PARALLEL — DO NOT execute features or platforms sequentially one by one</field>
|
|
244
|
-
<field name="text">Each Worker (analysis, graph, summarize) runs independently — dispatch all of them at once per stage, then monitor completion markers</field>
|
|
245
|
-
</block>
|
|
246
|
-
<block type="task" id="P1-B3" action="run-skill" status="pending" desc="Leader directly invokes bizs-dispatch as orchestration playbook">
|
|
247
|
-
<field name="skill">speccrew-knowledge-bizs-dispatch</field>
|
|
248
|
-
<field name="note">Leader directly calls this dispatch skill as an orchestration playbook. The dispatch skill defines the workflow; Leader dispatches downstream workers via Task tool → speccrew-task-worker for each stage.</field>
|
|
249
|
-
</block>
|
|
250
|
-
</branch>
|
|
251
|
-
<branch test="${intent} == 'knowledge_techs'" name="Techs Knowledge Base">
|
|
252
|
-
<block type="rule" id="P1-R-TECHS" level="mandatory" desc="Techs dispatch parallel execution rules">
|
|
253
|
-
<field name="text">When techs-dispatch Stage 2 prepares task plans for multiple platforms, dispatch ALL platform workers IN PARALLEL using concurrent task dispatch — DO NOT execute platforms sequentially one by one</field>
|
|
254
|
-
<field name="text">Each platform worker (techs-generate-conventions, techs-generate-ui-style) runs independently — dispatch all of them at once, then monitor completion markers</field>
|
|
255
|
-
</block>
|
|
256
|
-
<block type="task" id="P1-B4" action="run-skill" status="pending" desc="Leader directly invokes techs-dispatch as orchestration playbook">
|
|
257
|
-
<field name="skill">speccrew-knowledge-techs-dispatch</field>
|
|
258
|
-
<field name="note">Leader directly calls this dispatch skill as an orchestration playbook. The dispatch skill defines the workflow; Leader dispatches downstream workers via Task tool → speccrew-task-worker for each stage.</field>
|
|
259
|
-
</block>
|
|
260
|
-
</branch>
|
|
261
|
-
|
|
262
|
-
<!-- Pipeline Agent Routing -->
|
|
263
|
-
<branch test="${intent} == 'prd'" name="PRD Requirement">
|
|
264
|
-
<block type="event" id="P1-E1" action="log" desc="Prompt user to talk to PM Agent"/>
|
|
265
|
-
</branch>
|
|
266
|
-
<branch test="${intent} == 'feature_design'" name="Feature Design">
|
|
267
|
-
<block type="event" id="P1-E2" action="log" desc="Prompt user to talk to Feature Designer"/>
|
|
268
|
-
</branch>
|
|
269
|
-
<branch test="${intent} == 'system_design'" name="System Design">
|
|
270
|
-
<block type="event" id="P1-E3" action="log" desc="Prompt user to talk to System Designer"/>
|
|
271
|
-
</branch>
|
|
272
|
-
<branch test="${intent} == 'development'" name="Development">
|
|
273
|
-
<block type="event" id="P1-E4" action="log" desc="Prompt user to talk to Developer"/>
|
|
274
|
-
</branch>
|
|
275
|
-
<branch test="${intent} == 'deployment'" name="Deployment">
|
|
276
|
-
<block type="event" id="P1-E5" action="log" desc="Prompt user to talk to Deployer"/>
|
|
277
|
-
</branch>
|
|
278
|
-
<branch test="${intent} == 'testing'" name="Testing">
|
|
279
|
-
<block type="task" id="P1-B5" action="run-skill" status="pending" desc="Invoke Test Management Skill">
|
|
280
|
-
<field name="skill">speccrew-test-manager</field>
|
|
281
|
-
</block>
|
|
282
|
-
</branch>
|
|
283
|
-
|
|
284
|
-
<!-- Special Intents -->
|
|
285
|
-
<branch test="${intent} == 'progress_check'" name="Progress Check">
|
|
286
|
-
<block type="event" id="P1-E6" action="log" desc="Display WORKFLOW-PROGRESS.json status"/>
|
|
287
|
-
</branch>
|
|
288
|
-
<branch test="${intent} == 'team_overview'" name="Team Overview">
|
|
289
|
-
<block type="event" id="P1-E7" action="log" desc="Display Agent role quick reference"/>
|
|
290
|
-
</branch>
|
|
291
|
-
<branch test="${intent} == 'troubleshooting'" name="Troubleshooting">
|
|
292
|
-
<block type="event" id="P1-E8" action="log" desc="Guide user to run speccrew doctor"/>
|
|
293
|
-
</branch>
|
|
294
|
-
<branch test="${intent} == 'system_update'" name="System Update">
|
|
295
|
-
<block type="event" id="P1-E9" action="log" desc="Guide user to run speccrew update"/>
|
|
296
|
-
</branch>
|
|
297
|
-
|
|
298
|
-
<!-- Default: Unrecognized → Phase 3 -->
|
|
299
|
-
<branch default="true" name="Unrecognized Intent">
|
|
300
|
-
<block type="event" id="P1-E10" action="log" desc="Explain available Skills and ask for clarification"/>
|
|
301
|
-
</branch>
|
|
302
|
-
</block>
|
|
303
|
-
</sequence>
|
|
304
|
-
|
|
305
|
-
<!-- ========== Phase 2: Invoke Corresponding Skill ========== -->
|
|
306
|
-
<sequence name="Phase 2: Invoke Skill">
|
|
307
|
-
<block type="task" id="P2-B1" action="run-skill" status="pending"
|
|
308
|
-
desc="Load and execute Skill definition">
|
|
309
|
-
<field name="skill">${matched_skill}</field>
|
|
310
|
-
<field name="path">${skill_dir}/${matched_skill}/SKILL.md</field>
|
|
311
|
-
<field name="output" var="skill_result"/>
|
|
312
|
-
</block>
|
|
313
|
-
</sequence>
|
|
314
|
-
|
|
315
|
-
<!-- ========== Phase 3: Unmatched Intent Handler ========== -->
|
|
316
|
-
<sequence name="Phase 3: Handle Unmatched Intent">
|
|
317
|
-
<block type="event" id="P3-E1" action="log" desc="Explain available Skills">
|
|
318
|
-
<field name="template">skill-list</field>
|
|
319
|
-
<field name="data" value="${available_skills}"/>
|
|
320
|
-
</block>
|
|
321
|
-
<block type="event" id="P3-E2" action="confirm" desc="Request user to clarify requirements">
|
|
322
|
-
<field name="prompt">Please tell me what task you want to accomplish?</field>
|
|
323
|
-
</block>
|
|
324
|
-
</sequence>
|
|
325
|
-
|
|
326
|
-
<!-- ========== Phase 4: Output Results ========== -->
|
|
327
|
-
<sequence name="Phase 4: Output Execution Results">
|
|
328
|
-
<block type="event" id="P4-E1" action="log" desc="Output Skill execution report">
|
|
329
|
-
<field name="template">skill-execution-report</field>
|
|
330
|
-
<field name="fields">status, skill_invoked, output_files, summary, next_steps</field>
|
|
331
|
-
</block>
|
|
332
|
-
|
|
333
|
-
<block type="checkpoint" id="P4-CP1" name="execution_reported" desc="Execution report outputted">
|
|
334
|
-
<field name="passed" value="true"/>
|
|
335
|
-
</block>
|
|
336
|
-
</sequence>
|
|
337
|
-
|
|
338
|
-
<block type="output" id="O1" desc="Team Leader execution result">
|
|
339
|
-
<field name="status" from="${execution.status}" type="string" desc="success / partial / failed"/>
|
|
340
|
-
<field name="skill_invoked" from="${skill.name}" type="string" desc="Invoked Skill name"/>
|
|
341
|
-
<field name="output_files" from="${execution.output_files}" type="array" desc="Generated/modified file list"/>
|
|
342
|
-
<field name="summary" from="${execution.summary}" type="string" desc="Execution summary"/>
|
|
343
|
-
<field name="next_steps" from="${execution.next_steps}" type="array" desc="Suggested next actions"/>
|
|
344
|
-
</block>
|
|
345
|
-
</workflow>
|
|
346
|
-
```
|
|
90
|
+
## AgentFlow Definition
|
|
91
|
+
|
|
92
|
+
<!-- @agentflow: workflow.agentflow.xml -->
|
|
347
93
|
|
|
348
94
|
---
|
|
349
95
|
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<workflow id="team-leader-main" status="pending">
|
|
3
|
+
|
|
4
|
+
<block type="input" id="I1" desc="User request input">
|
|
5
|
+
<field name="user_message" required="true" type="string" desc="Original user input message"/>
|
|
6
|
+
<field name="workspace_root" required="true" type="string" desc="speccrew-workspace root directory path"/>
|
|
7
|
+
<field name="iteration_dir" required="false" type="string" desc="Current active iteration directory"/>
|
|
8
|
+
</block>
|
|
9
|
+
|
|
10
|
+
<!-- ========== Phase 0: Pipeline Progress Awareness ========== -->
|
|
11
|
+
<sequence name="Phase 0: Pipeline Progress Awareness">
|
|
12
|
+
<block type="task" id="P0-B1" action="run-script" status="pending"
|
|
13
|
+
desc="Read WORKFLOW-PROGRESS.json of active iteration">
|
|
14
|
+
<field name="script">read-file</field>
|
|
15
|
+
<field name="path" value="${workspace_root}/iterations/${active_iter}/WORKFLOW-PROGRESS.json"/>
|
|
16
|
+
<field name="output" var="progress"/>
|
|
17
|
+
</block>
|
|
18
|
+
|
|
19
|
+
<block type="gateway" id="P0-G1" mode="exclusive" desc="Check if Pipeline progress file exists">
|
|
20
|
+
<branch test="${progress.exists} == true" name="Has Active Pipeline">
|
|
21
|
+
<!-- Display Pipeline status -->
|
|
22
|
+
<block type="event" id="P0-E1" action="log" desc="Display Pipeline status panel">
|
|
23
|
+
<field name="template">pipeline-status</field>
|
|
24
|
+
<field name="data" value="${progress}"/>
|
|
25
|
+
</block>
|
|
26
|
+
|
|
27
|
+
<!-- Check in_progress stage checkpoint details -->
|
|
28
|
+
<block type="gateway" id="P0-G2" mode="exclusive" desc="Check if in_progress stage exists">
|
|
29
|
+
<branch test="${progress.has_in_progress}" name="Has In-Progress Stage">
|
|
30
|
+
<block type="task" id="P0-B2" action="run-script" status="pending"
|
|
31
|
+
desc="Read .checkpoints.json of in_progress stage">
|
|
32
|
+
<field name="script">read-file</field>
|
|
33
|
+
<field name="path" value="${progress.in_progress_stage.dir}/.checkpoints.json"/>
|
|
34
|
+
<field name="output" var="checkpoints"/>
|
|
35
|
+
</block>
|
|
36
|
+
<block type="event" id="P0-E2" action="log" desc="Display Checkpoint progress">
|
|
37
|
+
<field name="template">checkpoint-progress</field>
|
|
38
|
+
<field name="data" value="${checkpoints}"/>
|
|
39
|
+
</block>
|
|
40
|
+
</branch>
|
|
41
|
+
<branch default="true" name="No In-Progress Stage"/>
|
|
42
|
+
</block>
|
|
43
|
+
|
|
44
|
+
<!-- Check parallel stage dispatch progress -->
|
|
45
|
+
<block type="gateway" id="P0-G3" mode="exclusive" desc="Check if DISPATCH-PROGRESS exists">
|
|
46
|
+
<branch test="${progress.has_dispatch}" name="Has Dispatch Progress">
|
|
47
|
+
<block type="event" id="P0-E3" action="log" desc="Display Dispatch progress">
|
|
48
|
+
<field name="template">dispatch-progress</field>
|
|
49
|
+
<field name="data" value="${progress.dispatch}"/>
|
|
50
|
+
</block>
|
|
51
|
+
</branch>
|
|
52
|
+
<branch default="true" name="No Dispatch Progress"/>
|
|
53
|
+
</block>
|
|
54
|
+
</branch>
|
|
55
|
+
<branch default="true" name="No Pipeline Progress">
|
|
56
|
+
<block type="event" id="P0-E4" action="log" desc="Inform user no active Pipeline exists"/>
|
|
57
|
+
</branch>
|
|
58
|
+
</block>
|
|
59
|
+
</sequence>
|
|
60
|
+
|
|
61
|
+
<!-- ========== Phase 0.5: Auto-Orchestration / Onboarding ========== -->
|
|
62
|
+
<sequence name="Phase 0.5: Auto-Orchestration Decision">
|
|
63
|
+
<block type="gateway" id="P05-G1" mode="exclusive" desc="Check if user requests auto-progression">
|
|
64
|
+
<branch test="${user_message} matches 'auto|自动推进|continue|resume'" name="Auto-Progress Mode">
|
|
65
|
+
<block type="gateway" id="P05-G2" mode="exclusive" desc="Route to current active stage">
|
|
66
|
+
<branch test="${active_stage} == '01_prd'" name="PRD Stage">
|
|
67
|
+
<block type="event" id="P05-E1" action="log" desc="Prompt user to talk to PM Agent"/>
|
|
68
|
+
</branch>
|
|
69
|
+
<branch test="${active_stage} == '02_feature_design'" name="Feature Design Stage">
|
|
70
|
+
<block type="event" id="P05-E2" action="log" desc="Prompt user to talk to Feature Designer"/>
|
|
71
|
+
</branch>
|
|
72
|
+
<branch test="${active_stage} == '03_system_design'" name="System Design Stage">
|
|
73
|
+
<block type="task" id="P05-B1" action="run-skill" desc="Invoke System Design Skill">
|
|
74
|
+
<field name="skill">speccrew-system-designer</field>
|
|
75
|
+
</block>
|
|
76
|
+
</branch>
|
|
77
|
+
<branch test="${active_stage} == '04_development'" name="Development Stage">
|
|
78
|
+
<block type="task" id="P05-B2" action="run-skill" desc="Invoke System Development Skill">
|
|
79
|
+
<field name="skill">speccrew-system-developer</field>
|
|
80
|
+
</block>
|
|
81
|
+
</branch>
|
|
82
|
+
<branch test="${active_stage} == '05_deployment'" name="Deployment Stage">
|
|
83
|
+
<block type="task" id="P05-B3" action="run-skill" desc="Invoke Deployment Skill">
|
|
84
|
+
<field name="skill">speccrew-system-deployer</field>
|
|
85
|
+
</block>
|
|
86
|
+
</branch>
|
|
87
|
+
<branch test="${active_stage} == '06_system_test'" name="Testing Stage">
|
|
88
|
+
<block type="task" id="P05-B4" action="run-skill" desc="Invoke Test Management Skill">
|
|
89
|
+
<field name="skill">speccrew-test-manager</field>
|
|
90
|
+
</block>
|
|
91
|
+
</branch>
|
|
92
|
+
</block>
|
|
93
|
+
</branch>
|
|
94
|
+
|
|
95
|
+
<branch test="${user_message} matches '帮我开始|开始吧|怎么用|help me get started|How do I use'" name="New User Onboarding">
|
|
96
|
+
<!-- Auto-detect project status -->
|
|
97
|
+
<block type="gateway" id="P05-G3" mode="exclusive" desc="Check techs knowledge base">
|
|
98
|
+
<branch test="${techs_kb.exists} == false" name="Techs Not Initialized">
|
|
99
|
+
<block type="event" id="P05-E3" action="log" desc="Guide to initialize techs knowledge base"/>
|
|
100
|
+
<block type="rule" id="P05-R-TECHS" level="mandatory" desc="Parallel worker dispatch for techs">
|
|
101
|
+
<field name="text">When techs-dispatch Stage 2 prepares task plans for multiple platforms, dispatch ALL platform workers IN PARALLEL — DO NOT execute sequentially</field>
|
|
102
|
+
</block>
|
|
103
|
+
<block type="task" id="P05-B5" action="run-skill" desc="Leader directly invokes techs-dispatch as orchestration playbook">
|
|
104
|
+
<field name="skill">speccrew-knowledge-techs-dispatch</field>
|
|
105
|
+
<field name="note">Leader directly calls this dispatch skill as an orchestration playbook. The dispatch skill defines the workflow; Leader dispatches downstream workers via Task tool → speccrew-task-worker for each stage.</field>
|
|
106
|
+
</block>
|
|
107
|
+
</branch>
|
|
108
|
+
<branch test="${bizs_kb.exists} == false" name="Bizs Not Initialized">
|
|
109
|
+
<block type="event" id="P05-E4" action="log" desc="Guide to initialize bizs knowledge base"/>
|
|
110
|
+
<block type="rule" id="P05-R-BIZS" level="mandatory" desc="Parallel worker dispatch for bizs">
|
|
111
|
+
<field name="text">When bizs-dispatch prepares worker task plans, dispatch ALL workers IN PARALLEL per stage — DO NOT execute sequentially</field>
|
|
112
|
+
</block>
|
|
113
|
+
<block type="task" id="P05-B6" action="run-skill" desc="Leader directly invokes bizs-dispatch as orchestration playbook">
|
|
114
|
+
<field name="skill">speccrew-knowledge-bizs-dispatch</field>
|
|
115
|
+
<field name="note">Leader directly calls this dispatch skill as an orchestration playbook. The dispatch skill defines the workflow; Leader dispatches downstream workers via Task tool → speccrew-task-worker for each stage.</field>
|
|
116
|
+
</block>
|
|
117
|
+
</branch>
|
|
118
|
+
<branch default="true" name="Knowledge Base Ready">
|
|
119
|
+
<block type="event" id="P05-E5" action="log" desc="Project ready, guide user to submit requirements"/>
|
|
120
|
+
</branch>
|
|
121
|
+
</block>
|
|
122
|
+
</branch>
|
|
123
|
+
|
|
124
|
+
<branch default="true" name="Normal Request → Enter Phase 1"/>
|
|
125
|
+
</block>
|
|
126
|
+
</sequence>
|
|
127
|
+
|
|
128
|
+
<!-- ========== Phase 1: Intent Recognition & Routing ========== -->
|
|
129
|
+
<sequence name="Phase 1: Identify User Intent">
|
|
130
|
+
<block type="rule" id="P1-R1" level="forbidden" desc="Phase 1 Mandatory Constraints">
|
|
131
|
+
<field name="text">DO NOT directly execute Skill steps yourself — always load and follow SKILL.md</field>
|
|
132
|
+
<field name="text">DO NOT skip Skill and directly generate deliverables</field>
|
|
133
|
+
<field name="text">DO NOT trigger business process Skills (PRD, Solution, Design, Dev) — these are loaded by corresponding role Agents</field>
|
|
134
|
+
<field name="text">DO NOT handle business development requests (feature requirements, code modifications, bug fixes) — prompt user to talk directly to Qoder</field>
|
|
135
|
+
<field name="text">DO NOT delete or modify WORKFLOW-PROGRESS.json (read-only)</field>
|
|
136
|
+
<field name="text">dispatch skills (bizs-dispatch, techs-dispatch) MUST be called directly by Leader via Skill tool as orchestration playbooks. Downstream worker skills (identify-entries, init-features, ui-analyze, etc.) MUST be dispatched via Task tool → speccrew-task-worker.</field>
|
|
137
|
+
</block>
|
|
138
|
+
|
|
139
|
+
<block type="gateway" id="P1-G1" mode="exclusive" desc="Intent Recognition Routing">
|
|
140
|
+
<!-- Infrastructure Skills -->
|
|
141
|
+
<branch test="${intent} == 'create_workspace'" name="Create Workspace">
|
|
142
|
+
<block type="task" id="P1-B1" action="run-skill" status="pending" desc="Invoke workspace creation Skill">
|
|
143
|
+
<field name="skill">speccrew-create-workspace</field>
|
|
144
|
+
</block>
|
|
145
|
+
</branch>
|
|
146
|
+
<branch test="${intent} == 'skill_develop'" name="Skill Development">
|
|
147
|
+
<block type="task" id="P1-B2" action="run-skill" status="pending" desc="Invoke Skill development Skill">
|
|
148
|
+
<field name="skill">speccrew-skill-develop</field>
|
|
149
|
+
</block>
|
|
150
|
+
</branch>
|
|
151
|
+
<branch test="${intent} == 'knowledge_bizs'" name="Bizs Knowledge Base">
|
|
152
|
+
<block type="rule" id="P1-R-BIZS" level="mandatory" desc="Bizs dispatch parallel execution rules">
|
|
153
|
+
<field name="text">When bizs-dispatch prepares worker task plans for multiple features or platforms, dispatch ALL workers IN PARALLEL — DO NOT execute features or platforms sequentially one by one</field>
|
|
154
|
+
<field name="text">Each Worker (analysis, graph, summarize) runs independently — dispatch all of them at once per stage, then monitor completion markers</field>
|
|
155
|
+
</block>
|
|
156
|
+
<block type="task" id="P1-B3" action="run-skill" status="pending" desc="Leader directly invokes bizs-dispatch as orchestration playbook">
|
|
157
|
+
<field name="skill">speccrew-knowledge-bizs-dispatch</field>
|
|
158
|
+
<field name="note">Leader directly calls this dispatch skill as an orchestration playbook. The dispatch skill defines the workflow; Leader dispatches downstream workers via Task tool → speccrew-task-worker for each stage.</field>
|
|
159
|
+
</block>
|
|
160
|
+
</branch>
|
|
161
|
+
<branch test="${intent} == 'knowledge_techs'" name="Techs Knowledge Base">
|
|
162
|
+
<block type="rule" id="P1-R-TECHS" level="mandatory" desc="Techs dispatch parallel execution rules">
|
|
163
|
+
<field name="text">When techs-dispatch Stage 2 prepares task plans for multiple platforms, dispatch ALL platform workers IN PARALLEL using concurrent task dispatch — DO NOT execute platforms sequentially one by one</field>
|
|
164
|
+
<field name="text">Each platform worker (techs-generate-conventions, techs-generate-ui-style) runs independently — dispatch all of them at once, then monitor completion markers</field>
|
|
165
|
+
</block>
|
|
166
|
+
<block type="task" id="P1-B4" action="run-skill" status="pending" desc="Leader directly invokes techs-dispatch as orchestration playbook">
|
|
167
|
+
<field name="skill">speccrew-knowledge-techs-dispatch</field>
|
|
168
|
+
<field name="note">Leader directly calls this dispatch skill as an orchestration playbook. The dispatch skill defines the workflow; Leader dispatches downstream workers via Task tool → speccrew-task-worker for each stage.</field>
|
|
169
|
+
</block>
|
|
170
|
+
</branch>
|
|
171
|
+
|
|
172
|
+
<!-- Pipeline Agent Routing -->
|
|
173
|
+
<branch test="${intent} == 'prd'" name="PRD Requirement">
|
|
174
|
+
<block type="event" id="P1-E1" action="log" desc="Prompt user to talk to PM Agent"/>
|
|
175
|
+
</branch>
|
|
176
|
+
<branch test="${intent} == 'feature_design'" name="Feature Design">
|
|
177
|
+
<block type="event" id="P1-E2" action="log" desc="Prompt user to talk to Feature Designer"/>
|
|
178
|
+
</branch>
|
|
179
|
+
<branch test="${intent} == 'system_design'" name="System Design">
|
|
180
|
+
<block type="event" id="P1-E3" action="log" desc="Prompt user to talk to System Designer"/>
|
|
181
|
+
</branch>
|
|
182
|
+
<branch test="${intent} == 'development'" name="Development">
|
|
183
|
+
<block type="event" id="P1-E4" action="log" desc="Prompt user to talk to Developer"/>
|
|
184
|
+
</branch>
|
|
185
|
+
<branch test="${intent} == 'deployment'" name="Deployment">
|
|
186
|
+
<block type="event" id="P1-E5" action="log" desc="Prompt user to talk to Deployer"/>
|
|
187
|
+
</branch>
|
|
188
|
+
<branch test="${intent} == 'testing'" name="Testing">
|
|
189
|
+
<block type="task" id="P1-B5" action="run-skill" status="pending" desc="Invoke Test Management Skill">
|
|
190
|
+
<field name="skill">speccrew-test-manager</field>
|
|
191
|
+
</block>
|
|
192
|
+
</branch>
|
|
193
|
+
|
|
194
|
+
<!-- Special Intents -->
|
|
195
|
+
<branch test="${intent} == 'progress_check'" name="Progress Check">
|
|
196
|
+
<block type="event" id="P1-E6" action="log" desc="Display WORKFLOW-PROGRESS.json status"/>
|
|
197
|
+
</branch>
|
|
198
|
+
<branch test="${intent} == 'team_overview'" name="Team Overview">
|
|
199
|
+
<block type="event" id="P1-E7" action="log" desc="Display Agent role quick reference"/>
|
|
200
|
+
</branch>
|
|
201
|
+
<branch test="${intent} == 'troubleshooting'" name="Troubleshooting">
|
|
202
|
+
<block type="event" id="P1-E8" action="log" desc="Guide user to run speccrew doctor"/>
|
|
203
|
+
</branch>
|
|
204
|
+
<branch test="${intent} == 'system_update'" name="System Update">
|
|
205
|
+
<block type="event" id="P1-E9" action="log" desc="Guide user to run speccrew update"/>
|
|
206
|
+
</branch>
|
|
207
|
+
|
|
208
|
+
<!-- Default: Unrecognized → Phase 3 -->
|
|
209
|
+
<branch default="true" name="Unrecognized Intent">
|
|
210
|
+
<block type="event" id="P1-E10" action="log" desc="Explain available Skills and ask for clarification"/>
|
|
211
|
+
</branch>
|
|
212
|
+
</block>
|
|
213
|
+
</sequence>
|
|
214
|
+
|
|
215
|
+
<!-- ========== Phase 2: Invoke Corresponding Skill ========== -->
|
|
216
|
+
<sequence name="Phase 2: Invoke Skill">
|
|
217
|
+
<block type="task" id="P2-B1" action="run-skill" status="pending"
|
|
218
|
+
desc="Load and execute Skill definition">
|
|
219
|
+
<field name="skill">${matched_skill}</field>
|
|
220
|
+
<field name="path">${skill_dir}/${matched_skill}/SKILL.md</field>
|
|
221
|
+
<field name="output" var="skill_result"/>
|
|
222
|
+
</block>
|
|
223
|
+
</sequence>
|
|
224
|
+
|
|
225
|
+
<!-- ========== Phase 3: Unmatched Intent Handler ========== -->
|
|
226
|
+
<sequence name="Phase 3: Handle Unmatched Intent">
|
|
227
|
+
<block type="event" id="P3-E1" action="log" desc="Explain available Skills">
|
|
228
|
+
<field name="template">skill-list</field>
|
|
229
|
+
<field name="data" value="${available_skills}"/>
|
|
230
|
+
</block>
|
|
231
|
+
<block type="event" id="P3-E2" action="confirm" desc="Request user to clarify requirements">
|
|
232
|
+
<field name="prompt">Please tell me what task you want to accomplish?</field>
|
|
233
|
+
</block>
|
|
234
|
+
</sequence>
|
|
235
|
+
|
|
236
|
+
<!-- ========== Phase 4: Output Results ========== -->
|
|
237
|
+
<sequence name="Phase 4: Output Execution Results">
|
|
238
|
+
<block type="event" id="P4-E1" action="log" desc="Output Skill execution report">
|
|
239
|
+
<field name="template">skill-execution-report</field>
|
|
240
|
+
<field name="fields">status, skill_invoked, output_files, summary, next_steps</field>
|
|
241
|
+
</block>
|
|
242
|
+
|
|
243
|
+
<block type="checkpoint" id="P4-CP1" name="execution_reported" desc="Execution report outputted">
|
|
244
|
+
<field name="passed" value="true"/>
|
|
245
|
+
</block>
|
|
246
|
+
</sequence>
|
|
247
|
+
|
|
248
|
+
<block type="output" id="O1" desc="Team Leader execution result">
|
|
249
|
+
<field name="status" from="${execution.status}" type="string" desc="success / partial / failed"/>
|
|
250
|
+
<field name="skill_invoked" from="${skill.name}" type="string" desc="Invoked Skill name"/>
|
|
251
|
+
<field name="output_files" from="${execution.output_files}" type="array" desc="Generated/modified file list"/>
|
|
252
|
+
<field name="summary" from="${execution.summary}" type="string" desc="Execution summary"/>
|
|
253
|
+
<field name="next_steps" from="${execution.next_steps}" type="array" desc="Suggested next actions"/>
|
|
254
|
+
</block>
|
|
255
|
+
</workflow>
|