-
Notifications
You must be signed in to change notification settings - Fork 1k
Add Antigravity workflow support #318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| ## Why | ||
| Google is rolling out Antigravity, a Windsurf-derived IDE that discovers workflows from `.agent/workflows/*.md`. Today OpenSpec can only scaffold slash commands for Windsurf directories, so Antigravity users cannot run the proposal/apply/archive flows from the IDE. | ||
|
|
||
| ## What Changes | ||
| - Add Antigravity as a selectable native tool in `openspec init` so it creates `.agent/workflows/openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md` with YAML frontmatter containing only a `description` field plus the standard OpenSpec-managed body. | ||
| - Ensure `openspec update` refreshes the body of any existing Antigravity workflows inside `.agent/workflows/` without creating missing files, mirroring the Windsurf behavior. | ||
| - Share e2e/template coverage confirming the generator writes the proper directory, filename casing, and frontmatter format so Antigravity picks up the workflows. | ||
|
|
||
| ## Impact | ||
| - Affected specs: `specs/cli-init`, `specs/cli-update` | ||
| - Expected code: CLI init/update tool registries, slash-command templates, associated tests |
9 changes: 9 additions & 0 deletions
9
openspec/changes/add-antigravity-support/specs/cli-init/spec.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| ## MODIFIED Requirements | ||
| ### Requirement: Slash Command Configuration | ||
| The init command SHALL generate slash command files for supported editors using shared templates. | ||
|
|
||
| #### Scenario: Generating slash commands for Antigravity | ||
| - **WHEN** the user selects Antigravity during initialization | ||
| - **THEN** create `.agent/workflows/openspec-proposal.md`, `.agent/workflows/openspec-apply.md`, and `.agent/workflows/openspec-archive.md` | ||
| - **AND** ensure each file begins with YAML frontmatter that contains only a `description: <stage summary>` field followed by the shared OpenSpec workflow instructions wrapped in managed markers | ||
| - **AND** populate the workflow body with the same proposal/apply/archive guidance used for other tools so Antigravity behaves like Windsurf while pointing to the `.agent/workflows/` directory |
8 changes: 8 additions & 0 deletions
8
openspec/changes/add-antigravity-support/specs/cli-update/spec.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| ## MODIFIED Requirements | ||
| ### Requirement: Slash Command Updates | ||
| The update command SHALL refresh existing slash command files for configured tools without creating new ones, and ensure the OpenCode archive command accepts change ID arguments. | ||
|
|
||
| #### Scenario: Updating slash commands for Antigravity | ||
| - **WHEN** `.agent/workflows/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md` | ||
| - **THEN** refresh the OpenSpec-managed portion of each file so the workflow copy matches other tools while preserving the existing single-field `description` frontmatter | ||
| - **AND** skip creating any missing workflow files during update, mirroring the behavior for Windsurf and other IDEs |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| ## 1. CLI init support | ||
| - [x] 1.1 Surface Antigravity in the native-tool picker (interactive + `--tools`) so it toggles alongside other IDEs. | ||
| - [x] 1.2 Generate `.agent/workflows/openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md` with YAML frontmatter restricted to a single `description` field for each stage and wrap the body in OpenSpec markers. | ||
| - [x] 1.3 Confirm workspace scaffolding covers missing directory creation and re-run scenarios so repeated init refreshes the managed block. | ||
|
|
||
| ## 2. CLI update support | ||
| - [x] 2.1 Detect existing Antigravity workflow files during `openspec update` and refresh only the managed body, skipping creation when files are missing. | ||
| - [x] 2.2 Ensure update logic preserves the `description` frontmatter block exactly as written by init, including case and spacing, and refreshes body templates alongside other tools. | ||
|
|
||
| ## 3. Templates and tests | ||
| - [x] 3.1 Add shared template entries for Antigravity that reuse the Windsurf copy but target `.agent/workflows` plus the description-only frontmatter requirement. | ||
| - [x] 3.2 Expand automated coverage (unit or integration) verifying init and update produce the expected file paths and frontmatter + body markers for Antigravity. |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import { SlashCommandConfigurator } from './base.js'; | ||
| import { SlashCommandId } from '../../templates/index.js'; | ||
|
|
||
| const FILE_PATHS: Record<SlashCommandId, string> = { | ||
| proposal: '.agent/workflows/openspec-proposal.md', | ||
| apply: '.agent/workflows/openspec-apply.md', | ||
| archive: '.agent/workflows/openspec-archive.md' | ||
| }; | ||
|
|
||
| const DESCRIPTIONS: Record<SlashCommandId, string> = { | ||
| proposal: 'Scaffold a new OpenSpec change and validate strictly.', | ||
| apply: 'Implement an approved OpenSpec change and keep tasks in sync.', | ||
| archive: 'Archive a deployed OpenSpec change and update specs.' | ||
| }; | ||
|
|
||
| export class AntigravitySlashCommandConfigurator extends SlashCommandConfigurator { | ||
| readonly toolId = 'antigravity'; | ||
| readonly isAvailable = true; | ||
|
|
||
| protected getRelativePath(id: SlashCommandId): string { | ||
| return FILE_PATHS[id]; | ||
| } | ||
|
|
||
| protected getFrontmatter(id: SlashCommandId): string | undefined { | ||
| const description = DESCRIPTIONS[id]; | ||
| return `---\ndescription: ${description}\n---`; | ||
| } | ||
| } |
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
LGTM! Comprehensive update test for Antigravity workflows.
The test properly validates:
auto_execution_modeis not added (distinguishing from Windsurf)Verify that there's a test ensuring missing Antigravity workflow files are NOT created during update (following the pattern from other tools):
🏁 Script executed:
Length of output: 0
🏁 Script executed:
Length of output: 71
🏁 Script executed:
Length of output: 1270
🏁 Script executed:
Length of output: 370
🏁 Script executed:
Length of output: 71
🏁 Script executed:
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