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
|
@@ -46,148 +46,260 @@ This skill automatically adapts to the user's input language. All documentation
|
|
|
46
46
|
|
|
47
47
|
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: `docs/rules/xml-workflow-spec.md`
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
<
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
49
|
+
<workflow id="ui-knowledge-graph-construction" version="1.0" status="pending" desc="Construct graph data from UI analysis results">
|
|
50
|
+
|
|
51
|
+
<!-- ============================================================
|
|
52
|
+
Input Parameters Definition
|
|
53
|
+
============================================================ -->
|
|
54
|
+
<block type="input" id="I1" desc="Workflow input parameters">
|
|
55
|
+
<field name="feature" required="true" type="object" desc="Complete feature object from features.json"/>
|
|
56
|
+
<field name="fileName" required="true" type="string" desc="Feature file name without extension"/>
|
|
57
|
+
<field name="sourcePath" required="true" type="string" desc="Relative path to source file"/>
|
|
58
|
+
<field name="documentPath" required="true" type="string" desc="Path to generated documentation"/>
|
|
59
|
+
<field name="module" required="true" type="string" desc="Business module name"/>
|
|
60
|
+
<field name="platform_type" required="true" type="string" desc="Platform type"/>
|
|
61
|
+
<field name="platform_subtype" required="true" type="string" desc="Platform subtype"/>
|
|
62
|
+
<field name="completed_dir" required="true" type="string" desc="Marker files output directory"/>
|
|
63
|
+
<field name="sourceFile" required="true" type="string" desc="Source features JSON file name"/>
|
|
64
|
+
<field name="status" required="false" type="string" default="success" desc="Analysis status from UI analysis"/>
|
|
65
|
+
<field name="analysisNotes" required="false" type="string" default="" desc="Analysis notes from UI analysis"/>
|
|
66
|
+
</block>
|
|
67
|
+
|
|
68
|
+
<!-- ============================================================
|
|
69
|
+
Global Continuous Execution Rules
|
|
70
|
+
============================================================ -->
|
|
71
|
+
<block type="rule" id="GLOBAL-R1" level="forbidden" desc="Continuous execution constraints — NEVER violate">
|
|
72
|
+
<field name="text">DO NOT ask user "Should I continue?" or "How would you like to proceed?" during execution</field>
|
|
73
|
+
<field name="text">DO NOT offer options like "Full execution / Partial / Stop" — always execute ALL tasks to completion</field>
|
|
74
|
+
<field name="text">DO NOT suggest "Due to context window limits, let me pause" — complete current task, use checkpoint for resumption</field>
|
|
75
|
+
<field name="text">DO NOT estimate workload and suggest breaking it into phases — execute ALL items in sequence</field>
|
|
76
|
+
<field name="text">DO NOT warn about "large number of files" or "this may take a while" — proceed with generation</field>
|
|
77
|
+
<field name="text">Context window management: if approaching limit, save progress to checkpoint file and resume — do NOT ask user for guidance</field>
|
|
78
|
+
</block>
|
|
79
|
+
|
|
80
|
+
<!-- ============================================================
|
|
81
|
+
Step 1: Read Source File
|
|
82
|
+
============================================================ -->
|
|
83
|
+
<sequence id="S1" name="Step 1: Read Source File" status="pending" desc="Read source file and extract components">
|
|
84
|
+
<block type="task" id="B1" action="read-file" desc="Read source file content">
|
|
85
|
+
<field name="path" value="${sourcePath}"/>
|
|
86
|
+
<field name="output" var="sourceContent"/>
|
|
87
|
+
</block>
|
|
88
|
+
|
|
89
|
+
<block type="task" id="B2" action="analyze" desc="Extract API imports from source content">
|
|
90
|
+
<field name="input" value="${sourceContent}"/>
|
|
91
|
+
<field name="output" var="apiImports"/>
|
|
92
|
+
</block>
|
|
93
|
+
|
|
94
|
+
<block type="task" id="B3" action="analyze" desc="Extract component usage from source content">
|
|
95
|
+
<field name="input" value="${sourceContent}"/>
|
|
96
|
+
<field name="output" var="componentUsage"/>
|
|
97
|
+
</block>
|
|
98
|
+
|
|
99
|
+
<block type="task" id="B4" action="analyze" desc="Extract navigation patterns from source content">
|
|
100
|
+
<field name="input" value="${sourceContent}"/>
|
|
101
|
+
<field name="output" var="navigationPatterns"/>
|
|
102
|
+
</block>
|
|
103
|
+
|
|
104
|
+
<block type="event" id="E1" action="log" level="info" desc="Log Step 1 completion">
|
|
105
|
+
Step 1 Status: COMPLETED - Read ${sourcePath}, found ${apiImports.count} APIs, ${componentUsage.count} components, ${navigationPatterns.count} navigations
|
|
106
|
+
</block>
|
|
107
|
+
|
|
108
|
+
<block type="checkpoint" id="CP1" name="step-1-read-source" desc="Source file read complete">
|
|
109
|
+
<field name="file" value="${completed_dir}/.progress.json"/>
|
|
110
|
+
<field name="verify" value="${sourceContent} != null"/>
|
|
111
|
+
</block>
|
|
112
|
+
</sequence>
|
|
113
|
+
|
|
114
|
+
<!-- ============================================================
|
|
115
|
+
Step 2: Construct Graph Nodes
|
|
116
|
+
============================================================ -->
|
|
117
|
+
<sequence id="S2" name="Step 2: Construct Graph Nodes" status="pending" desc="Build page and component nodes">
|
|
118
|
+
<block type="task" id="B5" action="analyze" desc="Construct page node">
|
|
119
|
+
<field name="type" value="page"/>
|
|
120
|
+
<field name="id" value="page-${module}-${fileName}"/>
|
|
121
|
+
<field name="name" value="${fileName}"/>
|
|
122
|
+
<field name="module" value="${module}"/>
|
|
123
|
+
<field name="sourcePath" value="${sourcePath}"/>
|
|
124
|
+
<field name="documentPath" value="${documentPath}"/>
|
|
125
|
+
<field name="context_route" value="${extractedRoute}"/>
|
|
126
|
+
<field name="context_components" value="${componentUsage.list}"/>
|
|
127
|
+
<field name="context_platform" value="${platform_type}-${platform_subtype}"/>
|
|
128
|
+
<field name="output" var="pageNode"/>
|
|
129
|
+
</block>
|
|
130
|
+
|
|
131
|
+
<block type="loop" id="L1" over="${componentUsage.list}" as="component" desc="Construct component nodes">
|
|
132
|
+
<block type="task" id="B6" action="analyze" desc="Construct component node for ${component.name}">
|
|
133
|
+
<field name="type" value="component"/>
|
|
134
|
+
<field name="id" value="component-${module}-${component.name}"/>
|
|
135
|
+
<field name="name" value="${component.name}"/>
|
|
136
|
+
<field name="module" value="${module}"/>
|
|
137
|
+
<field name="sourcePath" value="${component.path}"/>
|
|
138
|
+
<field name="documentPath" value="${documentPath}"/>
|
|
139
|
+
<field name="context_props" value="${component.props}"/>
|
|
140
|
+
<field name="context_events" value="${component.events}"/>
|
|
141
|
+
<field name="output" var="componentNodes[]" append="true"/>
|
|
142
|
+
</block>
|
|
143
|
+
</block>
|
|
144
|
+
|
|
145
|
+
<block type="event" id="E2" action="log" level="info" desc="Log Step 2 completion">
|
|
146
|
+
Step 2 Status: COMPLETED - Constructed ${nodeCount} nodes
|
|
147
|
+
</block>
|
|
148
|
+
|
|
149
|
+
<block type="checkpoint" id="CP2" name="step-2-construct-nodes" desc="Graph nodes constructed">
|
|
150
|
+
<field name="file" value="${completed_dir}/.progress.json"/>
|
|
151
|
+
<field name="verify" value="${nodeCount} > 0"/>
|
|
152
|
+
</block>
|
|
153
|
+
</sequence>
|
|
154
|
+
|
|
155
|
+
<!-- ============================================================
|
|
156
|
+
Step 3: Construct Graph Edges
|
|
157
|
+
============================================================ -->
|
|
158
|
+
<sequence id="S3" name="Step 3: Construct Graph Edges" status="pending" desc="Build API call, navigation, and component usage edges">
|
|
94
159
|
<!-- API Call Edges -->
|
|
95
|
-
<loop over="{
|
|
96
|
-
<task action="
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
160
|
+
<block type="loop" id="L2" over="${apiImports.list}" as="api" desc="Construct API call edges">
|
|
161
|
+
<block type="task" id="B7" action="analyze" desc="Construct calls edge for ${api.name}">
|
|
162
|
+
<field name="source" value="page-${module}-${fileName}"/>
|
|
163
|
+
<field name="target" value="api-${api.module}-${api.name}"/>
|
|
164
|
+
<field name="type" value="calls"/>
|
|
165
|
+
<field name="metadata_trigger" value="${api.trigger}"/>
|
|
166
|
+
<field name="metadata_method" value="${api.method}"/>
|
|
167
|
+
<field name="metadata_context" value="${api.context}"/>
|
|
168
|
+
<field name="output" var="apiEdges[]" append="true"/>
|
|
169
|
+
</block>
|
|
170
|
+
</block>
|
|
171
|
+
|
|
102
172
|
<!-- Navigation Edges -->
|
|
103
|
-
<loop over="{
|
|
104
|
-
<task action="
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
173
|
+
<block type="loop" id="L3" over="${navigationPatterns.list}" as="nav" desc="Construct navigation edges">
|
|
174
|
+
<block type="task" id="B8" action="analyze" desc="Construct navigates-to edge">
|
|
175
|
+
<field name="source" value="page-${module}-${fileName}"/>
|
|
176
|
+
<field name="target" value="page-${nav.targetModule}-${nav.targetPage}"/>
|
|
177
|
+
<field name="type" value="navigates-to"/>
|
|
178
|
+
<field name="metadata_trigger" value="${nav.trigger}"/>
|
|
179
|
+
<field name="metadata_method" value="${nav.method}"/>
|
|
180
|
+
<field name="output" var="navEdges[]" append="true"/>
|
|
181
|
+
</block>
|
|
182
|
+
</block>
|
|
183
|
+
|
|
109
184
|
<!-- Component Usage Edges -->
|
|
110
|
-
<loop over="{
|
|
111
|
-
<task action="
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
185
|
+
<block type="loop" id="L4" over="${componentUsage.list}" as="comp" desc="Construct component usage edges">
|
|
186
|
+
<block type="task" id="B9" action="analyze" desc="Construct uses edge for ${comp.name}">
|
|
187
|
+
<field name="source" value="page-${module}-${fileName}"/>
|
|
188
|
+
<field name="target" value="component-${module}-${comp.name}"/>
|
|
189
|
+
<field name="type" value="uses"/>
|
|
190
|
+
<field name="metadata_context" value="${comp.usageContext}"/>
|
|
191
|
+
<field name="output" var="useEdges[]" append="true"/>
|
|
192
|
+
</block>
|
|
193
|
+
</block>
|
|
194
|
+
|
|
195
|
+
<block type="event" id="E3" action="log" level="info" desc="Log Step 3 completion">
|
|
196
|
+
Step 3 Status: COMPLETED - Constructed ${edgeCount} edges (${apiEdges.count} API calls, ${navEdges.count} navigations, ${useEdges.count} component uses)
|
|
197
|
+
</block>
|
|
198
|
+
|
|
199
|
+
<block type="checkpoint" id="CP3" name="step-3-construct-edges" desc="Graph edges constructed">
|
|
200
|
+
<field name="file" value="${completed_dir}/.progress.json"/>
|
|
201
|
+
<field name="verify" value="${edgeCount} >= 0"/>
|
|
202
|
+
</block>
|
|
203
|
+
</sequence>
|
|
204
|
+
|
|
205
|
+
<!-- ============================================================
|
|
206
|
+
Step 4: Write Graph JSON
|
|
207
|
+
============================================================ -->
|
|
208
|
+
<sequence id="S4" name="Step 4: Write Graph JSON" status="pending" desc="Generate and write graph data file">
|
|
209
|
+
<block type="task" id="B10" action="analyze" desc="Calculate marker filename">
|
|
210
|
+
<field name="module" value="${module}"/>
|
|
211
|
+
<field name="subpath" value="${extractSubpath sourcePath}"/>
|
|
212
|
+
<field name="fileName" value="${fileName}"/>
|
|
213
|
+
<field name="output" var="markerFilename"/>
|
|
214
|
+
</block>
|
|
215
|
+
|
|
216
|
+
<block type="task" id="B11" action="write-file" desc="Write graph JSON file">
|
|
217
|
+
<field name="path" value="${completed_dir}/${markerFilename}.graph.json"/>
|
|
218
|
+
<field name="content_json">
|
|
125
219
|
{
|
|
126
|
-
"module": "{
|
|
220
|
+
"module": "${module}",
|
|
127
221
|
"nodes": [
|
|
128
|
-
{
|
|
129
|
-
{
|
|
130
|
-
{{this}}{{#unless @last}},{{/unless}}
|
|
131
|
-
{{/each}}
|
|
222
|
+
${pageNode},
|
|
223
|
+
${componentNodes}
|
|
132
224
|
],
|
|
133
225
|
"edges": [
|
|
134
|
-
{
|
|
135
|
-
{
|
|
136
|
-
{
|
|
137
|
-
{{#each navEdges}}
|
|
138
|
-
{{this}}{{#unless @last}},{{/unless}}
|
|
139
|
-
{{/each}},
|
|
140
|
-
{{#each useEdges}}
|
|
141
|
-
{{this}}{{#unless @last}},{{/unless}}
|
|
142
|
-
{{/each}}
|
|
226
|
+
${apiEdges},
|
|
227
|
+
${navEdges},
|
|
228
|
+
${useEdges}
|
|
143
229
|
]
|
|
144
230
|
}
|
|
145
|
-
</
|
|
146
|
-
</
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
<
|
|
153
|
-
<
|
|
231
|
+
</field>
|
|
232
|
+
</block>
|
|
233
|
+
|
|
234
|
+
<block type="event" id="E4" action="log" level="info" desc="Log Step 4 completion">
|
|
235
|
+
Step 4 Status: COMPLETED - Graph JSON written to ${completed_dir}/${markerFilename}.graph.json
|
|
236
|
+
</block>
|
|
237
|
+
|
|
238
|
+
<block type="checkpoint" id="CP4" name="step-4-write-graph-json" desc="Graph JSON written">
|
|
239
|
+
<field name="file" value="${completed_dir}/.progress.json"/>
|
|
240
|
+
<field name="verify" value="valid-json-structure"/>
|
|
241
|
+
</block>
|
|
242
|
+
</sequence>
|
|
243
|
+
|
|
244
|
+
<!-- ============================================================
|
|
245
|
+
Step 5: Write Completion Marker
|
|
246
|
+
============================================================ -->
|
|
247
|
+
<sequence id="S5" name="Step 5: Write Completion Marker" status="pending" desc="Generate and write completion marker file">
|
|
248
|
+
<block type="task" id="B12" action="write-file" desc="Write graph completion marker">
|
|
249
|
+
<field name="path" value="${completed_dir}/${markerFilename}.graph-done.json"/>
|
|
250
|
+
<field name="content_json">
|
|
154
251
|
{
|
|
155
|
-
"fileName": "{
|
|
156
|
-
"sourcePath": "{
|
|
157
|
-
"sourceFile": "{
|
|
158
|
-
"module": "{
|
|
159
|
-
"documentPath": "{
|
|
252
|
+
"fileName": "${fileName}",
|
|
253
|
+
"sourcePath": "${sourcePath}",
|
|
254
|
+
"sourceFile": "${sourceFile}",
|
|
255
|
+
"module": "${module}",
|
|
256
|
+
"documentPath": "${documentPath}",
|
|
160
257
|
"marker": "graph_completed",
|
|
161
|
-
"graphFile": "{
|
|
162
|
-
"nodeCount": {
|
|
163
|
-
"edgeCount": {
|
|
164
|
-
"status": "{
|
|
165
|
-
"analysisNotes": "{
|
|
258
|
+
"graphFile": "${markerFilename}.graph.json",
|
|
259
|
+
"nodeCount": ${nodeCount},
|
|
260
|
+
"edgeCount": ${edgeCount},
|
|
261
|
+
"status": "${status}",
|
|
262
|
+
"analysisNotes": "${analysisNotes}"
|
|
166
263
|
}
|
|
167
|
-
</
|
|
168
|
-
</
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
<
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
264
|
+
</field>
|
|
265
|
+
</block>
|
|
266
|
+
|
|
267
|
+
<block type="event" id="E5" action="log" level="info" desc="Log Step 5 completion">
|
|
268
|
+
Step 5 Status: COMPLETED - Graph completion marker written to ${completed_dir}/${markerFilename}.graph-done.json
|
|
269
|
+
</block>
|
|
270
|
+
|
|
271
|
+
<block type="checkpoint" id="CP5" name="step-5-write-marker" desc="Completion marker written">
|
|
272
|
+
<field name="file" value="${completed_dir}/.progress.json"/>
|
|
273
|
+
<field name="verify" value="valid-marker-structure"/>
|
|
274
|
+
</block>
|
|
275
|
+
</sequence>
|
|
276
|
+
|
|
277
|
+
<!-- ============================================================
|
|
278
|
+
Output Results
|
|
279
|
+
============================================================ -->
|
|
280
|
+
<block type="output" id="O1" desc="Workflow output results">
|
|
281
|
+
<field name="status" from="success" type="string" desc="Execution status"/>
|
|
282
|
+
<field name="module" from="${module}" type="string" desc="Module name"/>
|
|
283
|
+
<field name="fileName" from="${fileName}" type="string" desc="Feature file name"/>
|
|
284
|
+
<field name="graphFile" from="${completed_dir}/${markerFilename}.graph.json" type="string" desc="Graph JSON file path"/>
|
|
285
|
+
<field name="nodeCount" from="${nodeCount}" type="number" desc="Number of nodes constructed"/>
|
|
286
|
+
<field name="edgeCount" from="${edgeCount}" type="number" desc="Number of edges constructed"/>
|
|
287
|
+
<field name="message" from="Generated graph data with ${nodeCount} nodes and ${edgeCount} edges" type="string" desc="Summary message"/>
|
|
288
|
+
</block>
|
|
289
|
+
|
|
290
|
+
<!-- ============================================================
|
|
291
|
+
Constraints
|
|
292
|
+
============================================================ -->
|
|
293
|
+
<block type="rule" id="R1" level="mandatory" desc="Graph data constraints">
|
|
294
|
+
<field name="text">100% API coverage - ALL imported API functions MUST be represented as calls edges</field>
|
|
295
|
+
<field name="text">Valid JSON format - Both .graph.json and .graph-done.json MUST be valid JSON</field>
|
|
296
|
+
<field name="text">Root-level module field - .graph.json MUST include module at root level</field>
|
|
297
|
+
<field name="text">Correct filename pattern - Use {module}-{subpath}-{fileName} composite naming</field>
|
|
298
|
+
<field name="text">No file extension in fileName - The fileName field in .graph-done.json MUST NOT include extension</field>
|
|
299
|
+
<field name="text">documentPath as N/A - Use N/A when no document exists, never empty string</field>
|
|
300
|
+
</block>
|
|
301
|
+
|
|
189
302
|
</workflow>
|
|
190
|
-
```
|
|
191
303
|
|
|
192
304
|
## Node Structure Reference
|
|
193
305
|
|