@tdsoft-tech/aikit 0.1.14 → 0.1.15

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,11 @@ var DEFAULT_COMMANDS = [
2360
2360
  content: `Create a new task in the Beads system (.beads/ directory).
2361
2361
 
2362
2362
  ## Workflow
2363
+
2364
+ **Step 0: Use Provided Arguments**
2365
+ IMPORTANT: Look at the "Arguments Provided" section below. The user has provided the task description with this command. Use it directly - do NOT ask the user for a task description!
2366
+ - The arguments contain the task description you should create
2367
+
2363
2368
  1. Create a new bead file with unique ID
2364
2369
  2. Add task description, status, and notes
2365
2370
  3. Set status to "in-progress"
@@ -2379,6 +2384,11 @@ var DEFAULT_COMMANDS = [
2379
2384
  content: `Create a comprehensive plan before implementation.
2380
2385
 
2381
2386
  ## Workflow
2387
+
2388
+ **Step 0: Use Provided Arguments**
2389
+ IMPORTANT: Look at the "Arguments Provided" section below. The user has provided the feature or task to plan. Use it directly - do NOT ask the user what to plan!
2390
+ - The arguments contain the feature/task description you should create a plan for
2391
+
2382
2392
  1. UNDERSTAND: Clarify requirements through Socratic questioning
2383
2393
  2. RESEARCH: Check existing patterns and dependencies
2384
2394
  3. BREAK DOWN: Create 2-5 minute sub-tasks with:
@@ -2418,6 +2428,11 @@ Brief description of the goal.
2418
2428
  content: `Implement a task following TDD principles.
2419
2429
 
2420
2430
  ## Workflow
2431
+
2432
+ **Step 0: Use Provided Arguments**
2433
+ IMPORTANT: Look at the "Arguments Provided" section below. The user has provided the task reference or description. Use it directly - do NOT ask the user which task to implement!
2434
+ - The arguments contain the task reference (e.g., task-001) or task description to implement
2435
+
2421
2436
  1. LOAD: Get task details from .beads/ or plan
2422
2437
  2. TEST: Write failing tests first (RED)
2423
2438
  3. IMPLEMENT: Write minimal code to pass (GREEN)
@@ -2515,6 +2530,10 @@ Before marking complete:
2515
2530
 
2516
2531
  ## Workflow
2517
2532
 
2533
+ **Step 0: Use Provided Arguments**
2534
+ IMPORTANT: Look at the "Arguments Provided" section below. The user has provided the task description. Use it directly - do NOT ask the user what task to perform!
2535
+ - The arguments contain the task description to execute
2536
+
2518
2537
  **Phase 1: Requirements Gathering**
2519
2538
  - Interactive selection of task type (Feature, Bug Fix, Refactoring, etc.)
2520
2539
  - Scope clarification
@@ -2602,7 +2621,12 @@ Before marking complete:
2602
2621
  content: `Quick fix with minimal ceremony.
2603
2622
 
2604
2623
  ## Workflow
2605
- 1. Identify the issue
2624
+
2625
+ **Step 0: Use Provided Arguments**
2626
+ IMPORTANT: Look at the "Arguments Provided" section below. The user has provided the issue description. Use it directly - do NOT ask user what to fix!
2627
+ - The arguments contain the issue description you should fix
2628
+
2629
+ 1. Identify issue
2606
2630
  2. Make minimal change to fix
2607
2631
  3. Verify fix works
2608
2632
  4. Run affected tests`
@@ -2616,6 +2640,12 @@ Before marking complete:
2616
2640
  content: `Fix TypeScript type errors systematically.
2617
2641
 
2618
2642
  ## Workflow
2643
+
2644
+ **Step 0: Use Provided Arguments**
2645
+ IMPORTANT: Look at the "Arguments Provided" section below. The user has provided optional file argument. Use it if provided!
2646
+ - If a file argument is provided, focus on fixing types in that specific file
2647
+ - If no file argument is provided, fix all type errors in the project
2648
+
2619
2649
  1. Run \`npm run typecheck\`
2620
2650
  2. Parse error output
2621
2651
  3. Fix each error in dependency order
@@ -2648,6 +2678,12 @@ Before marking complete:
2648
2678
  content: `Create a conventional commit.
2649
2679
 
2650
2680
  ## Workflow
2681
+
2682
+ **Step 0: Use Provided Arguments**
2683
+ IMPORTANT: Look at the "Arguments Provided" section below. The user may have provided a commit message. Use it if provided!
2684
+ - If a commit message is provided, use that message directly
2685
+ - If no message is provided, generate a conventional commit message based on changes
2686
+
2651
2687
  1. Stage changes: \`git add -A\`
2652
2688
  2. Generate commit message following conventional commits:
2653
2689
  - feat: New feature
@@ -2667,6 +2703,12 @@ Before marking complete:
2667
2703
  content: `Create a pull request with proper description.
2668
2704
 
2669
2705
  ## Workflow
2706
+
2707
+ **Step 0: Use Provided Arguments**
2708
+ IMPORTANT: Look at the "Arguments Provided" section below. The user may have provided a PR title. Use it if provided!
2709
+ - If a title is provided, use that as the PR title
2710
+ - If no title is provided, generate a title based on changes
2711
+
2670
2712
  1. Push current branch
2671
2713
  2. Generate PR description:
2672
2714
  - Summary of changes
@@ -2685,6 +2727,11 @@ Before marking complete:
2685
2727
  content: `Conduct thorough research and document findings.
2686
2728
 
2687
2729
  ## Workflow
2730
+
2731
+ **Step 0: Use Provided Arguments**
2732
+ IMPORTANT: Look at the "Arguments Provided" section below. The user has provided the research topic. Use it directly - do NOT ask user what to research!
2733
+ - The arguments contain the topic you should research
2734
+
2688
2735
  1. Search documentation and resources
2689
2736
  2. Find code examples and patterns
2690
2737
  3. Evaluate options and trade-offs
@@ -2722,6 +2769,12 @@ Before marking complete:
2722
2769
  content: `Review codebase for quality issues.
2723
2770
 
2724
2771
  ## Workflow
2772
+
2773
+ **Step 0: Use Provided Arguments**
2774
+ IMPORTANT: Look at the "Arguments Provided" section below. The user may have provided a path. Use it if provided!
2775
+ - If a path is provided, review code in that specific directory
2776
+ - If no path is provided, review the entire codebase
2777
+
2725
2778
  1. Check code quality metrics
2726
2779
  2. Identify:
2727
2780
  - Code smells
@@ -2741,6 +2794,11 @@ Before marking complete:
2741
2794
  content: `Design a feature with thorough planning.
2742
2795
 
2743
2796
  ## Workflow
2797
+
2798
+ **Step 0: Use Provided Arguments**
2799
+ IMPORTANT: Look at the "Arguments Provided" section below. The user has provided the feature to design. Use it directly - do NOT ask user what to design!
2800
+ - The arguments contain the feature you should design
2801
+
2744
2802
  1. Requirements gathering (Socratic questioning)
2745
2803
  2. Research existing solutions
2746
2804
  3. Design options with trade-offs
@@ -2762,7 +2820,12 @@ Before marking complete:
2762
2820
  content: `Collaborative brainstorming session.
2763
2821
 
2764
2822
  ## Workflow
2765
- 1. Define the problem clearly
2823
+
2824
+ **Step 0: Use Provided Arguments**
2825
+ IMPORTANT: Look at the "Arguments Provided" section below. The user has provided a problem. Use it directly - do NOT ask the user what to brainstorm about!
2826
+ - The arguments contain the problem you should brainstorm ideas for
2827
+
2828
+ 1. Define problem clearly
2766
2829
  2. Generate diverse ideas (no judgement)
2767
2830
  3. Group related ideas
2768
2831
  4. Evaluate feasibility
@@ -2778,6 +2841,11 @@ Before marking complete:
2778
2841
  content: `Create and switch to a new branch.
2779
2842
 
2780
2843
  ## Workflow
2844
+
2845
+ **Step 0: Use Provided Arguments**
2846
+ IMPORTANT: Look at the "Arguments Provided" section below. The user has provided the branch name. Use it directly - do NOT ask user what to name the branch!
2847
+ - The arguments contain the branch name to create
2848
+
2781
2849
  1. Ensure clean working directory
2782
2850
  2. Pull latest main/master
2783
2851
  3. Create branch with naming convention:
@@ -2796,6 +2864,12 @@ Before marking complete:
2796
2864
  content: `Merge current branch to target.
2797
2865
 
2798
2866
  ## Workflow
2867
+
2868
+ **Step 0: Use Provided Arguments**
2869
+ IMPORTANT: Look at the "Arguments Provided" section below. The user may have provided a target branch. Use it if provided!
2870
+ - If a target branch is provided, merge to that branch
2871
+ - If no target is provided, default to merging to main/master
2872
+
2799
2873
  1. Run quality gates first
2800
2874
  2. Commit any pending changes
2801
2875
  3. Switch to target branch
@@ -2986,6 +3060,12 @@ The analysis will be saved automatically for later reference.`
2986
3060
  content: `Refactor code following best practices.
2987
3061
 
2988
3062
  ## Workflow
3063
+
3064
+ **Step 0: Use Provided Arguments**
3065
+ IMPORTANT: Look at the "Arguments Provided" section below. The user has provided optional file or pattern argument. Use it if provided!
3066
+ - If a file/pattern argument is provided, focus refactoring on that specific target
3067
+ - If no argument is provided, identify refactoring opportunities across the codebase
3068
+
2989
3069
  1. Ensure tests are in place
2990
3070
  2. Identify refactoring opportunities
2991
3071
  3. Apply refactoring incrementally
@@ -3001,6 +3081,12 @@ The analysis will be saved automatically for later reference.`
3001
3081
  content: `Run test suite and display results.
3002
3082
 
3003
3083
  ## Workflow
3084
+
3085
+ **Step 0: Use Provided Arguments**
3086
+ IMPORTANT: Look at the "Arguments Provided" section below. The user has provided optional pattern argument. Use it if provided!
3087
+ - If a pattern argument is provided, run tests matching that pattern
3088
+ - If no argument is provided, run the full test suite
3089
+
3004
3090
  1. Run test command: \`npm run test\`
3005
3091
  2. Parse and display results
3006
3092
  3. Show coverage if available
@@ -3016,6 +3102,12 @@ The analysis will be saved automatically for later reference.`
3016
3102
  content: `Run linter and optionally fix issues.
3017
3103
 
3018
3104
  ## Workflow
3105
+
3106
+ **Step 0: Use Provided Arguments**
3107
+ IMPORTANT: Look at the "Arguments Provided" section below. The user may have provided --fix flag. Check for it!
3108
+ - If --fix flag is provided, automatically fix issues
3109
+ - If no --fix flag is provided, only report issues without fixing
3110
+
3019
3111
  1. Run linter: \`npm run lint\`
3020
3112
  2. Parse errors and warnings
3021
3113
  3. If --fix flag, run auto-fix
@@ -3031,6 +3123,12 @@ The analysis will be saved automatically for later reference.`
3031
3123
  content: `Deploy application with quality checks.
3032
3124
 
3033
3125
  ## Workflow
3126
+
3127
+ **Step 0: Use Provided Arguments**
3128
+ IMPORTANT: Look at the "Arguments Provided" section below. The user may have provided an environment. Use it if provided!
3129
+ - If an environment is provided, deploy to that environment
3130
+ - If no environment is provided, default to production or prompt user
3131
+
3034
3132
  1. Run quality gates (test, lint, build)
3035
3133
  2. Check for uncommitted changes
3036
3134
  3. Build production bundle
@@ -3046,6 +3144,12 @@ The analysis will be saved automatically for later reference.`
3046
3144
  content: `Rollback to previous version.
3047
3145
 
3048
3146
  ## Workflow
3147
+
3148
+ **Step 0: Use Provided Arguments**
3149
+ IMPORTANT: Look at the "Arguments Provided" section below. The user may have provided a version. Use it if provided!
3150
+ - If a version is provided, rollback to that specific version
3151
+ - If no version is provided, list available versions and prompt user
3152
+
3049
3153
  1. Identify current version
3050
3154
  2. List available versions
3051
3155
  3. Confirm rollback target
@@ -3061,6 +3165,13 @@ The analysis will be saved automatically for later reference.`
3061
3165
  content: `View and filter application logs.
3062
3166
 
3063
3167
  ## Workflow
3168
+
3169
+ **Step 0: Use Provided Arguments**
3170
+ IMPORTANT: Look at the "Arguments Provided" section below. The user may have provided flags. Check for them!
3171
+ - If --tail N is provided, show only the last N lines
3172
+ - If --follow is provided, stream live log updates
3173
+ - If no flags are provided, show standard log output
3174
+
3064
3175
  1. Determine log location
3065
3176
  2. Apply filters if specified
3066
3177
  3. Display logs
@@ -3165,8 +3276,8 @@ Describe what this command does.
3165
3276
  /**
3166
3277
  * Format command for agent consumption
3167
3278
  */
3168
- formatForAgent(command) {
3169
- return `# Command: /${command.name}
3279
+ formatForAgent(command, args) {
3280
+ let output = `# Command: /${command.name}
3170
3281
 
3171
3282
  ## Usage
3172
3283
  \`${command.usage}\`
@@ -3180,6 +3291,15 @@ ${command.examples.map((e) => `- \`${e}\``).join("\n")}
3180
3291
  ## Workflow
