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.
@@ -5,12 +5,17 @@
5
5
  Input Parameters Definition
6
6
  ============================================================ -->
7
7
  <block type="input" id="I1" desc="Workflow input parameters">
8
- <field name="feature_id" required="false" type="string" desc="Feature identifier, e.g., F-CRM-01"/>
8
+ <field name="feature_id" required="false" type="string" desc="Feature identifier, e.g., F-CRM-01. If provided, use new naming format"/>
9
9
  <field name="feature_name" required="true" type="string" desc="Feature name, e.g., customer-list"/>
10
10
  <field name="platform_id" required="true" type="string" desc="Target platform, e.g., frontend-vue, frontend-react"/>
11
11
  <field name="iteration_path" required="true" type="string" desc="Absolute path to iteration directory"/>
12
12
  <field name="workspace_path" required="true" type="string" desc="Absolute path to speccrew-workspace"/>
13
- <field name="task_id" required="false" type="string" desc="Task ID from dispatch context"/>
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"/>
14
19
  </block>
15
20
 
16
21
  <!-- ============================================================
@@ -18,7 +23,8 @@
18
23
  ============================================================ -->
19
24
  <block type="rule" id="R1" level="forbidden" desc="Document creation constraints">
20
25
  <field name="text">NEVER use create_file to write design documents or INDEX directly</field>
21
- <field name="text">MUST create by copying template then filling with search_replace</field>
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>
22
28
  </block>
23
29
 
24
30
  <block type="rule" id="R2" level="forbidden" desc="Full-file rewrite prohibition">
@@ -34,11 +40,46 @@
34
40
  <block type="rule" id="R4" level="mandatory" desc="Actual framework syntax">
35
41
  <field name="text">All pseudo-code MUST use actual framework/library syntax from techs knowledge</field>
36
42
  <field name="text">NOT generic pseudo-code</field>
43
+ <field name="text">Include actual import statements</field>
44
+ <field name="text">Use actual store/API patterns from conventions</field>
37
45
  </block>
38
46
 
39
47
  <block type="rule" id="R5" level="forbidden" desc="TODO/FIXME placeholders">
40
48
  <field name="text">Design documents MUST contain complete implementation logic</field>
41
49
  <field name="text">Do NOT use TODO, FIXME, HACK, or any placeholder comments</field>
50
+ <field name="text">Every component, method, and interaction 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 component trees, interaction flows, and state management 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 components 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">Component naming follows conventions-dev.md</field>
82
+ <field name="text">Directory structure follows conventions-design.md</field>
42
83
  </block>
43
84
 
44
85
  <!-- ============================================================
@@ -46,6 +87,15 @@
46
87
  ============================================================ -->
47
88
  <sequence id="S1" name="Frontend System Design" status="pending" desc="Generate frontend detailed design documents">
48
89
 
90
+ <!-- Gateway: index_only conditional -->
91
+ <block type="gateway" id="G0" mode="exclusive" desc="Check if index_only mode">
92
+ <branch test="${index_only} == true" name="Index only - skip to Step 5">
93
+ <block type="event" id="E0" action="log" level="info" desc="index_only mode active">
94
+ <field name="message">index_only=true, skipping Steps 1-4 and jumping directly to Step 5 (INDEX.md generation)</field>
95
+ </block>
96
+ </branch>
97
+ <branch default="true" name="Full workflow">
98
+
49
99
  <!-- Step 1: Read Inputs -->
50
100
  <block type="task" id="B1" action="read-file" desc="Read Feature Spec document">
51
101
  <field name="path">${iteration_path}/02.feature-design/${feature_id}-${feature_name}-feature-spec.md</field>
@@ -90,33 +140,41 @@
90
140
  <!-- Step 2: Analyze Existing Code Structure -->
91
141
  <block type="task" id="B8" action="analyze" desc="Analyze frontend codebase structure">
92
142
  <field name="analysis_targets">
