Skip to content

fix(extensions): hyphenate command names in the Forge post-install listing#3669

Merged
mnriem merged 1 commit into
github:mainfrom
jawwad-ali:fix/forge-extension-install-listing-hyphenated
Jul 23, 2026
Merged

fix(extensions): hyphenate command names in the Forge post-install listing#3669
mnriem merged 1 commit into
github:mainfrom
jawwad-ali:fix/forge-extension-install-listing-hyphenated

Conversation

@jawwad-ali

Copy link
Copy Markdown
Contributor

What

After specify extension add, the "Provided commands" summary hyphenated command names only for Cline:

is_cline = load_init_options(project_root).get("ai") == "cline"
...
if is_cline:
    cmd_name = format_cline_command_name(cmd_name)

For a Forge project the names were printed in dotted form (e.g. speckit.test-ext.hello), but Forge registers its commands hyphenated (speckit-test-ext-hello, via format_forge_command_name). So the post-install summary told Forge users to run commands that don't exist under the dotted name.

Fix

Extend the existing Cline handling to Forge via format_forge_command_name. This completes the Forge command-name parity already fixed for hook invocations (#3641) and the init next-steps panel (#3642) — the extension-install listing was the third and last site.

Tests

tests/test_extensions.py::test_forge_extension_install_listing_hyphenates_command_names — installs an extension (extension add --dev) in a Forge project and asserts the listing shows speckit-test-ext-hello, not the dotted form. Fails before the fix; passes after. ruff clean.


AI-assisted: authored with Claude Code. Completes the Forge parity series (#3641/#3642) and verified fail-before/pass-after.

…sting

After `specify extension add`, the "Provided commands" summary hyphenated
command names only for Cline. For a Forge project the names were printed in
dotted form (e.g. `speckit.test-ext.hello`), but Forge registers them
hyphenated (`speckit-test-ext-hello`), so the printed names didn't match
what the user actually invokes in Forge.

Extend the existing Cline handling to Forge via `format_forge_command_name`,
completing the Forge command-name parity already fixed for hook invocations
(github#3641) and the init next-steps panel (github#3642).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes Forge’s extension post-install summary to display the command names users can actually invoke.

Changes:

  • Detects Forge projects and formats listed commands with hyphens.
  • Adds regression coverage for Forge extension installation output.
Show a summary per file
File Description
src/specify_cli/extensions/_commands.py Applies Forge command-name formatting to the provided-commands listing.
tests/test_extensions.py Verifies Forge listings use hyphenated names.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Medium

@mnriem
mnriem merged commit 88b3230 into github:main Jul 23, 2026
14 checks passed
@mnriem

mnriem commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

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.

3 participants