Skip to content

fix(agy): enhance Antigravity CLI compatibility and execution flags - #4612

Open
stn1slv wants to merge 2 commits into
github:mainfrom
stn1slv:fix/agy-cli-compatibility
Open

stn1slv wants to merge 2 commits into
github:mainfrom
stn1slv:fix/agy-cli-compatibility

Conversation

@stn1slv

@stn1slv stn1slv commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Description

What

This pull request updates the Antigravity (agy) integration to support modern Antigravity CLI features and align with Spec Kit conventions:

  • Supports --model <model> and --output-format json in AgyIntegration.build_exec_args().
  • Places all option flags and operator extra arguments (SPECKIT_INTEGRATION_AGY_EXTRA_ARGS) before the positional --print <prompt> argument pair.
  • Adds safe, opt-in headless tool auto-approval via --dangerously-skip-permissions, disabled by default and controllable via SPECKIT_AGY_ALLOW_ALL_TOOLS=1 or SPECKIT_INTEGRATION_AGY_ALLOW_ALL_TOOLS=1. Empty or blank strings in the specific override fall through cleanly to the generic variable.
  • Relies directly on base class SkillsIntegration for hook command normalization and post-processing, removing duplicate regex code and redundant file rewrite loops.
  • Updates documentation and initialization warning to reference Antigravity v1.0.0 or newer instead of v1.20.5.
  • Updates integrations/catalog.json with the cli tag and clarifies CLI and IDE support in the description.
  • Expands unit test coverage in tests/integrations/test_integration_agy.py to 58 tests covering all argument configurations, precedence rules, and test environment isolation.

Why

  • The Antigravity CLI supports --model and JSON output mode, but build_exec_args() previously dropped both parameters.
  • Some CLI argument parsers stop option parsing after positional arguments. Placing options before --print <prompt> ensures reliable argument parsing.
  • Headless execution requires tool auto-approval when running non-interactively without user prompts. Keeping this opt-in preserves security defaults while enabling automated workflows.
  • Version 1.20.5 does not correspond to Antigravity CLI versions, causing confusion during project initialization.
  • The catalog lacked the cli tag, preventing Antigravity from appearing in CLI integration listings.

Testing

  • Tested locally with uv run specify --help
  • Ran existing tests with uv sync && uv run pytest
  • Tested with a sample project (if applicable)

Additional test details:

  • uv run pytest tests/integrations/test_integration_agy.py -v: 58/58 passed.
  • uv run pytest tests/integrations/test_integration_catalog.py tests/contract/test_catalog_schema.py: 179/179 passed.
  • uv run pytest tests/test_agent_config_consistency.py: 28/28 passed.
  • Full test suite: 8,133 passed.
  • uv run ruff check and uv run ruff format --check: clean.

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (describe below)

Investigated compatibility and CLI flag behavior, implemented argument handling and test cases, and ran multi-model reviews using Google Antigravity pair programming under human supervision.

Copilot AI balanced review requested due to automatic review settings September 17, 2026 09:17
@stn1slv
stn1slv requested a review from mnriem as a code owner September 17, 2026 09:17

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.

🟡 Changes recommended

The compatibility warning conflates the CLI and IDE version tracks.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates Antigravity integration compatibility, execution flags, safety controls, documentation, and tests.

Changes:

  • Adds model, JSON output, extra-argument ordering, and opt-in permission bypass.
  • Delegates skill post-processing to SkillsIntegration.
  • Updates catalog metadata, documentation, and test coverage.
File summaries
File Description
src/specify_cli/integrations/agy/__init__.py Updates execution and setup behavior.
tests/integrations/test_integration_agy.py Expands regression coverage.
integrations/catalog.json Adds CLI metadata.
docs/reference/integrations.md Documents layout and permission configuration.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/specify_cli/integrations/agy/__init__.py Outdated
@mnriem mnriem added the triage-nice-to-have Verdict: evidence-backed fix or greenlit feature — land after review label Sep 17, 2026
@mnriem
mnriem requested a balanced review from Copilot September 17, 2026 12:45

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.

🟢 Approval recommended

The changes are consistent with shared integration behavior and adequately covered by focused tests.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@mnriem mnriem added author-awaiting Waiting on author response author-needs-rebase Branch conflicts with main — rebase/resolve before merge labels Sep 18, 2026

@mnriem mnriem left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please resolve conflicts

Support --model, --output-format json, and opt-in permissions bypass.
Position options before prompt and inherit hook normalization from base.
Add CLI catalog tags and comprehensive integration tests.
@stn1slv
stn1slv force-pushed the fix/agy-cli-compatibility branch from 226465b to 1ac22ec Compare September 18, 2026 13:36
Copilot AI review requested due to automatic review settings September 18, 2026 13:36

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.

🟢 Approval recommended

The implementation is consistent with shared integration behavior and has comprehensive regression coverage.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@stn1slv
stn1slv requested a review from mnriem September 18, 2026 13:43
Clarify CLI and IDE version tracks per review feedback on PR github#4612.
Harden workspace path resolution and assert manifest hash tracking.
Isolate environment state and verify exact argument ordering.
Copilot AI review requested due to automatic review settings September 18, 2026 14:42
@stn1slv

stn1slv commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on main and resolved conflicts. Ready for review!

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.

🟢 Approval recommended

The implementation matches the documented CLI contract and includes comprehensive regression coverage.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author-awaiting Waiting on author response author-needs-rebase Branch conflicts with main — rebase/resolve before merge triage-nice-to-have Verdict: evidence-backed fix or greenlit feature — land after review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants