speccrew 0.6.42 → 0.6.44

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.
@@ -24,31 +24,31 @@ Worker Agent (speccrew-task-worker)
24
24
 
25
25
  | Variable | Type | Description | Example |
26
26
  |----------|------|-------------|---------|
27
- | `{{platform_id}}` | string | Platform identifier | `"web-react"`, `"backend-nestjs"` |
28
- | `{{platform_type}}` | string | Platform type | `web`, `mobile`, `backend`, `desktop`, `api` |
29
- | `{{framework}}` | string | Primary framework | `react`, `nestjs`, `flutter`, etc. |
30
- | `{{source_path}}` | string | Platform source directory | `"frontend-web"` |
31
- | `{{config_files}}` | array | List of configuration file paths | `["package.json", "tsconfig.json"]` |
32
- | `{{convention_files}}` | array | List of convention file paths | `[".eslintrc.js", ".prettierrc"]` |
33
- | `{{output_path}}` | string | Output directory for generated documents | `speccrew-workspace/knowledges/techs/{platform_id}/` |
34
- | `{{language}}` | string | Target language for generated content | `"zh"`, `"en"` |
35
- | `{{completed_dir}}` | string | (Optional) Directory for analysis coverage report output | `speccrew-workspace/iterations/...` |
27
+ | `${platform_id}` | string | Platform identifier | `"web-react"`, `"backend-nestjs"` |
28
+ | `${platform_type}` | string | Platform type | `web`, `mobile`, `backend`, `desktop`, `api` |
29
+ | `${framework}` | string | Primary framework | `react`, `nestjs`, `flutter`, etc. |
30
+ | `${source_path}` | string | Platform source directory | `"frontend-web"` |
31
+ | `${config_files}` | array | List of configuration file paths | `["package.json", "tsconfig.json"]` |
32
+ | `${convention_files}` | array | List of convention file paths | `[".eslintrc.js", ".prettierrc"]` |
33
+ | `${output_path}` | string | Output directory for generated documents | `speccrew-workspace/knowledges/techs/{platform_id}/` |
34
+ | `${language}` | string | Target language for generated content | `"zh"`, `"en"` |
35
+ | `${completed_dir}` | string | (Optional) Directory for analysis coverage report output | `speccrew-workspace/iterations/...` |
36
36
 
37
37
  ## Output Variables
38
38
 
39
39
  | Variable | Type | Description |
40
40
  |----------|------|-------------|
41
- | `{{status}}` | string | Generation status: `"success"`, `"partial"`, or `"failed"` |
42
- | `{{documents_generated}}` | array | List of generated document filenames |
43
- | `{{analysis_file}}` | string | Path to the analysis coverage report |
44
- | `{{message}}` | string | Summary message for status update |
41
+ | `${status}` | string | Generation status: `"success"`, `"partial"`, or `"failed"` |
42
+ | `${documents_generated}` | array | List of generated document filenames |
43
+ | `${analysis_file}` | string | Path to the analysis coverage report |
44
+ | `${message}` | string | Summary message for status update |
45
45
 
46
46
  ## Output
47
47
 
48
- Generate the following documents in `{{output_path}}/`:
48
+ Generate the following documents in `${output_path}/`:
49
49
 
50
50
  ```
51
- {{output_path}}/
51
+ ${output_path}/
52
52
  ├── INDEX.md # Platform technology index (Required)
53
53
  ├── tech-stack.md # Technology stack details (Required)
54
54
  ├── architecture.md # Architecture conventions (Required)
@@ -74,19 +74,20 @@ Generate the following documents in `{{output_path}}/`:
74
74
 
75
75
  > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `docs/rules/xml-workflow-spec.md`
76
76
 
77
- ```xml
78
- <workflow name="platform-conventions-generation" version="1.0">
77
+ <workflow id="platform-conventions-generation" status="pending" version="1.0" desc="Platform conventions generation workflow">
79
78
 
80
79
  <!-- ==================== INPUT PARAMETERS ==================== -->
81
- <input name="platform_id" type="string" required="true" description="Platform identifier (e.g., web-react, backend-nestjs)"/>
82
- <input name="platform_type" type="string" required="true" description="Platform type: web, mobile, backend, desktop, api"/>
83
- <input name="framework" type="string" required="true" description="Primary framework (react, nestjs, flutter, etc.)"/>
84
- <input name="source_path" type="string" required="true" description="Platform source directory"/>
85
- <input name="config_files" type="array" required="true" description="List of configuration file paths"/>
86
- <input name="convention_files" type="array" required="true" description="List of convention file paths (eslint, prettier, etc.)"/>
87
- <input name="output_path" type="string" required="true" description="Output directory for generated documents"/>
88
- <input name="language" type="string" required="true" description="Target language (e.g., zh, en)"/>
89
- <input name="completed_dir" type="string" required="false" description="Directory for analysis coverage report output"/>
80
+ <block type="input" id="I1" desc="Platform conventions generation input parameters">
81
+ <field name="platform_id" required="true" type="string" desc="Platform identifier (e.g., web-react, backend-nestjs)"/>
82
+ <field name="platform_type" required="true" type="string" desc="Platform type: web, mobile, backend, desktop, api"/>
83
+ <field name="framework" required="true" type="string" desc="Primary framework (react, nestjs, flutter, etc.)"/>
84
+ <field name="source_path" required="true" type="string" desc="Platform source directory"/>
85
+ <field name="config_files" required="true" type="array" desc="List of configuration file paths"/>
86
+ <field name="convention_files" required="true" type="array" desc="List of convention file paths (eslint, prettier, etc.)"/>
87
+ <field name="output_path" required="true" type="string" desc="Output directory for generated documents"/>
88
+ <field name="language" required="true" type="string" desc="Target language (e.g., zh, en)"/>
89
+ <field name="completed_dir" required="false" type="string" desc="Directory for analysis coverage report output"/>
90
+ </block>
90
91
 
91
92
  <!-- ==================== GLOBAL CONSTRAINT RULES ==================== -->
92
93
  <block type="rule" id="GLOBAL-R1" level="mandatory" desc="Continuous execution rules">
@@ -131,652 +132,746 @@ Generate the following documents in `{{output_path}}/`:
131
132
  </block>
132
133
 
133
134
  <!-- ==================== STEP 0: READ DOCUMENT TEMPLATES ==================== -->
134
- <task name="step0-read-templates" action="run-skill">
135
- <description>Read all template files to understand required content structure for each document type</description>
136
- <script>
137
- <!-- Read INDEX Template -->
138
- <task action="read-file" target="../speccrew-knowledge-techs-generate/templates/INDEX-TEMPLATE.md">
139
- <output name="template_index" from="file.content"/>
140
- </task>
141
-
142
- <!-- Read TECH-STACK Template -->
143
- <task action="read-file" target="../speccrew-knowledge-techs-generate/templates/TECH-STACK-TEMPLATE.md">
144
- <output name="template_tech_stack" from="file.content"/>
145
- </task>
146
-
147
- <!-- Read ARCHITECTURE Template -->
148
- <task action="read-file" target="../speccrew-knowledge-techs-generate/templates/ARCHITECTURE-TEMPLATE.md">
149
- <output name="template_architecture" from="file.content"/>
150
- </task>
151
-
152
- <!-- Read CONVENTIONS-DESIGN Template -->
153
- <task action="read-file" target="../speccrew-knowledge-techs-generate/templates/CONVENTIONS-DESIGN-TEMPLATE.md">
154
- <output name="template_conventions_design" from="file.content"/>
155
- </task>
156
-
157
- <!-- Read CONVENTIONS-DEV Template -->
158
- <task action="read-file" target="../speccrew-knowledge-techs-generate/templates/CONVENTIONS-DEV-TEMPLATE.md">
159
- <output name="template_conventions_dev" from="file.content"/>
160
- </task>
161
-
162
- <!-- Read CONVENTIONS-UNIT-TEST Template -->
163
- <task action="read-file" target="../speccrew-knowledge-techs-generate/templates/CONVENTIONS-UNIT-TEST-TEMPLATE.md">
164
- <output name="template_conventions_unit_test" from="file.content"/>
165
- </task>
166
-
167
- <!-- Read CONVENTIONS-SYSTEM-TEST Template -->
168
- <task action="read-file" target="../speccrew-knowledge-techs-generate/templates/CONVENTIONS-SYSTEM-TEST-TEMPLATE.md">
169
- <output name="template_conventions_system_test" from="file.content"/>
170
- </task>
171
-
172
- <!-- Read CONVENTIONS-BUILD Template -->
173
- <task action="read-file" target="../speccrew-knowledge-techs-generate/templates/CONVENTIONS-BUILD-TEMPLATE.md">
174
- <output name="template_conventions_build" from="file.content"/>
175
- </task>
176
-
177
- <!-- Read CONVENTIONS-DATA Template (Optional) -->
178
- <task action="read-file" target="../speccrew-knowledge-techs-generate/templates/CONVENTIONS-DATA-TEMPLATE.md">
179
- <output name="template_conventions_data" from="file.content"/>
180
- </task>
181
-
182
- <!-- Read Mermaid Rules -->
183
- <task action="read-file" target="speccrew-workspace/docs/rules/mermaid-rule.md">
184
- <output name="mermaid_rules" from="file.content"/>
185
- </task>
186
-
187
- <checkpoint name="templates-loaded" verify="{{template_index}} != null AND {{template_tech_stack}} != null"/>
188
- <event action="log" level="info" message="Step 0 Status: COMPLETED - All templates loaded"/>
189
- </script>
190
- </task>
135
+ <!-- Read INDEX Template -->
136
+ <block type="task" id="B0-1" action="read-file" desc="Read INDEX template">
137
+ <field name="target" value="../speccrew-knowledge-techs-generate/templates/INDEX-TEMPLATE.md"/>
138
+ <field name="output" var="template_index" from="file.content"/>
139
+ </block>
140
+
141
+ <!-- Read TECH-STACK Template -->
142
+ <block type="task" id="B0-2" action="read-file" desc="Read tech-stack template">
143
+ <field name="target" value="../speccrew-knowledge-techs-generate/templates/TECH-STACK-TEMPLATE.md"/>
144
+ <field name="output" var="template_tech_stack" from="file.content"/>
145
+ </block>
146
+
147
+ <!-- Read ARCHITECTURE Template -->
148
+ <block type="task" id="B0-3" action="read-file" desc="Read architecture template">
149
+ <field name="target" value="../speccrew-knowledge-techs-generate/templates/ARCHITECTURE-TEMPLATE.md"/>
150
+ <field name="output" var="template_architecture" from="file.content"/>
151
+ </block>
152
+
153
+ <!-- Read CONVENTIONS-DESIGN Template -->
154
+ <block type="task" id="B0-4" action="read-file" desc="Read conventions-design template">
155
+ <field name="target" value="../speccrew-knowledge-techs-generate/templates/CONVENTIONS-DESIGN-TEMPLATE.md"/>
156
+ <field name="output" var="template_conventions_design" from="file.content"/>
157
+ </block>
158
+
159
+ <!-- Read CONVENTIONS-DEV Template -->
160
+ <block type="task" id="B0-5" action="read-file" desc="Read conventions-dev template">
161
+ <field name="target" value="../speccrew-knowledge-techs-generate/templates/CONVENTIONS-DEV-TEMPLATE.md"/>
162
+ <field name="output" var="template_conventions_dev" from="file.content"/>
163
+ </block>
164
+
165
+ <!-- Read CONVENTIONS-UNIT-TEST Template -->
166
+ <block type="task" id="B0-6" action="read-file" desc="Read conventions-unit-test template">
167
+ <field name="target" value="../speccrew-knowledge-techs-generate/templates/CONVENTIONS-UNIT-TEST-TEMPLATE.md"/>
168
+ <field name="output" var="template_conventions_unit_test" from="file.content"/>
169
+ </block>
170
+
171
+ <!-- Read CONVENTIONS-SYSTEM-TEST Template -->
172
+ <block type="task" id="B0-7" action="read-file" desc="Read conventions-system-test template">
173
+ <field name="target" value="../speccrew-knowledge-techs-generate/templates/CONVENTIONS-SYSTEM-TEST-TEMPLATE.md"/>
174
+ <field name="output" var="template_conventions_system_test" from="file.content"/>
175
+ </block>
176
+
177
+ <!-- Read CONVENTIONS-BUILD Template -->
178
+ <block type="task" id="B0-8" action="read-file" desc="Read conventions-build template">
179
+ <field name="target" value="../speccrew-knowledge-techs-generate/templates/CONVENTIONS-BUILD-TEMPLATE.md"/>
180
+ <field name="output" var="template_conventions_build" from="file.content"/>
181
+ </block>
182
+
183
+ <!-- Read CONVENTIONS-DATA Template (Optional) -->
184
+ <block type="task" id="B0-9" action="read-file" desc="Read conventions-data template">
185
+ <field name="target" value="../speccrew-knowledge-techs-generate/templates/CONVENTIONS-DATA-TEMPLATE.md"/>
186
+ <field name="output" var="template_conventions_data" from="file.content"/>
187
+ </block>
188
+
189
+ <!-- Read Mermaid Rules -->
190
+ <block type="task" id="B0-10" action="read-file" desc="Read Mermaid rules">
191
+ <field name="target" value="speccrew-workspace/docs/rules/mermaid-rule.md"/>
192
+ <field name="output" var="mermaid_rules" from="file.content"/>
193
+ </block>
194
+
195
+ <block type="checkpoint" id="CP0" name="templates-loaded" desc="Templates loaded">
196
+ <field name="verify" value="${template_index} != null AND ${template_tech_stack} != null"/>
197
+ </block>
198
+ <block type="event" id="E0" action="log" level="info" desc="Log templates loaded">
199
+ <field name="message" value="Step 0 Status: COMPLETED - All templates loaded"/>
200
+ </block>
191
201
 
