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.
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze-xml/SKILL.md +505 -477
- package/.speccrew/skills/speccrew-knowledge-bizs-api-graph-xml/SKILL.md +290 -196
- package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries-xml/SKILL.md +145 -145
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze-xml/SKILL.md +325 -376
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph-xml/SKILL.md +241 -129
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract-xml/SKILL.md +231 -209
- package/.speccrew/skills/speccrew-knowledge-module-summarize-xml/SKILL.md +301 -255
- package/.speccrew/skills/speccrew-knowledge-system-summarize-xml/SKILL.md +362 -278
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions-xml/SKILL.md +722 -627
- package/.speccrew/skills/speccrew-knowledge-techs-generate-xml/SKILL.md +195 -117
- package/.speccrew/skills/speccrew-knowledge-techs-index-xml/SKILL.md +151 -99
- package/.speccrew/skills/speccrew-knowledge-techs-init-xml/SKILL.md +201 -99
- package/package.json +1 -1
|
@@ -60,391 +60,475 @@ flowchart TD
|
|
|
60
60
|
|
|
61
61
|
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: `docs/rules/xml-workflow-spec.md`
|
|
62
62
|
|
|
63
|
-
<workflow>
|
|
64
|
-
<!--
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
<
|
|
63
|
+
<workflow id="system-summarize-main" status="pending" version="1.0" desc="System summarization workflow">
|
|
64
|
+
<!-- ============================================================
|
|
65
|
+
Input Parameters Definition
|
|
66
|
+
============================================================ -->
|
|
67
|
+
<block type="input" id="I1" desc="System summarization input parameters">
|
|
68
|
+
<field name="modules_path" required="true" type="string" desc="Path to modules directory"/>
|
|
69
|
+
<field name="output_path" required="true" type="string" desc="Output path for system-overview.md"/>
|
|
70
|
+
<field name="language" required="true" type="string" desc="Target language for generated content"/>
|
|
71
|
+
</block>
|
|
72
|
+
|
|
73
|
+
<!-- ============================================================
|
|
74
|
+
Global Continuous Execution Rules
|
|
75
|
+
============================================================ -->
|
|
76
|
+
<block type="rule" id="GLOBAL-R1" level="forbidden" desc="Continuous execution constraints — NEVER violate">
|
|
77
|
+
<field name="text">DO NOT ask user "Should I continue?" or "How would you like to proceed?" during execution</field>
|
|
78
|
+
<field name="text">DO NOT offer options like "Full execution / Partial / Stop" — always execute ALL tasks to completion</field>
|
|
79
|
+
<field name="text">DO NOT suggest "Due to context window limits, let me pause" — complete current task, use checkpoint for resumption</field>
|
|
80
|
+
<field name="text">DO NOT estimate workload and suggest breaking it into phases — execute ALL items in sequence</field>
|
|
81
|
+
<field name="text">DO NOT warn about "large number of files" or "this may take a while" — proceed with generation</field>
|
|
82
|
+
<field name="text">Context window management: if approaching limit, save progress to checkpoint file and resume — do NOT ask user for guidance</field>
|
|
83
|
+
</block>
|
|
84
|
+
|
|
85
|
+
<!-- ============================================================
|
|
86
|
+
Edge Case Rules
|
|
87
|
+
============================================================ -->
|
|
88
|
+
<block type="rule" id="R-NOTE1" level="note" desc="Edge case handling">
|
|
89
|
+
<field name="text">Empty modules directory: Generate skeleton with warning status if no *-overview.md files found</field>
|
|
90
|
+
</block>
|
|
91
|
+
<block type="rule" id="R-NOTE2" level="note" desc="Incomplete data handling">
|
|
92
|
+
<field name="text">Incomplete module overviews: Use available data and mark gaps with <!-- DATA INCOMPLETE --></field>
|
|
93
|
+
</block>
|
|
94
|
+
<block type="rule" id="R-NOTE3" level="note" desc="Module name conflict handling">
|
|
95
|
+
<field name="text">Same module name from different platforms: Treat as separate modules with platform annotation</field>
|
|
96
|
+
</block>
|
|
68
97
|
|
|
69
98
|
<!-- Prerequisites Verification -->
|
|
70
|
-
<event action="log" level="info"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
<rule level="note">Empty modules directory: Generate skeleton with warning status if no *-overview.md files found</rule>
|
|
74
|
-
<rule level="note">Incomplete module overviews: Use available data and mark gaps with <!-- DATA INCOMPLETE --></rule>
|
|
75
|
-
<rule level="note">Same module name from different platforms: Treat as separate modules with platform annotation</rule>
|
|
99
|
+
<block type="event" id="E1" action="log" level="info" desc="Log workflow start">
|
|
100
|
+
Starting system summarization workflow
|
|
101
|
+
</block>
|
|
76
102
|
|
|
77
103
|
<!-- Step 0: Read System Overview Template -->
|
|
78
|
-
<task
|
|
79
|
-
<
|
|
80
|
-
<
|
|
81
|
-
|
|
104
|
+
<block type="task" id="B0" action="run-skill" desc="Read system overview template">
|
|
105
|
+
<field name="skill">Read</field>
|
|
106
|
+
<field name="file_path" value="../speccrew-knowledge-system-summarize/templates/SYSTEM-OVERVIEW-TEMPLATE.md"/>
|
|
107
|
+
<field name="output" var="template_content"/>
|
|
108
|
+
</block>
|
|
82
109
|
|
|
83
110
|
<!-- Checkpoint: Template loaded -->
|
|
84
|
-
<checkpoint name="template_loaded"
|
|
111
|
+
<block type="checkpoint" id="CP0" name="template_loaded" desc="Template loaded successfully">
|
|
112
|
+
<field name="verify" value="${template_content} != null"/>
|
|
113
|
+
</block>
|
|
85
114
|
|
|
86
115
|
<!-- Step 1: Discover All Modules -->
|
|
87
|
-
<task
|
|
88
|
-
<
|
|
89
|
-
<
|
|
90
|
-
|
|
116
|
+
<block type="task" id="B1" action="run-skill" desc="Discover all module overview files">
|
|
117
|
+
<field name="skill">Glob</field>
|
|
118
|
+
<field name="pattern" value="${modules_path}/**/*-overview.md"/>
|
|
119
|
+
<field name="output" var="module_files"/>
|
|
120
|
+
</block>
|
|
91
121
|
|
|
92
122
|
<!-- Gateway: Handle empty modules directory -->
|
|
93
|
-
<gateway
|
|
94
|
-
<branch
|
|
95
|
-
<event action="log" level="warning"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
123
|
+
<block type="gateway" id="G1" mode="exclusive" desc="Check if modules discovered">
|
|
124
|
+
<branch test="${module_files.length} == 0" name="No modules">
|
|
125
|
+
<block type="event" id="E2" action="log" level="warning" desc="Log no modules found">
|
|
126
|
+
No module overview files found in ${modules_path}
|
|
127
|
+
</block>
|
|
128
|
+
<block type="task" id="B2" action="run-script" desc="Generate skeleton document">
|
|
129
|
+
<field name="script" value="generate-skeleton.js"/>
|
|
130
|
+
<field name="template" value="${template_content}"/>
|
|
131
|
+
<field name="output" var="skeleton_doc"/>
|
|
132
|
+
</block>
|
|
133
|
+
<block type="task" id="B3" action="run-skill" desc="Write skeleton document">
|
|
134
|
+
<field name="skill">Write</field>
|
|
135
|
+
<field name="file_path" value="${output_path}/system-overview.md"/>
|
|
136
|
+
<field name="content" value="${skeleton_doc}"/>
|
|
137
|
+
</block>
|
|
138
|
+
<block type="output" id="O-early" desc="Early output for empty case">
|
|
139
|
+
<field name="status" value="warning"/>
|
|
140
|
+
</block>
|
|
141
|
+
<block type="event" id="E3" action="signal" desc="Signal workflow complete">
|
|
142
|
+
<field name="signal" value="workflow_complete_with_warning"/>
|
|
143
|
+
</block>
|
|
107
144
|
</branch>
|
|
108
|
-
<branch
|
|
109
|
-
<event action="log" level="info"
|
|
145
|
+
<branch test="${module_files.length} > 0" name="Modules found">
|
|
146
|
+
<block type="event" id="E4" action="log" level="info" desc="Log modules discovered">
|
|
147
|
+
Discovered ${module_files.length} module overview files
|
|
148
|
+
</block>
|
|
110
149
|
</branch>
|
|
111
|
-
</
|
|
150
|
+
</block>
|
|
112
151
|
|
|
113
152
|
<!-- Extract platform types from paths -->
|
|
114
|
-
<loop
|
|
115
|
-
<task
|
|
116
|
-
<
|
|
117
|
-
<
|
|
118
|
-
<
|
|
119
|
-
</
|
|
120
|
-
</
|
|
153
|
+
<block type="loop" id="L1" over="${module_files}" as="module_file" desc="Extract platform types from paths">
|
|
154
|
+
<block type="task" id="B4" action="run-script" desc="Parse platform from file path">
|
|
155
|
+
<field name="script" value="extract-platform.js"/>
|
|
156
|
+
<field name="file_path" value="${module_file}"/>
|
|
157
|
+
<field name="output" var="platform_info"/>
|
|
158
|
+
</block>
|
|
159
|
+
</block>
|
|
121
160
|
|
|
122
161
|
<!-- Checkpoint: Modules discovered -->
|
|
123
|
-
<checkpoint name="modules_discovered"
|
|
162
|
+
<block type="checkpoint" id="CP1" name="modules_discovered" desc="Modules discovery complete">
|
|
163
|
+
<field name="verify" value="${module_files.length} > 0"/>
|
|
164
|
+
</block>
|
|
124
165
|
|
|
125
166
|
<!-- Step 2: Read All Module Overviews -->
|
|
126
|
-
<loop
|
|
127
|
-
<task
|
|
128
|
-
<
|
|
129
|
-
<
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
<
|
|
134
|
-
<
|
|
135
|
-
<
|
|
136
|
-
|
|
137
|
-
|
|
167
|
+
<block type="loop" id="L2" over="${module_files}" as="module_file" desc="Read all module overview files">
|
|
168
|
+
<block type="task" id="B5" action="run-skill" desc="Read module overview">
|
|
169
|
+
<field name="skill">Read</field>
|
|
170
|
+
<field name="file_path" value="${module_file}"/>
|
|
171
|
+
<field name="output" var="module_content"/>
|
|
172
|
+
</block>
|
|
173
|
+
<block type="task" id="B6" action="run-script" desc="Extract module info">
|
|
174
|
+
<field name="script" value="extract-module-info.js"/>
|
|
175
|
+
<field name="content" value="${module_content}"/>
|
|
176
|
+
<field name="file_path" value="${module_file}"/>
|
|
177
|
+
<field name="output" var="module_info"/>
|
|
178
|
+
</block>
|
|
179
|
+
</block>
|
|
138
180
|
|
|
139
181
|
<!-- Checkpoint: Module info extracted -->
|
|
140
|
-
<checkpoint name="modules_read"
|
|
182
|
+
<block type="checkpoint" id="CP2" name="modules_read" desc="All modules read successfully">
|
|
183
|
+
<field name="verify" value="${module_infos.length} == ${module_files.length}"/>
|
|
184
|
+
</block>
|
|
141
185
|
|
|
142
186
|
<!-- Step 3: Build Module Index -->
|
|
143
|
-
<task
|
|
144
|
-
<
|
|
145
|
-
<
|
|
146
|
-
<
|
|
147
|
-
</
|
|
187
|
+
<block type="task" id="B7" action="run-script" desc="Build module index">
|
|
188
|
+
<field name="script" value="build-module-index.js"/>
|
|
189
|
+
<field name="modules" value="${module_infos}"/>
|
|
190
|
+
<field name="output" var="module_index"/>
|
|
191
|
+
</block>
|
|
148
192
|
|
|
149
193
|
<!-- Create index table rows -->
|
|
150
|
-
<loop
|
|
151
|
-
<task
|
|
152
|
-
<
|
|
153
|
-
<
|
|
154
|
-
<
|
|
155
|
-
<
|
|
156
|
-
</
|
|
157
|
-
</
|
|
194
|
+
<block type="loop" id="L3" over="${module_infos}" as="module_info" desc="Create index table rows">
|
|
195
|
+
<block type="task" id="B8" action="run-script" desc="Create index row">
|
|
196
|
+
<field name="script" value="create-index-row.js"/>
|
|
197
|
+
<field name="module" value="${module_info}"/>
|
|
198
|
+
<field name="language" value="${language}"/>
|
|
199
|
+
<field name="output" var="index_row"/>
|
|
200
|
+
</block>
|
|
201
|
+
</block>
|
|
158
202
|
|
|
159
203
|
<!-- Checkpoint: Index built -->
|
|
160
|
-
<checkpoint name="index_built"
|
|
204
|
+
<block type="checkpoint" id="CP3" name="index_built" desc="Module index built">
|
|
205
|
+
<field name="verify" value="${module_index} != null"/>
|
|
206
|
+
</block>
|
|
161
207
|
|
|
162
208
|
<!-- Step 4: Build Dependency Graph -->
|
|
163
|
-
<task
|
|
164
|
-
<
|
|
165
|
-
<
|
|
166
|
-
<
|
|
167
|
-
</
|
|
209
|
+
<block type="task" id="B9" action="run-script" desc="Extract all dependencies">
|
|
210
|
+
<field name="script" value="extract-all-dependencies.js"/>
|
|
211
|
+
<field name="modules" value="${module_infos}"/>
|
|
212
|
+
<field name="output" var="all_dependencies"/>
|
|
213
|
+
</block>
|
|
168
214
|
|
|
169
215
|
<!-- Classify dependencies -->
|
|
170
|
-
<loop
|
|
171
|
-
<gateway
|
|
172
|
-
<branch
|
|
173
|
-
<output
|
|
216
|
+
<block type="loop" id="L4" over="${all_dependencies}" as="dependency" desc="Classify dependencies by type">
|
|
217
|
+
<block type="gateway" id="G2" mode="exclusive" desc="Classify dependency type">
|
|
218
|
+
<branch test="${dependency.type} == 'internal'" name="Internal dependency">
|
|
219
|
+
<block type="output" id="O-int" desc="Add to internal deps">
|
|
220
|
+
<field name="internal_deps" append="${dependency}"/>
|
|
221
|
+
</block>
|
|
174
222
|
</branch>
|
|
175
|
-
<branch
|
|
176
|
-
<output
|
|
223
|
+
<branch test="${dependency.type} == 'external'" name="External dependency">
|
|
224
|
+
<block type="output" id="O-ext" desc="Add to external deps">
|
|
225
|
+
<field name="external_deps" append="${dependency}"/>
|
|
226
|
+
</block>
|
|
177
227
|
</branch>
|
|
178
|
-
<branch
|
|
179
|
-
<output
|
|
228
|
+
<branch test="${dependency.type} == 'cross_platform'" name="Cross-platform dependency">
|
|
229
|
+
<block type="output" id="O-cross" desc="Add to cross-platform deps">
|
|
230
|
+
<field name="cross_platform_deps" append="${dependency}"/>
|
|
231
|
+
</block>
|
|
180
232
|
</branch>
|
|
181
|
-
</
|
|
182
|
-
</
|
|
233
|
+
</block>
|
|
234
|
+
</block>
|
|
183
235
|
|
|
184
236
|
<!-- Build directed graph -->
|
|
185
|
-
<task
|
|
186
|
-
<
|
|
187
|
-
<
|
|
188
|
-
<
|
|
189
|
-
<
|
|
190
|
-
</
|
|
237
|
+
<block type="task" id="B10" action="run-script" desc="Build dependency graph">
|
|
238
|
+
<field name="script" value="build-dep-graph.js"/>
|
|
239
|
+
<field name="internal_deps" value="${internal_deps}"/>
|
|
240
|
+
<field name="cross_platform_deps" value="${cross_platform_deps}"/>
|
|
241
|
+
<field name="output" var="dependency_graph"/>
|
|
242
|
+
</block>
|
|
191
243
|
|
|
192
244
|
<!-- Generate Mermaid diagram -->
|
|
193
|
-
<task
|
|
194
|
-
<
|
|
195
|
-
<
|
|
196
|
-
<
|
|
197
|
-
<
|
|
198
|
-
</
|
|
245
|
+
<block type="task" id="B11" action="run-script" desc="Generate Mermaid dependency diagram">
|
|
246
|
+
<field name="script" value="generate-mermaid-diagram.js"/>
|
|
247
|
+
<field name="graph" value="${dependency_graph}"/>
|
|
248
|
+
<field name="diagram_type" value="graph LR"/>
|
|
249
|
+
<field name="output" var="mermaid_deps"/>
|
|
250
|
+
</block>
|
|
199
251
|
|
|
200
252
|
<!-- Checkpoint: Dependency graph built -->
|
|
201
|
-
<checkpoint name="deps_built"
|
|
253
|
+
<block type="checkpoint" id="CP4" name="deps_built" desc="Dependency graph built">
|
|
254
|
+
<field name="verify" value="${dependency_graph.nodes.length} > 0"/>
|
|
255
|
+
</block>
|
|
202
256
|
|
|
203
257
|
<!-- Step 5: Identify Business Domains -->
|
|
204
|
-
<task
|
|
205
|
-
<
|
|
206
|
-
<
|
|
207
|
-
<
|
|
208
|
-
</
|
|
258
|
+
<block type="task" id="B12" action="run-script" desc="Extract business domains">
|
|
259
|
+
<field name="script" value="extract-domains.js"/>
|
|
260
|
+
<field name="modules" value="${module_infos}"/>
|
|
261
|
+
<field name="output" var="business_domains"/>
|
|
262
|
+
</block>
|
|
209
263
|
|
|
210
264
|
<!-- Group modules by domain -->
|
|
211
|
-
<loop
|
|
212
|
-
<task
|
|
213
|
-
<
|
|
214
|
-
<
|
|
215
|
-
<
|
|
216
|
-
<
|
|
217
|
-
</
|
|
218
|
-
</
|
|
265
|
+
<block type="loop" id="L5" over="${business_domains}" as="domain" desc="Group modules by domain">
|
|
266
|
+
<block type="task" id="B13" action="run-script" desc="Find domain modules">
|
|
267
|
+
<field name="script" value="find-domain-modules.js"/>
|
|
268
|
+
<field name="domain" value="${domain}"/>
|
|
269
|
+
<field name="modules" value="${module_infos}"/>
|
|
270
|
+
<field name="output" var="domain_modules"/>
|
|
271
|
+
</block>
|
|
272
|
+
</block>
|
|
219
273
|
|
|
220
274
|
<!-- Generate domain diagram -->
|
|
221
|
-
<task
|
|
222
|
-
<
|
|
223
|
-
<
|
|
224
|
-
<
|
|
225
|
-
<
|
|
226
|
-
</
|
|
275
|
+
<block type="task" id="B14" action="run-script" desc="Generate domain diagram">
|
|
276
|
+
<field name="script" value="generate-domain-diagram.js"/>
|
|
277
|
+
<field name="domains" value="${business_domains}"/>
|
|
278
|
+
<field name="module_groups" value="${domain_module_groups}"/>
|
|
279
|
+
<field name="output" var="domain_diagram"/>
|
|
280
|
+
</block>
|
|
227
281
|
|
|
228
282
|
<!-- Checkpoint: Domains identified -->
|
|
229
|
-
<checkpoint name="domains_identified"
|
|
283
|
+
<block type="checkpoint" id="CP5" name="domains_identified" desc="Business domains identified">
|
|
284
|
+
<field name="verify" value="${business_domains.length} > 0"/>
|
|
285
|
+
</block>
|
|
230
286
|
|
|
231
287
|
<!-- Step 6: Identify End-to-End Flows -->
|
|
232
|
-
<task
|
|
233
|
-
<
|
|
234
|
-
<
|
|
235
|
-
<
|
|
236
|
-
<
|
|
237
|
-
</
|
|
288
|
+
<block type="task" id="B15" action="run-script" desc="Analyze cross-module flows">
|
|
289
|
+
<field name="script" value="analyze-cross-module-flows.js"/>
|
|
290
|
+
<field name="dependencies" value="${all_dependencies}"/>
|
|
291
|
+
<field name="modules" value="${module_infos}"/>
|
|
292
|
+
<field name="output" var="end_to_end_flows"/>
|
|
293
|
+
</block>
|
|
238
294
|
|
|
239
295
|
<!-- Create flow-module mapping matrix -->
|
|
240
|
-
<loop
|
|
241
|
-
<task
|
|
242
|
-
<
|
|
243
|
-
<
|
|
244
|
-
<
|
|
245
|
-
<
|
|
246
|
-
</
|
|
247
|
-
</
|
|
296
|
+
<block type="loop" id="L6" over="${end_to_end_flows}" as="flow" desc="Build flow-module matrix">
|
|
297
|
+
<block type="task" id="B16" action="run-script" desc="Map flow to modules">
|
|
298
|
+
<field name="script" value="map-flow-modules.js"/>
|
|
299
|
+
<field name="flow" value="${flow}"/>
|
|
300
|
+
<field name="modules" value="${module_infos}"/>
|
|
301
|
+
<field name="output" var="flow_mapping"/>
|
|
302
|
+
</block>
|
|
303
|
+
</block>
|
|
248
304
|
|
|
249
305
|
<!-- Checkpoint: Flows identified -->
|
|
250
|
-
<checkpoint name="flows_identified"
|
|
306
|
+
<block type="checkpoint" id="CP6" name="flows_identified" desc="End-to-end flows identified">
|
|
307
|
+
<field name="verify" value="${end_to_end_flows.length} >= 0"/>
|
|
308
|
+
</block>
|
|
251
309
|
|
|
252
310
|
<!-- Step 7: Generate system-overview.md -->
|
|
253
311
|
<!-- Phase A: Skeleton Construction -->
|
|
254
|
-
<task
|
|
255
|
-
<
|
|
256
|
-
<
|
|
257
|
-
<
|
|
258
|
-
</
|
|
259
|
-
|
|
260
|
-
<task
|
|
261
|
-
<
|
|
262
|
-
<
|
|
263
|
-
<
|
|
264
|
-
</
|
|
265
|
-
|
|
266
|
-
<task
|
|
267
|
-
<
|
|
268
|
-
<
|
|
269
|
-
<
|
|
270
|
-
</
|
|
312
|
+
<block type="task" id="B17" action="run-script" desc="Count modules">
|
|
313
|
+
<field name="script" value="count-items.js"/>
|
|
314
|
+
<field name="items" value="${module_infos}"/>
|
|
315
|
+
<field name="output" var="module_count"/>
|
|
316
|
+
</block>
|
|
317
|
+
|
|
318
|
+
<block type="task" id="B18" action="run-script" desc="Count flows">
|
|
319
|
+
<field name="script" value="count-items.js"/>
|
|
320
|
+
<field name="items" value="${end_to_end_flows}"/>
|
|
321
|
+
<field name="output" var="flow_count"/>
|
|
322
|
+
</block>
|
|
323
|
+
|
|
324
|
+
<block type="task" id="B19" action="run-script" desc="Count integrations">
|
|
325
|
+
<field name="script" value="count-items.js"/>
|
|
326
|
+
<field name="items" value="${external_deps}"/>
|
|
327
|
+
<field name="output" var="integration_count"/>
|
|
328
|
+
</block>
|
|
271
329
|
|
|
272
330
|
<!-- Read tech stack mappings -->
|
|
273
|
-
<task
|
|
274
|
-
<
|
|
275
|
-
<
|
|
276
|
-
|
|
331
|
+
<block type="task" id="B20" action="run-skill" desc="Read tech stack mappings">
|
|
332
|
+
<field name="skill">Read</field>
|
|
333
|
+
<field name="file_path" value="speccrew-workspace/docs/configs/tech-stack-mappings.json"/>
|
|
334
|
+
<field name="output" var="tech_mappings"/>
|
|
335
|
+
</block>
|
|
277
336
|
|
|
278
337
|
<!-- Read Mermaid rules -->
|
|
279
|
-
<task
|
|
280
|
-
<
|
|
281
|
-
<
|
|
282
|
-
|
|
338
|
+
<block type="task" id="B21" action="run-skill" desc="Read Mermaid rules">
|
|
339
|
+
<field name="skill">Read</field>
|
|
340
|
+
<field name="file_path" value="speccrew-workspace/docs/rules/mermaid-rule.md"/>
|
|
341
|
+
<field name="output" var="mermaid_rules"/>
|
|
342
|
+
</block>
|
|
283
343
|
|
|
284
344
|
<!-- Get timestamp via script -->
|
|
285
|
-
<task
|
|
286
|
-
<
|
|
287
|
-
|
|
345
|
+
<block type="task" id="B22" action="run-script" desc="Get current timestamp">
|
|
346
|
+
<field name="script" value="scripts/get-timestamp.js"/>
|
|
347
|
+
<field name="output" var="timestamp"/>
|
|
348
|
+
</block>
|
|
288
349
|
|
|
289
350
|
<!-- Gateway: Fallback for timestamp -->
|
|
290
|
-
<gateway
|
|
291
|
-
<branch
|
|
292
|
-
<task
|
|
293
|
-
<
|
|
294
|
-
<
|
|
295
|
-
</
|
|
296
|
-
<event action="log" level="warning"
|
|
351
|
+
<block type="gateway" id="G3" mode="exclusive" desc="Check timestamp">
|
|
352
|
+
<branch test="${timestamp} == null" name="No timestamp">
|
|
353
|
+
<block type="task" id="B23" action="run-script" desc="Get system fallback timestamp">
|
|
354
|
+
<field name="script" value="get-system-time.js"/>
|
|
355
|
+
<field name="output" var="timestamp"/>
|
|
356
|
+
</block>
|
|
357
|
+
<block type="event" id="E5" action="log" level="warning" desc="Log fallback">
|
|
358
|
+
Using system fallback timestamp
|
|
359
|
+
</block>
|
|
297
360
|
</branch>
|
|
298
|
-
</
|
|
361
|
+
</block>
|
|
299
362
|
|
|
300
363
|
<!-- Determine technology stack -->
|
|
301
|
-
<task
|
|
302
|
-
<
|
|
303
|
-
<
|
|
304
|
-
<
|
|
305
|
-
<
|
|
306
|
-
</
|
|
364
|
+
<block type="task" id="B24" action="run-script" desc="Determine tech stack">
|
|
365
|
+
<field name="script" value="determine-tech-stack.js"/>
|
|
366
|
+
<field name="platforms" value="${extracted_platforms}"/>
|
|
367
|
+
<field name="mappings" value="${tech_mappings}"/>
|
|
368
|
+
<field name="output" var="tech_stack"/>
|
|
369
|
+
</block>
|
|
307
370
|
|
|
308
371
|
<!-- Create skeleton structure -->
|
|
309
|
-
<task
|
|
310
|
-
<
|
|
311
|
-
<
|
|
312
|
-
<
|
|
313
|
-
<
|
|
314
|
-
<
|
|
315
|
-
<
|
|
316
|
-
<
|
|
317
|
-
<
|
|
318
|
-
<
|
|
319
|
-
</
|
|
372
|
+
<block type="task" id="B25" action="run-script" desc="Create document skeleton">
|
|
373
|
+
<field name="script" value="create-system-skeleton.js"/>
|
|
374
|
+
<field name="template" value="${template_content}"/>
|
|
375
|
+
<field name="module_count" value="${module_count}"/>
|
|
376
|
+
<field name="flow_count" value="${flow_count}"/>
|
|
377
|
+
<field name="integration_count" value="${integration_count}"/>
|
|
378
|
+
<field name="timestamp" value="${timestamp}"/>
|
|
379
|
+
<field name="tech_stack" value="${tech_stack}"/>
|
|
380
|
+
<field name="language" value="${language}"/>
|
|
381
|
+
<field name="output" var="document_skeleton"/>
|
|
382
|
+
</block>
|
|
320
383
|
|
|
321
384
|
<!-- Rule: Skeleton must be complete before filling -->
|
|
322
|
-
<rule level="mandatory"
|
|
385
|
+
<block type="rule" id="R-MAND1" level="mandatory" desc="Skeleton completion rule">
|
|
386
|
+
<field name="text">DO NOT start filling content until the complete skeleton is verified</field>
|
|
387
|
+
</block>
|
|
323
388
|
|
|
324
389
|
<!-- Checkpoint: Skeleton ready -->
|
|
325
|
-
<checkpoint name="skeleton_ready"
|
|
390
|
+
<block type="checkpoint" id="CP7" name="skeleton_ready" desc="Document skeleton ready">
|
|
391
|
+
<field name="verify" value="${document_skeleton} != null AND ${document_skeleton}.contains('[TO BE FILLED]')"/>
|
|
392
|
+
</block>
|
|
326
393
|
|
|
327
394
|
<!-- Phase B: Content Filling -->
|
|
328
395
|
<!-- Fill Index and Overview section -->
|
|
329
|
-
<task
|
|
330
|
-
<
|
|
331
|
-
<
|
|
332
|
-
<
|
|
333
|
-
<
|
|
334
|
-
<
|
|
335
|
-
<
|
|
336
|
-
<
|
|
337
|
-
</
|
|
396
|
+
<block type="task" id="B26" action="run-script" desc="Fill index section">
|
|
397
|
+
<field name="script" value="fill-index-section.js"/>
|
|
398
|
+
<field name="skeleton" value="${document_skeleton}"/>
|
|
399
|
+
<field name="timestamp" value="${timestamp}"/>
|
|
400
|
+
<field name="tech_stack" value="${tech_stack}"/>
|
|
401
|
+
<field name="statistics" value="${aggregated_stats}"/>
|
|
402
|
+
<field name="module_index" value="${module_index}"/>
|
|
403
|
+
<field name="output" var="filled_index"/>
|
|
404
|
+
</block>
|
|
338
405
|
|
|
339
406
|
<!-- Fill Section 1: System Overview -->
|
|
340
|
-
<task
|
|
341
|
-
<
|
|
342
|
-
<
|
|
343
|
-
<
|
|
344
|
-
<
|
|
345
|
-
<
|
|
346
|
-
</
|
|
407
|
+
<block type="task" id="B27" action="run-script" desc="Fill system overview section">
|
|
408
|
+
<field name="script" value="fill-system-overview.js"/>
|
|
409
|
+
<field name="skeleton" value="${filled_index}"/>
|
|
410
|
+
<field name="modules" value="${module_infos}"/>
|
|
411
|
+
<field name="language" value="${language}"/>
|
|
412
|
+
<field name="output" var="filled_section1"/>
|
|
413
|
+
</block>
|
|
347
414
|
|
|
348
415
|
<!-- Fill Section 2: Module Topology -->
|
|
349
|
-
<task
|
|
350
|
-
<
|
|
351
|
-
<
|
|
352
|
-
<
|
|
353
|
-
<
|
|
354
|
-
<
|
|
355
|
-
<
|
|
356
|
-
<
|
|
357
|
-
<
|
|
358
|
-
</
|
|
416
|
+
<block type="task" id="B28" action="run-script" desc="Fill module topology section">
|
|
417
|
+
<field name="script" value="fill-module-topology.js"/>
|
|
418
|
+
<field name="skeleton" value="${filled_section1}"/>
|
|
419
|
+
<field name="domain_diagram" value="${domain_diagram}"/>
|
|
420
|
+
<field name="dependency_graph" value="${dependency_graph}"/>
|
|
421
|
+
<field name="mermaid_deps" value="${mermaid_deps}"/>
|
|
422
|
+
<field name="module_index" value="${module_index}"/>
|
|
423
|
+
<field name="language" value="${language}"/>
|
|
424
|
+
<field name="output" var="filled_section2"/>
|
|
425
|
+
</block>
|
|
359
426
|
|
|
360
427
|
<!-- Fill Section 3: End-to-End Business Flows -->
|
|
361
|
-
<task
|
|
362
|
-
<
|
|
363
|
-
<
|
|
364
|
-
<
|
|
365
|
-
<
|
|
366
|
-
<
|
|
367
|
-
<
|
|
368
|
-
<
|
|
369
|
-
</
|
|
428
|
+
<block type="task" id="B29" action="run-script" desc="Fill business flows section">
|
|
429
|
+
<field name="script" value="fill-business-flows.js"/>
|
|
430
|
+
<field name="skeleton" value="${filled_section2}"/>
|
|
431
|
+
<field name="flows" value="${end_to_end_flows}"/>
|
|
432
|
+
<field name="flow_mappings" value="${flow_mappings}"/>
|
|
433
|
+
<field name="modules" value="${module_infos}"/>
|
|
434
|
+
<field name="language" value="${language}"/>
|
|
435
|
+
<field name="output" var="filled_section3"/>
|
|
436
|
+
</block>
|
|
370
437
|
|
|
371
438
|
<!-- Fill Section 4: System Boundaries and Integration -->
|
|
372
|
-
<task
|
|
373
|
-
<
|
|
374
|
-
<
|
|
375
|
-
<
|
|
376
|
-
<
|
|
377
|
-
<
|
|
378
|
-
</
|
|
439
|
+
<block type="task" id="B30" action="run-script" desc="Fill system boundaries section">
|
|
440
|
+
<field name="script" value="fill-system-boundaries.js"/>
|
|
441
|
+
<field name="skeleton" value="${filled_section3}"/>
|
|
442
|
+
<field name="external_deps" value="${external_deps}"/>
|
|
443
|
+
<field name="language" value="${language}"/>
|
|
444
|
+
<field name="output" var="filled_section4"/>
|
|
445
|
+
</block>
|
|
379
446
|
|
|
380
447
|
<!-- Fill Section 5: Requirement Assessment Guide -->
|
|
381
|
-
<task
|
|
382
|
-
<
|
|
383
|
-
<
|
|
384
|
-
<
|
|
385
|
-
<
|
|
386
|
-
</
|
|
448
|
+
<block type="task" id="B31" action="run-script" desc="Fill assessment guide section">
|
|
449
|
+
<field name="script" value="fill-assessment-guide.js"/>
|
|
450
|
+
<field name="skeleton" value="${filled_section4}"/>
|
|
451
|
+
<field name="language" value="${language}"/>
|
|
452
|
+
<field name="output" var="filled_section5"/>
|
|
453
|
+
</block>
|
|
387
454
|
|
|
388
455
|
<!-- Error Handler for document writing -->
|
|
389
|
-
<error-handler>
|
|
456
|
+
<block type="error-handler" id="EH1" desc="Document write error handling">
|
|
390
457
|
<try>
|
|
391
458
|
<!-- Step 7a: Prepare Document -->
|
|
392
|
-
<task
|
|
393
|
-
<
|
|
394
|
-
<
|
|
395
|
-
|
|
459
|
+
<block type="task" id="B32" action="run-skill" desc="Write document to file">
|
|
460
|
+
<field name="skill">Write</field>
|
|
461
|
+
<field name="file_path" value="${output_path}/system-overview.md"/>
|
|
462
|
+
<field name="content" value="${filled_section5}"/>
|
|
463
|
+
</block>
|
|
396
464
|
</try>
|
|
397
|
-
<catch error="write_error">
|
|
398
|
-
<event action="log" level="error"
|
|
399
|
-
|
|
465
|
+
<catch error-type="write_error">
|
|
466
|
+
<block type="event" id="E6" action="log" level="error" desc="Log write error">
|
|
467
|
+
Failed to write system overview: ${write_error.message}
|
|
468
|
+
</block>
|
|
469
|
+
<block type="output" id="O-err" desc="Error output">
|
|
470
|
+
<field name="status" value="failed"/>
|
|
471
|
+
</block>
|
|
400
472
|
</catch>
|
|
401
473
|
<finally>
|
|
402
|
-
<event action="log" level="info"
|
|
474
|
+
<block type="event" id="E7" action="log" level="info" desc="Log write complete">
|
|
475
|
+
Document write operation completed
|
|
476
|
+
</block>
|
|
403
477
|
</finally>
|
|
404
|
-
</
|
|
478
|
+
</block>
|
|
405
479
|
|
|
406
480
|
<!-- Rule: Critical constraints -->
|
|
407
|
-
<rule level="forbidden"
|
|
408
|
-
|
|
409
|
-
|
|
481
|
+
<block type="rule" id="R-FORB1" level="forbidden" desc="Document creation constraint">
|
|
482
|
+
<field name="text">FORBIDDEN: create_file for documents - Document MUST be created by copying template then filling with search_replace</field>
|
|
483
|
+
</block>
|
|
484
|
+
<block type="rule" id="R-FORB2" level="forbidden" desc="Full rewrite constraint">
|
|
485
|
+
<field name="text">FORBIDDEN: Full-file rewrite - Always use targeted search_replace on specific sections</field>
|
|
486
|
+
</block>
|
|
487
|
+
<block type="rule" id="R-MAND2" level="mandatory" desc="Template-first constraint">
|
|
488
|
+
<field name="text">MANDATORY: Template-first workflow - Step 7a MUST execute before Step 7b</field>
|
|
489
|
+
</block>
|
|
410
490
|
|
|
411
491
|
<!-- Checkpoint: Document generated -->
|
|
412
|
-
<checkpoint name="document_generated"
|
|
492
|
+
<block type="checkpoint" id="CP8" name="document_generated" desc="Document generated successfully">
|
|
493
|
+
<field name="verify" value="${output_file_exists} == true"/>
|
|
494
|
+
</block>
|
|
413
495
|
|
|
414
496
|
<!-- Step 8: Report Results -->
|
|
415
|
-
<task
|
|
416
|
-
<
|
|
417
|
-
<
|
|
418
|
-
<
|
|
419
|
-
<
|
|
420
|
-
</
|
|
421
|
-
|
|
422
|
-
<task
|
|
423
|
-
<
|
|
424
|
-
<
|
|
425
|
-
<
|
|
426
|
-
<
|
|
427
|
-
<
|
|
428
|
-
<
|
|
429
|
-
<
|
|
430
|
-
</
|
|
497
|
+
<block type="task" id="B33" action="run-script" desc="Calculate metrics">
|
|
498
|
+
<field name="script" value="calculate-metrics.js"/>
|
|
499
|
+
<field name="modules" value="${module_infos}"/>
|
|
500
|
+
<field name="platforms" value="${extracted_platforms}"/>
|
|
501
|
+
<field name="output" var="metrics"/>
|
|
502
|
+
</block>
|
|
503
|
+
|
|
504
|
+
<block type="task" id="B34" action="run-script" desc="Generate system report">
|
|
505
|
+
<field name="script" value="generate-system-report.js"/>
|
|
506
|
+
<field name="module_count" value="${module_count}"/>
|
|
507
|
+
<field name="entity_count" value="${metrics.entity_count}"/>
|
|
508
|
+
<field name="api_count" value="${metrics.api_count}"/>
|
|
509
|
+
<field name="dependency_count" value="${all_dependencies.length}"/>
|
|
510
|
+
<field name="flow_count" value="${flow_count}"/>
|
|
511
|
+
<field name="output" var="completion_report"/>
|
|
512
|
+
</block>
|
|
431
513
|
|
|
432
514
|
<!-- Event: Log completion -->
|
|
433
|
-
<event action="log" level="info">
|
|
515
|
+
<block type="event" id="E8" action="log" level="info" desc="Log completion summary">
|
|
434
516
|
System summarization completed:
|
|
435
|
-
- Modules Processed: {
|
|
436
|
-
- Entities Aggregated: {
|
|
437
|
-
- APIs Counted: {
|
|
438
|
-
- Dependencies Mapped: {
|
|
439
|
-
- Business Flows Identified: {
|
|
517
|
+
- Modules Processed: ${module_count}
|
|
518
|
+
- Entities Aggregated: ${metrics.entity_count}
|
|
519
|
+
- APIs Counted: ${metrics.api_count}
|
|
520
|
+
- Dependencies Mapped: ${all_dependencies.length}
|
|
521
|
+
- Business Flows Identified: ${flow_count}
|
|
440
522
|
- Output: system-overview.md (complete)
|
|
441
523
|
- Status: success
|
|
442
|
-
</
|
|
524
|
+
</block>
|
|
443
525
|
|
|
444
526
|
<!-- Output Block: Define workflow outputs -->
|
|
445
|
-
<output
|
|
446
|
-
|
|
447
|
-
|
|
527
|
+
<block type="output" id="O1" desc="System summarization results">
|
|
528
|
+
<field name="status" value="success"/>
|
|
529
|
+
<field name="output_file" value="system-overview.md"/>
|
|
530
|
+
<field name="message" value="System summarization completed with ${module_count} modules processed"/>
|
|
531
|
+
</block>
|
|
448
532
|
</workflow>
|
|
449
533
|
|
|
450
534
|
## Constraints
|