Repository navigation
feat(cli): add Kimi Code CLI as a flat host for skills and agents - #1344
dkp-consult wants to merge 1 commit into
Conversation
Kimi Code CLI users have no AIDD install. This adds a flat `kimi` profile that writes AIDD skills and agents under `.kimi-code/`, from setup and from `translate --to kimi --as flat`. Checked against the Kimi Code CLI 2.6.3 source on 2026-11-17: project skills come from `.kimi-code/skills/` and `.agents/skills/`, agents from `.kimi-code/agents/` and `.agents/agents/`, both scanned recursively. The profile writes the Kimi-specific root so it never owns a file Antigravity writes under `.agents/`. A skill sits one level deep as `<plugin>-<skill>/`, so its `name`, the handle Kimi registers it by, carries the plugin. An agent is one file, `<plugin>-<agent>.md`, with its frontmatter rebuilt by the portable builder. Kimi skips an agent with a non-kebab-case `name` or no `description` with only a log warning, so both stop the build here. Hooks, MCP, commands and the native `kimi.plugin.json` build stay out until their own changes; a plugin's hooks are reported as skipped. Refs ai-driven-dev#733 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@dkp-consult heads-up: once Kimi lands in the CLI, the aidd-context generators still won't write for it. Tracked in #1364; it could fit in this PR or a follow-up. |
|
Thank you @dkp-consult. Kimi Code CLI now ships on |
|
Hi @dkp-consult, thanks again for opening the Kimi work here. It landed on We are stuck on one thing: our account has no Kimi Code subscription. Every model call returns 1. A probe plugin. Its hook writes each payload it receives to
#!/bin/sh
mkdir -p "$HOME/kimi-capture"; IN=$(cat); E=$1
printf '%s' "$IN" > "$HOME/kimi-capture/$E-$(date +%s%N).json"
if [ -e "$HOME/kimi-capture/answer" ]; then
case "$E" in
PreToolUse) printf '%s' "$IN" | grep -q blocked.txt && printf '%s' '{"hookSpecificOutput":{"permissionDecision":"deny","permissionDecisionReason":"probe refuses blocked.txt"}}' ;;
Stop) [ -e "$HOME/kimi-capture/stop-done" ] || { touch "$HOME/kimi-capture/stop-done"; echo "also write continued.txt containing ok" >&2; exit 2; } ;;
esac
fi
exit 0
2. Install it: run 3. Run it in a throwaway folder: kimi -p "Write hello to notes.txt, then run ls."
touch ~/kimi-capture/answer
kimi -p "Write x to blocked.txt, then write y to other.txt."4. Send it back: zip That tells us which events fire and whether a refusal and a turn-end follow-up take effect. We will wire only what your capture shows. |
🎯 What & why
Kimi Code CLI users have no AIDD install. This adds a flat
kimitarget that writes AIDD skills and agents under.kimi-code/, fromsetup --ai kimiand fromtranslate --to kimi --as flat. It is the first of the four deliverables settled in #733.🛠️ How it works
Contract re-checked on 2026-11-17, against Kimi Code CLI 2.6.3 (
MoonshotAI/kimi-code@1ccbe41). The 2.0.2 contract still holds:.kimi-code/skillsand.agents/skills(skillRoots.ts:12-13), scanned up to 8 levels deep. A directory-formSKILL.mdmust havenameanddescription(parser.ts:85)..kimi-code/agentsand.agents/agents(agentRoots.ts:16-17). Every.mdfile is read, at any depth.nameand adescription, and an agent file that breaks either one is skipped with only a log warning (agentFile.ts:25, :67). Kimi ignores fields it does not know, such asmodel.Design, modelled on the Antigravity profile:
.kimi-code/. Kimi also reads.agents/, but Antigravity and Codex write there. Using the Kimi-specific root means no file has two owners. When both trees exist, Kimi keeps the first file with a given name, and the brand root is read first, so you get no duplicate skills or agents.flatSkillLayout: "single-level"):.kimi-code/skills/aidd-dev-01-plan/SKILL.md. Kimi registers a skill by its frontmattername, so thenamecarries the plugin (/skill:aidd-dev-01-plan). It matches the Claude, Cursor, Copilot, Codex and Antigravity flat layouts..kimi-code/agents/aidd-orchestrator-executor.md. Its frontmatter is rebuilt by the existingportableAgentFrontmatter, and the build stops on a non-kebab-case name (build.ts:40) or an empty description, because Kimi would drop that agent without telling anyone. The profile declares noAgentsCapability, so no route copies Claude frontmatter verbatim.hooks.tsdescriptor, and only a tool that runs hooks has one. To satisfy both, a small shared helper declares "no hooks":noFlatHooks/NO_HOOKS_ARTIFACT. The CLI reports a plugin's hooks as skipped.🧪 How to verify
Expected: 4 agents under
.kimi-code/agents/, 55 skill folders under.kimi-code/skills/, eachSKILL.mdwithnameequal to its folder, and 493 files in total.setup --ai kimi --plugins recommendedwrites the same files for the plugins it installs, andclean --forceremoves them all.Observed on Kimi Code CLI 2.1.1 (2026-11-20), in a throwaway git project holding that tree:
kimi --agent zz-not-an-agent -p hifails before any model call and lists the profiles it found:plan, agent, coder, explore, aidd-orchestrator-executor, aidd-orchestrator-explorer, aidd-orchestrator-reviewer, aidd-orchestrator-validator.aidd-*skills, each with its.kimi-code/skills/<name>/SKILL.mdpath;Agenttool lists the 4 AIDD agents with their descriptions;--agent aidd-orchestrator-explorer, the system prompt is that agent's body.kimi -p, default modelkimi-code/kimi-for-coding):Skill {"skill":"aidd-context-11-explore"}. Kimi injects<skill-loaded name="aidd-context-11-explore" source="project" dir=".../.kimi-code/skills/aidd-context-11-explore">with the skill body, and the model answers with its heading,# Explore.Agent {"subagent_type":"aidd-orchestrator-explorer"}. The subagent runs on that profile (actual_subagent_type: aidd-orchestrator-explorer,status: completed) and answers.kimi-code/agents/aidd-orchestrator-validator.md:2.--agent aidd-orchestrator-explorerrunsGlob .kimi-code/agents/*and answers4 files.Skilltool, and delegation to an AIDD agent all work there. Kimi 2.6.3 has not been run, so 2.6.3 support rests on its source alone. The full acceptance run is deliverable 4.-pmode, 2.1.1 sends/skill:<name>to the model as plain text rather than expanding it, so a skill only runs if the model picks it.kimi.plugin.jsonbuild, hooks andKIMI_PLUGIN_ROOT, Kimi detection in telemetry, MCP, commands, user scope (setup --scope user), and thebuild-per-toolrelease matrix entry. Because of the release entry, INSTALL.md says no release zip exists forkimiyet.next's 770.3 KB.🔗 Linked issue
Refs #733
✅ I certify