Skip to content

fix(antigravity): update skill and workflow paths from .agent to .agents#830

Open
alfred-openspec wants to merge 1 commit intomainfrom
fix/antigravity-agents-dir
Open

fix(antigravity): update skill and workflow paths from .agent to .agents#830
alfred-openspec wants to merge 1 commit intomainfrom
fix/antigravity-agents-dir

Conversation

@alfred-openspec
Copy link
Collaborator

@alfred-openspec alfred-openspec commented Mar 11, 2026

Summary

Antigravity has migrated from .agent (singular) to .agents (plural) for workspace skills and workflows directories. The old .agent path still works via backward compatibility, but the official Antigravity docs now specify .agents.

Problem

Users reported in Discord that after updating to Antigravity v1.20.5, OpenSpec /opsx-* slash commands weren't appearing. While the slash command menu issue is an Antigravity-side bug, OpenSpec should align with the current directory standard for forward compatibility.

Changes

  • src/core/config.ts: skillsDir .agent.agents
  • src/core/command-generation/adapters/antigravity.ts: workflow path .agent/workflows/.agents/workflows/
  • src/core/legacy-cleanup.ts: added cleanup patterns for old .agent/ artifacts so openspec update migrates users cleanly
  • docs/supported-tools.md: updated Antigravity row in tool directory table
  • test/core/command-generation/adapters.test.ts: updated expected path assertion

Notes

  • The / workflow listing being broken in v1.20.5 is a confirmed Antigravity bug (tracked on Google AI Developers Forum). This PR doesn't fix that, but ensures OpenSpec installs to the correct directory going forward.
  • Users can work around the slash menu issue by invoking skills directly (e.g., "follow the openspec-propose skill") or referencing .agents/skills/openspec-propose/SKILL.md in the chat.
  • Legacy cleanup now covers both old .agent/workflows/openspec-*.md and .agent/workflows/opsx-*.md patterns.

All 1,341 tests pass. ✅

Summary by CodeRabbit

  • Chores
    • Updated Antigravity tool configuration to reference .agents/ directory structure for workflow files.
    • Expanded legacy path detection to recognize Antigravity artifacts across multiple directory variations, maintaining backward compatibility.

Antigravity has migrated from .agent (singular) to .agents (plural) for
workspace skills and workflows. The old .agent path still works via
backward compatibility, but the official docs now specify .agents.

Changes:
- config.ts: skillsDir '.agent' -> '.agents'
- antigravity adapter: workflow path '.agent/workflows/' -> '.agents/workflows/'
- legacy-cleanup: add patterns for old .agent/ artifacts cleanup
- docs: update supported-tools.md table
- tests: update expected path assertions

Closes #0 (reported by BugsCreator and Minh Pham in Discord)
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

📝 Walkthrough

Walkthrough

This pull request updates directory references for the Antigravity tool from .agent to .agents across documentation, configuration, adapter code, legacy cleanup patterns, and tests. All changes are path updates with no logic modifications.

Changes

Cohort / File(s) Summary
Documentation & Configuration
docs/supported-tools.md, src/core/config.ts
Updated Antigravity tool directory references from .agent to .agents in both documentation and configuration skillsDir.
Core Implementation
src/core/command-generation/adapters/antigravity.ts, src/core/legacy-cleanup.ts
Updated adapter path generation from .agent to .agents and expanded legacy cleanup patterns to recognize both old (.agent/workflows/...) and new (.agents/workflows/...) directory conventions.
Tests
test/core/command-generation/adapters.test.ts
Updated antigravity adapter test expectation to reflect the new .agents directory path.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • TabishB

Poem

🐰 A hop, skip, and a .agent away,
Now pluralized bright in .agents today!
Through docs, configs, and tests we go,
One little s with a mighty glow! ✨

🚥 Pre-merge checks | ✅ 3
✅ 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 accurately and concisely summarizes the main change: updating Antigravity skill and workflow paths from the old .agent directory to the new .agents directory standard.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/antigravity-agents-dir

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

🧹 Nitpick comments (1)
src/core/legacy-cleanup.ts (1)

54-54: Please cover the new Antigravity cleanup globs with tests.

