@tdsoft-tech/aikit 0.1.14 → 0.1.16

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.
@@ -2088,6 +2088,9 @@ var DEFAULT_COMMANDS = [
2088
2088
  content: `Create a new task in the Beads system (.beads/ directory).
2089
2089
 
2090
2090
  ## Workflow
2091
+
2092
+ Task description: $ARGUMENTS
2093
+
2091
2094
  1. Create a new bead file with unique ID
2092
2095
  2. Add task description, status, and notes
2093
2096
  3. Set status to "in-progress"
@@ -2107,6 +2110,9 @@ var DEFAULT_COMMANDS = [
2107
2110
  content: `Create a comprehensive plan before implementation.
2108
2111
 
2109
2112
  ## Workflow
2113
+
2114
+ Feature or task to plan: $ARGUMENTS
2115
+
2110
2116
  1. UNDERSTAND: Clarify requirements through Socratic questioning
2111
2117
  2. RESEARCH: Check existing patterns and dependencies
2112
2118
  3. BREAK DOWN: Create 2-5 minute sub-tasks with:
@@ -2146,6 +2152,9 @@ Brief description of the goal.
2146
2152
  content: `Implement a task following TDD principles.
2147
2153
 
2148
2154
  ## Workflow
2155
+
2156
+ Task reference or description: $ARGUMENTS
2157
+
2149
2158
  1. LOAD: Get task details from .beads/ or plan
2150
2159
  2. TEST: Write failing tests first (RED)
2151
2160
  3. IMPLEMENT: Write minimal code to pass (GREEN)
@@ -2243,6 +2252,8 @@ Before marking complete:
2243
2252
 
2244
2253
  ## Workflow
2245
2254
 
2255
+ Task description: $ARGUMENTS
2256
+
2246
2257
  **Phase 1: Requirements Gathering**
2247
2258
  - Interactive selection of task type (Feature, Bug Fix, Refactoring, etc.)
2248
2259
  - Scope clarification
@@ -2330,7 +2341,10 @@ Before marking complete:
2330
2341
  content: `Quick fix with minimal ceremony.
2331
2342
 
2332
2343
  ## Workflow
2333
- 1. Identify the issue
2344
+
2345
+ Issue description: $ARGUMENTS
2346
+
2347
+ 1. Identify issue
2334
2348
  2. Make minimal change to fix
2335
2349
  3. Verify fix works
2336
2350
  4. Run affected tests`
@@ -2344,6 +2358,9 @@ Before marking complete:
2344
2358
  content: `Fix TypeScript type errors systematically.
2345
2359
 
2346
2360
  ## Workflow
2361
+
2362
+ Optional file argument: $ARGUMENTS
2363
+
2347
2364
  1. Run \`npm run typecheck\`
2348
2365
  2. Parse error output
2349
2366
  3. Fix each error in dependency order
@@ -2376,6 +2393,9 @@ Before marking complete:
2376
2393
  content: `Create a conventional commit.
2377
2394
 
2378
2395
  ## Workflow
2396
+
2397
+ Optional commit message: $ARGUMENTS
2398
+
2379
2399
  1. Stage changes: \`git add -A\`
2380
2400
  2. Generate commit message following conventional commits:
2381
2401
  - feat: New feature
@@ -2395,6 +2415,9 @@ Before marking complete:
2395
2415
  content: `Create a pull request with proper description.
2396
2416
 
2397
2417
  ## Workflow
2418
+
2419
+ Optional PR title: $ARGUMENTS
2420
+
2398
2421
  1. Push current branch
2399
2422
  2. Generate PR description:
2400
2423
  - Summary of changes
@@ -2413,6 +2436,9 @@ Before marking complete:
2413
2436
  content: `Conduct thorough research and document findings.
2414
2437
 
2415
2438
  ## Workflow
2439
+
2440
+ Research topic: $ARGUMENTS
2441
+
2416
2442
  1. Search documentation and resources
2417
2443
  2. Find code examples and patterns
2418
2444
  3. Evaluate options and trade-offs
@@ -2450,6 +2476,9 @@ Before marking complete:
2450
2476
  content: `Review codebase for quality issues.
2451
2477
 
2452
2478
  ## Workflow
2479
+
2480
+ Optional path: $ARGUMENTS
2481
+
2453
2482
  1. Check code quality metrics
2454
2483
  2. Identify:
2455
2484
  - Code smells
@@ -2469,6 +2498,9 @@ Before marking complete:
2469
2498
  content: `Design a feature with thorough planning.
2470
2499
 
2471
2500
  ## Workflow
2501
+
2502
+ Feature to design: $ARGUMENTS
2503
+
2472
2504
  1. Requirements gathering (Socratic questioning)
2473
2505
  2. Research existing solutions
2474
2506
  3. Design options with trade-offs
@@ -2490,7 +2522,10 @@ Before marking complete:
2490
2522
  content: `Collaborative brainstorming session.
2491
2523
 
2492
2524
  ## Workflow
2493
- 1. Define the problem clearly
2525
+
2526
+ Problem to brainstorm: $ARGUMENTS
2527
+
2528
+ 1. Define problem clearly
2494
2529
  2. Generate diverse ideas (no judgement)
2495
2530
  3. Group related ideas
2496
2531
  4. Evaluate feasibility
@@ -2506,6 +2541,9 @@ Before marking complete:
2506
2541
  content: `Create and switch to a new branch.
2507
2542
 
2508
2543
  ## Workflow
2544
+
2545
+ Branch name: $ARGUMENTS
2546
+
2509
2547
  1. Ensure clean working directory
2510
2548
  2. Pull latest main/master
2511
2549
  3. Create branch with naming convention:
@@ -2524,6 +2562,9 @@ Before marking complete:
2524
2562
  content: `Merge current branch to target.
2525
2563
 
2526
2564
  ## Workflow
2565
+
2566
+ Optional target branch: $ARGUMENTS
2567
+
2527
2568
  1. Run quality gates first
2528
2569
  2. Commit any pending changes
2529
2570
  3. Switch to target branch
@@ -2714,6 +2755,9 @@ The analysis will be saved automatically for later reference.`
2714
2755
  content: `Refactor code following best practices.
2715
2756
 
2716
2757
  ## Workflow
2758
+
2759
+ Optional file or pattern: $ARGUMENTS
2760
+
2717
2761
  1. Ensure tests are in place
2718
2762
  2. Identify refactoring opportunities
2719
2763
  3. Apply refactoring incrementally
@@ -2729,6 +2773,9 @@ The analysis will be saved automatically for later reference.`
2729
2773
  content: `Run test suite and display results.
2730
2774
 
2731
2775
  ## Workflow
2776
+
2777
+ Optional pattern: $ARGUMENTS
2778
+
2732
2779
  1. Run test command: \`npm run test\`
2733
2780
  2. Parse and display results
2734
2781
  3. Show coverage if available
@@ -2744,6 +2791,9 @@ The analysis will be saved automatically for later reference.`
2744
2791
  content: `Run linter and optionally fix issues.
2745
2792
 
2746
2793
  ## Workflow
2794
+
2795
+ Optional flags: $ARGUMENTS
2796
+
2747
2797
  1. Run linter: \`npm run lint\`
2748
2798
  2. Parse errors and warnings
2749
2799
  3. If --fix flag, run auto-fix
@@ -2759,6 +2809,9 @@ The analysis will be saved automatically for later reference.`
2759
2809
  content: `Deploy application with quality checks.
2760
2810
 
2761
2811
  ## Workflow
2812
+
2813
+ Optional environment: $ARGUMENTS
2814
+
2762
2815
  1. Run quality gates (test, lint, build)
2763
2816
  2. Check for uncommitted changes
2764
2817
  3. Build production bundle
@@ -2774,6 +2827,9 @@ The analysis will be saved automatically for later reference.`
2774
2827
  content: `Rollback to previous version.
2775
2828
 
2776
2829
  ## Workflow
2830
+
2831
+ Optional version: $ARGUMENTS
2832
+
2777
2833
  1. Identify current version
2778
2834
  2. List available versions
2779
2835
  3. Confirm rollback target
@@ -2789,6 +2845,9 @@ The analysis will be saved automatically for later reference.`
2789
2845
  content: `View and filter application logs.
2790
2846
 
2791
2847
  ## Workflow
2848
+
2849
+ Optional flags: $ARGUMENTS
2850
+
2792
2851
  1. Determine log location
2793
2852
  2. Apply filters if specified
2794
2853
  3. Display logs
@@ -2893,8 +2952,13 @@ Describe what this command does.
2893
2952
  /**
2894
2953
  * Format command for agent consumption
2895
2954
  */
2896
- formatForAgent(command) {
2897
- return `# Command: /${command.name}
2955
+ formatForAgent(command, args) {
2956
+ let content = command.content;
2957
+ if (args && args.trim()) {
2958
+ const argParts = args.trim().split(/\s+/);
2959
+ content = content.replace(/\$ARGUMENTS/g, args.trim()).replace(/\$1/g, argParts[0] || "").replace(/\$2/g, argParts[1] || "").replace(/\$3/g, argParts[2] || "").replace(/\$4/g, argParts[3] || "").replace(/\$5/g, argParts[4] || "");
2960
+ }
2961
+ let output = `# Command: /${command.name}
2898
2962
 
2899
2963
  ## Usage
2900
2964
  \`${command.usage}\`
@@ -2906,8 +2970,14 @@ ${command.description}
2906
2970
  ${command.examples.map((e) => `- \`${e}\``).join("\n")}
