speccrew 0.7.61 → 0.7.62
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/skills/speccrew-sd-backend/SKILL.md +3 -374
- package/.speccrew/skills/speccrew-sd-backend/workflow.agentflow.xml +330 -52
- package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +1 -338
- package/.speccrew/skills/speccrew-sd-frontend/workflow.agentflow.xml +235 -30
- package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +1 -336
- package/.speccrew/skills/speccrew-sd-mobile/workflow.agentflow.xml +324 -62
- package/package.json +1 -1
|
@@ -5,11 +5,17 @@
|
|
|
5
5
|
Input Parameters Definition
|
|
6
6
|
============================================================ -->
|
|
7
7
|
<block type="input" id="I1" desc="Workflow input parameters">
|
|
8
|
-
<field name="
|
|
8
|
+
<field name="feature_id" required="false" type="string" desc="Feature identifier, e.g., F-CRM-01. If provided, use new naming format"/>
|
|
9
|
+
<field name="feature_name" required="true" type="string" desc="Feature name, e.g., customer-list"/>
|
|
9
10
|
<field name="platform_id" required="true" type="string" desc="Target platform, e.g., mobile-flutter, mobile-react-native"/>
|
|
10
11
|
<field name="iteration_path" required="true" type="string" desc="Absolute path to iteration directory"/>
|
|
11
12
|
<field name="workspace_path" required="true" type="string" desc="Absolute path to speccrew-workspace"/>
|
|
12
|
-
<field name="task_id" required="false" type="string" desc="Task
|
|
13
|
+
<field name="task_id" required="false" type="string" desc="Task identifier in DISPATCH-PROGRESS.json. Used for status tracking"/>
|
|
14
|
+
<field name="skip_confirmation" required="false" type="boolean" default="false" desc="When true, skip Checkpoint A user confirmation (used in batch dispatch mode)"/>
|
|
15
|
+
<field name="skip_index_generation" required="false" type="boolean" default="false" desc="When true, skip Step 5 INDEX.md generation (INDEX.md will be generated by orchestrator after all workers complete)"/>
|
|
16
|
+
<field name="index_only" required="false" type="boolean" default="false" desc="When true, skip Steps 1-4 and ONLY execute Step 5 (INDEX.md generation). Used after all platform workers complete"/>
|
|
17
|
+
<field name="dispatch_progress_file" required="false" type="string" desc="Path to DISPATCH-PROGRESS.json. If provided, worker updates its own task status on completion"/>
|
|
18
|
+
<field name="update_progress_script" required="false" type="string" desc="Path to update-progress.js script"/>
|
|
13
19
|
</block>
|
|
14
20
|
|
|
15
21
|
<!-- ============================================================
|
|
@@ -17,7 +23,8 @@
|
|
|
17
23
|
============================================================ -->
|
|
18
24
|
<block type="rule" id="R1" level="forbidden" desc="Document creation constraints">
|
|
19
25
|
<field name="text">NEVER use create_file to write design documents or INDEX directly</field>
|
|
20
|
-
<field name="text">MUST
|
|
26
|
+
<field name="text">Documents MUST be created by copying template then filling with search_replace</field>
|
|
27
|
+
<field name="text">create_file produces truncated output on large files</field>
|
|
21
28
|
</block>
|
|
22
29
|
|
|
23
30
|
<block type="rule" id="R2" level="forbidden" desc="Full-file rewrite prohibition">
|
|
@@ -31,13 +38,55 @@
|
|
|
31
38
|
</block>
|
|
32
39
|
|
|
33
40
|
<block type="rule" id="R4" level="mandatory" desc="Actual framework syntax">
|
|
34
|
-
<field name="text">All pseudo-code MUST use actual framework syntax from techs knowledge</field>
|
|
41
|
+
<field name="text">All pseudo-code MUST use actual framework/library syntax from techs knowledge</field>
|
|
42
|
+
<field name="text">NOT generic pseudo-code</field>
|
|
35
43
|
<field name="text">Include actual import statements</field>
|
|
44
|
+
<field name="text">Use actual store/API patterns from conventions</field>
|
|
36
45
|
</block>
|
|
37
46
|
|
|
38
47
|
<block type="rule" id="R5" level="forbidden" desc="TODO/FIXME placeholders">
|
|
39
48
|
<field name="text">Design documents MUST contain complete implementation logic</field>
|
|
40
49
|
<field name="text">Do NOT use TODO, FIXME, HACK, or any placeholder comments</field>
|
|
50
|
+
<field name="text">Every screen, widget, and method MUST be fully specified with actual pseudocode</field>
|
|
51
|
+
</block>
|
|
52
|
+
|
|
53
|
+
<block type="rule" id="R6" level="mandatory" desc="Output filename pattern">
|
|
54
|
+
<field name="text">Output filename MUST follow pattern: {feature_id}-{feature_name}-design.md</field>
|
|
55
|
+
<field name="text">Omitting feature_id or using alternative naming is FORBIDDEN</field>
|
|
56
|
+
</block>
|
|
57
|
+
|
|
58
|
+
<block type="rule" id="R7" level="mandatory" desc="Mermaid for all diagrams">
|
|
59
|
+
<field name="text">ALL screen trees, navigation flows, interaction sequences, and state diagrams MUST use Mermaid syntax</field>
|
|
60
|
+
<field name="text">Use graph TB, sequenceDiagram, flowchart</field>
|
|
61
|
+
<field name="text">Plain text ASCII diagrams are FORBIDDEN for these sections</field>
|
|
62
|
+
</block>
|
|
63
|
+
|
|
64
|
+
<block type="rule" id="R8" level="mandatory" desc="API route consistency">
|
|
65
|
+
<field name="text">All API routes in design document MUST exactly match routes defined in API Contract</field>
|
|
66
|
+
<field name="text">Before writing any route, READ the API Contract and copy routes verbatim</field>
|
|
67
|
+
<field name="text">Do NOT invent or modify routes</field>
|
|
68
|
+
</block>
|
|
69
|
+
|
|
70
|
+
<block type="rule" id="R9" level="mandatory" desc="Cross-feature dependency marking">
|
|
71
|
+
<field name="text">When referencing functionality from another Feature, MUST explicitly mark as [DEPENDENCY: F-XXX-NNN]</field>
|
|
72
|
+
<field name="text">Define a degradation strategy (e.g., hide button, show placeholder) for when that Feature is not yet implemented</field>
|
|
73
|
+
</block>
|
|
74
|
+
|
|
75
|
+
<block type="rule" id="R10" level="mandatory" desc="Status markers required">
|
|
76
|
+
<field name="text">Use [EXISTING], [MODIFIED], [NEW] markers for all screens, widgets, and store modules</field>
|
|
77
|
+
</block>
|
|
78
|
+
|
|
79
|
+
<block type="rule" id="R11" level="mandatory" desc="Follow techs conventions">
|
|
80
|
+
<field name="text">Naming, directory structure, patterns must follow techs knowledge</field>
|
|
81
|
+
<field name="text">Screen/widget naming follows conventions-dev.md</field>
|
|
82
|
+
<field name="text">Directory structure follows conventions-design.md</field>
|
|
83
|
+
</block>
|
|
84
|
+
|
|
85
|
+
<block type="rule" id="R12" level="mandatory" desc="Mobile-specific rules">
|
|
86
|
+
<field name="text">Properly handle iOS/Android differences, permissions, and native integrations</field>
|
|
87
|
+
<field name="text">Consider offline-first patterns where applicable</field>
|
|
88
|
+
<field name="text">App lifecycle handling MUST be documented</field>
|
|
89
|
+
<field name="text">Platform-specific features (Camera, GPS, Push, Biometrics) MUST use actual plugin APIs</field>
|
|
41
90
|
</block>
|
|
42
91
|
|
|
43
92
|
<!-- ============================================================
|
|
@@ -45,14 +94,25 @@
|
|
|
45
94
|
============================================================ -->
|
|
46
95
|
<sequence id="S1" name="Mobile System Design" status="pending" desc="Generate mobile detailed design documents">
|
|
47
96
|
|
|
97
|
+
<!-- Gateway: index_only conditional -->
|
|
98
|
+
<block type="gateway" id="G0" mode="exclusive" desc="Check if index_only mode">
|
|
99
|
+
<branch test="${index_only} == true" name="Index only - skip to Step 5">
|
|
100
|
+
<block type="event" id="E0" action="log" level="info" desc="index_only mode active">
|
|
101
|
+
<field name="message">index_only=true, skipping Steps 1-4 and jumping directly to Step 5 (INDEX.md generation)</field>
|
|
102
|
+
</block>
|
|
103
|
+
</branch>
|
|
104
|
+
<branch default="true" name="Full workflow">
|
|
105
|
+
|
|
48
106
|
<!-- Step 1: Read Inputs -->
|
|
49
107
|
<block type="task" id="B1" action="read-file" desc="Read Feature Spec document">
|
|
50
|
-
<field name="path">${iteration_path}/02.feature-design/${feature_name}-feature-spec.md</field>
|
|
108
|
+
<field name="path">${iteration_path}/02.feature-design/${feature_id}-${feature_name}-feature-spec.md</field>
|
|
109
|
+
<field name="fallback_path">${iteration_path}/02.feature-design/${feature_name}-feature-spec.md</field>
|
|
51
110
|
<field name="output" var="feature_spec"/>
|
|
52
111
|
</block>
|
|
53
112
|
|
|
54
113
|
<block type="task" id="B2" action="read-file" desc="Read API Contract">
|
|
55
|
-
<field name="path">${iteration_path}/03.api-contract/${feature_name}-api-contract.md</field>
|
|
114
|
+
<field name="path">${iteration_path}/03.api-contract/${feature_id}-${feature_name}-api-contract.md</field>
|
|
115
|
+
<field name="fallback_path">${iteration_path}/03.api-contract/${feature_name}-api-contract.md</field>
|
|
56
116
|
<field name="output" var="api_contract"/>
|
|
57
117
|
</block>
|
|
58
118
|
|
|
@@ -77,38 +137,53 @@
|
|
|
77
137
|
<field name="output" var="conventions_dev"/>
|
|
78
138
|
</block>
|
|
79
139
|
|
|
140
|
+
<!-- Optional: Read UI style guide -->
|
|
141
|
+
<block type="task" id="B7" action="read-file" desc="Read UI style guide">
|
|
142
|
+
<field name="path">${workspace_path}/knowledges/techs/${platform_id}/ui-style/ui-style-guide.md</field>
|
|
143
|
+
<field name="optional" value="true"/>
|
|
144
|
+
<field name="output" var="ui_style_guide"/>
|
|
145
|
+
</block>
|
|
146
|
+
|
|
80
147
|
<!-- Step 2: Analyze Existing Code Structure -->
|
|
81
|
-
<block type="task" id="
|
|
148
|
+
<block type="task" id="B8" action="analyze" desc="Analyze mobile codebase structure">
|
|
82
149
|
<field name="analysis_targets">
|
|
83
|
-
- Screen/Page directory: lib/screens/**/*.dart or src/screens/**/*.tsx
|
|
84
|
-
- Widget/Component directory: lib/widgets/**/*.dart or src/components/**/*
|
|
85
|
-
- State management: lib/providers/**/*.dart or src/stores/**/*
|
|
86
|
-
- Navigation configuration: lib/router/**/*.dart or src/navigation/**/*
|
|
87
|
-
- API layer: lib/api/**/*.dart or src/api/**/*
|
|
88
|
-
- Local storage: lib/storage/**/*.dart or src/storage/**/*
|
|
89
|
-
- Naming conventions
|
|
150
|
+
- Screen/Page directory: lib/screens/**/*.dart or src/screens/**/*.tsx — Understand screen organization
|
|
151
|
+
- Widget/Component directory: lib/widgets/**/*.dart or src/components/**/* — Understand widget organization
|
|
152
|
+
- State management: lib/providers/**/*.dart or src/stores/**/* — Understand state pattern
|
|
153
|
+
- Navigation configuration: lib/router/**/*.dart or src/navigation/**/* — Understand routing structure
|
|
154
|
+
- API layer: lib/api/**/*.dart or src/api/**/* — Understand API encapsulation pattern
|
|
155
|
+
- Local storage: lib/storage/**/*.dart or src/storage/**/* — Understand persistence patterns
|
|
156
|
+
- Naming conventions: Various — Identify actual naming patterns in use
|
|
90
157
|
</field>
|
|
91
158
|
<field name="output" var="codebase_analysis"/>
|
|
92
159
|
</block>
|
|
93
160
|
|
|
94
161
|
<!-- Step 3: Extract Functions from Feature Spec -->
|
|
95
|
-
<block type="task" id="
|
|
162
|
+
<block type="task" id="B9" action="analyze" desc="Extract mobile functions from Feature Spec">
|
|
96
163
|
<field name="input" value="${feature_spec}">${api_contract}</field>
|
|
97
164
|
<field name="extraction_rules">
|
|
98
165
|
- Parse Feature Spec Section 2.N pattern
|
|
166
|
+
- Each Feature Spec typically contains 3-8 functions (fine-grained format)
|
|
99
167
|
- Extract mobile prototype (UI flow description)
|
|
100
|
-
- Extract interaction flow
|
|
168
|
+
- Extract interaction flow (user actions and system responses)
|
|
101
169
|
- Extract backend API calls from API Contract
|
|
102
|
-
- Extract data requirements
|
|
103
|
-
- Extract platform features (
|
|
170
|
+
- Extract data requirements (fields and structures needed)
|
|
171
|
+
- Extract platform features (Camera, GPS, Push Notifications, Biometrics, etc.)
|
|
104
172
|
- Mark screens/widgets as [EXISTING], [MODIFIED], or [NEW]
|
|
105
173
|
</field>
|
|
106
174
|
<field name="output" var="extracted_functions"/>
|
|
107
175
|
</block>
|
|
108
176
|
|
|
109
|
-
<!-- Checkpoint A:
|
|
110
|
-
<block type="
|
|
111
|
-
<
|
|
177
|
+
<!-- Checkpoint A: Function Extraction Confirmation -->
|
|
178
|
+
<block type="gateway" id="G1" mode="exclusive" desc="Handle Checkpoint A - skip_confirmation gateway">
|
|
179
|
+
<branch test="${skip_confirmation} == true" name="Skip confirmation - auto proceed">
|
|
180
|
+
<block type="event" id="E1_skip" action="log" level="info" desc="Skipping Checkpoint A">
|
|
181
|
+
<field name="message">skip_confirmation=true, logging function extraction summary and proceeding automatically</field>
|
|
182
|
+
</block>
|
|
183
|
+
</branch>
|
|
184
|
+
<branch default="true" name="Request user confirmation">
|
|
185
|
+
<block type="event" id="E1" action="confirm" title="Function Extraction Confirmation - Checkpoint A" type="yesno" desc="Present function extraction summary">
|
|
186
|
+
<field name="preview">Mobile Functions Extracted for: ${feature_name}
|
|
112
187
|
Platform: ${platform_id}
|
|
113
188
|
|
|
114
189
|
Function Extraction Summary:
|
|
@@ -123,143 +198,262 @@ Platform Features Required:
|
|
|
123
198
|
${extracted_functions.platform_features}
|
|
124
199
|
|
|
125
200
|
Confirm function extraction before proceeding?</field>
|
|
201
|
+
</block>
|
|
202
|
+
</branch>
|
|
126
203
|
</block>
|
|
127
204
|
|
|
128
205
|
<!-- Step 4: Generate Module Design Documents -->
|
|
129
|
-
<block type="task" id="
|
|
206
|
+
<block type="task" id="B10" action="read-file" desc="Read design template">
|
|
130
207
|
<field name="path">speccrew-sd-mobile/templates/SD-MOBILE-TEMPLATE.md</field>
|
|
131
208
|
<field name="output" var="design_template"/>
|
|
132
209
|
</block>
|
|
133
210
|
|
|
134
211
|
<!-- Loop: Generate design for each function -->
|
|
135
212
|
<block type="loop" id="L1" over="${extracted_functions.functions}" as="function" desc="Generate module design documents">
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
<
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
213
|
+
<!-- Gateway: Determine output path based on feature_id -->
|
|
214
|
+
<block type="gateway" id="G2" mode="exclusive" desc="Determine output path">
|
|
215
|
+
<branch test="${feature_id} != null" name="With feature_id">
|
|
216
|
+
<block type="task" id="B11" action="generate" desc="Copy template and create document with feature_id">
|
|
217
|
+
<field name="template" value="${design_template}"/>
|
|
218
|
+
<field name="placeholders">
|
|
219
|
+
- {Module Name} → ${function.module_name}
|
|
220
|
+
- {Feature Name} → ${feature_name}
|
|
221
|
+
- {Platform ID} → ${platform_id}
|
|
222
|
+
</field>
|
|
223
|
+
<field name="output_path">${iteration_path}/03.system-design/${platform_id}/${feature_id}-${feature_name}-design.md</field>
|
|
224
|
+
<field name="output" var="module_doc_created"/>
|
|
225
|
+
</block>
|
|
226
|
+
</branch>
|
|
227
|
+
<branch default="true" name="Without feature_id (backward compatibility)">
|
|
228
|
+
<block type="task" id="B12" action="generate" desc="Copy template and create document without feature_id">
|
|
229
|
+
<field name="template" value="${design_template}"/>
|
|
230
|
+
<field name="placeholders">
|
|
231
|
+
- {Module Name} → ${function.module_name}
|
|
232
|
+
- {Feature Name} → ${feature_name}
|
|
233
|
+
- {Platform ID} → ${platform_id}
|
|
234
|
+
</field>
|
|
235
|
+
<field name="output_path">${iteration_path}/03.system-design/${platform_id}/${function.module_name}-design.md</field>
|
|
236
|
+
<field name="output" var="module_doc_created"/>
|
|
237
|
+
</block>
|
|
238
|
+
</branch>
|
|
145
239
|
</block>
|
|
146
240
|
|
|
147
|
-
|
|
148
|
-
|
|
241
|
+
<!-- Fill each section using search_replace -->
|
|
242
|
+
<block type="task" id="B13" action="edit-file" desc="Fill Screen/Widget Tree section">
|
|
243
|
+
<field name="path">${module_doc_created.path}</field>
|
|
149
244
|
<field name="operation">search_replace</field>
|
|
150
245
|
<field name="content_source">${feature_spec}${conventions_design}</field>
|
|
151
246
|
<field name="section">Screen/Widget Tree</field>
|
|
247
|
+
<field name="rules">
|
|
248
|
+
- Use actual framework patterns (Flutter Widgets / React Native Components)
|
|
249
|
+
- ALL screen trees MUST use Mermaid syntax
|
|
250
|
+
- Mark each screen/widget as [EXISTING], [MODIFIED], or [NEW]
|
|
251
|
+
</field>
|
|
152
252
|
</block>
|
|
153
253
|
|
|
154
|
-
<block type="task" id="
|
|
155
|
-
<field name="path">${
|
|
254
|
+
<block type="task" id="B14" action="edit-file" desc="Fill Props/Parameters section">
|
|
255
|
+
<field name="path">${module_doc_created.path}</field>
|
|
156
256
|
<field name="operation">search_replace</field>
|
|
157
257
|
<field name="content_source">${conventions_dev}</field>
|
|
158
258
|
<field name="section">Props/Parameters</field>
|
|
259
|
+
<field name="rules">Type definitions from conventions-dev.md</field>
|
|
159
260
|
</block>
|
|
160
261
|
|
|
161
|
-
<block type="task" id="
|
|
162
|
-
<field name="path">${
|
|
262
|
+
<block type="task" id="B15" action="edit-file" desc="Fill State Management section">
|
|
263
|
+
<field name="path">${module_doc_created.path}</field>
|
|
163
264
|
<field name="operation">search_replace</field>
|
|
164
265
|
<field name="content_source">${architecture}${conventions_design}</field>
|
|
165
266
|
<field name="section">State Management</field>
|
|
267
|
+
<field name="rules">
|
|
268
|
+
- Actual store pattern (Provider/Bloc/Riverpod for Flutter, Redux/MobX for React Native)
|
|
269
|
+
- State management diagrams MUST use Mermaid syntax
|
|
270
|
+
</field>
|
|
166
271
|
</block>
|
|
167
272
|
|
|
168
|
-
<block type="task" id="
|
|
169
|
-
<field name="path">${
|
|
273
|
+
<block type="task" id="B16" action="edit-file" desc="Fill API Layer section">
|
|
274
|
+
<field name="path">${module_doc_created.path}</field>
|
|
170
275
|
<field name="operation">search_replace</field>
|
|
171
276
|
<field name="content_source">${api_contract}${conventions_dev}</field>
|
|
172
277
|
<field name="section">API Layer</field>
|
|
278
|
+
<field name="rules">
|
|
279
|
+
- Actual HTTP client (Dio for Flutter, Axios/fetch for React Native)
|
|
280
|
+
- API routes MUST exactly match API Contract
|
|
281
|
+
- Do NOT invent or modify routes
|
|
282
|
+
</field>
|
|
173
283
|
</block>
|
|
174
284
|
|
|
175
|
-
<block type="task" id="
|
|
176
|
-
<field name="path">${
|
|
285
|
+
<block type="task" id="B17" action="edit-file" desc="Fill Navigation section">
|
|
286
|
+
<field name="path">${module_doc_created.path}</field>
|
|
177
287
|
<field name="operation">search_replace</field>
|
|
178
288
|
<field name="content_source">${conventions_design}</field>
|
|
179
289
|
<field name="section">Navigation</field>
|
|
290
|
+
<field name="rules">Actual router config (GoRouter for Flutter, React Navigation for React Native)</field>
|
|
180
291
|
</block>
|
|
181
292
|
|
|
182
|
-
<block type="task" id="
|
|
183
|
-
<field name="path">${
|
|
293
|
+
<block type="task" id="B18" action="edit-file" desc="Fill Local Storage section">
|
|
294
|
+
<field name="path">${module_doc_created.path}</field>
|
|
184
295
|
<field name="operation">search_replace</field>
|
|
185
296
|
<field name="content_source">${conventions_dev}</field>
|
|
186
297
|
<field name="section">Local Storage</field>
|
|
298
|
+
<field name="rules">Actual storage solution (SharedPreferences/Hive/SQLite/MMKV)</field>
|
|
187
299
|
</block>
|
|
188
300
|
|
|
189
|
-
<block type="task" id="
|
|
190
|
-
<field name="path">${
|
|
301
|
+
<block type="task" id="B19" action="edit-file" desc="Fill Platform Features section">
|
|
302
|
+
<field name="path">${module_doc_created.path}</field>
|
|
191
303
|
<field name="operation">search_replace</field>
|
|
192
304
|
<field name="content_source">${function}${tech_stack}</field>
|
|
193
305
|
<field name="section">Platform Features</field>
|
|
306
|
+
<field name="rules">
|
|
307
|
+
- Actual plugin APIs (camera, geolocator, local_notifications, biometrics, etc.)
|
|
308
|
+
- Include iOS/Android permission requirements
|
|
309
|
+
- Document native integration approach
|
|
310
|
+
</field>
|
|
194
311
|
</block>
|
|
195
312
|
|
|
196
|
-
<block type="task" id="
|
|
197
|
-
<field name="path">${
|
|
313
|
+
<block type="task" id="B20" action="edit-file" desc="Fill Pseudo-code section">
|
|
314
|
+
<field name="path">${module_doc_created.path}</field>
|
|
198
315
|
<field name="operation">search_replace</field>
|
|
199
316
|
<field name="content_source">${conventions_dev}${function}</field>
|
|
200
317
|
<field name="section">Pseudo-code</field>
|
|
318
|
+
<field name="rules">
|
|
319
|
+
- MUST use actual framework API syntax from techs knowledge
|
|
320
|
+
- NOT generic pseudo-code
|
|
321
|
+
- Include actual import statements
|
|
322
|
+
- Use actual store/API patterns from conventions
|
|
323
|
+
- Consider offline-first patterns where applicable
|
|
324
|
+
</field>
|
|
325
|
+
</block>
|
|
326
|
+
|
|
327
|
+
<!-- Step 4.3: Verify Output -->
|
|
328
|
+
<block type="task" id="B21" action="verify" desc="Verify completed design document">
|
|
329
|
+
<field name="verification_rules">
|
|
330
|
+
- All sections filled with actual content (no remaining placeholders)
|
|
331
|
+
- Mermaid diagrams render correctly
|
|
332
|
+
- Pseudo-code uses actual framework syntax from techs knowledge
|
|
333
|
+
- Platform features include permission requirements
|
|
334
|
+
- Offline strategy documented where applicable
|
|
335
|
+
- If a section has no applicable content, section title kept with "N/A"
|
|
336
|
+
- All section titles and numbering preserved
|
|
337
|
+
</field>
|
|
338
|
+
<field name="output" var="design_doc_verified"/>
|
|
201
339
|
</block>
|
|
202
340
|
</block>
|
|
203
341
|
|
|
342
|
+
</branch>
|
|
343
|
+
</block>
|
|
344
|
+
|
|
345
|
+
<!-- Gateway: skip_index_generation conditional -->
|
|
346
|
+
<block type="gateway" id="G3" mode="exclusive" desc="Check if skip_index_generation">
|
|
347
|
+
<branch test="${skip_index_generation} == true" name="Skip INDEX.md generation">
|
|
348
|
+
<block type="event" id="E2_skip" action="log" level="info" desc="Skipping INDEX.md generation">
|
|
349
|
+
<field name="message">skip_index_generation=true, skipping Step 5 (INDEX.md will be generated by orchestrator after all workers complete)</field>
|
|
350
|
+
</block>
|
|
351
|
+
</branch>
|
|
352
|
+
<branch default="true" name="Generate INDEX.md">
|
|
353
|
+
|
|
204
354
|
<!-- Step 5: Generate Platform INDEX.md -->
|
|
205
|
-
<block type="task" id="
|
|
355
|
+
<block type="task" id="B22" action="read-file" desc="Read index template">
|
|
206
356
|
<field name="path">speccrew-sd-mobile/templates/INDEX-TEMPLATE.md</field>
|
|
207
357
|
<field name="output" var="index_template"/>
|
|
208
358
|
</block>
|
|
209
359
|
|
|
210
|
-
<block type="task" id="
|
|
360
|
+
<block type="task" id="B23" action="generate" desc="Create INDEX.md from template">
|
|
211
361
|
<field name="template" value="${index_template}"/>
|
|
212
362
|
<field name="placeholders">
|
|
213
363
|
- {Platform Name} → ${platform_id}
|
|
214
364
|
- {Feature Name} → ${feature_name}
|
|
215
365
|
</field>
|
|
216
366
|
<field name="output_path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
|
|
367
|
+
<field name="output" var="index_doc_created"/>
|
|
217
368
|
</block>
|
|
218
369
|
|
|
219
|
-
<block type="task" id="
|
|
370
|
+
<block type="task" id="B24" action="edit-file" desc="Fill Tech Stack Summary">
|
|
220
371
|
<field name="path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
|
|
221
372
|
<field name="operation">search_replace</field>
|
|
222
373
|
<field name="content_source">${tech_stack}</field>
|
|
223
374
|
<field name="section">Tech Stack Summary</field>
|
|
224
375
|
</block>
|
|
225
376
|
|
|
226
|
-
<block type="task" id="
|
|
377
|
+
<block type="task" id="B25" action="edit-file" desc="Fill Target Platforms">
|
|
227
378
|
<field name="path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
|
|
228
379
|
<field name="operation">search_replace</field>
|
|
229
380
|
<field name="content_source">${tech_stack}</field>
|
|
230
381
|
<field name="section">Target Platforms</field>
|
|
231
382
|
</block>
|
|
232
383
|
|
|
233
|
-
<block type="task" id="
|
|
384
|
+
<block type="task" id="B26" action="edit-file" desc="Fill Shared Design Decisions">
|
|
385
|
+
<field name="path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
|
|
386
|
+
<field name="operation">search_replace</field>
|
|
387
|
+
<field name="content_source">${architecture}${conventions_design}</field>
|
|
388
|
+
<field name="section">Shared Design Decisions</field>
|
|
389
|
+
</block>
|
|
390
|
+
|
|
391
|
+
<block type="task" id="B27" action="edit-file" desc="Fill State Management Strategy">
|
|
234
392
|
<field name="path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
|
|
235
393
|
<field name="operation">search_replace</field>
|
|
236
394
|
<field name="content_source">${architecture}</field>
|
|
237
395
|
<field name="section">State Management Strategy</field>
|
|
238
396
|
</block>
|
|
239
397
|
|
|
240
|
-
<block type="task" id="
|
|
398
|
+
<block type="task" id="B28" action="edit-file" desc="Fill Base Widgets/Components">
|
|
241
399
|
<field name="path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
|
|
242
400
|
<field name="operation">search_replace</field>
|
|
243
401
|
<field name="content_source">${conventions_design}</field>
|
|
244
402
|
<field name="section">Base Widgets/Components</field>
|
|
245
403
|
</block>
|
|
246
404
|
|
|
247
|
-
<block type="task" id="
|
|
405
|
+
<block type="task" id="B29" action="edit-file" desc="Fill API Client Configuration">
|
|
248
406
|
<field name="path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
|
|
249
407
|
<field name="operation">search_replace</field>
|
|
250
|
-
<field name="content_source">${
|
|
251
|
-
<field name="section">
|
|
408
|
+
<field name="content_source">${conventions_dev}</field>
|
|
409
|
+
<field name="section">API Client Configuration</field>
|
|
410
|
+
</block>
|
|
411
|
+
|
|
412
|
+
<block type="task" id="B30" action="edit-file" desc="Fill Auth Pattern">
|
|
413
|
+
<field name="path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
|
|
414
|
+
<field name="operation">search_replace</field>
|
|
415
|
+
<field name="content_source">${architecture}</field>
|
|
416
|
+
<field name="section">Auth Pattern</field>
|
|
252
417
|
</block>
|
|
253
418
|
|
|
254
|
-
<block type="task" id="
|
|
419
|
+
<block type="task" id="B31" action="edit-file" desc="Fill Third-party SDKs">
|
|
255
420
|
<field name="path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
|
|
256
421
|
<field name="operation">search_replace</field>
|
|
257
422
|
<field name="content_source">${tech_stack}</field>
|
|
258
423
|
<field name="section">Third-party SDKs</field>
|
|
259
424
|
</block>
|
|
260
425
|
|
|
426
|
+
<block type="task" id="B32" action="edit-file" desc="Fill Module List">
|
|
427
|
+
<field name="path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
|
|
428
|
+
<field name="operation">search_replace</field>
|
|
429
|
+
<field name="content_source">${extracted_functions}</field>
|
|
430
|
+
<field name="section">Module List</field>
|
|
431
|
+
<field name="module_list_rules">
|
|
432
|
+
- Column ID: Use feature_id if available (e.g., F-CRM-01), otherwise use module name
|
|
433
|
+
- Column Name: Feature or module name
|
|
434
|
+
- Column Document: Link to design file (e.g., F-CRM-01-customer-list-design.md)
|
|
435
|
+
- Column Status: [NEW], [MODIFIED], or [EXISTING]
|
|
436
|
+
- Example row: | F-CRM-01 | Customer List | F-CRM-01-customer-list-design.md | NEW |
|
|
437
|
+
</field>
|
|
438
|
+
</block>
|
|
439
|
+
|
|
440
|
+
<!-- Step 5.4: Verify INDEX.md Output -->
|
|
441
|
+
<block type="task" id="B33" action="verify" desc="Verify completed INDEX.md">
|
|
442
|
+
<field name="verification_rules">
|
|
443
|
+
- All sections filled with actual content (no remaining placeholders)
|
|
444
|
+
- All module design documents are correctly linked
|
|
445
|
+
- Platform-level summary is complete
|
|
446
|
+
- Target platforms (iOS/Android versions) documented
|
|
447
|
+
- Third-party SDKs listed
|
|
448
|
+
</field>
|
|
449
|
+
<field name="output" var="index_doc_verified"/>
|
|
450
|
+
</block>
|
|
451
|
+
|
|
452
|
+
</branch>
|
|
453
|
+
</block>
|
|
454
|
+
|
|
261
455
|
<!-- Step 6: Present Summary -->
|
|
262
|
-
<block type="event" id="
|
|
456
|
+
<block type="event" id="E3" action="log" level="info" desc="Present design summary">
|
|
263
457
|
<field name="message">Mobile System Design Summary for: ${feature_name}
|
|
264
458
|
Platform: ${platform_id}
|
|
265
459
|
|
|
@@ -273,12 +467,40 @@ Key Design Decisions:
|
|
|
273
467
|
- Local Storage: ${conventions_dev.storage_pattern}
|
|
274
468
|
- Platform Features: ${extracted_functions.platform_features}
|
|
275
469
|
|
|
470
|
+
Concerns/Trade-offs:
|
|
471
|
+
- ${concerns_list}
|
|
472
|
+
|
|
276
473
|
Please confirm:
|
|
277
474
|
1. Are the screen architectures appropriate?
|
|
278
475
|
2. Is the state management strategy correct?
|
|
279
476
|
3. Do the pseudo-code patterns match project conventions?
|
|
280
477
|
4. Are all API calls from API Contract covered?
|
|
281
|
-
5. Are platform-specific features properly handled?</field>
|
|
478
|
+
5. Are platform-specific features (permissions, native integration) properly handled?</field>
|
|
479
|
+
</block>
|
|
480
|
+
|
|
481
|
+
<!-- Step 7: Update Task Status (conditional) -->
|
|
482
|
+
<block type="gateway" id="G4" mode="exclusive" desc="Check if dispatch_progress_file provided">
|
|
483
|
+
<branch test="${dispatch_progress_file} != null AND ${task_id} != null" name="Update task status">
|
|
484
|
+
<block type="gateway" id="G4a" mode="exclusive" desc="Determine success or failure">
|
|
485
|
+
<branch test="${workflow_status} == 'SUCCESS'" name="Mark completed">
|
|
486
|
+
<block type="task" id="B34" action="run-script" desc="Update task status to completed">
|
|
487
|
+
<field name="command">node "${update_progress_script}" update-task --file "${dispatch_progress_file}" --task-id "${task_id}" --status completed</field>
|
|
488
|
+
<field name="output" var="status_update_result"/>
|
|
489
|
+
</block>
|
|
490
|
+
</branch>
|
|
491
|
+
<branch default="true" name="Mark failed">
|
|
492
|
+
<block type="task" id="B35" action="run-script" desc="Update task status to failed">
|
|
493
|
+
<field name="command">node "${update_progress_script}" update-task --file "${dispatch_progress_file}" --task-id "${task_id}" --status failed</field>
|
|
494
|
+
<field name="output" var="status_update_result"/>
|
|
495
|
+
</block>
|
|
496
|
+
</branch>
|
|
497
|
+
</block>
|
|
498
|
+
</branch>
|
|
499
|
+
<branch default="true" name="No status update needed">
|
|
500
|
+
<block type="event" id="E4" action="log" level="info" desc="No dispatch_progress_file provided">
|
|
501
|
+
<field name="message">dispatch_progress_file or task_id not provided, skipping status update</field>
|
|
502
|
+
</block>
|
|
503
|
+
</branch>
|
|
282
504
|
</block>
|
|
283
505
|
|
|
284
506
|
</sequence>
|
|
@@ -286,16 +508,56 @@ Please confirm:
|
|
|
286
508
|
<!-- ============================================================
|
|
287
509
|
Output Results
|
|
288
510
|
============================================================ -->
|
|
289
|
-
<block type="output" id="O1" desc="Workflow output results">
|
|
511
|
+
<block type="output" id="O1" desc="Workflow output results - SUCCESS scenario">
|
|
290
512
|
<field name="status" value="SUCCESS" type="string" desc="Task completion status"/>
|
|
291
|
-
<field name="task_id" from="${task_id}" type="string" desc="Task ID"/>
|
|
513
|
+
<field name="task_id" from="${task_id}" type="string" desc="Task ID from context"/>
|
|
292
514
|
<field name="platform" value="${platform_id}" type="string" desc="Target platform"/>
|
|
515
|
+
<field name="feature_id" from="${feature_id}" type="string" desc="Feature ID"/>
|
|
293
516
|
<field name="feature" value="${feature_name}" type="string" desc="Feature name"/>
|
|
294
517
|
<field name="output_files" type="array" desc="List of generated files">
|
|
295
518
|
<field name="file">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
|
|
296
519
|
<field name="files" from="${extracted_functions.output_files}"/>
|
|
297
520
|
</field>
|
|
298
|
-
<field name="summary" value="Mobile system design completed for ${feature_name} on ${platform_id}" type="string" desc="Completion summary"/>
|
|
521
|
+
<field name="summary" value="Mobile system design completed for ${feature_name} on ${platform_id} with ${extracted_functions.design_count} module designs" type="string" desc="Completion summary"/>
|
|
522
|
+
</block>
|
|
523
|
+
|
|
524
|
+
<block type="output" id="O2" desc="Workflow output results - FAILED scenario">
|
|
525
|
+
<field name="status" value="FAILED" type="string" desc="Task completion status"/>
|
|
526
|
+
<field name="task_id" from="${task_id}" type="string" desc="Task ID from context"/>
|
|
527
|
+
<field name="platform" value="${platform_id}" type="string" desc="Target platform"/>
|
|
528
|
+
<field name="feature_id" from="${feature_id}" type="string" desc="Feature ID"/>
|
|
529
|
+
<field name="feature" value="${feature_name}" type="string" desc="Feature name"/>
|
|
530
|
+
<field name="output_files" value="[]" type="array" desc="No output files generated"/>
|
|
531
|
+
<field name="error" type="string" desc="Description of what went wrong"/>
|
|
532
|
+
<field name="error_category" type="string" desc="DEPENDENCY_MISSING | VALIDATION_ERROR | BLOCKED"/>
|
|
533
|
+
<field name="recovery_hint" type="string" desc="Suggestion for how to resolve or retry"/>
|
|
534
|
+
</block>
|
|
535
|
+
|
|
536
|
+
<!-- ============================================================
|
|
537
|
+
Quality Verification Checklist
|
|
538
|
+
============================================================ -->
|
|
539
|
+
<block type="checklist" id="CK1" desc="Quality verification checklist">
|
|
540
|
+
<field name="item">All techs knowledge documents loaded before design</field>
|
|
541
|
+
<field name="item">Existing code structure analyzed via Glob/Grep</field>
|
|
542
|
+
<field name="item">Every Feature Spec function covered in a module design</field>
|
|
543
|
+
<field name="item">All API calls from API Contract referenced correctly</field>
|
|
544
|
+
<field name="item">Pseudo-code uses actual framework syntax (not generic)</field>
|
|
545
|
+
<field name="item">Screen/widget naming follows conventions-dev.md</field>
|
|
546
|
+
<field name="item">State management follows architecture.md patterns</field>
|
|
547
|
+
<field name="item">Navigation follows conventions-design.md</field>
|
|
548
|
+
<field name="item">Local storage strategy documented</field>
|
|
549
|
+
<field name="item">Platform permissions and native integrations documented</field>
|
|
550
|
+
<field name="item">App lifecycle handling documented</field>
|
|
551
|
+
<field name="item">INDEX.md generated with complete module list</field>
|
|
552
|
+
<field name="item">All files written to correct paths under 03.system-design/{platform_id}/</field>
|
|
553
|
+
<field name="item">Output file named as {feature_id}-{feature_name}-design.md</field>
|
|
554
|
+
<field name="item">Checkpoint A passed (or skipped via skip_confirmation)</field>
|
|
555
|
+
<field name="item">No TODO/FIXME placeholders - all screens have complete pseudocode</field>
|
|
556
|
+
<field name="item">API routes match API Contract exactly</field>
|
|
557
|
+
<field name="item">Cross-Feature dependencies explicitly marked</field>
|
|
558
|
+
<field name="item">Mermaid diagrams used - no ASCII text diagrams</field>
|
|
559
|
+
<field name="item">Offline-first patterns considered where applicable</field>
|
|
560
|
+
<field name="item">Platform-specific features use actual plugin APIs</field>
|
|
299
561
|
</block>
|
|
300
562
|
|
|
301
563
|
</workflow>
|