This expands automatic cleanup to three Antigravity patterns, but the existing detectLegacySlashCommands coverage only proves array-pattern handling through OpenCode. Since src/core/init.ts can run cleanup automatically in --force and non-interactive flows, I'd add focused detection/cleanup tests for .agents/workflows/openspec-*.md, .agent/workflows/openspec-*.md, and .agent/workflows/opsx-*.md.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/core/legacy-cleanup.ts` at line 54, Add unit tests that assert the new
Antigravity globs under the 'antigravity' cleanup entry are detected and removed
by the legacy cleanup logic: create test cases that create dummy files matching
'.agents/workflows/openspec-*.md', '.agent/workflows/openspec-*.md', and
'.agent/workflows/opsx-*.md', invoke the detection/cleanup helper (use
detectLegacySlashCommands or the exported cleanup runner used by
src/core/init.ts in non-interactive/--force flows) and assert those files are
reported/removed; ensure tests cover both detection-only and forced cleanup
paths so the array-pattern handling is verified for all three patterns
referenced in the 'antigravity' object in src/core/legacy-cleanup.ts.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/core/config.ts`:
- Line 22: The change replaced the Antigravity skillsDir value with ".agents"
but other modules (available-tools.ts, shared/tool-detection.ts,
profile-sync-drift.ts, migration.ts) assume tool.skillsDir is the only path, so
legacy repos under ".agent/skills" will appear missing; update those code paths
to treat ".agent/skills" as a legacy read-only alias (or perform an automatic
one-time migrate) when resolving skills for the Antigravity tool: modify
resolution logic that reads tool.skillsDir to also check ".agent/skills" when
tool.name === 'Antigravity' (or when tool.value === 'antigravity'), and add a
migration path in migration.ts to move files from ".agent/skills" into ".agents"
(or record that migration was performed) while keeping writes targeted at
".agents".

---

Nitpick comments:
In `@src/core/legacy-cleanup.ts`:
- Line 54: Add unit tests that assert the new Antigravity globs under the
'antigravity' cleanup entry are detected and removed by the legacy cleanup
logic: create test cases that create dummy files matching
'.agents/workflows/openspec-*.md', '.agent/workflows/openspec-*.md', and
'.agent/workflows/opsx-*.md', invoke the detection/cleanup helper (use
detectLegacySlashCommands or the exported cleanup runner used by
src/core/init.ts in non-interactive/--force flows) and assert those files are
reported/removed; ensure tests cover both detection-only and forced cleanup
paths so the array-pattern handling is verified for all three patterns
referenced in the 'antigravity' object in src/core/legacy-cleanup.ts.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e7282a8b-a0e8-4775-867b-e7e31a4aeb46

📥 Commits

Reviewing files that changed from the base of the PR and between afdca0d and 641c1b6.

📒 Files selected for processing (5)
  • docs/supported-tools.md
  • src/core/command-generation/adapters/antigravity.ts
  • src/core/config.ts
  • src/core/legacy-cleanup.ts
  • test/core/command-generation/adapters.test.ts

export const AI_TOOLS: AIToolOption[] = [
{ name: 'Amazon Q Developer', value: 'amazon-q', available: true, successLabel: 'Amazon Q Developer', skillsDir: '.amazonq' },
{ name: 'Antigravity', value: 'antigravity', available: true, successLabel: 'Antigravity', skillsDir: '.agent' },
{ name: 'Antigravity', value: 'antigravity', available: true, successLabel: 'Antigravity', skillsDir: '.agents' },
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 | 🟠 Major

Don't drop reads from legacy .agent/skills.

src/core/available-tools.ts, src/core/shared/tool-detection.ts, src/core/profile-sync-drift.ts, and src/core/migration.ts all treat tool.skillsDir as the only Antigravity skills location. After this change, repos that still only have .agent/skills/... will look unavailable/unconfigured until users manually migrate, even though Antigravity still supports that path. Keep .agents as the write target, but add a legacy read alias or migrate the old skills tree during update.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/core/config.ts` at line 22, The change replaced the Antigravity skillsDir
value with ".agents" but other modules (available-tools.ts,
shared/tool-detection.ts, profile-sync-drift.ts, migration.ts) assume
tool.skillsDir is the only path, so legacy repos under ".agent/skills" will
appear missing; update those code paths to treat ".agent/skills" as a legacy
read-only alias (or perform an automatic one-time migrate) when resolving skills
for the Antigravity tool: modify resolution logic that reads tool.skillsDir to
also check ".agent/skills" when tool.name === 'Antigravity' (or when tool.value
=== 'antigravity'), and add a migration path in migration.ts to move files from
".agent/skills" into ".agents" (or record that migration was performed) while
keeping writes targeted at ".agents".

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