@kody-ade/kody-engine-lite 0.1.130 → 0.1.132

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.
Files changed (2) hide show
  1. package/dist/bin/cli.js +69 -7
  2. package/package.json +1 -1
package/dist/bin/cli.js CHANGED
@@ -7675,6 +7675,20 @@ function ghComment(issueNumber, body, cwd) {
7675
7675
  } catch {
7676
7676
  }
7677
7677
  }
7678
+ var KNOWN_TOOLS = [
7679
+ {
7680
+ name: "playwright",
7681
+ detect: ["playwright.config.ts", "playwright.config.js"],
7682
+ stages: ["verify"],
7683
+ setup: "npx playwright install --with-deps chromium",
7684
+ skill: "microsoft/playwright-cli@playwright-cli"
7685
+ }
7686
+ ];
7687
+ function detectToolsForBootstrap(cwd) {
7688
+ return KNOWN_TOOLS.filter(
7689
+ (tool) => tool.detect.some((pattern) => fs8.existsSync(path7.join(cwd, pattern)))
7690
+ );
7691
+ }
7678
7692
  function bootstrapCommand(opts, pkgRoot) {
7679
7693
  const cwd = process.cwd();
7680
7694
  setConfigDir(cwd);
@@ -8098,28 +8112,76 @@ Command and URL.
8098
8112
  console.log("\n\u2500\u2500 Tools \u2500\u2500");
8099
8113
  const toolsYmlPath = path7.join(cwd, ".kody", "tools.yml");
8100
8114
  if (!fs8.existsSync(toolsYmlPath) || opts.force) {
8101
- const toolsTemplate = `# Kody Tools Configuration
8102
- # Uncomment and configure tools that your project uses.
8103
- # The engine detects tools, runs setup commands, and installs matching skills from skills.sh.
8115
+ const detected = detectToolsForBootstrap(cwd);
8116
+ const header = `# Kody Tools Configuration
8104
8117
  # Find skills at https://skills.sh
8105
- #
8118
+ `;
8119
+ if (detected.length > 0) {
8120
+ const entries = detected.map(
8121
+ (t) => `${t.name}:
8122
+ detect: ${JSON.stringify(t.detect)}
8123
+ stages: ${JSON.stringify(t.stages)}
8124
+ setup: "${t.setup}"
8125
+ skill: "${t.skill}"`
8126
+ ).join("\n\n");
8127
+ fs8.writeFileSync(toolsYmlPath, `${header}
8128
+ ${entries}
8129
+ `);
8130
+ for (const t of detected) console.log(` \u2713 ${t.name} detected`);
8131
+ } else {
8132
+ const example = `${header}#
8133
+ # Example:
8106
8134
  # playwright:
8107
8135
  # detect: ["playwright.config.ts", "playwright.config.js"]
8108
8136
  # stages: [verify]
8109
8137
  # setup: "npx playwright install --with-deps chromium"
8110
8138
  # skill: "microsoft/playwright-cli@playwright-cli"
8111
8139
  `;
8112
- fs8.writeFileSync(toolsYmlPath, toolsTemplate);
8113
- console.log(" \u2713 .kody/tools.yml (template created)");
8140
+ fs8.writeFileSync(toolsYmlPath, example);
8141
+ console.log(" \u25CB No tools detected \u2014 template created");
8142
+ }
8114
8143
  } else {
8115
8144
  console.log(" \u25CB .kody/tools.yml (already exists, keeping)");
8116
8145
  }
8146
+ console.log("\n\u2500\u2500 Skills \u2500\u2500");
8147
+ const installedSkillPaths = [];
8148
+ const detectedForSkills = detectToolsForBootstrap(cwd);
8149
+ const toolsWithSkills = detectedForSkills.filter((t) => t.skill);
8150
+ if (toolsWithSkills.length > 0) {
8151
+ for (const tool of toolsWithSkills) {
8152
+ try {
8153
+ console.log(` Installing: ${tool.skill}`);
8154
+ execFileSync4("npx", ["skills", "add", tool.skill, "--yes"], {
8155
+ cwd,
8156
+ encoding: "utf-8",
8157
+ timeout: 6e4,
8158
+ stdio: ["pipe", "pipe", "pipe"]
8159
+ });
8160
+ for (const dir of [".claude/skills", ".agents/skills"]) {
8161
+ const skillName = tool.skill.split("@").pop() ?? "";
8162
+ const skillPath = path7.join(dir, skillName);
8163
+ if (fs8.existsSync(path7.join(cwd, skillPath))) {
8164
+ installedSkillPaths.push(skillPath);
8165
+ }
8166
+ }
8167
+ console.log(` \u2713 ${tool.name} skill installed`);
8168
+ } catch {
8169
+ console.log(` \u2717 ${tool.name} skill install failed`);
8170
+ }
8171
+ }
8172
+ } else {
8173
+ console.log(" \u25CB No tool skills to install");
8174
+ }
8175
+ if (fs8.existsSync(path7.join(cwd, "skills-lock.json"))) {
8176
+ installedSkillPaths.push("skills-lock.json");
8177
+ }
8117
8178
  console.log("\n\u2500\u2500 Git \u2500\u2500");
8118
8179
  const filesToCommit = [
8119
8180
  ".kody/memory/architecture.md",
8120
8181
  ".kody/memory/conventions.md",
8121
8182
  ".kody/qa-guide.md",
8122
- ".kody/tools.yml"
8183
+ ".kody/tools.yml",
8184
+ ...installedSkillPaths
8123
8185
  ].filter((f) => fs8.existsSync(path7.join(cwd, f)));
8124
8186
  for (const stage of STEP_STAGES) {
8125
8187
  const stepFile = `.kody/steps/${stage}.md`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine-lite",
3
- "version": "0.1.130",
3
+ "version": "0.1.132",
4
4
  "description": "Autonomous SDLC pipeline: Kody orchestration + Claude Code + LiteLLM",
5
5
  "license": "MIT",
6
6
  "type": "module",