192
202
  <!-- ==================== STEP 1: ANALYZE PROJECT SOURCE CODE STRUCTURE ==================== -->
193
- <task name="step1-analyze-structure" action="run-skill">
194
- <description>Read configuration files and analyze project structure to extract technology stack and conventions</description>
195
- <script>
196
- <!-- Read Primary Config Files -->
197
- <loop name="config-reading" over="{{config_files}}" as="config_file">
198
- <task action="read-file" target="{{source_path}}/{{config_file}}">
199
- <output name="config_{{config_file}}" from="file.content"/>
200
- </task>
201
- </loop>
202
-
203
- <!-- Read Convention Files -->
204
- <loop name="convention-reading" over="{{convention_files}}" as="convention_file">
205
- <task action="read-file" target="{{source_path}}/{{convention_file}}">
206
- <output name="convention_{{convention_file}}" from="file.content"/>
207
- </task>
208
- </loop>
209
-
210
- <!-- Extract Technology Stack -->
211
- <task action="extract-tech-stack">
212
- <input name="config_files">{{config_files}}</input>
213
- <input name="config_content">{{config_content}}</input>
214
- <output name="framework" from="extraction.framework"/>
215
- <output name="framework_version" from="extraction.framework_version"/>
216
- <output name="language" from="extraction.language"/>
217
- <output name="language_version" from="extraction.language_version"/>
218
- <output name="build_tool" from="extraction.build_tool"/>
219
- <output name="dependencies" from="extraction.dependencies"/>
220
- <output name="dev_dependencies" from="extraction.dev_dependencies"/>
221
- </task>
222
-
223
- <!-- Extract Conventions from Config Files -->
224
- <task action="extract-conventions">
225
- <input name="convention_files">{{convention_files}}</input>
226
- <input name="convention_content">{{convention_content}}</input>
227
- <output name="eslint_rules" from="extraction.eslint"/>
228
- <output name="prettier_config" from="extraction.prettier"/>
229
- <output name="testing_config" from="extraction.testing"/>
230
- <output name="naming_conventions" from="extraction.naming"/>
231
- </task>
232
-
233
- <!-- Analyze Directory Structure -->
234
- <task action="analyze-structure" target="{{source_path}}">
235
- <output name="directory_structure" from="analysis.directories"/>
236
- <output name="file_patterns" from="analysis.patterns"/>
237
- </task>
238
-
239
- <!-- Detect Data Layer for conventions-data.md decision -->
240
- <task action="detect-data-layer">
241
- <input name="dependencies">{{dependencies}}</input>
242
- <input name="platform_type">{{platform_type}}</input>
243
- <output name="data_layer_detected" from="detection.found"/>
244
- <output name="data_technology" from="detection.technology"/>
245
- <output name="generate_data_doc" from="detection.should_generate"/>
246
- </task>
247
-
248
- <event action="log" level="info" message="Platform: {{platform_id}}, Type: {{platform_type}}, Framework: {{framework}}"/>
249
- <event action="log" level="info" message="Data Layer Detected: {{data_layer_detected}}, Technology: {{data_technology}}"/>
250
- <event action="log" level="info" message="Generate conventions-data.md: {{generate_data_doc}}"/>
251
-
252
- <checkpoint name="structure-analyzed" verify="{{framework}} != null"/>
253
- <event action="log" level="info" message="Step 1 Status: COMPLETED - Project structure analyzed"/>
254
- </script>
255
- </task>
203
+ <!-- Read Primary Config Files -->
204
+ <block type="loop" id="L1" over="${config_files}" as="config_file" desc="Read config files">
205
+ <block type="task" id="B1-1" action="read-file" desc="Read config file">
206
+ <field name="target" value="${source_path}/${config_file}"/>
207
+ <field name="output" var="config_${config_file}" from="file.content"/>
208
+ </block>
209
+ </block>
210
+
211
+ <!-- Read Convention Files -->
212
+ <block type="loop" id="L2" over="${convention_files}" as="convention_file" desc="Read convention files">
213
+ <block type="task" id="B1-2" action="read-file" desc="Read convention file">
214
+ <field name="target" value="${source_path}/${convention_file}"/>
215
+ <field name="output" var="convention_${convention_file}" from="file.content"/>
216
+ </block>
217
+ </block>
218
+
219
+ <!-- Extract Technology Stack -->
220
+ <block type="task" id="B1-3" action="extract-tech-stack" desc="Extract tech stack">
221
+ <field name="config_files" value="${config_files}"/>
222
+ <field name="config_content" value="${config_content}"/>
223
+ <field name="output" var="framework" from="extraction.framework"/>
224
+ <field name="output" var="framework_version" from="extraction.framework_version"/>
225
+ <field name="output" var="language" from="extraction.language"/>
226
+ <field name="output" var="language_version" from="extraction.language_version"/>
227
+ <field name="output" var="build_tool" from="extraction.build_tool"/>
228
+ <field name="output" var="dependencies" from="extraction.dependencies"/>
229
+ <field name="output" var="dev_dependencies" from="extraction.dev_dependencies"/>
230
+ </block>
231
+
232
+ <!-- Extract Conventions from Config Files -->
233
+ <block type="task" id="B1-4" action="extract-conventions" desc="Extract conventions">
234
+ <field name="convention_files" value="${convention_files}"/>
235
+ <field name="convention_content" value="${convention_content}"/>
236
+ <field name="output" var="eslint_rules" from="extraction.eslint"/>
237
+ <field name="output" var="prettier_config" from="extraction.prettier"/>
238
+ <field name="output" var="testing_config" from="extraction.testing"/>
239
+ <field name="output" var="naming_conventions" from="extraction.naming"/>
240
+ </block>
241
+
242
+ <!-- Analyze Directory Structure -->
243
+ <block type="task" id="B1-5" action="analyze-structure" desc="Analyze directory structure">
244
+ <field name="target" value="${source_path}"/>
245
+ <field name="output" var="directory_structure" from="analysis.directories"/>
246
+ <field name="output" var="file_patterns" from="analysis.patterns"/>
247
+ </block>
248
+
249
+ <!-- Detect Data Layer for conventions-data.md decision -->
250
+ <block type="task" id="B1-6" action="detect-data-layer" desc="Detect data layer">
251
+ <field name="dependencies" value="${dependencies}"/>
252
+ <field name="platform_type" value="${platform_type}"/>
253
+ <field name="output" var="data_layer_detected" from="detection.found"/>
254
+ <field name="output" var="data_technology" from="detection.technology"/>
255
+ <field name="output" var="generate_data_doc" from="detection.should_generate"/>
256
+ </block>
257
+
258
+ <block type="event" id="E1-1" action="log" level="info" desc="Log platform info">
259
+ <field name="message" value="Platform: ${platform_id}, Type: ${platform_type}, Framework: ${framework}"/>
260
+ </block>
261
+ <block type="event" id="E1-2" action="log" level="info" desc="Log data layer info">
262
+ <field name="message" value="Data Layer Detected: ${data_layer_detected}, Technology: ${data_technology}"/>
263
+ </block>
264
+ <block type="event" id="E1-3" action="log" level="info" desc="Log data doc decision">
265
+ <field name="message" value="Generate conventions-data.md: ${generate_data_doc}"/>
266
+ </block>
267
+
268
+ <block type="checkpoint" id="CP1" name="structure-analyzed" desc="Structure analyzed">
269
+ <field name="verify" value="${framework} != null"/>
270
+ </block>
271
+ <block type="event" id="E1-4" action="log" level="info" desc="Log step 1 status">
272
+ <field name="message" value="Step 1 Status: COMPLETED - Project structure analyzed"/>
273
+ </block>
256
274
 
257
275
  <!-- ==================== STEP 2: DOMAIN-SPECIFIC CONVENTION EXTRACTION ==================== -->
