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
|
@@ -40,156 +40,156 @@ For each platform, generates:
|
|
|
40
40
|
|
|
41
41
|
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: `docs/rules/xml-workflow-spec.md`
|
|
42
42
|
|
|
43
|
-
<workflow>
|
|
44
|
-
|
|
45
|
-
<!--
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
<
|
|
120
|
-
<
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
<!-- Step 4: Generate entry-dirs JSON -->
|
|
131
|
-
<task name="generate-entry-dirs-json" action="run-script">
|
|
132
|
-
<description>Generate entry-dirs JSON file for the platform</description>
|
|
133
|
-
<output-path>{sync_state_bizs_dir}/entry-dirs-{platform.platformId}.json</output-path>
|
|
134
|
-
<content>
|
|
135
|
-
<json-structure>
|
|
43
|
+
<workflow id="identify-entries-main" status="pending" version="1.0" desc="Identify business module entry directories for each platform">
|
|
44
|
+
|
|
45
|
+
<!-- ============================================================
|
|
46
|
+
Input Parameters Definition
|
|
47
|
+
============================================================ -->
|
|
48
|
+
<block type="input" id="I1" desc="Workflow input parameters">
|
|
49
|
+
<field name="platforms" required="true" type="array" desc="Platform list from detection phase"/>
|
|
50
|
+
<field name="workspace_path" required="true" type="string" desc="Absolute path to speccrew-workspace directory"/>
|
|
51
|
+
<field name="sync_state_bizs_dir" required="true" type="string" desc="Absolute path to entry-dirs JSON output directory"/>
|
|
52
|
+
<field name="configs_dir" required="true" type="string" desc="Absolute path to configuration files directory"/>
|
|
53
|
+
</block>
|
|
54
|
+
|
|
55
|
+
<!-- ============================================================
|
|
56
|
+
Global Constraints
|
|
57
|
+
============================================================ -->
|
|
58
|
+
<block type="rule" id="R1" level="mandatory" desc="Path constraints">
|
|
59
|
+
<field name="text">Use the provided absolute paths directly. DO NOT construct or derive paths yourself.</field>
|
|
60
|
+
<field name="text">All entryDirs paths must use forward slashes / as path separators (even on Windows)</field>
|
|
61
|
+
<field name="text">Do not include leading or trailing slashes in entryDirs paths</field>
|
|
62
|
+
</block>
|
|
63
|
+
|
|
64
|
+
<!-- ============================================================
|
|
65
|
+
Global Continuous Execution Rules
|
|
66
|
+
============================================================ -->
|
|
67
|
+
<block type="rule" id="GLOBAL-R1" level="forbidden" desc="Continuous execution constraints — NEVER violate">
|
|
68
|
+
<field name="text">DO NOT ask user "Should I continue?" or "How would you like to proceed?" during execution</field>
|
|
69
|
+
<field name="text">DO NOT offer options like "Full execution / Partial / Stop" — always execute ALL tasks to completion</field>
|
|
70
|
+
<field name="text">DO NOT suggest "Due to context window limits, let me pause" — complete current task, use checkpoint for resumption</field>
|
|
71
|
+
<field name="text">DO NOT estimate workload and suggest breaking it into phases — execute ALL items in sequence</field>
|
|
72
|
+
<field name="text">DO NOT warn about "large number of files" or "this may take a while" — proceed with generation</field>
|
|
73
|
+
<field name="text">Context window management: if approaching limit, save progress to checkpoint file and resume — do NOT ask user for guidance</field>
|
|
74
|
+
</block>
|
|
75
|
+
|
|
76
|
+
<!-- ============================================================
|
|
77
|
+
Main Processing Sequence
|
|
78
|
+
============================================================ -->
|
|
79
|
+
<sequence id="S1" name="Process Platforms" status="pending" desc="Iterate each platform to identify entry directories">
|
|
80
|
+
|
|
81
|
+
<!-- Loop: Process Each Platform -->
|
|
82
|
+
<block type="loop" id="L1" over="${platforms}" as="platform" desc="Iterate each platform to identify entry directories">
|
|
83
|
+
|
|
84
|
+
<!-- Step 1: Read Directory Tree -->
|
|
85
|
+
<block type="task" id="B1" action="run-script" desc="Read each platform's sourcePath directory structure (3 levels deep)">
|
|
86
|
+
<field name="command">tree /F /A "${platform.sourcePath}" | Select-Object -First 100</field>
|
|
87
|
+
<field name="alt_command">tree -L 3 "${platform.sourcePath}"</field>
|
|
88
|
+
<field name="output" var="directory_tree"/>
|
|
89
|
+
</block>
|
|
90
|
+
|
|
91
|
+
<!-- Step 2: LLM Analysis - Identify Entry Directories -->
|
|
92
|
+
<block type="task" id="B2" action="analyze" desc="Analyze directory tree and identify entry directories based on platform type">
|
|
93
|
+
<field name="input" value="${directory_tree}"/>
|
|
94
|
+
<field name="platform_type" value="${platform.platformType}"/>
|
|
95
|
+
<field name="platform_subtype" value="${platform.platformSubtype}"/>
|
|
96
|
+
<field name="tech_stack" value="${platform.techStack}"/>
|
|
97
|
+
<field name="logic_backend" value="Find all directories containing *Controller.java or *Controller.kt files. These are API entry directories. Module name = the business package name of the entry directory"/>
|
|
98
|
+
<field name="logic_frontend_vue_react" value="Find views/ or pages/ directories. First-level subdirectories under these directories are business modules"/>
|
|
99
|
+
<field name="logic_mobile_uniapp" value="Find first-level subdirectories under pages/. Plus top-level pages-* directories (module name = directory name without pages- prefix)"/>
|
|
100
|
+
<field name="logic_mobile_miniprogram" value="Find first-level subdirectories under pages/ as modules"/>
|
|
101
|
+
<field name="output" var="identified_entries"/>
|
|
102
|
+
</block>
|
|
103
|
+
|
|
104
|
+
<!-- Step 3: Load Exclusion Rules -->
|
|
105
|
+
<block type="task" id="B3" action="read-file" desc="Read tech-stack-mappings.json to load exclusion patterns">
|
|
106
|
+
<field name="path" value="${configs_dir}/tech-stack-mappings.json"/>
|
|
107
|
+
<field name="output" var="exclusion_rules"/>
|
|
108
|
+
</block>
|
|
109
|
+
|
|
110
|
+
<!-- Gateway: Apply Exclusion Rules -->
|
|
111
|
+
<block type="gateway" id="G1" mode="guard" desc="Check if identified_entries is not empty">
|
|
112
|
+
<branch test="${identified_entries} != null AND ${identified_entries.length} > 0">
|
|
113
|
+
<block type="task" id="B4" action="analyze" desc="Apply exclusion rules to filter out technical directories">
|
|
114
|
+
<field name="input" value="${identified_entries}"/>
|
|
115
|
+
<field name="exclusion_rules" value="${exclusion_rules}"/>
|
|
116
|
+
<field name="exclusions_pure_technical" value="config, framework, enums, exception, util, utils, common, constant, constants, type, types, dto, vo, entity, model, mapper, repository, dao, service, impl"/>
|
|
117
|
+
<field name="exclusions_build_output" value="dist, build, target, out, node_modules"/>
|
|
118
|
+
<field name="exclusions_test_directories" value="test, tests, spec, __tests__, e2e"/>
|
|
119
|
+
<field name="exclusions_config_directories" value=".git, .idea, .vscode, .speccrew"/>
|
|
120
|
+
<field name="root_handling" value="Assign entry files not under any subdirectory to _root module"/>
|
|
121
|
+
<field name="output" var="filtered_entries"/>
|
|
122
|
+
</block>
|
|
123
|
+
</branch>
|
|
124
|
+
</block>
|
|
125
|
+
|
|
126
|
+
<!-- Step 4: Generate entry-dirs JSON -->
|
|
127
|
+
<block type="task" id="B5" action="write-file" desc="Generate entry-dirs JSON file for the platform">
|
|
128
|
+
<field name="path" value="${sync_state_bizs_dir}/entry-dirs-${platform.platformId}.json"/>
|
|
129
|
+
<field name="content_json">
|
|
136
130
|
{
|
|
137
|
-
"platformId": "{platform.platformId}",
|
|
138
|
-
"platformName": "{platform.platformName}",
|
|
139
|
-
"platformType": "{platform.platformType}",
|
|
140
|
-
"platformSubtype": "{platform.platformSubtype}",
|
|
141
|
-
"sourcePath": "{platform.sourcePath}",
|
|
142
|
-
"techStack": "{platform.techStack}",
|
|
131
|
+
"platformId": "${platform.platformId}",
|
|
132
|
+
"platformName": "${platform.platformName}",
|
|
133
|
+
"platformType": "${platform.platformType}",
|
|
134
|
+
"platformSubtype": "${platform.platformSubtype}",
|
|
135
|
+
"sourcePath": "${platform.sourcePath}",
|
|
136
|
+
"techStack": "${platform.techStack}",
|
|
143
137
|
"modules": [
|
|
144
138
|
{ "name": "module-name", "entryDirs": ["relative/path/to/entry"] }
|
|
145
139
|
]
|
|
146
140
|
}
|
|
147
|
-
</
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
<
|
|
159
|
-
|
|
160
|
-
<
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
<
|
|
172
|
-
<
|
|
173
|
-
<
|
|
174
|
-
<
|
|
175
|
-
|
|
176
|
-
<
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
141
|
+
</field>
|
|
142
|
+
<field name="output" var="generated_json_path"/>
|
|
143
|
+
</block>
|
|
144
|
+
|
|
145
|
+
<!-- Checkpoint: Persist Generated JSON -->
|
|
146
|
+
<block type="checkpoint" id="CP1" name="entry-dirs-generated" desc="Verify entry-dirs JSON was generated">
|
|
147
|
+
<field name="file" value="${sync_state_bizs_dir}/entry-dirs-${platform.platformId}.json"/>
|
|
148
|
+
<field name="verify" value="file_exists(${sync_state_bizs_dir}/entry-dirs-${platform.platformId}.json)"/>
|
|
149
|
+
</block>
|
|
150
|
+
|
|
151
|
+
<!-- Step 5: Validation -->
|
|
152
|
+
<block type="task" id="B6" action="analyze" desc="Validate the generated entry-dirs JSON">
|
|
153
|
+
<field name="input" value="${generated_json_path}"/>
|
|
154
|
+
<field name="validation_rules">
|
|
155
|
+
- modules array is not empty
|
|
156
|
+
- each module has at least one entry directory
|
|
157
|
+
- module names are business-meaningful (not technical terms like config, util)
|
|
158
|
+
- entryDirs paths are correct and accessible
|
|
159
|
+
- JSON format is valid
|
|
160
|
+
</field>
|
|
161
|
+
<field name="output" var="validation_result"/>
|
|
162
|
+
</block>
|
|
163
|
+
|
|
164
|
+
<!-- Gateway: Validation Result -->
|
|
165
|
+
<block type="gateway" id="G2" mode="exclusive" desc="Handle validation result">
|
|
166
|
+
<branch test="${validation_result.status} == 'failed'">
|
|
167
|
+
<block type="error-handler" id="EH1" desc="Handle validation failure">
|
|
168
|
+
<catch error-type="validation_failed">
|
|
169
|
+
<block type="event" id="E1" action="log" level="warn" desc="Log validation failure">Entry directory recognition failed for platform ${platform.platformId}</block>
|
|
170
|
+
<block type="task" id="B7" action="analyze" desc="Re-analyze the directory tree due to validation failure">
|
|
171
|
+
<field name="input" value="${directory_tree}"/>
|
|
172
|
+
<field name="output" var="re_analyzed_entries"/>
|
|
173
|
+
</block>
|
|
174
|
+
</catch>
|
|
175
|
+
</block>
|
|
176
|
+
</branch>
|
|
177
|
+
<branch test="${validation_result.status} == 'passed'">
|
|
178
|
+
<block type="event" id="E2" action="log" level="info" desc="Log validation success">Platform ${platform.platformId} entry-dirs validation passed</block>
|
|
179
|
+
</branch>
|
|
180
|
+
</block>
|
|
181
|
+
|
|
182
|
+
</block>
|
|
183
|
+
|
|
184
|
+
</sequence>
|
|
185
|
+
|
|
186
|
+
<!-- ============================================================
|
|
187
|
+
Output Results
|
|
188
|
+
============================================================ -->
|
|
189
|
+
<block type="output" id="O1" desc="Workflow output results">
|
|
190
|
+
<field name="generated_files" from="${generated_json_path}" type="array" desc="List of all generated entry-dirs JSON files"/>
|
|
191
|
+
<field name="validation_summary" from="${validation_result}" type="object" desc="Summary of validation results for all platforms"/>
|
|
192
|
+
</block>
|
|
193
193
|
|
|
194
194
|
</workflow>
|
|
195
195
|
|