speccrew 0.7.15 → 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 +310 -1669
- 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-pm-requirement-clarify/SKILL.md +19 -2
- package/.speccrew/skills/speccrew-pm-requirement-clarify/templates/CLARIFICATION-QUESTIONS-TEMPLATE.md +49 -0
- package/.speccrew/skills/speccrew-pm-requirement-clarify/templates/CLARIFICATION-SUMMARY-TEMPLATE.md +52 -0
- package/.speccrew/skills/speccrew-pm-requirement-clarify/workflow.agentflow.xml +65 -19
- package/.speccrew/skills/speccrew-product-manager-orchestration/SKILL.md +84 -20
- package/.speccrew/skills/speccrew-product-manager-orchestration/workflow.agentflow.xml +196 -495
- package/package.json +1 -1
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<workflow id="pm-phase6-verify-confirm" status="pending">
|
|
3
|
+
|
|
4
|
+
<!-- ========== Input Parameters ========== -->
|
|
5
|
+
<block type="input" id="I1" desc="Phase 6 Verification Input">
|
|
6
|
+
<field name="iteration_path" required="true" type="string" desc="Path to iteration directory"/>
|
|
7
|
+
<field name="complexity" required="true" type="string" desc="simple or complex"/>
|
|
8
|
+
<field name="prd_output" required="true" type="object" desc="PRD generation output with file paths"/>
|
|
9
|
+
<field name="dispatch_plan" required="false" type="object" desc="Dispatch plan for complex path"/>
|
|
10
|
+
<field name="update_progress_script" required="true" type="string" desc="Path to update-progress.js"/>
|
|
11
|
+
<field name="language" required="false" type="string" desc="User language"/>
|
|
12
|
+
</block>
|
|
13
|
+
|
|
14
|
+
<!-- ========== Phase 6 Mandatory Rules ========== -->
|
|
15
|
+
<block type="rule" id="P6-R0" level="mandatory" desc="Phase 6 Structure Rules">
|
|
16
|
+
<field name="text">Phase 6 MUST execute in order: 6.1 (Verification) → 6.2 (User Review) → 6.3 (Finalize)</field>
|
|
17
|
+
<field name="text">Gate 6.1→6.2: Automatic after checklist passes</field>
|
|
18
|
+
<field name="text">Gate 6.2→6.3: REQUIRES EXPLICIT USER CONFIRMATION - no auto-proceed</field>
|
|
19
|
+
<field name="text">DO NOT update checkpoints before user confirmation</field>
|
|
20
|
+
<field name="text">DO NOT update WORKFLOW-PROGRESS.json to completed before user confirmation</field>
|
|
21
|
+
<field name="text">DO NOT assume user silence means confirmation</field>
|
|
22
|
+
</block>
|
|
23
|
+
|
|
24
|
+
<!-- ========== Step 6.1: File Integrity Verification ========== -->
|
|
25
|
+
<sequence name="Step 6.1: File Integrity Verification">
|
|
26
|
+
|
|
27
|
+
<!-- 6.1.1: Verify Master PRD -->
|
|
28
|
+
<block type="task" id="P6-1-B1" action="validate-file" status="pending" desc="Verify Master PRD exists and size > 1KB">
|
|
29
|
+
<field name="path" value="${prd_output.master_prd_path}"/>
|
|
30
|
+
<field name="min_size" value="1024"/>
|
|
31
|
+
<field name="output" var="master_prd_valid"/>
|
|
32
|
+
<!-- HTML Comment: Check Master PRD file existence and minimum size threshold -->
|
|
33
|
+
</block>
|
|
34
|
+
|
|
35
|
+
<!-- 6.1.2: Verify Sub-PRD Files (Complex Path) -->
|
|
36
|
+
<block type="gateway" id="P6-1-G1" mode="exclusive" desc="Check complexity for Sub-PRD verification">
|
|
37
|
+
<branch test="${complexity} == 'complex'" name="Complex Path - Verify Sub-PRDs">
|
|
38
|
+
|
|
39
|
+
<block type="task" id="P6-1-B2" action="read-json" status="pending" desc="Read dispatch plan for module count">
|
|
40
|
+
<field name="path" value="${prd_output.dispatch_plan_path}"/>
|
|
41
|
+
<field name="output" var="dispatch_plan_data"/>
|
|
42
|
+
<!-- HTML Comment: Load dispatch plan to get expected module count -->
|
|
43
|
+
</block>
|
|
44
|
+
|
|
45
|
+
<block type="task" id="P6-1-B3" action="glob-files" status="pending" desc="Scan all Sub-PRD files">
|
|
46
|
+
<field name="pattern" value="${iteration_path}/01.product-requirement/*-sub-*.md"/>
|
|
47
|
+
<field name="output" var="sub_prd_files"/>
|
|
48
|
+
<!-- HTML Comment: Find all Sub-PRD files matching pattern -->
|
|
49
|
+
</block>
|
|
50
|
+
|
|
51
|
+
<block type="task" id="P6-1-B4" action="compare-counts" status="pending" desc="Verify Sub-PRD count matches dispatch plan">
|
|
52
|
+
<field name="expected_count" value="${dispatch_plan_data.module_count}"/>
|
|
53
|
+
<field name="actual_count" value="${sub_prd_files.length}"/>
|
|
54
|
+
<field name="output" var="sub_prd_count_match"/>
|
|
55
|
+
<!-- HTML Comment: Ensure no modules were skipped during dispatch -->
|
|
56
|
+
</block>
|
|
57
|
+
|
|
58
|
+
<block type="task" id="P6-1-B5" action="validate-files" status="pending" desc="Verify each Sub-PRD exists">
|
|
59
|
+
<field name="files" value="${sub_prd_files}"/>
|
|
60
|
+
<field name="output" var="sub_prd_validation"/>
|
|
61
|
+
<!-- HTML Comment: Confirm each Sub-PRD file exists and is readable -->
|
|
62
|
+
</block>
|
|
63
|
+
|
|
64
|
+
</branch>
|
|
65
|
+
<branch test="${complexity} == 'simple'" name="Simple Path - Skip Sub-PRD Check">
|
|
66
|
+
<block type="set-variable" id="P6-1-V1" name="sub_prd_count_match" value="true"/>
|
|
67
|
+
<block type="set-variable" id="P6-1-V2" name="sub_prd_validation" value="{passed: true}"/>
|
|
68
|
+
</branch>
|
|
69
|
+
</block>
|
|
70
|
+
|
|
71
|
+
<!-- 6.1.3: Verify Clarification Summary -->
|
|
72
|
+
<block type="task" id="P6-1-B6" action="validate-file" status="pending" desc="Verify .clarification-summary.md exists">
|
|
73
|
+
<field name="path" value="${iteration_path}/01.product-requirement/.clarification-summary.md"/>
|
|
74
|
+
<field name="min_size" value="100"/>
|
|
75
|
+
<field name="output" var="clarification_summary_valid"/>
|
|
76
|
+
<!-- HTML Comment: Ensure clarification output exists for traceability -->
|
|
77
|
+
</block>
|
|
78
|
+
|
|
79
|
+
<!-- 6.1.4: Verify Module Design (Complex Path) -->
|
|
80
|
+
<block type="gateway" id="P6-1-G2" mode="exclusive" desc="Check if module design required">
|
|
81
|
+
<branch test="${complexity} == 'complex'" name="Complex Path - Verify Module Design">
|
|
82
|
+
<block type="task" id="P6-1-B7" action="validate-file" status="pending" desc="Verify .module-design.md exists">
|
|
83
|
+
<field name="path" value="${iteration_path}/01.product-requirement/.module-design.md"/>
|
|
84
|
+
<field name="min_size" value="512"/>
|
|
85
|
+
<field name="output" var="module_design_valid"/>
|
|
86
|
+
<!-- HTML Comment: Module design is required for complex path traceability -->
|
|
87
|
+
</block>
|
|
88
|
+
</branch>
|
|
89
|
+
<branch test="${complexity} == 'simple'" name="Simple Path - Skip Module Design">
|
|
90
|
+
<block type="set-variable" id="P6-1-V3" name="module_design_valid" value="true"/>
|
|
91
|
+
</branch>
|
|
92
|
+
</block>
|
|
93
|
+
|
|
94
|
+
<!-- 6.1.5: Gateway - Report Missing Items -->
|
|
95
|
+
<block type="gateway" id="P6-1-G3" mode="exclusive" desc="Check file verification results">
|
|
96
|
+
<branch test="${master_prd_valid} == false OR ${sub_prd_count_match} == false OR ${clarification_summary_valid} == false" name="File Verification Failed">
|
|
97
|
+
<block type="event" id="P6-1-E1" action="log" desc="Report missing items">
|
|
98
|
+
<field name="template">file-verification-failed</field>
|
|
99
|
+
<field name="data">
|
|
100
|
+
master_prd_valid: ${master_prd_valid}
|
|
101
|
+
sub_prd_count_match: ${sub_prd_count_match}
|
|
102
|
+
clarification_summary_valid: ${clarification_summary_valid}
|
|
103
|
+
module_design_valid: ${module_design_valid}
|
|
104
|
+
</field>
|
|
105
|
+
<!-- HTML Comment: Report all missing files before proceeding -->
|
|
106
|
+
</block>
|
|
107
|
+
<block type="output" id="P6-1-O1" desc="Return failure">
|
|
108
|
+
<field name="status" value="failed"/>
|
|
109
|
+
<field name="reason" value="file_verification_failed"/>
|
|
110
|
+
<field name="missing_items" value="${verification_missing_items}"/>
|
|
111
|
+
</block>
|
|
112
|
+
</branch>
|
|
113
|
+
<branch default="true" name="File Verification Passed">
|
|
114
|
+
<block type="event" id="P6-1-E2" action="log" desc="Log verification success">
|
|
115
|
+
<field name="message">✅ File integrity verification passed</field>
|
|
116
|
+
</block>
|
|
117
|
+
</branch>
|
|
118
|
+
</block>
|
|
119
|
+
</sequence>
|
|
120
|
+
|
|
121
|
+
<!-- ========== Step 6.2: Feature List Completeness Verification ========== -->
|
|
122
|
+
<sequence name="Step 6.2: Feature List Completeness Verification">
|
|
123
|
+
|
|
124
|
+
<!-- 6.2.1: Read Master PRD Feature List -->
|
|
125
|
+
<block type="task" id="P6-2-B1" action="read-section" status="pending" desc="Read Master PRD feature list">
|
|
126
|
+
<field name="path" value="${prd_output.master_prd_path}"/>
|
|
127
|
+
<field name="section" value="3.4"/>
|
|
128
|
+
<field name="output" var="master_feature_list"/>
|
|
129
|
+
<!-- HTML Comment: Extract feature breakdown section from Master PRD -->
|
|
130
|
+
</block>
|
|
131
|
+
|
|
132
|
+
<!-- 6.2.2: Scan Sub-PRD Features (Complex Path) -->
|
|
133
|
+
<block type="gateway" id="P6-2-G1" mode="exclusive" desc="Check complexity for feature scan">
|
|
134
|
+
<branch test="${complexity} == 'complex'" name="Complex Path - Scan Sub-PRDs">
|
|
135
|
+
|
|
136
|
+
<block type="task" id="P6-2-B2" action="scan-features" status="pending" desc="Scan all Sub-PRD features">
|
|
137
|
+
<field name="files" value="${sub_prd_files}"/>
|
|
138
|
+
<field name="output" var="sub_prd_features"/>
|
|
139
|
+
<!-- HTML Comment: Collect all features from Sub-PRD Section 3.4 -->
|
|
140
|
+
</block>
|
|
141
|
+
|
|
142
|
+
<!-- 6.2.3: Compare Features -->
|
|
143
|
+
<block type="task" id="P6-2-B3" action="compare-features" status="pending" desc="Compare features for completeness">
|
|
144
|
+
<field name="master_features" value="${master_feature_list}"/>
|
|
145
|
+
<field name="sub_features" value="${sub_prd_features}"/>
|
|
146
|
+
<field name="output" var="feature_comparison"/>
|
|
147
|
+
<!-- HTML Comment: Verify no missing or duplicate features -->
|
|
148
|
+
</block>
|
|
149
|
+
|
|
150
|
+
</branch>
|
|
151
|
+
<branch test="${complexity} == 'simple'" name="Simple Path - Skip Feature Comparison">
|
|
152
|
+
<block type="set-variable" id="P6-2-V1" name="feature_comparison" value="{complete: true, missing: [], duplicates: []}"/>
|
|
153
|
+
</branch>
|
|
154
|
+
</block>
|
|
155
|
+
|
|
156
|
+
<!-- 6.2.4: Gateway - Report Feature Discrepancies -->
|
|
157
|
+
<block type="gateway" id="P6-2-G2" mode="exclusive" desc="Check feature completeness">
|
|
158
|
+
<branch test="${feature_comparison.complete} == false" name="Feature Incomplete">
|
|
159
|
+
<block type="event" id="P6-2-E1" action="log" desc="Report feature discrepancies">
|
|
160
|
+
<field name="template">feature-discrepancy</field>
|
|
161
|
+
<field name="data" value="${feature_comparison}"/>
|
|
162
|
+
<!-- HTML Comment: Report missing or duplicate features -->
|
|
163
|
+
</block>
|
|
164
|
+
<block type="event" id="P6-2-E2" action="confirm" desc="Ask user to proceed or regenerate">
|
|
165
|
+
<field name="prompt">Feature list incomplete. Missing: ${feature_comparison.missing}. Duplicates: ${feature_comparison.duplicates}. Proceed anyway, Regenerate affected PRD, or Abort?</field>
|
|
166
|
+
</block>
|
|
167
|
+
</branch>
|
|
168
|
+
<branch default="true" name="Feature Complete">
|
|
169
|
+
<block type="event" id="P6-2-E3" action="log" desc="Log feature verification success">
|
|
170
|
+
<field name="message">✅ Feature list completeness verified</field>
|
|
171
|
+
</block>
|
|
172
|
+
</branch>
|
|
173
|
+
</block>
|
|
174
|
+
|
|
175
|
+
<!-- Aggregate verification result -->
|
|
176
|
+
<block type="task" id="P6-2-B4" action="aggregate-result" status="pending" desc="Aggregate all verification results">
|
|
177
|
+
<field name="output" var="verification_result"/>
|
|
178
|
+
<field name="data">
|
|
179
|
+
file_integrity: passed
|
|
180
|
+
feature_completeness: passed
|
|
181
|
+
master_prd_path: ${prd_output.master_prd_path}
|
|
182
|
+
sub_prd_count: ${sub_prd_files.length}
|
|
183
|
+
total_features: ${feature_comparison.total_count}
|
|
184
|
+
</field>
|
|
185
|
+
</block>
|
|
186
|
+
</sequence>
|
|
187
|
+
|
|
188
|
+
<!-- ========== Step 6.3: User Review (MANDATORY) ========== -->
|
|
189
|
+
<sequence name="Step 6.3: User Review">
|
|
190
|
+
|
|
191
|
+
<!-- MANDATORY Rule: No auto-confirmation -->
|
|
192
|
+
<block type="rule" id="P6-3-R1" level="mandatory" desc="User Confirmation MANDATORY">
|
|
193
|
+
<field name="text">🛑 FORBIDDEN: DO NOT mark user confirmation yourself</field>
|
|
194
|
+
<field name="text">🛑 FORBIDDEN: DO NOT proceed without explicit user "确认" or "OK"</field>
|
|
195
|
+
<field name="text">🛑 FORBIDDEN: DO NOT assume user silence means confirmation</field>
|
|
196
|
+
<field name="text">🛑 FORBIDDEN: DO NOT auto-proceed to Phase 6.4</field>
|
|
197
|
+
</block>
|
|
198
|
+
|
|
199
|
+
<!-- Present Verification Summary -->
|
|
200
|
+
<block type="task" id="P6-3-B1" action="prepare-summary" status="pending" desc="Prepare verification summary for user">
|
|
201
|
+
<field name="output" var="review_summary"/>
|
|
202
|
+
<field name="data">
|
|
203
|
+
verification_result: ${verification_result}
|
|
204
|
+
prd_files: ${prd_output.all_prd_files}
|
|
205
|
+
sub_prd_files: ${sub_prd_files}
|
|
206
|
+
total_size: ${prd_output.total_size}
|
|
207
|
+
</field>
|
|
208
|
+
<!-- HTML Comment: Prepare comprehensive summary for user review -->
|
|
209
|
+
</block>
|
|
210
|
+
|
|
211
|
+
<!-- MANDATORY User Confirmation Event -->
|
|
212
|
+
<block type="checkpoint" id="P6-3-CP1" name="user_review" desc="User review gate - MANDATORY">
|
|
213
|
+
<field name="required" value="true"/>
|
|
214
|
+
</block>
|
|
215
|
+
|
|
216
|
+
<block type="event" id="P6-3-E1" action="user-confirm" desc="Present summary and await user confirmation">
|
|
217
|
+
<field name="prompt">
|
|
218
|
+
📋 PRD Documents Ready for Review
|
|
219
|
+
|
|
220
|
+
Generated Files:
|
|
221
|
+
├── Master PRD: ${prd_output.master_prd_path} (${prd_output.master_prd_size} KB)
|
|
222
|
+
├── Sub-PRD Files: ${sub_prd_files.length} files
|
|
223
|
+
└── Total Size: ${prd_output.total_size} KB
|
|
224
|
+
|
|
225
|
+
Verification Results:
|
|
226
|
+
├── File existence: ✅ All files present
|
|
227
|
+
├── Size validation: ✅ All files valid
|
|
228
|
+
├── Feature Breakdown: ✅ All sections present
|
|
229
|
+
└── Content Boundary: ✅ No violations detected
|
|
230
|
+
|
|
231
|
+
Document Status: 📝 Draft (pending your confirmation)
|
|
232
|
+
|
|
233
|
+
🛑 AWAITING USER CONFIRMATION
|
|
234
|
+
|
|
235
|
+
请审查以上PRD文档。确认无误后我将更新状态为 Confirmed。是否确认?
|
|
236
|
+
|
|
237
|
+
您可以回复:
|
|
238
|
+
- "确认" 或 "OK" → 进入 Step 6.4 完成最终状态更新
|
|
239
|
+
- "需要修改" + 具体内容 → 返回相应阶段重新生成
|
|
240
|
+
- "取消" → 终止当前工作流
|
|
241
|
+
|
|
242
|
+
**I will NOT proceed until you explicitly confirm.**
|
|
243
|
+
</field>
|
|
244
|
+
<field name="template">prd-review-summary</field>
|
|
245
|
+
<field name="data" value="${review_summary}"/>
|
|
246
|
+
<!-- HTML Comment: MANDATORY - Must wait for explicit user confirmation -->
|
|
247
|
+
</block>
|
|
248
|
+
|
|
249
|
+
<!-- Gateway: Handle User Response -->
|
|
250
|
+
<block type="gateway" id="P6-3-G1" mode="exclusive" desc="Process user response">
|
|
251
|
+
<branch test="${user_response} == 'confirm'" name="User Confirmed">
|
|
252
|
+
<block type="set-variable" id="P6-3-V1" name="user_confirmed" value="true"/>
|
|
253
|
+
<block type="event" id="P6-3-E2" action="log" desc="Log user confirmation">
|
|
254
|
+
<field name="message">✅ User confirmed - proceeding to finalization</field>
|
|
255
|
+
</block>
|
|
256
|
+
</branch>
|
|
257
|
+
<branch test="${user_response} == 'modify'" name="User Requests Modification">
|
|
258
|
+
<block type="event" id="P6-3-E3" action="log" desc="Log modification request">
|
|
259
|
+
<field name="message">📝 User requested modifications: ${modification_details}</field>
|
|
260
|
+
</block>
|
|
261
|
+
<block type="output" id="P6-3-O1" desc="Return modification request">
|
|
262
|
+
<field name="status" value="modification_required"/>
|
|
263
|
+
<field name="modification_details" value="${modification_details}"/>
|
|
264
|
+
<field name="suggested_phase" value="${suggested_return_phase}"/>
|
|
265
|
+
</block>
|
|
266
|
+
</branch>
|
|
267
|
+
<branch test="${user_response} == 'cancel'" name="User Cancelled">
|
|
268
|
+
<block type="output" id="P6-3-O2" desc="Return cancelled">
|
|
269
|
+
<field name="status" value="cancelled"/>
|
|
270
|
+
<field name="reason" value="user_cancelled"/>
|
|
271
|
+
</block>
|
|
272
|
+
</branch>
|
|
273
|
+
</block>
|
|
274
|
+
</sequence>
|
|
275
|
+
|
|
276
|
+
<!-- ========== Step 6.4: Finalization ========== -->
|
|
277
|
+
<sequence name="Step 6.4: Finalization">
|
|
278
|
+
|
|
279
|
+
<!-- Prerequisite Check -->
|
|
280
|
+
<block type="rule" id="P6-4-R1" level="mandatory" desc="Phase 6.4 Prerequisite">
|
|
281
|
+
<field name="text">⚠️ Phase 6.4 can ONLY execute AFTER user has explicitly confirmed in Step 6.3</field>
|
|
282
|
+
<field name="text">IF user has NOT confirmed → DO NOT execute any step below</field>
|
|
283
|
+
<field name="text">IF you are unsure whether user confirmed → DO NOT execute any step below</field>
|
|
284
|
+
</block>
|
|
285
|
+
|
|
286
|
+
<block type="gateway" id="P6-4-G0" mode="exclusive" desc="Verify user confirmation">
|
|
287
|
+
<branch test="${user_confirmed} != true" name="No User Confirmation">
|
|
288
|
+
<block type="event" id="P6-4-E0" action="log" desc="Block execution">
|
|
289
|
+
<field name="message">🛑 BLOCKED: User has not explicitly confirmed. Return to Step 6.3.</field>
|
|
290
|
+
</block>
|
|
291
|
+
<block type="goto" id="P6-4-GOTO1" target="P6-3-E1"/>
|
|
292
|
+
</branch>
|
|
293
|
+
<branch default="true" name="User Confirmed - Proceed"/>
|
|
294
|
+
</block>
|
|
295
|
+
|
|
296
|
+
<!-- 6.4.1: Update verification_checklist checkpoint -->
|
|
297
|
+
<block type="task" id="P6-4-B1" action="run-script" status="pending" desc="Update verification_checklist checkpoint">
|
|
298
|
+
<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>
|
|
299
|
+
<!-- HTML Comment: Mark verification checklist as passed via script -->
|
|
300
|
+
</block>
|
|
301
|
+
|
|
302
|
+
<!-- 6.4.2: Update prd_review checkpoint -->
|
|
303
|
+
<block type="task" id="P6-4-B2" action="run-script" status="pending" desc="Update prd_review checkpoint">
|
|
304
|
+
<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>
|
|
305
|
+
<!-- HTML Comment: Mark PRD review as passed via script -->
|
|
306
|
+
</block>
|
|
307
|
+
|
|
308
|
+
<!-- 6.4.3: Update WORKFLOW-PROGRESS.json to completed -->
|
|
309
|
+
<block type="task" id="P6-4-B3" action="run-script" status="pending" desc="Update workflow status to completed">
|
|
310
|
+
<field name="command">node ${update_progress_script} update-workflow --file ${iteration_path}/WORKFLOW-PROGRESS.json --stage 01_prd --status completed</field>
|
|
311
|
+
<!-- HTML Comment: Set workflow stage to completed via script -->
|
|
312
|
+
</block>
|
|
313
|
+
|
|
314
|
+
<!-- 6.4.4: Update WORKFLOW-PROGRESS.json to confirmed -->
|
|
315
|
+
<block type="task" id="P6-4-B4" action="run-script" status="pending" desc="Update workflow status to confirmed">
|
|
316
|
+
<field name="command">node ${update_progress_script} update-workflow --file ${iteration_path}/WORKFLOW-PROGRESS.json --stage 01_prd --status confirmed</field>
|
|
317
|
+
<!-- HTML Comment: Set workflow stage to confirmed via script -->
|
|
318
|
+
</block>
|
|
319
|
+
|
|
320
|
+
<!-- 6.4.5: Update PRD document status -->
|
|
321
|
+
<block type="task" id="P6-4-B5" action="update-status" status="pending" desc="Update PRD document status to Confirmed">
|
|
322
|
+
<field name="files" value="${prd_output.all_prd_files}"/>
|
|
323
|
+
<field name="from" value="📝 Draft"/>
|
|
324
|
+
<field name="to" value="✅ Confirmed"/>
|
|
325
|
+
<!-- HTML Comment: Change document status marker in all PRD files -->
|
|
326
|
+
</block>
|
|
327
|
+
|
|
328
|
+
<!-- 6.4.6: Cleanup intermediate files -->
|
|
329
|
+
<block type="task" id="P6-4-B6" action="run-script" status="pending" desc="Cleanup intermediate files">
|
|
330
|
+
<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/.prd-completion-report.md -ErrorAction SilentlyContinue; Remove-Item ${iteration_path}/01.product-requirement/.sub-prd-dispatch-plan.json -ErrorAction SilentlyContinue</field>
|
|
331
|
+
<!-- HTML Comment: Delete intermediate process files, keep PRD documents and clarification files -->
|
|
332
|
+
</block>
|
|
333
|
+
|
|
334
|
+
<!-- Files to KEEP (documented for reference):
|
|
335
|
+
- Master PRD and all Sub-PRD documents (*-prd.md, *-sub-*.md)
|
|
336
|
+
- .clarification-summary.md
|
|
337
|
+
- .module-design.md (complex path)
|
|
338
|
+
- .prd-feature-list.json (for Feature Design phase)
|
|
339
|
+
-->
|
|
340
|
+
|
|
341
|
+
<!-- 6.4.7: Output completion report -->
|
|
342
|
+
<block type="event" id="P6-4-E1" action="log" desc="Output final completion report">
|
|
343
|
+
<field name="message">
|
|
344
|
+
✅ PRD Stage Complete
|
|
345
|
+
|
|
346
|
+
All documents confirmed:
|
|
347
|
+
├── Master PRD: ✅ Confirmed
|
|
348
|
+
├── Sub-PRD Files: ${sub_prd_files.length} confirmed
|
|
349
|
+
└── Feature Count: ${feature_comparison.total_count}
|
|
350
|
+
|
|
351
|
+
Files Kept:
|
|
352
|
+
├── Master PRD: ${prd_output.master_prd_path}
|
|
353
|
+
├── Sub-PRDs: ${sub_prd_files.length} files in 01.product-requirement/
|
|
354
|
+
├── Clarification Summary: .clarification-summary.md
|
|
355
|
+
└── Feature List: .prd-feature-list.json
|
|
356
|
+
|
|
357
|
+
Intermediate files cleaned up.
|
|
358
|
+
|
|
359
|
+
Next Steps:
|
|
360
|
+
When you are ready to proceed with Feature Design, start a new conversation
|
|
361
|
+
and invoke the Feature Designer Agent (speccrew-feature-designer).
|
|
362
|
+
|
|
363
|
+
DO NOT proceed to Feature Design in this conversation.
|
|
364
|
+
</field>
|
|
365
|
+
<field name="template">prd-completion</field>
|
|
366
|
+
</block>
|
|
367
|
+
</sequence>
|
|
368
|
+
|
|
369
|
+
<!-- ========== Output ========== -->
|
|
370
|
+
<block type="output" id="O1" desc="Phase 6 Verification & Confirmation Result">
|
|
371
|
+
<field name="verification_result" from="${verification_result}" type="object" desc="File and feature verification results"/>
|
|
372
|
+
<field name="user_confirmed" from="${user_confirmed}" type="boolean" desc="Whether user explicitly confirmed"/>
|
|
373
|
+
<field name="deliverables_summary" from="${review_summary}" type="object" desc="Summary of all delivered documents"/>
|
|
374
|
+
<field name="status" value="success" type="string" desc="Workflow execution status"/>
|
|
375
|
+
<field name="prd_files" from="${prd_output.all_prd_files}" type="array" desc="All PRD file paths"/>
|
|
376
|
+
<field name="feature_list_path" from="${iteration_path}/01.product-requirement/.prd-feature-list.json" type="string" desc="Feature list file for downstream phases"/>
|
|
377
|
+
</block>
|
|
378
|
+
|
|
379
|
+
</workflow>
|
|
@@ -21,6 +21,7 @@ Requirement clarification with dual-mode support. Produces `.clarification-summa
|
|
|
21
21
|
| `requirement_file` | string | Yes | Path to requirement document |
|
|
22
22
|
| `iteration_path` | string | Yes | Path to iteration directory |
|
|
23
23
|
| `complexity_hint` | enum | No | `simple` or `complex`. Auto-detect if not provided |
|
|
24
|
+
| `max_clarification_rounds` | number | No | Maximum clarification rounds (default: 5) |
|
|
24
25
|
|
|
25
26
|
## Methodology Foundation
|
|
26
27
|
|
|
@@ -32,6 +33,13 @@ Applies ISA-95 Stage 1 (Domain Description) for clarification:
|
|
|
32
33
|
|
|
33
34
|
> **DO NOT include:** API definitions, DB structures, code snippets, technical terminology. These belong to Feature Designer or System Designer.
|
|
34
35
|
|
|
36
|
+
## Templates Used
|
|
37
|
+
|
|
38
|
+
| Template | Path | Purpose |
|
|
39
|
+
|----------|------|---------|
|
|
40
|
+
| Clarification Questions | `templates/CLARIFICATION-QUESTIONS-TEMPLATE.md` | Round-based questionnaire for user clarification |
|
|
41
|
+
| Clarification Summary | `templates/CLARIFICATION-SUMMARY-TEMPLATE.md` | Final summary document with all Q&A and decisions |
|
|
42
|
+
|
|
35
43
|
---
|
|
36
44
|
|
|
37
45
|
# AgentFlow Definition
|
|
@@ -47,9 +55,13 @@ Applies ISA-95 Stage 1 (Domain Description) for clarification:
|
|
|
47
55
|
- [ ] Requirement document loaded
|
|
48
56
|
- [ ] System knowledge loaded (if exists)
|
|
49
57
|
- [ ] Complexity mode determined
|
|
58
|
+
- [ ] Loop variables initialized (`sufficiency_checks_passed`, `round_number`)
|
|
50
59
|
- [ ] Clarification conducted (appropriate mode)
|
|
51
|
-
- [ ]
|
|
52
|
-
- [ ] `.clarification-
|
|
60
|
+
- [ ] Multi-round clarification executed until ALL 4 Sufficiency Checks pass
|
|
61
|
+
- [ ] Each round generates `.clarification-questions-round-{N}.md`
|
|
62
|
+
- [ ] Round counter incremented after each iteration
|
|
63
|
+
- [ ] Maximum 5 rounds enforced (safety valve)
|
|
64
|
+
- [ ] `.clarification-summary.md` created from template
|
|
53
65
|
- [ ] `.checkpoints.json` initialized via script
|
|
54
66
|
|
|
55
67
|
---
|
|
@@ -58,8 +70,13 @@ Applies ISA-95 Stage 1 (Domain Description) for clarification:
|
|
|
58
70
|
|
|
59
71
|
**Must do:**
|
|
60
72
|
- Always perform at least 1 clarification round
|
|
73
|
+
- **MANDATORY**: Execute multiple rounds until ALL 4 sufficiency checks pass
|
|
61
74
|
- Use file-based for complex mode or 4+ questions
|
|
62
75
|
- Pass all 4 Sufficiency Checks
|
|
76
|
+
- Generate `.clarification-questions-round-{N}.md` for each round
|
|
77
|
+
- Update `sufficiency_checks_passed` variable after each sufficiency check
|
|
78
|
+
- Increment `round_number` after each round
|
|
79
|
+
- Maximum 5 rounds allowed (safety valve)
|
|
63
80
|
- Use `update-progress.js` for JSON files
|
|
64
81
|
- After completion, return control to PM Agent for user confirmation — DO NOT auto-proceed to PRD generation
|
|
65
82
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# 需求澄清问卷 - Round {round_number}
|
|
2
|
+
|
|
3
|
+
> **Iteration**: {iteration_name}
|
|
4
|
+
> **Date**: {date}
|
|
5
|
+
> **Complexity**: {complexity_level}
|
|
6
|
+
|
|
7
|
+
## 澄清背景
|
|
8
|
+
|
|
9
|
+
基于用户需求:"{requirement_summary}",以下问题需要进一步确认。
|
|
10
|
+
|
|
11
|
+
## 待确认事项
|
|
12
|
+
|
|
13
|
+
### 🎯 业务范围与边界
|
|
14
|
+
|
|
15
|
+
| # | 问题 | 优先级 | 用户回答 |
|
|
16
|
+
|---|------|--------|---------|
|
|
17
|
+
| 1 | {question} | {priority} | _待回答_ |
|
|
18
|
+
|
|
19
|
+
### 👥 用户角色与权限
|
|
20
|
+
|
|
21
|
+
| # | 问题 | 优先级 | 用户回答 |
|
|
22
|
+
|---|------|--------|---------|
|
|
23
|
+
| 1 | {question} | {priority} | _待回答_ |
|
|
24
|
+
|
|
25
|
+
### 🔄 业务规则与流程
|
|
26
|
+
|
|
27
|
+
| # | 问题 | 优先级 | 用户回答 |
|
|
28
|
+
|---|------|--------|---------|
|
|
29
|
+
| 1 | {question} | {priority} | _待回答_ |
|
|
30
|
+
|
|
31
|
+
### 🔗 集成与依赖
|
|
32
|
+
|
|
33
|
+
| # | 问题 | 优先级 | 用户回答 |
|
|
34
|
+
|---|------|--------|---------|
|
|
35
|
+
| 1 | {question} | {priority} | _待回答_ |
|
|
36
|
+
|
|
37
|
+
### ⚡ 性能与约束
|
|
38
|
+
|
|
39
|
+
| # | 问题 | 优先级 | 用户回答 |
|
|
40
|
+
|---|------|--------|---------|
|
|
41
|
+
| 1 | {question} | {priority} | _待回答_ |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 填写说明
|
|
46
|
+
|
|
47
|
+
1. 请在"用户回答"列直接填写您的回答
|
|
48
|
+
2. 如果某个问题不适用,请填写"N/A"并简要说明原因
|
|
49
|
+
3. 如需补充信息,可在回答后追加说明
|
package/.speccrew/skills/speccrew-pm-requirement-clarify/templates/CLARIFICATION-SUMMARY-TEMPLATE.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# 需求澄清总结
|
|
2
|
+
|
|
3
|
+
> **Iteration**: {iteration_name}
|
|
4
|
+
> **Total Rounds**: {total_rounds}
|
|
5
|
+
> **Date**: {date}
|
|
6
|
+
> **Final Sufficiency**: {sufficiency_result} ({checks_passed}/4)
|
|
7
|
+
|
|
8
|
+
## 1. 需求概述
|
|
9
|
+
|
|
10
|
+
{requirement_overview}
|
|
11
|
+
|
|
12
|
+
## 2. 复杂度评估
|
|
13
|
+
|
|
14
|
+
| 维度 | 评估 | 理由 |
|
|
15
|
+
|------|------|------|
|
|
16
|
+
| 业务复杂度 | {business_complexity} | {reason} |
|
|
17
|
+
| 技术复杂度 | {technical_complexity} | {reason} |
|
|
18
|
+
| 集成复杂度 | {integration_complexity} | {reason} |
|
|
19
|
+
| **综合判定** | **{overall_complexity}** | |
|
|
20
|
+
|
|
21
|
+
## 3. 关键决策记录
|
|
22
|
+
|
|
23
|
+
| # | 决策项 | 决策结果 | 确认轮次 |
|
|
24
|
+
|---|--------|---------|---------|
|
|
25
|
+
| 1 | {decision_item} | {decision_result} | Round {N} |
|
|
26
|
+
|
|
27
|
+
## 4. 澄清 Q&A 汇总
|
|
28
|
+
|
|
29
|
+
### Round {N}
|
|
30
|
+
|
|
31
|
+
| # | 问题 | 回答 | 分类 |
|
|
32
|
+
|---|------|------|------|
|
|
33
|
+
| 1 | {question} | {answer} | {category} |
|
|
34
|
+
|
|
35
|
+
## 5. 充分性检查结果
|
|
36
|
+
|
|
37
|
+
| # | 检查项 | 状态 | 说明 |
|
|
38
|
+
|---|--------|------|------|
|
|
39
|
+
| 1 | 范围边界清晰 | {status} | {detail} |
|
|
40
|
+
| 2 | 关键业务规则已文档化 | {status} | {detail} |
|
|
41
|
+
| 3 | 优先级/分期决策已确定 | {status} | {detail} |
|
|
42
|
+
| 4 | 集成边界已识别 | {status} | {detail} |
|
|
43
|
+
|
|
44
|
+
## 6. 遗留问题与风险
|
|
45
|
+
|
|
46
|
+
| # | 问题/风险 | 影响 | 建议处理方式 |
|
|
47
|
+
|---|----------|------|------------|
|
|
48
|
+
| 1 | {issue} | {impact} | {suggestion} |
|
|
49
|
+
|
|
50
|
+
## 7. 下一步建议
|
|
51
|
+
|
|
52
|
+
{next_steps}
|