{"record":{"id":"5cdf7e8f7b5b3f72","repo":"rtk-ai/rtk","slug":"antigravity-is-project-scoped-use-rtk-init-age","errorCode":null,"errorMessage":"Antigravity is project-scoped. Use: rtk init --agent antigravity","messagePattern":"Antigravity is project-scoped\\. Use: rtk init --agent antigravity","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/main.rs","lineNumber":2063,"sourceCode":"                    hooks::init::PatchMode::Ask\n                };\n                hooks::init::run_gemini(global, hook_only, patch_mode, ctx)?;\n            } else if copilot {\n                if global {\n                    hooks::init::run_copilot_global(ctx)?;\n                } else {\n                    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","sourceCodeStart":2045,"sourceCodeEnd":2081,"githubUrl":"https://github.com/rtk-ai/rtk/blob/d977e1c31621fe8704e6500ceeb9c7a0de2b6836/src/main.rs#L2045-L2081","documentation":"The Antigravity integration is project-scoped (files inside the workspace), so rtk rejects `--global` to avoid writing to a nonexistent global location. Same validation family as the kilocode bail, opposite direction from windsurf/gemini.","triggerScenarios":"`rtk init -g --agent antigravity` (or --global) — the bail at src/main.rs:2065.","commonSituations":"Scripts that always pass -g; docs drift mixing up which agents are global vs project scoped.","solutions":["Run `rtk init --agent antigravity` from the project root, without -g","If scripting machine setup, iterate over project dirs rather than using -g"],"exampleFix":"# before\nrtk init -g --agent antigravity   # error: project-scoped\n\n# after\nrtk init --agent antigravity","handlingStrategy":"validation","validationCode":"# bash: antigravity is project-scoped\nrtk init --agent antigravity   # from the project root, no -g","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never pass -g blanket-style in provisioning scripts; resolve scope per agent","Keep a table of agent scopes in team onboarding docs"],"tags":["cli","init","antigravity","agent-scoping","validation"],"backgroundTag":null,"analyzedSha":"d977e1c31621fe8704e6500ceeb9c7a0de2b6836","analyzedAt":"2026-08-16T05:40:46.291Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}