93
- - Component directory: src/components/**/*.{vue,tsx}
94
- - Shared/base components: src/components/base/**/*
95
- - State management: src/stores/**/*.ts or src/store/**/*.ts
96
- - Router configuration: src/router/**/*.ts
97
- - API layer: src/apis/**/*.ts or src/api/**/*.ts
98
- - Naming conventions from existing code
143
+ - Component directory: src/components/**/*.{vue,tsx} — Understand component organization
144
+ - Shared/base components: src/components/base/**/* — Identify reusable components
145
+ - State management: src/stores/**/*.ts or src/store/**/*.ts — Understand store pattern
146
+ - Router configuration: src/router/**/*.ts — Understand routing structure
147
+ - API layer: src/apis/**/*.ts or src/api/**/*.ts — Understand API encapsulation pattern
148
+ - Naming conventions: Various Identify actual naming patterns in use
99
149
  </field>
100
150
  <field name="output" var="codebase_analysis"/>
101
151
  </block>
102
152
 
103
153
  <!-- Step 3: Extract Functions from Feature Spec -->
104
- <block type="task" id="B9" action="analyze" desc="Extract frontend functions">
154
+ <block type="task" id="B9" action="analyze" desc="Extract frontend functions from Feature Spec">
105
155
  <field name="input" value="${feature_spec}">${api_contract}</field>
106
156
  <field name="extraction_rules">
107
157
  - Parse Feature Spec Section 2.N pattern
158
+ - Each Feature Spec typically contains 3-8 functions (fine-grained format)
108
159
  - Extract frontend prototype (ASCII wireframe)
109
- - Extract interaction flow
160
+ - Extract interaction flow (user actions and system responses)
110
161
  - Extract backend API calls from API Contract
111
- - Extract data requirements
162
+ - Extract data requirements (fields and structures needed)
112
163
  - Mark components as [EXISTING], [MODIFIED], or [NEW]
113
164
  </field>
114
165
  <field name="output" var="extracted_functions"/>
115
166
  </block>
116
167
 
117
- <!-- Checkpoint A: Present function extraction summary -->
118
- <block type="event" id="E1" action="confirm" title="Function Extraction Confirmation" type="yesno" desc="Present function extraction summary">
119
- <field name="preview">Frontend Functions Extracted for: ${feature_name}
168
+ <!-- Checkpoint A: Function Extraction Confirmation -->
169
+ <block type="gateway" id="G1" mode="exclusive" desc="Handle Checkpoint A - skip_confirmation gateway">
170
+ <branch test="${skip_confirmation} == true" name="Skip confirmation - auto proceed">
171
+ <block type="event" id="E1_skip" action="log" level="info" desc="Skipping Checkpoint A">
172
+ <field name="message">skip_confirmation=true, logging function extraction summary and proceeding automatically</field>
173
+ </block>
174
+ </branch>
175
+ <branch default="true" name="Request user confirmation">
176
+ <block type="event" id="E1" action="confirm" title="Function Extraction Confirmation - Checkpoint A" type="yesno" desc="Present function extraction summary">
177
+ <field name="preview">Frontend Functions Extracted for: ${feature_name}
120
178
  Platform: ${platform_id}
121
179
 
122
180
  Function Extraction Summary:
@@ -128,6 +186,8 @@ Component Markers:
128
186
  - [EXISTING]: ${extracted_functions.existing_count} components
129
187
 
130
188
  Confirm function extraction before proceeding?</field>
189
+ </block>
190
+ </branch>
131
191
  </block>
132
192
 
133
193
  <!-- Step 4: Generate Module Design Documents -->
@@ -138,9 +198,10 @@ Confirm function extraction before proceeding?</field>
138
198
 
139
199
  <!-- Loop: Generate design for each function -->
140
200
  <block type="loop" id="L1" over="${extracted_functions.functions}" as="function" desc="Generate module design documents">
141
- <block type="gateway" id="G1" mode="exclusive" desc="Determine output path">
201
+ <!-- Gateway: Determine output path based on feature_id -->
202
+ <block type="gateway" id="G2" mode="exclusive" desc="Determine output path">
142
203
  <branch test="${feature_id} != null" name="With feature_id">
143
- <block type="task" id="B11" action="generate" desc="Copy template and create document">
204
+ <block type="task" id="B11" action="generate" desc="Copy template and create document with feature_id">
144
205
  <field name="template" value="${design_template}"/>
