speccrew 0.7.0 → 0.7.2
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.
|
@@ -117,8 +117,11 @@
|
|
|
117
117
|
- Root object MUST contain "modules" field (array type)
|
|
118
118
|
- Root object MUST NOT contain "businessModules", "subModules", or "components" fields
|
|
119
119
|
- Each module in "modules" array MUST have exactly two fields: "name" (string) and "entryDirs" (array of strings)
|
|
120
|
-
-
|
|
121
|
-
-
|
|
120
|
+
- Module granularity MUST follow the module_scan.depth configuration from tech-stack-mappings.json
|
|
121
|
+
- When depth=1: first-level subdirectories under module_scan.root are modules (e.g., src/views/system → module "system", src/views/bpm → module "bpm")
|
|
122
|
+
- When depth=2: second-level subdirectories are modules (e.g., src/main/java/com/example/controller → grouped by controller subdirectories)
|
|
123
|
+
- Each module's entryDirs should contain the module root directory path (e.g., ["src/views/system"] for module "system"), NOT individual sub-paths
|
|
124
|
+
- DO NOT flatten hierarchical directories into hyphen-separated sub-modules (e.g., DO NOT create "system-user", "system-role" — create one "system" module instead)
|
|
122
125
|
- Multiple modules MUST NOT share the same entryDirs value. If multiple business areas share the same directory, they belong to ONE module.
|
|
123
126
|
- If the generated JSON does not match this format, you MUST regenerate it before proceeding
|
|
124
127
|
</field>
|
package/lib/commands/init.js
CHANGED
|
@@ -11,7 +11,9 @@ const {
|
|
|
11
11
|
ensureDirectories,
|
|
12
12
|
removeDirRecursive,
|
|
13
13
|
DEPRECATED_SKILLS,
|
|
14
|
+
DEPRECATED_AGENTS,
|
|
14
15
|
cleanDeprecatedSkills,
|
|
16
|
+
cleanDeprecatedAgents,
|
|
15
17
|
} = require('../utils');
|
|
16
18
|
const { resolveIDE, transformAgentForIDE, transformSkillForIDE } = require('../ide-adapters');
|
|
17
19
|
|
|
@@ -347,9 +349,15 @@ async function runInit(options = {}) {
|
|
|
347
349
|
const skillsResult = copySkills(skillsSourceDir, skillsDestDir, ideConfig);
|
|
348
350
|
|
|
349
351
|
// Clean up deprecated skills
|
|
350
|
-
const
|
|
351
|
-
if (
|
|
352
|
-
log(` Cleaned up ${
|
|
352
|
+
const cleanedSkillCount = cleanDeprecatedSkills(skillsDestDir, DEPRECATED_SKILLS);
|
|
353
|
+
if (cleanedSkillCount > 0 && !silent) {
|
|
354
|
+
log(` Cleaned up ${cleanedSkillCount} deprecated skill(s) from ${ideConfig.name}`);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// Clean up deprecated agents
|
|
358
|
+
const cleanedAgentCount = cleanDeprecatedAgents(agentsDestDir, DEPRECATED_AGENTS);
|
|
359
|
+
if (cleanedAgentCount > 0 && !silent) {
|
|
360
|
+
log(` Cleaned up ${cleanedAgentCount} deprecated agent(s) from ${ideConfig.name}`);
|
|
353
361
|
}
|
|
354
362
|
|
|
355
363
|
stats.ides.push({
|
package/lib/commands/update.js
CHANGED
|
@@ -10,7 +10,9 @@ const {
|
|
|
10
10
|
copyDirRecursive,
|
|
11
11
|
removeDirRecursive,
|
|
12
12
|
DEPRECATED_SKILLS,
|
|
13
|
+
DEPRECATED_AGENTS,
|
|
13
14
|
cleanDeprecatedSkills,
|
|
15
|
+
cleanDeprecatedAgents,
|
|
14
16
|
} = require('../utils');
|
|
15
17
|
const { resolveIDE, getIDEConfig, transformAgentForIDE, transformSkillForIDE } = require('../ide-adapters');
|
|
16
18
|
|
|
@@ -456,9 +458,15 @@ function run() {
|
|
|
456
458
|
totalStats.extraDirs.push(...skillStats.extraDirs);
|
|
457
459
|
|
|
458
460
|
// Clean up deprecated skills
|
|
459
|
-
const
|
|
460
|
-
if (
|
|
461
|
-
console.log(` Cleaned up ${
|
|
461
|
+
const cleanedSkillCount = cleanDeprecatedSkills(destSkillsDir, DEPRECATED_SKILLS);
|
|
462
|
+
if (cleanedSkillCount > 0) {
|
|
463
|
+
console.log(` Cleaned up ${cleanedSkillCount} deprecated skill(s) from ${ide.name}`);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
// Clean up deprecated agents
|
|
467
|
+
const cleanedAgentCount = cleanDeprecatedAgents(destAgentsDir, DEPRECATED_AGENTS);
|
|
468
|
+
if (cleanedAgentCount > 0) {
|
|
469
|
+
console.log(` Cleaned up ${cleanedAgentCount} deprecated agent(s) from ${ide.name}`);
|
|
462
470
|
}
|
|
463
471
|
}
|
|
464
472
|
|
package/lib/utils.js
CHANGED
|
@@ -113,6 +113,29 @@ const DEPRECATED_SKILLS = [
|
|
|
113
113
|
'speccrew-dev-review', // replaced by speccrew-dev-review-backend/frontend/mobile/desktop
|
|
114
114
|
'speccrew-test-execute', // replaced by speccrew-test-runner + speccrew-test-reporter
|
|
115
115
|
'speccrew-fd-feature-registry-init', // replaced by speccrew-fd-feature-registry
|
|
116
|
+
// Legacy -xml skills (replaced by non-xml versions)
|
|
117
|
+
'speccrew-knowledge-bizs-api-analyze-xml',
|
|
118
|
+
'speccrew-knowledge-bizs-api-graph-xml',
|
|
119
|
+
'speccrew-knowledge-bizs-dispatch-xml',
|
|
120
|
+
'speccrew-knowledge-bizs-identify-entries-xml',
|
|
121
|
+
'speccrew-knowledge-bizs-init-features-xml',
|
|
122
|
+
'speccrew-knowledge-bizs-ui-analyze-xml',
|
|
123
|
+
'speccrew-knowledge-bizs-ui-graph-xml',
|
|
124
|
+
'speccrew-knowledge-bizs-ui-style-extract-xml',
|
|
125
|
+
'speccrew-knowledge-module-summarize-xml',
|
|
126
|
+
'speccrew-knowledge-system-summarize-xml',
|
|
127
|
+
'speccrew-knowledge-techs-dispatch-xml',
|
|
128
|
+
'speccrew-knowledge-techs-generate-conventions-xml',
|
|
129
|
+
'speccrew-knowledge-techs-generate-quality-xml',
|
|
130
|
+
'speccrew-knowledge-techs-generate-ui-style-xml',
|
|
131
|
+
'speccrew-knowledge-techs-generate-xml',
|
|
132
|
+
'speccrew-knowledge-techs-index-xml',
|
|
133
|
+
'speccrew-knowledge-techs-init-xml',
|
|
134
|
+
];
|
|
135
|
+
|
|
136
|
+
// Deprecated agents that should be auto-cleaned on init/update
|
|
137
|
+
const DEPRECATED_AGENTS = [
|
|
138
|
+
'speccrew-team-leader-xml.md', // replaced by speccrew-team-leader.md
|
|
116
139
|
];
|
|
117
140
|
|
|
118
141
|
function cleanDeprecatedSkills(destDir, deprecatedList) {
|
|
@@ -133,6 +156,24 @@ function cleanDeprecatedSkills(destDir, deprecatedList) {
|
|
|
133
156
|
return cleaned;
|
|
134
157
|
}
|
|
135
158
|
|
|
159
|
+
// Clean deprecated agent files from agents directory
|
|
160
|
+
function cleanDeprecatedAgents(destDir, deprecatedList) {
|
|
161
|
+
if (!fs.existsSync(destDir)) return 0;
|
|
162
|
+
let cleaned = 0;
|
|
163
|
+
try {
|
|
164
|
+
for (const fileName of deprecatedList) {
|
|
165
|
+
const fullPath = path.join(destDir, fileName);
|
|
166
|
+
if (fs.existsSync(fullPath)) {
|
|
167
|
+
fs.unlinkSync(fullPath);
|
|
168
|
+
cleaned++;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
} catch (error) {
|
|
172
|
+
// Silently ignore cleanup errors to not block main flow
|
|
173
|
+
}
|
|
174
|
+
return cleaned;
|
|
175
|
+
}
|
|
176
|
+
|
|
136
177
|
module.exports = {
|
|
137
178
|
copyDirRecursive,
|
|
138
179
|
isSpeccrewFile,
|
|
@@ -144,5 +185,7 @@ module.exports = {
|
|
|
144
185
|
ensureDirectories,
|
|
145
186
|
removeDirRecursive,
|
|
146
187
|
DEPRECATED_SKILLS,
|
|
188
|
+
DEPRECATED_AGENTS,
|
|
147
189
|
cleanDeprecatedSkills,
|
|
190
|
+
cleanDeprecatedAgents,
|
|
148
191
|
};
|