Skip to content

feat: add Google Antigravity CLI (agy) as first-class APM target#1770

Open
sergio-sisternes-epam wants to merge 2 commits into
mainfrom
sergio-sisternes-epam/feat-antigravity-cli-target
Open

feat: add Google Antigravity CLI (agy) as first-class APM target#1770
sergio-sisternes-epam wants to merge 2 commits into
mainfrom
sergio-sisternes-epam/feat-antigravity-cli-target

Conversation

@sergio-sisternes-epam

Copy link
Copy Markdown
Collaborator

TL;DR

Adds antigravity as a first-class APM target, enabling apm install --target antigravity and auto-detection via .agent/ directory presence. Google's Antigravity CLI (agy) is the successor to Gemini CLI and uses a distinct workspace layout.

Closes #1650

Problem

Google has sunset Gemini CLI in favour of Antigravity CLI (agy). The new tool uses .agent/ as its project-scope config root (vs .gemini/), ~/.antigravity/ for user-scope config, and .agent/rules/*.md for instructions. Without a dedicated target, APM users must manually maintain Antigravity CLI configuration files.

Approach

Follow the established target-addition pattern:

  1. TargetProfile -- added "antigravity" to KNOWN_TARGETS with root_dir=".agent", compile_family="agents", deploy_root=".agents".
  2. Target detection -- registered in all 10+ locations in target_detection.py (TargetType, signal whitelist, canonical sets, descriptions, etc.).
  3. MCP adapter -- AntigravityClientAdapter extends GeminiClientAdapter (same mcpServers JSON schema in settings.json), overriding only the directory paths and target name.
  4. Integrators -- wired into hook, command, and MCP integrators. Commands use TOML (same as Gemini). Hooks merge into .agent/settings.json. Instructions deploy as rules.
  5. Documentation -- updated 10 doc pages and 3 apm-usage skill resource files.

Key design decisions

Decision Rationale
Target name antigravity (no aliases) Matches the canonical tool name; aliases can be added later
compile_family="agents" (emits AGENTS.md) Antigravity uses the cross-tool AGENTS.md context file
Inherits from GeminiClientAdapter Same mcpServers JSON schema, avoids code duplication
NOT flag-gated Gemini CLI sunset makes this GA-ready; no experimental gate needed
Instructions as rules (.agent/rules/) Antigravity's native rule format

Files changed

Source (13 files)

  • New: src/apm_cli/adapters/client/antigravity.py -- MCP client adapter
  • Modified: targets.py, target_detection.py, factory.py, hook_integrator.py, command_integrator.py, mcp_integrator.py, compile/cli.py, install.py, deps/cli.py, _helpers.py, errors.py, gemini.py (refactored to use self.target_name)

Tests (5 files)

  • Updated exhaustiveness tests: test_scope.py, test_data_driven_dispatch.py, test_kiro_target.py, test_targets_registry_completeness.py, test_no_policy_flag.py

Documentation (10 files)

  • Reference: targets-matrix.md, manifest-schema.md
  • Concepts: primitives-and-targets.md, what-is-apm.md
  • Integration: ide-tool-integration.md
  • Consumer: install-mcp-servers.md
  • Producer: compile.md
  • apm-usage skill: commands.md, package-authoring.md, workflow.md

Validation

  • All 17,145 unit tests pass
  • Lint (ruff check + format + pylint R0801 + auth-signals) clean
  • No code duplication -- refactored GeminiClientAdapter.configure_mcp_server to use self.target_name

Sergio Sisternes and others added 2 commits June 13, 2026 15:07
Register 'antigravity' target with full subsystem wiring:

- TargetProfile in KNOWN_TARGETS (root_dir=.agent/, compile_family=agents)
- Target detection: TargetType, signal whitelist, canonical sets, descriptions
- AntigravityClientAdapter for MCP (extends GeminiClientAdapter, same
  mcpServers JSON schema in .agent/settings.json)
- Factory registration in _MCP_CLIENT_REGISTRY
- Hook integrator: event map (BeforeTool/AfterTool/SessionEnd), merge config
- Command integrator: antigravity_command format_id (TOML, same as Gemini)
- MCP integrator: runtime detection (agy binary) and stale config cleanup
- CLI help text updated across compile, install, and deps commands
- Refactored GeminiClientAdapter.configure_mcp_server to use self.target_name
  for log/display strings, eliminating duplication with the new adapter

Closes #1650

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update all doc pages, reference tables, and apm-usage skill
resource files to include the antigravity target alongside
existing targets.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 13, 2026 14:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds antigravity (Google Antigravity CLI / agy) as a first-class APM target, wiring it into target resolution, MCP client config, hook/command integration, tests, and documentation so projects can apm install --target antigravity and auto-detect via .agent/.

Changes:

  • Added Antigravity target profile + detection signals, and registered it in CLI help/target sets.
  • Introduced AntigravityClientAdapter (Gemini-derived) and updated MCP runtime stale-cleanup + scripts-based runtime detection.
  • Updated unit tests and docs / apm-usage reference material to include Antigravity in target matrices and workflows.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/unit/integration/test_targets_registry_completeness.py Adds Antigravity adapter to registry completeness assertions.
tests/unit/integration/test_kiro_target.py Updates expected help output target list to include antigravity.
tests/unit/integration/test_data_driven_dispatch.py Adds antigravity buckets to partition parity coverage.
tests/unit/install/test_no_policy_flag.py Updates install help assertions to include antigravity.
tests/unit/core/test_scope.py Adds antigravity to known-target scope assertions.
src/apm_cli/integration/targets.py Defines the Antigravity TargetProfile (root .agent/, skills in .agents/).
src/apm_cli/integration/mcp_integrator.py Cleans .agent/settings.json MCP entries; detects antigravity/agy in scripts.
src/apm_cli/integration/hook_integrator.py Wires Antigravity hook config merge + sidecar reinjection mapping.
src/apm_cli/integration/command_integrator.py Routes Antigravity commands through the Gemini TOML writer path.
src/apm_cli/factory.py Registers antigravity in the MCP client adapter factory registry.
src/apm_cli/core/target_detection.py Adds antigravity to canonical targets, signals, descriptions, and ordering.
src/apm_cli/core/errors.py Updates the “no harness detected” signal list text.
src/apm_cli/commands/install.py Extends CLI help text for --runtime / --target to include antigravity.
src/apm_cli/commands/deps/cli.py Extends deps clean help text to include antigravity.
src/apm_cli/commands/compile/cli.py Extends compile help text to include antigravity.
src/apm_cli/commands/_helpers.py Updates scaffolded apm.yml “Accepted values” comment to include antigravity.
src/apm_cli/adapters/client/gemini.py Refactors MCP configure messages to use self.target_name for reuse.
src/apm_cli/adapters/client/antigravity.py New MCP client adapter implementing Antigravity’s settings path layout.
packages/apm-guide/.apm/skills/apm-usage/workflow.md Updates workflow guidance to mention Antigravity in compile/bundle notes.
packages/apm-guide/.apm/skills/apm-usage/package-authoring.md Documents Antigravity-specific hooks file naming + target tokens + command deploy.
packages/apm-guide/.apm/skills/apm-usage/commands.md Updates apm install docs for runtime list, detection signals, and compile-only targets list.
docs/src/content/docs/reference/targets-matrix.md Adds antigravity to the targets capability matrix + per-target details.
docs/src/content/docs/reference/manifest-schema.md Adds antigravity to schema allowed values and target descriptions.
docs/src/content/docs/producer/compile.md Includes antigravity in compile guidance and per-target rules table.
docs/src/content/docs/integrations/ide-tool-integration.md Adds Antigravity to the IDE/tool integration overview.
docs/src/content/docs/consumer/install-mcp-servers.md Documents Antigravity MCP config paths for project/user scope.
docs/src/content/docs/concepts/what-is-apm.md Adds .agent/ to the list of harness directories APM deploys into.
docs/src/content/docs/concepts/primitives-and-targets.md Adds antigravity to target taxonomy + detection list.

Comment on lines 66 to +67
".codex/, .gemini/, GEMINI.md, "
".opencode/, .windsurf/"
".agent/, .opencode/, .windsurf/"
Comment on lines 713 to +714
"# Accepted values: copilot, claude, cursor, opencode, codex, gemini, "
"windsurf, all\n"
"antigravity, windsurf, kiro, all\n"
name="antigravity",
root_dir=".agent",
primitives={
"instructions": PrimitiveMapping("rules", ".md", "antigravity_rules"),
@danielmeppiel danielmeppiel added the panel-review Trigger the apm-review-panel gh-aw workflow label Jun 15, 2026
@github-actions

Copy link
Copy Markdown

APM Review Panel: needs_rework

compile silently fails for --target antigravity (2-line fix required); unverifiable Antigravity CLI premise and .agent/ collision risk must be resolved before GA merge

cc @sergio-sisternes-epam @danielmeppiel -- a fresh advisory pass is ready for your review.

The architecture and integration pattern in this PR is fundamentally sound: clean adapter inheritance from GeminiClientAdapter, correct TargetProfile registration, and proper scope configuration. However, a concrete, reproducible functional failure must be addressed before merge: antigravity is absent from both _KNOWN_TARGETS in agents_compiler.py (lines 43-55) and the string tuple in should_compile_agents_md() in target_detection.py (lines 241-251). The TargetProfile declares compile_family='agents', contracting AGENTS.md compilation support, but the compile path exits with CompilationResult(success=False). The fix is two string additions, not an architectural rethink. detect_target() also omits antigravity, creating an asymmetry where apm install routes to the correct target while apm compile falls through to a generic fallback -- confirmed independently by python-architect and devx-ux-expert.

The most strategically uncertain element is the premise itself. antigravity.google returns DNS failures, both reference URLs embedded in the PR are unresolvable, and Gemini CLI on GitHub shows no public sunset signal as of the panel run. Shipping a first-class, non-flag-gated, GA-claimed target for a tool that cannot be verified as a real, publicly available Google product carries real community trust risk. This panel is advisory and cannot verify external product existence, but the author must supply verifiable evidence -- an official Google announcement, a public GitHub repository, or a working product URL -- before this target graduates to GA status. If the premise is confirmed, all remaining risks identified in this synthesis are mechanical and worth fast-tracking. If the premise cannot be verified, scoping to a feature-flagged or experimental target until public launch is the lower-risk path.

Two convergent risk clusters round out the required remediation. First, .agent/ is too generic an auto-detection signal -- GitHub Actions, LangChain, and other frameworks use that directory -- flagged independently by supply-chain-security and devx-ux. The missing is_dir() guard in mcp_integrator.py (unlike the explicit guards present for OpenCode and Claude) means APM can write into any pre-existing .agent/ directory not created by Antigravity CLI. Second, three inherited Gemini branding strings produce wrong product names in user-visible output: the Gemini CLI literal in _warn_input_variables(), debug logs in update_config(), and the ValueError text in _format_server_config -- flagged independently by python-architect and cli-logging-expert. The doc-writer finding of a missing compatibility matrix column is a real documentation gap but does not break any user-facing command behavior; it is reclassified from the panelist's blocking severity to recommended under this advisory regime.

Dissent. doc-writer classified the missing compatibility matrix column as blocking; under this advisory regime, documentation omissions that do not break user-facing command behavior are reclassified to recommended, and the python-architect compile failure carries greater mechanical weight. The oss-growth-hacker finding on unresolvable reference URLs was classified recommended by that panelist but carries CEO-tier strategic weight -- it touches community trust and product positioning -- and is elevated accordingly in the ship recommendation.

Aligned with: Portable by Manifest (install/compile target asymmetry breaks manifest determinism), Secure by Default (.agent/ collision risk with no is_dir() guard), Governed by Policy (compile gate contract broken by missing _KNOWN_TARGETS entry), Multi-Harness (adapter pattern is correctly applied), OSS Community Driven (unverifiable product premise is a community trust risk), Pragmatic as npm (missing agy alias and --global help gap raise first-run friction).

Growth signal. oss-growth-hacker surfaces a high-conversion narrative worth amplifying if the premise is verified: existing APM + Gemini users get a zero-friction migration path to Antigravity CLI, which is exactly the kind of upgrade story that drives organic word-of-mouth adoption. That migration story -- Gemini to Antigravity, one command -- must be explicit in the CHANGELOG and README at the same time the PR lands, not as a follow-up artifact. The README hero section currently omits Antigravity entirely, so the top-of-funnel impact of a GA target launch is zero until the README is updated.

Panel summary

Persona B R N Takeaway
Python Architect 1 2 1 apm compile --target antigravity fails: 'antigravity' absent from _KNOWN_TARGETS + should_compile_agents_md(); _get_gemini_dir() naming leaks into subclass; 3 user-visible Gemini branding strings inherited.
CLI Logging Expert 0 2 2 Two inherited Gemini strings emit wrong product name in user-visible warnings and verbose logs for antigravity; slugs used as display names.
DevX UX Expert 0 4 2 Detection asymmetry between apm install and apm compile, generic .agent/ signal, missing agy alias, and --global help gap are the four substantive UX issues.
Supply Chain Security Expert 0 2 2 No blocking supply-chain bypasses; two recommended fixes around .agent/ collision breadth and a missing directory guard consistent with existing Gemini gap.
OSS Growth Hacker 0 4 1 Strong story if the tool is real; unresolvable reference URLs + absent README update must be fixed before shipping.
Doc Writer 1 4 1 Antigravity column missing from canonical compatibility matrix; 4 additional drift points across what-is-apm, ide-tool-integration, compile hint, and auto_create caveat.
Test Coverage Expert 0 3 0 5 unit/static wiring tests pass; 3 integration-tier gaps: _get_gemini_dir path routing, antigravity_command dispatch, .agent/ hook gate.

B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.

Top 5 follow-ups

  1. [Python Architect] (blocking-severity) Add antigravity to _KNOWN_TARGETS in agents_compiler.py and to the string tuple in should_compile_agents_md() in target_detection.py; also add to detect_target() for compile auto-detection. -- apm compile --target antigravity silently exits with CompilationResult(success=False) on this commit. The TargetProfile declares compile_family='agents' but the enforcement gate does not include antigravity. This is a 2-line addition; without it the compile path is functionally broken for the declared contract.
  2. [OSS Growth Hacker] (blocking-severity) Author must provide verifiable evidence that Antigravity CLI is a real, publicly available Google product before this target is merged as a first-class, non-flag-gated integration. -- Both reference URLs in the PR return DNS failures. Gemini CLI on GitHub shows no public sunset signal. Shipping a GA, non-flag-gated target for an unverifiable tool carries community trust risk that exceeds the mechanical correctness of the implementation; maintainer must explicitly accept this risk or supply a verifiable product URL.
  3. [Supply Chain Security + DevX UX Expert] Tighten .agent/ auto-detection: add an explicit if (project_root_path / '.agent').is_dir(): guard in mcp_integrator.py before cleanup writes, and narrow the detection signal to reduce false-positive routing for repos using .agent/ for non-Antigravity purposes. -- Convergent independent finding. .agent/ is used by GitHub Actions, LangChain, and other frameworks. auto_create=False prevents directory creation but not writes when the directory pre-exists. OpenCode and Claude both have explicit is_dir() guards; Antigravity must match that pattern.
  4. [Python Architect + CLI Logging Expert] Fix three inherited Gemini branding strings: Gemini CLI literal in _warn_input_variables(), Gemini in update_config() debug logs, for Gemini in ValueError text in _format_server_config. Rename _get_gemini_dir() to _get_config_dir(). -- Convergent independent finding. User-visible warnings and verbose-mode output name the wrong product for antigravity installs. This is a correctness defect in observable CLI output, not just internal naming convention.
  5. [Doc Writer + OSS Growth Hacker] Add Antigravity column to primitives-and-targets.md compatibility matrix; update what-is-apm.md target count and named list; add auto_create=False caveat to targets-matrix.md; update ide-tool-integration.md MCP config list; add Antigravity to README hero and add a CHANGELOG migration entry. -- The compatibility matrix is declared canonical; the omission creates documentation drift that compounds post-merge. README omission means GA launch has zero top-of-funnel impact.

Architecture

classDiagram
    direction LR
    class MCPClientAdapter {
        <<Abstract>>
        +target_name str
        +user_scope bool
        +configure_mcp_server()
        +get_config_path()
        +update_config()
    }
    class CopilotClientAdapter {
        <<ConcreteAdapter>>
        +_warn_input_variables(runtime_label)
        +_format_server_config()
        +configure_mcp_server()
    }
    class GeminiClientAdapter {
        <<ConcreteAdapter>>
        +target_name str
        +_get_gemini_dir() Path
        +update_config()
        +_format_server_config()
        +configure_mcp_server()
    }
    class AntigravityClientAdapter {
        <<ConcreteAdapter>>
        +target_name str
        +_get_gemini_dir() Path
        +get_config_path() str
    }
    class ClientFactory {
        <<Factory>>
        +_MCP_CLIENT_REGISTRY dict
        +create_client(type) MCPClientAdapter
    }
    class AgentsCompiler {
        <<Compiler>>
        +_KNOWN_TARGETS tuple
        +compile(config) CompilationResult
    }
    class TargetProfile {
        <<ValueObject>>
        +name str
        +root_dir str
        +compile_family str
        +primitives dict
    }

    MCPClientAdapter <|-- CopilotClientAdapter
    CopilotClientAdapter <|-- GeminiClientAdapter
    GeminiClientAdapter <|-- AntigravityClientAdapter
    ClientFactory ..> AntigravityClientAdapter : creates
    AgentsCompiler ..> TargetProfile : reads compile_family

    class AntigravityClientAdapter:::touched
    class GeminiClientAdapter:::touched
    classDef touched fill:#fff3b0,stroke:#d47600
Loading
flowchart TD
    A["apm compile --target antigravity"] --> B["parse_target_field()\ncore/target_detection.py\nreturns 'antigravity'"]
    B --> C["_resolve_compile_target()\ncommands/compile/cli.py"]
    C --> D["detect_target(explicit='antigravity')\ntarget_detection.py\nreturns ('antigravity', reason)"]
    D --> E["AgentsCompiler.compile()\nagents_compiler.py"]
    E --> F{"routing_target in _KNOWN_TARGETS?"}
    F -->|"NO: 'antigravity' absent"| G["CompilationResult(success=False)\nUnknown compilation target"]
    F -->|"YES after fix"| H{"should_compile_agents_md('antigravity')?"}
    H -->|"NO: absent from string tuple"| I["0 files written, no AGENTS.md"]
    H -->|"YES after both fixes"| J["_compile_agents_md() writes AGENTS.md"]
    style G fill:#ffcccc,stroke:#cc0000
    style I fill:#fff0cc,stroke:#d47600
    style J fill:#ccffcc,stroke:#006600
Loading

Recommendation

Two issues require resolution before merge: (1) add antigravity to _KNOWN_TARGETS in agents_compiler.py, to the string tuple in should_compile_agents_md() in target_detection.py, and to detect_target() -- a 2-addition fix with no architectural cost, without which apm compile --target antigravity silently fails on a declared compile_family='agents' contract; and (2) the author must supply verifiable evidence that Antigravity CLI is a real, publicly available Google product, since reference URLs in the PR fail DNS resolution and Gemini CLI shows no public sunset signal -- shipping a non-flag-gated, first-class integration for an unverifiable tool is a community trust risk the maintainer must explicitly accept. Once both are addressed, the remaining findings -- .agent/ collision guard, inherited Gemini branding strings, documentation gaps, missing agy alias, and test coverage gaps for path routing and command dispatch -- should be captured as followup issues or folded into the same PR. The adapter inheritance pattern is correct and the implementation shape is clean; the rework required is narrow and mechanical.


Full per-persona findings

Python Architect

  • [blocking] apm compile --target antigravity fails: 'antigravity' absent from _KNOWN_TARGETS and should_compile_agents_md() at src/apm_cli/compilation/agents_compiler.py
    AgentsCompiler.compile() validates routing_target against the module-local _KNOWN_TARGETS tuple (agents_compiler.py:376-380). 'antigravity' is absent from that tuple (lines 43-55), so the call exits immediately with CompilationResult(success=False) and the error 'Unknown compilation target: antigravity'. Even if that guard were patched, should_compile_agents_md('antigravity') returns False (target_detection.py:241-251) because 'antigravity' is not in the string tuple there either, so _compile_agents_md() would never be invoked and AGENTS.md would not be written. The TargetProfile declares compile_family='agents', which explicitly contracts AGENTS.md emission.
    Suggested: 1. Add 'antigravity' to _KNOWN_TARGETS tuple in agents_compiler.py (lines 43-55). 2. Add 'antigravity' to the should_compile_agents_md() string tuple in target_detection.py (lines 241-251). 3. Add antigravity folder check in detect_target() so apm compile without --target auto-detects .agent/ projects.
  • [recommended] _get_gemini_dir() is a Gemini-branded Template Method hook that leaks into AntigravityClientAdapter at src/apm_cli/adapters/client/gemini.py
    GeminiClientAdapter._get_gemini_dir() is the protected hook that update_config() and configure_mcp_server() call via self. AntigravityClientAdapter overrides it to return .agent/ or ~/.antigravity/, but the method name remains Gemini-branded. update_config() stores the result as gemini_dir (line 84) and logs 'Skipping Gemini project-scope write'. A one-line rename removes the semantic coupling with zero functional change.
    Suggested: Rename _get_gemini_dir() -> _get_config_dir() in GeminiClientAdapter; update the 4 internal call sites and rename the local variable gemini_dir -> config_dir in update_config().
  • [recommended] Hardcoded 'Gemini CLI' in _format_server_config() produces incorrect user-visible warnings and errors for Antigravity at src/apm_cli/adapters/client/gemini.py
    _format_server_config() passes the literal 'Gemini CLI' to _warn_input_variables() at lines 154 and 195. _warn_input_variables() calls _rich_warning() (user-visible console output), so an Antigravity user whose MCP server has ${input:VAR} placeholders will see 'Gemini CLI does not support input variable prompts'. Line 173 raises ValueError with 'for Gemini' in the message for unsupported transports.
    Suggested: Replace the three 'Gemini CLI' / 'for Gemini' literals in _format_server_config() with self.target_name.
  • [nit] update_config() docstring and two debug log strings hardcode '.gemini/' and 'Gemini CLI' at src/apm_cli/adapters/client/gemini.py
    The docstring says 'if (project_root)/.gemini/ does not exist' (wrong for Antigravity) and line 100 logs 'Creating %s for Gemini CLI user configuration'. Both are debug-level only and not user-visible, but they will confuse a developer tracing an Antigravity install with --debug.
    Suggested: Parametrize the docstring to reference 'the target config directory'. Replace line 87/100 log strings with self.target_name.

CLI Logging Expert

  • [recommended] _warn_input_variables still passes 'Gemini CLI' literal -- user-visible [!] warning names wrong product for antigravity installs at src/apm_cli/adapters/client/gemini.py
    _format_server_config() is inherited by AntigravityClientAdapter without override. When a server has ${input:...} placeholders in env or headers, _rich_warning() emits: "${input:myvar} in server 'x' will not be resolved -- Gemini CLI does not support input variable prompts" -- even when the user passed --target antigravity.
    Suggested: Replace both hardcoded 'Gemini CLI' runtime_label args with self.target_name.
  • [recommended] update_config() debug messages hardcode 'Gemini' -- verbose output lies about target for antigravity at src/apm_cli/adapters/client/gemini.py
    With --verbose, users see 'Skipping Gemini project-scope write' and 'Creating ~/.antigravity for Gemini CLI user configuration' while targeting antigravity. Verbose mode is the primary observability channel for agents; wrong target name breaks log correlation.
    Suggested: Line 87: change to logger.debug('Skipping %s project-scope write -- %s does not exist (opt-in)', self.target_name, gemini_dir). Line 100: change to logger.debug('Creating %s for %s user configuration', config_path.parent, self.target_name).
  • [nit] ValueError in _format_server_config hardcodes 'for Gemini' -- appears in --verbose exception context for antigravity unsupported-transport errors at src/apm_cli/adapters/client/gemini.py
    Suggested: Change to f"Unsupported remote transport '{transport}' for target '{self.target_name}'."
  • [nit] target_name slug ('antigravity', 'gemini') used in user-visible success/error messages -- product name display regressed for Gemini, and antigravity ships lowercase-only at src/apm_cli/adapters/client/gemini.py
    Before: 'Configured MCP server x for Gemini CLI'. After: 'Configured MCP server x for gemini'. The PR standardized on target_name which is the routing slug, not the product name.
    Suggested: Add a display_name class attribute to GeminiClientAdapter (display_name = 'Gemini CLI') and AntigravityClientAdapter (display_name = 'Antigravity CLI'). Use self.display_name in _rich_success/_rich_error calls.

DevX UX Expert

  • [recommended] detect_target() (apm compile) omits antigravity; detect_signals() (apm install) includes it -- install and compile behave differently for the same repo at src/apm_cli/core/target_detection.py
    A user with only .agent/ in their repo: apm install auto-detects antigravity (via detect_signals -> SIGNAL_WHITELIST), but apm compile falls through to minimal (detect_target() lines 177-223 checks .github/, .claude/, .cursor/, .opencode/, .codex/, .gemini/, .windsurf/, .kiro/ -- .agent/ is absent).
    Suggested: Add antigravity to detect_target() Priority-3 block.
  • [recommended] .agent/ is a high-collision auto-detection signal -- too generic to uniquely identify Antigravity CLI at src/apm_cli/core/target_detection.py
    Every other target uses a tool-namespaced directory. .agent/ is used by GitHub Actions workflows, LangChain projects, and countless other frameworks. A repo with .agent/ for unrelated tooling will silently get routed to Antigravity mode on apm install.
    Suggested: Require .agent/settings.json or .agent/rules/ as secondary presence check before treating .agent/ as Antigravity marker.
  • [recommended] No agy alias: users who type --target agy get an opaque Unknown target error with no redirect at src/apm_cli/core/target_detection.py
    The installed binary is agy; the APM target is antigravity. For every other tool, binary and target are the same token. The error body shows 'Valid targets: ..., antigravity, ...' with no explanation.
    Suggested: Add 'agy': 'antigravity' to TARGET_ALIASES.
  • [recommended] --global help text omits Antigravity despite supports_user_scope=True and user_root_dir=.antigravity at src/apm_cli/commands/install.py
    install.py: 'MCP servers target global-capable runtimes only (Copilot CLI, Claude Code, Codex CLI, Gemini CLI, Kiro, Windsurf, JetBrains Copilot).' AntigravityClientAdapter sets supports_user_scope=True but is not listed.
    Suggested: Append 'Antigravity CLI' to the --global help text list after 'Gemini CLI'.
  • [nit] _SIGNAL_LIST in errors.py is missing .kiro/ -- this PR adds .agent/ but omits the already-registered kiro signal at src/apm_cli/core/errors.py
    Suggested: Add '.kiro/' to _SIGNAL_LIST.
  • [nit] deps/cli.py --target --all description missing kiro; inconsistent with install.py which includes it at src/apm_cli/commands/deps/cli.py
    Suggested: Append '+kiro' after '+windsurf' in the deps/cli.py --target help string.

Supply Chain Security Expert

  • [recommended] .agent/ is too generic a detection signal; detect_by_dir=True risks APM writing into non-Antigravity directories at src/apm_cli/integration/targets.py
    detect_by_dir=True on root_dir='.agent' means any project with a .agent/ directory for any other purpose is silently classified as an Antigravity project. auto_create=False only prevents APM from creating the directory, not writes when the directory pre-exists. Cleanup path also removes entries from any .agent/settings.json that contains an mcpServers key.
    Suggested: Add a secondary discriminating signal before treating .agent/ as Antigravity. Strongest option: check for .agent/settings.json containing a known Antigravity-specific top-level key.
  • [recommended] Comment 'only if .agent/ directory exists' is false; no is_dir() guard present unlike OpenCode/Claude at src/apm_cli/integration/mcp_integrator.py
    The comment says 'Clean .agent/settings.json (only if .agent/ directory exists)' but no explicit is_dir() check gates the _clean_json_mcp_config call. OpenCode (line 648-649) and Claude (lines 743-744) both have explicit guards.
    Suggested: Add if (project_root_path / '.agent').is_dir(): guard matching the OpenCode/Claude pattern.
  • [nit] Project-scope .agent/settings.json can contain plaintext resolved credentials with no gitignore warning at src/apm_cli/adapters/client/gemini.py
    Suggested: When _format_server_config writes a non-empty 'env' block to project-scope config (user_scope=False), emit a _rich_warning advising the user to add .agent/settings.json to .gitignore.
  • [nit] \bagy\b regex matches hyphenated compound identifiers, triggering false-positive Antigravity runtime detection at src/apm_cli/integration/mcp_integrator.py
    re.search(r'\bantigravity\b|\bagy\b', command) treats '-' as a word-boundary character. A command like 'run-agy-migration.sh' will match and add 'antigravity' to detected runtimes.
    Suggested: Tighten to r'\bantigravity\b|(?<![\w-])agy(?![\w-])' or drop the agy alias from the regex.

OSS Growth Hacker

  • [recommended] Core premise (Gemini CLI sunset) is unverifiable and reference URLs return no response at src/apm_cli/integration/targets.py
    antigravity.google returns DNS/connection failure (not even a redirect), 'antigravity.google' is not a documented Google product domain, and Gemini CLI on GitHub shows no sunset signal. If APM ships a first-class target for a tool whose existence cannot be independently confirmed, the credibility damage at the top of the funnel is severe.
    Suggested: Before merging: confirm Antigravity CLI is publicly announced and replace the Ref: comments with URLs that actually resolve. If the tool is not yet GA, reintroduce the experimental gate.
  • [recommended] README hero and inline tool lists omit Antigravity -- top-of-funnel gap for a GA-claimed target at README.md
    The hero (line 7) and lines 70 and 149 all miss Antigravity. A user arriving from a 'Gemini CLI successor' search who reads the README will not see APM as supporting their tool.
    Suggested: Add 'Antigravity' to the hero line and the two inline tool lists.
  • [recommended] No Gemini-to-Antigravity migration story -- silent friction for existing APM users at docs/src/content/docs/reference/targets-matrix.md
    Users with 'target: gemini' in their apm.yml receive zero guidance. No deprecation note, no 'see also' pointer, no CLI hint, no CHANGELOG migration entry.
    Suggested: Add a 'Successor' callout under the gemini section pointing to antigravity.
  • [recommended] Binary name 'agy' is not surfaced in the target slug or docs navigation -- discoverability gap at docs/src/content/docs/reference/targets-matrix.md
    Users who know the tool by its binary name 'agy' will type --target agy and get a rejection.
    Suggested: Add '(binary: agy)' to the antigravity heading and detection signal table row.
  • [nit] antigravity in --target all adds clutter for users who have never heard of the tool

Auth Expert -- inactive

No auth-surface files touched; AntigravityClientAdapter writes local JSON config only and does not change token management, credential resolution, host classification, or AuthResolver paths.

Doc Writer

  • [blocking] Antigravity column entirely absent from the primitive compatibility matrix at docs/src/content/docs/concepts/primitives-and-targets.md
    The matrix (lines 108-117) lists columns for Copilot, Claude, Cursor, Codex, Gemini, OpenCode, Windsurf, and Kiro but has no Antigravity column at all. The targets table above the matrix was correctly updated; the matrix was not. Users relying on this page to understand what each primitive does on Antigravity have no source of truth.
    Suggested: Insert an Antigravity column between Gemini and OpenCode. instructions=native, prompts=unsupported, agents=compiled, skills=native, hooks=native, commands=native, plugins=compiled, MCP=native.
  • [recommended] apm-guide commands.md incorrectly classifies Antigravity as compile-only at packages/apm-guide/.apm/skills/apm-usage/commands.md
    commands.md lists 'Compile-only targets (opencode, codex, gemini, antigravity)'. But Antigravity has a native instructions primitive (antigravity_rules) that deploys .instructions.md files to .agent/rules/ at apm install time.
    Suggested: Remove antigravity from the compile-only list.
  • [recommended] auto_create=False not documented: .agent/ must exist before apm install writes anything at docs/src/content/docs/reference/targets-matrix.md
    apm install --target antigravity silently writes nothing if .agent/ does not exist. No caveat for this behavior in the targets-matrix or ide-tool-integration docs.
    Suggested: Add a Caveat bullet to the antigravity section: 'apm does not create .agent/ automatically. Run mkdir .agent before apm install for project-scope deploys to take effect.'
  • [recommended] ide-tool-integration.md MCP config bullet list missing Antigravity entry at docs/src/content/docs/integrations/ide-tool-integration.md
    The MCP server integration section enumerates per-harness config file paths for all other tools but omits Antigravity (.agent/settings.json, project scope; ~/.antigravity/settings.json, user scope).
    Suggested: Add a bullet between Gemini and OpenCode entries.
  • [recommended] what-is-apm.md 'Seven harnesses' count is wrong (9 canonical targets now) and Antigravity missing from named list at docs/src/content/docs/concepts/what-is-apm.md
    Line 50 reads 'Seven harnesses' but there are now 9 canonical targets. Antigravity is absent from the named list.
    Suggested: Update to 'Nine harnesses' or drop the count and use 'every supported harness'.
  • [nit] primitives-and-targets.md lead sentence omits Antigravity and Kiro at docs/src/content/docs/concepts/primitives-and-targets.md
    Line 8: 'A target is a harness APM compiles primitives for: Copilot, Claude, Cursor, Codex, Gemini, OpenCode, and Windsurf.' Both Antigravity and Kiro are missing.

Test Coverage Expert

  • [recommended] AntigravityClientAdapter._get_gemini_dir() path routing has no test at any tier at src/apm_cli/adapters/client/antigravity.py
    grep confirms zero hits for '_get_gemini_dir' in tests/. If the override is wrong, apm install for antigravity silently writes MCP config to the wrong directory. GeminiClientAdapter has get_config_path tests in test_wave3_integrators_coverage.py but none instantiate AntigravityClientAdapter.
    Suggested: Add tests/integration/test_antigravity_adapter.py with two parametrized cases for project scope (.agent/settings.json) and user scope (~/.antigravity/settings.json).
    Proof (missing): tests/integration/test_antigravity_adapter.py::test_get_gemini_dir_project_scope_returns_dot_agent -- proves: apm install for antigravity writes MCP config to .agent/settings.json, not .gemini/settings.json [devx, portability-by-manifest]
  • [recommended] antigravity_command format_id is absent from all test parametrizations; only gemini_command has a dispatch test at src/apm_cli/integration/command_integrator.py
    grep confirms zero hits for 'antigravity_command' in tests/. command_integrator.py line 581 adds 'antigravity_command' to the format dispatch condition, but no test exercises this path.
    Suggested: In tests/integration/test_command_integrator_hermetic.py, add a test alongside the existing gemini_command test that sets format_id='antigravity_command' and asserts _write_gemini_command is called.
    Proof (missing): tests/integration/test_command_integrator_hermetic.py::test_full_flow_antigravity_command_dispatches_to_write_gemini_command -- proves: apm install for antigravity routes command files through _write_gemini_command (TOML format) [devx]
  • [recommended] No TestAntigravityHookIntegration: .agent/ require_dir gate, event renaming, and antigravity-hooks stem routing are all untested at src/apm_cli/integration/hook_integrator.py
    grep confirms zero hits for 'antigravity' in test_hook_integrator.py. hook_integrator.py adds: require_dir=True MergeHookConfig, antigravity event mapping BeforeTool/AfterTool/SessionEnd, 'antigravity-hooks' stem routing. TestGeminiHookIntegration has six tests for the .gemini/ parallel including test_skips_when_no_gemini_dir. No equivalent class exists for antigravity.
    Suggested: Add TestAntigravityHookIntegration mirroring TestGeminiHookIntegration: fixture creates .agent/ dir, assert Stop renamed to SessionEnd in .agent/settings.json, assert require_dir=True gate fires when .agent/ is absent.
    Proof (missing): tests/unit/integration/test_hook_integrator.py::TestAntigravityHookIntegration.test_integrate_hooks_antigravity -- proves: apm install for antigravity writes renamed hook events (Stop->SessionEnd) into .agent/settings.json [devx]

Performance Expert -- inactive

No performance-sensitive files touched; the PR adds a new target adapter with local file writes only; the single regex addition in mcp_integrator is not on the install hot path.

This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • antigravity.google
  • pypi.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "antigravity.google"
    - "pypi.org"

See Network Configuration for more information.

Generated by PR Review Panel for issue #1770 · sonnet46 24.9M ·

@github-actions github-actions Bot removed the panel-review Trigger the apm-review-panel gh-aw workflow label Jun 15, 2026
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.

[FEATURE] Google Antigravity CLI (agy) Support

3 participants