@kody-ade/kody-engine-lite 0.1.131 → 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 +114 -1
  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);
@@ -8143,12 +8211,57 @@ ${entries}
8143
8211
  } else {
8144
8212
  console.log(" \u25CB .kody/tools.yml (already exists, keeping)");
8145
8213
  }
8214
+ console.log("\n\u2500\u2500 Skills \u2500\u2500");
8215
+ const installedSkillPaths = [];
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) {
8232
+ try {
8233
+ console.log(` Installing: ${label} (${skill})`);
8234
+ execFileSync4("npx", ["skills", "add", skill, "--yes"], {
8235
+ cwd,
8236
+ encoding: "utf-8",
8237
+ timeout: 6e4,
8238
+ stdio: ["pipe", "pipe", "pipe"]
8239
+ });
8240
+ const skillName = skill.split("@").pop() ?? "";
8241
+ for (const dir of [".claude/skills", ".agents/skills"]) {
8242
+ const skillPath = path7.join(dir, skillName);
8243
+ if (fs8.existsSync(path7.join(cwd, skillPath))) {
8244
+ installedSkillPaths.push(skillPath);
8245
+ }
8246
+ }
8247
+ console.log(` \u2713 ${label}`);
8248
+ } catch {
8249
+ console.log(` \u2717 ${label} \u2014 failed to install`);
8250
+ }
8251
+ }
8252
+ } else {
8253
+ console.log(" \u25CB No skills to install (no frameworks detected)");
8254
+ }
8255
+ if (fs8.existsSync(path7.join(cwd, "skills-lock.json"))) {
8256
+ installedSkillPaths.push("skills-lock.json");
8257
+ }
8146
8258
  console.log("\n\u2500\u2500 Git \u2500\u2500");
8147
8259
  const filesToCommit = [
8148
8260
  ".kody/memory/architecture.md",
8149
8261
  ".kody/memory/conventions.md",
8150
8262
  ".kody/qa-guide.md",
8151
- ".kody/tools.yml"
8263
+ ".kody/tools.yml",
8264
+ ...installedSkillPaths
8152
8265
  ].filter((f) => fs8.existsSync(path7.join(cwd, f)));
8153
8266
  for (const stage of STEP_STAGES) {
8154
8267
  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.131",
3
+ "version": "0.1.133",
4
4
  "description": "Autonomous SDLC pipeline: Kody orchestration + Claude Code + LiteLLM",
5
5
  "license": "MIT",
6
6
  "type": "module",