fix: extension command registration with agy/Antigravity#1704
fix: extension command registration with agy/Antigravity#1704neelneelpurk wants to merge 1 commit intogithub:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes extension command registration for AGY/Antigravity projects so that specify extension add writes extension command files into the agent’s workflow directory (aligning extension behavior with specify init support for AGY).
Changes:
- Add an
agyentry toCommandRegistrar.AGENT_CONFIGSso extension commands are emitted to.agent/workflowsas Markdown.mdfiles.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "agy": { | ||
| "dir": ".agent/workflows", | ||
| "format": "markdown", | ||
| "args": "$ARGUMENTS", | ||
| "extension": ".md" |
There was a problem hiding this comment.
The new AGY/Antigravity registration path is not covered by tests. tests/test_extensions.py currently exercises command registration only for Claude, so this change could regress without detection. Consider adding a CommandRegistrar test that creates a .agent/workflows dir and asserts commands are written there (and/or that register_commands_for_all_agents detects .agent).
| "agy": { | ||
| "dir": ".agent/workflows", | ||
| "format": "markdown", | ||
| "args": "$ARGUMENTS", | ||
| "extension": ".md" |
There was a problem hiding this comment.
CommandRegistrar.AGENT_CONFIGS duplicates agent directory metadata that also exists in src/specify_cli/__init__.py (AGENT_CONFIG), and this drift is what caused AGY to be missed originally. To reduce future mismatches, consider deriving these paths/placeholders from a shared config or adding a validation test that ensures any agent with a commands directory configured is represented here.
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback where applicable. If not please explain why
I agree with the Copilot's comments. In the current implementation, we effectively have two sources of truth:
But the scope of this PR was adding AGY support to extension command registration, since AGY was already supported in So, to address the duplication properly, I’ve opened a separate PR that consolidates the configuration and removes this drift. Once that merges, it will fully resolve my issue and make sure that it doesn't happen again for any other new agent in the future. PR #1712 |
Summary
Fixed extension subcommand registration issue in Agy/Antigravity
Issue
Fixes #1705
Description
Problem
Spec Kit supports
AGY/Antigravityinspecify init, butspecify extension adddoes not register extension commands into.agent/workflows. The extension installs successfully, yet no new command files appear.Steps to Reproduce
specify extension add --dev /path/to/extensionExpected Behavior
Extension commands are written to .agent/workflows (e.g., speckit..*.md).
Actual Behavior
No new command files appear in .agent/workflows.
Specify CLI Version
0.1.6
AI Agent
Antigravity
Operating System
mac0S v26.3
Python Version
python 3.12.1
Root Cause
AGY is defined in the init agent list, but is missing from the extension command registrar list, so extension installs never target .agent/workflows.
init.py(lines 240–245) define AGY with folder: ".agent/" and commands_subdir: "workflows".
extensions.py(lines 600–679) list supported agents for command registration; agy is not included.
Solution
Add the following entry for
agytoCommandRegistrar.AGENT_CONFIGSin extensions.py.Testing
uv run specify --helpuv sync && uv run pytestOutput of
uv run pytestTesting with a sample project
I installed the Specifiy extension using my local build, and the extension commands were registered successfully. The screenshot is attached below.
AI Disclosure
Used Codex for debugging the Antigravity extension registration issue.