@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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.15] - 2026-01-01
4
+
5
+ ### Breaking Changes ⚠️
6
+ - 🏷️ **Command & Skill Prefix Separation** - All OpenCode commands now use prefixes to distinguish type:
7
+ - Commands: `/ak_cm_<name>` (e.g., `/ak_cm_plan`, `/ak_cm_implement`, `/ak_cm_fix`)
8
+ - Skills: `/ak_sk_<name>` (e.g., `/ak_sk_test-driven-development`, `/ak_sk_code-review`)
9
+ - Old simple names (e.g., `/plan`, `/test-driven-development`) are **no longer supported**
10
+ - Users must press `/` in OpenCode to see new prefixed commands
11
+ - All documentation updated with new command names
12
+
13
+ ### Added
14
+ - Clear visual distinction between commands and skills in OpenCode command picker
15
+ - New naming convention: `ak_cm_*` for commands, `ak_sk_*` for skills
16
+ - Updated all 28 commands and 23 skills with new prefixes
17
+
18
+ ### Migration Guide
19
+ 1. Run `aikit install` to generate new prefixed commands
20
+ 2. Press `/` in OpenCode to see new command structure
21
+ 3. Use `/ak_cm_` prefix for all slash commands
22
+ 4. Use `/ak_sk_` prefix for direct skill invocation
23
+
3
24
  ## [0.1.12] - 2024-12-28
4
25
 
5
26
  ### Added
