feat(cli): add Kimi Code support - #452
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (52)
🚧 Files skipped from review as they are similar to previous changes (38)
📝 WalkthroughWalkthroughAdds Kimi Code as a supported Trellis platform, including CLI detection and execution, shared/private skill generation, workflow routing, pull-based context handling, platform documentation, and automated coverage. ChangesKimi Code platform integration
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant InitCommand
participant KimiConfigurator
participant SkillStorage
participant KimiCLI
User->>InitCommand: init --kimi
InitCommand->>KimiConfigurator: configureKimi(cwd)
KimiConfigurator->>SkillStorage: write shared .agents/skills
KimiConfigurator->>SkillStorage: write .kimi-code/skills
User->>KimiCLI: run Trellis skill
KimiCLI->>SkillStorage: load SKILL.md
KimiCLI-->>User: execute workflow or sub-agent prompt
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.agents/skills/trellis-meta/references/platform-files/platform-map.md:
- Line 50: Update the Kimi Code sub-agent documentation to include plan
alongside coder and explore, keeping all references synchronized. Apply the same
change in
.agents/skills/trellis-meta/references/platform-files/platform-map.md:50-50,
.claude/skills/trellis-meta/references/platform-files/platform-map.md:50-50,
.claude/skills/trellis-meta/references/platform-files/agents.md:37-37, and
.cursor/skills/trellis-meta/references/platform-files/agents.md:37-37.
In `@packages/cli/src/templates/common/bundled-skills/trellis-meta/SKILL.md`:
- Line 15: Remove the stale hard-coded platform count from the bundled source at
packages/cli/src/templates/common/bundled-skills/trellis-meta/SKILL.md:15-15,
updating any nearby references to avoid claiming a fixed number of supported
platforms. Regenerate .agents/skills/trellis-meta/SKILL.md:15-15 from the
corrected bundled source so both copies match.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 7f883ffe-006f-4f1e-84a3-f6325b33b9f5
📒 Files selected for processing (52)
.agents/skills/trellis-meta/SKILL.md.agents/skills/trellis-meta/references/platform-files/agents.md.agents/skills/trellis-meta/references/platform-files/hooks-and-settings.md.agents/skills/trellis-meta/references/platform-files/overview.md.agents/skills/trellis-meta/references/platform-files/platform-map.md.agents/skills/trellis-meta/references/platform-files/skills-and-commands.md.claude/skills/trellis-meta/SKILL.md.claude/skills/trellis-meta/references/platform-files/agents.md.claude/skills/trellis-meta/references/platform-files/hooks-and-settings.md.claude/skills/trellis-meta/references/platform-files/overview.md.claude/skills/trellis-meta/references/platform-files/platform-map.md.claude/skills/trellis-meta/references/platform-files/skills-and-commands.md.cursor/skills/trellis-meta/SKILL.md.cursor/skills/trellis-meta/references/platform-files/agents.md.cursor/skills/trellis-meta/references/platform-files/hooks-and-settings.md.cursor/skills/trellis-meta/references/platform-files/overview.md.cursor/skills/trellis-meta/references/platform-files/platform-map.md.cursor/skills/trellis-meta/references/platform-files/skills-and-commands.md.trellis/scripts/common/active_task.py.trellis/scripts/common/cli_adapter.py.trellis/scripts/common/task_store.py.trellis/spec/cli/backend/platform-integration.md.trellis/workflow.mdREADME.mdREADME_CN.mdmarketplacepackages/cli/src/cli/index.tspackages/cli/src/commands/init.tspackages/cli/src/configurators/index.tspackages/cli/src/configurators/kimi.tspackages/cli/src/templates/common/bundled-skills/trellis-meta/SKILL.mdpackages/cli/src/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.mdpackages/cli/src/templates/common/bundled-skills/trellis-meta/references/platform-files/hooks-and-settings.mdpackages/cli/src/templates/common/bundled-skills/trellis-meta/references/platform-files/overview.mdpackages/cli/src/templates/common/bundled-skills/trellis-meta/references/platform-files/platform-map.mdpackages/cli/src/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.mdpackages/cli/src/templates/kimi/agents/trellis-check.mdpackages/cli/src/templates/kimi/agents/trellis-implement.mdpackages/cli/src/templates/kimi/agents/trellis-research.mdpackages/cli/src/templates/kimi/index.tspackages/cli/src/templates/trellis/scripts/common/active_task.pypackages/cli/src/templates/trellis/scripts/common/cli_adapter.pypackages/cli/src/templates/trellis/scripts/common/task_store.pypackages/cli/src/templates/trellis/workflow.mdpackages/cli/src/types/ai-tools.tspackages/cli/test/commands/init.integration.test.tspackages/cli/test/commands/update.integration.test.tspackages/cli/test/configurators/index.test.tspackages/cli/test/configurators/platforms.test.tspackages/cli/test/regression.test.tspackages/cli/test/templates/kimi.test.tspackages/cli/test/templates/trellis.test.ts
Add Kimi Code (kimi) as a first-class platform, modeled on the Pi Agent integration: - Registry: new kimi entry (configDir .kimi-code, supportsAgentSkills, agentCapable, no project-level hooks) and a new /skill:trellis- cmdRefPrefix matching Kimi's /skill:<name> invocation syntax - Configurator: workflow + bundled skills go to the shared .agents/skills/ root via the neutral resolver (byte-identical to Codex/Gemini/Pi writes); session-boundary commands and the trellis-implement/check/research agent prompts ship as Kimi skills under .kimi-code/skills/ (Kimi has no project-level custom sub-agent definitions, only built-in coder/explore/ plan sub-agents) - CLI: --kimi init flag, InitOptions.kimi - Python runtime: cli_adapter.py kimi branches (run: kimi -p --yolo, resume: kimi --session <id>), task_store.py subagent config dirs, active_task.py known platforms; workflow.md marker blocks classify Kimi as a pull-based agent-capable platform - Dogfood copies under .trellis/ kept byte-identical to templates - Tests: templates/kimi.test.ts, configurator detection + byte-parity, init/update integration, regression registry + cli_adapter assertions - Docs: README/README_CN platform lists, platform-integration spec tables, trellis-meta platform-files references - marketplace submodule bumped to the Kimi workflow-mirror sync commit (mindfold-ai/marketplace#10; re-bump to the merge commit after it lands)
64dfe31 to
0fdc1e9
Compare
…tform count - platform-map.md / agents.md: list all three built-in Kimi sub-agents (coder/explore/plan), matching the platform matrix entry - trellis-meta SKILL.md: remove the hard-coded 'all 15 supported platforms' count (stale; the registry is at 20 and keeps growing) - dogfood copies under .agents/.claude/.cursor kept byte-identical
* feat(cli): add Kimi Code support Add Kimi Code (kimi) as a first-class platform, modeled on the Pi Agent integration: - Registry: new kimi entry (configDir .kimi-code, supportsAgentSkills, agentCapable, no project-level hooks) and a new /skill:trellis- cmdRefPrefix matching Kimi's /skill:<name> invocation syntax - Configurator: workflow + bundled skills go to the shared .agents/skills/ root via the neutral resolver (byte-identical to Codex/Gemini/Pi writes); session-boundary commands and the trellis-implement/check/research agent prompts ship as Kimi skills under .kimi-code/skills/ (Kimi has no project-level custom sub-agent definitions, only built-in coder/explore/ plan sub-agents) - CLI: --kimi init flag, InitOptions.kimi - Python runtime: cli_adapter.py kimi branches (run: kimi -p --yolo, resume: kimi --session <id>), task_store.py subagent config dirs, active_task.py known platforms; workflow.md marker blocks classify Kimi as a pull-based agent-capable platform - Dogfood copies under .trellis/ kept byte-identical to templates - Tests: templates/kimi.test.ts, configurator detection + byte-parity, init/update integration, regression registry + cli_adapter assertions - Docs: README/README_CN platform lists, platform-integration spec tables, trellis-meta platform-files references - marketplace submodule bumped to the Kimi workflow-mirror sync commit (mindfold-ai/marketplace#10; re-bump to the merge commit after it lands) * docs(cli): address review — sync Kimi sub-agent lists, drop stale platform count - platform-map.md / agents.md: list all three built-in Kimi sub-agents (coder/explore/plan), matching the platform matrix entry - trellis-meta SKILL.md: remove the hard-coded 'all 15 supported platforms' count (stale; the registry is at 20 and keeps growing) - dogfood copies under .agents/.claude/.cursor kept byte-identical
Summary
Adds Kimi Code (
kimi) as a first-class platform, modeled on the Pi Agent integration (82a44643).Kimi Code reads project-level skills from both
.kimi-code/skills/and the shared.agents/skills/layer (agentskills.io), plusAGENTS.md. It is integrated as a class-2 pull-based platform: agent-capable, but with no project-level hooks (hooks live in user-level~/.kimi-code/config.tomlonly) and no project-level custom sub-agent definitions (only the built-incoder/explore/plansub-agents).Changes
ai-tools.ts): newkimientry —configDir: .kimi-code,supportsAgentSkills: true,agentCapable: true,hasHooks: false; newcmdRefPrefixmember/skill:trellis-matching Kimi's/skill:<name>invocation syntaxconfigurators/kimi.ts):.agents/skills/via the neutral resolver (byte-identical to Codex/Gemini/Pi writes — covered by a dedicated parity test)trellis-start/trellis-continue/trellis-finish-work) and thetrellis-implement/trellis-check/trellis-researchagent prompts →.kimi-code/skills/<name>/SKILL.md(shipped as skills since Kimi has no named sub-agent mechanism; implement/check carry the pull-based prelude; the prompts instruct the main session to dispatch Kimi's built-incoder/exploresub-agent)--kimiinit flag,InitOptions.kimicli_adapter.pykimi branches (run:kimi -p <prompt> --yolo, resume:kimi --session <id>, verified againstkimi --help),task_store.pysubagent config dirs,active_task.pyknown platforms;workflow.mdmarker blocks classify Kimi as pull-based agent-capable.trellis/kept byte-identical to templates (verified withdiff)templates/kimi.test.ts, configurator detection + configure/collect byte-parity, init/update integration, regression registry +cli_adapter+ jsonl-seed assertions, workflow-label mappingplatform-integration.mdspec tables,trellis-metaplatform-files referencesDeliberately out of scope
wire.jsonlsession format needs dedicated adapter work — happy to follow up.Marketplace dependency
marketplacesubmodule pointer to the mirror-sync commit in mindfold-ai/marketplace#10. CI will fail to check out the submodule until that PR lands — please merge the marketplace PR first, then I (or a maintainer) can re-bump the pointer to the merge commit (same flow as the Grok sync in #435).Verification
pnpm test: 1434 passed (63 files), including the marketplace-mirror diff testpnpm typecheck,pnpm lint,pnpm lint:py(basedpyright): cleantrellis init --kimi --yesin a temp repo →.kimi-code/skills/(6 skills),.agents/skills/, AGENTS.md block,/skill:trellis-*refs rendered correctly;trellis update --dry-runreports already-up-to-date (configure/collect hash parity);get_context.py --step 2.1 --platform kimiroutes to the pull-based blockSummary by CodeRabbit
New Features
--kimioption to initialize Kimi Code skills and workflows./skill:trellis-*) and built-in sub-agent workflow integration..agents/skills/and.kimi-code/skills/) without project-level hooks/settings.Documentation