258
- <task name="step2-extract-domain-conventions" action="run-skill">
259
- <description>Extract domain-specific conventions based on platform type</description>
260
- <script>
261
- <!-- Frontend Topics Extraction -->
262
- <gateway name="frontend-topics" mode="guard">
263
- <branch condition="{{platform_type}} == 'web' OR {{platform_type}} == 'mobile' OR {{platform_type}} == 'desktop'">
264
- <task action="search-topic">
265
- <input name="topic">i18n</input>
266
- <input name="paths">["locales/", "i18n/", "lang/"]</input>
267
- <output name="topic_i18n_status" from="search.status"/>
268
- <output name="topic_i18n_files" from="search.files"/>
269
- </task>
270
- <task action="search-topic">
271
- <input name="topic">authorization</input>
272
- <input name="paths">["permission/", "router/", "store/", "utils/auth"]</input>
273
- <output name="topic_auth_status" from="search.status"/>
274
- <output name="topic_auth_files" from="search.files"/>
275
- </task>
276
- <task action="search-topic">
277
- <input name="topic">menu_registration</input>
278
- <input name="paths">["router/", "store/", "layout/"]</input>
279
- <output name="topic_menu_status" from="search.status"/>
280
- <output name="topic_menu_files" from="search.files"/>
281
- </task>
282
- <task action="search-topic">
283
- <input name="topic">data_dictionary</input>
284
- <input name="paths">["components/Dict", "utils/dict", "store/"]</input>
285
- <output name="topic_dict_status" from="search.status"/>
286
- <output name="topic_dict_files" from="search.files"/>
287
- </task>
288
- <task action="search-topic">
289
- <input name="topic">logging</input>
290
- <input name="paths">["utils/log", "plugins/sentry"]</input>
291
- <output name="topic_logging_status" from="search.status"/>
292
- <output name="topic_logging_files" from="search.files"/>
293
- </task>
294
- <task action="search-topic">
295
- <input name="topic">api_request_layer</input>
296
- <input name="paths">["utils/request", "api/", "config/", "interceptors/"]</input>
297
- <output name="topic_api_status" from="search.status"/>
298
- <output name="topic_api_files" from="search.files"/>
299
- </task>
300
- <task action="search-topic">
301
- <input name="topic">data_validation</input>
302
- <input name="paths">["utils/validate"]</input>
303
- <output name="topic_validation_status" from="search.status"/>
304
- <output name="topic_validation_files" from="search.files"/>
305
- </task>
306
- <task action="search-topic">
307
- <input name="topic">file_upload</input>
308
- <input name="paths">["components/Upload", "api/file", "utils/upload"]</input>
309
- <output name="topic_upload_status" from="search.status"/>
310
- <output name="topic_upload_files" from="search.files"/>
311
- </task>
312
- </branch>
313
- </gateway>
314
-
315
- <!-- Backend Topics Extraction -->
316
- <gateway name="backend-topics" mode="guard">
317
- <branch condition="{{platform_type}} == 'backend'">
318
- <task action="search-topic">
319
- <input name="topic">backend_i18n</input>
320
- <input name="paths">["resources/i18n/", "messages*.properties"]</input>
321
- <output name="topic_backend_i18n_status" from="search.status"/>
322
- <output name="topic_backend_i18n_files" from="search.files"/>
323
- </task>
324
- <task action="search-topic">
325
- <input name="topic">authorization_permissions</input>
326
- <input name="paths">["security/", "controller/", "framework/"]</input>
327
- <output name="topic_backend_auth_status" from="search.status"/>
328
- <output name="topic_backend_auth_files" from="search.files"/>
329
- </task>
330
- <task action="search-topic">
331
- <input name="topic">data_dictionary</input>
332
- <input name="paths">["dict/", "system/"]</input>
333
- <output name="topic_backend_dict_status" from="search.status"/>
334
- <output name="topic_backend_dict_files" from="search.files"/>
335
- </task>
336
- <task action="search-topic">
337
- <input name="topic">multi_tenancy</input>
338
- <input name="paths">["framework/tenant/", "base/entity/"]</input>
339
- <output name="topic_tenant_status" from="search.status"/>
340
- <output name="topic_tenant_files" from="search.files"/>
341
- </task>
342
- <task action="search-topic">
343
- <input name="topic">logging_audit</input>
344
- <input name="paths">["logback*.xml", "log4j2*.xml", "operatelog/"]</input>
345
- <output name="topic_backend_logging_status" from="search.status"/>
346
- <output name="topic_backend_logging_files" from="search.files"/>
347
- </task>
348
- <task action="search-topic">
349
- <input name="topic">exception_handling</input>
350
- <input name="paths">["handler/", "exception/", "enums/ErrorCode"]</input>
351
- <output name="topic_exception_status" from="search.status"/>
352
- <output name="topic_exception_files" from="search.files"/>
353
- </task>
354
- <task action="search-topic">
355
- <input name="topic">caching</input>
356
- <input name="paths">["cache/", "redis/", "CacheConfig"]</input>
357
- <output name="topic_cache_status" from="search.status"/>
358
- <output name="topic_cache_files" from="search.files"/>
359
- </task>
360
- <task action="search-topic">
361
- <input name="topic">scheduled_jobs</input>
362
- <input name="paths">["job/", "task/", "schedule/"]</input>
363
- <output name="topic_jobs_status" from="search.status"/>
364
- <output name="topic_jobs_files" from="search.files"/>
365
- </task>
366
- <task action="search-topic">
367
- <input name="topic">file_storage</input>
368
- <input name="paths">["file/", "infra/file/", "FileClient"]</input>
369
- <output name="topic_storage_status" from="search.status"/>
370
- <output name="topic_storage_files" from="search.files"/>
371
- </task>
372
- </branch>
373
- </gateway>
374
-
375
- <checkpoint name="domain-conventions-extracted" verify="true"/>
376
- <event action="log" level="info" message="Step 2 Status: COMPLETED - Domain-specific conventions extracted"/>
377
- </script>
378
- </task>
276
+ <!-- Frontend Topics Extraction -->
277
+ <block type="gateway" id="G2-1" mode="guard" desc="Frontend topics gate">
278
+ <branch test="${platform_type} == 'web' OR ${platform_type} == 'mobile' OR ${platform_type} == 'desktop'" name="Frontend platform">
279
+ <block type="task" id="B2-1" action="search-topic" desc="Search i18n topic">
280
+ <field name="topic" value="i18n"/>
281
+ <field name="paths" value="[&quot;locales/&quot;, &quot;i18n/&quot;, &quot;lang/&quot;]"/>
282
+ <field name="output" var="topic_i18n_status" from="search.status"/>
283
+ <field name="output" var="topic_i18n_files" from="search.files"/>
284
+ </block>
285
+ <block type="task" id="B2-2" action="search-topic" desc="Search authorization topic">
286
+ <field name="topic" value="authorization"/>
287
+ <field name="paths" value="[&quot;permission/&quot;, &quot;router/&quot;, &quot;store/&quot;, &quot;utils/auth&quot;]"/>
288
+ <field name="output" var="topic_auth_status" from="search.status"/>
289
+ <field name="output" var="topic_auth_files" from="search.files"/>
290
+ </block>
291
+ <block type="task" id="B2-3" action="search-topic" desc="Search menu registration topic">
292
+ <field name="topic" value="menu_registration"/>
293
+ <field name="paths" value="[&quot;router/&quot;, &quot;store/&quot;, &quot;layout/&quot;]"/>
294
+ <field name="output" var="topic_menu_status" from="search.status"/>
295
+ <field name="output" var="topic_menu_files" from="search.files"/>
296
+ </block>
297
+ <block type="task" id="B2-4" action="search-topic" desc="Search data dictionary topic">
298
+ <field name="topic" value="data_dictionary"/>
299
+ <field name="paths" value="[&quot;components/Dict&quot;, &quot;utils/dict&quot;, &quot;store/&quot;]"/>
300
+ <field name="output" var="topic_dict_status" from="search.status"/>
301
+ <field name="output" var="topic_dict_files" from="search.files"/>
302
+ </block>
303
+ <block type="task" id="B2-5" action="search-topic" desc="Search logging topic">
304
+ <field name="topic" value="logging"/>
305
+ <field name="paths" value="[&quot;utils/log&quot;, &quot;plugins/sentry&quot;]"/>
306
+ <field name="output" var="topic_logging_status" from="search.status"/>
307
+ <field name="output" var="topic_logging_files" from="search.files"/>
308
+ </block>
309
+ <block type="task" id="B2-6" action="search-topic" desc="Search API request layer topic">
310
+ <field name="topic" value="api_request_layer"/>
311
+ <field name="paths" value="[&quot;utils/request&quot;, &quot;api/&quot;, &quot;config/&quot;, &quot;interceptors/&quot;]"/>
312
+ <field name="output" var="topic_api_status" from="search.status"/>
313
+ <field name="output" var="topic_api_files" from="search.files"/>
314
+ </block>
315
+ <block type="task" id="B2-7" action="search-topic" desc="Search data validation topic">
316
+ <field name="topic" value="data_validation"/>
317
+ <field name="paths" value="[&quot;utils/validate&quot;]"/>
318
+ <field name="output" var="topic_validation_status" from="search.status"/>
319
+ <field name="output" var="topic_validation_files" from="search.files"/>
320
+ </block>
321
+ <block type="task" id="B2-8" action="search-topic" desc="Search file upload topic">
322
+ <field name="topic" value="file_upload"/>
323
+ <field name="paths" value="[&quot;components/Upload&quot;, &quot;api/file&quot;, &quot;utils/upload&quot;]"/>
324
+ <field name="output" var="topic_upload_status" from="search.status"/>
325
+ <field name="output" var="topic_upload_files" from="search.files"/>
326
+ </block>
327
+ </branch>
328
+ </block>
329
+
330
+ <!-- Backend Topics Extraction -->
331
+ <block type="gateway" id="G2-2" mode="guard" desc="Backend topics gate">
332
+ <branch test="${platform_type} == 'backend'" name="Backend platform">
333
+ <block type="task" id="B2-9" action="search-topic" desc="Search backend i18n topic">
334
+ <field name="topic" value="backend_i18n"/>
335
+ <field name="paths" value="[&quot;resources/i18n/&quot;, &quot;messages*.properties&quot;]"/>
336
+ <field name="output" var="topic_backend_i18n_status" from="search.status"/>
337
+ <field name="output" var="topic_backend_i18n_files" from="search.files"/>
338
+ </block>
339
+ <block type="task" id="B2-10" action="search-topic" desc="Search authorization permissions topic">
340
+ <field name="topic" value="authorization_permissions"/>
341
+ <field name="paths" value="[&quot;security/&quot;, &quot;controller/&quot;, &quot;framework/&quot;]"/>
342
+ <field name="output" var="topic_backend_auth_status" from="search.status"/>
343
+ <field name="output" var="topic_backend_auth_files" from="search.files"/>
344
+ </block>
345
+ <block type="task" id="B2-11" action="search-topic" desc="Search backend data dictionary topic">
346
+ <field name="topic" value="data_dictionary"/>
347
+ <field name="paths" value="[&quot;dict/&quot;, &quot;system/&quot;]"/>
348
+ <field name="output" var="topic_backend_dict_status" from="search.status"/>
349
+ <field name="output" var="topic_backend_dict_files" from="search.files"/>
350
+ </block>
351
+ <block type="task" id="B2-12" action="search-topic" desc="Search multi-tenancy topic">
352
+ <field name="topic" value="multi_tenancy"/>
353
+ <field name="paths" value="[&quot;framework/tenant/&quot;, &quot;base/entity/&quot;]"/>
354
+ <field name="output" var="topic_tenant_status" from="search.status"/>
355
+ <field name="output" var="topic_tenant_files" from="search.files"/>
356
+ </block>
357
+ <block type="task" id="B2-13" action="search-topic" desc="Search logging audit topic">
358
+ <field name="topic" value="logging_audit"/>
359
+ <field name="paths" value="[&quot;logback*.xml&quot;, &quot;log4j2*.xml&quot;, &quot;operatelog/&quot;]"/>
360
+ <field name="output" var="topic_backend_logging_status" from="search.status"/>
361
+ <field name="output" var="topic_backend_logging_files" from="search.files"/>
362
+ </block>
363
+ <block type="task" id="B2-14" action="search-topic" desc="Search exception handling topic">
364
+ <field name="topic" value="exception_handling"/>
365
+ <field name="paths" value="[&quot;handler/&quot;, &quot;exception/&quot;, &quot;enums/ErrorCode&quot;]"/>
366
+ <field name="output" var="topic_exception_status" from="search.status"/>
367
+ <field name="output" var="topic_exception_files" from="search.files"/>
368
+ </block>
369
+ <block type="task" id="B2-15" action="search-topic" desc="Search caching topic">
370
+ <field name="topic" value="caching"/>
371
+ <field name="paths" value="[&quot;cache/&quot;, &quot;redis/&quot;, &quot;CacheConfig&quot;]"/>
372
+ <field name="output" var="topic_cache_status" from="search.status"/>
373
+ <field name="output" var="topic_cache_files" from="search.files"/>
374
+ </block>
375
+ <block type="task" id="B2-16" action="search-topic" desc="Search scheduled jobs topic">
376
+ <field name="topic" value="scheduled_jobs"/>
377
+ <field name="paths" value="[&quot;job/&quot;, &quot;task/&quot;, &quot;schedule/&quot;]"/>
378
+ <field name="output" var="topic_jobs_status" from="search.status"/>
379
+ <field name="output" var="topic_jobs_files" from="search.files"/>
380
+ </block>
381
+ <block type="task" id="B2-17" action="search-topic" desc="Search file storage topic">
382
+ <field name="topic" value="file_storage"/>
383
+ <field name="paths" value="[&quot;file/&quot;, &quot;infra/file/&quot;, &quot;FileClient&quot;]"/>
384
+ <field name="output" var="topic_storage_status" from="search.status"/>
385
+ <field name="output" var="topic_storage_files" from="search.files"/>
386
+ </block>
387
+ </branch>
388
+ </block>
389
+
390
+ <block type="checkpoint" id="CP2" name="domain-conventions-extracted" desc="Domain conventions extracted">
391
+ <field name="verify" value="true"/>
392
+ </block>
393
+ <block type="event" id="E2" action="log" level="info" desc="Log step 2 status">
394
+ <field name="message" value="Step 2 Status: COMPLETED - Domain-specific conventions extracted"/>
395
+ </block>
379
396
 
