Skip to content

Conversation

@TabishB
Copy link
Contributor

@TabishB TabishB commented Nov 19, 2025

Summary

  • add Antigravity to init/update plus shared slash configurator
  • document the new tool and include proposal/spec artifacts

Testing

  • pnpm test -- test/core/init.test.ts test/core/update.test.ts
  • openspec validate add-antigravity-support --strict

Summary by CodeRabbit

  • New Features

    • Antigravity added as a selectable tool in the OpenSpec CLI init flow.
    • Init generates three slash-command workflows (proposal, apply, archive) in the workspace workflows directory with description-only frontmatter.
    • Update refreshes the managed body of existing Antigravity workflows without creating missing files and preserves the description frontmatter.
  • Documentation

    • Added Antigravity to supported tools docs with available slash commands.
  • Tests

    • Added automated tests for Antigravity init and update behavior.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 19, 2025

Walkthrough

Adds Antigravity as a native AI tool, including a new slash-command configurator and registry registration. CLI init now generates three Antigravity workflow files at .agent/workflows/ with description-only YAML frontmatter; openspec update refreshes managed workflow bodies while preserving frontmatter.

Changes

Cohort / File(s) Change Summary
Changelog & README
CHANGELOG.md, README.md
Added Unreleased changelog entry and added Antigravity to Supported AI Tools table with slash commands and workflow path.
Design & Specs
openspec/changes/add-antigravity-support/proposal.md, openspec/changes/add-antigravity-support/tasks.md, openspec/changes/add-antigravity-support/specs/cli-init/spec.md, openspec/changes/add-antigravity-support/specs/cli-update/spec.md
New proposal, tasks, and spec documents describing init generation of three workflow files with description-only frontmatter and update behavior that refreshes managed bodies without creating missing files.
Core config
src/core/config.ts
Appended Antigravity entry to exported AI_TOOLS array.
Slash configurator
src/core/configurators/slash/antigravity.ts
Added AntigravitySlashCommandConfigurator implementing path and description mappings and frontmatter generation for proposal/apply/archive commands.
Registry
src/core/configurators/slash/registry.ts
Imported and registered AntigravitySlashCommandConfigurator in the slash command registry.
Tests
test/core/init.test.ts, test/core/update.test.ts
Added tests verifying Antigravity workflow file creation, frontmatter structure, content/managed-block refresh on update, and that missing files are not created by update.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant CLI as OpenSpec CLI
    participant Registry as SlashCommandRegistry
    participant Configurator as AntigravityConfigurator
    participant FS as FileSystem

    User->>CLI: openspec init (select Antigravity)
    CLI->>Registry: resolve configurators
    Registry->>Configurator: instantiate/register antigravity
    CLI->>Configurator: generate slash commands
    Configurator->>FS: create `.agent/workflows/openspec-proposal.md` (description frontmatter + managed body)
    FS-->>Configurator: created
    Configurator->>FS: create `.agent/workflows/openspec-apply.md`
    FS-->>Configurator: created
    Configurator->>FS: create `.agent/workflows/openspec-archive.md`
    FS-->>Configurator: created
    Configurator-->>CLI: success
    CLI-->>User: workflows created
Loading
sequenceDiagram
    actor User
    participant CLI as OpenSpec CLI
    participant Registry as SlashCommandRegistry
    participant Configurator as AntigravityConfigurator
    participant FS as FileSystem

    User->>CLI: openspec update
    CLI->>Registry: list registered configurators
    Registry->>Configurator: antigravity
    Configurator->>FS: read existing `.agent/workflows/openspec-apply.md`
    FS-->>Configurator: file content (includes description frontmatter + managed block)
    Configurator->>Configurator: preserve frontmatter, refresh managed block
    Configurator->>FS: write updated file (frontmatter + new managed body)
    FS-->>Configurator: updated
    Configurator-->>CLI: report updated files
    CLI-->>User: update complete
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Pay attention to the FILE_PATHS and DESCRIPTIONS mappings and filename casing/paths in antigravity.ts.
  • Verify frontmatter generation is strictly description-only and that update preserves existing description formatting.
  • Check registry integration for initialization ordering and that tests correctly simulate init/update flows.

Possibly related PRs

Suggested reviewers

  • Israel-Laguan

Poem

🐰 Antigravity springs with a joyful bound,

Three little workflows now dot the ground,
Frontmatter whispers one-line lore,
Update hops in and refreshes the core,
A rabbit claps — new tool configured and sound!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding Antigravity workflow support. It is specific, relates directly to the primary objective, and accurately represents the core changes throughout the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch antigravity-proposal

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 857a57b and d8a164c.

📒 Files selected for processing (2)
  • test/core/init.test.ts (2 hunks)
  • test/core/update.test.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/core/init.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b5a7d09 and 857a57b.

