fix(antigravity): update skill and workflow paths from .agent to .agents#830
fix(antigravity): update skill and workflow paths from .agent to .agents#830alfred-openspec wants to merge 1 commit intomainfrom
Conversation
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)
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
📝 WalkthroughWalkthroughThis pull request updates directory references for the Antigravity tool from Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
detectLegacySlashCommandscoverage only proves array-pattern handling through OpenCode. Sincesrc/core/init.tscan run cleanup automatically in--forceand 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
📒 Files selected for processing (5)
docs/supported-tools.mdsrc/core/command-generation/adapters/antigravity.tssrc/core/config.tssrc/core/legacy-cleanup.tstest/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' }, |
There was a problem hiding this comment.
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".
Summary
Antigravity has migrated from
.agent(singular) to.agents(plural) for workspace skills and workflows directories. The old.agentpath 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→.agentssrc/core/command-generation/adapters/antigravity.ts: workflow path.agent/workflows/→.agents/workflows/src/core/legacy-cleanup.ts: added cleanup patterns for old.agent/artifacts soopenspec updatemigrates users cleanlydocs/supported-tools.md: updated Antigravity row in tool directory tabletest/core/command-generation/adapters.test.ts: updated expected path assertionNotes
/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..agents/skills/openspec-propose/SKILL.mdin the chat..agent/workflows/openspec-*.mdand.agent/workflows/opsx-*.mdpatterns.All 1,341 tests pass. ✅
Summary by CodeRabbit
.agents/directory structure for workflow files.