Repository navigation
Conversation
`extension add` and `extension info` list an extension's commands, but only Cline and Forge get the names they register. Claude, Codex, Junie and Copilot in skills mode register `speckit-<ext>-<cmd>`, yet both listings print the manifest's dotted `speckit.<ext>.<cmd>`. Add one case table shared by both listing tests: the four agents above, Cline and Forge (already correct), and Copilot in commands mode and Gemini, which register dotted names and must keep them. On main the first four cases fail for both commands. Assisted-by: Claude Code (model: Claude Opus 5.5, autonomous) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both listings special-cased Cline and Forge by name, so every other agent that registers hyphenated names (25 of 41 integrations register them; the listings handled 2) was shown names it does not have. Ask the active integration for its command separator in the project's mode (`invoke_separator_for_mode` with the persisted `ai_skills` flag) and hyphenate with the helper extension skill registration already uses. This is the approach github#4910 took for the init next-steps banner. Agents that register dotted names, and unknown agents, keep the manifest name. A registry test checks that every integration's command-mode separator matches the names CommandRegistrar writes, since the listings now rely on that. The extension user guide notes that listed names follow the agent. Assisted-by: Claude Code (model: Claude Opus 5.5, autonomous) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
specify extension add("Provided commands") andspecify extension info("Commands:") list an extension's commands. Both special-cased Cline and Forge by agent key, and every other agent got the manifest's dotted name. For integrations that register hyphenated names, the listings show commands the agent does not have:main--integration codexspeckit.demo.hello.agents/skills/speckit-demo-hello/SKILL.md--integration claudespeckit.demo.hello.claude/skills/speckit-demo-hello/SKILL.md--integration juniespeckit.demo.hello.junie/commands/speckit-demo-hello.md--integration copilot(skills, the default)speckit.demo.hello.github/skills/speckit-demo-hello/SKILL.mdThe per-agent branches grew one agent at a time (#2508 for Cline, #3669 and #3744 for Forge). Of the 41 registered integrations (other than
generic), 25 register hyphenated names, and the listings handled 2.This change replaces both branches with one helper in
extensions/_commands.py. The helper asks the active integration for its command separator in the project's mode:invoke_separator_for_mode()with the persistedai_skillsflag, the hook whose docstring names extension registration paths. It then hyphenates withExtensionManager._skill_name_for_command, which skill registration already uses. This follows #4910, which derived theinitnext-steps names from the integration for the same reason.What stays the same:
^speckit\.([a-z0-9-]+)\.([a-z0-9-]+)$, and for such names their formatters and the shared helper return the same string.--commands, keep the dotted name.aivalue falls back to the manifest name, as before.The helper relies on a
-command-mode separator meaning hyphenated registration. A new registry test checks this for every registered integration other thangeneric(all 41 hold today).Related: #4954 reports a similar mismatch in hook "To execute" lines for Codex. That code path is separate and is not changed here.
Testing
test_extension_install_listing_matches_registered_command_namesandtest_extension_info_listing_matches_registered_command_namesshareLISTED_COMMAND_NAME_CASES(8 agent and mode cases). Onmain, 8 fail (claude, codex, junie and copilot-skills, for each command) and 8 pass. With the fix, all 16 pass.test_command_mode_separator_matches_registered_namesintests/integrations/test_registry.py(41 cases). It also passes onmain; it guards the assumption the helper relies on.tests/specify_cli/extensions,tests/integrations,tests/test_extensions.pyandtests/test_installed_list_json.pyshow no new failures compared withmain.mainin the same local environment. The branch adds no new failures. One timing-dependent workflow test failed once and passed 5 of 5 reruns.specify init --integration <codex|claude|junie|copilot|gemini>and withcopilot --integration-options="--commands". For a sample extension,extension add --devandextension infonow listspeckit-demo-hellofor codex, claude, junie and copilot, and still listspeckit.demo.hellofor gemini and copilot--commands.uvx ruff@0.15.0 check src testspasses.Tests ran with the project virtualenv's
python -m pytestafteruv sync --extra test.uv run specify --helpuv sync && uv run pytestAI Disclosure
AI disclosure: Prepared with Claude Code (model: Claude Opus 5.5) on behalf of @tkv00, running autonomously under step-by-step direction. The contributor chose the topic and the fix approach and approved each step. Claude Code found the issue, wrote the code, tests, documentation line, commit messages and this description, and ran the tests. AI generated the code, tests and text. No human reviewed the diff line by line before submission.