145
206
  <field name="placeholders">
146
207
  - {Module Name} → ${function.module_name}
@@ -151,8 +212,8 @@ Confirm function extraction before proceeding?</field>
151
212
  <field name="output" var="module_doc_created"/>
152
213
  </block>
153
214
  </branch>
154
- <branch default="true" name="Without feature_id">
155
- <block type="task" id="B12" action="generate" desc="Copy template and create document">
215
+ <branch default="true" name="Without feature_id (backward compatibility)">
216
+ <block type="task" id="B12" action="generate" desc="Copy template and create document without feature_id">
156
217
  <field name="template" value="${design_template}"/>
157
218
  <field name="placeholders">
158
219
  - {Module Name} → ${function.module_name}
@@ -165,11 +226,17 @@ Confirm function extraction before proceeding?</field>
165
226
  </branch>
166
227
  </block>
167
228
 
229
+ <!-- Fill each section using search_replace -->
168
230
  <block type="task" id="B13" action="edit-file" desc="Fill Component Tree section">
169
231
  <field name="path">${module_doc_created.path}</field>
170
232
  <field name="operation">search_replace</field>
171
233
  <field name="content_source">${feature_spec}${conventions_design}</field>
172
234
  <field name="section">Component Tree</field>
235
+ <field name="rules">
236
+ - Use actual framework patterns (Vue 3 Composition API / React Hooks / etc.)
237
+ - ALL component trees MUST use Mermaid syntax
238
+ - Mark each component as [EXISTING], [MODIFIED], or [NEW]
239
+ </field>
173
240
  </block>
174
241
 
175
242
  <block type="task" id="B14" action="edit-file" desc="Fill Props/Emits section">
@@ -177,6 +244,7 @@ Confirm function extraction before proceeding?</field>
177
244
  <field name="operation">search_replace</field>
178
245
  <field name="content_source">${conventions_dev}</field>
179
246
  <field name="section">Props/Emits</field>
247
+ <field name="rules">TypeScript types from conventions-dev.md</field>
180
248
  </block>
181
249
 
182
250
  <block type="task" id="B15" action="edit-file" desc="Fill State Management section">
@@ -184,6 +252,10 @@ Confirm function extraction before proceeding?</field>
184
252
  <field name="operation">search_replace</field>
185
253
  <field name="content_source">${architecture}${conventions_design}</field>
186
254
  <field name="section">State Management</field>
255
+ <field name="rules">
256
+ - Actual store pattern (Pinia/Vuex/Redux/Zustand)
257
+ - State management diagrams MUST use Mermaid syntax
258
+ </field>
187
259
  </block>
188
260
 
189
261
  <block type="task" id="B16" action="edit-file" desc="Fill API Layer section">
@@ -191,6 +263,11 @@ Confirm function extraction before proceeding?</field>
191
263
  <field name="operation">search_replace</field>
192
264
  <field name="content_source">${api_contract}${conventions_dev}</field>
193
265
  <field name="section">API Layer</field>
266
+ <field name="rules">
267
+ - Actual request library and interceptor patterns
268
+ - API routes MUST exactly match API Contract
269
+ - Do NOT invent or modify routes
270
+ </field>
194
271
  </block>
195
272
 
196
273
  <block type="task" id="B17" action="edit-file" desc="Fill Routing section">
@@ -198,6 +275,7 @@ Confirm function extraction before proceeding?</field>
198
275
  <field name="operation">search_replace</field>
199
276
  <field name="content_source">${conventions_design}</field>
200
277
  <field name="section">Routing</field>
278
+ <field name="rules">Actual router config format</field>
201
279
  </block>
202
280
 
203
281
  <block type="task" id="B18" action="edit-file" desc="Fill Pseudo-code section">
@@ -205,61 +283,126 @@ Confirm function extraction before proceeding?</field>
205
283
  <field name="operation">search_replace</field>
206
284
  <field name="content_source">${conventions_dev}${function}</field>
207
285
  <field name="section">Pseudo-code</field>
286
+ <field name="rules">
287
+ - MUST use actual framework API syntax from techs knowledge
288
+ - NOT generic pseudo-code
289
+ - Include actual import statements
290
+ - Use actual store/API patterns from conventions
291
+ </field>
292
+ </block>
293
+
294
+ <!-- Step 4.3: Verify Output -->
295
+ <block type="task" id="B19" action="verify" desc="Verify completed design document">
296
+ <field name="verification_rules">
297
+ - All sections filled with actual content (no remaining placeholders)
298
+ - Mermaid diagrams render correctly
299
+ - Pseudo-code uses actual framework syntax from techs knowledge
300
+ - If a section has no applicable content, section title kept with "N/A"
301
+ - All section titles and numbering preserved
302
+ </field>
303
+ <field name="output" var="design_doc_verified"/>
208
304
  </block>
209
305
  </block>
210
306
 
307
+ </branch>
308
+ </block>
309
+
310
+ <!-- Gateway: skip_index_generation conditional -->
311
+ <block type="gateway" id="G3" mode="exclusive" desc="Check if skip_index_generation">
312
+ <branch test="${skip_index_generation} == true" name="Skip INDEX.md generation">
313
+ <block type="event" id="E2_skip" action="log" level="info" desc="Skipping INDEX.md generation">
314
+ <field name="message">skip_index_generation=true, skipping Step 5 (INDEX.md will be generated by orchestrator after all workers complete)</field>
315
+ </block>
316
+ </branch>
317
+ <branch default="true" name="Generate INDEX.md">
318
+
211
319
  <!-- Step 5: Generate Platform INDEX.md -->
212
- <block type="task" id="B19" action="read-file" desc="Read index template">
320
+ <block type="task" id="B20" action="read-file" desc="Read index template">
213
321
  <field name="path">speccrew-sd-frontend/templates/INDEX-TEMPLATE.md</field>
214
322
  <field name="output" var="index_template"/>
215
323
  </block>
216
324
 
217
- <block type="task" id="B20" action="generate" desc="Create INDEX.md from template">
325
+ <block type="task" id="B21" action="generate" desc="Create INDEX.md from template">
218
326
  <field name="template" value="${index_template}"/>
219
327
  <field name="placeholders">
220
328
  - {Platform Name} → ${platform_id}
221
329
  - {Feature Name} → ${feature_name}
222
330
  </field>
223
331
  <field name="output_path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
332
+ <field name="output" var="index_doc_created"/>
224
333
  </block>
225
334
 
226
- <block type="task" id="B21" action="edit-file" desc="Fill Tech Stack Summary">
335
+ <block type="task" id="B22" action="edit-file" desc="Fill Tech Stack Summary">
227
336
  <field name="path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
228
337
  <field name="operation">search_replace</field>
229
338
  <field name="content_source">${tech_stack}</field>
230
339
  <field name="section">Tech Stack Summary</field>
231
340
  </block>
232
341
 
233
- <block type="task" id="B22" action="edit-file" desc="Fill Shared Design Decisions">
342
+ <block type="task" id="B23" action="edit-file" desc="Fill Shared Design Decisions">
234
343
  <field name="path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
235
344
  <field name="operation">search_replace</field>
236
345
  <field name="content_source">${architecture}${conventions_design}</field>
237
346
  <field name="section">Shared Design Decisions</field>
238
347
  </block>
239
348
 
240
- <block type="task" id="B23" action="edit-file" desc="Fill Global State Strategy">
349
+ <block type="task" id="B24" action="edit-file" desc="Fill Global State Strategy">
241
350
  <field name="path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
242
351
  <field name="operation">search_replace</field>
243
352
  <field name="content_source">${architecture}</field>
244
353
  <field name="section">Global State Strategy</field>
245
354
  </block>
246
355
 
247
- <block type="task" id="B24" action="edit-file" desc="Fill Base Components">
356
+ <block type="task" id="B25" action="edit-file" desc="Fill Base Components">
248
357
  <field name="path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
249
358
  <field name="operation">search_replace</field>
250
359
  <field name="content_source">${conventions_design}</field>
251
360
  <field name="section">Base Components</field>
252
361
  </block>
253
362
 