380
397
  <!-- ==================== STEP 2.1: GENERATE INDEX.MD ==================== -->
381
- <task name="step2-1-generate-index" action="run-skill">
382
- <description>Generate INDEX.md by copying template and filling sections</description>
383
- <script>
384
- <task action="copy-template" source="{{template_index}}" target="{{output_path}}/INDEX.md">
385
- <parameter name="platform_id">{{platform_id}}</parameter>
386
- <parameter name="platform_type">{{platform_type}}</parameter>
387
- <parameter name="framework">{{framework}}</parameter>
388
- </task>
389
- <task action="search_replace" target="{{output_path}}/INDEX.md">
390
- <search>{Platform Name}</search>
391
- <replace>{{platform_id}}</replace>
392
- </task>
393
- <task action="search_replace" target="{{output_path}}/INDEX.md">
394
- <search>{Platform Type}</search>
395
- <replace>{{platform_type}}</replace>
396
- </task>
397
- <checkpoint name="index-generated" verify="file.exists({{output_path}}/INDEX.md)"/>
398
- <event action="log" level="info" message="Step 2.1 Status: COMPLETED - INDEX.md generated"/>
399
- </script>
400
- </task>
398
+ <block type="task" id="B3-1" action="copy-template" desc="Copy INDEX template">
399
+ <field name="source" value="${template_index}"/>
400
+ <field name="target" value="${output_path}/INDEX.md"/>
401
+ <field name="platform_id" value="${platform_id}"/>
402
+ <field name="platform_type" value="${platform_type}"/>
403
+ <field name="framework" value="${framework}"/>
404
+ </block>
405
+ <block type="task" id="B3-2" action="search_replace" desc="Replace platform name in INDEX">
406
+ <field name="target" value="${output_path}/INDEX.md"/>
407
+ <field name="search" value="{Platform Name}"/>
408
+ <field name="replace" value="${platform_id}"/>
409
+ </block>
410
+ <block type="task" id="B3-3" action="search_replace" desc="Replace platform type in INDEX">
411
+ <field name="target" value="${output_path}/INDEX.md"/>
412
+ <field name="search" value="{Platform Type}"/>
413
+ <field name="replace" value="${platform_type}"/>
414
+ </block>
415
+ <block type="checkpoint" id="CP3" name="index-generated" desc="INDEX.md generated">
416
+ <field name="verify" value="file.exists(${output_path}/INDEX.md)"/>
417
+ </block>
418
+ <block type="event" id="E3" action="log" level="info" desc="Log step 2.1 status">
419
+ <field name="message" value="Step 2.1 Status: COMPLETED - INDEX.md generated"/>
420
+ </block>
401
421
 
402
422
  <!-- ==================== STEP 2.2: GENERATE TECH-STACK.MD ==================== -->
403
- <task name="step2-2-generate-tech-stack" action="run-skill">
404
- <description>Generate tech-stack.md with extracted technology information</description>
405
- <script>
406
- <task action="copy-template" source="{{template_tech_stack}}" target="{{output_path}}/tech-stack.md">
407
- <parameter name="framework">{{framework}}</parameter>
408
- <parameter name="framework_version">{{framework_version}}</parameter>
409
- <parameter name="dependencies">{{dependencies}}</parameter>
410
- </task>
411
- <task action="fill-tech-stack-sections" target="{{output_path}}/tech-stack.md">
412
- <input name="framework">{{framework}}</input>
413
- <input name="framework_version">{{framework_version}}</input>
414
- <input name="language">{{language}}</input>
415
- <input name="build_tool">{{build_tool}}</input>
416
- <input name="dependencies">{{dependencies}}</input>
417
- <input name="dev_dependencies">{{dev_dependencies}}</input>
418
- </task>
419
- <checkpoint name="tech-stack-generated" verify="file.exists({{output_path}}/tech-stack.md)"/>
420
- <event action="log" level="info" message="Step 2.2 Status: COMPLETED - tech-stack.md generated"/>
421
- </script>
422
- </task>
423
+ <block type="task" id="B4-1" action="copy-template" desc="Copy tech-stack template">
424
+ <field name="source" value="${template_tech_stack}"/>
425
+ <field name="target" value="${output_path}/tech-stack.md"/>
426
+ <field name="framework" value="${framework}"/>
427
+ <field name="framework_version" value="${framework_version}"/>
428
+ <field name="dependencies" value="${dependencies}"/>
429
+ </block>
430
+ <block type="task" id="B4-2" action="fill-tech-stack-sections" desc="Fill tech-stack sections">
431
+ <field name="target" value="${output_path}/tech-stack.md"/>
432
+ <field name="framework" value="${framework}"/>
433
+ <field name="framework_version" value="${framework_version}"/>
434
+ <field name="language" value="${language}"/>
435
+ <field name="build_tool" value="${build_tool}"/>
436
+ <field name="dependencies" value="${dependencies}"/>
437
+ <field name="dev_dependencies" value="${dev_dependencies}"/>
438
+ </block>
439
+ <block type="checkpoint" id="CP4" name="tech-stack-generated" desc="tech-stack.md generated">
440
+ <field name="verify" value="file.exists(${output_path}/tech-stack.md)"/>
441
+ </block>
442
+ <block type="event" id="E4" action="log" level="info" desc="Log step 2.2 status">
443
+ <field name="message" value="Step 2.2 Status: COMPLETED - tech-stack.md generated"/>
444
+ </block>
423
445
 
424
446
  <!-- ==================== STEP 2.3: GENERATE ARCHITECTURE.MD ==================== -->
425
- <task name="step2-3-generate-architecture" action="run-skill">
426
- <description>Generate architecture.md with platform architecture patterns</description>
427
- <script>
428
- <task action="copy-template" source="{{template_architecture}}" target="{{output_path}}/architecture.md">
429
- <parameter name="platform_type">{{platform_type}}</parameter>
430
- <parameter name="directory_structure">{{directory_structure}}</parameter>
431
- </task>
432
- <task action="fill-architecture-sections" target="{{output_path}}/architecture.md">
433
- <input name="platform_type">{{platform_type}}</input>
434
- <input name="framework">{{framework}}</input>
435
- <input name="directory_structure">{{directory_structure}}</input>
436
- <input name="file_patterns">{{file_patterns}}</input>
437
- </task>
438
- <checkpoint name="architecture-generated" verify="file.exists({{output_path}}/architecture.md)"/>
439
- <event action="log" level="info" message="Step 2.3 Status: COMPLETED - architecture.md generated"/>
440
- </script>
441
- </task>
447
+ <block type="task" id="B5-1" action="copy-template" desc="Copy architecture template">
448
+ <field name="source" value="${template_architecture}"/>
449
+ <field name="target" value="${output_path}/architecture.md"/>
450
+ <field name="platform_type" value="${platform_type}"/>
451
+ <field name="directory_structure" value="${directory_structure}"/>
452
+ </block>
453
+ <block type="task" id="B5-2" action="fill-architecture-sections" desc="Fill architecture sections">
454
+ <field name="target" value="${output_path}/architecture.md"/>
455
+ <field name="platform_type" value="${platform_type}"/>
456
+ <field name="framework" value="${framework}"/>
457
+ <field name="directory_structure" value="${directory_structure}"/>
458
+ <field name="file_patterns" value="${file_patterns}"/>
459
+ </block>
460
+ <block type="checkpoint" id="CP5" name="architecture-generated" desc="architecture.md generated">
461
+ <field name="verify" value="file.exists(${output_path}/architecture.md)"/>
462
+ </block>
463
+ <block type="event" id="E5" action="log" level="info" desc="Log step 2.3 status">
464
+ <field name="message" value="Step 2.3 Status: COMPLETED - architecture.md generated"/>
465
+ </block>
442
466
 
443
467
  <!-- ==================== STEP 2.4: GENERATE CONVENTIONS-DESIGN.MD ==================== -->
