feat: add Codex support for extension command registration#1767
feat: add Codex support for extension command registration#1767adri4nlm wants to merge 2 commits intogithub:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds Codex CLI to the CommandRegistrar.AGENT_CONFIGS map in extensions.py, enabling specify extension add to register extension commands into Codex projects (targeting .codex/prompts/ with Markdown format and $ARGUMENTS placeholder). The codex key was already present in AGENT_CONFIG in __init__.py and in the release packaging scripts, but was missing from the extension command registrar.
Changes:
- Adds a
"codex"entry toCommandRegistrar.AGENT_CONFIGSwithdir: .codex/prompts,format: markdown,args: $ARGUMENTS, andextension: .md.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| "codex": { | ||
| "dir": ".codex/prompts", | ||
| "format": "markdown", | ||
| "args": "$ARGUMENTS", | ||
| "extension": ".md" | ||
| }, |
There was a problem hiding this comment.
The codebase follows a clear pattern of adding consistency tests whenever a new agent is added to CommandRegistrar.AGENT_CONFIGS. For example, kiro-cli has tests in both tests/test_extensions.py (lines 402–406) and tests/test_agent_config_consistency.py (lines 23–29) that verify the key is present, the directory is correct, and legacy keys are absent.
This PR does not add a test verifying that "codex" is present in CommandRegistrar.AGENT_CONFIGS with the expected "dir": ".codex/prompts". A test analogous to test_kiro_cli_agent_config_present should be added (e.g., in TestCommandRegistrar in tests/test_extensions.py) to pin this mapping and prevent regression.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
mnriem
left a comment
There was a problem hiding this comment.
Can you address the feedback by Copilot where applicable. If not applicable please describe why. Thanks!
Summary
Add Codex support to extension command registration by adding a
codexentry toCommandRegistrar.AGENT_CONFIGSinsrc/specify_cli/extensions.py.Description
specify init --ai codexcreates projects using.codex/prompts/, butspecify extension adddid not include Codex in the registrar agent map.This change makes extension command installation target Codex projects as expected:
.codex/promptsmarkdown$ARGUMENTS.mdTesting
uv run specify --helpuv run pytestuv run pytestresult:AI Disclosure
Used Codex to help prepare and validate this contribution. All final changes were reviewed by a human.