claudekit-cli 3.26.0 → 3.26.1

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/index.js +29 -20
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16442,7 +16442,7 @@ var init_update_command_help = __esm(() => {
16442
16442
  sections: [
16443
16443
  {
16444
16444
  title: "Note",
16445
- content: "'ck update' updates the CLI tool only. To update kit content (skills, commands, workflows), use 'ck init' for local or 'ck init -g' for global."
16445
+ content: "'ck update' updates the CLI tool only. To update kit content (skills, commands, rules), use 'ck init' for local or 'ck init -g' for global."
16446
16446
  }
16447
16447
  ]
16448
16448
  };
@@ -18542,7 +18542,7 @@ class PathResolver {
18542
18542
  }
18543
18543
  static buildComponentPath(baseDir, component, global2) {
18544
18544
  if (!PathResolver.isValidComponentName(component)) {
18545
- throw new Error(`Invalid component name: "${component}" contains path traversal patterns. Valid names are simple directory names like "agents", "commands", "workflows", "skills", or "hooks".`);
18545
+ throw new Error(`Invalid component name: "${component}" contains path traversal patterns. Valid names are simple directory names like "agents", "commands", "rules", "skills", or "hooks".`);
18546
18546
  }
18547
18547
  const prefix = PathResolver.getPathPrefix(global2);
18548
18548
  if (prefix) {
@@ -18620,7 +18620,7 @@ async function scanClaudeKitDirectory(directoryPath) {
18620
18620
  const counts = {
18621
18621
  agents: 0,
18622
18622
  commands: 0,
18623
- workflows: 0,
18623
+ rules: 0,
18624
18624
  skills: 0
18625
18625
  };
18626
18626
  try {
@@ -18638,10 +18638,14 @@ async function scanClaudeKitDirectory(directoryPath) {
18638
18638
  const commandFiles = await import_fs_extra.readdir(commandsPath);
18639
18639
  counts.commands = commandFiles.filter((file) => file.endsWith(".md")).length;
18640
18640
  }
18641
- if (items.includes("workflows")) {
18641
+ if (items.includes("rules")) {
18642
+ const rulesPath = join2(directoryPath, "rules");
18643
+ const ruleFiles = await import_fs_extra.readdir(rulesPath);
18644
+ counts.rules = ruleFiles.filter((file) => file.endsWith(".md")).length;
18645
+ } else if (items.includes("workflows")) {
18642
18646
  const workflowsPath = join2(directoryPath, "workflows");
18643
18647
  const workflowFiles = await import_fs_extra.readdir(workflowsPath);
18644
- counts.workflows = workflowFiles.filter((file) => file.endsWith(".md")).length;
18648
+ counts.rules = workflowFiles.filter((file) => file.endsWith(".md")).length;
18645
18649
  }
18646
18650
  if (items.includes("skills")) {
18647
18651
  const skillsPath = join2(directoryPath, "skills");
@@ -18682,12 +18686,12 @@ async function getClaudeKitSetup(projectDir = process.cwd()) {
18682
18686
  global: {
18683
18687
  path: "",
18684
18688
  metadata: null,
18685
- components: { agents: 0, commands: 0, workflows: 0, skills: 0 }
18689
+ components: { agents: 0, commands: 0, rules: 0, skills: 0 }
18686
18690
  },
18687
18691
  project: {
18688
18692
  path: "",
18689
18693
  metadata: null,
18690
- components: { agents: 0, commands: 0, workflows: 0, skills: 0 }
18694
+ components: { agents: 0, commands: 0, rules: 0, skills: 0 }
18691
18695
  }
18692
18696
  };
18693
18697
  const globalDir = getGlobalInstallDir();
@@ -19310,16 +19314,16 @@ function checkComponentCounts(setup) {
19310
19314
  const project = setup.project.components;
19311
19315
  const totalAgents = global2.agents + project.agents;
19312
19316
  const totalCommands = global2.commands + project.commands;
19313
- const totalWorkflows = global2.workflows + project.workflows;
19317
+ const totalRules = global2.rules + project.rules;
19314
19318
  const totalSkills = global2.skills + project.skills;
19315
- const totalComponents = totalAgents + totalCommands + totalWorkflows + totalSkills;
19319
+ const totalComponents = totalAgents + totalCommands + totalRules + totalSkills;
19316
19320
  return {
19317
19321
  id: "ck-component-counts",
19318
19322
  name: "ClaudeKit Components",
19319
19323
  group: "claudekit",
19320
19324
  priority: "standard",
19321
19325
  status: totalComponents > 0 ? "info" : "warn",
19322
- message: totalComponents > 0 ? `${totalAgents} agents, ${totalCommands} commands, ${totalWorkflows} workflows, ${totalSkills} skills` : "No components found",
19326
+ message: totalComponents > 0 ? `${totalAgents} agents, ${totalCommands} commands, ${totalRules} rules, ${totalSkills} skills` : "No components found",
19323
19327
  suggestion: totalComponents === 0 ? "Install ClaudeKit: ck new --kit engineer" : undefined,
19324
19328
  autoFixable: false
19325
19329
  };
@@ -19680,7 +19684,7 @@ async function checkProjectConfigCompleteness(setup, projectDir) {
19680
19684
  };
19681
19685
  }
19682
19686
  const projectClaudeDir = join11(projectDir, ".claude");
19683
- const requiredDirs = ["agents", "commands", "workflows", "skills"];
19687
+ const requiredDirs = ["agents", "commands", "skills"];
19684
19688
  const missingDirs = [];
19685
19689
  for (const dir of requiredDirs) {
19686
19690
  const dirPath = join11(projectClaudeDir, dir);
@@ -19688,9 +19692,14 @@ async function checkProjectConfigCompleteness(setup, projectDir) {
19688
19692
  missingDirs.push(dir);
19689
19693
  }
19690
19694
  }
19695
+ const hasRulesOrWorkflows = existsSync10(join11(projectClaudeDir, "rules")) || existsSync10(join11(projectClaudeDir, "workflows"));
19696
+ if (!hasRulesOrWorkflows) {
19697
+ missingDirs.push("rules");
19698
+ }
19691
19699
  const files = await readdir3(projectClaudeDir).catch(() => []);
19692
19700
  const hasOnlyClaudeMd = files.length === 1 && files.includes("CLAUDE.md");
19693
- if (hasOnlyClaudeMd || missingDirs.length === requiredDirs.length) {
19701
+ const totalRequired = requiredDirs.length + 1;
19702
+ if (hasOnlyClaudeMd || missingDirs.length === totalRequired) {
19694
19703
  return {
19695
19704
  id: "ck-project-config-complete",
19696
19705
  name: "Project Config Completeness",
@@ -19698,7 +19707,7 @@ async function checkProjectConfigCompleteness(setup, projectDir) {
19698
19707
  priority: "standard",
19699
19708
  status: "fail",
19700
19709
  message: "Incomplete configuration",
19701
- details: "Only CLAUDE.md found - missing agents, commands, workflows, skills",
19710
+ details: "Only CLAUDE.md found - missing agents, commands, rules, skills",
19702
19711
  suggestion: "Run 'ck init' to install complete ClaudeKit in project",
19703
19712
  autoFixable: false
19704
19713
  };
@@ -24657,9 +24666,9 @@ async function promptDirectorySelection(global2 = false) {
24657
24666
  { key: "agents", label: "Agents", pattern: prefix ? `${prefix}/agents` : "agents" },
24658
24667
  { key: "commands", label: "Commands", pattern: prefix ? `${prefix}/commands` : "commands" },
24659
24668
  {
24660
- key: "workflows",
24661
- label: "Workflows",
24662
- pattern: prefix ? `${prefix}/workflows` : "workflows"
24669
+ key: "rules",
24670
+ label: "Rules",
24671
+ pattern: prefix ? `${prefix}/rules` : "rules"
24663
24672
  },
24664
24673
  { key: "skills", label: "Skills", pattern: prefix ? `${prefix}/skills` : "skills" },
24665
24674
  { key: "hooks", label: "Hooks", pattern: prefix ? `${prefix}/hooks` : "hooks" }
@@ -34468,7 +34477,7 @@ async function getUninstallManifest(claudeDir, kit) {
34468
34477
  const installedFiles = detection.metadata.installedFiles || [];
34469
34478
  const hasFiles = legacyFiles2.length > 0 || installedFiles.length > 0;
34470
34479
  if (!hasFiles) {
34471
- const legacyDirs2 = ["commands", "agents", "skills", "workflows", "hooks", "scripts"];
34480
+ const legacyDirs2 = ["commands", "agents", "skills", "rules", "workflows", "hooks", "scripts"];
34472
34481
  const legacyFileList = ["metadata.json"];
34473
34482
  return {
34474
34483
  filesToRemove: [...legacyDirs2, ...legacyFileList],
@@ -34486,7 +34495,7 @@ async function getUninstallManifest(claudeDir, kit) {
34486
34495
  remainingKits: []
34487
34496
  };
34488
34497
  }
34489
- const legacyDirs = ["commands", "agents", "skills", "workflows", "hooks", "scripts"];
34498
+ const legacyDirs = ["commands", "agents", "skills", "rules", "workflows", "hooks", "scripts"];
34490
34499
  const legacyFiles = ["metadata.json"];
34491
34500
  return {
34492
34501
  filesToRemove: [...legacyDirs, ...legacyFiles],
@@ -40460,7 +40469,7 @@ async function runPreflightChecks() {
40460
40469
  init_logger();
40461
40470
  import { join as join65 } from "node:path";
40462
40471
  var import_fs_extra29 = __toESM(require_lib(), 1);
40463
- var CLAUDEKIT_SUBDIRECTORIES = ["commands", "agents", "skills", "workflows", "hooks"];
40472
+ var CLAUDEKIT_SUBDIRECTORIES = ["commands", "agents", "skills", "rules", "hooks"];
40464
40473
  async function handleFreshInstallation(claudeDir, prompts) {
40465
40474
  if (!await import_fs_extra29.pathExists(claudeDir)) {
40466
40475
  logger.info(".claude directory does not exist, proceeding with fresh installation");
@@ -42706,7 +42715,7 @@ var import_fs_extra36 = __toESM(require_lib(), 1);
42706
42715
  // package.json
42707
42716
  var package_default = {
42708
42717
  name: "claudekit-cli",
42709
- version: "3.26.0",
42718
+ version: "3.26.1",
42710
42719
  description: "CLI tool for bootstrapping and updating ClaudeKit projects",
42711
42720
  type: "module",
42712
42721
  repository: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudekit-cli",
3
- "version": "3.26.0",
3
+ "version": "3.26.1",
4
4
  "description": "CLI tool for bootstrapping and updating ClaudeKit projects",
5
5
  "type": "module",
6
6
  "repository": {