444
- <task name="step2-4-generate-conventions-design" action="run-skill">
445
- <description>Generate conventions-design.md with design principles and patterns</description>
446
- <script>
447
- <task action="copy-template" source="{{template_conventions_design}}" target="{{output_path}}/conventions-design.md">
448
- <parameter name="platform_type">{{platform_type}}</parameter>
449
- </task>
450
- <task action="fill-design-sections" target="{{output_path}}/conventions-design.md">
451
- <input name="platform_type">{{platform_type}}</input>
452
- <input name="framework">{{framework}}</input>
453
- <input name="naming_conventions">{{naming_conventions}}</input>
454
- </task>
455
- <checkpoint name="conventions-design-generated" verify="file.exists({{output_path}}/conventions-design.md)"/>
456
- <event action="log" level="info" message="Step 2.4 Status: COMPLETED - conventions-design.md generated"/>
457
- </script>
458
- </task>
468
+ <block type="task" id="B6-1" action="copy-template" desc="Copy conventions-design template">
469
+ <field name="source" value="${template_conventions_design}"/>
470
+ <field name="target" value="${output_path}/conventions-design.md"/>
471
+ <field name="platform_type" value="${platform_type}"/>
472
+ </block>
473
+ <block type="task" id="B6-2" action="fill-design-sections" desc="Fill design sections">
474
+ <field name="target" value="${output_path}/conventions-design.md"/>
475
+ <field name="platform_type" value="${platform_type}"/>
476
+ <field name="framework" value="${framework}"/>
477
+ <field name="naming_conventions" value="${naming_conventions}"/>
478
+ </block>
479
+ <block type="checkpoint" id="CP6" name="conventions-design-generated" desc="conventions-design.md generated">
480
+ <field name="verify" value="file.exists(${output_path}/conventions-design.md)"/>
481
+ </block>
482
+ <block type="event" id="E6" action="log" level="info" desc="Log step 2.4 status">
483
+ <field name="message" value="Step 2.4 Status: COMPLETED - conventions-design.md generated"/>
484
+ </block>
459
485
 
460
486
  <!-- ==================== STEP 2.5: GENERATE CONVENTIONS-DEV.MD ==================== -->
461
- <task name="step2-5-generate-conventions-dev" action="run-skill">
462
- <description>Generate conventions-dev.md with development conventions</description>
463
- <script>
464
- <task action="copy-template" source="{{template_conventions_dev}}" target="{{output_path}}/conventions-dev.md">
465
- <parameter name="eslint_rules">{{eslint_rules}}</parameter>
466
- <parameter name="prettier_config">{{prettier_config}}</parameter>
467
- </task>
468
- <task action="fill-dev-sections" target="{{output_path}}/conventions-dev.md">
469
- <input name="eslint_rules">{{eslint_rules}}</input>
470
- <input name="prettier_config">{{prettier_config}}</input>
471
- <input name="naming_conventions">{{naming_conventions}}</input>
472
- <input name="file_patterns">{{file_patterns}}</input>
473
- </task>
474
- <checkpoint name="conventions-dev-generated" verify="file.exists({{output_path}}/conventions-dev.md)"/>
475
- <event action="log" level="info" message="Step 2.5 Status: COMPLETED - conventions-dev.md generated"/>
476
- </script>
477
- </task>
487
+ <block type="task" id="B7-1" action="copy-template" desc="Copy conventions-dev template">
488
+ <field name="source" value="${template_conventions_dev}"/>
489
+ <field name="target" value="${output_path}/conventions-dev.md"/>
490
+ <field name="eslint_rules" value="${eslint_rules}"/>
491
+ <field name="prettier_config" value="${prettier_config}"/>
492
+ </block>
493
+ <block type="task" id="B7-2" action="fill-dev-sections" desc="Fill dev sections">
494
+ <field name="target" value="${output_path}/conventions-dev.md"/>
495
+ <field name="eslint_rules" value="${eslint_rules}"/>
496
+ <field name="prettier_config" value="${prettier_config}"/>
497
+ <field name="naming_conventions" value="${naming_conventions}"/>
498
+ <field name="file_patterns" value="${file_patterns}"/>
499
+ </block>
500
+ <block type="checkpoint" id="CP7" name="conventions-dev-generated" desc="conventions-dev.md generated">
501
+ <field name="verify" value="file.exists(${output_path}/conventions-dev.md)"/>
502
+ </block>
503
+ <block type="event" id="E7" action="log" level="info" desc="Log step 2.5 status">
504
+ <field name="message" value="Step 2.5 Status: COMPLETED - conventions-dev.md generated"/>
505
+ </block>
478
506
 
479
507
  <!-- ==================== STEP 2.6: GENERATE CONVENTIONS-UNIT-TEST.MD ==================== -->
480
- <task name="step2-6-generate-conventions-unit-test" action="run-skill">
481
- <description>Generate conventions-unit-test.md with unit testing requirements</description>
482
- <script>
483
- <task action="copy-template" source="{{template_conventions_unit_test}}" target="{{output_path}}/conventions-unit-test.md">
484
- <parameter name="testing_config">{{testing_config}}</parameter>
485
- </task>
486
- <task action="fill-unit-test-sections" target="{{output_path}}/conventions-unit-test.md">
487
- <input name="testing_config">{{testing_config}}</input>
488
- <input name="framework">{{framework}}</input>
489
- <input name="platform_type">{{platform_type}}</input>
490
- </task>
491
- <checkpoint name="conventions-unit-test-generated" verify="file.exists({{output_path}}/conventions-unit-test.md)"/>
492
- <event action="log" level="info" message="Step 2.6 Status: COMPLETED - conventions-unit-test.md generated"/>
493
- </script>
494
- </task>
508
+ <block type="task" id="B8-1" action="copy-template" desc="Copy conventions-unit-test template">
509
+ <field name="source" value="${template_conventions_unit_test}"/>
510
+ <field name="target" value="${output_path}/conventions-unit-test.md"/>
511
+ <field name="testing_config" value="${testing_config}"/>
512
+ </block>
513
+ <block type="task" id="B8-2" action="fill-unit-test-sections" desc="Fill unit-test sections">
514
+ <field name="target" value="${output_path}/conventions-unit-test.md"/>
515
+ <field name="testing_config" value="${testing_config}"/>
516
+ <field name="framework" value="${framework}"/>
517
+ <field name="platform_type" value="${platform_type}"/>
518
+ </block>
519
+ <block type="checkpoint" id="CP8" name="conventions-unit-test-generated" desc="conventions-unit-test.md generated">
520
+ <field name="verify" value="file.exists(${output_path}/conventions-unit-test.md)"/>
521
+ </block>
522
+ <block type="event" id="E8" action="log" level="info" desc="Log step 2.6 status">
523
+ <field name="message" value="Step 2.6 Status: COMPLETED - conventions-unit-test.md generated"/>
524
+ </block>
495
525
 
496
526
  <!-- ==================== STEP 2.7: GENERATE CONVENTIONS-SYSTEM-TEST.MD ==================== -->
497
- <task name="step2-7-generate-conventions-system-test" action="run-skill">
498
- <description>Generate conventions-system-test.md with system testing requirements</description>
499
- <script>
500
- <task action="copy-template" source="{{template_conventions_system_test}}" target="{{output_path}}/conventions-system-test.md">
501
- <parameter name="platform_type">{{platform_type}}</parameter>
502
- </task>
503
- <task action="fill-system-test-sections" target="{{output_path}}/conventions-system-test.md">
504
- <input name="platform_type">{{platform_type}}</input>
505
- <input name="framework">{{framework}}</input>
506
- </task>
507
- <checkpoint name="conventions-system-test-generated" verify="file.exists({{output_path}}/conventions-system-test.md)"/>
508
- <event action="log" level="info" message="Step 2.7 Status: COMPLETED - conventions-system-test.md generated"/>
509
- </script>
510
- </task>
527
+ <block type="task" id="B9-1" action="copy-template" desc="Copy conventions-system-test template">
528
+ <field name="source" value="${template_conventions_system_test}"/>
529
+ <field name="target" value="${output_path}/conventions-system-test.md"/>
530
+ <field name="platform_type" value="${platform_type}"/>
531
+ </block>
532
+ <block type="task" id="B9-2" action="fill-system-test-sections" desc="Fill system-test sections">
533
+ <field name="target" value="${output_path}/conventions-system-test.md"/>
534
+ <field name="platform_type" value="${platform_type}"/>
535
+ <field name="framework" value="${framework}"/>
536
+ </block>
537
+ <block type="checkpoint" id="CP9" name="conventions-system-test-generated" desc="conventions-system-test.md generated">
538
+ <field name="verify" value="file.exists(${output_path}/conventions-system-test.md)"/>
539
+ </block>
540
+ <block type="event" id="E9" action="log" level="info" desc="Log step 2.7 status">
541
+ <field name="message" value="Step 2.7 Status: COMPLETED - conventions-system-test.md generated"/>
542
+ </block>
511
543
 
512
544
  <!-- ==================== STEP 2.8: GENERATE CONVENTIONS-BUILD.MD ==================== -->
513
- <task name="step2-8-generate-conventions-build" action="run-skill">
514
- <description>Generate conventions-build.md with build and deployment conventions</description>
515
- <script>
516
- <task action="copy-template" source="{{template_conventions_build}}" target="{{output_path}}/conventions-build.md">
517
- <parameter name="build_tool">{{build_tool}}</parameter>
518
- </task>
519
- <task action="fill-build-sections" target="{{output_path}}/conventions-build.md">
520
- <input name="build_tool">{{build_tool}}</input>
521
- <input name="config_files">{{config_files}}</input>
522
- <input name="dependencies">{{dependencies}}</input>
523
- </task>
524
- <checkpoint name="conventions-build-generated" verify="file.exists({{output_path}}/conventions-build.md)"/>
525
- <event action="log" level="info" message="Step 2.8 Status: COMPLETED - conventions-build.md generated"/>
526
- </script>
527
- </task>
545
+ <block type="task" id="B10-1" action="copy-template" desc="Copy conventions-build template">
546
+ <field name="source" value="${template_conventions_build}"/>
547
+ <field name="target" value="${output_path}/conventions-build.md"/>
548
+ <field name="build_tool" value="${build_tool}"/>
549
+ </block>
550
+ <block type="task" id="B10-2" action="fill-build-sections" desc="Fill build sections">
551
+ <field name="target" value="${output_path}/conventions-build.md"/>
552
+ <field name="build_tool" value="${build_tool}"/>
553
+ <field name="config_files" value="${config_files}"/>
554
+ <field name="dependencies" value="${dependencies}"/>
555
+ </block>
556
+ <block type="checkpoint" id="CP10" name="conventions-build-generated" desc="conventions-build.md generated">
557
+ <field name="verify" value="file.exists(${output_path}/conventions-build.md)"/>
558
+ </block>
559
+ <block type="event" id="E10" action="log" level="info" desc="Log step 2.8 status">
560
+ <field name="message" value="Step 2.8 Status: COMPLETED - conventions-build.md generated"/>
561
+ </block>
528
562
 
529
563
  <!-- ==================== STEP 2.9: GENERATE CONVENTIONS-DATA.MD (CONDITIONAL) ==================== -->
