Skip to content

Commit 65fed60

Browse files
authored
fix(kimi): add native plugin support (#998)
1 parent e176a6d commit 65fed60

13 files changed

Lines changed: 612 additions & 23 deletions

.github/release-please-config.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
".cursor/",
4545
".windsurf/",
4646
".agents/plugins/marketplace.json",
47+
".kimi-plugin/marketplace.json",
4748
".claude-plugin/marketplace.json",
4849
".cursor-plugin/marketplace.json"
4950
],
@@ -68,6 +69,11 @@
6869
"path": ".codex-plugin/plugin.json",
6970
"jsonpath": "$.version"
7071
},
72+
{
73+
"type": "json",
74+
"path": ".kimi-plugin/plugin.json",
75+
"jsonpath": "$.version"
76+
},
7177
{
7278
"type": "json",
7379
"path": ".agy/plugin.json",

.kimi-plugin/marketplace.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"version": "2",
3+
"plugins": [
4+
{
5+
"id": "compound-engineering",
6+
"displayName": "Compound Engineering",
7+
"source": "https://github.com/EveryInc/compound-engineering-plugin"
8+
}
9+
]
10+
}

.kimi-plugin/plugin.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "compound-engineering",
3+
"version": "3.14.3",
4+
"description": "Brainstorm, plan, debug, review, and compound learnings with AI agents",
5+
"keywords": [
6+
"brainstorming",
7+
"code-review",
8+
"compound-engineering",
9+
"debugging",
10+
"ideation",
11+
"workflows",
12+
"workflow-automation"
13+
],
14+
"author": "Kieran Klaassen and Trevin Chow",
15+
"homepage": "https://every.to/source-code/my-ai-had-already-fixed-the-code-before-i-saw-it",
16+
"license": "MIT",
17+
"skills": "./skills/",
18+
"interface": {
19+
"displayName": "Compound Engineering",
20+
"shortDescription": "Brainstorm, plan, debug, review, and compound learnings with AI agents",
21+
"longDescription": "Compound Engineering guides AI agents through the full engineering loop: strategy, ideation, requirements, planning, execution, debugging, review, PR feedback, and captured learnings that make future work easier.",
22+
"developerName": "Kieran Klaassen and Trevin Chow",
23+
"websiteURL": "https://github.com/EveryInc/compound-engineering-plugin"
24+
}
25+
}

CONCEPTS.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ An internal prompt file owned by one Skill that defines a specialist persona or
1919
## Conversion
2020

2121
### Target
22-
A destination coding-agent platform other than Claude Code (OpenCode, Codex, Pi, Antigravity, and others) that a Plugin is converted into and installed onto, each with its own file layout and capability mapping. Also called a target provider.
22+
A destination coding-agent platform other than Claude Code (OpenCode, Codex, Pi, Antigravity, Kimi Code, and others) that the repo supports through native plugin metadata or a Converter/Writer pair. Also called a target provider when it uses the conversion path.
2323

2424
A Plugin is installed to a Target at one of two scopes: global (user-wide) or per-workspace.
2525

26+
### Native plugin surface
27+
A platform-provided install contract that can consume this repo's committed plugin manifest or marketplace metadata directly, without generating a converted Bundle. When a Target has a native plugin surface, user-facing support usually belongs in platform metadata, release validation, and docs instead of a new Converter and Writer.
28+
2629
### Converter
2730
The step that transforms a parsed Plugin into one Target's in-memory form, mapping tools, permissions, hooks, and model names explicitly rather than by convention.
2831

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,22 @@ CODEX_HOME="$HOME/.codex/profiles/work" codex plugin add compound-engineering@co
210210

211211
The marketplace step only makes the plugin available; the plugin install is what activates the native CE skills for that profile.
212212

213+
### Kimi Code CLI
214+
215+
Kimi Code CLI can install Compound Engineering directly from this repository because the repo ships a native `.kimi-plugin/plugin.json` manifest:
216+
217+
```text
218+
/plugins install https://github.com/EveryInc/compound-engineering-plugin
219+
```
220+
221+
You can also browse it through Kimi's custom marketplace flow:
222+
223+
```text
224+
/plugins marketplace https://raw.githubusercontent.com/EveryInc/compound-engineering-plugin/main/.kimi-plugin/marketplace.json
225+
```
226+
227+
After installing or updating, run `/reload` or start a new Kimi session so the plugin skills are loaded.
228+
213229
### GitHub Copilot
214230

215231
For **VS Code Copilot Agent Plugins**:
@@ -372,6 +388,20 @@ codex plugin add compound-engineering@compound-engineering-plugin
372388

373389
Use a separate `CODEX_HOME` when you want to keep local testing isolated from your normal Codex profile. The Codex marketplace entry points at the public Git plugin source so root-shaped plugin repos install correctly; use a temporary marketplace catalog with a `source.url` plus `ref` when testing unpublished plugin-content changes end to end.
374390

