@mikulgohil/ai-kit 1.6.1 → 1.8.0

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.
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ var GUIDES_DIR = path.join(PACKAGE_ROOT, "guides");
15
15
  var DOCS_SCAFFOLDS_DIR = path.join(PACKAGE_ROOT, "docs-scaffolds");
16
16
  var AGENTS_DIR = path.join(PACKAGE_ROOT, "agents");
17
17
  var CONTEXTS_DIR = path.join(PACKAGE_ROOT, "contexts");
18
- var VERSION = "1.6.1";
18
+ var VERSION = "1.8.0";
19
19
  var AI_KIT_CONFIG_FILE = "ai-kit.config.json";
20
20
  var GENERATED_FILES = {
21
21
  claudeMd: "CLAUDE.md",
@@ -1010,6 +1010,7 @@ ${replaced}`
1010
1010
  // src/generator/config.ts
1011
1011
  function generateConfig(scan, templates, commands, guides, options) {
1012
1012
  return {
1013
+ $schema: "https://ai-kit.mikul.me/schema/ai-kit.config.schema.json",
1013
1014
  version: VERSION,
1014
1015
  scanResult: scan,
1015
1016
  generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
@@ -1276,7 +1277,10 @@ var AVAILABLE_SKILLS = [
1276
1277
  "checkpoint",
1277
1278
  "orchestrate",
1278
1279
  "quality-gate",
1279
- "harness-audit"
1280
+ "harness-audit",
1281
+ // New skills (v1.7.0) — requirements clarification (inspired by OMC Deep Interview)
1282
+ "deep-interview",
1283
+ "clarify-requirements"
1280
1284
  ];
1281
1285
  var SKILL_DESCRIPTIONS = {
1282
1286
  "prompt-help": "Help developers write effective AI prompts with structured context",
@@ -1323,7 +1327,10 @@ var SKILL_DESCRIPTIONS = {
1323
1327
  "checkpoint": "Create a verification snapshot \u2014 run all quality checks and record pass/fail status",
1324
1328
  "orchestrate": "Multi-agent orchestration \u2014 break complex tasks into subtasks and delegate to agents",
1325
1329
  "quality-gate": "Run comprehensive quality checks: types, lint, format, tests, bundle, a11y, security",
1326
- "harness-audit": "Audit AI agent configuration \u2014 check CLAUDE.md, hooks, agents, skills, MCP servers"
1330
+ "harness-audit": "Audit AI agent configuration \u2014 check CLAUDE.md, hooks, agents, skills, MCP servers",
1331
+ // New skills (v1.7.0) — requirements clarification
1332
+ "deep-interview": "Socratic requirements gathering \u2014 structured interview to transform vague ideas into detailed specifications",
1333
+ "clarify-requirements": "Quick task clarification \u2014 identify gaps and ambiguities in under 5 minutes before coding"
1327
1334
  };
1328
1335
  async function copySkills(targetDir) {
1329
1336
  const copied = [];
@@ -1412,7 +1419,13 @@ var UNIVERSAL_AGENTS = [
1412
1419
  "build-resolver",
1413
1420
  "doc-updater",
1414
1421
  "refactor-cleaner",
1415
- "architect"
1422
+ "architect",
1423
+ // New agents (v1.7.0) — inspired by oh-my-claudecode evaluation
1424
+ "data-scientist",
1425
+ "performance-profiler",
1426
+ "migration-specialist",
1427
+ "dependency-auditor",
1428
+ "api-designer"
1416
1429
  ];
1417
1430
  var CONDITIONAL_AGENTS = [
1418
1431
  {
@@ -4482,164 +4495,73 @@ function generateRegistryMarkdown(registry) {
4482
4495
  return lines.join("\n");
4483
4496
  }
4484
4497
 
4485
- // src/index.ts
4486
- var program = new Command();
4487
- program.name("ai-kit").description(
4488
- "AI-powered project setup \u2014 generates CLAUDE.md, .cursorrules, slash commands, and guides tailored to your stack."
4489
- ).version(VERSION);
4490
- program.command("init").description("Scan your project and generate AI configs").argument("[path]", "Project directory (defaults to current directory)").action(async (targetPath) => {
4491
- try {
4492
- await initCommand(targetPath);
4493
- } catch (err) {
4494
- if (err.name === "ExitPromptError") {
4495
- process.exit(0);
4498
+ // src/cli/error-handler.ts
4499
+ function withErrorHandler(fn) {
4500
+ const wrapped = async (...args) => {
4501
+ try {
4502
+ await fn(...args);
4503
+ } catch (err) {
4504
+ if (err.name === "ExitPromptError") {
4505
+ process.exit(0);
4506
+ }
4507
+ console.error(err);
4508
+ process.exit(1);
4496
4509
  }
4497
- console.error(err);
4498
- process.exit(1);
4499
- }
4500
- });
4501
- program.command("update").description("Re-scan and update all generated AI configs").argument("[path]", "Project directory (defaults to current directory)").action(async (targetPath) => {
4502
- try {
4510
+ };
4511
+ return wrapped;
4512
+ }
4513
+
4514
+ // src/cli/register-commands.ts
4515
+ function registerCommands(program2) {
4516
+ program2.command("init").description("Scan your project and generate AI configs").argument("[path]", "Project directory (defaults to current directory)").action(withErrorHandler(async (targetPath) => {
4517
+ await initCommand(targetPath);
4518
+ }));
4519
+ program2.command("update").description("Re-scan and update all generated AI configs").argument("[path]", "Project directory (defaults to current directory)").action(withErrorHandler(async (targetPath) => {
4503
4520
  await updateCommand(targetPath);
4504
- } catch (err) {
4505
- if (err.name === "ExitPromptError") {
4506
- process.exit(0);
4507
- }
4508
- console.error(err);
4509
- process.exit(1);
4510
- }
4511
- });
4512
- program.command("reset").description("Remove all AI Kit generated files").argument("[path]", "Project directory (defaults to current directory)").action(async (targetPath) => {
4513
- try {
4521
+ }));
4522
+ program2.command("reset").description("Remove all AI Kit generated files").argument("[path]", "Project directory (defaults to current directory)").action(withErrorHandler(async (targetPath) => {
4514
4523
  await resetCommand(targetPath);
4515
- } catch (err) {
4516
- if (err.name === "ExitPromptError") {
4517
- process.exit(0);
4518
- }
4519
- console.error(err);
4520
- process.exit(1);
4521
- }
4522
- });
4523
- program.command("tokens").description("Show token usage summary and cost estimates").option("--export", "Export data and open HTML dashboard").option("--csv", "Export daily usage to CSV file").option("--budget <amount>", "Monthly budget in USD (default: $20)", parseFloat).action(async (opts) => {
4524
- try {
4524
+ }));
4525
+ program2.command("tokens").description("Show token usage summary and cost estimates").option("--export", "Export data and open HTML dashboard").option("--csv", "Export daily usage to CSV file").option("--budget <amount>", "Monthly budget in USD (default: $20)", parseFloat).action(withErrorHandler(async (opts) => {
4525
4526
  await tokensCommand(opts);
4526
- } catch (err) {
4527
- if (err.name === "ExitPromptError") {
4528
- process.exit(0);
4529
- }
4530
- console.error(err);
4531
- process.exit(1);
4532
- }
4533
- });
4534
- program.command("doctor").description("Diagnose AI Kit setup and check for issues").argument("[path]", "Project directory (defaults to current directory)").action(async (targetPath) => {
4535
- try {
4527
+ }));
4528
+ program2.command("doctor").description("Diagnose AI Kit setup and check for issues").argument("[path]", "Project directory (defaults to current directory)").action(withErrorHandler(async (targetPath) => {
4536
4529
  await doctorCommand(targetPath);
4537
- } catch (err) {
4538
- if (err.name === "ExitPromptError") {
4539
- process.exit(0);
4540
- }
4541
- console.error(err);
4542
- process.exit(1);
4543
- }
4544
- });
4545
- program.command("diff").description("Show what would change on update (dry run)").argument("[path]", "Project directory (defaults to current directory)").action(async (targetPath) => {
4546
- try {
4530
+ }));
4531
+ program2.command("diff").description("Show what would change on update (dry run)").argument("[path]", "Project directory (defaults to current directory)").action(withErrorHandler(async (targetPath) => {
4547
4532
  await diffCommand(targetPath);
4548
- } catch (err) {
4549
- if (err.name === "ExitPromptError") {
4550
- process.exit(0);
4551
- }
4552
- console.error(err);
4553
- process.exit(1);
4554
- }
4555
- });
4556
- program.command("export").description("Export rules to other AI tools (Windsurf, Aider, Cline)").argument("[path]", "Project directory (defaults to current directory)").option("--format <format>", "Export format: windsurf, aider, cline, or all").action(async (targetPath, opts) => {
4557
- try {
4533
+ }));
4534
+ program2.command("export").description("Export rules to other AI tools (Windsurf, Aider, Cline)").argument("[path]", "Project directory (defaults to current directory)").option("--format <format>", "Export format: windsurf, aider, cline, or all").action(withErrorHandler(async (targetPath, opts) => {
4558
4535
  await exportCommand(targetPath, opts);
4559
- } catch (err) {
4560
- if (err.name === "ExitPromptError") {
4561
- process.exit(0);
4562
- }
4563
- console.error(err);
4564
- process.exit(1);
4565
- }
4566
- });
4567
- program.command("stats").description("Show project setup statistics and complexity").argument("[path]", "Project directory (defaults to current directory)").action(async (targetPath) => {
4568
- try {
4536
+ }));
4537
+ program2.command("stats").description("Show project setup statistics and complexity").argument("[path]", "Project directory (defaults to current directory)").action(withErrorHandler(async (targetPath) => {
4569
4538
  await statsCommand(targetPath);
4570
- } catch (err) {
4571
- if (err.name === "ExitPromptError") {
4572
- process.exit(0);
4573
- }
4574
- console.error(err);
4575
- process.exit(1);
4576
- }
4577
- });
4578
- program.command("audit").description("Security and configuration audit for AI agent setup").argument("[path]", "Project directory (defaults to current directory)").action(async (targetPath) => {
4579
- try {
4539
+ }));
4540
+ program2.command("audit").description("Security and configuration audit for AI agent setup").argument("[path]", "Project directory (defaults to current directory)").action(withErrorHandler(async (targetPath) => {
4580
4541
  await auditCommand(targetPath);
4581
- } catch (err) {
4582
- if (err.name === "ExitPromptError") {
4583
- process.exit(0);
4584
- }
4585
- console.error(err);
4586
- process.exit(1);
4587
- }
4588
- });
4589
- program.command("health").description("One-glance project health \u2014 setup, security, stack, tools, and docs").argument("[path]", "Project directory (defaults to current directory)").action(async (targetPath) => {
4590
- try {
4542
+ }));
4543
+ program2.command("health").description("One-glance project health \u2014 setup, security, stack, tools, and docs").argument("[path]", "Project directory (defaults to current directory)").action(withErrorHandler(async (targetPath) => {
4591
4544
  await healthCommand(targetPath);
4592
- } catch (err) {
4593
- if (err.name === "ExitPromptError") {
4594
- process.exit(0);
4595
- }
4596
- console.error(err);
4597
- process.exit(1);
4598
- }
4599
- });
4600
- program.command("patterns").description("Generate a pattern library from recurring code patterns").argument("[path]", "Project directory (defaults to current directory)").action(async (targetPath) => {
4601
- try {
4545
+ }));
4546
+ program2.command("patterns").description("Generate a pattern library from recurring code patterns").argument("[path]", "Project directory (defaults to current directory)").action(withErrorHandler(async (targetPath) => {
4602
4547
  await patternsCommand(targetPath);
4603
- } catch (err) {
4604
- if (err.name === "ExitPromptError") {
4605
- process.exit(0);
4606
- }
4607
- console.error(err);
4608
- process.exit(1);
4609
- }
4610
- });
4611
- program.command("dead-code").description("Find unused components and dead code").argument("[path]", "Project directory (defaults to current directory)").action(async (targetPath) => {
4612
- try {
4548
+ }));
4549
+ program2.command("dead-code").description("Find unused components and dead code").argument("[path]", "Project directory (defaults to current directory)").action(withErrorHandler(async (targetPath) => {
4613
4550
  await deadCodeCommand(targetPath);
4614
- } catch (err) {
4615
- if (err.name === "ExitPromptError") {
4616
- process.exit(0);
4617
- }
4618
- console.error(err);
4619
- process.exit(1);
4620
- }
4621
- });
4622
- program.command("drift").description("Detect drift between component code and .ai.md documentation").argument("[path]", "Project directory (defaults to current directory)").action(async (targetPath) => {
4623
- try {
4551
+ }));
4552
+ program2.command("drift").description("Detect drift between component code and .ai.md documentation").argument("[path]", "Project directory (defaults to current directory)").action(withErrorHandler(async (targetPath) => {
4624
4553
  await driftCommand(targetPath);
4625
- } catch (err) {
4626
- if (err.name === "ExitPromptError") {
4627
- process.exit(0);
4628
- }
4629
- console.error(err);
4630
- process.exit(1);
4631
- }
4632
- });
4633
- program.command("component-registry").description("Generate a component registry for AI agent discovery").argument("[path]", "Project directory (defaults to current directory)").action(async (targetPath) => {
4634
- try {
4554
+ }));
4555
+ program2.command("component-registry").description("Generate a component registry for AI agent discovery").argument("[path]", "Project directory (defaults to current directory)").action(withErrorHandler(async (targetPath) => {
4635
4556
  await componentRegistryCommand(targetPath);
4636
- } catch (err) {
4637
- if (err.name === "ExitPromptError") {
4638
- process.exit(0);
4639
- }
4640
- console.error(err);
4641
- process.exit(1);
4642
- }
4643
- });
4557
+ }));
4558
+ }
4559
+
4560
+ // src/index.ts
4561
+ var program = new Command();
4562
+ program.name("ai-kit").description(
4563
+ "AI-powered project setup \u2014 generates CLAUDE.md, .cursorrules, slash commands, and guides tailored to your stack."
4564
+ ).version(VERSION);
4565
+ registerCommands(program);
4644
4566
  program.parse();
4645
4567
  //# sourceMappingURL=index.js.map