📒 Files selected for processing (11)
  • CHANGELOG.md (1 hunks)
  • README.md (1 hunks)
  • openspec/changes/add-antigravity-support/proposal.md (1 hunks)
  • openspec/changes/add-antigravity-support/specs/cli-init/spec.md (1 hunks)
  • openspec/changes/add-antigravity-support/specs/cli-update/spec.md (1 hunks)
  • openspec/changes/add-antigravity-support/tasks.md (1 hunks)
  • src/core/config.ts (1 hunks)
  • src/core/configurators/slash/antigravity.ts (1 hunks)
  • src/core/configurators/slash/registry.ts (3 hunks)
  • test/core/init.test.ts (2 hunks)
  • test/core/update.test.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
src/core/config.ts (1)
src/core/init.ts (2)
  • formatToolNames (919-934)
  • promptForAITools (559-630)
src/core/configurators/slash/registry.ts (1)
src/core/configurators/slash/antigravity.ts (1)
  • AntigravitySlashCommandConfigurator (16-28)
test/core/init.test.ts (1)
src/utils/file-system.ts (1)
  • fileExists (76-86)
🔇 Additional comments (16)
README.md (1)

105-105: LGTM! Documentation addition looks correct.

The Antigravity entry follows the same format as other tools and correctly documents the commands and workflow path.

CHANGELOG.md (1)

3-8: LGTM! Clear and comprehensive changelog entry.

The entry accurately describes the Antigravity integration, including both init and update behaviors, and provides helpful context by comparing to Windsurf.

src/core/config.ts (1)

33-33: LGTM! Configuration entry is properly structured.

The Antigravity tool entry follows the established pattern with all required fields correctly populated.

test/core/init.test.ts (2)

216-258: LGTM! Comprehensive test coverage for Antigravity workflow generation.

The test properly validates:

  • All three workflow files are created in the correct location
  • YAML frontmatter contains only the description field
  • OpenSpec managed markers are present
  • Workflow bodies contain expected content
  • Critically, it verifies the absence of auto_execution_mode, distinguishing Antigravity from Windsurf

901-911: LGTM! Extend mode detection test is properly implemented.

The test correctly verifies that Antigravity is marked as already configured during extend mode, following the same pattern as other tools.

openspec/changes/add-antigravity-support/specs/cli-update/spec.md (1)

1-8: LGTM! Clear and comprehensive spec for update behavior.

The spec properly documents:

  • Refresh semantics for existing files only
  • Preservation of description frontmatter (critical for not losing user customizations)
  • Consistency with Windsurf behavior (no creation of missing files)
openspec/changes/add-antigravity-support/specs/cli-init/spec.md (1)

1-9: LGTM! Well-documented init behavior specification.

The spec clearly defines:

  • File creation locations and names
  • Frontmatter structure (description-only YAML)
  • Reuse of shared workflow templates
  • Behavioral alignment with Windsurf
src/core/configurators/slash/registry.ts (1)

20-20: Antigravity configurator integration is complete and verified.

The import statement, instantiation, and registration all follow the established pattern. Verification confirms AntigravitySlashCommandConfigurator is properly exported with toolId = 'antigravity'.

openspec/changes/add-antigravity-support/proposal.md (3)

4-7: LGTM - Clear and comprehensive change description.

The "What Changes" section clearly outlines the scope: adding Antigravity as a selectable tool, generating three workflow files with appropriate frontmatter, and ensuring update behavior mirrors existing Windsurf functionality.


9-11: LGTM - Appropriate impact scope.

The impact section correctly identifies the affected CLI specs and expected code areas (registries, templates, tests).


