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

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 +90 -10
  2. package/package.json +1 -1
package/dist/bin/cli.js CHANGED
@@ -7689,6 +7689,74 @@ function detectToolsForBootstrap(cwd) {
7689
7689
  (tool) => tool.detect.some((pattern) => fs8.existsSync(path7.join(cwd, pattern)))
7690
7690
  );
7691
7691
  }
7692
+ var FRAMEWORK_SKILL_RULES = [
7693
+ {
7694
+ detect: (deps) => "next" in deps,
7695
+ skills: [
7696
+ { skill: "vercel-labs/agent-skills@vercel-react-best-practices", label: "React best practices" },
7697
+ { skill: "wshobson/agents@nextjs-app-router-patterns", label: "Next.js App Router patterns" }
7698
+ ]
7699
+ },
7700
+ {
7701
+ detect: (deps) => "react" in deps && !("next" in deps),
7702
+ skills: [
7703
+ { skill: "vercel-labs/agent-skills@vercel-react-best-practices", label: "React best practices" }
7704
+ ]
7705
+ },
7706
+ {
7707
+ detect: (deps) => "vue" in deps,
7708
+ skills: [
7709
+ { skill: "antfu/skills@vue", label: "Vue best practices" }
7710
+ ]
7711
+ },
7712
+ {
7713
+ detect: (deps) => "svelte" in deps || "@sveltejs/kit" in deps,
7714
+ skills: [
7715
+ { skill: "ejirocodes/agent-skills@svelte5-best-practices", label: "Svelte best practices" }
7716
+ ]
7717
+ },
7718
+ {
7719
+ detect: (deps) => "@angular/core" in deps,
7720
+ skills: [
7721
+ { skill: "analogjs/angular-skills@angular-component", label: "Angular component patterns" }
7722
+ ]
7723
+ },
7724
+ {
7725
+ detect: (deps) => "payload" in deps,
7726
+ skills: [
7727
+ { skill: "payloadcms/skills@payload", label: "Payload CMS patterns" }
7728
+ ]
7729
+ },
7730
+ {
7731
+ detect: (deps) => "tailwindcss" in deps,
7732
+ skills: [
7733
+ { skill: "wshobson/agents@tailwind-design-system", label: "Tailwind design system" }
7734
+ ]
7735
+ }
7736
+ ];
7737
+ function detectFrameworkSkills(cwd) {
7738
+ const pkgPath = path7.join(cwd, "package.json");
7739
+ if (!fs8.existsSync(pkgPath)) return [];
7740
+ try {
7741
+ const pkg = JSON.parse(fs8.readFileSync(pkgPath, "utf-8"));
7742
+ const allDeps = { ...pkg.dependencies, ...pkg.devDependencies };
7743
+ const seen = /* @__PURE__ */ new Set();
7744
+ const skills = [];
7745
+ for (const rule of FRAMEWORK_SKILL_RULES) {
7746
+ if (rule.detect(allDeps)) {
7747
+ for (const skill of rule.skills) {
7748
+ if (!seen.has(skill.skill)) {
7749
+ seen.add(skill.skill);
7750
+ skills.push(skill);
7751
+ }
7752
+ }
7753
+ }
7754
+ }
7755
+ return skills;
7756
+ } catch {
7757
+ return [];
7758
+ }
7759
+ }
7692
7760
  function bootstrapCommand(opts, pkgRoot) {
7693
7761
  const cwd = process.cwd();
7694
7762
  setConfigDir(cwd);
@@ -8145,32 +8213,44 @@ ${entries}
8145
8213
  }
8146
8214
  console.log("\n\u2500\u2500 Skills \u2500\u2500");
8147
8215
  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) {
8216
+ const allSkills = [];
8217
+ const seen = /* @__PURE__ */ new Set();
8218
+ for (const tool of detectToolsForBootstrap(cwd)) {
8219
+ if (tool.skill && !seen.has(tool.skill)) {
8220
+ seen.add(tool.skill);
8221
+ allSkills.push({ skill: tool.skill, label: `${tool.name} CLI` });
8222
+ }
8223
+ }
8224
+ for (const mapping of detectFrameworkSkills(cwd)) {
8225
+ if (!seen.has(mapping.skill)) {
8226
+ seen.add(mapping.skill);
8227
+ allSkills.push(mapping);
8228
+ }
8229
+ }
8230
+ if (allSkills.length > 0) {
8231
+ for (const { skill, label } of allSkills) {
8152
8232
  try {
8153
- console.log(` Installing: ${tool.skill}`);
8154
- execFileSync4("npx", ["skills", "add", tool.skill, "--yes"], {
8233
+ console.log(` Installing: ${label} (${skill})`);
8234
+ execFileSync4("npx", ["skills", "add", skill, "--yes"], {
8155
8235
  cwd,
8156
8236
  encoding: "utf-8",
8157
8237
  timeout: 6e4,
8158
8238
  stdio: ["pipe", "pipe", "pipe"]
8159
8239
  });
8240
+ const skillName = skill.split("@").pop() ?? "";
8160
8241
  for (const dir of [".claude/skills", ".agents/skills"]) {
8161
- const skillName = tool.skill.split("@").pop() ?? "";
8162
8242
  const skillPath = path7.join(dir, skillName);
8163
8243
  if (fs8.existsSync(path7.join(cwd, skillPath))) {
8164
8244
  installedSkillPaths.push(skillPath);
8165
8245
  }
8166
8246
  }
8167
- console.log(` \u2713 ${tool.name} skill installed`);
8247
+ console.log(` \u2713 ${label}`);
8168
8248
  } catch {
8169
- console.log(` \u2717 ${tool.name} skill install failed`);
8249
+ console.log(` \u2717 ${label} \u2014 failed to install`);
8170
8250
  }
8171
8251
  }
8172
8252
  } else {
8173
- console.log(" \u25CB No tool skills to install");
8253
+ console.log(" \u25CB No skills to install (no frameworks detected)");
8174
8254
  }
8175
8255
  if (fs8.existsSync(path7.join(cwd, "skills-lock.json"))) {
8176
8256
  installedSkillPaths.push("skills-lock.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine-lite",
3
- "version": "0.1.132",
3
+ "version": "0.1.133",
4
4
  "description": "Autonomous SDLC pipeline: Kody orchestration + Claude Code + LiteLLM",
5
5
  "license": "MIT",
6
6
  "type": "module",