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,534 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<workflow id="pm-orchestration-main" status="pending">
|
|
3
|
+
|
|
4
|
+
<!-- ========== Input Parameters ========== -->
|
|
5
|
+
<block type="input" id="I1" desc="PM Orchestration Input">
|
|
6
|
+
<field name="user_requirement" required="true" type="string" desc="User requirement description or document path"/>
|
|
7
|
+
<field name="workspace_root" required="true" type="string" desc="speccrew-workspace root directory path"/>
|
|
8
|
+
<field name="source_path" required="false" type="string" desc="Project source root from .speccrewrc"/>
|
|
9
|
+
<field name="language" required="false" type="string" desc="User language (auto-detected)"/>
|
|
10
|
+
</block>
|
|
11
|
+
|
|
12
|
+
<!-- ========== Phase 0: Workflow Progress Management ========== -->
|
|
13
|
+
<sequence name="Phase 0: Workflow Progress Management">
|
|
14
|
+
|
|
15
|
+
<!-- Phase 0.5: IDE Detection -->
|
|
16
|
+
<block type="task" id="P0-B1" action="detect-ide" status="pending" desc="Detect current IDE environment">
|
|
17
|
+
<field name="output" var="ide_type"/>
|
|
18
|
+
<field name="output" var="ide_skills_dir"/>
|
|
19
|
+
</block>
|
|
20
|
+
|
|
21
|
+
<!-- Phase 0.6: Path Initialization -->
|
|
22
|
+
<block type="task" id="P0-B2" action="compute-paths" status="pending" desc="Compute all workflow paths">
|
|
23
|
+
<field name="workspace_root" value="${workspace_root}"/>
|
|
24
|
+
<field name="source_path" value="${source_path}"/>
|
|
25
|
+
<field name="output" var="sync_state_bizs_dir"/>
|
|
26
|
+
<field name="output" var="iterations_dir"/>
|
|
27
|
+
<field name="output" var="update_progress_script"/>
|
|
28
|
+
<field name="output" var="configs_dir"/>
|
|
29
|
+
</block>
|
|
30
|
+
|
|
31
|
+
<!-- Phase 0.1: Create or Locate Iteration Directory -->
|
|
32
|
+
<block type="gateway" id="P0-G1" mode="exclusive" desc="Check for active iteration">
|
|
33
|
+
<branch test="exists(${iterations_dir}/*/WORKFLOW-PROGRESS.json with 01_prd.status=in_progress)" name="Has Active Iteration">
|
|
34
|
+
<block type="task" id="P0-B3" action="read-file" status="pending" desc="Read active iteration progress">
|
|
35
|
+
<field name="path" value="${iterations_dir}/${active_iter}/WORKFLOW-PROGRESS.json"/>
|
|
36
|
+
<field name="output" var="workflow_progress"/>
|
|
37
|
+
</block>
|
|
38
|
+
</branch>
|
|
39
|
+
<branch default="true" name="Create New Iteration">
|
|
40
|
+
<block type="task" id="P0-B4" action="run-script" status="pending" desc="Create new iteration directory">
|
|
41
|
+
<field name="command">mkdir -p ${iterations_dir}/${iteration_name}/00.docs ${iterations_dir}/${iteration_name}/01.product-requirement</field>
|
|
42
|
+
</block>
|
|
43
|
+
<block type="task" id="P0-B5" action="run-script" status="pending" desc="Initialize WORKFLOW-PROGRESS.json">
|
|
44
|
+
<field name="command">node ${update_progress_script} update-workflow --file ${iterations_dir}/${iteration_name}/WORKFLOW-PROGRESS.json --stage 01_prd --status in_progress</field>
|
|
45
|
+
</block>
|
|
46
|
+
</branch>
|
|
47
|
+
</block>
|
|
48
|
+
|
|
49
|
+
<!-- Phase 0.2: Check Resume State -->
|
|
50
|
+
<block type="gateway" id="P0-G2" mode="exclusive" desc="Check resume state from checkpoint">
|
|
51
|
+
<branch test="exists(${iteration_path}/01.product-requirement/.checkpoints.json)" name="Has Checkpoint">
|
|
52
|
+
<block type="task" id="P0-B6" action="run-script" status="pending" desc="Read checkpoints">
|
|
53
|
+
<field name="command">node ${update_progress_script} read --file ${iteration_path}/01.product-requirement/.checkpoints.json --checkpoints</field>
|
|
54
|
+
<field name="output" var="checkpoints"/>
|
|
55
|
+
</block>
|
|
56
|
+
<block type="event" id="P0-E1" action="log" desc="Display resume summary">
|
|
57
|
+
<field name="template">resume-summary</field>
|
|
58
|
+
<field name="data" value="${checkpoints}"/>
|
|
59
|
+
</block>
|
|
60
|
+
</branch>
|
|
61
|
+
<branch default="true" name="No Checkpoint - Fresh Start"/>
|
|
62
|
+
</block>
|
|
63
|
+
</sequence>
|
|
64
|
+
|
|
65
|
+
<!-- ========== Phase 1: Knowledge Base Availability Check ========== -->
|
|
66
|
+
<sequence name="Phase 1: Knowledge Base Availability Check">
|
|
67
|
+
|
|
68
|
+
<block type="rule" id="P1-R1" level="mandatory" desc="Phase 1 Mandatory Constraints">
|
|
69
|
+
<field name="text">DO NOT manually search directories or construct status reports yourself - MUST dispatch Worker with speccrew-pm-knowledge-detector skill</field>
|
|
70
|
+
<field name="text">DO NOT create features-*.json files manually - ALL features files MUST be generated by scripts via Worker</field>
|
|
71
|
+
<field name="text">DO NOT execute knowledge-base scripts via Bash - ALL script execution MUST happen inside Worker Agents</field>
|
|
72
|
+
</block>
|
|
73
|
+
|
|
74
|
+
<!-- Phase 1.1: Detect Knowledge Base Status -->
|
|
75
|
+
<block type="task" id="P1-B1" action="dispatch-to-worker" status="pending" desc="Dispatch knowledge detector worker">
|
|
76
|
+
<field name="agent">speccrew-task-worker</field>
|
|
77
|
+
<field name="skill">speccrew-pm-knowledge-detector</field>
|
|
78
|
+
<field name="context">
|
|
79
|
+
workspace_path: ${workspace_root}
|
|
80
|
+
sync_state_bizs_dir: ${sync_state_bizs_dir}
|
|
81
|
+
configs_dir: ${configs_dir}
|
|
82
|
+
</field>
|
|
83
|
+
<field name="output" var="knowledge_status"/>
|
|
84
|
+
</block>
|
|
85
|
+
|
|
86
|
+
<!-- Phase 1.2: Branch on Knowledge Status -->
|
|
87
|
+
<block type="gateway" id="P1-G1" mode="exclusive" desc="Route based on knowledge status">
|
|
88
|
+
|
|
89
|
+
<!-- Path A: Full Knowledge -->
|
|
90
|
+
<branch test="${knowledge_status.status} == 'full'" name="Full Knowledge">
|
|
91
|
+
<block type="task" id="P1-B2" action="dispatch-to-worker" status="pending" desc="Read system-overview.md summary">
|
|
92
|
+
<field name="agent">speccrew-task-worker</field>
|
|
93
|
+
<field name="skill">speccrew-pm-system-summary-reader</field>
|
|
94
|
+
<field name="context">
|
|
95
|
+
system_overview_path: ${knowledge_status.system_overview_path}
|
|
96
|
+
</field>
|
|
97
|
+
<field name="output" var="system_context"/>
|
|
98
|
+
</block>
|
|
99
|
+
</branch>
|
|
100
|
+
|
|
101
|
+
<!-- Path B: Lite Knowledge -->
|
|
102
|
+
<branch test="${knowledge_status.status} == 'lite'" name="Lite Knowledge">
|
|
103
|
+
<block type="task" id="P1-B3" action="dispatch-to-worker" status="pending" desc="Dispatch module matcher worker">
|
|
104
|
+
<field name="agent">speccrew-task-worker</field>
|
|
105
|
+
<field name="skill">speccrew-pm-module-matcher</field>
|
|
106
|
+
<field name="context">
|
|
107
|
+
sync_state_bizs_dir: ${sync_state_bizs_dir}
|
|
108
|
+
requirement_text: ${user_requirement}
|
|
109
|
+
language: ${language}
|
|
110
|
+
</field>
|
|
111
|
+
<field name="output" var="matched_modules"/>
|
|
112
|
+
</block>
|
|
113
|
+
<block type="event" id="P1-E1" action="confirm" desc="Ask user to confirm module initialization">
|
|
114
|
+
<field name="prompt">Based on your requirement, the following modules appear to be related. Would you like to initialize detailed knowledge for these modules?</field>
|
|
115
|
+
<field name="data" value="${matched_modules}"/>
|
|
116
|
+
</block>
|
|
117
|
+
</branch>
|
|
118
|
+
|
|
119
|
+
<!-- Path C: No Knowledge -->
|
|
120
|
+
<branch test="${knowledge_status.status} == 'none'" name="No Knowledge">
|
|
121
|
+
<block type="rule" id="P1-R2" level="mandatory" desc="Path C Mandatory Rules">
|
|
122
|
+
<field name="text">DO NOT skip to Phase 2 without running feature inventory - this is AUTOMATIC</field>
|
|
123
|
+
<field name="text">DO NOT ask user whether to run feature inventory - automatic initialization is MANDATORY</field>
|
|
124
|
+
<field name="text">DO NOT run module-initializer here - deep init is scoped by requirement in Path B</field>
|
|
125
|
+
</block>
|
|
126
|
+
|
|
127
|
+
<block type="event" id="P1-E2" action="log" desc="Inform user about initialization">
|
|
128
|
+
<field name="message">No business knowledge base detected. Scanning project structure to discover available modules...</field>
|
|
129
|
+
</block>
|
|
130
|
+
|
|
131
|
+
<block type="task" id="P1-B4" action="dispatch-to-worker" status="pending" desc="Generate feature inventory">
|
|
132
|
+
<field name="agent">speccrew-task-worker</field>
|
|
133
|
+
<field name="skill">speccrew-knowledge-bizs-init-features</field>
|
|
134
|
+
<field name="context">
|
|
135
|
+
workspace_path: ${workspace_root}
|
|
136
|
+
language: ${language}
|
|
137
|
+
sync_state_bizs_dir: ${sync_state_bizs_dir}
|
|
138
|
+
configs_dir: ${configs_dir}
|
|
139
|
+
ide_skills_dir: ${ide_skills_dir}
|
|
140
|
+
</field>
|
|
141
|
+
</block>
|
|
142
|
+
|
|
143
|
+
<!-- After init-features, re-run detector and proceed to Path B -->
|
|
144
|
+
<block type="task" id="P1-B5" action="dispatch-to-worker" status="pending" desc="Re-run knowledge detector">
|
|
145
|
+
<field name="agent">speccrew-task-worker</field>
|
|
146
|
+
<field name="skill">speccrew-pm-knowledge-detector</field>
|
|
147
|
+
<field name="context">
|
|
148
|
+
workspace_path: ${workspace_root}
|
|
149
|
+
sync_state_bizs_dir: ${sync_state_bizs_dir}
|
|
150
|
+
configs_dir: ${configs_dir}
|
|
151
|
+
</field>
|
|
152
|
+
<field name="output" var="knowledge_status"/>
|
|
153
|
+
</block>
|
|
154
|
+
</branch>
|
|
155
|
+
</block>
|
|
156
|
+
|
|
157
|
+
<!-- Phase 1.3: Store Knowledge Context -->
|
|
158
|
+
<block type="task" id="P1-B6" action="set-context" status="pending" desc="Store knowledge context for subsequent phases">
|
|
159
|
+
<field name="knowledge_status" value="${knowledge_status.status}"/>
|
|
160
|
+
<field name="system_context" value="${system_context}"/>
|
|
161
|
+
<field name="matched_modules" value="${matched_modules}"/>
|
|
162
|
+
</block>
|
|
163
|
+
</sequence>
|
|
164
|
+
|
|
165
|
+
<!-- ========== Phase 2: Complexity Assessment & Skill Routing ========== -->
|
|
166
|
+
<sequence name="Phase 2: Complexity Assessment & Skill Routing">
|
|
167
|
+
|
|
168
|
+
<!-- Phase 2.0: Knowledge Initialization Verification -->
|
|
169
|
+
<block type="rule" id="P2-R1" level="mandatory" desc="Phase 2.0 Mandatory Verification">
|
|
170
|
+
<field name="text">THIS STEP IS MANDATORY AND CANNOT BE SKIPPED - MUST execute verification before complexity assessment</field>
|
|
171
|
+
</block>
|
|
172
|
+
|
|
173
|
+
<block type="task" id="P2-B1" action="run-script" status="pending" desc="Check DISPATCH-PROGRESS.json">
|
|
174
|
+
<field name="command">node ${update_progress_script} read --file ${workspace_root}/knowledges/bizs/DISPATCH-PROGRESS.json --summary</field>
|
|
175
|
+
<field name="output" var="dispatch_progress"/>
|
|
176
|
+
</block>
|
|
177
|
+
|
|
178
|
+
<block type="gateway" id="P2-G1" mode="exclusive" desc="Verify knowledge initialization complete">
|
|
179
|
+
<branch test="${dispatch_progress.counts.pending} > 0" name="Knowledge Incomplete">
|
|
180
|
+
<block type="event" id="P2-E1" action="log" desc="Report incomplete initialization">
|
|
181
|
+
<field name="message">Knowledge initialization is INCOMPLETE. Returning to Path B Step 3 to complete pending tasks.</field>
|
|
182
|
+
</block>
|
|
183
|
+
<!-- Return to Phase 1 Path B Step 3 -->
|
|
184
|
+
<block type="goto" id="P2-GOTO1" target="P1-B3"/>
|
|
185
|
+
</branch>
|
|
186
|
+
<branch default="true" name="Knowledge Complete - Proceed"/>
|
|
187
|
+
</block>
|
|
188
|
+
|
|
189
|
+
<!-- Phase 2.1-2.2: Complexity Indicators & Decision -->
|
|
190
|
+
<block type="task" id="P2-B2" action="assess-complexity" status="pending" desc="Assess requirement complexity">
|
|
191
|
+
<field name="user_requirement" value="${user_requirement}"/>
|
|
192
|
+
<field name="knowledge_status" value="${knowledge_status}"/>
|
|
193
|
+
<field name="output" var="complexity"/>
|
|
194
|
+
<field name="output" var="module_count"/>
|
|
195
|
+
<field name="output" var="feature_count"/>
|
|
196
|
+
</block>
|
|
197
|
+
|
|
198
|
+
<!-- Phase 2.3: Skill Routing -->
|
|
199
|
+
<block type="gateway" id="P2-G2" mode="exclusive" desc="Route based on complexity">
|
|
200
|
+
<branch test="${complexity} == 'simple'" name="Simple Requirement">
|
|
201
|
+
<block type="event" id="P2-E2" action="log" desc="Log simple path selection">
|
|
202
|
+
<field name="message">Assessment: SIMPLE requirement (${module_count} modules, ${feature_count} features) → Single PRD workflow</field>
|
|
203
|
+
</block>
|
|
204
|
+
<block type="set-variable" id="P2-V1" name="prd_skill" value="speccrew-pm-requirement-simple"/>
|
|
205
|
+
</branch>
|
|
206
|
+
<branch test="${complexity} == 'complex'" name="Complex Requirement">
|
|
207
|
+
<block type="event" id="P2-E3" action="log" desc="Log complex path selection">
|
|
208
|
+
<field name="message">Assessment: COMPLEX requirement (${module_count} modules, ${feature_count} features) → Master-Sub PRD workflow</field>
|
|
209
|
+
</block>
|
|
210
|
+
<block type="set-variable" id="P2-V2" name="prd_skill" value="speccrew-pm-requirement-analysis"/>
|
|
211
|
+
</branch>
|
|
212
|
+
</block>
|
|
213
|
+
</sequence>
|
|
214
|
+
|
|
215
|
+
<!-- ========== Phase 3: Requirement Clarification ========== -->
|
|
216
|
+
<sequence name="Phase 3: Requirement Clarification">
|
|
217
|
+
|
|
218
|
+
<block type="rule" id="P3-R1" level="mandatory" desc="Phase 3 Mandatory Constraints">
|
|
219
|
+
<field name="text">DO NOT perform requirement clarification yourself - MUST use speccrew-pm-requirement-clarify skill</field>
|
|
220
|
+
<field name="text">DO NOT proceed to PRD generation without .clarification-summary.md</field>
|
|
221
|
+
<field name="text">IF clarification skill fails: ABORT - do NOT generate clarification yourself</field>
|
|
222
|
+
</block>
|
|
223
|
+
|
|
224
|
+
<!-- Phase 3.1-3.2: Prepare Parameters & Invoke Skill -->
|
|
225
|
+
<block type="task" id="P3-B1" action="run-skill" status="pending" desc="Invoke clarification skill">
|
|
226
|
+
<field name="skill">speccrew-pm-requirement-clarify</field>
|
|
227
|
+
<field name="context">
|
|
228
|
+
requirement_file: ${user_requirement}
|
|
229
|
+
iteration_path: ${iteration_path}
|
|
230
|
+
complexity_hint: ${complexity}
|
|
231
|
+
knowledge_status: ${knowledge_status.status}
|
|
232
|
+
</field>
|
|
233
|
+
<field name="output" var="clarification_result"/>
|
|
234
|
+
</block>
|
|
235
|
+
|
|
236
|
+
<!-- Phase 3.4: Validate Output -->
|
|
237
|
+
<block type="task" id="P3-B2" action="validate-file" status="pending" desc="Validate clarification output">
|
|
238
|
+
<field name="path" value="${iteration_path}/01.product-requirement/.clarification-summary.md"/>
|
|
239
|
+
<field name="min_size" value="500"/>
|
|
240
|
+
<field name="output" var="clarification_valid"/>
|
|
241
|
+
</block>
|
|
242
|
+
|
|
243
|
+
<block type="gateway" id="P3-G1" mode="exclusive" desc="Check validation result">
|
|
244
|
+
<branch test="${clarification_valid} == false" name="Validation Failed">
|
|
245
|
+
<block type="event" id="P3-E1" action="confirm" desc="Ask user for retry or abort">
|
|
246
|
+
<field name="prompt">Phase 3 FAILED: Requirement Clarification Skill failed. Retry with additional context or Abort?</field>
|
|
247
|
+
</block>
|
|
248
|
+
</branch>
|
|
249
|
+
<branch default="true" name="Validation Passed"/>
|
|
250
|
+
</block>
|
|
251
|
+
|
|
252
|
+
<!-- Phase 3.7: User Confirmation Gate -->
|
|
253
|
+
<block type="checkpoint" id="P3-CP1" name="requirement_clarification" desc="User confirmation gate">
|
|
254
|
+
<field name="required" value="true"/>
|
|
255
|
+
</block>
|
|
256
|
+
|
|
257
|
+
<block type="event" id="P3-E2" action="confirm" desc="Present clarification results for user confirmation">
|
|
258
|
+
<field name="prompt">📋 Requirement Clarification Complete. Please review and confirm before proceeding to PRD generation.</field>
|
|
259
|
+
<field name="template">clarification-summary</field>
|
|
260
|
+
<field name="data" value="${clarification_result}"/>
|
|
261
|
+
</block>
|
|
262
|
+
|
|
263
|
+
<block type="task" id="P3-B3" action="run-script" status="pending" desc="Update confirmation checkpoint">
|
|
264
|
+
<field name="command">node ${update_progress_script} write-checkpoint --file ${iteration_path}/01.product-requirement/.checkpoints.json --stage 01_prd --checkpoint requirement_clarification_confirmed --passed true</field>
|
|
265
|
+
</block>
|
|
266
|
+
</sequence>
|
|
267
|
+
|
|
268
|
+
<!-- ========== Phase 4: Invoke PRD Skill ========== -->
|
|
269
|
+
<sequence name="Phase 4: Invoke PRD Skill">
|
|
270
|
+
|
|
271
|
+
<block type="rule" id="P4-R1" level="mandatory" desc="Phase 4 Orchestrator Principle">
|
|
272
|
+
<field name="text">You are the ORCHESTRATOR, NOT the WRITER</field>
|
|
273
|
+
<field name="text">Phase 4a (Model): DO NOT do ISA-95 analysis yourself - Skill does it</field>
|
|
274
|
+
<field name="text">Phase 4b (Generate): DO NOT generate Master PRD yourself - Skill generates it</field>
|
|
275
|
+
<field name="text">If ANY Skill fails: STOP and report error to user. DO NOT generate content as fallback.</field>
|
|
276
|
+
</block>
|
|
277
|
+
|
|
278
|
+
<block type="gateway" id="P4-G1" mode="exclusive" desc="Route to simple or complex path">
|
|
279
|
+
|
|
280
|
+
<!-- Path A: Simple Requirements -->
|
|
281
|
+
<branch test="${complexity} == 'simple'" name="Simple Path">
|
|
282
|
+
<block type="task" id="P4-B1" action="run-skill" status="pending" desc="Invoke simple PRD skill">
|
|
283
|
+
<field name="skill">speccrew-pm-requirement-simple</field>
|
|
284
|
+
<field name="context">
|
|
285
|
+
iteration_path: ${iteration_path}
|
|
286
|
+
clarification_file: ${iteration_path}/01.product-requirement/.clarification-summary.md
|
|
287
|
+
</field>
|
|
288
|
+
<field name="output" var="prd_output"/>
|
|
289
|
+
</block>
|
|
290
|
+
|
|
291
|
+
<block type="task" id="P4-B2" action="validate-file" status="pending" desc="Validate single PRD">
|
|
292
|
+
<field name="path" value="${prd_output.prd_path}"/>
|
|
293
|
+
<field name="min_size" value="2048"/>
|
|
294
|
+
<field name="output" var="prd_valid"/>
|
|
295
|
+
</block>
|
|
296
|
+
|
|
297
|
+
<!-- Skip Phase 5 for simple path -->
|
|
298
|
+
<block type="set-variable" id="P4-V1" name="skip_phase_5" value="true"/>
|
|
299
|
+
</branch>
|
|
300
|
+
|
|
301
|
+
<!-- Path B: Complex Requirements -->
|
|
302
|
+
<branch test="${complexity} == 'complex'" name="Complex Path">
|
|
303
|
+
|
|
304
|
+
<!-- Phase 4a: Module Modeling -->
|
|
305
|
+
<block type="task" id="P4-B3" action="run-skill" status="pending" desc="Invoke requirement modeling skill">
|
|
306
|
+
<field name="skill">speccrew-pm-requirement-model</field>
|
|
307
|
+
<field name="context">
|
|
308
|
+
iteration_path: ${iteration_path}
|
|
309
|
+
clarification_file: ${iteration_path}/01.product-requirement/.clarification-summary.md
|
|
310
|
+
</field>
|
|
311
|
+
<field name="output" var="model_output"/>
|
|
312
|
+
</block>
|
|
313
|
+
|
|
314
|
+
<block type="task" id="P4-B4" action="validate-file" status="pending" desc="Validate module design">
|
|
315
|
+
<field name="path" value="${iteration_path}/01.product-requirement/.module-design.md"/>
|
|
316
|
+
<field name="min_size" value="1024"/>
|
|
317
|
+
<field name="output" var="model_valid"/>
|
|
318
|
+
</block>
|
|
319
|
+
|
|
320
|
+
<block type="gateway" id="P4-G2" mode="exclusive" desc="Check model validation">
|
|
321
|
+
<branch test="${model_valid} == false" name="Model Failed">
|
|
322
|
+
<block type="event" id="P4-E1" action="confirm" desc="Ask user for retry or abort">
|
|
323
|
+
<field name="prompt">Phase 4a FAILED: Modeling skill failed. Retry with additional context or Abort?</field>
|
|
324
|
+
</block>
|
|
325
|
+
</branch>
|
|
326
|
+
<branch default="true" name="Model Passed"/>
|
|
327
|
+
</block>
|
|
328
|
+
|
|
329
|
+
<!-- Phase 4b: Master PRD Generation -->
|
|
330
|
+
<block type="task" id="P4-B5" action="run-skill" status="pending" desc="Invoke requirement analysis skill">
|
|
331
|
+
<field name="skill">speccrew-pm-requirement-analysis</field>
|
|
332
|
+
<field name="context">
|
|
333
|
+
iteration_path: ${iteration_path}
|
|
334
|
+
clarification_file: ${iteration_path}/01.product-requirement/.clarification-summary.md
|
|
335
|
+
module_design_file: ${iteration_path}/01.product-requirement/.module-design.md
|
|
336
|
+
</field>
|
|
337
|
+
<field name="output" var="prd_output"/>
|
|
338
|
+
</block>
|
|
339
|
+
|
|
340
|
+
<block type="task" id="P4-B6" action="validate-file" status="pending" desc="Validate Master PRD">
|
|
341
|
+
<field name="path" value="${prd_output.master_prd_path}"/>
|
|
342
|
+
<field name="min_size" value="2048"/>
|
|
343
|
+
<field name="output" var="prd_valid"/>
|
|
344
|
+
</block>
|
|
345
|
+
|
|
346
|
+
<block type="gateway" id="P4-G3" mode="exclusive" desc="Check PRD validation">
|
|
347
|
+
<branch test="${prd_valid} == false" name="PRD Failed">
|
|
348
|
+
<block type="event" id="P4-E2" action="confirm" desc="Ask user for retry or abort">
|
|
349
|
+
<field name="prompt">Phase 4b FAILED: PRD generation skill failed. Retry with additional context or Abort?</field>
|
|
350
|
+
</block>
|
|
351
|
+
</branch>
|
|
352
|
+
<branch default="true" name="PRD Passed">
|
|
353
|
+
<block type="set-variable" id="P4-V2" name="skip_phase_5" value="false"/>
|
|
354
|
+
</branch>
|
|
355
|
+
</block>
|
|
356
|
+
</branch>
|
|
357
|
+
</block>
|
|
358
|
+
</sequence>
|
|
359
|
+
|
|
360
|
+
<!-- ========== Phase 5: Sub-PRD Worker Dispatch (Complex Only) ========== -->
|
|
361
|
+
<sequence name="Phase 5: Sub-PRD Worker Dispatch">
|
|
362
|
+
|
|
363
|
+
<block type="gateway" id="P5-G1" mode="exclusive" desc="Check if Phase 5 needed">
|
|
364
|
+
<branch test="${skip_phase_5} == true" name="Skip Phase 5">
|
|
365
|
+
<block type="event" id="P5-E1" action="log" desc="Skip Sub-PRD dispatch for simple path">
|
|
366
|
+
<field name="message">Simple requirement - skipping Sub-PRD dispatch phase</field>
|
|
367
|
+
</block>
|
|
368
|
+
</branch>
|
|
369
|
+
<branch default="true" name="Execute Phase 5">
|
|
370
|
+
|
|
371
|
+
<block type="rule" id="P5-R1" level="mandatory" desc="Phase 5 Worker Enforcement">
|
|
372
|
+
<field name="text">ONE Worker per Module - NO EXCEPTIONS</field>
|
|
373
|
+
<field name="text">DO NOT generate Sub-PRDs yourself - dispatch speccrew-task-worker</field>
|
|
374
|
+
<field name="text">DO NOT invoke speccrew-pm-sub-prd-generate skill directly - ONLY via Worker</field>
|
|
375
|
+
<field name="text">Dispatch in batches of 5, wait for each batch to complete</field>
|
|
376
|
+
</block>
|
|
377
|
+
|
|
378
|
+
<!-- Phase 5.1: Read Dispatch Plan -->
|
|
379
|
+
<block type="task" id="P5-B1" action="read-json" status="pending" desc="Read dispatch plan from PRD output">
|
|
380
|
+
<field name="path" value="${prd_output.dispatch_plan_path}"/>
|
|
381
|
+
<field name="output" var="dispatch_plan"/>
|
|
382
|
+
</block>
|
|
383
|
+
|
|
384
|
+
<!-- Phase 5.2: Initialize Dispatch Progress -->
|
|
385
|
+
<block type="task" id="P5-B2" action="run-script" status="pending" desc="Initialize DISPATCH-PROGRESS.json">
|
|
386
|
+
<field name="command">node ${update_progress_script} init --file ${iteration_path}/01.product-requirement/DISPATCH-PROGRESS.json --stage sub_prd_dispatch --tasks-file ${iteration_path}/01.product-requirement/.tasks-temp.json</field>
|
|
387
|
+
</block>
|
|
388
|
+
|
|
389
|
+
<!-- Phase 5.3: Dispatch Workers in Batches -->
|
|
390
|
+
<block type="loop" id="P5-L1" mode="batch" batch_size="5" desc="Dispatch workers for each module">
|
|
391
|
+
<field name="items" value="${dispatch_plan.modules}"/>
|
|
392
|
+
|
|
393
|
+
<block type="task" id="P5-B3" action="dispatch-to-worker" status="pending" desc="Dispatch Sub-PRD worker">
|
|
394
|
+
<field name="agent">speccrew-task-worker</field>
|
|
395
|
+
<field name="skill">speccrew-pm-sub-prd-generate</field>
|
|
396
|
+
<field name="context">
|
|
397
|
+
module_id: ${item.module_id}
|
|
398
|
+
module_name: ${item.module_name}
|
|
399
|
+
module_key: ${item.module_key}
|
|
400
|
+
module_scope: ${item.module_scope}
|
|
401
|
+
module_entities: ${item.module_entities}
|
|
402
|
+
module_user_stories: ${item.module_user_stories}
|
|
403
|
+
module_requirements: ${item.module_requirements}
|
|
404
|
+
module_features: ${item.module_features}
|
|
405
|
+
module_dependencies: ${item.module_dependencies}
|
|
406
|
+
master_prd_path: ${prd_output.master_prd_path}
|
|
407
|
+
clarification_file: ${iteration_path}/01.product-requirement/.clarification-summary.md
|
|
408
|
+
module_design_file: ${iteration_path}/01.product-requirement/.module-design.md
|
|
409
|
+
feature_name: ${dispatch_plan.feature_name}
|
|
410
|
+
template_path: ${dispatch_plan.template_path}
|
|
411
|
+
output_path: ${dispatch_plan.output_dir}/${dispatch_plan.feature_name}-sub-${item.module_key}.md
|
|
412
|
+
language: ${language}
|
|
413
|
+
</field>
|
|
414
|
+
</block>
|
|
415
|
+
|
|
416
|
+
<block type="task" id="P5-B4" action="run-script" status="pending" desc="Update worker progress">
|
|
417
|
+
<field name="command">node ${update_progress_script} update-task --file ${iteration_path}/01.product-requirement/DISPATCH-PROGRESS.json --task-id ${item.module_key} --status ${worker_status}</field>
|
|
418
|
+
</block>
|
|
419
|
+
</block>
|
|
420
|
+
|
|
421
|
+
<!-- Phase 5.4: Handle Failures & Retry -->
|
|
422
|
+
<block type="task" id="P5-B5" action="run-script" status="pending" desc="Check for failed tasks">
|
|
423
|
+
<field name="command">node ${update_progress_script} read --file ${iteration_path}/01.product-requirement/DISPATCH-PROGRESS.json</field>
|
|
424
|
+
<field name="output" var="final_progress"/>
|
|
425
|
+
</block>
|
|
426
|
+
|
|
427
|
+
<block type="gateway" id="P5-G2" mode="exclusive" desc="Check for failures">
|
|
428
|
+
<branch test="${final_progress.failed_count} > 0" name="Has Failures">
|
|
429
|
+
<block type="event" id="P5-E2" action="log" desc="Report failed modules">
|
|
430
|
+
<field name="template">failed-modules</field>
|
|
431
|
+
<field name="data" value="${final_progress.failed_tasks}"/>
|
|
432
|
+
</block>
|
|
433
|
+
<!-- Single retry for failed modules -->
|
|
434
|
+
<block type="event" id="P5-E3" action="confirm" desc="Ask user for retry or skip">
|
|
435
|
+
<field name="prompt">Some modules failed. Retry failed modules, Skip and continue, or Abort?</field>
|
|
436
|
+
</block>
|
|
437
|
+
</branch>
|
|
438
|
+
<branch default="true" name="All Success"/>
|
|
439
|
+
</block>
|
|
440
|
+
|
|
441
|
+
<!-- Phase 5.5: Collect Results & Verify -->
|
|
442
|
+
<block type="task" id="P5-B6" action="run-script" status="pending" desc="Update checkpoint">
|
|
443
|
+
<field name="command">node ${update_progress_script} write-checkpoint --file ${iteration_path}/01.product-requirement/.checkpoints.json --checkpoint sub_prd_dispatch --status passed</field>
|
|
444
|
+
</block>
|
|
445
|
+
</branch>
|
|
446
|
+
</block>
|
|
447
|
+
</sequence>
|
|
448
|
+
|
|
449
|
+
<!-- ========== Phase 6: Verification & Confirmation ========== -->
|
|
450
|
+
<sequence name="Phase 6: Verification & Confirmation">
|
|
451
|
+
|
|
452
|
+
<block type="rule" id="P6-R1" level="mandatory" desc="Phase 6 Structure Rules">
|
|
453
|
+
<field name="text">Phase 6 MUST execute in order: 6.1 (Verification) → 6.2 (User Review) → 6.3 (Finalize)</field>
|
|
454
|
+
<field name="text">Gate 6.1→6.2: Automatic after checklist passes</field>
|
|
455
|
+
<field name="text">Gate 6.2→6.3: REQUIRES EXPLICIT USER CONFIRMATION - no auto-proceed</field>
|
|
456
|
+
<field name="text">DO NOT update checkpoints (verification_checklist, prd_review) before user confirmation</field>
|
|
457
|
+
<field name="text">DO NOT update WORKFLOW-PROGRESS.json to completed before user confirmation</field>
|
|
458
|
+
</block>
|
|
459
|
+
|
|
460
|
+
<!-- Phase 6.1: Verification Checklist -->
|
|
461
|
+
<block type="task" id="P6-B1" action="verify-checklist" status="pending" desc="Run verification checklist">
|
|
462
|
+
<field name="iteration_path" value="${iteration_path}"/>
|
|
463
|
+
<field name="complexity" value="${complexity}"/>
|
|
464
|
+
<field name="output" var="verification_result"/>
|
|
465
|
+
</block>
|
|
466
|
+
|
|
467
|
+
<block type="gateway" id="P6-G1" mode="exclusive" desc="Check verification result">
|
|
468
|
+
<branch test="${verification_result.passed} == false" name="Verification Failed">
|
|
469
|
+
<block type="event" id="P6-E1" action="confirm" desc="Report violations">
|
|
470
|
+
<field name="prompt">Verification failed. Issues found: ${verification_result.issues}. Proceed anyway, Regenerate, or Abort?</field>
|
|
471
|
+
</block>
|
|
472
|
+
</branch>
|
|
473
|
+
<branch default="true" name="Verification Passed"/>
|
|
474
|
+
</block>
|
|
475
|
+
|
|
476
|
+
<!-- Phase 6.2: Present for User Review (HARD STOP) -->
|
|
477
|
+
<block type="checkpoint" id="P6-CP1" name="user_review" desc="User review gate">
|
|
478
|
+
<field name="required" value="true"/>
|
|
479
|
+
</block>
|
|
480
|
+
|
|
481
|
+
<block type="event" id="P6-E2" action="confirm" desc="Present PRD documents for user review">
|
|
482
|
+
<field name="prompt">📋 PRD Documents Ready for Review. Please review and confirm. Reply "确认" or "OK" to proceed.</field>
|
|
483
|
+
<field name="template">prd-review-summary</field>
|
|
484
|
+
<field name="data" value="${prd_output}"/>
|
|
485
|
+
</block>
|
|
486
|
+
|
|
487
|
+
<!-- Phase 6.3: Finalize (ONLY after user confirms) -->
|
|
488
|
+
<block type="rule" id="P6-R2" level="mandatory" desc="Phase 6.3 Prerequisite">
|
|
489
|
+
<field name="text">Phase 6.3 can ONLY execute AFTER user has explicitly confirmed in Phase 6.2</field>
|
|
490
|
+
<field name="text">IF user has NOT confirmed → DO NOT execute any step below</field>
|
|
491
|
+
</block>
|
|
492
|
+
|
|
493
|
+
<block type="task" id="P6-B2" action="run-script" status="pending" desc="Update verification checkpoint">
|
|
494
|
+
<field name="command">node ${update_progress_script} write-checkpoint --file ${iteration_path}/01.product-requirement/.checkpoints.json --stage 01_prd --checkpoint verification_checklist --passed true</field>
|
|
495
|
+
</block>
|
|
496
|
+
|
|
497
|
+
<block type="task" id="P6-B3" action="run-script" status="pending" desc="Update PRD review checkpoint">
|
|
498
|
+
<field name="command">node ${update_progress_script} write-checkpoint --file ${iteration_path}/01.product-requirement/.checkpoints.json --stage 01_prd --checkpoint prd_review --passed true</field>
|
|
499
|
+
</block>
|
|
500
|
+
|
|
501
|
+
<block type="task" id="P6-B4" action="run-script" status="pending" desc="Update workflow status to completed">
|
|
502
|
+
<field name="command">node ${update_progress_script} update-workflow --file ${iteration_path}/WORKFLOW-PROGRESS.json --stage 01_prd --status completed</field>
|
|
503
|
+
</block>
|
|
504
|
+
|
|
505
|
+
<block type="task" id="P6-B5" action="run-script" status="pending" desc="Update workflow status to confirmed">
|
|
506
|
+
<field name="command">node ${update_progress_script} update-workflow --file ${iteration_path}/WORKFLOW-PROGRESS.json --stage 01_prd --status confirmed</field>
|
|
507
|
+
</block>
|
|
508
|
+
|
|
509
|
+
<block type="task" id="P6-B6" action="update-status" status="pending" desc="Update PRD document status">
|
|
510
|
+
<field name="files" value="${prd_output.all_prd_files}"/>
|
|
511
|
+
<field name="from" value="📝 Draft"/>
|
|
512
|
+
<field name="to" value="✅ Confirmed"/>
|
|
513
|
+
</block>
|
|
514
|
+
|
|
515
|
+
<!-- Phase 6 Cleanup -->
|
|
516
|
+
<block type="task" id="P6-B7" action="run-script" status="pending" desc="Cleanup intermediate files">
|
|
517
|
+
<field name="command">Remove-Item ${iteration_path}/01.product-requirement/.checkpoints.json -ErrorAction SilentlyContinue; Remove-Item ${iteration_path}/01.product-requirement/.prd-generation-report.md -ErrorAction SilentlyContinue; Remove-Item ${iteration_path}/01.product-requirement/.sub-prd-dispatch-plan.json -ErrorAction SilentlyContinue</field>
|
|
518
|
+
</block>
|
|
519
|
+
|
|
520
|
+
<block type="event" id="P6-E3" action="log" desc="Output completion message">
|
|
521
|
+
<field name="template">prd-completion</field>
|
|
522
|
+
<field name="message">✅ PRD Stage Complete. All documents confirmed. Ready for Feature Design phase.</field>
|
|
523
|
+
</block>
|
|
524
|
+
</sequence>
|
|
525
|
+
|
|
526
|
+
<!-- ========== Output ========== -->
|
|
527
|
+
<block type="output" id="O1" desc="PM Orchestration execution result">
|
|
528
|
+
<field name="status" from="${execution.status}" type="string" desc="success / partial / failed"/>
|
|
529
|
+
<field name="prd_files" from="${prd_output.all_prd_files}" type="array" desc="Generated PRD file list"/>
|
|
530
|
+
<field name="feature_list" from="${iteration_path}/01.product-requirement/.prd-feature-list.json" type="string" desc="Feature list file path"/>
|
|
531
|
+
<field name="workflow_stage" from="01_prd" type="string" desc="Current workflow stage"/>
|
|
532
|
+
<field name="next_agent" value="speccrew-feature-designer" type="string" desc="Suggested next agent"/>
|
|
533
|
+
</block>
|
|
534
|
+
</workflow>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-system-deployer-orchestration
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: System Deployer 的编排调度技能,负责执行部署工作流:阶段门禁验证、IDE目录检测、准备阶段、技能调度(构建→迁移→启动→冒烟测试)、部署总结确认。
|
|
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 Deployer Orchestration
|
|
31
|
+
|
|
32
|
+
System Deployer 的核心编排技能,负责:
|
|
33
|
+
|
|
34
|
+
1. **Stage Gate Verification** - 验证开发阶段已完成确认
|
|
35
|
+
2. **IDE Directory Detection** - 检测 IDE 目录并验证部署技能存在
|
|
36
|
+
3. **Preparation** - 读取开发任务记录、加载技术知识、确定项目根目录
|
|
37
|
+
4. **Skill Dispatch** - 按顺序调度部署技能:build → migrate → startup → smoke-test
|
|
38
|
+
5. **Deployment Summary** - 呈现部署总结并等待用户确认
|
|
39
|
+
|
|
40
|
+
## Invocation Method
|
|
41
|
+
|
|
42
|
+
**CRITICAL**: This skill is loaded directly by System Deployer Agent — do NOT invoke via Worker Agent.
|
|
43
|
+
|
|
44
|
+
```xml
|
|
45
|
+
<block type="task" action="run-skill" desc="System Deployer orchestration workflow">
|
|
46
|
+
<field name="skill">speccrew-system-deployer-orchestration</field>
|
|
47
|
+
</block>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Input Parameters
|
|
51
|
+
|
|
52
|
+
| Parameter | Type | Required | Description |
|
|
53
|
+
|-----------|------|----------|-------------|
|
|
54
|
+
| `workspace_path` | string | Yes | speccrew-workspace 根目录绝对路径 |
|
|
55
|
+
| `iteration_dir` | string | Yes | 当前迭代目录路径 |
|
|
56
|
+
| `update_progress_script` | string | Yes | update-progress.js 脚本路径 |
|
|
57
|
+
|
|
58
|
+
## Output
|
|
59
|
+
|
|
60
|
+
- `status` - Execution status (success / partial / failed)
|
|
61
|
+
- `deployed` - Boolean indicating deployment success
|
|
62
|
+
- `checkpoints` - List of passed checkpoints
|
|
63
|
+
- `output_files` - List of generated/modified files
|
|
64
|
+
- `summary` - Execution summary
|
|
65
|
+
- `next_steps` - Suggested next actions
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## AgentFlow Definition
|
|
70
|
+
|
|
71
|
+
<!-- @agentflow: workflow.agentflow.xml -->
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## CONTINUOUS EXECUTION RULES
|
|
76
|
+
|
|
77
|
+
This skill MUST execute tasks continuously without unnecessary interruptions.
|
|
78
|
+
|
|
79
|
+
### FORBIDDEN Interruptions
|
|
80
|
+
|
|
81
|
+
1. DO NOT ask user "Should I continue?" after completing a subtask
|
|
82
|
+
2. DO NOT suggest "Let me split this into batches" or "Let's do this in parts"
|
|
83
|
+
3. DO NOT pause to list what you plan to do next — just do it
|
|
84
|
+
4. DO NOT ask for confirmation before invoking skills (Phase 3 HARD STOP is the only confirmation point)
|
|
85
|
+
|
|
86
|
+
### When to Pause (ONLY these cases)
|
|
87
|
+
|
|
88
|
+
1. Phase 3 HARD STOP — user confirmation required by design
|
|
89
|
+
2. Ambiguous requirements that genuinely need clarification
|
|
90
|
+
3. Unrecoverable errors that prevent further progress
|
|
91
|
+
4. Skill invocation failure — report and wait for user decision
|