-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat: add Kimi CLI skills-only support #1003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
TabishB
merged 2 commits into
Fission-AI:main
from
Miss-you:codex/add-kimi-cli-skills-only-support
Apr 30, 2026
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| "@fission-ai/openspec": minor | ||
| --- | ||
|
|
||
| ### New Features | ||
|
|
||
| - **Kimi CLI support** — OpenSpec can now initialize Kimi CLI as a supported skills-only tool using `.kimi/skills/` | ||
|
|
||
| ### Other | ||
|
|
||
| - Added Kimi-specific docs and init coverage aligned with skill-based `/skill:openspec-*` usage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
openspec/changes/archive/2026-04-23-add-kimi-cli-skills-only-support/.openspec.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| schema: spec-driven | ||
| created: 2026-04-23 |
3 changes: 3 additions & 0 deletions
3
openspec/changes/archive/2026-04-23-add-kimi-cli-skills-only-support/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # add-kimi-cli-skills-only-support | ||
|
|
||
| Add Kimi CLI as a supported skills-only tool without a command adapter |
85 changes: 85 additions & 0 deletions
85
openspec/changes/archive/2026-04-23-add-kimi-cli-skills-only-support/design.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| ## Context | ||
|
|
||
| Kimi CLI is not another Claude/Codex-style adapter target. Its extension model is built around discovered skills, not external command files: | ||
|
|
||
| - skills are discovered from `.kimi/skills/` | ||
| - skills are exposed as `/skill:<name>` | ||
| - no stable `.kimi/commands/` or prompt-file loading mechanism was found in the Kimi CLI codebase | ||
|
|
||
| OpenSpec's existing architecture can already represent that shape: | ||
|
|
||
| - `AI_TOOLS` can advertise a `skillsDir` | ||
| - `init` can install skills for any selected tool with `skillsDir` | ||
| - when command generation is attempted for a tool without an adapter, OpenSpec already records `commandsSkipped` | ||
|
|
||
| ## Goals | ||
|
|
||
| - Add Kimi CLI using the same narrow `skills-only` pattern already used by Trae | ||
| - Keep the implementation small: metadata, docs, and a focused regression test | ||
| - Make the spec text match the current code path for adapterless tools | ||
|
|
||
| ## Non-Goals | ||
|
|
||
| - designing a Kimi-specific command adapter without upstream support | ||
| - changing tool capability modeling across the whole generation pipeline | ||
| - reworking `delivery=commands` behavior for all adapterless tools | ||
|
|
||
| ## Decisions | ||
|
|
||
| ### 1. Represent Kimi CLI as an adapterless tool with `.kimi` | ||
|
|
||
| Add a new `AI_TOOLS` entry: | ||
|
|
||
| ```ts | ||
| { name: 'Kimi CLI', value: 'kimi', available: true, successLabel: 'Kimi CLI', skillsDir: '.kimi' } | ||
| ``` | ||
|
|
||
| This matches Kimi CLI's project-local skills root and lets existing init/update detection paths treat it as a supported tool. | ||
|
|
||
| ### 2. Do not add a Kimi command adapter | ||
|
|
||
| No `src/core/command-generation/adapters/kimi.ts` file will be added, and the command adapter registry will remain unchanged. | ||
|
|
||
| Rationale: | ||
|
|
||
| - Kimi CLI exposes skills dynamically as `/skill:<name>` | ||
| - the previous upstream PR stalled specifically because no legitimate adapter target was available | ||
| - adding a fake `.kimi/commands/...` path would create behavior OpenSpec cannot justify against upstream Kimi CLI behavior | ||
|
|
||
| ### 3. Document Kimi by its real invocation surface | ||
|
|
||
| Kimi documentation in OpenSpec must use Kimi's actual skill invocation form: | ||
|
|
||
| - supported-tools: no generated command files, use `/skill:openspec-*` | ||
| - commands doc: examples such as `/skill:openspec-propose` | ||
|
|
||
| The docs must not claim generated `opsx-*` files or `/openspec-*` direct invocations for Kimi. | ||
|
|
||
| ### 4. Keep the change compatible with existing Trae-style behavior | ||
|
|
||
| This change intentionally follows the current adapterless-tool behavior already present in the codebase: | ||
|
|
||
| - skills are created whenever delivery includes skills | ||
| - command generation is skipped when no adapter exists | ||
| - init output reports `Commands skipped for: kimi (no adapter)` | ||
|
|
||
| This keeps the Kimi change small and avoids overlapping implementation work already captured in `add-tool-command-surface-capabilities`. | ||
|
|
||
| ## Test Strategy | ||
|
|
||
| Add one focused regression test in `test/core/init.test.ts`: | ||
|
|
||
| - configure `delivery=both` | ||
| - run init with `--tools kimi` | ||
| - verify Kimi skills are created under `.kimi/skills/...` | ||
| - verify init reports the skipped command generation path for `kimi` | ||
|
|
||
| That test is enough for this narrow change because: | ||
|
|
||
| - adapterless update behavior already has generic coverage | ||
| - CLI tool-id rendering is derived from `AI_TOOLS` | ||
| - no command adapter or path formatting logic is being introduced | ||
|
|
||
| ## Risks / Trade-offs | ||
|
|
||
| The main trade-off is scope: Kimi will inherit the current adapterless-tool behavior, including the broader limitation that `delivery=commands` is not yet capability-aware for skills-invocable tools. That is acceptable for this change because it matches the existing Trae/ForgeCode model and keeps the implementation aligned with verified Kimi CLI behavior. |
38 changes: 38 additions & 0 deletions
38
openspec/changes/archive/2026-04-23-add-kimi-cli-skills-only-support/proposal.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| ## Why | ||
|
|
||
| OpenSpec already has user demand for Kimi CLI support, but the previous upstream attempt stalled because it assumed Kimi needed a command adapter. Local review of the Kimi CLI codebase shows a different integration surface: Kimi discovers `SKILL.md` files from `.kimi/skills/` and exposes them through `/skill:<name>`, but it does not provide a stable, file-based custom command directory like Claude Code or Codex. | ||
|
|
||
| OpenSpec already supports tools that install skills without a command adapter. Trae and ForgeCode are the existing examples. Kimi should follow the same pattern instead of introducing undocumented `.kimi/commands/...` behavior. | ||
|
|
||
| ## What Changes | ||
|
|
||
| - Add Kimi CLI as a supported tool in `AI_TOOLS` with `skillsDir: '.kimi'` | ||
| - Document Kimi CLI as a skills-only integration in supported tools and command usage docs | ||
| - Align change specs so `cli-init` explicitly allows selected tools with `skillsDir` but no registered command adapter | ||
|
|
||
| ## Capabilities | ||
|
|
||
| ### New Capabilities | ||
|
|
||
| _None._ | ||
|
|
||
| ### Modified Capabilities | ||
|
|
||
| - `ai-tool-paths`: define the `.kimi` skills root for Kimi CLI | ||
| - `cli-init`: clarify that adapterless tools remain valid selections and skip command-file generation with an informational message | ||
|
|
||
| ## Impact | ||
|
|
||
| - `src/core/config.ts` - add Kimi CLI tool metadata | ||
| - `docs/supported-tools.md` - add Kimi CLI row and tool id | ||
| - `docs/commands.md` - document `/skill:openspec-*` usage for Kimi CLI | ||
| - `docs/cli.md` - include `kimi` in the supported `--tools` list | ||
| - `test/core/init.test.ts` - cover Kimi CLI as an adapterless tool during init | ||
|
|
||
| ## Non-Goals | ||
|
|
||
| - Adding `src/core/command-generation/adapters/kimi.ts` | ||
| - Defining a `.kimi/commands/...` output path | ||
| - Changing the broader delivery model for adapterless tools under `delivery=commands` | ||
|
|
||
| That broader capability-aware delivery work is already being explored separately in `add-tool-command-surface-capabilities`. This change stays narrow and follows the existing Trae/ForgeCode pattern. |
12 changes: 12 additions & 0 deletions
12
...archive/2026-04-23-add-kimi-cli-skills-only-support/specs/ai-tool-paths/spec.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # ai-tool-paths Delta Specification | ||
|
|
||
| ## MODIFIED Requirements | ||
|
|
||
| ### Requirement: Path configuration for supported tools | ||
|
|
||
| The `AI_TOOLS` array SHALL include `skillsDir` for tools that support the Agent Skills specification. | ||
|
|
||
| #### Scenario: Kimi CLI paths defined | ||
|
|
||
| - **WHEN** looking up the `kimi` tool | ||
| - **THEN** `skillsDir` SHALL be `.kimi` |
37 changes: 37 additions & 0 deletions
37
...nges/archive/2026-04-23-add-kimi-cli-skills-only-support/specs/cli-init/spec.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # cli-init Delta Specification | ||
|
|
||
| ## MODIFIED Requirements | ||
|
|
||
| ### Requirement: Slash Command Generation | ||
|
|
||
| The command SHALL generate opsx slash commands only for selected tools that have a registered command adapter, while keeping adapterless tools valid for skill generation. | ||
|
|
||
| #### Scenario: Generating slash commands for a tool with a registered adapter | ||
|
|
||
| - **WHEN** a tool with a registered command adapter is selected during initialization | ||
| - **THEN** create 9 slash command files using the tool's command adapter: | ||
| - `/opsx:explore` | ||
| - `/opsx:new` | ||
| - `/opsx:continue` | ||
| - `/opsx:apply` | ||
| - `/opsx:ff` | ||
| - `/opsx:verify` | ||
| - `/opsx:sync` | ||
| - `/opsx:archive` | ||
| - `/opsx:bulk-archive` | ||
| - **AND** use tool-specific path conventions (e.g., `.claude/commands/opsx/` for Claude) | ||
| - **AND** include tool-specific frontmatter format | ||
|
|
||
| #### Scenario: Selected tool has no command adapter | ||
|
|
||
| - **GIVEN** a selected tool has `skillsDir` configured but no registered command adapter | ||
| - **WHEN** initialization includes command generation | ||
| - **THEN** skill generation for that tool SHALL still remain valid | ||
| - **AND** command-file generation SHALL be skipped for that tool | ||
| - **AND** the command output SHALL include `Commands skipped for: <tool-id> (no adapter)` | ||
|
|
||
| #### Scenario: Kimi CLI skips command-file generation | ||
|
|
||
| - **WHEN** the user selects Kimi CLI during initialization | ||
| - **THEN** OpenSpec SHALL treat it as a supported tool with `skillsDir: '.kimi'` | ||
| - **AND** command-file generation SHALL be skipped because no Kimi adapter is registered |
22 changes: 22 additions & 0 deletions
22
openspec/changes/archive/2026-04-23-add-kimi-cli-skills-only-support/tasks.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| ## 1. Change Artifacts | ||
|
|
||
| - [x] 1.1 Write proposal, design, and spec deltas for Kimi CLI skills-only support | ||
|
|
||
| ## 2. Tool Metadata | ||
|
|
||
| - [x] 2.1 Add `Kimi CLI` to `src/core/config.ts` with `value: 'kimi'` and `skillsDir: '.kimi'` | ||
|
|
||
| ## 3. Documentation | ||
|
|
||
| - [x] 3.1 Update `docs/supported-tools.md` with a Kimi CLI row that clearly states there is no command adapter | ||
| - [x] 3.2 Update `docs/commands.md` to document Kimi CLI usage via `/skill:openspec-*` | ||
| - [x] 3.3 Update `docs/cli.md` so the supported `--tools` list includes `kimi` | ||
|
|
||
| ## 4. Tests | ||
|
|
||
| - [x] 4.1 Add a targeted init regression test for `--tools kimi` under adapterless command generation | ||
|
|
||
| ## 5. Validation | ||
|
|
||
| - [x] 5.1 Validate the change artifacts with `openspec validate` | ||
| - [x] 5.2 Run targeted tests and fix any regressions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.