{"record":{"id":"f157abb6e26dd03a","repo":"rtk-ai/rtk","slug":"kimi-ai-is-project-scoped-use-rtk-init-agent-k","errorCode":null,"errorMessage":"Kimi AI is project-scoped. Use: rtk init --agent kimi","messagePattern":"Kimi AI is project-scoped\\. Use: rtk init --agent kimi","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/main.rs","lineNumber":2070,"sourceCode":"                    hooks::init::run_copilot(ctx)?;\n                }\n            } else if agent == Some(AgentTarget::Pi) {\n                hooks::init::run_pi_mode(global, ctx)?\n            } else if agent == Some(AgentTarget::Kilocode) {\n                if global {\n                    anyhow::bail!(\"Kilo Code is project-scoped. Use: rtk init --agent kilocode\");\n                }\n                hooks::init::run_kilocode_mode(ctx)?;\n            } else if agent == Some(AgentTarget::Antigravity) {\n                if global {\n                    anyhow::bail!(\n                        \"Antigravity is project-scoped. Use: rtk init --agent antigravity\"\n                    );\n                }\n                hooks::init::run_antigravity_mode(ctx)?;\n            } else if agent == Some(AgentTarget::Kimi) {\n                if global {\n                    anyhow::bail!(\"Kimi AI is project-scoped. Use: rtk init --agent kimi\");\n                }\n                hooks::init::run_kimi_mode(ctx)?;\n            } else if agent == Some(AgentTarget::Hermes) {\n                hooks::init::run_hermes_mode(ctx)?;\n            } else if agent == Some(AgentTarget::Droid) {\n                hooks::init::run_droid_mode(global, ctx)?;\n            } else if agent == Some(AgentTarget::Vibe) {\n                let patch_mode = if auto_patch {\n                    hooks::init::PatchMode::Auto\n                } else if no_patch {\n                    hooks::init::PatchMode::Skip\n                } else {\n                    hooks::init::PatchMode::Ask\n                };\n                hooks::init::run_vibe_mode(global, hook_only, patch_mode, ctx)?;\n            } else {\n                let install_opencode = opencode;\n                let install_claude = !opencode;","sourceCodeStart":2052,"sourceCodeEnd":2088,"githubUrl":"https://github.com/rtk-ai/rtk/blob/d977e1c31621fe8704e6500ceeb9c7a0de2b6836/src/main.rs#L2052-L2088","documentation":"The Kimi AI integration is project-scoped, so rtk rejects `--global` up front. Part of the same scope-validation ladder in main.rs: global-only agents (windsurf, cursor, opencode, gemini, vibe) require -g, project-only agents (kilocode, antigravity, kimi) forbid it.","triggerScenarios":"`rtk init -g --agent kimi` (or --global) — the bail at src/main.rs:2072.","commonSituations":"Reusing a '-g for everything' provisioning script; copy-paste between agent init commands.","solutions":["Run `rtk init --agent kimi` from the project root, without -g","Centralize the agent→scope mapping in your setup scripts (see prevention tips)"],"exampleFix":"# before\nrtk init -g --agent kimi   # error: project-scoped\n\n# after\nrtk init --agent kimi","handlingStrategy":"validation","validationCode":"# bash: kimi is project-scoped\nrtk init --agent kimi   # from the project root, no -g","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Reuse the same (agent, scope) whitelist helper for all agents","Remember the inverse rule: -g required for windsurf/cursor/opencode/gemini/vibe, forbidden for kilocode/antigravity/kimi"],"tags":["cli","init","kimi","agent-scoping","validation"],"backgroundTag":null,"analyzedSha":"d977e1c31621fe8704e6500ceeb9c7a0de2b6836","analyzedAt":"2026-08-16T05:40:46.291Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}