530
- <gateway name="generate-data-doc" mode="exclusive">
531
- <branch condition="{{generate_data_doc}} == true">
532
- <task name="step2-9-generate-conventions-data" action="run-skill">
533
- <description>Generate conventions-data.md with data layer conventions</description>
534
- <script>
535
- <task action="copy-template" source="{{template_conventions_data}}" target="{{output_path}}/conventions-data.md">
536
- <parameter name="data_technology">{{data_technology}}</parameter>
537
- </task>
538
- <task action="fill-data-sections" target="{{output_path}}/conventions-data.md">
539
- <input name="data_technology">{{data_technology}}</input>
540
- <input name="platform_type">{{platform_type}}</input>
541
- <input name="dependencies">{{dependencies}}</input>
542
- </task>
543
- <checkpoint name="conventions-data-generated" verify="file.exists({{output_path}}/conventions-data.md)"/>
544
- <event action="log" level="info" message="Step 2.9 Status: COMPLETED - conventions-data.md generated"/>
545
- </script>
546
- </task>
564
+ <block type="gateway" id="G11" mode="exclusive" desc="Generate data doc decision">
565
+ <branch test="${generate_data_doc} == true" name="Generate data doc">
566
+ <block type="task" id="B11-1" action="copy-template" desc="Copy conventions-data template">
567
+ <field name="source" value="${template_conventions_data}"/>
568
+ <field name="target" value="${output_path}/conventions-data.md"/>
569
+ <field name="data_technology" value="${data_technology}"/>
570
+ </block>
571
+ <block type="task" id="B11-2" action="fill-data-sections" desc="Fill data sections">
572
+ <field name="target" value="${output_path}/conventions-data.md"/>
573
+ <field name="data_technology" value="${data_technology}"/>
574
+ <field name="platform_type" value="${platform_type}"/>
575
+ <field name="dependencies" value="${dependencies}"/>
576
+ </block>
577
+ <block type="checkpoint" id="CP11" name="conventions-data-generated" desc="conventions-data.md generated">
578
+ <field name="verify" value="file.exists(${output_path}/conventions-data.md)"/>
579
+ </block>
580
+ <block type="event" id="E11" action="log" level="info" desc="Log step 2.9 status">
581
+ <field name="message" value="Step 2.9 Status: COMPLETED - conventions-data.md generated"/>
582
+ </block>
547
583
  </branch>
548
- <branch condition="default">
549
- <event action="log" level="info" message="Step 2.9 Status: SKIPPED - No data layer detected, conventions-data.md not generated"/>
584
+ <branch default="true" name="Skip data doc">
585
+ <block type="event" id="E12" action="log" level="info" desc="Log skip status">
586
+ <field name="message" value="Step 2.9 Status: SKIPPED - No data layer detected, conventions-data.md not generated"/>
587
+ </block>
550
588
  </branch>
551
- </gateway>
589
+ </block>
552
590
 
553
591
  <!-- ==================== STEP 3: VERIFY ALL FILES GENERATED ==================== -->
554
- <task name="step3-verify-files" action="run-skill">
555
- <description>Verify all required documents exist on disk before creating done marker</description>
556
- <script>
557
- <task action="verify-file-exists" target="{{output_path}}/INDEX.md">
558
- <output name="index_exists" from="verify.result"/>
559
- </task>
560
- <task action="verify-file-exists" target="{{output_path}}/tech-stack.md">
561
- <output name="tech_stack_exists" from="verify.result"/>
562
- </task>
563
- <task action="verify-file-exists" target="{{output_path}}/architecture.md">
564
- <output name="architecture_exists" from="verify.result"/>
565
- </task>
566
- <task action="verify-file-exists" target="{{output_path}}/conventions-design.md">
567
- <output name="conventions_design_exists" from="verify.result"/>
568
- </task>
569
- <task action="verify-file-exists" target="{{output_path}}/conventions-dev.md">
570
- <output name="conventions_dev_exists" from="verify.result"/>
571
- </task>
572
- <task action="verify-file-exists" target="{{output_path}}/conventions-unit-test.md">
573
- <output name="conventions_unit_test_exists" from="verify.result"/>
574
- </task>
575
- <task action="verify-file-exists" target="{{output_path}}/conventions-system-test.md">
576
- <output name="conventions_system_test_exists" from="verify.result"/>
577
- </task>
578
- <task action="verify-file-exists" target="{{output_path}}/conventions-build.md">
579
- <output name="conventions_build_exists" from="verify.result"/>
580
- </task>
581
-
582
- <task action="compile-verification">
583
- <input name="index_exists">{{index_exists}}</input>
584
- <input name="tech_stack_exists">{{tech_stack_exists}}</input>
585
- <input name="architecture_exists">{{architecture_exists}}</input>
586
- <input name="conventions_design_exists">{{conventions_design_exists}}</input>
587
- <input name="conventions_dev_exists">{{conventions_dev_exists}}</input>
588
- <input name="conventions_unit_test_exists">{{conventions_unit_test_exists}}</input>
589
- <input name="conventions_system_test_exists">{{conventions_system_test_exists}}</input>
590
- <input name="conventions_build_exists">{{conventions_build_exists}}</input>
591
- <output name="all_required_exist" from="compilation.all_exist"/>
592
- <output name="missing_files" from="compilation.missing"/>
593
- </task>
594
-
595
- <gateway name="verification-result" mode="exclusive">
596
- <branch condition="{{all_required_exist}} == true">
597
- <event action="log" level="info" message="Step 3 Status: COMPLETED - All required documents verified to exist"/>
598
- </branch>
599
- <branch condition="default">
600
- <event action="log" level="error" message="Step 3 Status: FAILED - Missing files: {{missing_files}}"/>
601
- <output name="status" value="failed"/>
602
- <output name="message" value="Verification failed - missing required documents"/>
603
- </branch>
604
- </gateway>
605
-
606
- <checkpoint name="files-verified" verify="{{all_required_exist}} == true"/>
607
- </script>
608
- </task>
592
+ <block type="task" id="B12-1" action="verify-file-exists" desc="Verify INDEX.md">
593
+ <field name="target" value="${output_path}/INDEX.md"/>
594
+ <field name="output" var="index_exists" from="verify.result"/>
595
+ </block>
596
+ <block type="task" id="B12-2" action="verify-file-exists" desc="Verify tech-stack.md">
597
+ <field name="target" value="${output_path}/tech-stack.md"/>
598
+ <field name="output" var="tech_stack_exists" from="verify.result"/>
599
+ </block>
600
+ <block type="task" id="B12-3" action="verify-file-exists" desc="Verify architecture.md">
601
+ <field name="target" value="${output_path}/architecture.md"/>
602
+ <field name="output" var="architecture_exists" from="verify.result"/>
603
+ </block>
604
+ <block type="task" id="B12-4" action="verify-file-exists" desc="Verify conventions-design.md">
605
+ <field name="target" value="${output_path}/conventions-design.md"/>
606
+ <field name="output" var="conventions_design_exists" from="verify.result"/>
607
+ </block>
608
+ <block type="task" id="B12-5" action="verify-file-exists" desc="Verify conventions-dev.md">
609
+ <field name="target" value="${output_path}/conventions-dev.md"/>
610
+ <field name="output" var="conventions_dev_exists" from="verify.result"/>
611
+ </block>
612
+ <block type="task" id="B12-6" action="verify-file-exists" desc="Verify conventions-unit-test.md">
613
+ <field name="target" value="${output_path}/conventions-unit-test.md"/>
614
+ <field name="output" var="conventions_unit_test_exists" from="verify.result"/>
615
+ </block>
616
+ <block type="task" id="B12-7" action="verify-file-exists" desc="Verify conventions-system-test.md">
617
+ <field name="target" value="${output_path}/conventions-system-test.md"/>
618
+ <field name="output" var="conventions_system_test_exists" from="verify.result"/>
619
+ </block>
620
+ <block type="task" id="B12-8" action="verify-file-exists" desc="Verify conventions-build.md">
621
+ <field name="target" value="${output_path}/conventions-build.md"/>
622
+ <field name="output" var="conventions_build_exists" from="verify.result"/>
623
+ </block>
624
+
625
+ <block type="task" id="B12-9" action="compile-verification" desc="Compile verification results">
626
+ <field name="index_exists" value="${index_exists}"/>
627
+ <field name="tech_stack_exists" value="${tech_stack_exists}"/>
628
+ <field name="architecture_exists" value="${architecture_exists}"/>
629
+ <field name="conventions_design_exists" value="${conventions_design_exists}"/>
630
+ <field name="conventions_dev_exists" value="${conventions_dev_exists}"/>
631
+ <field name="conventions_unit_test_exists" value="${conventions_unit_test_exists}"/>
632
+ <field name="conventions_system_test_exists" value="${conventions_system_test_exists}"/>
633
+ <field name="conventions_build_exists" value="${conventions_build_exists}"/>
634
+ <field name="output" var="all_required_exist" from="compilation.all_exist"/>
635
+ <field name="output" var="missing_files" from="compilation.missing"/>
636
+ </block>
637
+
638
+ <block type="gateway" id="G13" mode="exclusive" desc="Verification result">
639
+ <branch test="${all_required_exist} == true" name="All files exist">
640
+ <block type="event" id="E13" action="log" level="info" desc="Log verification success">
641
+ <field name="message" value="Step 3 Status: COMPLETED - All required documents verified to exist"/>
642
+ </block>
643
+ </branch>
644
+ <branch default="true" name="Files missing">
645
+ <block type="event" id="E14" action="log" level="error" desc="Log verification failure">
646
+ <field name="message" value="Step 3 Status: FAILED - Missing files: ${missing_files}"/>
647
+ </block>
648
+ <block type="output" id="O-fail" desc="Failed output">
649
+ <field name="status" value="failed"/>
650
+ <field name="message" value="Verification failed - missing required documents"/>
651
+ </block>
652
+ </branch>
653
+ </block>
654
+
655
+ <block type="checkpoint" id="CP12" name="files-verified" desc="Files verified">
656
+ <field name="verify" value="${all_required_exist} == true"/>
657
+ </block>
609
658
 
610
659
  <!-- ==================== STEP 4: CREATE COMPLETION MARKER ==================== -->