2907
2971
 
2908
2972
  ## Workflow
2909
- ${command.content}
2973
+ ${content}
2974
+ `;
2975
+ if (args && args.trim()) {
2976
+ output += `
2977
+ User arguments are : ${args.trim()}
2910
2978
  `;
2979
+ }
2980
+ return output;
2911
2981
  }
2912
2982
  /**
2913
2983
  * Load commands from directory (recursively)
@@ -4196,7 +4266,7 @@ var AiKitMcpServer = class {
4196
4266
  const commands = await this.commandRunner.listCommands();
4197
4267
  for (const cmd of commands) {
4198
4268
  tools.push({
4199
- name: `cmd_${cmd.name.replace(/\//g, "_").slice(1)}`,
4269
+ name: `cmd_${cmd.name}`,
4200
4270
  description: `Run command: ${cmd.description}`,
4201
4271
  inputSchema: {
4202
4272
  type: "object",
@@ -4291,9 +4361,14 @@ var AiKitMcpServer = class {
4291
4361
 
4292
4362
  Reasoning: ${decision.reason}`;
4293
4363
  } else if (name.startsWith("cmd_")) {
4294
- const cmdName = "/" + name.replace("cmd_", "").replace(/_/g, "/");
4364
+ const cmdName = name.replace("cmd_", "");
4295
4365
  const cmdArgs = args?.args || "";
4296
- result = `Execute: ${cmdName} ${cmdArgs}`;
4366
+ const command = await this.commandRunner.getCommand(cmdName);
4367
+ if (command) {
4368
+ result = this.commandRunner.formatForAgent(command, cmdArgs);
4369
+ } else {
4370
+ result = `Command not found: ${cmdName}`;
4371
+ }
4297
4372
  } else if (name.startsWith("tool_")) {
4298
4373
  const toolName = name.replace("tool_", "");
4299
4374
  try {