package/dist/cli.js CHANGED
@@ -2360,6 +2360,9 @@ var DEFAULT_COMMANDS = [
2360
2360
  content: `Create a new task in the Beads system (.beads/ directory).
2361
2361
 
2362
2362
  ## Workflow
2363
+
2364
+ Task description: $ARGUMENTS
2365
+
2363
2366
  1. Create a new bead file with unique ID
2364
2367
  2. Add task description, status, and notes
2365
2368
  3. Set status to "in-progress"
@@ -2379,6 +2382,9 @@ var DEFAULT_COMMANDS = [
2379
2382
  content: `Create a comprehensive plan before implementation.
2380
2383
 
2381
2384
  ## Workflow
2385
+
2386
+ Feature or task to plan: $ARGUMENTS
2387
+
2382
2388
  1. UNDERSTAND: Clarify requirements through Socratic questioning
2383
2389
  2. RESEARCH: Check existing patterns and dependencies
2384
2390
  3. BREAK DOWN: Create 2-5 minute sub-tasks with:
@@ -2418,6 +2424,9 @@ Brief description of the goal.
2418
2424
  content: `Implement a task following TDD principles.
2419
2425
 
2420
2426
  ## Workflow
2427
+
2428
+ Task reference or description: $ARGUMENTS
2429
+
2421
2430
  1. LOAD: Get task details from .beads/ or plan
2422
2431
  2. TEST: Write failing tests first (RED)
2423
2432
  3. IMPLEMENT: Write minimal code to pass (GREEN)
@@ -2515,6 +2524,8 @@ Before marking complete:
2515
2524
 
2516
2525
  ## Workflow
2517
2526
 
2527
+ Task description: $ARGUMENTS
2528
+
2518
2529
  **Phase 1: Requirements Gathering**
2519
2530
  - Interactive selection of task type (Feature, Bug Fix, Refactoring, etc.)
2520
2531
  - Scope clarification
@@ -2602,7 +2613,10 @@ Before marking complete:
2602
2613
  content: `Quick fix with minimal ceremony.
2603
2614
 
2604
2615
  ## Workflow
2605
- 1. Identify the issue
2616
+
2617
+ Issue description: $ARGUMENTS
2618
+
2619
+ 1. Identify issue
2606
2620
  2. Make minimal change to fix
2607
2621
  3. Verify fix works
2608
2622
  4. Run affected tests`
@@ -2616,6 +2630,9 @@ Before marking complete:
2616
2630
  content: `Fix TypeScript type errors systematically.
2617
2631
 
2618
2632
  ## Workflow
2633
+
2634
+ Optional file argument: $ARGUMENTS
2635
+
2619
2636
  1. Run \`npm run typecheck\`
2620
2637
  2. Parse error output
2621
2638
  3. Fix each error in dependency order
@@ -2648,6 +2665,9 @@ Before marking complete:
2648
2665
  content: `Create a conventional commit.
2649
2666
 
2650
2667
  ## Workflow
2668
+
2669
+ Optional commit message: $ARGUMENTS
2670
+
2651
2671
  1. Stage changes: \`git add -A\`
2652
2672
  2. Generate commit message following conventional commits:
2653
2673
  - feat: New feature
@@ -2667,6 +2687,9 @@ Before marking complete:
2667
2687
  content: `Create a pull request with proper description.
2668
2688
 
2669
2689
  ## Workflow
2690
+
2691
+ Optional PR title: $ARGUMENTS
2692
+
2670
2693
  1. Push current branch
2671
2694
  2. Generate PR description:
2672
2695
  - Summary of changes
@@ -2685,6 +2708,9 @@ Before marking complete:
2685
2708
  content: `Conduct thorough research and document findings.
2686
2709
 
2687
2710
  ## Workflow
2711
+
2712
+ Research topic: $ARGUMENTS
2713
+
2688
2714
  1. Search documentation and resources
2689
2715
  2. Find code examples and patterns
2690
2716
  3. Evaluate options and trade-offs
@@ -2722,6 +2748,9 @@ Before marking complete:
2722
2748
  content: `Review codebase for quality issues.
2723
2749
 
2724
2750
  ## Workflow
2751
+
2752
+ Optional path: $ARGUMENTS
2753
+
2725
2754
  1. Check code quality metrics
2726
2755
  2. Identify:
2727
2756
  - Code smells
@@ -2741,6 +2770,9 @@ Before marking complete:
2741
2770
  content: `Design a feature with thorough planning.
2742
2771
 
2743
2772
  ## Workflow
2773
+
2774
+ Feature to design: $ARGUMENTS
2775
+
2744
2776
  1. Requirements gathering (Socratic questioning)
2745
2777
  2. Research existing solutions
2746
2778
  3. Design options with trade-offs
@@ -2762,7 +2794,10 @@ Before marking complete:
2762
2794
  content: `Collaborative brainstorming session.
2763
2795
 
2764
2796
  ## Workflow
2765
- 1. Define the problem clearly
2797
+
2798
+ Problem to brainstorm: $ARGUMENTS
2799
+
2800
+ 1. Define problem clearly
2766
2801
  2. Generate diverse ideas (no judgement)
2767
2802
  3. Group related ideas
2768
2803
  4. Evaluate feasibility
@@ -2778,6 +2813,9 @@ Before marking complete:
2778
2813
  content: `Create and switch to a new branch.
2779
2814
 
2780
2815
  ## Workflow
2816
+
2817
+ Branch name: $ARGUMENTS
2818
+
2781
2819
  1. Ensure clean working directory
2782
2820
  2. Pull latest main/master
2783
2821
  3. Create branch with naming convention:
@@ -2796,6 +2834,9 @@ Before marking complete:
2796
2834
  content: `Merge current branch to target.
2797
2835
 
2798
2836
  ## Workflow
2837
+
2838
+ Optional target branch: $ARGUMENTS
2839
+
2799
2840
  1. Run quality gates first
2800
2841
  2. Commit any pending changes
2801
2842
  3. Switch to target branch
@@ -2986,6 +3027,9 @@ The analysis will be saved automatically for later reference.`
2986
3027
  content: `Refactor code following best practices.
2987
3028
 
2988
3029
  ## Workflow
3030
+
3031
+ Optional file or pattern: $ARGUMENTS
3032
+
2989
3033
  1. Ensure tests are in place
2990
3034
  2. Identify refactoring opportunities
2991
3035
  3. Apply refactoring incrementally
@@ -3001,6 +3045,9 @@ The analysis will be saved automatically for later reference.`
3001
3045
  content: `Run test suite and display results.
3002
3046
 
3003
3047
  ## Workflow
3048
+
3049
+ Optional pattern: $ARGUMENTS
3050
+
3004
3051
  1. Run test command: \`npm run test\`
3005
3052
  2. Parse and display results
3006
3053
  3. Show coverage if available
@@ -3016,6 +3063,9 @@ The analysis will be saved automatically for later reference.`
3016
3063
  content: `Run linter and optionally fix issues.
3017
3064
 
3018
3065
  ## Workflow
3066
+
3067
+ Optional flags: $ARGUMENTS
3068
+
3019
3069
  1. Run linter: \`npm run lint\`
3020
3070
  2. Parse errors and warnings
3021
3071
  3. If --fix flag, run auto-fix
@@ -3031,6 +3081,9 @@ The analysis will be saved automatically for later reference.`
3031
3081
  content: `Deploy application with quality checks.
3032
3082
 
3033
3083
  ## Workflow
3084
+
3085
+ Optional environment: $ARGUMENTS
3086
+
3034
3087
  1. Run quality gates (test, lint, build)
3035
3088
  2. Check for uncommitted changes
3036
3089
  3. Build production bundle
@@ -3046,6 +3099,9 @@ The analysis will be saved automatically for later reference.`
3046
3099
  content: `Rollback to previous version.
3047
3100
 
3048
3101
  ## Workflow
3102
+
3103
+ Optional version: $ARGUMENTS
3104
+
3049
3105
  1. Identify current version
3050
3106
  2. List available versions
3051
3107
  3. Confirm rollback target
@@ -3061,6 +3117,9 @@ The analysis will be saved automatically for later reference.`
3061
3117
  content: `View and filter application logs.
3062
3118
 
3063
3119
  ## Workflow
3120
+
3121
+ Optional flags: $ARGUMENTS
3122
+
3064
3123
  1. Determine log location
3065
3124
  2. Apply filters if specified
3066
3125
  3. Display logs
@@ -3165,8 +3224,13 @@ Describe what this command does.
3165
3224
  /**
3166
3225
  * Format command for agent consumption
3167
3226
  */
3168
- formatForAgent(command) {
3169
- return `# Command: /${command.name}
3227
+ formatForAgent(command, args) {
3228
+ let content = command.content;
3229
+ if (args && args.trim()) {
3230
+ const argParts = args.trim().split(/\s+/);
3231
+ 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] || "");
3232
+ }
3233
+ let output = `# Command: /${command.name}
3170
3234
 
3171
3235
  ## Usage
3172
3236
  \`${command.usage}\`
@@ -3178,8 +3242,14 @@ ${command.description}
3178
3242
  ${command.examples.map((e) => `- \`${e}\``).join("\n")}
