Skip to content

fix(init): show hyphenated /speckit-<name> in Next Steps for Forge projects#3642

Merged
mnriem merged 1 commit into
github:mainfrom
jawwad-ali:fix/forge-init-next-steps-hyphenated
Jul 22, 2026
Merged

fix(init): show hyphenated /speckit-<name> in Next Steps for Forge projects#3642
mnriem merged 1 commit into
github:mainfrom
jawwad-ali:fix/forge-init-next-steps-hyphenated

Conversation

@jawwad-ali

Copy link
Copy Markdown
Contributor

What

The post-init Next Steps panel renders the recommended slash commands through the nested _display_cmd() in src/specify_cli/commands/init.py. It special-cased dollar-skills agents, kimi, slash-skills agents, and cline — but not Forge. For a Forge project _display_cmd fell through to:

return f"/speckit.{name}"

printing /speckit.constitution, /speckit.specify, /speckit.plan, etc.

Forge only registers the hyphenated form /speckit-<name> (via format_forge_command_name / ForgeIntegration.build_command_invocation; the generated Forge command-file tests in test_integration_forge.py already assert dot-notation must not appear). So the panel instructed Forge users to run commands that don't exist under the dotted name.

Fix

Add forge_skill_mode = selected_ai == "forge" alongside the existing cline_skill_mode, and include it in the hyphenated-slash condition — mirroring exactly how Cline (also a non-skills markdown agent with hyphenated commands) is handled. Other agents are unaffected.

Tests

tests/integrations/test_integration_forge.py::TestForgeInitNextSteps — runs specify init --here --integration forge and asserts the output contains /speckit-plan and not /speckit.plan, mirroring the existing Copilot/Grok next-steps tests.

Verified fail-before / pass-after (reverting only the source hunk makes the test fail — the panel renders the dotted /speckit.checklist / /speckit.plan). ruff check clean.


AI-assisted: authored with Claude Code. I confirmed Forge's hyphenated registration, that Cline is the exact sibling precedent in this same closure, and verified fail-before/pass-after.

…ojects

The post-init "Next Steps" panel renders recommended slash commands via
the nested `_display_cmd()`. It special-cased dollar-skills agents, kimi,
slash-skills agents, and cline, but not Forge. For a Forge project
`_display_cmd` fell through to `return f"/speckit.{name}"`, printing
`/speckit.constitution`, `/speckit.specify`, etc.

Forge only registers the hyphenated form (`/speckit-<name>`, per
`format_forge_command_name` / `ForgeIntegration.build_command_invocation`,
and the generated command-file tests already assert this), so the panel
told Forge users to run commands that don't exist under the dotted name.

Add `forge_skill_mode` alongside `cline_skill_mode` and include it in the
hyphenated-slash condition, mirroring how cline (also a non-skills
markdown agent with hyphenated commands) is handled. Other agents
unaffected.

🤖 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 post-init guidance to show valid hyphenated slash commands.

Changes:

  • Adds Forge to hyphenated command rendering.
  • Adds regression coverage for Forge Next Steps output.
Show a summary per file
File Description
src/specify_cli/commands/init.py Renders /speckit-<name> for Forge.
tests/integrations/test_integration_forge.py Verifies hyphenated output and rejects dotted notation.

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 5674fd0 into github:main Jul 22, 2026
14 checks passed
@mnriem

mnriem commented Jul 22, 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