fix(antigravity): correct base_dir + support .agents/ canonical paths#46
Merged
Conversation
Antigravity has two on-disk directories: ~/.antigravity/ (the VS Code-fork IDE shell, undocumented by Google) and ~/.gemini/antigravity/ (the AI agent runtime β every Antigravity-related path Google's docs and codelabs reference lives here). HK previously used the IDE shell as base_dir, which led to: - skill_dirs writing to ~/.antigravity/skills/ β a path Antigravity does not scan; installs landed in a directory the agent ignores - plugin_dirs scanning ~/.antigravity/plugins/ β fabricated; Antigravity has no file-based plugin system (its "plugin" surface is VS Code VSIX extensions in ~/.antigravity/extensions/, a different extension class) - hook_config_path pointing at ~/.antigravity/settings.json β a non-existent file (dead code since hook_format=None, but misleading) Switch base_dir to ~/.gemini/antigravity/ so skill_dirs/mcp_config_path/ global_settings_files all resolve to the documented agent paths via base_dir. Empty plugin_dirs (no plugin surface). Park hook_config_path on a clearly inert placeholder. Update the in-test setup path to match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Antigravity 1.18.4+ migrated workspace config directories from `.agent/` (singular) to `.agents/` (plural). Per Google staff on the AI Developers Forum, `.agents/` is canonical going forward and `.agent/` is kept as backward-compat. The new "Getting Started with Google Antigravity" codelab uses `.agents/` throughout, while the older Skills codelab still references the singular form. - project_skill_dirs: list `.agents/skills` first so new installs land on the canonical path; keep `.agent/skills` as fallback for projects that haven't migrated. - project_markers: detect either form so HK recognizes both pre- and post-1.18.4 Antigravity projects. - project_rules_patterns: scan both; previous "backward compat" comment on the plural entry was inverted and is removed. - mod.rs upstream-conventions test: expected canonical workspace skill path updated to `.agents/skills`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
base_dircorrection: Antigravity has two on-disk directories β~/.antigravity/(VS Code-fork IDE shell, undocumented by Google) and~/.gemini/antigravity/(the AI agent runtime, where every Antigravity-related path Google's docs reference actually lives). HK previously used the IDE shell asbase_dir, causingskill_dirsto write to a directory Antigravity doesn't scan,plugin_dirsto point at a fabricated path, andhook_config_pathto point at a non-existent file. Switchbase_dirto~/.gemini/antigravity/; consolidate skill/MCP/settings paths viabase_dir().join(...). Emptyplugin_dirs(Antigravity has no file-based plugin system; its "plugin" surface is VS Code VSIX extensions). Parkhook_config_pathon an inert placeholder (dead code sincehook_format=None)..agents/canonical path support: Antigravity 1.18.4+ migrated workspace dirs from.agent/(singular) to.agents/(plural). Per Google staff on the AI Developers Forum, plural is canonical going forward; singular kept as backward-compat. Updateproject_skill_dirs,project_markers, andproject_rules_patternsto scan/install both forms, plural first.Why
Surfaced while triaging issue #22 item 5 (the user's question about whether HK differentiates Gemini CLI from Antigravity). Verification of the install pipeline against Antigravity's actual on-disk paths uncovered: (a)
~/.antigravity/skills/was never read by Antigravity (HK had been creating an empty orphan directory there during scans), and (b) HK still treated.agent/as the only canonical workspace path, missing the.agents/migration.Path facts cross-verified against:
Global rule: ~/.gemini/GEMINI.md,Workspace rules: your-workspace/.agents/rules/,Workspace workflows: your-workspace/.agents/workflows/,Global workflow: ~/.gemini/antigravity/global_workflows/~/.gemini/antigravity/skills/(global),.agent/skills/(workspace, older convention)antigravity.google/docs/mcp:~/.gemini/antigravity/mcp_config.json.agents/, but we do have backward support for.agentstillβ¦.agents(plural) should be used"product.json:dataFolderName: ".antigravity"(the IDE shell folder, never user-documented)What's NOT in this PR
Saved as roadmap for follow-up PRs:
.agents/workflows/+~/.gemini/antigravity/global_workflows/) but a new extension kind requiring trait/UI/install-pipeline design β separate PR.Test plan
cargo test --workspaceβ 402 tests pass (385 hk-core unit + 8 toggle integration + others)npm testβ 148/148 frontend tests passnpm run buildβ frontend build cleannpm run tauri dev:base_dirreachable)~/.gemini/antigravity/skills/contentsmcp_config.jsoncontents unchanged~/.gemini/GEMINI.md(verified by codelab as the shared global rule file)~/.gemini/antigravity/skills/<name>/<project>/.agents/skills/<name>/(canonical form)π€ Generated with Claude Code