3181
3292
  ${command.content}
3182
3293
  `;
3294
+ if (args && args.trim()) {
3295
+ output += `
3296
+ ## Arguments Provided
3297
+ \`${args}\`
3298
+
3299
+ **IMPORTANT**: The user provided these arguments with the command. Use them in the workflow as needed.
3300
+ `;
3301
+ }
3302
+ return output;
3183
3303
  }
3184
3304
  /**
3185
3305
  * Load commands from directory (recursively)
@@ -5083,8 +5203,8 @@ async function installToOpenCode(_opencodePath) {
5083
5203
  const skills = await skillEngine.listSkills();
5084
5204
  const commands = await commandRunner.listCommands();
5085
5205
  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.
5206
+ const skillsList = skills.map((s) => `| \`/ak_sk_${s.name.replace(/\s+/g, "-")}\` | ${s.description} |`).join("\n");
5207
+ opencodeCommands["ak_cm_skills"] = `List all available AIKit skills and how to use them.
5088
5208
 
5089
5209
  READ .aikit/AGENTS.md
5090
5210
 
@@ -5094,9 +5214,9 @@ READ .aikit/AGENTS.md
5094
5214
  |---------|-------------|
5095
5215
  ${skillsList}
5096
5216
 
5097
- Type any command to use that skill. For example: \`/test-driven-development\` or \`/tdd\`.`;
5217
+ Type any command to use that skill. For example: \`/ak_sk_test-driven-development\``;
5098
5218
  for (const skill of skills) {
5099
- const commandName = skill.name.replace(/\s+/g, "-").toLowerCase();
5219
+ const commandName = `ak_sk_${skill.name.replace(/\s+/g, "-").toLowerCase()}`;
5100
5220
  const skillPath = skill.filePath;
5101
5221
  const relativePath = skillPath.startsWith(projectPath) ? skillPath.replace(projectPath, "").replace(/\\/g, "/").replace(/^\//, "") : `.aikit/skills/${skill.name.replace(/\s+/g, "-").toLowerCase()}.md`;
5102
5222
  const useWhen = skill.useWhen || `The user asks you to ${skill.name}`;
@@ -5118,22 +5238,46 @@ Complete the checklist at the end of the skill.`;
5118
5238
  }
5119
5239
  for (const cmd of commands) {
5120
5240
  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");
5241
+ const commandName = `ak_cm_${cmd.name.replace(/\//g, "").replace(/\s+/g, "-")}`;
5242
+ const examples = cmd.examples.map((e) => {
5243
+ const prefixed = e.replace(/\//g, "/ak_cm_");
5244
+ return `- \`${prefixed}\``;
5245
+ }).join("\n");
5123
5246
  if (cmd.name === "analyze-figma") {
5124
5247
  opencodeCommands[commandName] = generateAnalyzeFigmaCommand();
5125
5248
  } else {
5126
- opencodeCommands[commandName] = `# Command: /${cmd.name}
5249
+ opencodeCommands[commandName] = `# Command: /ak_cm_${cmd.name}
5127
5250
 
5128
5251
  ## Description
5129
5252
  ${cmd.description}
5130
5253
 
5131
5254
  ## Usage
5132
- \`${cmd.usage}\`
5255
+ \`${cmd.usage.replace(/\//g, "/ak_cm_")}\`
5133
5256
 
5134
5257
  ## Examples
5135
5258
  ${examples}
5136
5259
 
5260
+ ## \u26A0\uFE0F CRITICAL: The User Has Already Provided Arguments!
5261
+
5262
+ **The user has provided arguments with this command!**
5263
+
5264
+ The arguments are available in this command response - look at the command workflow below, which now includes explicit instructions to use the provided arguments.
5265
+
5266
+ **YOUR JOB**:
5267
+ 1. Follow the command workflow steps
5268
+ 2. The workflow will tell you to look at "Arguments Provided" section
5269
+ 3. Use those arguments - do NOT ask the user for this information!
5270
+ 4. They have already provided it - extract and use it!
5271
+
5272
+ **Example Scenario**:
5273
+ - User runs: \`/ak_cm_${cmd.name} snake game with html & css\`
5274
+ - Command: \`/ak_cm_${cmd.name}\`
5275
+ - Arguments to use: \`snake game with html & css\`
5276
+ - You must use "snake game with html & css" as provided in the workflow!
5277
+
5278
+ **DO NOT**: Ask "Please provide a task description"
5279
+ **DO**: Follow the workflow and use the arguments provided in it!
5280
+
5137
5281
  ## Workflow
5138
5282
  ${cmd.content}
5139
5283
 
@@ -5152,8 +5296,8 @@ Created ${count} OpenCode commands in .opencode/command/`);
5152
5296
  await configureMcpServer(projectPath);
5153
5297
  logger.info("\nUsage in OpenCode:");
5154
5298
  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`);
5299
+ logger.info(" Or type /ak_cm_skills to see all available skills");
5300
+ logger.info(` Available: ${skills.length} skills (ak_sk_*), ${commands.length} commands (ak_cm_*)`);
5157
5301
  logger.info(" MCP server configured - tools available via MCP protocol");
5158
5302
  }
5159
5303
  function groupBy(array, keyFn) {