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.
@@ -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 (!fs.existsSync(TEMPLATE_AGENTS) || !fs.existsSync(TEMPLATE_AGENTS_DIR)) {
151
- console.error("Assets missing. Please reinstall ai-spec-tool.");
152
- process.exit(1);
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
- updateAgentsMd(targetAgents, report);
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.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-spec-tool",
3
- "version": "0.1.5",
3
+ "version": "0.1.8",
4
4
  "description": "Installable agents + rules for AI spec workflows",
5
5
  "bin": {
6
6
  "ai-spec-tool": "bin/ai-spec-tool.js"