3179
3243
 
3180
3244
  ## Workflow
3181
- ${command.content}
3245
+ ${content}
3246
+ `;
3247
+ if (args && args.trim()) {
3248
+ output += `
3249
+ User arguments are : ${args.trim()}
3182
3250
  `;
3251
+ }
3252
+ return output;
3183
3253
  }
3184
3254
  /**
3185
3255
  * Load commands from directory (recursively)
@@ -5083,8 +5153,8 @@ async function installToOpenCode(_opencodePath) {
5083
5153
  const skills = await skillEngine.listSkills();
5084
5154
  const commands = await commandRunner.listCommands();
5085
5155
  const opencodeCommands = {};
5086
- const skillsList = skills.map((s) => `| \`/${s.name.replace(/\s+/g, "-")}\` | ${s.description} |`).join("\n");
5087
- opencodeCommands["skills"] = `List all available AIKit skills and how to use them.
5156
+ const skillsList = skills.map((s) => `| \`/ak_sk_${s.name.replace(/\s+/g, "-")}\` | ${s.description} |`).join("\n");
5157
+ opencodeCommands["ak_cm_skills"] = `List all available AIKit skills and how to use them.
5088
5158
 
5089
5159
  READ .aikit/AGENTS.md
5090
5160
 
@@ -5094,9 +5164,9 @@ READ .aikit/AGENTS.md
5094
5164
  |---------|-------------|
5095
5165
  ${skillsList}
5096
5166
 
5097
- Type any command to use that skill. For example: \`/test-driven-development\` or \`/tdd\`.`;
5167
+ Type any command to use that skill. For example: \`/ak_sk_test-driven-development\``;
5098
5168
  for (const skill of skills) {
5099
- const commandName = skill.name.replace(/\s+/g, "-").toLowerCase();
5169
+ const commandName = `ak_sk_${skill.name.replace(/\s+/g, "-").toLowerCase()}`;
5100
5170
  const skillPath = skill.filePath;
5101
5171
  const relativePath = skillPath.startsWith(projectPath) ? skillPath.replace(projectPath, "").replace(/\\/g, "/").replace(/^\//, "") : `.aikit/skills/${skill.name.replace(/\s+/g, "-").toLowerCase()}.md`;
5102
5172
  const useWhen = skill.useWhen || `The user asks you to ${skill.name}`;
@@ -5118,22 +5188,46 @@ Complete the checklist at the end of the skill.`;
5118
5188
  }
5119
5189
  for (const cmd of commands) {
5120
5190
  if (opencodeCommands[cmd.name]) continue;
5121
- const commandName = cmd.name.replace(/\//g, "").replace(/\s+/g, "-");
5122
- const examples = cmd.examples.map((e) => `- \`${e}\``).join("\n");
5191
+ const commandName = `ak_cm_${cmd.name.replace(/\//g, "").replace(/\s+/g, "-")}`;
5192
+ const examples = cmd.examples.map((e) => {
5193
+ const prefixed = e.replace(/\//g, "/ak_cm_");
5194
+ return `- \`${prefixed}\``;
5195
+ }).join("\n");
5123
5196
  if (cmd.name === "analyze-figma") {
5124
5197
  opencodeCommands[commandName] = generateAnalyzeFigmaCommand();
5125
5198
  } else {
5126
- opencodeCommands[commandName] = `# Command: /${cmd.name}
5199
+ opencodeCommands[commandName] = `# Command: /ak_cm_${cmd.name}
5127
5200
 
5128
5201
  ## Description
5129
5202
  ${cmd.description}
5130
5203
 
5131
5204
  ## Usage
5132
- \`${cmd.usage}\`
5205
+ \`${cmd.usage.replace(/\//g, "/ak_cm_")}\`
5133
5206
 
5134
5207
  ## Examples
5135
5208
  ${examples}
5136
5209
 
5210
+ ## \u26A0\uFE0F CRITICAL: The User Has Already Provided Arguments!
5211
+
5212
+ **The user has provided arguments with this command!**
5213
+
5214
+ The arguments are available in this command response - look at the command workflow below, which now includes explicit instructions to use the provided arguments.
5215
+
5216
+ **YOUR JOB**:
5217
+ 1. Follow the command workflow steps
5218
+ 2. The workflow will tell you to look at "Arguments Provided" section
5219
+ 3. Use those arguments - do NOT ask the user for this information!
5220
+ 4. They have already provided it - extract and use it!
5221
+
5222
+ **Example Scenario**:
5223
+ - User runs: \`/ak_cm_${cmd.name} snake game with html & css\`
5224
+ - Command: \`/ak_cm_${cmd.name}\`
5225
+ - Arguments to use: \`snake game with html & css\`
5226
+ - You must use "snake game with html & css" as provided in the workflow!
5227
+
5228
+ **DO NOT**: Ask "Please provide a task description"
5229
+ **DO**: Follow the workflow and use the arguments provided in it!
5230
+
5137
5231
  ## Workflow
5138
5232
  ${cmd.content}
5139
5233
 
@@ -5152,8 +5246,8 @@ Created ${count} OpenCode commands in .opencode/command/`);
5152
5246
  await configureMcpServer(projectPath);
5153
5247
  logger.info("\nUsage in OpenCode:");
5154
5248
  logger.info(" Press Ctrl+K to open command picker");
5155
- logger.info(" Or type /skills to see all available skills");
5156
- logger.info(` Available: ${skills.length} skills, ${commands.length} commands`);
5249
+ logger.info(" Or type /ak_cm_skills to see all available skills");
5250
+ logger.info(` Available: ${skills.length} skills (ak_sk_*), ${commands.length} commands (ak_cm_*)`);
5157
5251
  logger.info(" MCP server configured - tools available via MCP protocol");
5158
5252
  }
5159
5253
  function groupBy(array, keyFn) {