254
- <block type="task" id="B25" action="edit-file" desc="Fill Module List">
363
+ <block type="task" id="B26" action="edit-file" desc="Fill API Interceptor Config">
364
+ <field name="path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
365
+ <field name="operation">search_replace</field>
366
+ <field name="content_source">${conventions_dev}</field>
367
+ <field name="section">API Interceptor Config</field>
368
+ </block>
369
+
370
+ <block type="task" id="B27" action="edit-file" desc="Fill Auth Pattern">
371
+ <field name="path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
372
+ <field name="operation">search_replace</field>
373
+ <field name="content_source">${architecture}</field>
374
+ <field name="section">Auth Pattern</field>
375
+ </block>
376
+
377
+ <block type="task" id="B28" action="edit-file" desc="Fill Module List">
255
378
  <field name="path">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
256
379
  <field name="operation">search_replace</field>
257
380
  <field name="content_source">${extracted_functions}</field>
258
381
  <field name="section">Module List</field>
382
+ <field name="module_list_rules">
383
+ - Column ID: Use feature_id if available (e.g., F-CRM-01), otherwise use module name
384
+ - Column Name: Feature or module name
385
+ - Column Document: Link to design file (e.g., F-CRM-01-customer-list-design.md)
386
+ - Column Status: [NEW], [MODIFIED], or [EXISTING]
387
+ - Example row: | F-CRM-01 | Customer List | F-CRM-01-customer-list-design.md | NEW |
388
+ </field>
389
+ </block>
390
+
391
+ <!-- Step 5.4: Verify INDEX.md Output -->
392
+ <block type="task" id="B29" action="verify" desc="Verify completed INDEX.md">
393
+ <field name="verification_rules">
394
+ - All sections filled with actual content (no remaining placeholders)
395
+ - All module design documents are correctly linked
396
+ - Platform-level summary is complete
397
+ </field>
398
+ <field name="output" var="index_doc_verified"/>
399
+ </block>
400
+
401
+ </branch>
259
402
  </block>
260
403
 
261
404
  <!-- Step 6: Present Summary -->
262
- <block type="event" id="E2" action="log" level="info" desc="Present design summary">
405
+ <block type="event" id="E3" action="log" level="info" desc="Present design summary">
263
406
  <field name="message">Frontend System Design Summary for: ${feature_name}
264
407
  Platform: ${platform_id}
265
408
 
@@ -271,6 +414,9 @@ Key Design Decisions:
271
414
  - Component Strategy: ${conventions_design.component_strategy}
272
415
  - API Layer: ${conventions_dev.api_pattern}
273
416
 
417
+ Concerns/Trade-offs:
418
+ - ${concerns_list}
419
+
274
420
  Please confirm:
275
421
  1. Are the component architectures appropriate?
276
422
  2. Is the state management strategy correct?
@@ -278,14 +424,39 @@ Please confirm:
278
424
  4. Are all API calls from API Contract covered?</field>
279
425
  </block>
280
426
 
427
+ <!-- Step 7: Update Task Status (conditional) -->
428
+ <block type="gateway" id="G4" mode="exclusive" desc="Check if dispatch_progress_file provided">
429
+ <branch test="${dispatch_progress_file} != null AND ${task_id} != null" name="Update task status">
430
+ <block type="gateway" id="G4a" mode="exclusive" desc="Determine success or failure">
431
+ <branch test="${workflow_status} == 'SUCCESS'" name="Mark completed">
432
+ <block type="task" id="B30" action="run-script" desc="Update task status to completed">
433
+ <field name="command">node "${update_progress_script}" update-task --file "${dispatch_progress_file}" --task-id "${task_id}" --status completed</field>
434
+ <field name="output" var="status_update_result"/>
435
+ </block>
436
+ </branch>
437
+ <branch default="true" name="Mark failed">
438
+ <block type="task" id="B31" action="run-script" desc="Update task status to failed">
439
+ <field name="command">node "${update_progress_script}" update-task --file "${dispatch_progress_file}" --task-id "${task_id}" --status failed</field>
440
+ <field name="output" var="status_update_result"/>
441
+ </block>
442
+ </branch>
443
+ </block>
444
+ </branch>
445
+ <branch default="true" name="No status update needed">
446
+ <block type="event" id="E4" action="log" level="info" desc="No dispatch_progress_file provided">
447
+ <field name="message">dispatch_progress_file or task_id not provided, skipping status update</field>
448
+ </block>
449
+ </branch>
450
+ </block>
451
+
281
452
  </sequence>
