Skip to content

fix(integrations): Forge dispatches hyphenated /speckit-<cmd> invocations#3529

Open
jawwad-ali wants to merge 1 commit into
github:mainfrom
jawwad-ali:fix/forge-hyphenated-invocation
Open

fix(integrations): Forge dispatches hyphenated /speckit-<cmd> invocations#3529
jawwad-ali wants to merge 1 commit into
github:mainfrom
jawwad-ali:fix/forge-hyphenated-invocation

Conversation

@jawwad-ali

Copy link
Copy Markdown
Contributor

What

Forge installs its slash-commands with hyphenated names — speckit-plan, speckit-git-commit — via format_forge_command_name and the injected frontmatter name (done for ZSH/shell compatibility, as the module docstring notes).

But ForgeIntegration inherits MarkdownIntegration.build_command_invocation, which builds the dotted form:

invocation = f"/speckit.{stem}"   # -> /speckit.plan

So command/workflow dispatch invokes /speckit.plan while the registered Forge command is /speckit-plan — a name Forge never registered.

Fix

Override build_command_invocation in ForgeIntegration to reuse the module's own format_forge_command_name, producing /speckit-<name> (with .- for extension commands like speckit.git.commit/speckit-git-commit). This mirrors the skills agents' hyphenated build_command_invocation and Forge's own installed naming.

Test

test_forge_core_command_hyphenated / test_forge_extension_command_hyphenated assert Forge invocations are hyphenated (incl. args) — fail before (dotted /speckit.plan, /speckit.git.commit), pass after.


🤖 Written with the assistance of Claude Code (AI). Bug self-found; fix/tests verified locally (fail-before / pass-after), ruff clean.

…ions

Forge installs its slash-commands with hyphenated names (speckit-foo-bar, via
format_forge_command_name and the injected frontmatter name), but
ForgeIntegration inherited MarkdownIntegration.build_command_invocation, which
builds the dotted /speckit.<cmd>. So 'workflow'/command dispatch invoked
/speckit.plan while the registered command is /speckit-plan — a name Forge never
registered.

Override build_command_invocation to reuse format_forge_command_name, producing
/speckit-<name> (with '.'-to-'-' for extension commands), mirroring the skills
agents' hyphenated invocation.

Tests assert Forge core + extension invocations are hyphenated, incl. args
(fail before: dotted /speckit.plan / /speckit.git.commit).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jawwad-ali jawwad-ali requested a review from mnriem as a code owner July 14, 2026 18:12
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.

1 participant