ai-spec-tool 0.1.5 → 0.1.8
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/bin/ai-spec-tool.js +10 -6
- package/package.json +1 -1
package/bin/ai-spec-tool.js
CHANGED
|
@@ -7,6 +7,7 @@ const readline = require("readline");
|
|
|
7
7
|
const ASSET_ROOT = path.resolve(__dirname, "..", "assets");
|
|
8
8
|
const TEMPLATE_AGENTS = path.join(ASSET_ROOT, "AGENTS.md");
|
|
9
9
|
const TEMPLATE_AGENTS_DIR = path.join(ASSET_ROOT, ".agents");
|
|
10
|
+
const TEMPLATE_SKILLS_DIR = path.join(ASSET_ROOT, "skills");
|
|
10
11
|
const TEMPLATE_DOCS_DIR = path.join(ASSET_ROOT, "docs");
|
|
11
12
|
const PKG_JSON = path.resolve(__dirname, "..", "package.json");
|
|
12
13
|
|
|
@@ -147,17 +148,20 @@ async function init(options) {
|
|
|
147
148
|
conflictsResolved: []
|
|
148
149
|
};
|
|
149
150
|
|
|
150
|
-
if (
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
if (fs.existsSync(TEMPLATE_AGENTS_DIR)) {
|
|
152
|
+
copyDirSafe(TEMPLATE_AGENTS_DIR, targetAgentsDir, report, options);
|
|
153
|
+
}
|
|
154
|
+
if (fs.existsSync(TEMPLATE_SKILLS_DIR)) {
|
|
155
|
+
const targetSkillsDir = path.join(targetAgentsDir, "skills");
|
|
156
|
+
copyDirSafe(TEMPLATE_SKILLS_DIR, targetSkillsDir, report, options);
|
|
153
157
|
}
|
|
154
|
-
|
|
155
|
-
copyDirSafe(TEMPLATE_AGENTS_DIR, targetAgentsDir, report, options);
|
|
156
158
|
if (fs.existsSync(TEMPLATE_DOCS_DIR)) {
|
|
157
159
|
const targetDocsDir = path.join(cwd, "docs");
|
|
158
160
|
copyDirSafe(TEMPLATE_DOCS_DIR, targetDocsDir, report, options);
|
|
159
161
|
}
|
|
160
|
-
|
|
162
|
+
if (fs.existsSync(TEMPLATE_AGENTS)) {
|
|
163
|
+
updateAgentsMd(targetAgents, report);
|
|
164
|
+
}
|
|
161
165
|
await resolveConflictsInteractively(report, options);
|
|
162
166
|
|
|
163
167
|
console.log("ai-spec-tool init complete.");
|