2-2: Based on my verification, I found that:

  1. Antigravity is led by Varun Mohan, the former CEO of Windsurf, as part of Google's $2.4 billion talent acquisition of Windsurf employees, but the product is not "Windsurf-derived"—rather, Google built a new IDE with Windsurf team expertise.

  2. The claim about discovering workflows from .agent/workflows/*.md lacks documentation support. All available sources describe Antigravity as having browser control capabilities and executing tasks autonomously across editor, terminal, and browser, but no sources mention discovering workflows from that specific path convention.

Correct the Antigravity description and verify workflow discovery claim.

The proposal should clarify that Antigravity is a Google-built IDE (not Windsurf-derived, though it benefits from Windsurf team expertise). More importantly, verify whether Antigravity actually discovers workflows from .agent/workflows/*.md—this detail appears unsupported by current documentation.

openspec/changes/add-antigravity-support/tasks.md (1)

1-12: LGTM - Comprehensive and well-structured task breakdown.

The task checklist effectively covers all aspects of Antigravity integration:

  • CLI init and update flows
  • Frontmatter and body management
  • Template reuse and test coverage

All tasks appropriately marked complete for this PR.

src/core/configurators/slash/antigravity.ts (4)

4-14: LGTM - Well-defined constants with clear mappings.

The FILE_PATHS and DESCRIPTIONS constants provide clear mappings for all three workflow stages. The file paths correctly target .agent/workflows/ with the expected naming convention, and the descriptions appropriately describe each stage's purpose.


16-18: LGTM - Proper class structure and properties.

The class correctly extends SlashCommandConfigurator with appropriate toolId and availability settings. This follows the established pattern for other IDE configurators in the codebase.


20-22: LGTM - Type-safe path resolution.

The getRelativePath method correctly delegates to the FILE_PATHS mapping. Since FILE_PATHS is typed as Record<SlashCommandId, string>, TypeScript ensures all valid SlashCommandId values have corresponding paths.


24-27: LGTM - Correct YAML frontmatter generation.

The getFrontmatter method properly generates YAML frontmatter with the description field. The format ---\ndescription: ${description}\n--- is correct and matches the specification for description-only frontmatter.

Comment on lines +470 to +500
it('should refresh existing Antigravity workflows', async () => {
const agPath = path.join(
testDir,
'.agent/workflows/openspec-apply.md'
);
await fs.mkdir(path.dirname(agPath), { recursive: true });
const initialContent = `---
description: Implement an approved OpenSpec change and keep tasks in sync.
---
<!-- OPENSPEC:START -->
Old body
<!-- OPENSPEC:END -->`;
await fs.writeFile(agPath, initialContent);

const consoleSpy = vi.spyOn(console, 'log');

await updateCommand.execute(testDir);

const updated = await fs.readFile(agPath, 'utf-8');
expect(updated).toContain('Work through tasks sequentially');
expect(updated).not.toContain('Old body');
expect(updated).toContain('description: Implement an approved OpenSpec change and keep tasks in sync.');
expect(updated).not.toContain('auto_execution_mode: 3');

const [logMessage] = consoleSpy.mock.calls[0];
expect(logMessage).toContain(
'Updated slash commands: .agent/workflows/openspec-apply.md'
);
consoleSpy.mockRestore();
});
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

LGTM! Comprehensive update test for Antigravity workflows.

The test properly validates:

  • Workflow body is refreshed with latest content
  • Description frontmatter is preserved (critical!)
  • Old content is removed
  • auto_execution_mode is not added (distinguishing from Windsurf)
  • Console output confirms the update

Verify that there's a test ensuring missing Antigravity workflow files are NOT created during update (following the pattern from other tools):


🏁 Script executed:

#!/bin/bash
# Search for a test that verifies missing Antigravity files aren't created on update
rg -n -A10 "should not create missing.*Antigravity" test/core/update.test.ts

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Search for all Antigravity-related tests to understand what's covered
rg -n "Antigravity" test/core/update.test.ts | head -20

Length of output: 71


🏁 Script executed:

#!/bin/bash
# Search for all "should not create missing" tests to see the pattern used
rg -n -B2 "should not create missing" test/core/update.test.ts

Length of output: 1270


🏁 Script executed:

#!/bin/bash
# Search for all Windsurf tests to compare patterns (mentioned in original comment)
rg -n "Windsurf" test/core/update.test.ts | head -20

Length of output: 370


🏁 Script executed:

#!/bin/bash
# Check if there are any other Antigravity tests after line 470
rg -n "Antigravity" test/core/update.test.ts

Length of output: 71


🏁 Script executed:

#!/bin/bash
# Also search for tests after line 500 to confirm coverage
rg -n "should not create missing" test/core/update.test.ts | tail -5

Length of output: 441


Add missing test for Antigravity file creation prevention.

The test at lines 470-500 is comprehensive and correct. However, verification confirms that a corresponding test is missing: should not create missing Antigravity workflows on update.

All other tools in the test file (Windsurf, Qwen, Codex, GitHub Copilot, Factory, Amazon Q Developer, Auggie, CodeBuddy, Crush, RooCode, CoStrict, Qoder) include both a refresh test and a "should not create missing" test. Antigravity should follow the same pattern.

🤖 Prompt for AI Agents
In test/core/update.test.ts around lines 470 to 500, add a new unit test named
"should not create missing Antigravity workflows on update" that mirrors the
pattern used for other tools: ensure the .agent/workflows/openspec-apply.md file
does not exist beforehand, run updateCommand.execute(testDir), assert the file
was not created (fs.exists or attempting to read should fail), and verify no
"Updated slash commands: .agent/workflows/openspec-apply.md" console log was
emitted; use the same setup/teardown and console spying conventions as the
existing Antigravity refresh test so behavior is consistent with other tools'
"should not create missing" tests.

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.

2 participants