282
453
 
283
454
  <!-- ============================================================
284
455
  Output Results
285
456
  ============================================================ -->
286
- <block type="output" id="O1" desc="Workflow output results">
457
+ <block type="output" id="O1" desc="Workflow output results - SUCCESS scenario">
287
458
  <field name="status" value="SUCCESS" type="string" desc="Task completion status"/>
288
- <field name="task_id" from="${task_id}" type="string" desc="Task ID"/>
459
+ <field name="task_id" from="${task_id}" type="string" desc="Task ID from context"/>
289
460
  <field name="platform" value="${platform_id}" type="string" desc="Target platform"/>
290
461
  <field name="feature_id" from="${feature_id}" type="string" desc="Feature ID"/>
291
462
  <field name="feature" value="${feature_name}" type="string" desc="Feature name"/>
@@ -293,7 +464,41 @@ Please confirm:
293
464
  <field name="file">${iteration_path}/03.system-design/${platform_id}/INDEX.md</field>
294
465
  <field name="files" from="${extracted_functions.output_files}"/>
295
466
  </field>
296
- <field name="summary" value="Frontend system design completed for ${feature_name} on ${platform_id}" type="string" desc="Completion summary"/>
467
+ <field name="summary" value="Frontend system design completed for ${feature_name} on ${platform_id} with ${extracted_functions.design_count} module designs" type="string" desc="Completion summary"/>
468
+ </block>
469
+
470
+ <block type="output" id="O2" desc="Workflow output results - FAILED scenario">
471
+ <field name="status" value="FAILED" type="string" desc="Task completion status"/>
472
+ <field name="task_id" from="${task_id}" type="string" desc="Task ID from context"/>
473
+ <field name="platform" value="${platform_id}" type="string" desc="Target platform"/>
474
+ <field name="feature_id" from="${feature_id}" type="string" desc="Feature ID"/>
475
+ <field name="feature" value="${feature_name}" type="string" desc="Feature name"/>
476
+ <field name="output_files" value="[]" type="array" desc="No output files generated"/>
477
+ <field name="error" type="string" desc="Description of what went wrong"/>
478
+ <field name="error_category" type="string" desc="DEPENDENCY_MISSING | VALIDATION_ERROR | BLOCKED"/>
479
+ <field name="recovery_hint" type="string" desc="Suggestion for how to resolve or retry"/>
480
+ </block>
481
+
482
+ <!-- ============================================================
483
+ Quality Verification Checklist
484
+ ============================================================ -->
485
+ <block type="checklist" id="CK1" desc="Quality verification checklist">
486
+ <field name="item">All techs knowledge documents loaded before design</field>
487
+ <field name="item">Existing code structure analyzed via Glob/Grep</field>
488
+ <field name="item">Every Feature Spec function covered in a module design</field>
489
+ <field name="item">All API calls from API Contract referenced correctly</field>
490
+ <field name="item">Pseudo-code uses actual framework syntax (not generic)</field>
491
+ <field name="item">Component naming follows conventions-dev.md</field>
492
+ <field name="item">State management follows architecture.md patterns</field>
493
+ <field name="item">Directory structure follows conventions-design.md</field>
494
+ <field name="item">INDEX.md generated with complete module list</field>
495
+ <field name="item">All files written to correct paths under 03.system-design/{platform_id}/</field>
496
+ <field name="item">Output file named as {feature_id}-{feature_name}-design.md</field>
497
+ <field name="item">Checkpoint A passed (or skipped via skip_confirmation)</field>
498
+ <field name="item">No TODO/FIXME placeholders - all components have complete pseudocode</field>
499
+ <field name="item">API routes match API Contract exactly</field>
500
+ <field name="item">Cross-Feature dependencies explicitly marked</field>
501
+ <field name="item">Mermaid diagrams used - no ASCII text diagrams</field>
297
502
  </block>
298
503
 
299
504
  </workflow>