Skip to content

fix(antigravity): correct base_dir + support .agents/ canonical paths#46

Merged
RealZST merged 2 commits into
mainfrom
fix/antigravity-skill-path
May 9, 2026
Merged

fix(antigravity): correct base_dir + support .agents/ canonical paths#46
RealZST merged 2 commits into
mainfrom
fix/antigravity-skill-path

Conversation

@RealZST
Copy link
Copy Markdown
Owner

@RealZST RealZST commented May 9, 2026

Summary

  • base_dir correction: 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 as base_dir, causing skill_dirs to write to a directory Antigravity doesn't scan, plugin_dirs to point at a fabricated path, and hook_config_path to point at a non-existent file. Switch base_dir to ~/.gemini/antigravity/; consolidate skill/MCP/settings paths via base_dir().join(...). Empty plugin_dirs (Antigravity has no file-based plugin system; its "plugin" surface is VS Code VSIX extensions). Park hook_config_path on an inert placeholder (dead code since hook_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. Update project_skill_dirs, project_markers, and project_rules_patterns to 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:

  • Official Antigravity codelab "Getting Started": Global rule: ~/.gemini/GEMINI.md, Workspace rules: your-workspace/.agents/rules/, Workspace workflows: your-workspace/.agents/workflows/, Global workflow: ~/.gemini/antigravity/global_workflows/
  • Official Antigravity Skills codelab: ~/.gemini/antigravity/skills/ (global), .agent/skills/ (workspace, older convention)
  • antigravity.google/docs/mcp: ~/.gemini/antigravity/mcp_config.json
  • AI Developers Forum (Google staff Abhijit_Pramanik): "We've moved towards .agents/, but we do have backward support for .agent still… .agents (plural) should be used"
  • Antigravity.app product.json: dataFolderName: ".antigravity" (the IDE shell folder, never user-documented)

What's NOT in this PR

Saved as roadmap for follow-up PRs:

  • Workflows surface: officially documented (.agents/workflows/ + ~/.gemini/antigravity/global_workflows/) but a new extension kind requiring trait/UI/install-pipeline design β€” separate PR.
  • Codex adapter follow-ups: discovered while researching issue [Suggestion] UX Improvements & Developer Experience EnhancementsΒ #22 (memory path mislabel, skill global path verification, hooks feature flag prompt, project-scope subagent gap) β€” separate PR.

Test plan

  • cargo test --workspace β€” 402 tests pass (385 hk-core unit + 8 toggle integration + others)
  • npm test β€” 148/148 frontend tests pass
  • npm run build β€” frontend build clean
  • Manual smoke in npm run tauri dev:
    • Antigravity detected on home machine (new base_dir reachable)
    • Skills section shows ~/.gemini/antigravity/skills/ contents
    • Plugins section empty (no fabricated entries)
    • MCP section shows mcp_config.json contents unchanged
    • Rules section shows ~/.gemini/GEMINI.md (verified by codelab as the shared global rule file)
    • Install-to-Agent (global) lands in ~/.gemini/antigravity/skills/<name>/
    • Install-to-Agent (project) lands in <project>/.agents/skills/<name>/ (canonical form)

πŸ€– Generated with Claude Code

RealZST and others added 2 commits May 9, 2026 11:50
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>
@RealZST RealZST merged commit 7940fd3 into main May 9, 2026
3 checks passed
@RealZST RealZST deleted the fix/antigravity-skill-path branch May 9, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant