speccrew 0.7.16 â 0.7.17
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-product-manager.md +293 -1679
- package/.speccrew/skills/speccrew-pm-phase0-init/SKILL.md +76 -0
- package/.speccrew/skills/speccrew-pm-phase0-init/workflow.agentflow.xml +271 -0
- package/.speccrew/skills/speccrew-pm-phase1-knowledge-check/SKILL.md +95 -0
- package/.speccrew/skills/speccrew-pm-phase1-knowledge-check/workflow.agentflow.xml +440 -0
- package/.speccrew/skills/speccrew-pm-phase2-complexity-assess/SKILL.md +110 -0
- package/.speccrew/skills/speccrew-pm-phase2-complexity-assess/workflow.agentflow.xml +341 -0
- package/.speccrew/skills/speccrew-pm-phase5-subprd-dispatch/SKILL.md +94 -0
- package/.speccrew/skills/speccrew-pm-phase5-subprd-dispatch/workflow.agentflow.xml +447 -0
- package/.speccrew/skills/speccrew-pm-phase6-verify-confirm/SKILL.md +92 -0
- package/.speccrew/skills/speccrew-pm-phase6-verify-confirm/workflow.agentflow.xml +379 -0
- package/.speccrew/skills/speccrew-product-manager-orchestration/SKILL.md +71 -34
- package/.speccrew/skills/speccrew-product-manager-orchestration/workflow.agentflow.xml +196 -518
- package/package.json +1 -1
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<workflow id="pm-phase5-subprd-dispatch" status="pending" version="1.0" desc="PM Phase 5 Sub-PRD Batch Dispatch Pipeline">
|
|
3
|
+
|
|
4
|
+
<!-- ============================================================
|
|
5
|
+
Input Parameters Definition
|
|
6
|
+
============================================================ -->
|
|
7
|
+
<block type="input" id="I1" desc="PM Phase 5 Sub-PRD Dispatch Input Parameters">
|
|
8
|
+
<field name="prd_output" required="true" type="object" desc="Phase 4 PRD generation output containing master_prd_path, dispatch_plan_path, etc."/>
|
|
9
|
+
<field name="iteration_path" required="true" type="string" desc="Current iteration directory absolute path"/>
|
|
10
|
+
<field name="language" required="false" type="string" default="zh" desc="User language code"/>
|
|
11
|
+
<field name="workspace_path" required="true" type="string" desc="speccrew-workspace root directory absolute path"/>
|
|
12
|
+
<field name="update_progress_script" required="true" type="string" desc="update-progress.js script absolute path"/>
|
|
13
|
+
<field name="max_concurrent_workers" required="false" type="number" default="5" desc="Maximum parallel Worker count per batch"/>
|
|
14
|
+
</block>
|
|
15
|
+
|
|
16
|
+
<!-- ============================================================
|
|
17
|
+
Global Invocation Rules
|
|
18
|
+
============================================================ -->
|
|
19
|
+
<block type="rule" id="GLOBAL-R-INVOCATION" level="mandatory" desc="Invocation constraints - NEVER violate">
|
|
20
|
+
<field name="text">This skill MUST be loaded directly by PM Agent via Skill tool</field>
|
|
21
|
+
<field name="text">Worker Agents MUST NOT execute this dispatch skill - if loaded by a Worker, report error and abort</field>
|
|
22
|
+
<field name="text">Sub-PRD generation skill (speccrew-pm-sub-prd-generate) MUST be dispatched via speccrew-task-worker</field>
|
|
23
|
+
</block>
|
|
24
|
+
|
|
25
|
+
<!-- ============================================================
|
|
26
|
+
Global Worker Enforcement Rules
|
|
27
|
+
============================================================ -->
|
|
28
|
+
<block type="rule" id="GLOBAL-R1" level="mandatory" desc="Worker dispatch enforcement - NEVER violate">
|
|
29
|
+
<field name="text">ONE Worker per Module - NO EXCEPTIONS</field>
|
|
30
|
+
<field name="text">DO NOT generate Sub-PRDs yourself - dispatch speccrew-task-worker</field>
|
|
31
|
+
<field name="text">DO NOT invoke speccrew-pm-sub-prd-generate skill directly - ONLY via Worker</field>
|
|
32
|
+
<field name="text">Dispatch in batches of 5, wait for each batch to complete before next batch</field>
|
|
33
|
+
<field name="text">PM Agent is DISPATCHER, NOT WORKER - never generate Sub-PRD content as fallback</field>
|
|
34
|
+
</block>
|
|
35
|
+
|
|
36
|
+
<!-- ============================================================
|
|
37
|
+
Global Continuous Execution Rules
|
|
38
|
+
============================================================ -->
|
|
39
|
+
<block type="rule" id="GLOBAL-R2" level="forbidden" desc="Continuous execution constraints - NEVER violate">
|
|
40
|
+
<field name="text">DO NOT ask user "Should I continue?" between steps</field>
|
|
41
|
+
<field name="text">DO NOT offer options like "Full execution / Partial execution / Pause"</field>
|
|
42
|
+
<field name="text">DO NOT pause to list what you plan to do next - just do it</field>
|
|
43
|
+
<field name="text">DO NOT warn about "large number of modules" or "this may take a while"</field>
|
|
44
|
+
<field name="text">ONLY pause at explicit event blocks with action="user-confirm"</field>
|
|
45
|
+
</block>
|
|
46
|
+
|
|
47
|
+
<!-- ============================================================
|
|
48
|
+
Step 5.1: Read Dispatch Plan
|
|
49
|
+
============================================================ -->
|
|
50
|
+
<sequence id="S51" name="Step 5.1: Read Dispatch Plan" status="pending" desc="Read Sub-PRD dispatch plan from Master PRD output">
|
|
51
|
+
|
|
52
|
+
<block type="rule" id="S51-R1" level="mandatory" desc="Step 5.1 mandatory rules">
|
|
53
|
+
<field name="text">Dispatch plan comes from Phase 4 (speccrew-pm-requirement-analysis) Step 12c output</field>
|
|
54
|
+
<field name="text">Must validate dispatch_plan structure before proceeding</field>
|
|
55
|
+
</block>
|
|
56
|
+
|
|
57
|
+
<!-- Read dispatch plan JSON -->
|
|
58
|
+
<block type="task" id="S51-B1" action="read-json" status="pending" desc="Read dispatch plan from PRD output">
|
|
59
|
+
<field name="path" value="${prd_output.dispatch_plan_path}"/>
|
|
60
|
+
<field name="output" var="dispatch_plan"/>
|
|
61
|
+
</block>
|
|
62
|
+
|
|
63
|
+
<!-- Validate dispatch plan structure -->
|
|
64
|
+
<block type="gateway" id="S51-G1" mode="guard" test="${dispatch_plan.sub_prd_groups} != null AND ${dispatch_plan.sub_prd_groups.length} > 0" fail-action="stop" desc="Validate dispatch plan has modules">
|
|
65
|
+
<field name="message">Dispatch plan is empty or missing sub_prd_groups. Cannot proceed with Sub-PRD dispatch.</field>
|
|
66
|
+
</block>
|
|
67
|
+
|
|
68
|
+
<!-- Extract and log module list -->
|
|
69
|
+
<block type="task" id="S51-B2" action="set-context" status="pending" desc="Extract dispatch context variables">
|
|
70
|
+
<field name="feature_name" value="${dispatch_plan.feature_name}"/>
|
|
71
|
+
<field name="template_path" value="${dispatch_plan.template_path}"/>
|
|
72
|
+
<field name="master_prd_path" value="${dispatch_plan.master_prd_path}"/>
|
|
73
|
+
<field name="output_dir" value="${dispatch_plan.output_dir}"/>
|
|
74
|
+
<field name="clarification_file" value="${prd_output.clarification_file}"/>
|
|
75
|
+
<field name="module_design_file" value="${prd_output.module_design_file}"/>
|
|
76
|
+
<field name="sub_prd_groups" value="${dispatch_plan.sub_prd_groups}"/>
|
|
77
|
+
</block>
|
|
78
|
+
|
|
79
|
+
<block type="event" id="S51-E1" action="log" level="info" desc="Log dispatch plan summary">
|
|
80
|
+
<field name="message">ð Sub-PRD Dispatch Plan Loaded
|
|
81
|
+
âââ Feature Name: ${feature_name}
|
|
82
|
+
âââ Total Modules: ${sub_prd_groups.length}
|
|
83
|
+
âââ Master PRD: ${master_prd_path}
|
|
84
|
+
âââ Output Directory: ${output_dir}
|
|
85
|
+
âââ Template: ${template_path}</field>
|
|
86
|
+
</block>
|
|
87
|
+
</sequence>
|
|
88
|
+
|
|
89
|
+
<!-- ============================================================
|
|
90
|
+
Step 5.2: Initialize Dispatch Progress Tracking
|
|
91
|
+
============================================================ -->
|
|
92
|
+
<sequence id="S52" name="Step 5.2: Initialize Dispatch Progress Tracking" status="pending" desc="Initialize DISPATCH-PROGRESS.json for tracking">
|
|
93
|
+
|
|
94
|
+
<block type="rule" id="S52-R1" level="mandatory" desc="Step 5.2 mandatory rules">
|
|
95
|
+
<field name="text">DISPATCH-PROGRESS.json MUST be created by update-progress.js script ONLY</field>
|
|
96
|
+
<field name="text">DO NOT create DISPATCH-PROGRESS.json manually via create_file or PowerShell</field>
|
|
97
|
+
<field name="text">This step MUST complete before ANY Worker dispatch</field>
|
|
98
|
+
</block>
|
|
99
|
+
|
|
100
|
+
<!-- Prepare tasks array as temp file -->
|
|
101
|
+
<block type="task" id="S52-B1" action="run-script" status="pending" desc="Create tasks temp file for initialization">
|
|
102
|
+
<field name="command">node -e "const fs=require('fs'); const tasks=${sub_prd_groups}.map(g=>({id:g.module_key,name:g.module_name,status:'pending',output_file:'${output_dir}/${feature_name}-sub-'+g.module_key+'.md'})); fs.writeFileSync('${iteration_path}/01.product-requirement/.tasks-temp.json', JSON.stringify(tasks,null,2)); console.log('Tasks file created with '+tasks.length+' entries');"</field>
|
|
103
|
+
</block>
|
|
104
|
+
|
|
105
|
+
<!-- Initialize DISPATCH-PROGRESS.json via script -->
|
|
106
|
+
<block type="task" id="S52-B2" action="run-script" status="pending" desc="Initialize DISPATCH-PROGRESS.json via script">
|
|
107
|
+
<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>
|
|
108
|
+
<field name="output" var="init_result"/>
|
|
109
|
+
</block>
|
|
110
|
+
|
|
111
|
+
<!-- Verify initialization -->
|
|
112
|
+
<block type="task" id="S52-B3" action="run-script" status="pending" desc="Verify DISPATCH-PROGRESS.json initialization">
|
|
113
|
+
<field name="command">node "${update_progress_script}" read --file "${iteration_path}/01.product-requirement/DISPATCH-PROGRESS.json" --summary</field>
|
|
114
|
+
<field name="output" var="init_progress"/>
|
|
115
|
+
</block>
|
|
116
|
+
|
|
117
|
+
<!-- Guard: Verify init succeeded -->
|
|
118
|
+
<block type="gateway" id="S52-G1" mode="guard" test="${init_progress.counts.pending} == ${sub_prd_groups.length}" fail-action="stop" desc="Verify initialization created correct task count">
|
|
119
|
+
<field name="message">DISPATCH-PROGRESS.json initialization failed. Expected ${sub_prd_groups.length} pending tasks but got ${init_progress.counts.pending}. STOP workflow and investigate.</field>
|
|
120
|
+
</block>
|
|
121
|
+
|
|
122
|
+
<!-- Cleanup temp file -->
|
|
123
|
+
<block type="task" id="S52-B4" action="run-script" status="pending" desc="Cleanup temp tasks file">
|
|
124
|
+
<field name="command">Remove-Item "${iteration_path}/01.product-requirement/.tasks-temp.json" -ErrorAction SilentlyContinue</field>
|
|
125
|
+
</block>
|
|
126
|
+
|
|
127
|
+
<block type="event" id="S52-E1" action="log" level="info" desc="Log initialization success">
|
|
128
|
+
<field name="message">â
DISPATCH-PROGRESS.json initialized: Total ${init_progress.total} tasks | Pending: ${init_progress.counts.pending}</field>
|
|
129
|
+
</block>
|
|
130
|
+
</sequence>
|
|
131
|
+
|
|
132
|
+
<!-- ============================================================
|
|
133
|
+
Step 5.3: Batch Dispatch Workers
|
|
134
|
+
============================================================ -->
|
|
135
|
+
<sequence id="S53" name="Step 5.3: Batch Dispatch Workers" status="pending" desc="Dispatch Workers for Sub-PRD generation in batches">
|
|
136
|
+
|
|
137
|
+
<block type="rule" id="S53-R1" level="mandatory" desc="Step 5.3 mandatory rules">
|
|
138
|
+
<field name="text">ALL Workers in the same batch MUST be dispatched IN PARALLEL - sequential dispatch is FORBIDDEN</field>
|
|
139
|
+
<field name="text">ALL Worker dispatch calls MUST be issued SIMULTANEOUSLY in a SINGLE orchestration turn</field>
|
|
140
|
+
<field name="text">DO NOT wait for any Worker to complete before dispatching the next Worker in the same batch</field>
|
|
141
|
+
<field name="text">Batch size is ${max_concurrent_workers} - DO NOT exceed</field>
|
|
142
|
+
<field name="text">Each Worker MUST receive complete context parameters</field>
|
|
143
|
+
</block>
|
|
144
|
+
|
|
145
|
+
<!-- Calculate batch plan -->
|
|
146
|
+
<block type="task" id="S53-B0" action="compute-batches" status="pending" desc="Calculate batch plan from modules">
|
|
147
|
+
<field name="items" value="${sub_prd_groups}"/>
|
|
148
|
+
<field name="batch_size" value="${max_concurrent_workers}"/>
|
|
149
|
+
<field name="output" var="batch_plan"/>
|
|
150
|
+
</block>
|
|
151
|
+
|
|
152
|
+
<block type="event" id="S53-E0" action="log" level="info" desc="Log batch plan">
|
|
153
|
+
<field name="message">ð Sub-PRD Dispatch Plan
|
|
154
|
+
âââ Total Modules: ${sub_prd_groups.length}
|
|
155
|
+
âââ Batch Size: ${max_concurrent_workers}
|
|
156
|
+
âââ Batches Required: ${batch_plan.batch_count}
|
|
157
|
+
â ${batch_plan.summary}
|
|
158
|
+
âââ Strategy: Parallel dispatch within batch, sequential between batches</field>
|
|
159
|
+
</block>
|
|
160
|
+
|
|
161
|
+
<!-- Batch Loop: Process all modules in batches -->
|
|
162
|
+
<block type="loop" id="S53-L-MAIN" over="${batch_plan.batches}" as="batch" desc="Process batches sequentially">
|
|
163
|
+
|
|
164
|
+
<block type="event" id="S53-E-BATCH" action="log" level="info" desc="Log batch start">
|
|
165
|
+
<field name="message">ðĶ Dispatching Batch ${batch.index} (${batch.modules.length} modules in parallel)
|
|
166
|
+
âââ ${batch.module_keys}
|
|
167
|
+
âââ Waiting for batch completion...</field>
|
|
168
|
+
</block>
|
|
169
|
+
|
|
170
|
+
<!-- Parallel dispatch for each module in current batch -->
|
|
171
|
+
<!-- PARALLEL EXECUTION MANDATORY: All Workers MUST be dispatched SIMULTANEOUSLY -->
|
|
172
|
+
<block type="loop" id="S53-L1" over="${batch.modules}" as="group" parallel="true" max-concurrency="${max_concurrent_workers}" desc="Dispatch Worker for each module IN PARALLEL">
|
|
173
|
+
|
|
174
|
+
<block type="task" id="S53-B1" action="dispatch-to-worker" status="pending" desc="Dispatch Sub-PRD generation Worker">
|
|
175
|
+
<field name="agent">speccrew-task-worker</field>
|
|
176
|
+
<field name="skill">speccrew-pm-sub-prd-generate</field>
|
|
177
|
+
<field name="context">
|
|
178
|
+
module_id: ${group.module_id}
|
|
179
|
+
module_name: ${group.module_name}
|
|
180
|
+
module_key: ${group.module_key}
|
|
181
|
+
module_scope: ${group.module_scope}
|
|
182
|
+
module_entities: ${group.module_entities}
|
|
183
|
+
module_user_stories: ${group.module_user_stories}
|
|
184
|
+
module_requirements: ${group.module_requirements}
|
|
185
|
+
module_features: ${group.module_features}
|
|
186
|
+
module_dependencies: ${group.module_dependencies}
|
|
187
|
+
master_prd_path: ${master_prd_path}
|
|
188
|
+
clarification_file: ${clarification_file}
|
|
189
|
+
module_design_file: ${module_design_file}
|
|
190
|
+
feature_name: ${feature_name}
|
|
191
|
+
template_path: ${template_path}
|
|
192
|
+
output_path: ${output_dir}/${feature_name}-sub-${group.module_key}.md
|
|
193
|
+
language: ${language}
|
|
194
|
+
iteration_path: ${iteration_path}
|
|
195
|
+
workspace_path: ${workspace_path}
|
|
196
|
+
</field>
|
|
197
|
+
<field name="output" var="worker_result_${group.module_key}"/>
|
|
198
|
+
</block>
|
|
199
|
+
|
|
200
|
+
<!-- Update progress after each worker completes -->
|
|
201
|
+
<block type="task" id="S53-B2" action="run-script" status="pending" desc="Update task progress after worker completes">
|
|
202
|
+
<field name="command">node "${update_progress_script}" update-task --file "${iteration_path}/01.product-requirement/DISPATCH-PROGRESS.json" --task-id "${group.module_key}" --status ${worker_result_${group.module_key}.status}</field>
|
|
203
|
+
</block>
|
|
204
|
+
</block>
|
|
205
|
+
|
|
206
|
+
<!-- Log batch completion -->
|
|
207
|
+
<block type="task" id="S53-B3" action="run-script" status="pending" desc="Read current progress after batch">
|
|
208
|
+
<field name="command">node "${update_progress_script}" read --file "${iteration_path}/01.product-requirement/DISPATCH-PROGRESS.json" --summary</field>
|
|
209
|
+
<field name="output" var="batch_progress"/>
|
|
210
|
+
</block>
|
|
211
|
+
|
|
212
|
+
<block type="event" id="S53-E-BATCH-END" action="log" level="info" desc="Log batch completion">
|
|
213
|
+
<field name="message">â
Batch ${batch.index} Complete
|
|
214
|
+
âââ Progress: ${batch_progress.counts.completed}/${sub_prd_groups.length} completed
|
|
215
|
+
âââ Failed: ${batch_progress.counts.failed}
|
|
216
|
+
âââ Remaining: ${batch_progress.counts.pending}</field>
|
|
217
|
+
</block>
|
|
218
|
+
</block>
|
|
219
|
+
</sequence>
|
|
220
|
+
|
|
221
|
+
<!-- ============================================================
|
|
222
|
+
Step 5.4: Handle Failures & Retry
|
|
223
|
+
============================================================ -->
|
|
224
|
+
<sequence id="S54" name="Step 5.4: Handle Failures & Retry" status="pending" desc="Retry failed tasks once">
|
|
225
|
+
|
|
226
|
+
<block type="rule" id="S54-R1" level="mandatory" desc="Step 5.4 mandatory rules">
|
|
227
|
+
<field name="text">Single retry only - DO NOT retry more than once</field>
|
|
228
|
+
<field name="text">After retry, report remaining failures to user for manual intervention</field>
|
|
229
|
+
</block>
|
|
230
|
+
|
|
231
|
+
<!-- Check for failed tasks -->
|
|
232
|
+
<block type="task" id="S54-B1" action="run-script" status="pending" desc="Read progress to check for failures">
|
|
233
|
+
<field name="command">node "${update_progress_script}" read --file "${iteration_path}/01.product-requirement/DISPATCH-PROGRESS.json"</field>
|
|
234
|
+
<field name="output" var="pre_retry_progress"/>
|
|
235
|
+
</block>
|
|
236
|
+
|
|
237
|
+
<block type="gateway" id="S54-G1" mode="exclusive" desc="Check if there are failed tasks">
|
|
238
|
+
|
|
239
|
+
<branch test="${pre_retry_progress.counts.failed} > 0" name="Has Failures - Retry">
|
|
240
|
+
|
|
241
|
+
<block type="event" id="S54-E1" action="log" level="warn" desc="Report failed modules">
|
|
242
|
+
<field name="message">â ïļ Failed modules detected: ${pre_retry_progress.failed_tasks}
|
|
243
|
+
âââ Retrying ${pre_retry_progress.counts.failed} failed modules...
|
|
244
|
+
âââ Max retries: 1</field>
|
|
245
|
+
</block>
|
|
246
|
+
|
|
247
|
+
<!-- Extract failed groups for retry -->
|
|
248
|
+
<block type="task" id="S54-B2" action="filter-items" status="pending" desc="Get failed module groups for retry">
|
|
249
|
+
<field name="source" value="${sub_prd_groups}"/>
|
|
250
|
+
<field name="filter" value="${pre_retry_progress.failed_task_ids}"/>
|
|
251
|
+
<field name="output" var="retry_groups"/>
|
|
252
|
+
</block>
|
|
253
|
+
|
|
254
|
+
<!-- Retry dispatch for failed modules -->
|
|
255
|
+
<block type="loop" id="S54-L1" over="${retry_groups}" as="group" parallel="true" max-concurrency="${max_concurrent_workers}" desc="Retry failed modules">
|
|
256
|
+
|
|
257
|
+
<block type="task" id="S54-B3" action="dispatch-to-worker" status="pending" desc="Retry Sub-PRD generation Worker">
|
|
258
|
+
<field name="agent">speccrew-task-worker</field>
|
|
259
|
+
<field name="skill">speccrew-pm-sub-prd-generate</field>
|
|
260
|
+
<field name="context">
|
|
261
|
+
module_id: ${group.module_id}
|
|
262
|
+
module_name: ${group.module_name}
|
|
263
|
+
module_key: ${group.module_key}
|
|
264
|
+
module_scope: ${group.module_scope}
|
|
265
|
+
module_entities: ${group.module_entities}
|
|
266
|
+
module_user_stories: ${group.module_user_stories}
|
|
267
|
+
module_requirements: ${group.module_requirements}
|
|
268
|
+
module_features: ${group.module_features}
|
|
269
|
+
module_dependencies: ${group.module_dependencies}
|
|
270
|
+
master_prd_path: ${master_prd_path}
|
|
271
|
+
clarification_file: ${clarification_file}
|
|
272
|
+
module_design_file: ${module_design_file}
|
|
273
|
+
feature_name: ${feature_name}
|
|
274
|
+
template_path: ${template_path}
|
|
275
|
+
output_path: ${output_dir}/${feature_name}-sub-${group.module_key}.md
|
|
276
|
+
language: ${language}
|
|
277
|
+
iteration_path: ${iteration_path}
|
|
278
|
+
workspace_path: ${workspace_path}
|
|
279
|
+
</field>
|
|
280
|
+
<field name="output" var="retry_result_${group.module_key}"/>
|
|
281
|
+
</block>
|
|
282
|
+
|
|
283
|
+
<!-- Update progress after retry -->
|
|
284
|
+
<block type="task" id="S54-B4" action="run-script" status="pending" desc="Update task progress after retry">
|
|
285
|
+
<field name="command">node "${update_progress_script}" update-task --file "${iteration_path}/01.product-requirement/DISPATCH-PROGRESS.json" --task-id "${group.module_key}" --status ${retry_result_${group.module_key}.status}</field>
|
|
286
|
+
</block>
|
|
287
|
+
</block>
|
|
288
|
+
|
|
289
|
+
<!-- Log retry results -->
|
|
290
|
+
<block type="task" id="S54-B5" action="run-script" status="pending" desc="Read progress after retry">
|
|
291
|
+
<field name="command">node "${update_progress_script}" read --file "${iteration_path}/01.product-requirement/DISPATCH-PROGRESS.json"</field>
|
|
292
|
+
<field name="output" var="post_retry_progress"/>
|
|
293
|
+
</block>
|
|
294
|
+
|
|
295
|
+
<block type="event" id="S54-E2" action="log" level="info" desc="Log retry summary">
|
|
296
|
+
<field name="message">ð Retry Summary
|
|
297
|
+
âââ Retried: ${pre_retry_progress.counts.failed} modules
|
|
298
|
+
âââ Recovered: ${pre_retry_progress.counts.failed - post_retry_progress.counts.failed}
|
|
299
|
+
âââ Still Failed: ${post_retry_progress.counts.failed}
|
|
300
|
+
âââ Final Status: ${post_retry_progress.counts.completed}/${sub_prd_groups.length} completed</field>
|
|
301
|
+
</block>
|
|
302
|
+
</branch>
|
|
303
|
+
|
|
304
|
+
<branch default="true" name="All Success - No Retry">
|
|
305
|
+
<block type="event" id="S54-E3" action="log" level="info" desc="Log no failures">
|
|
306
|
+
<field name="message">â
All modules completed successfully - no retry needed</field>
|
|
307
|
+
</block>
|
|
308
|
+
</branch>
|
|
309
|
+
</block>
|
|
310
|
+
</sequence>
|
|
311
|
+
|
|
312
|
+
<!-- ============================================================
|
|
313
|
+
Step 5.5: Collect Results & Verify
|
|
314
|
+
============================================================ -->
|
|
315
|
+
<sequence id="S55" name="Step 5.5: Collect Results & Verify" status="pending" desc="Collect and verify Sub-PRD generation results">
|
|
316
|
+
|
|
317
|
+
<block type="rule" id="S55-R1" level="mandatory" desc="Step 5.5 mandatory rules">
|
|
318
|
+
<field name="text">Must verify all Sub-PRD files exist and have valid size before proceeding to Phase 6</field>
|
|
319
|
+
<field name="text">Must update checkpoint after verification passes</field>
|
|
320
|
+
<field name="text">Must verify feature list completeness</field>
|
|
321
|
+
</block>
|
|
322
|
+
|
|
323
|
+
<!-- Step 5.5.1: Read Final Progress -->
|
|
324
|
+
<block type="task" id="S55-B1" action="run-script" status="pending" desc="Read final DISPATCH-PROGRESS.json">
|
|
325
|
+
<field name="command">node "${update_progress_script}" read --file "${iteration_path}/01.product-requirement/DISPATCH-PROGRESS.json"</field>
|
|
326
|
+
<field name="output" var="final_progress"/>
|
|
327
|
+
</block>
|
|
328
|
+
|
|
329
|
+
<!-- Step 5.5.2: Verify All Sub-PRD Files Exist -->
|
|
330
|
+
<block type="task" id="S55-B2" action="run-script" status="pending" desc="List all Sub-PRD files">
|
|
331
|
+
<field name="command">Get-ChildItem "${output_dir}" -Filter "*-sub-*.md" | Select-Object Name, Length</field>
|
|
332
|
+
<field name="output" var="sub_prd_files"/>
|
|
333
|
+
</block>
|
|
334
|
+
|
|
335
|
+
<!-- Validate file count and sizes -->
|
|
336
|
+
<block type="task" id="S55-B3" action="validate-files" status="pending" desc="Validate Sub-PRD files">
|
|
337
|
+
<field name="files" value="${sub_prd_files}"/>
|
|
338
|
+
<field name="expected_count" value="${final_progress.counts.completed}"/>
|
|
339
|
+
<field name="min_size" value="3072"/>
|
|
340
|
+
<field name="output" var="file_validation"/>
|
|
341
|
+
</block>
|
|
342
|
+
|
|
343
|
+
<!-- Step 5.5.3: Generate Summary Report -->
|
|
344
|
+
<block type="event" id="S55-E1" action="log" level="info" desc="Generate Sub-PRD generation summary">
|
|
345
|
+
<field name="message">ð Sub-PRD Generation Complete:
|
|
346
|
+
âââ Total Modules: ${sub_prd_groups.length}
|
|
347
|
+
âââ â
Completed: ${final_progress.counts.completed}
|
|
348
|
+
âââ â Failed: ${final_progress.counts.failed}
|
|
349
|
+
âââ Generated Files:
|
|
350
|
+
â ${sub_prd_files_summary}
|
|
351
|
+
âââ All Sub-PRDs ready for Phase 6 Verification</field>
|
|
352
|
+
</block>
|
|
353
|
+
|
|
354
|
+
<!-- Step 5.5.4: Update Checkpoint -->
|
|
355
|
+
<block type="task" id="S55-B4" action="run-script" status="pending" desc="Update checkpoint for Sub-PRD dispatch">
|
|
356
|
+
<field name="command">node "${update_progress_script}" write-checkpoint --file "${iteration_path}/01.product-requirement/.checkpoints.json" --checkpoint sub_prd_dispatch --status passed</field>
|
|
357
|
+
</block>
|
|
358
|
+
|
|
359
|
+
<!-- Step 5.5.5: Verify Feature List Completeness -->
|
|
360
|
+
<block type="task" id="S55-B5" action="run-script" status="pending" desc="Check feature list file exists">
|
|
361
|
+
<field name="command">Test-Path "${iteration_path}/01.product-requirement/.prd-feature-list.json"</field>
|
|
362
|
+
<field name="output" var="feature_list_exists"/>
|
|
363
|
+
</block>
|
|
364
|
+
|
|
365
|
+
<block type="gateway" id="S55-G1" mode="exclusive" desc="Check feature list status">
|
|
366
|
+
<branch test="${feature_list_exists} == true" name="Feature List Exists">
|
|
367
|
+
<block type="task" id="S55-B6" action="run-script" status="pending" desc="Read and validate feature list">
|
|
368
|
+
<field name="command">node -e "const fs=require('fs'); const data=JSON.parse(fs.readFileSync('${iteration_path}/01.product-requirement/.prd-feature-list.json','utf8')); console.log('Modules: '+data.modules.length+', Features: '+(data.total_features||'N/A'))"</field>
|
|
369
|
+
<field name="output" var="feature_list_info"/>
|
|
370
|
+
</block>
|
|
371
|
+
|
|
372
|
+
<block type="event" id="S55-E2" action="log" level="info" desc="Log feature list verification">
|
|
373
|
+
<field name="message">â
Feature list verification passed
|
|
374
|
+
âââ Modules: ${feature_list_info.modules}
|
|
375
|
+
âââ Total features: ${feature_list_info.features}
|
|
376
|
+
âââ Ready for Feature Design phase</field>
|
|
377
|
+
</block>
|
|
378
|
+
</branch>
|
|
379
|
+
|
|
380
|
+
<branch default="true" name="No Feature List">
|
|
381
|
+
<block type="event" id="S55-E3" action="log" level="warn" desc="Log missing feature list">
|
|
382
|
+
<field name="message">â ïļ WARNING: Feature list file not found at ${iteration_path}/01.product-requirement/.prd-feature-list.json
|
|
383
|
+
âââ Feature list will be needed by FD Agent for Feature Registry initialization
|
|
384
|
+
âââ Proceeding without feature list verification</field>
|
|
385
|
+
</block>
|
|
386
|
+
</branch>
|
|
387
|
+
</block>
|
|
388
|
+
|
|
389
|
+
<!-- Verification checklist -->
|
|
390
|
+
<block type="checkpoint" id="S55-CP1" name="sub_prd_verification" desc="Sub-PRD generation verification checkpoint">
|
|
391
|
+
<field name="required" value="true"/>
|
|
392
|
+
<field name="verify">
|
|
393
|
+
- [ ] All workers were dispatched via speccrew-task-worker (one Worker per module)
|
|
394
|
+
- [ ] No Sub-PRD was generated by PM Agent directly
|
|
395
|
+
- [ ] All workers completed (DISPATCH-PROGRESS.json counts.pending == 0)
|
|
396
|
+
- [ ] All Sub-PRD files exist and have valid size
|
|
397
|
+
- [ ] Checkpoint updated
|
|
398
|
+
</field>
|
|
399
|
+
</block>
|
|
400
|
+
</sequence>
|
|
401
|
+
|
|
402
|
+
<!-- ============================================================
|
|
403
|
+
Step 5.6: User Confirmation
|
|
404
|
+
============================================================ -->
|
|
405
|
+
<sequence id="S56" name="Step 5.6: User Confirmation" status="pending" desc="Wait for user confirmation before proceeding to Phase 6">
|
|
406
|
+
|
|
407
|
+
<block type="rule" id="S56-R1" level="mandatory" desc="Step 5.6 mandatory rules">
|
|
408
|
+
<field name="text">DO NOT proceed to Phase 6 without explicit user confirmation</field>
|
|
409
|
+
<field name="text">DO NOT auto-mark this step as confirmed</field>
|
|
410
|
+
<field name="text">Present complete summary to user for review</field>
|
|
411
|
+
</block>
|
|
412
|
+
|
|
413
|
+
<block type="event" id="S56-E1" action="user-confirm" desc="Present Sub-PRD generation results for user confirmation">
|
|
414
|
+
<field name="prompt">ð Sub-PRD Generation Complete
|
|
415
|
+
|
|
416
|
+
Please review the generated Sub-PRD documents:
|
|
417
|
+
- Total: ${final_progress.counts.completed} Sub-PRDs generated
|
|
418
|
+
- Failed: ${final_progress.counts.failed}
|
|
419
|
+
- Files: ${output_dir}
|
|
420
|
+
|
|
421
|
+
Reply "įĄŪčŪĪ" or "OK" to proceed to Phase 6 (Verification & Review).</field>
|
|
422
|
+
<field name="template">subprd-review-summary</field>
|
|
423
|
+
<field name="data">
|
|
424
|
+
{
|
|
425
|
+
"total_subprds": ${sub_prd_groups.length},
|
|
426
|
+
"success_count": ${final_progress.counts.completed},
|
|
427
|
+
"failure_count": ${final_progress.counts.failed},
|
|
428
|
+
"output_dir": "${output_dir}",
|
|
429
|
+
"sub_prd_files": ${sub_prd_files}
|
|
430
|
+
}</field>
|
|
431
|
+
</block>
|
|
432
|
+
</sequence>
|
|
433
|
+
|
|
434
|
+
<!-- ============================================================
|
|
435
|
+
Output Results
|
|
436
|
+
============================================================ -->
|
|
437
|
+
<block type="output" id="O1" desc="PM Phase 5 Sub-PRD Dispatch Results">
|
|
438
|
+
<field name="dispatch_result" from="${final_progress.status}" type="string" desc="success / partial / failed"/>
|
|
439
|
+
<field name="total_subprds" from="${sub_prd_groups.length}" type="number" desc="Total Sub-PRD count"/>
|
|
440
|
+
<field name="success_count" from="${final_progress.counts.completed}" type="number" desc="Successfully generated Sub-PRD count"/>
|
|
441
|
+
<field name="failure_count" from="${final_progress.counts.failed}" type="number" desc="Failed Sub-PRD count"/>
|
|
442
|
+
<field name="sub_prd_files" from="${sub_prd_files}" type="array" desc="Generated Sub-PRD file list"/>
|
|
443
|
+
<field name="feature_list_path" from="${iteration_path}/01.product-requirement/.prd-feature-list.json" type="string" desc="Feature list file path"/>
|
|
444
|
+
<field name="dispatch_progress_path" from="${iteration_path}/01.product-requirement/DISPATCH-PROGRESS.json" type="string" desc="Dispatch progress file path"/>
|
|
445
|
+
</block>
|
|
446
|
+
|
|
447
|
+
</workflow>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-pm-phase6-verify-confirm
|
|
3
|
+
description: SpecCrew PM Phase 6 Verification & Confirmation Skill. Performs file integrity validation, feature list completeness check, user review gate, and finalization. Mandatory user confirmation required before status updates.
|
|
4
|
+
tools: Read, Write, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill Overview
|
|
8
|
+
|
|
9
|
+
Phase 6 Verification & Confirmation with three-stage gated execution. Ensures all PRD artifacts are valid, complete, and user-confirmed before finalizing workflow status.
|
|
10
|
+
|
|
11
|
+
## Trigger Scenarios
|
|
12
|
+
|
|
13
|
+
- PRD generation completed (Phase 4/5 done)
|
|
14
|
+
- Sub-PRD dispatch completed (complex path)
|
|
15
|
+
- Verification checklist needed before user review
|
|
16
|
+
- Final status update after user confirmation
|
|
17
|
+
|
|
18
|
+
## Input Parameters
|
|
19
|
+
|
|
20
|
+
| Parameter | Type | Required | Description |
|
|
21
|
+
|-----------|------|----------|-------------|
|
|
22
|
+
| `iteration_path` | string | Yes | Path to iteration directory |
|
|
23
|
+
| `complexity` | enum | Yes | `simple` or `complex` |
|
|
24
|
+
| `prd_output` | object | Yes | PRD generation output containing file paths |
|
|
25
|
+
| `dispatch_plan` | object | No | Dispatch plan for complex path (module count reference) |
|
|
26
|
+
| `update_progress_script` | string | Yes | Path to update-progress.js script |
|
|
27
|
+
| `language` | string | No | User language (auto-detected) |
|
|
28
|
+
|
|
29
|
+
## Methodology Foundation
|
|
30
|
+
|
|
31
|
+
Applies three-stage gated verification:
|
|
32
|
+
- Stage 6.1: Automated file & content integrity validation
|
|
33
|
+
- Stage 6.2: Mandatory user review and explicit confirmation
|
|
34
|
+
- Stage 6.3: Finalization with status updates and cleanup
|
|
35
|
+
|
|
36
|
+
## PM Stage Content Boundary
|
|
37
|
+
|
|
38
|
+
> **DO NOT:** Update checkpoints before user confirmation, skip user review gate, auto-proceed without explicit "įĄŪčŪĪ" or "OK", modify PRD document status before confirmation.
|
|
39
|
+
|
|
40
|
+
## Templates Used
|
|
41
|
+
|
|
42
|
+
| Template | Path | Purpose |
|
|
43
|
+
|----------|------|---------|
|
|
44
|
+
| Verification Report | Inline | File integrity and feature completeness results |
|
|
45
|
+
| PRD Review Summary | Inline | User review presentation template |
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
# AgentFlow Definition
|
|
50
|
+
|
|
51
|
+
<!-- @agentflow: workflow.agentflow.xml -->
|
|
52
|
+
|
|
53
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
# Output Checklist
|
|
58
|
+
|
|
59
|
+
- [ ] Master PRD file verified (exists, size > 1KB)
|
|
60
|
+
- [ ] All Sub-PRD files verified (complex path)
|
|
61
|
+
- [ ] Sub-PRD count matches dispatch plan
|
|
62
|
+
- [ ] `.clarification-summary.md` exists
|
|
63
|
+
- [ ] `.module-design.md` exists (complex path)
|
|
64
|
+
- [ ] Feature list completeness verified
|
|
65
|
+
- [ ] User review gate executed
|
|
66
|
+
- [ ] Explicit user confirmation received
|
|
67
|
+
- [ ] Checkpoints updated via script
|
|
68
|
+
- [ ] WORKFLOW-PROGRESS.json updated to completed
|
|
69
|
+
- [ ] PRD document status updated to Confirmed
|
|
70
|
+
- [ ] Intermediate files cleaned up
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
# Constraints
|
|
75
|
+
|
|
76
|
+
**Must do:**
|
|
77
|
+
- Execute all verification steps in order: 6.1 â 6.2 â 6.3
|
|
78
|
+
- Wait for explicit user confirmation ("įĄŪčŪĪ" or "OK") before Phase 6.3
|
|
79
|
+
- Use `update-progress.js` for all JSON file updates
|
|
80
|
+
- Present complete verification summary to user
|
|
81
|
+
- Report all deliverables with file paths and sizes
|
|
82
|
+
- Clean up intermediate files after confirmation
|
|
83
|
+
|
|
84
|
+
**Must not do:**
|
|
85
|
+
- Update checkpoints (verification_checklist, prd_review) before user confirmation
|
|
86
|
+
- Update WORKFLOW-PROGRESS.json to completed before user confirmation
|
|
87
|
+
- Change PRD document status from Draft to Confirmed before user confirmation
|
|
88
|
+
- Generate completion report before user confirmation
|
|
89
|
+
- Suggest next phase before user confirmation
|
|
90
|
+
- Assume user silence means confirmation
|
|
91
|
+
- Proceed to Phase 6.3 without explicit user confirmation
|
|
92
|
+
- Delete PRD documents or clarification-related files
|