speccrew 0.7.30 → 0.7.32
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 +46 -141
- package/.speccrew/agents/speccrew-task-worker.md +20 -0
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +193 -42
- package/.speccrew/skills/speccrew-fd-feature-design/templates/FEATURE-SPEC-TEMPLATE.md +22 -1
- package/.speccrew/skills/speccrew-fd-feature-design/workflow.agentflow.xml +212 -74
- package/.speccrew/skills/speccrew-feature-designer-orchestration/workflow.agentflow.xml +17 -88
- package/package.json +1 -1
|
@@ -5,97 +5,233 @@
|
|
|
5
5
|
Input Parameters Definition
|
|
6
6
|
============================================================ -->
|
|
7
7
|
<block type="input" id="I1" desc="Workflow input parameters">
|
|
8
|
-
<field name="feature_analysis_path" required="true" type="string" desc="Path to .feature-analysis.md"/>
|
|
9
8
|
<field name="prd_path" required="true" type="string" desc="Path to the Sub-PRD document"/>
|
|
10
9
|
<field name="feature_id" required="false" type="string" desc="Feature identifier, e.g., F-CRM-01"/>
|
|
11
|
-
<field name="feature_name" required="false" type="string" desc="Feature name in English"/>
|
|
10
|
+
<field name="feature_name" required="false" type="string" desc="Feature name in English, e.g., customer-list"/>
|
|
12
11
|
<field name="feature_type" required="false" type="string" desc="Page+API or API-only"/>
|
|
12
|
+
<field name="iteration_id" required="true" type="string" desc="Current iteration identifier"/>
|
|
13
13
|
<field name="frontend_platforms" required="false" type="array" desc="List of frontend platforms"/>
|
|
14
|
-
<field name="
|
|
14
|
+
<field name="skip_analysis_checkpoint" required="false" type="boolean" default="false" desc="Skip Checkpoint A if true"/>
|
|
15
15
|
<field name="skip_checkpoint" required="false" type="boolean" default="false" desc="Skip Checkpoint B if true"/>
|
|
16
|
-
<field name="
|
|
16
|
+
<field name="output_path" required="false" type="string" desc="Custom output path (auto-generated if not provided)"/>
|
|
17
17
|
<field name="workspace_path" required="true" type="string" desc="Absolute path to speccrew-workspace"/>
|
|
18
18
|
</block>
|
|
19
19
|
|
|
20
20
|
<!-- ============================================================
|
|
21
21
|
Global Constraints
|
|
22
22
|
============================================================ -->
|
|
23
|
-
<block type="rule" id="R1" level="forbidden" desc="
|
|
23
|
+
<block type="rule" id="R1" level="forbidden" desc="Script execution failure">
|
|
24
|
+
<field name="text">If update-progress.js fails, HARD STOP and report error</field>
|
|
25
|
+
</block>
|
|
26
|
+
|
|
27
|
+
<block type="rule" id="R2" level="forbidden" desc="Hand-written checkpoints">
|
|
28
|
+
<field name="text">ALWAYS use update-progress.js script for .checkpoints.json</field>
|
|
29
|
+
</block>
|
|
30
|
+
|
|
31
|
+
<block type="rule" id="R3" level="forbidden" desc="Skip Checkpoint A">
|
|
32
|
+
<field name="text">User confirmation required before proceeding (unless skip_analysis_checkpoint=true)</field>
|
|
33
|
+
</block>
|
|
34
|
+
|
|
35
|
+
<block type="rule" id="R4" level="forbidden" desc="Skip Checkpoint B">
|
|
36
|
+
<field name="text">User confirmation required before generating (unless skip_checkpoint=true)</field>
|
|
37
|
+
</block>
|
|
38
|
+
|
|
39
|
+
<block type="rule" id="R5" level="forbidden" desc="Rename features">
|
|
40
|
+
<field name="text">Output filename MUST use exact feature_name parameter value</field>
|
|
41
|
+
<field name="text">DO NOT translate, abbreviate, or substitute</field>
|
|
42
|
+
</block>
|
|
43
|
+
|
|
44
|
+
<block type="rule" id="R6" level="mandatory" desc="Business perspective only">
|
|
45
|
+
<field name="text">Feature Analysis is a PURE BUSINESS document</field>
|
|
46
|
+
<field name="text">Describes WHAT the system does, NOT HOW it's implemented</field>
|
|
47
|
+
</block>
|
|
48
|
+
|
|
49
|
+
<block type="rule" id="R7" level="forbidden" desc="Phase B Content Filling">
|
|
24
50
|
<field name="text">NEVER use create_file to rewrite document after skeleton creation</field>
|
|
25
51
|
<field name="text">NEVER abandon search_replace mid-way and switch to create_file</field>
|
|
26
52
|
<field name="text">MUST continue using search_replace for EVERY section</field>
|
|
27
53
|
</block>
|
|
28
54
|
|
|
29
|
-
<block type="rule" id="
|
|
55
|
+
<block type="rule" id="R8" level="mandatory" desc="Template-first workflow">
|
|
30
56
|
<field name="text">Step 5 (copy template) MUST precede Step 6 (fill content)</field>
|
|
31
57
|
</block>
|
|
32
58
|
|
|
33
|
-
<block type="rule" id="
|
|
59
|
+
<block type="rule" id="R9" level="mandatory" desc="Mermaid diagrams">
|
|
34
60
|
<field name="text">ALL interaction flows MUST use Mermaid syntax</field>
|
|
35
61
|
<field name="text">Plain text ASCII flowcharts are FORBIDDEN</field>
|
|
36
62
|
</block>
|
|
37
63
|
|
|
38
|
-
<block type="rule" id="R4" level="forbidden" desc="Rename features">
|
|
39
|
-
<field name="text">Output filename MUST use exact feature_name parameter value</field>
|
|
40
|
-
<field name="text">DO NOT translate, abbreviate, or substitute</field>
|
|
41
|
-
</block>
|
|
42
|
-
|
|
43
64
|
<!-- ============================================================
|
|
44
|
-
|
|
65
|
+
Sequence S0: Feature Analysis
|
|
45
66
|
============================================================ -->
|
|
46
|
-
<sequence id="
|
|
67
|
+
<sequence id="S0" name="Feature Analysis" status="pending" desc="Analyze PRD and produce function decomposition">
|
|
47
68
|
|
|
48
|
-
<!-- Step 0:
|
|
49
|
-
<block type="task" id="
|
|
50
|
-
<field name="path" value="${
|
|
51
|
-
<field name="output" var="
|
|
69
|
+
<!-- Step 0.1: Read PRD -->
|
|
70
|
+
<block type="task" id="B0_1" action="read-file" desc="Read PRD document">
|
|
71
|
+
<field name="path" value="${prd_path}"/>
|
|
72
|
+
<field name="output" var="prd_content"/>
|
|
52
73
|
</block>
|
|
53
74
|
|
|
54
|
-
<!-- Gateway: Validate
|
|
55
|
-
<block type="gateway" id="
|
|
56
|
-
test="${
|
|
57
|
-
<field name="message">
|
|
75
|
+
<!-- Gateway: Validate PRD exists -->
|
|
76
|
+
<block type="gateway" id="G0_1" mode="guard" desc="Verify PRD exists"
|
|
77
|
+
test="${prd_content} != null" fail-action="stop">
|
|
78
|
+
<field name="message">PRD document not found at: ${prd_path}</field>
|
|
58
79
|
</block>
|
|
59
80
|
|
|
60
|
-
<!-- Step 0.2:
|
|
61
|
-
<block type="task" id="
|
|
62
|
-
<field name="
|
|
63
|
-
<field name="
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
81
|
+
<!-- Step 0.2: Load System Knowledge -->
|
|
82
|
+
<block type="task" id="B0_2" action="read-file" desc="Read System Overview">
|
|
83
|
+
<field name="path">${workspace_path}/knowledges/bizs/system-overview.md</field>
|
|
84
|
+
<field name="output" var="system_overview"/>
|
|
85
|
+
</block>
|
|
86
|
+
|
|
87
|
+
<!-- Step 0.3: Load Related Module Overviews -->
|
|
88
|
+
<block type="task" id="B0_3" action="analyze" desc="Identify related modules from PRD">
|
|
89
|
+
<field name="input" value="${prd_content}"/>
|
|
90
|
+
<field name="analysis_rules">
|
|
91
|
+
- Extract module names mentioned in PRD
|
|
92
|
+
- Identify cross-module dependencies
|
|
93
|
+
- List related module overview files to read
|
|
68
94
|
</field>
|
|
69
|
-
<field name="output" var="
|
|
95
|
+
<field name="output" var="related_modules"/>
|
|
96
|
+
</block>
|
|
97
|
+
|
|
98
|
+
<!-- Loop: Read related module overviews -->
|
|
99
|
+
<block type="loop" id="L0_1" over="${related_modules}" as="module" desc="Read related module overviews">
|
|
100
|
+
<block type="task" id="B0_4" action="read-file" desc="Read module overview">
|
|
101
|
+
<field name="path">${workspace_path}/knowledges/bizs/${module.name}/${module.name}-overview.md</field>
|
|
102
|
+
<field name="output" var="module_overview_${module.name}"/>
|
|
103
|
+
</block>
|
|
70
104
|
</block>
|
|
71
105
|
|
|
72
|
-
<!--
|
|
73
|
-
<block type="gateway" id="
|
|
74
|
-
|
|
75
|
-
|
|
106
|
+
<!-- Step 0.4: Discover Frontend Platforms -->
|
|
107
|
+
<block type="gateway" id="G0_2" mode="exclusive" desc="Get frontend platforms">
|
|
108
|
+
<branch test="${frontend_platforms} != null AND ${frontend_platforms.length} > 0" name="Use provided platforms">
|
|
109
|
+
<block type="event" id="E0_1" action="log" level="info" desc="Using provided platforms">
|
|
110
|
+
<field name="message">Using provided frontend platforms: ${frontend_platforms}</field>
|
|
111
|
+
</block>
|
|
112
|
+
</branch>
|
|
113
|
+
<branch default="true" name="Auto-discover from techs-manifest">
|
|
114
|
+
<block type="task" id="B0_5" action="read-file" desc="Read techs manifest">
|
|
115
|
+
<field name="path">${workspace_path}/knowledges/techs/techs-manifest.json</field>
|
|
116
|
+
<field name="output" var="techs_manifest"/>
|
|
117
|
+
</block>
|
|
118
|
+
<block type="task" id="B0_6" action="analyze" desc="Extract frontend platforms">
|
|
119
|
+
<field name="input" value="${techs_manifest}"/>
|
|
120
|
+
<field name="extraction_rules">
|
|
121
|
+
- Filter platforms with type web-* or mobile-*
|
|
122
|
+
- Extract platform identifiers
|
|
123
|
+
</field>
|
|
124
|
+
<field name="output" var="frontend_platforms"/>
|
|
125
|
+
</block>
|
|
126
|
+
</branch>
|
|
127
|
+
</block>
|
|
128
|
+
|
|
129
|
+
<!-- Step 0.5: Function Breakdown -->
|
|
130
|
+
<block type="gateway" id="G0_3" mode="exclusive" desc="Select decomposition mode">
|
|
131
|
+
<branch test="${feature_id} != null" name="Feature-based decomposition">
|
|
132
|
+
<block type="task" id="B0_7" action="analyze" desc="Extract specific Feature from PRD">
|
|
133
|
+
<field name="input" value="${prd_content}"/>
|
|
134
|
+
<field name="feature_id" value="${feature_id}"/>
|
|
135
|
+
<field name="analysis_rules">
|
|
136
|
+
- Locate Feature in PRD Section 3.4 Feature Breakdown
|
|
137
|
+
- Extract only user stories mapped to this Feature
|
|
138
|
+
- Decompose into 3-8 focused Functions
|
|
139
|
+
- Mark API-only if feature_type indicates
|
|
140
|
+
</field>
|
|
141
|
+
<field name="output" var="function_breakdown"/>
|
|
142
|
+
</block>
|
|
143
|
+
</branch>
|
|
144
|
+
<branch default="true" name="Full PRD decomposition">
|
|
145
|
+
<block type="task" id="B0_8" action="analyze" desc="Decompose entire PRD">
|
|
146
|
+
<field name="input" value="${prd_content}"/>
|
|
147
|
+
<field name="analysis_rules">
|
|
148
|
+
- Decompose entire PRD into all required Functions
|
|
149
|
+
- May result in 10-20 Functions for complex modules
|
|
150
|
+
</field>
|
|
151
|
+
<field name="output" var="function_breakdown"/>
|
|
152
|
+
</block>
|
|
153
|
+
</branch>
|
|
154
|
+
</block>
|
|
155
|
+
|
|
156
|
+
<!-- Step 0.6: Analyze Functions with System Markers -->
|
|
157
|
+
<block type="task" id="B0_9" action="analyze" desc="Analyze functions with system relationship markers">
|
|
158
|
+
<field name="input" value="${function_breakdown}">${system_overview}${related_modules}</field>
|
|
159
|
+
<field name="analysis_rules">
|
|
160
|
+
For each function, identify:
|
|
161
|
+
- Frontend Changes: New pages, components, or modifications
|
|
162
|
+
- Backend Changes: New interfaces or modifications
|
|
163
|
+
- Data Changes: New data structures or modifications
|
|
164
|
+
- System Relationship: [EXISTING], [MODIFIED], or [NEW]
|
|
165
|
+
</field>
|
|
166
|
+
<field name="output" var="analyzed_functions"/>
|
|
167
|
+
</block>
|
|
168
|
+
|
|
169
|
+
<!-- Checkpoint A: User Confirmation -->
|
|
170
|
+
<block type="gateway" id="G0_4" mode="exclusive" desc="Handle checkpoint A">
|
|
171
|
+
<branch test="${skip_analysis_checkpoint} == true" name="Skip confirmation">
|
|
172
|
+
<block type="event" id="E0_2" action="log" level="info" desc="Skipping checkpoint A">
|
|
173
|
+
<field name="message">skip_analysis_checkpoint=true, proceeding without user confirmation</field>
|
|
174
|
+
</block>
|
|
175
|
+
</branch>
|
|
176
|
+
<branch default="true" name="Request confirmation">
|
|
177
|
+
<block type="event" id="E0_3" action="confirm" title="Function Breakdown Confirmation - Checkpoint A" type="yesno" desc="Present function breakdown for confirmation">
|
|
178
|
+
<field name="preview">Function Breakdown (Total: ${analyzed_functions.count} functions):
|
|
179
|
+
|
|
180
|
+
${analyzed_functions.summary}
|
|
181
|
+
|
|
182
|
+
System Relationship Markers:
|
|
183
|
+
- [EXISTING]: ${analyzed_functions.existing_count} - Reuse existing capabilities
|
|
184
|
+
- [MODIFIED]: ${analyzed_functions.modified_count} - Enhance existing features
|
|
185
|
+
- [NEW]: ${analyzed_functions.new_count} - Create new functionality
|
|
186
|
+
|
|
187
|
+
Does this function breakdown align with your understanding of the requirements?</field>
|
|
188
|
+
</block>
|
|
189
|
+
</branch>
|
|
190
|
+
</block>
|
|
191
|
+
|
|
192
|
+
<!-- Step 0.7: Update Checkpoint A -->
|
|
193
|
+
<block type="task" id="B0_10" action="run-script" desc="Record checkpoint A passed">
|
|
194
|
+
<field name="command">node "${workspace_path}/scripts/update-progress.js" write-checkpoint --file "${workspace_path}/iterations/${iteration_id}/02.feature-design/.checkpoints.json" --stage 02_feature_design --checkpoint function_decomposition --passed true</field>
|
|
195
|
+
<field name="output" var="checkpoint_a_result"/>
|
|
196
|
+
</block>
|
|
197
|
+
|
|
198
|
+
</sequence>
|
|
199
|
+
|
|
200
|
+
<!-- ============================================================
|
|
201
|
+
Sequence S1: Feature Design
|
|
202
|
+
============================================================ -->
|
|
203
|
+
<sequence id="S1" name="Feature Design" status="pending" desc="Generate Feature Spec from analysis results">
|
|
204
|
+
|
|
205
|
+
<!-- Output Efficiency Rule -->
|
|
206
|
+
<block type="rule" id="R-OUTPUT-EFFICIENCY" level="mandatory" desc="Direct-to-file output only">
|
|
207
|
+
<field name="text">DO NOT display design content in conversation</field>
|
|
208
|
+
<field name="text">Think internally, write directly to output file</field>
|
|
209
|
+
<field name="text">Only output brief status messages and block announcements</field>
|
|
210
|
+
<field name="text">FORBIDDEN: wireframes, API lists, data tables in chat</field>
|
|
76
211
|
</block>
|
|
77
212
|
|
|
78
|
-
<!-- Step 0
|
|
79
|
-
<block type="task" id="
|
|
80
|
-
<field name="input" value="${
|
|
81
|
-
<field name="
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
213
|
+
<!-- Step 1.0: Prepare analysis results for design -->
|
|
214
|
+
<block type="task" id="B1_0" action="analyze" desc="Prepare analysis data for design phase">
|
|
215
|
+
<field name="input" value="${analyzed_functions}">${prd_content}${feature_id}${feature_name}${feature_type}${frontend_platforms}</field>
|
|
216
|
+
<field name="prepare_rules">
|
|
217
|
+
- Extract feature_id, feature_name, feature_type from parameters or analysis
|
|
218
|
+
- Prepare functions list for design phase
|
|
219
|
+
- Prepare platforms list for design phase
|
|
220
|
+
- Verify Checkpoint A passed status
|
|
85
221
|
</field>
|
|
86
|
-
<field name="output" var="
|
|
222
|
+
<field name="output" var="design_input"/>
|
|
87
223
|
</block>
|
|
88
224
|
|
|
89
225
|
<!-- Step 1: Frontend Design (Conditional) -->
|
|
90
|
-
<block type="gateway" id="
|
|
226
|
+
<block type="gateway" id="G1" mode="exclusive" desc="Conditional frontend design">
|
|
91
227
|
<branch test="${feature_type} == 'API-only'" name="Skip frontend">
|
|
92
228
|
<block type="event" id="E1" action="log" level="info" desc="Skipping frontend design">
|
|
93
229
|
<field name="message">feature_type is API-only, skipping frontend design</field>
|
|
94
230
|
</block>
|
|
95
231
|
</branch>
|
|
96
232
|
<branch default="true" name="Execute frontend design">
|
|
97
|
-
<block type="task" id="
|
|
98
|
-
<field name="input" value="${
|
|
233
|
+
<block type="task" id="B1" action="analyze" desc="Design UI prototypes">
|
|
234
|
+
<field name="input" value="${design_input}">${frontend_platforms}</field>
|
|
99
235
|
<field name="design_rules">
|
|
100
236
|
- Create ASCII wireframes for each platform
|
|
101
237
|
- Use Pattern M-A (Card List), M-B (Mobile Form), M-C (Action Sheet) for mobile
|
|
@@ -104,8 +240,8 @@
|
|
|
104
240
|
<field name="output" var="ui_prototypes"/>
|
|
105
241
|
</block>
|
|
106
242
|
|
|
107
|
-
<block type="task" id="
|
|
108
|
-
<field name="input" value="${
|
|
243
|
+
<block type="task" id="B2" action="analyze" desc="Design interaction flows">
|
|
244
|
+
<field name="input" value="${design_input}">${ui_prototypes}</field>
|
|
109
245
|
<field name="design_rules">
|
|
110
246
|
- Document User Action → Frontend Response → Backend API Call
|
|
111
247
|
- Generate Mermaid sequenceDiagram for each flow
|
|
@@ -114,8 +250,8 @@
|
|
|
114
250
|
<field name="output" var="interaction_flows"/>
|
|
115
251
|
</block>
|
|
116
252
|
|
|
117
|
-
<block type="task" id="
|
|
118
|
-
<field name="input" value="${interaction_flows}">${
|
|
253
|
+
<block type="task" id="B3" action="analyze" desc="Map backend APIs">
|
|
254
|
+
<field name="input" value="${interaction_flows}">${design_input}</field>
|
|
119
255
|
<field name="mapping_rules">
|
|
120
256
|
- Map each frontend action to backend API endpoint
|
|
121
257
|
- Document data exchanged
|
|
@@ -126,8 +262,8 @@
|
|
|
126
262
|
</block>
|
|
127
263
|
|
|
128
264
|
<!-- Step 2: Backend Design -->
|
|
129
|
-
<block type="task" id="
|
|
130
|
-
<field name="input" value="${
|
|
265
|
+
<block type="task" id="B4" action="analyze" desc="Design backend interfaces">
|
|
266
|
+
<field name="input" value="${design_input}">${api_mapping}</field>
|
|
131
267
|
<field name="design_rules">
|
|
132
268
|
- List API/Interface with method and description
|
|
133
269
|
- Document processing logic flow (Mermaid flowchart TD)
|
|
@@ -138,8 +274,8 @@
|
|
|
138
274
|
</block>
|
|
139
275
|
|
|
140
276
|
<!-- Step 3: Data Model and Business Rules -->
|
|
141
|
-
<block type="task" id="
|
|
142
|
-
<field name="input" value="${
|
|
277
|
+
<block type="task" id="B5" action="analyze" desc="Design data model">
|
|
278
|
+
<field name="input" value="${design_input}">${backend_design}</field>
|
|
143
279
|
<field name="design_rules">
|
|
144
280
|
- Define new data structures (field, type, constraints, description)
|
|
145
281
|
- Document modifications to existing structures
|
|
@@ -153,7 +289,7 @@
|
|
|
153
289
|
</block>
|
|
154
290
|
|
|
155
291
|
<!-- Step 4: Checkpoint B -->
|
|
156
|
-
<block type="gateway" id="
|
|
292
|
+
<block type="gateway" id="G2" mode="exclusive" desc="Handle checkpoint B">
|
|
157
293
|
<branch test="${skip_checkpoint} == true" name="Skip confirmation">
|
|
158
294
|
<block type="event" id="E2" action="log" level="info" desc="Skipping checkpoint B">
|
|
159
295
|
<field name="message">skip_checkpoint=true, proceeding without user confirmation</field>
|
|
@@ -164,12 +300,12 @@
|
|
|
164
300
|
<field name="preview">Feature: ${feature_name} (${feature_id})
|
|
165
301
|
|
|
166
302
|
FUNCTIONS DESIGNED
|
|
167
|
-
Total: ${
|
|
303
|
+
Total: ${analyzed_functions.count} functions
|
|
168
304
|
|
|
169
305
|
SYSTEM RELATIONSHIP SUMMARY
|
|
170
|
-
- [EXISTING]: ${
|
|
171
|
-
- [MODIFIED]: ${
|
|
172
|
-
- [NEW]: ${
|
|
306
|
+
- [EXISTING]: ${analyzed_functions.existing_count} - Reuse existing capabilities
|
|
307
|
+
- [MODIFIED]: ${analyzed_functions.modified_count} - Enhance existing features
|
|
308
|
+
- [NEW]: ${analyzed_functions.new_count} - Create new functionality
|
|
173
309
|
|
|
174
310
|
FRONTEND COMPONENTS
|
|
175
311
|
- Platforms: ${frontend_platforms}
|
|
@@ -196,21 +332,21 @@ Please confirm:
|
|
|
196
332
|
</block>
|
|
197
333
|
|
|
198
334
|
<!-- Step 4.3: Update Checkpoint B -->
|
|
199
|
-
<block type="task" id="
|
|
335
|
+
<block type="task" id="B6" action="run-script" desc="Record checkpoint B passed">
|
|
200
336
|
<field name="command">node "${workspace_path}/scripts/update-progress.js" write-checkpoint --file "${workspace_path}/iterations/${iteration_id}/02.feature-design/.checkpoints.json" --stage 02_feature_design --checkpoint feature_design_review --passed true</field>
|
|
201
337
|
<field name="output" var="checkpoint_b_result"/>
|
|
202
338
|
</block>
|
|
203
339
|
|
|
204
340
|
<!-- Step 5: Determine Output Path and Copy Template -->
|
|
205
|
-
<block type="task" id="
|
|
341
|
+
<block type="task" id="B7" action="read-file" desc="Read Feature Spec template">
|
|
206
342
|
<field name="path">speccrew-fd-feature-design/templates/FEATURE-SPEC-TEMPLATE.md</field>
|
|
207
343
|
<field name="output" var="template_content"/>
|
|
208
344
|
</block>
|
|
209
345
|
|
|
210
346
|
<!-- Gateway: Determine output path mode -->
|
|
211
|
-
<block type="gateway" id="
|
|
347
|
+
<block type="gateway" id="G3" mode="exclusive" desc="Determine output path">
|
|
212
348
|
<branch test="${feature_id} != null" name="Single Feature Mode">
|
|
213
|
-
<block type="task" id="
|
|
349
|
+
<block type="task" id="B8" action="generate" desc="Create document from template">
|
|
214
350
|
<field name="template" value="${template_content}"/>
|
|
215
351
|
<field name="placeholders">
|
|
216
352
|
- [Feature Name] → ${feature_name}
|
|
@@ -224,7 +360,7 @@ Please confirm:
|
|
|
224
360
|
</block>
|
|
225
361
|
</branch>
|
|
226
362
|
<branch default="true" name="Legacy Mode">
|
|
227
|
-
<block type="task" id="
|
|
363
|
+
<block type="task" id="B9" action="generate" desc="Create document from template">
|
|
228
364
|
<field name="template" value="${template_content}"/>
|
|
229
365
|
<field name="placeholders">
|
|
230
366
|
- [Feature Name] → ${feature_name}
|
|
@@ -240,8 +376,8 @@ Please confirm:
|
|
|
240
376
|
</block>
|
|
241
377
|
|
|
242
378
|
<!-- Step 6: Fill Sections Using search_replace -->
|
|
243
|
-
<block type="loop" id="L1" over="${
|
|
244
|
-
<block type="task" id="
|
|
379
|
+
<block type="loop" id="L1" over="${analyzed_functions.functions}" as="function" desc="Fill each function section">
|
|
380
|
+
<block type="task" id="B10" action="edit-file" desc="Fill Frontend Prototype section">
|
|
245
381
|
<field name="path">${output_path}</field>
|
|
246
382
|
<field name="operation">search_replace</field>
|
|
247
383
|
<field name="search">#### ${function.id}.1 Frontend Prototype
|
|
@@ -252,7 +388,7 @@ Please confirm:
|
|
|
252
388
|
${ui_prototypes[function.id]}</field>
|
|
253
389
|
</block>
|
|
254
390
|
|
|
255
|
-
<block type="task" id="
|
|
391
|
+
<block type="task" id="B11" action="edit-file" desc="Fill Interaction Flow section">
|
|
256
392
|
<field name="path">${output_path}</field>
|
|
257
393
|
<field name="operation">search_replace</field>
|
|
258
394
|
<field name="search">#### ${function.id}.2 Interaction Flow
|
|
@@ -263,7 +399,7 @@ ${ui_prototypes[function.id]}</field>
|
|
|
263
399
|
${interaction_flows[function.id]}</field>
|
|
264
400
|
</block>
|
|
265
401
|
|
|
266
|
-
<block type="task" id="
|
|
402
|
+
<block type="task" id="B12" action="edit-file" desc="Fill Backend Interface section">
|
|
267
403
|
<field name="path">${output_path}</field>
|
|
268
404
|
<field name="operation">search_replace</field>
|
|
269
405
|
<field name="search">#### ${function.id}.3 Backend Interface
|
|
@@ -274,7 +410,7 @@ ${interaction_flows[function.id]}</field>
|
|
|
274
410
|
${backend_design[function.id]}</field>
|
|
275
411
|
</block>
|
|
276
412
|
|
|
277
|
-
<block type="task" id="
|
|
413
|
+
<block type="task" id="B13" action="edit-file" desc="Fill Data Definition section">
|
|
278
414
|
<field name="path">${output_path}</field>
|
|
279
415
|
<field name="operation">search_replace</field>
|
|
280
416
|
<field name="search">#### ${function.id}.4 Data Definition
|
|
@@ -287,7 +423,7 @@ ${data_model[function.id]}</field>
|
|
|
287
423
|
</block>
|
|
288
424
|
|
|
289
425
|
<!-- Step 7: Mermaid Diagram Compliance -->
|
|
290
|
-
<block type="task" id="
|
|
426
|
+
<block type="task" id="B14" action="analyze" desc="Verify Mermaid compliance">
|
|
291
427
|
<field name="input" value="${output_path}"/>
|
|
292
428
|
<field name="verification_rules">
|
|
293
429
|
- NO style definitions (classDef, style)
|
|
@@ -298,13 +434,13 @@ ${data_model[function.id]}</field>
|
|
|
298
434
|
</block>
|
|
299
435
|
|
|
300
436
|
<!-- Step 8: Update Checkpoint -->
|
|
301
|
-
<block type="task" id="
|
|
437
|
+
<block type="task" id="B15" action="run-script" desc="Record feature spec review checkpoint">
|
|
302
438
|
<field name="command">node "${workspace_path}/scripts/update-progress.js" write-checkpoint --file "${workspace_path}/iterations/${iteration_id}/02.feature-design/.checkpoints.json" --stage 02_feature_design --checkpoint feature_spec_review --passed true</field>
|
|
303
439
|
</block>
|
|
304
440
|
|
|
305
441
|
<!-- Step 9: Update Progress with Metadata -->
|
|
306
|
-
<block type="task" id="
|
|
307
|
-
<field name="command">node "${workspace_path}/scripts/update-progress.js" update-task --file "${workspace_path}/iterations/${iteration_id}/DISPATCH-PROGRESS.json" --task-id "${feature_id}" --status completed --metadata '{"function_count": ${
|
|
442
|
+
<block type="task" id="B16" action="run-script" desc="Update dispatch progress with metadata">
|
|
443
|
+
<field name="command">node "${workspace_path}/scripts/update-progress.js" update-task --file "${workspace_path}/iterations/${iteration_id}/DISPATCH-PROGRESS.json" --task-id "${feature_id}" --status completed --metadata '{"function_count": ${analyzed_functions.count}, "component_count": ${ui_prototypes.component_count}, "api_count": ${backend_design.api_count}, "entity_count": ${data_model.entity_count}}'</field>
|
|
308
444
|
</block>
|
|
309
445
|
|
|
310
446
|
</sequence>
|
|
@@ -314,9 +450,11 @@ ${data_model[function.id]}</field>
|
|
|
314
450
|
============================================================ -->
|
|
315
451
|
<block type="output" id="O1" desc="Workflow output results">
|
|
316
452
|
<field name="feature_spec_path" value="${output_path}" type="string" desc="Path to generated Feature Spec"/>
|
|
317
|
-
<field name="function_count" from="${
|
|
453
|
+
<field name="function_count" from="${analyzed_functions.count}" type="number" desc="Number of functions analyzed and designed"/>
|
|
318
454
|
<field name="api_count" from="${backend_design.api_count}" type="number" desc="Number of APIs defined"/>
|
|
455
|
+
<field name="checkpoint_a_status" value="passed" type="string" desc="Checkpoint A status"/>
|
|
319
456
|
<field name="checkpoint_b_status" value="passed" type="string" desc="Checkpoint B status"/>
|
|
457
|
+
<field name="frontend_platforms" from="${frontend_platforms}" type="array" desc="List of frontend platforms"/>
|
|
320
458
|
</block>
|
|
321
459
|
|
|
322
460
|
</workflow>
|