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,442 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<workflow id="speccrew-test-manager-orchestration" version="1.0.0">
|
|
3
|
+
|
|
4
|
+
<!-- ==================== INPUT PARAMETERS ==================== -->
|
|
5
|
+
<block type="input" id="input-params">
|
|
6
|
+
<param name="workspace_path" type="string" required="true" desc="speccrew-workspace 根目录绝对路径"/>
|
|
7
|
+
<param name="iteration_dir" type="string" required="true" desc="当前迭代目录路径"/>
|
|
8
|
+
<param name="update_progress_script" type="string" required="true" desc="update-progress.js 脚本路径"/>
|
|
9
|
+
</block>
|
|
10
|
+
|
|
11
|
+
<!-- ==================== PHASE 0: STAGE GATE & RESUME ==================== -->
|
|
12
|
+
<sequence id="phase-0-stage-gate">
|
|
13
|
+
|
|
14
|
+
<!-- Step 0.1: Verify Upstream Completion -->
|
|
15
|
+
<block type="task" id="p0-1-verify-stage" action="run-script" desc="验证部署阶段已完成确认">
|
|
16
|
+
<field name="command">node ${update_progress_script} read --file ${workspace_path}/WORKFLOW-PROGRESS.json --overview</field>
|
|
17
|
+
<event type="on-failure" action="log">
|
|
18
|
+
<message>❌ Deployment stage has not been confirmed. Please complete and confirm deployment before starting system test.</message>
|
|
19
|
+
</event>
|
|
20
|
+
</block>
|
|
21
|
+
|
|
22
|
+
<block type="gateway" id="p0-1-gate" desc="检查部署阶段状态">
|
|
23
|
+
<condition expression="stages.05_deployment.status == 'confirmed'">
|
|
24
|
+
<when true="proceed" false="abort"/>
|
|
25
|
+
</condition>
|
|
26
|
+
<event type="on-false" action="log">
|
|
27
|
+
<message>❌ STAGE GATE FAILURE: Deployment stage not confirmed. Workflow aborted.</message>
|
|
28
|
+
</event>
|
|
29
|
+
</block>
|
|
30
|
+
|
|
31
|
+
<!-- Update Current Stage -->
|
|
32
|
+
<block type="task" id="p0-1-update-stage" action="run-script" desc="更新系统测试阶段状态为进行中">
|
|
33
|
+
<field name="command">node ${update_progress_script} update-workflow --file ${workspace_path}/WORKFLOW-PROGRESS.json --stage 06_system_test --status in_progress</field>
|
|
34
|
+
</block>
|
|
35
|
+
|
|
36
|
+
<!-- Step 0.2: Check Resume State -->
|
|
37
|
+
<block type="task" id="p0-2-read-checkpoints" action="run-script" desc="读取检查点状态以支持断点续传">
|
|
38
|
+
<field name="command">node ${update_progress_script} read --file ${iteration_dir}/06.system-test/.checkpoints.json --checkpoints</field>
|
|
39
|
+
<event type="on-failure" action="log">
|
|
40
|
+
<message>ℹ️ No checkpoint file found. Proceeding with full workflow.</message>
|
|
41
|
+
</event>
|
|
42
|
+
</block>
|
|
43
|
+
|
|
44
|
+
<!-- Step 0.3: Check Dispatch Resume -->
|
|
45
|
+
<block type="task" id="p0-3-read-dispatch-progress" action="run-script" desc="读取调度进度以支持多平台断点续传">
|
|
46
|
+
<field name="command">node ${update_progress_script} read --file ${iteration_dir}/06.system-test/DISPATCH-PROGRESS.json --summary</field>
|
|
47
|
+
<event type="on-failure" action="log">
|
|
48
|
+
<message>ℹ️ No dispatch progress file found. Proceeding with fresh dispatch.</message>
|
|
49
|
+
</event>
|
|
50
|
+
</block>
|
|
51
|
+
|
|
52
|
+
</sequence>
|
|
53
|
+
|
|
54
|
+
<!-- ==================== PHASE 0.5: IDE DIRECTORY DETECTION ==================== -->
|
|
55
|
+
<sequence id="phase-0.5-ide-detection">
|
|
56
|
+
|
|
57
|
+
<block type="task" id="p0.5-detect-ide" action="detect-ide-directory" desc="检测 IDE 目录">
|
|
58
|
+
<field name="priority-order">.qoder,.cursor,.claude,.speccrew</field>
|
|
59
|
+
<output name="ide_dir" as="ide_dir"/>
|
|
60
|
+
<output name="ide_skills_dir" as="ide_skills_dir"/>
|
|
61
|
+
</block>
|
|
62
|
+
|
|
63
|
+
<block type="gateway" id="p0.5-verify-skills-dir" desc="验证技能目录存在">
|
|
64
|
+
<condition expression="ide_skills_dir != null">
|
|
65
|
+
<when true="proceed" false="abort"/>
|
|
66
|
+
</condition>
|
|
67
|
+
<event type="on-false" action="log">
|
|
68
|
+
<message>❌ IDE Skills Directory Not Found. Checked: .qoder/skills, .cursor/skills, .claude/skills, .speccrew/skills</message>
|
|
69
|
+
</event>
|
|
70
|
+
</block>
|
|
71
|
+
|
|
72
|
+
<block type="task" id="p0.5-verify-test-skills" action="verify-skills" desc="验证测试技能可用性">
|
|
73
|
+
<field name="skills-dir">${ide_skills_dir}</field>
|
|
74
|
+
<field name="required-skills">speccrew-test-case-design,speccrew-test-code-gen,speccrew-test-runner,speccrew-test-reporter</field>
|
|
75
|
+
</block>
|
|
76
|
+
|
|
77
|
+
</sequence>
|
|
78
|
+
|
|
79
|
+
<!-- ==================== PHASE 1: PREPARATION ==================== -->
|
|
80
|
+
<sequence id="phase-1-preparation">
|
|
81
|
+
|
|
82
|
+
<!-- 1.1 Identify Iteration Path -->
|
|
83
|
+
<block type="task" id="p1-1-identify-iteration" action="read-file" desc="识别迭代目录结构">
|
|
84
|
+
<field name="path">${iteration_dir}</field>
|
|
85
|
+
<output name="iteration_name" as="iteration_name"/>
|
|
86
|
+
</block>
|
|
87
|
+
|
|
88
|
+
<!-- 1.2 Identify Input Documents -->
|
|
89
|
+
<block type="task" id="p1-2-locate-feature-specs" action="read-file" desc="定位功能规格文档">
|
|
90
|
+
<field name="path">${iteration_dir}/02.feature-design/</field>
|
|
91
|
+
<output name="feature_spec_paths" as="feature_spec_paths"/>
|
|
92
|
+
<output name="api_contract_paths" as="api_contract_paths"/>
|
|
93
|
+
</block>
|
|
94
|
+
|
|
95
|
+
<block type="task" id="p1-2-locate-system-design" action="read-file" desc="定位系统设计文档">
|
|
96
|
+
<field name="path">${iteration_dir}/03.system-design/</field>
|
|
97
|
+
<output name="design_overview_path" as="design_overview_path"/>
|
|
98
|
+
<output name="platform_design_paths" as="platform_design_paths"/>
|
|
99
|
+
</block>
|
|
100
|
+
|
|
101
|
+
<!-- 1.3 Check Existing Test Artifacts -->
|
|
102
|
+
<block type="task" id="p1-3-check-artifacts" action="read-file" desc="检查现有测试制品">
|
|
103
|
+
<field name="path">${iteration_dir}/06.system-test/</field>
|
|
104
|
+
<output name="existing_artifacts" as="existing_artifacts"/>
|
|
105
|
+
</block>
|
|
106
|
+
|
|
107
|
+
<!-- Determine Platform Count -->
|
|
108
|
+
<block type="task" id="p1-4-count-platforms" action="determine-platform-count" desc="确定平台数量">
|
|
109
|
+
<field name="design-overview">${design_overview_path}</field>
|
|
110
|
+
<output name="platform_count" as="platform_count"/>
|
|
111
|
+
<output name="platform_list" as="platform_list"/>
|
|
112
|
+
</block>
|
|
113
|
+
|
|
114
|
+
</sequence>
|
|
115
|
+
|
|
116
|
+
<!-- ==================== PHASE 2: KNOWLEDGE LOADING ==================== -->
|
|
117
|
+
<sequence id="phase-2-knowledge-loading">
|
|
118
|
+
|
|
119
|
+
<block type="task" id="p2-load-feature-specs" action="read-file" desc="加载功能规格文档">
|
|
120
|
+
<field name="paths">${feature_spec_paths}</field>
|
|
121
|
+
</block>
|
|
122
|
+
|
|
123
|
+
<block type="task" id="p2-load-api-contracts" action="read-file" desc="加载 API 契约文档">
|
|
124
|
+
<field name="paths">${api_contract_paths}</field>
|
|
125
|
+
</block>
|
|
126
|
+
|
|
127
|
+
<block type="task" id="p2-load-system-design" action="read-file" desc="加载系统设计文档">
|
|
128
|
+
<field name="path">${design_overview_path}</field>
|
|
129
|
+
</block>
|
|
130
|
+
|
|
131
|
+
<block type="task" id="p2-load-techs-knowledge" action="read-file" desc="加载测试技术知识">
|
|
132
|
+
<field name="paths">${techs_convention_paths}</field>
|
|
133
|
+
</block>
|
|
134
|
+
|
|
135
|
+
</sequence>
|
|
136
|
+
|
|
137
|
+
<!-- ==================== PHASE 3: TEST CASE DESIGN ==================== -->
|
|
138
|
+
<sequence id="phase-3-test-case-design">
|
|
139
|
+
|
|
140
|
+
<!-- Execution Mode Decision -->
|
|
141
|
+
<block type="gateway" id="p3-mode-decision" desc="执行模式决策">
|
|
142
|
+
<condition expression="platform_count == 1">
|
|
143
|
+
<when true="single-platform" false="multi-platform"/>
|
|
144
|
+
</condition>
|
|
145
|
+
</block>
|
|
146
|
+
|
|
147
|
+
<!-- Single Platform Execution -->
|
|
148
|
+
<block type="task" id="p3-single-platform" action="run-skill" desc="单平台测试用例设计">
|
|
149
|
+
<field name="skill">speccrew-test-case-design</field>
|
|
150
|
+
<param name="feature_spec_path">${feature_spec_paths[0]}</param>
|
|
151
|
+
<param name="api_contract_path">${api_contract_paths[0]}</param>
|
|
152
|
+
<param name="system_design_path">${platform_design_paths[0]}</param>
|
|
153
|
+
<param name="output_path">${iteration_dir}/06.system-test/cases/</param>
|
|
154
|
+
</block>
|
|
155
|
+
|
|
156
|
+
<!-- Multi-Platform Parallel Execution -->
|
|
157
|
+
<block type="loop" id="p3-multi-platform-loop" desc="多平台测试用例设计循环">
|
|
158
|
+
<field name="items">${platform_list}</field>
|
|
159
|
+
<field name="max-concurrent">6</field>
|
|
160
|
+
<block type="task" action="dispatch-to-worker" desc="调度 Worker 执行测试用例设计">
|
|
161
|
+
<field name="worker">speccrew-task-worker</field>
|
|
162
|
+
<field name="skill">speccrew-test-case-design</field>
|
|
163
|
+
<param name="feature_spec_path">${master_feature_spec_path}</param>
|
|
164
|
+
<param name="api_contract_path">${platform.api_contract_path}</param>
|
|
165
|
+
<param name="system_design_path">${platform.design_path}</param>
|
|
166
|
+
<param name="platform_id">${platform.id}</param>
|
|
167
|
+
<param name="output_path">${iteration_dir}/06.system-test/cases/${platform.id}/</param>
|
|
168
|
+
<param name="task_id">test-case-${platform.id}</param>
|
|
169
|
+
</block>
|
|
170
|
+
</block>
|
|
171
|
+
|
|
172
|
+
<!-- Update Dispatch Progress -->
|
|
173
|
+
<block type="task" id="p3-update-dispatch-progress" action="run-script" desc="更新调度进度">
|
|
174
|
+
<field name="command">node ${update_progress_script} update-task --file ${iteration_dir}/06.system-test/DISPATCH-PROGRESS.json --task-id test-case-${platform_id} --status completed --output "${output_path}"</field>
|
|
175
|
+
</block>
|
|
176
|
+
|
|
177
|
+
<!-- Checkpoint A: Test Case Review -->
|
|
178
|
+
<block type="checkpoint" id="p3-checkpoint-a" desc="测试用例审查检查点">
|
|
179
|
+
<field name="title">📋 CHECKPOINT A: Test Case Coverage Review</field>
|
|
180
|
+
<field name="content">
|
|
181
|
+
Total test cases: ${total_test_cases}
|
|
182
|
+
Platforms covered: ${platform_count}
|
|
183
|
+
|
|
184
|
+
Coverage Statistics:
|
|
185
|
+
├── Functional coverage: ${functional_coverage}%
|
|
186
|
+
├── Exception handling: ${exception_coverage}%
|
|
187
|
+
├── Business rules: ${business_coverage}%
|
|
188
|
+
└── API contract: ${api_coverage}%
|
|
189
|
+
|
|
190
|
+
Traceability Matrix: See test-case-to-requirement mapping
|
|
191
|
+
</field>
|
|
192
|
+
</block>
|
|
193
|
+
|
|
194
|
+
<block type="task" id="p3-confirm-checkpoint-a" action="confirm" desc="用户确认测试用例覆盖度">
|
|
195
|
+
<field name="prompt">测试用例设计完成,是否确认覆盖度满足要求?</field>
|
|
196
|
+
<field name="options">确认,Yes,Proceed|需要修改,Need changes</field>
|
|
197
|
+
<output name="checkpoint_a_response" as="checkpoint_a_response"/>
|
|
198
|
+
</block>
|
|
199
|
+
|
|
200
|
+
<block type="gateway" id="p3-checkpoint-a-gate" desc="Checkpoint A 确认门禁">
|
|
201
|
+
<condition expression="checkpoint_a_response == 'confirmed'">
|
|
202
|
+
<when true="proceed" false="revise"/>
|
|
203
|
+
</condition>
|
|
204
|
+
</block>
|
|
205
|
+
|
|
206
|
+
<block type="task" id="p3-write-checkpoint-a" action="run-script" desc="写入 Checkpoint A">
|
|
207
|
+
<field name="command">node ${update_progress_script} write-checkpoint --file ${iteration_dir}/06.system-test/.checkpoints.json --stage 06_system_test --checkpoint test_case_coverage --passed true --description "Test case coverage review (Checkpoint A)"</field>
|
|
208
|
+
</block>
|
|
209
|
+
|
|
210
|
+
</sequence>
|
|
211
|
+
|
|
212
|
+
<!-- ==================== PHASE 4: TEST CODE GENERATION ==================== -->
|
|
213
|
+
<sequence id="phase-4-test-code-gen">
|
|
214
|
+
|
|
215
|
+
<!-- Execution Mode Decision -->
|
|
216
|
+
<block type="gateway" id="p4-mode-decision" desc="执行模式决策">
|
|
217
|
+
<condition expression="platform_count == 1">
|
|
218
|
+
<when true="single-platform" false="multi-platform"/>
|
|
219
|
+
</condition>
|
|
220
|
+
</block>
|
|
221
|
+
|
|
222
|
+
<!-- Single Platform Execution -->
|
|
223
|
+
<block type="task" id="p4-single-platform" action="run-skill" desc="单平台测试代码生成">
|
|
224
|
+
<field name="skill">speccrew-test-code-gen</field>
|
|
225
|
+
<param name="test_cases_path">${test_cases_path}</param>
|
|
226
|
+
<param name="system_design_path">${platform_design_paths[0]}</param>
|
|
227
|
+
<param name="platform_id">${platform_list[0]}</param>
|
|
228
|
+
<param name="output_dir">${iteration_dir}/06.system-test/code/</param>
|
|
229
|
+
</block>
|
|
230
|
+
|
|
231
|
+
<!-- Multi-Platform Parallel Execution -->
|
|
232
|
+
<block type="loop" id="p4-multi-platform-loop" desc="多平台测试代码生成循环">
|
|
233
|
+
<field name="items">${platform_list}</field>
|
|
234
|
+
<field name="max-concurrent">6</field>
|
|
235
|
+
<block type="task" action="dispatch-to-worker" desc="调度 Worker 执行测试代码生成">
|
|
236
|
+
<field name="worker">speccrew-task-worker</field>
|
|
237
|
+
<field name="skill">speccrew-test-code-gen</field>
|
|
238
|
+
<param name="test_cases_path">${platform.test_cases_path}</param>
|
|
239
|
+
<param name="system_design_path">${platform.design_path}</param>
|
|
240
|
+
<param name="platform_id">${platform.id}</param>
|
|
241
|
+
<param name="output_dir">${iteration_dir}/06.system-test/code/${platform.id}/</param>
|
|
242
|
+
<param name="task_id">test-code-${platform.id}</param>
|
|
243
|
+
</block>
|
|
244
|
+
</block>
|
|
245
|
+
|
|
246
|
+
<!-- Review Verification (MANDATORY) -->
|
|
247
|
+
<block type="task" id="p4-review-code" action="dispatch-to-worker" desc="代码审查验证">
|
|
248
|
+
<field name="worker">speccrew-task-worker</field>
|
|
249
|
+
<field name="skill">speccrew-code-review</field>
|
|
250
|
+
<param name="test_cases_path">${test_cases_path}</param>
|
|
251
|
+
<param name="test_code_path">${test_code_path}</param>
|
|
252
|
+
<param name="platform_id">${platform_id}</param>
|
|
253
|
+
<param name="task_id">review-test-code-${platform_id}</param>
|
|
254
|
+
</block>
|
|
255
|
+
|
|
256
|
+
<!-- Checkpoint B: Code Review -->
|
|
257
|
+
<block type="checkpoint" id="p4-checkpoint-b" desc="测试代码审查检查点">
|
|
258
|
+
<field name="title">📋 CHECKPOINT B: Test Code Review</field>
|
|
259
|
+
<field name="content">
|
|
260
|
+
Generated Test Files: ${test_file_count}
|
|
261
|
+
|
|
262
|
+
File to Test Case Mapping:
|
|
263
|
+
${file_mapping_summary}
|
|
264
|
+
|
|
265
|
+
Test Code Statistics:
|
|
266
|
+
├── Total test functions: ${test_function_count}
|
|
267
|
+
├── Coverage estimation: ${coverage_estimation}%
|
|
268
|
+
└── Framework compliance: ${framework_compliance}
|
|
269
|
+
</field>
|
|
270
|
+
</block>
|
|
271
|
+
|
|
272
|
+
<block type="task" id="p4-confirm-checkpoint-b" action="confirm" desc="用户确认测试代码质量">
|
|
273
|
+
<field name="prompt">测试代码生成完成,是否确认代码质量满足要求?</field>
|
|
274
|
+
<field name="options">确认,Yes,Proceed|需要修改,Need changes</field>
|
|
275
|
+
<output name="checkpoint_b_response" as="checkpoint_b_response"/>
|
|
276
|
+
</block>
|
|
277
|
+
|
|
278
|
+
<block type="gateway" id="p4-checkpoint-b-gate" desc="Checkpoint B 确认门禁">
|
|
279
|
+
<condition expression="checkpoint_b_response == 'confirmed'">
|
|
280
|
+
<when true="proceed" false="revise"/>
|
|
281
|
+
</condition>
|
|
282
|
+
</block>
|
|
283
|
+
|
|
284
|
+
<block type="task" id="p4-write-checkpoint-b" action="run-script" desc="写入 Checkpoint B">
|
|
285
|
+
<field name="command">node ${update_progress_script} write-checkpoint --file ${iteration_dir}/06.system-test/.checkpoints.json --stage 06_system_test --checkpoint test_code_review --passed true --description "Test code generation review (Checkpoint B)"</field>
|
|
286
|
+
</block>
|
|
287
|
+
|
|
288
|
+
</sequence>
|
|
289
|
+
|
|
290
|
+
<!-- ==================== PHASE 5: TEST EXECUTION & BUG REPORTING ==================== -->
|
|
291
|
+
<sequence id="phase-5-test-execution">
|
|
292
|
+
|
|
293
|
+
<!-- Stage 1: Test Runner -->
|
|
294
|
+
<block type="gateway" id="p5-runner-mode-decision" desc="执行模式决策">
|
|
295
|
+
<condition expression="platform_count == 1">
|
|
296
|
+
<when true="single-platform" false="multi-platform"/>
|
|
297
|
+
</condition>
|
|
298
|
+
</block>
|
|
299
|
+
|
|
300
|
+
<!-- Single Platform Test Runner -->
|
|
301
|
+
<block type="task" id="p5-single-platform-runner" action="run-skill" desc="单平台测试执行">
|
|
302
|
+
<field name="skill">speccrew-test-runner</field>
|
|
303
|
+
<param name="test_code_plan_path">${test_code_plan_path}</param>
|
|
304
|
+
<param name="test_cases_path">${test_cases_path}</param>
|
|
305
|
+
<param name="platform_id">${platform_list[0]}</param>
|
|
306
|
+
<param name="output_dir">${iteration_dir}/06.system-test/results/</param>
|
|
307
|
+
</block>
|
|
308
|
+
|
|
309
|
+
<!-- Multi-Platform Test Runner -->
|
|
310
|
+
<block type="loop" id="p5-multi-platform-runner-loop" desc="多平台测试执行循环">
|
|
311
|
+
<field name="items">${platform_list}</field>
|
|
312
|
+
<field name="max-concurrent">6</field>
|
|
313
|
+
<block type="task" action="dispatch-to-worker" desc="调度 Worker 执行测试">
|
|
314
|
+
<field name="worker">speccrew-task-worker</field>
|
|
315
|
+
<field name="skill">speccrew-test-runner</field>
|
|
316
|
+
<param name="test_code_plan_path">${platform.test_code_plan_path}</param>
|
|
317
|
+
<param name="test_cases_path">${platform.test_cases_path}</param>
|
|
318
|
+
<param name="platform_id">${platform.id}</param>
|
|
319
|
+
<param name="output_dir">${iteration_dir}/06.system-test/results/${platform.id}/</param>
|
|
320
|
+
<param name="task_id">test-run-${platform.id}</param>
|
|
321
|
+
</block>
|
|
322
|
+
</block>
|
|
323
|
+
|
|
324
|
+
<!-- Stage 2: Test Reporter -->
|
|
325
|
+
<block type="gateway" id="p5-reporter-mode-decision" desc="执行模式决策">
|
|
326
|
+
<condition expression="platform_count == 1">
|
|
327
|
+
<when true="single-platform" false="multi-platform"/>
|
|
328
|
+
</condition>
|
|
329
|
+
</block>
|
|
330
|
+
|
|
331
|
+
<!-- Single Platform Test Reporter -->
|
|
332
|
+
<block type="task" id="p5-single-platform-reporter" action="run-skill" desc="单平台测试报告">
|
|
333
|
+
<field name="skill">speccrew-test-reporter</field>
|
|
334
|
+
<param name="execution_results_path">${execution_results_path}</param>
|
|
335
|
+
<param name="test_cases_path">${test_cases_path}</param>
|
|
336
|
+
<param name="platform_id">${platform_list[0]}</param>
|
|
337
|
+
<param name="output_dir">${iteration_dir}/06.system-test/reports/</param>
|
|
338
|
+
</block>
|
|
339
|
+
|
|
340
|
+
<!-- Multi-Platform Test Reporter -->
|
|
341
|
+
<block type="loop" id="p5-multi-platform-reporter-loop" desc="多平台测试报告循环">
|
|
342
|
+
<field name="items">${platform_list}</field>
|
|
343
|
+
<field name="max-concurrent">6</field>
|
|
344
|
+
<block type="task" action="dispatch-to-worker" desc="调度 Worker 生成测试报告">
|
|
345
|
+
<field name="worker">speccrew-task-worker</field>
|
|
346
|
+
<field name="skill">speccrew-test-reporter</field>
|
|
347
|
+
<param name="execution_results_path">${platform.execution_results_path}</param>
|
|
348
|
+
<param name="test_cases_path">${platform.test_cases_path}</param>
|
|
349
|
+
<param name="platform_id">${platform.id}</param>
|
|
350
|
+
<param name="output_dir">${iteration_dir}/06.system-test/reports/</param>
|
|
351
|
+
<param name="task_id">test-report-${platform.id}</param>
|
|
352
|
+
</block>
|
|
353
|
+
</block>
|
|
354
|
+
|
|
355
|
+
</sequence>
|
|
356
|
+
|
|
357
|
+
<!-- ==================== PHASE 6: DELIVERY SUMMARY ==================== -->
|
|
358
|
+
<sequence id="phase-6-delivery-summary">
|
|
359
|
+
|
|
360
|
+
<block type="checkpoint" id="p6-delivery-report" desc="交付总结报告">
|
|
361
|
+
<field name="title">📋 Test Stage Delivery Report</field>
|
|
362
|
+
<field name="content">
|
|
363
|
+
Results:
|
|
364
|
+
├── Test Cases Designed: ${test_cases_designed}
|
|
365
|
+
├── Test Code Generated: ${test_code_files} files
|
|
366
|
+
├── Tests Executed: ${tests_passed}/${tests_total} passed
|
|
367
|
+
├── Bug Reports: ${critical}/${high}/${medium}/${low}
|
|
368
|
+
├── Coverage: ${coverage}%
|
|
369
|
+
└── Overall Status: ${overall_status}
|
|
370
|
+
|
|
371
|
+
Test Report: ${test_report_path}
|
|
372
|
+
|
|
373
|
+
Next Phase Recommendation: ${recommendation}
|
|
374
|
+
</field>
|
|
375
|
+
</block>
|
|
376
|
+
|
|
377
|
+
<block type="task" id="p6-confirm" action="confirm" desc="用户确认交付">
|
|
378
|
+
<field name="prompt">测试阶段已完成,请审查测试报告。确认无误后将更新工作流状态。</field>
|
|
379
|
+
<field name="options">确认,OK|需要修改,Need changes|取消,Cancel</field>
|
|
380
|
+
<output name="user_response" as="user_response"/>
|
|
381
|
+
</block>
|
|
382
|
+
|
|
383
|
+
<block type="gateway" id="p6-response-gate" desc="处理用户响应">
|
|
384
|
+
<condition expression="user_response == 'confirmed'">
|
|
385
|
+
<when true="finalize" false="abort"/>
|
|
386
|
+
</condition>
|
|
387
|
+
<event type="on-false" action="log">
|
|
388
|
+
<message>❌ User requested changes. Please specify issues found.</message>
|
|
389
|
+
</event>
|
|
390
|
+
</block>
|
|
391
|
+
|
|
392
|
+
<!-- Finalize -->
|
|
393
|
+
<block type="task" id="p6-finalize-checkpoint" action="run-script" desc="写入最终检查点">
|
|
394
|
+
<field name="command">node ${update_progress_script} write-checkpoint --file ${iteration_dir}/06.system-test/.checkpoints.json --stage 06_system_test --checkpoint test_execution_report --passed true --description "Test execution final report"</field>
|
|
395
|
+
</block>
|
|
396
|
+
|
|
397
|
+
<block type="task" id="p6-finalize-progress" action="run-script" desc="更新工作流进度">
|
|
398
|
+
<field name="command">node ${update_progress_script} update-workflow --file ${workspace_path}/WORKFLOW-PROGRESS.json --stage 06_system_test --status confirmed --output "06.system-test/cases/,06.system-test/code/,06.system-test/reports/,06.system-test/bugs/"</field>
|
|
399
|
+
</block>
|
|
400
|
+
|
|
401
|
+
</sequence>
|
|
402
|
+
|
|
403
|
+
<!-- ==================== OUTPUT ==================== -->
|
|
404
|
+
<block type="output" id="output-result">
|
|
405
|
+
<field name="status">success</field>
|
|
406
|
+
<field name="test_cases_designed">${test_cases_designed}</field>
|
|
407
|
+
<field name="test_code_generated">${test_code_files}</field>
|
|
408
|
+
<field name="tests_passed">${tests_passed}</field>
|
|
409
|
+
<field name="tests_failed">${tests_failed}</field>
|
|
410
|
+
<field name="bug_reports">${bug_report_paths}</field>
|
|
411
|
+
<field name="output_files">${output_files}</field>
|
|
412
|
+
<field name="summary">✅ Test Stage Complete. All testing phases verified: Test Case Design, Test Code Generation, Test Execution. Bug reports generated.</field>
|
|
413
|
+
<field name="next_steps">${recommendation}</field>
|
|
414
|
+
</block>
|
|
415
|
+
|
|
416
|
+
<!-- ==================== RULES ==================== -->
|
|
417
|
+
<block type="rule" id="rule-stage-gate">
|
|
418
|
+
<condition>Deployment stage must be confirmed before starting system test</condition>
|
|
419
|
+
<enforcement>abort-on-failure</enforcement>
|
|
420
|
+
</block>
|
|
421
|
+
|
|
422
|
+
<block type="rule" id="rule-dispatch-or-direct">
|
|
423
|
+
<condition>1 platform → invoke skill directly. 2+ platforms → MUST dispatch speccrew-task-worker</condition>
|
|
424
|
+
<enforcement>strict</enforcement>
|
|
425
|
+
</block>
|
|
426
|
+
|
|
427
|
+
<block type="rule" id="rule-checkpoint-mandatory">
|
|
428
|
+
<condition>Each phase MUST have checkpoint with user confirmation before proceeding</condition>
|
|
429
|
+
<enforcement>strict</enforcement>
|
|
430
|
+
</block>
|
|
431
|
+
|
|
432
|
+
<block type="rule" id="rule-script-enforcement">
|
|
433
|
+
<condition>All checkpoint and progress updates MUST use update-progress.js script</condition>
|
|
434
|
+
<enforcement>strict</enforcement>
|
|
435
|
+
</block>
|
|
436
|
+
|
|
437
|
+
<block type="rule" id="rule-no-direct-artifacts">
|
|
438
|
+
<condition>DO NOT create test artifacts directly when 2+ platforms - always use skills via workers</condition>
|
|
439
|
+
<enforcement>strict</enforcement>
|
|
440
|
+
</block>
|
|
441
|
+
|
|
442
|
+
</workflow>
|