391+
**Kimi Code CLI**
392+
393+
Inside Kimi Code CLI:
394+
395+
```text
396+
/plugins install /path/to/compound-engineering-plugin
397+
```
398+
399+
To test the local marketplace catalog instead, pass the catalog path:
400+
401+
```text
402+
/plugins marketplace /path/to/compound-engineering-plugin/.kimi-plugin/marketplace.json
403+
```
404+
375405
**OpenCode**
376406

377407
```json
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
title: "Use native Kimi plugin manifests instead of a converter target"
3+
date: 2026-06-24
4+
category: integrations
5+
module: installer
6+
problem_type: tooling_decision
7+
component: tooling
8+
severity: medium
9+
applies_when:
10+
- "Adding support for a coding-agent platform that can install plugin manifests directly"
11+
- "A proposed converter target duplicates a platform-native plugin or marketplace flow"
12+
- "Release automation must keep platform manifests in parity with canonical plugin metadata"
13+
related_components:
14+
- release-metadata
15+
- release-please
16+
- native-plugin-install
17+
tags:
18+
- kimi
19+
- native-plugins
20+
- marketplace
21+
- release-validation
22+
- converter-targets
23+
---
24+
25+
# Use native Kimi plugin manifests instead of a converter target
26+
27+
## Problem
28+
29+
Kimi Code support can look like a normal new target provider at first: add `--to kimi`, write a converter, and emit a Kimi-specific output tree. That is the wrong first move when the platform already has a native plugin manifest and custom marketplace contract.
30+
31+
This came up when [PR #997](https://github.com/EveryInc/compound-engineering-plugin/pull/997) by [@mastepanoski](https://github.com/mastepanoski) proposed Kimi support as a converter target. The useful signal was the demand for Kimi support; the implementation shape duplicated a native install surface.
32+
33+
## Decision
34+
35+
Prefer Kimi's native plugin metadata over a converter target:
36+
37+
- Commit `.kimi-plugin/plugin.json` with the Kimi manifest fields that describe this plugin, including `interface`, `skills`, `sessionStart.skill`, and `skillInstructions`.
38+
- Commit `.kimi-plugin/marketplace.json` using Kimi marketplace schema version `2`.
39+
- Keep `.kimi-plugin/plugin.json` in the root release component so release automation bumps it with the canonical plugin version.
40+
- Treat `.kimi-plugin/marketplace.json` as static catalog metadata, and validate it instead of version-bumping it.
41+
- Do not add `src/converters/claude-to-kimi.ts`, `src/targets/kimi.ts`, or a `--to kimi` CLI target unless Kimi later documents a separate generated output format that cannot be represented by the native manifest.
42+
43+
## Why This Matters
44+
45+
Native plugin support is a distribution contract, not a format-conversion problem. A converter target would create another generated install path to document, test, version, and clean up, while Kimi users would still need the manifest and marketplace metadata for the normal install flow.
46+
47+
The correct support surface is therefore:
48+
49+
- platform metadata: `.kimi-plugin/plugin.json` and `.kimi-plugin/marketplace.json`
50+
- release metadata: version parity, required fields, skill path checks, and marketplace schema validation
51+
- user docs: install and local-development instructions for Kimi's native plugin flow
52+
- target spec docs: a short spec explaining which Kimi fields are used and which unsupported runtime fields are intentionally absent
53+
54+
## Implementation Pattern
55+
56+
When adding a platform with a native plugin surface, wire it like a first-class release surface:
57+
58+
1. Add the native manifest and marketplace/catalog files expected by the platform.
59+
2. Put the release-owned manifest file in `.github/release-please-config.json` as an extra file for the canonical component.
60+
3. Exclude static marketplace files from release component ownership when they do not carry a version.
61+
4. Add release validation that rejects missing manifests, version drift, missing declared asset paths, marketplace schema drift, and marketplace plugin-list drift.
62+
5. Update README install docs and `docs/specs/` so future contributors know this is native metadata, not a converter target.
63+
64+
For Kimi specifically, validate at least:
65+
66+
- `.kimi-plugin/plugin.json` exists
67+
- `name`, `version`, `description`, and `skills` are non-empty
68+
- `skills` points at an existing directory in the repo
69+
- the Kimi manifest version equals the root plugin/package version
70+
- `.kimi-plugin/marketplace.json` has schema `version: "2"`
71+
- marketplace plugin IDs match the Claude marketplace plugin IDs
72+
- each marketplace entry has a non-empty `source`
73+
- root-local marketplace sources such as `"."` or `"./"` are rejected because they are only local-development placeholders
74+
75+
## Warning Signs
76+
77+
Reconsider a proposed new target provider when:
78+
79+
- the platform docs describe a `plugin.json`-style manifest in the source repo
80+
- the platform supports a custom marketplace or catalog pointing at repository/plugin sources
81+
- the target would mostly copy existing skills and docs without meaningful tool, permission, hook, or model conversion
82+
- install docs would need to tell users to run this repo's converter instead of the platform's documented plugin install path
83+
84+
Those are signs the platform support belongs in native metadata and release validation.
85+
86+
## Related
87+
88+
- [Native plugin install strategy](./native-plugin-install-strategy.md)
89+
- [Plugin versioning requirements](../plugin-versioning-requirements.md)
90+
- [Adding converter target providers](../adding-converter-target-providers.md)
91+
- [PR #997: original Kimi support proposal](https://github.com/EveryInc/compound-engineering-plugin/pull/997)
92+
- [PR #998: native Kimi plugin support](https://github.com/EveryInc/compound-engineering-plugin/pull/998)

docs/solutions/integrations/native-plugin-install-strategy.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ tags:
2121
- copilot
2222
- droid
2323
- qwen
24+
- kimi
2425
- antigravity
2526
- opencode
2627
- pi
@@ -44,6 +45,7 @@ The install strategy follows from that: prefer each harness's native plugin/pack
4445
| GitHub Copilot CLI | Native plugin marketplace using the existing Claude plugin metadata | No | Copilot translates the Claude plugin metadata itself. |
4546
| Factory Droid | Native plugin marketplace pointed at the CE GitHub repository | No | Droid translates Claude Code plugins automatically. |
4647
| Qwen Code | Native extension install from the CE GitHub repository and existing Claude plugin metadata | No | Qwen translates Claude Code extensions automatically. |
48+
| Kimi Code CLI | Native plugin install from this repository using `.kimi-plugin/plugin.json` | No | Kimi can install directly from the GitHub repo and can browse the committed `.kimi-plugin/marketplace.json` custom catalog. |
4749
| OpenCode | Git-backed OpenCode plugin entry in `opencode.json` | No | `.opencode/plugins/compound-engineering.js` registers the CE skills directory directly. |
4850
| Pi | Git-backed Pi package install from this repository | No | Root `package.json` exposes `.pi/extensions/compound-engineering.ts` and the CE skills directory. `pi-ask-user` is a recommended companion for richer prompts. |
4951
| Antigravity CLI | Native Antigravity plugin from the committed `.agy/` bundle | No | Clone the repo, then `agy plugin install ./compound-engineering-plugin/.agy`. The `.agy/` bundle holds `plugin.json` plus a `skills -> ../skills` symlink. `agy` still reads `GEMINI.md` as workspace context. |
@@ -117,6 +119,24 @@ agy plugin install ./compound-engineering-plugin/.agy
117119

118120
`agy` still reads `GEMINI.md` as workspace context (retained despite the Gemini CLI converter target being removed). For local development, point `agy` at the `.agy/` subdirectory of the checkout so it finds `plugin.json`, the `skills` symlink, and `GEMINI.md` together.
119121

122+
## Kimi Code CLI
123+
124+
Kimi Code CLI has a native plugin surface, so CE should not maintain a Kimi converter target for normal installation. The root `.kimi-plugin/plugin.json` declares the CE skills directory with `skills: "./skills/"` and carries display metadata through Kimi's `interface` object.
125+
126+
Direct install:
127+
128+
```text
129+
/plugins install https://github.com/EveryInc/compound-engineering-plugin
130+
```
131+
132+
Marketplace install:
133+
134+
```text
135+
/plugins marketplace https://raw.githubusercontent.com/EveryInc/compound-engineering-plugin/main/.kimi-plugin/marketplace.json
136+
```
137+
138+
The Kimi marketplace catalog uses schema version `"2"` and entries with `id` plus `source`. It has no release-owned marketplace version, so release automation bumps only `.kimi-plugin/plugin.json` through the root `compound-engineering` component. `bun run release:validate` enforces Kimi manifest and marketplace parity with the Claude source manifest/catalog.
139+
120140
## Bun Package Posture
121141

122142
The root package remains useful for:

docs/specs/kimi.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Kimi Code CLI Spec (Plugins and Skills)
2+
3+
Last verified: 2026-06-24
4+
5+
## Primary sources
6+
7+
```
8+
https://www.kimi.com/code/docs/en/kimi-code-cli/customization/plugins.html
9+
https://www.kimi.com/code/docs/en/kimi-code-cli/customization/agents.html
10+
```
11+
12+
## Plugin manifests
13+
14+
Kimi Code CLI plugins are directories or zip files with a manifest at one of:
15+
16+
```text
17+
<plugin_root>/kimi.plugin.json
18+
<plugin_root>/.kimi-plugin/plugin.json
19+
```
20+
21+
When both exist, `kimi.plugin.json` takes precedence. Compound Engineering uses `.kimi-plugin/plugin.json` to match the repo's other platform-specific manifest directories.
22+
23+
Supported fields include:
24+
25+
| Field | CE usage |
26+
| --- | --- |
27+
| `name` | Required plugin id, set to `compound-engineering` |
28+
| `version` | Root plugin version, bumped by release-please |
29+
| `description`, `keywords`, `author`, `homepage`, `license` | Shared display metadata |
30+
| `interface.displayName` | Marketplace/plugin manager display name |
31+
| `interface.shortDescription` | Short plugin-manager copy |
32+
| `interface.longDescription` | Longer plugin-manager copy |
33+
| `interface.developerName` | Human-readable developer name |
34+
| `interface.websiteURL` | Repository URL |
35+
| `skills` | `./skills/`, resolved inside the plugin root |
36+
37+
CE does not currently declare `sessionStart.skill`, `skillInstructions`, or `mcpServers` for Kimi. Unsupported runtime fields such as `tools`, `commands`, `hooks`, `apps`, `inject`, and `configFile` are diagnostics-only in Kimi and should not be used for CE behavior.
38+
39+
## Marketplace catalog
40+
41+
Kimi also supports a custom marketplace JSON source. The catalog schema uses:
42+
43+
```json
44+
{
45+
"version": "2",
46+
"plugins": [
47+
{
48+
"id": "compound-engineering",
49+
"displayName": "Compound Engineering",
50+
"source": "https://github.com/EveryInc/compound-engineering-plugin"
51+
}
52+
]
53+
}
54+
```
55+
56+
The marketplace catalog has no release-owned `metadata.version` equivalent. Treat `.kimi-plugin/marketplace.json` as static parity data, not a separate release component. `release:validate` checks that its plugin ids match the Claude marketplace plugin names and that entries use installable sources.
57+
58+
## Install commands
59+
60+
Direct install from GitHub:
61+
62+
```text
63+
/plugins install https://github.com/EveryInc/compound-engineering-plugin
64+
```
65+
66+
Marketplace browsing:
67+
68+
```text
69+
/plugins marketplace https://raw.githubusercontent.com/EveryInc/compound-engineering-plugin/main/.kimi-plugin/marketplace.json
70+
```
71+
72+
After installing, enabling, disabling, or removing a plugin, Kimi requires `/reload` or a new session for changes to apply.
73+
74+
## Instruction files
75+
76+
Kimi uses `AGENTS.md` for global and project instructions, not a `KIMI.md` file.
77+
78+
Documented locations include:
79+
80+
| Scope | Location |
81+
| --- | --- |
82+
| Global Kimi-specific | `$KIMI_CODE_HOME/AGENTS.md`, defaulting to `~/.kimi-code/AGENTS.md` |
83+
| Generic cross-tool | `~/.agents/AGENTS.md` |
84+
| Project | `.kimi-code/AGENTS.md` or `AGENTS.md` under the project tree |
85+
86+
This repo should not add a root `KIMI.md` compatibility shim unless Kimi documents support for that filename. The existing root `AGENTS.md` is already the canonical project instruction file for Kimi-compatible project context.

src/release/components.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const FILE_COMPONENT_MAP: Array<{ component: ReleaseComponent; prefixes: string[
2222
".claude-plugin/plugin.json",
2323
".cursor-plugin/plugin.json",
2424
".codex-plugin/",
25+
".kimi-plugin/plugin.json",
2526
".opencode/",
2627
".pi/",
2728
"AGENTS.md",
@@ -182,6 +183,7 @@ export async function loadCurrentVersions(cwd = process.cwd()): Promise<VersionS
182183
const root = await readJson<RootPackageJson>(`${cwd}/package.json`)
183184
const ce = await readJson<PluginManifest>(`${cwd}/.claude-plugin/plugin.json`)
184185
const antigravity = await readJson<PluginManifest>(`${cwd}/.agy/plugin.json`)
186+
const kimi = await readJson<PluginManifest>(`${cwd}/.kimi-plugin/plugin.json`)
185187
const marketplace = await readJson<MarketplaceManifest>(`${cwd}/.claude-plugin/marketplace.json`)
186188
const cursorMarketplace = await readJson<MarketplaceManifest>(`${cwd}/.cursor-plugin/marketplace.json`)
187189

@@ -193,6 +195,10 @@ export async function loadCurrentVersions(cwd = process.cwd()): Promise<VersionS
193195
throw new Error(`package.json version ${root.version} does not match .agy/plugin.json version ${antigravity.version}`)
194196
}
195197

198+
if (root.version !== kimi.version) {
199+
throw new Error(`package.json version ${root.version} does not match .kimi-plugin/plugin.json version ${kimi.version}`)
200+
}
201+
196202
return {
197203
"compound-engineering": ce.version,
198204
marketplace: marketplace.metadata.version,

0 commit comments

Comments
 (0)