611
- <task name="step4-create-done-marker" action="run-skill">
612
- <description>Create done marker file to signal completion - ONLY after all files verified</description>
613
- <script>
614
- <gateway name="pre-create-check" mode="guard">
615
- <branch condition="{{all_required_exist}} == true">
616
- <task action="create-file" target="{{output_path}}/conventions.done">
617
- <content>{
618
- "platform_id": "{{platform_id}}",
619
- "worker_type": "conventions",
620
- "status": "completed",
621
- "documents_generated": ["INDEX.md", "tech-stack.md", "architecture.md", "conventions-design.md", "conventions-dev.md", "conventions-unit-test.md", "conventions-system-test.md", "conventions-build.md"],
622
- "conventions_data_generated": {{generate_data_doc}},
623
- "analysis_file": "{{platform_id}}.analysis-conventions.json",
624
- "completed_at": "{{iso_timestamp}}"
625
- }</content>
626
- </task>
627
- <event action="log" level="info" message="Step 4 Status: COMPLETED - Done marker created"/>
628
- </branch>
629
- </gateway>
630
-
631
- <checkpoint name="done-marker-created" verify="file.exists({{output_path}}/conventions.done)"/>
632
- </script>
633
- </task>
660
+ <block type="gateway" id="G14" mode="guard" desc="Pre-create check">
661
+ <branch test="${all_required_exist} == true" name="Can create marker">
662
+ <block type="task" id="B14" action="create-file" desc="Create done marker">
663
+ <field name="target" value="${output_path}/conventions.done"/>
664
+ <field name="content" value="{
665
+ &quot;platform_id&quot;: &quot;${platform_id}&quot;,
666
+ &quot;worker_type&quot;: &quot;conventions&quot;,
667
+ &quot;status&quot;: &quot;completed&quot;,
668
+ &quot;documents_generated&quot;: [&quot;INDEX.md&quot;, &quot;tech-stack.md&quot;, &quot;architecture.md&quot;, &quot;conventions-design.md&quot;, &quot;conventions-dev.md&quot;, &quot;conventions-unit-test.md&quot;, &quot;conventions-system-test.md&quot;, &quot;conventions-build.md&quot;],
669
+ &quot;conventions_data_generated&quot;: ${generate_data_doc},
670
+ &quot;analysis_file&quot;: &quot;${platform_id}.analysis-conventions.json&quot;,
671
+ &quot;completed_at&quot;: &quot;${iso_timestamp}&quot;
672
+ }"/>
673
+ </block>
674
+ <block type="event" id="E15" action="log" level="info" desc="Log done marker created">
675
+ <field name="message" value="Step 4 Status: COMPLETED - Done marker created"/>
676
+ </block>
677
+ </branch>
678
+ </block>
679
+
680
+ <block type="checkpoint" id="CP13" name="done-marker-created" desc="Done marker created">
681
+ <field name="verify" value="file.exists(${output_path}/conventions.done)"/>
682
+ </block>
634
683
 
635
684
  <!-- ==================== STEP 5: GENERATE ANALYSIS COVERAGE REPORT ==================== -->
636
- <task name="step5-generate-analysis-report" action="run-skill">
637
- <description>Generate analysis coverage report as JSON file</description>
638
- <script>
639
- <task action="determine-output-dir">
640
- <input name="completed_dir">{{completed_dir}}</input>
641
- <input name="output_path">{{output_path}}</input>
642
- <output name="report_output_dir" from="determination.dir"/>
643
- </task>
644
-
645
- <task action="create-file" target="{{report_output_dir}}/{{platform_id}}.analysis-conventions.json">
646
- <content>{
647
- "platform_id": "{{platform_id}}",
648
- "platform_type": "{{platform_type}}",
649
- "worker_type": "conventions",
650
- "analyzed_at": "{{iso_timestamp}}",
651
- "topics": {
652
- "i18n": {
653
- "status": "{{topic_i18n_status}}",
654
- "files_analyzed": {{topic_i18n_files}},
655
- "notes": ""
685
+ <block type="task" id="B15-1" action="determine-output-dir" desc="Determine output directory">
686
+ <field name="completed_dir" value="${completed_dir}"/>
687
+ <field name="output_path" value="${output_path}"/>
688
+ <field name="output" var="report_output_dir" from="determination.dir"/>
689
+ </block>
690
+
691
+ <block type="task" id="B15-2" action="create-file" desc="Create analysis report">
692
+ <field name="target" value="${report_output_dir}/${platform_id}.analysis-conventions.json"/>
693
+ <field name="content" value="{
694
+ &quot;platform_id&quot;: &quot;${platform_id}&quot;,
695
+ &quot;platform_type&quot;: &quot;${platform_type}&quot;,
696
+ &quot;worker_type&quot;: &quot;conventions&quot;,
697
+ &quot;analyzed_at&quot;: &quot;${iso_timestamp}&quot;,
698
+ &quot;topics&quot;: {
699
+ &quot;i18n&quot;: {
700
+ &quot;status&quot;: &quot;${topic_i18n_status}&quot;,
701
+ &quot;files_analyzed&quot;: ${topic_i18n_files},
702
+ &quot;notes&quot;: &quot;&quot;
656
703
  },
657
- "authorization": {
658
- "status": "{{topic_auth_status}}",
659
- "files_analyzed": {{topic_auth_files}},
660
- "notes": ""
704
+ &quot;authorization&quot;: {
705
+ &quot;status&quot;: &quot;${topic_auth_status}&quot;,
706
+ &quot;files_analyzed&quot;: ${topic_auth_files},
707
+ &quot;notes&quot;: &quot;&quot;
661
708
  },
662
- "menu_registration": {
663
- "status": "{{topic_menu_status}}",
664
- "files_analyzed": {{topic_menu_files}},
665
- "notes": ""
709
+ &quot;menu_registration&quot;: {
710
+ &quot;status&quot;: &quot;${topic_menu_status}&quot;,
711
+ &quot;files_analyzed&quot;: ${topic_menu_files},
712
+ &quot;notes&quot;: &quot;&quot;
666
713
  },
667
- "data_dictionary": {
668
- "status": "{{topic_dict_status}}",
669
- "files_analyzed": {{topic_dict_files}},
670
- "notes": ""
714
+ &quot;data_dictionary&quot;: {
715
+ &quot;status&quot;: &quot;${topic_dict_status}&quot;,
716
+ &quot;files_analyzed&quot;: ${topic_dict_files},
717
+ &quot;notes&quot;: &quot;&quot;
671
718
  },
672
- "logging": {
673
- "status": "{{topic_logging_status}}",
674
- "files_analyzed": {{topic_logging_files}},
675
- "notes": ""
719
+ &quot;logging&quot;: {
720
+ &quot;status&quot;: &quot;${topic_logging_status}&quot;,
721
+ &quot;files_analyzed&quot;: ${topic_logging_files},
722
+ &quot;notes&quot;: &quot;&quot;
676
723
  },
677
- "api_request_layer": {
678
- "status": "{{topic_api_status}}",
679
- "files_analyzed": {{topic_api_files}},
680
- "notes": ""
724
+ &quot;api_request_layer&quot;: {
725
+ &quot;status&quot;: &quot;${topic_api_status}&quot;,
726
+ &quot;files_analyzed&quot;: ${topic_api_files},
727
+ &quot;notes&quot;: &quot;&quot;
681
728
  },
682
- "data_validation": {
683
- "status": "{{topic_validation_status}}",
684
- "files_analyzed": {{topic_validation_files}},
685
- "notes": ""
729
+ &quot;data_validation&quot;: {
730
+ &quot;status&quot;: &quot;${topic_validation_status}&quot;,
731
+ &quot;files_analyzed&quot;: ${topic_validation_files},
732
+ &quot;notes&quot;: &quot;&quot;
686
733
  },
687
- "file_upload": {
688
- "status": "{{topic_upload_status}}",
689
- "files_analyzed": {{topic_upload_files}},
690
- "notes": ""
734
+ &quot;file_upload&quot;: {
735
+ &quot;status&quot;: &quot;${topic_upload_status}&quot;,
736
+ &quot;files_analyzed&quot;: ${topic_upload_files},
737
+ &quot;notes&quot;: &quot;&quot;
691
738
  }
692
739
  },
693
- "config_files_analyzed": {{config_files}},
694
- "source_dirs_scanned": ["{{source_path}}"],
695
- "documents_generated": ["INDEX.md", "tech-stack.md", "architecture.md", "conventions-design.md", "conventions-dev.md", "conventions-unit-test.md", "conventions-system-test.md", "conventions-build.md"],
696
- "coverage_summary": {
697
- "topics_found": 0,
698
- "topics_partial": 0,
699
- "topics_not_found": 0,
700
- "topics_total": 8,
701
- "coverage_percent": 0
740
+ &quot;config_files_analyzed&quot;: ${config_files},
741
+ &quot;source_dirs_scanned&quot;: [&quot;${source_path}&quot;],
742
+ &quot;documents_generated&quot;: [&quot;INDEX.md&quot;, &quot;tech-stack.md&quot;, &quot;architecture.md&quot;, &quot;conventions-design.md&quot;, &quot;conventions-dev.md&quot;, &quot;conventions-unit-test.md&quot;, &quot;conventions-system-test.md&quot;, &quot;conventions-build.md&quot;],
743
+ &quot;coverage_summary&quot;: {
744
+ &quot;topics_found&quot;: 0,
745
+ &quot;topics_partial&quot;: 0,
746
+ &quot;topics_not_found&quot;: 0,
747
+ &quot;topics_total&quot;: 8,
748
+ &quot;coverage_percent&quot;: 0
702
749
  }
703
- }</content>
704
- </task>
750
+ }"/>
751
+ </block>
705
752
 
706
- <checkpoint name="analysis-report-generated" verify="file.exists({{report_output_dir}}/{{platform_id}}.analysis-conventions.json)"/>
707
- <event action="log" level="info" message="Step 5 Status: COMPLETED - Analysis coverage report generated"/>
708
- </script>
709
- </task>
753
+ <block type="checkpoint" id="CP14" name="analysis-report-generated" desc="Analysis report generated">
754
+ <field name="verify" value="file.exists(${report_output_dir}/${platform_id}.analysis-conventions.json)"/>
755
+ </block>
756
+ <block type="event" id="E16" action="log" level="info" desc="Log step 5 status">
757
+ <field name="message" value="Step 5 Status: COMPLETED - Analysis coverage report generated"/>
758
+ </block>
710
759
 
711
760
  <!-- ==================== STEP 6: REPORT RESULTS ==================== -->
712
- <task name="step6-report-results" action="run-skill">
713
- <description>Report final results and task completion</description>
714
- <script>
715
- <event action="log" level="info" message="==============================================="/>
716
- <event action="log" level="info" message="Platform Convention Documents Generated: {{platform_id}}"/>
717
- <event action="log" level="info" message="- INDEX.md: ✓"/>
718
- <event action="log" level="info" message="- tech-stack.md: ✓"/>
719
- <event action="log" level="info" message="- architecture.md: ✓"/>
720
- <event action="log" level="info" message="- conventions-design.md: ✓"/>
721
- <event action="log" level="info" message="- conventions-dev.md: ✓"/>
722
- <event action="log" level="info" message="- conventions-unit-test.md: ✓"/>
723
- <event action="log" level="info" message="- conventions-system-test.md: ✓"/>
724
- <event action="log" level="info" message="- conventions-build.md: ✓"/>
725
- <event action="log" level="info" message="- conventions-data.md: {{generate_data_doc ? '' : 'SKIPPED'}}"/>
726
- <event action="log" level="info" message="- {{platform_id}}.analysis-conventions.json: ✓"/>
727
- <event action="log" level="info" message="- Output Directory: {{output_path}}"/>
728
- <event action="log" level="info" message="==============================================="/>
729
-
730
- <output name="status" value="success"/>
731
- <output name="documents_generated" value="[INDEX.md, tech-stack.md, architecture.md, conventions-design.md, conventions-dev.md, conventions-unit-test.md, conventions-system-test.md, conventions-build.md]"/>
732
- <output name="analysis_file" value="{{report_output_dir}}/{{platform_id}}.analysis-conventions.json"/>
733
- <output name="message" value="Convention documents generated for {{platform_id}}"/>
734
-
735
- <checkpoint name="workflow-complete" verify="true"/>
736
- </script>
737
- </task>
761
+ <block type="event" id="E17" action="log" level="info" desc="Log separator">
762
+ <field name="message" value="==============================================="/>
763
+ </block>
764
+ <block type="event" id="E18" action="log" level="info" desc="Log header">
765
+ <field name="message" value="Platform Convention Documents Generated: ${platform_id}"/>
766
+ </block>
767
+ <block type="event" id="E19" action="log" level="info" desc="Log INDEX">
768
+ <field name="message" value="- INDEX.md: ✓"/>
769
+ </block>
770
+ <block type="event" id="E20" action="log" level="info" desc="Log tech-stack">
771
+ <field name="message" value="- tech-stack.md: ✓"/>
772
+ </block>
773
+ <block type="event" id="E21" action="log" level="info" desc="Log architecture">
774
+ <field name="message" value="- architecture.md: ✓"/>
775
+ </block>
776
+ <block type="event" id="E22" action="log" level="info" desc="Log conventions-design">
777
+ <field name="message" value="- conventions-design.md: ✓"/>
778
+ </block>
779
+ <block type="event" id="E23" action="log" level="info" desc="Log conventions-dev">
780
+ <field name="message" value="- conventions-dev.md: "/>
781
+ </block>
782
+ <block type="event" id="E24" action="log" level="info" desc="Log conventions-unit-test">
783
+ <field name="message" value="- conventions-unit-test.md: ✓"/>
784
+ </block>
785
+ <block type="event" id="E25" action="log" level="info" desc="Log conventions-system-test">
786
+ <field name="message" value="- conventions-system-test.md: ✓"/>
787
+ </block>
788
+ <block type="event" id="E26" action="log" level="info" desc="Log conventions-build">
789
+ <field name="message" value="- conventions-build.md: ✓"/>
790
+ </block>
791
+ <block type="event" id="E27" action="log" level="info" desc="Log conventions-data">
792
+ <field name="message" value="- conventions-data.md: ${generate_data_doc ? '✓' : 'SKIPPED'}"/>
793
+ </block>
794
+ <block type="event" id="E28" action="log" level="info" desc="Log analysis file">
795
+ <field name="message" value="- ${platform_id}.analysis-conventions.json: ✓"/>
796
+ </block>
797
+ <block type="event" id="E29" action="log" level="info" desc="Log output directory">
798
+ <field name="message" value="- Output Directory: ${output_path}"/>
799
+ </block>
800
+ <block type="event" id="E30" action="log" level="info" desc="Log footer">
801
+ <field name="message" value="==============================================="/>
802
+ </block>
803
+
804
+ <block type="output" id="O-vals" desc="Final output values">
805
+ <field name="status" value="success"/>
806
+ <field name="documents_generated" value="[INDEX.md, tech-stack.md, architecture.md, conventions-design.md, conventions-dev.md, conventions-unit-test.md, conventions-system-test.md, conventions-build.md]"/>
807
+ <field name="analysis_file" value="${report_output_dir}/${platform_id}.analysis-conventions.json"/>
808
+ <field name="message" value="Convention documents generated for ${platform_id}"/>
809
+ </block>
810
+
811
+ <block type="checkpoint" id="CP15" name="workflow-complete" desc="Workflow complete">
812
+ <field name="verify" value="true"/>
813
+ </block>
738
814
 
739
815
  <!-- ==================== FINAL OUTPUT ==================== -->
740
- <output name="status" from="step6-report-results.status"/>
741
- <output name="documents_generated" from="step6-report-results.documents_generated"/>
742
- <output name="analysis_file" from="step6-report-results.analysis_file"/>
743
- <output name="message" from="step6-report-results.message"/>
816
+ <block type="output" id="O1" desc="Final workflow outputs">
817
+ <field name="status" from="step6-report-results.status"/>
818
+ <field name="documents_generated" from="step6-report-results.documents_generated"/>
819
+ <field name="analysis_file" from="step6-report-results.analysis_file"/>
820
+ <field name="message" from="step6-report-results.message"/>
821
+ </block>
744
822
 
745
823
  <!-- ==================== ERROR HANDLING ==================== -->
746
- <error-handler>
747
- <catch type="file-not-found">
748
- <event action="log" level="error" message="File not found: {{error.file}}"/>
749
- <output name="status" value="failed"/>
750
- <output name="message" value="Required file not found: {{error.file}}"/>
824
+ <block type="error-handler" id="EH1" desc="Global error handling">
825
+ <catch error-type="file-not-found">
826
+ <block type="event" id="E-err1" action="log" level="error" desc="Log file not found">
827
+ <field name="message" value="File not found: ${error.file}"/>
828
+ </block>
829
+ <block type="output" id="O-err1" desc="Error output">
830
+ <field name="status" value="failed"/>
831
+ <field name="message" value="Required file not found: ${error.file}"/>
832
+ </block>
751
833
  </catch>
752
- <catch type="template-error">
753
- <event action="log" level="error" message="Template processing error: {{error.message}}"/>
754
- <output name="status" value="failed"/>
755
- <output name="message" value="Failed to process template: {{error.message}}"/>
834
+ <catch error-type="template-error">
835
+ <block type="event" id="E-err2" action="log" level="error" desc="Log template error">
836
+ <field name="message" value="Template processing error: ${error.message}"/>
837
+ </block>
838
+ <block type="output" id="O-err2" desc="Error output">
839
+ <field name="status" value="failed"/>
840
+ <field name="message" value="Failed to process template: ${error.message}"/>
841
+ </block>
756
842
  </catch>
757
- <catch type="verification-failed">
758
- <event action="log" level="error" message="Verification failed: {{error.message}}"/>
759
- <output name="status" value="failed"/>
760
- <output name="message" value="Document verification failed: {{error.message}}"/>
843
+ <catch error-type="verification-failed">
844
+ <block type="event" id="E-err3" action="log" level="error" desc="Log verification error">
845
+ <field name="message" value="Verification failed: ${error.message}"/>
846
+ </block>
847
+ <block type="output" id="O-err3" desc="Error output">
848
+ <field name="status" value="failed"/>
849
+ <field name="message" value="Document verification failed: ${error.message}"/>
850
+ </block>
761
851
  </catch>
762
- <catch type="context-limit">
763
- <event action="log" level="warning" message="Context window running low - checkpoint saved"/>
764
- <output name="status" value="partial"/>
765
- <output name="message" value="Execution paused due to context limit. Checkpoint saved, can resume."/>
852
+ <catch error-type="context-limit">
853
+ <block type="event" id="E-err4" action="log" level="warning" desc="Log context limit">
854
+ <field name="message" value="Context window running low - checkpoint saved"/>
855
+ </block>
856
+ <block type="output" id="O-err4" desc="Partial output">
857
+ <field name="status" value="partial"/>
858
+ <field name="message" value="Execution paused due to context limit. Checkpoint saved, can resume."/>
859
+ </block>
766
860
  </catch>
767
861
  <finally>
768
- <event action="log" level="info" message="Workflow execution completed with status: {{status}}"/>
862
+ <block type="event" id="E-finally" action="log" level="info" desc="Log workflow complete">
863
+ <field name="message" value="Workflow execution completed with status: ${status}"/>
864
+ </block>
769
865
  </finally>
770
- </error-handler>
866
+ </block>
771
867
 
772
868
  </workflow>
773
- ```
774
869
 
775
870
  ## Constraints
776
871
 
777
872
  1. **DO NOT create temporary scripts, batch files, or workaround code files (`.py`, `.bat`, `.sh`, `.ps1`, etc.)** under any circumstances
778
- 2. **DO NOT analyze files outside the specified `{{source_path}}`**
779
- 3. **All content MUST be in the language specified by `{{language}}`**
873
+ 2. **DO NOT analyze files outside the specified `${source_path}`**
874
+ 3. **All content MUST be in the language specified by `${language}`**
780
875
  4. **Use `search_replace` for section filling, NEVER rewrite entire document**
781
876
  5. **Mermaid diagrams MUST follow the rules in `mermaid-rule.md`**
782
877
  6. **All links MUST use relative paths, NEVER `file://` protocol**
@@ -790,22 +885,22 @@ When the task is complete, report the following:
790
885
  **Status:** `success` | `partial` | `failed`
791
886
 
792
887
  **Summary:**
793
- - Platform: `{{platform_id}}`
794
- - Type: `{{platform_type}}`
795
- - Framework: `{{framework}}`
888
+ - Platform: `${platform_id}`
889
+ - Type: `${platform_type}`
890
+ - Framework: `${framework}`
796
891
  - Documents generated: 8 required + (1 optional if data layer detected)
797
892
 
798
893
  **Files Generated:**
799
- - `{{output_path}}/INDEX.md` - Platform technology index
800
- - `{{output_path}}/tech-stack.md` - Technology stack details
801
- - `{{output_path}}/architecture.md` - Architecture conventions
802
- - `{{output_path}}/conventions-design.md` - Design conventions
803
- - `{{output_path}}/conventions-dev.md` - Development conventions
804
- - `{{output_path}}/conventions-unit-test.md` - Unit testing conventions
805
- - `{{output_path}}/conventions-system-test.md` - System testing conventions
806
- - `{{output_path}}/conventions-build.md` - Build and deployment conventions
807
- - `{{output_path}}/conventions-data.md` - Data conventions (optional)
808
- - `{{completed_dir}}/{{platform_id}}.analysis-conventions.json` - Analysis coverage report
894
+ - `${output_path}/INDEX.md` - Platform technology index
895
+ - `${output_path}/tech-stack.md` - Technology stack details
896
+ - `${output_path}/architecture.md` - Architecture conventions
897
+ - `${output_path}/conventions-design.md` - Design conventions
898
+ - `${output_path}/conventions-dev.md` - Development conventions
899
+ - `${output_path}/conventions-unit-test.md` - Unit testing conventions
900
+ - `${output_path}/conventions-system-test.md` - System testing conventions
901
+ - `${output_path}/conventions-build.md` - Build and deployment conventions
902
+ - `${output_path}/conventions-data.md` - Data conventions (optional)
903
+ - `${completed_dir}/${platform_id}.analysis-conventions.json` - Analysis coverage report
809
904
 
810
905
  ## Checklist
811
906
 
@@ -834,7 +929,7 @@ When the task is complete, report the following:
834
929
  - [ ] **Mermaid compatibility**: No `style`, `direction`, `<br/>`, or nested subgraphs
835
930
  - [ ] **Document completeness**: All 8 required documents exist (verified in Step 3)
836
931
  - [ ] **Done marker integrity**: Done marker only created after verification
837
- - [ ] **Analysis Coverage Report**: `{{platform_id}}.analysis-conventions.json` generated
932
+ - [ ] **Analysis Coverage Report**: `${platform_id}.analysis-conventions.json` generated
838
933
 
839
934
  ## CONTINUOUS EXECUTION RULES
840
935