fix(init): show hyphenated /speckit-<name> in Next Steps for Forge projects#3642
Merged
mnriem merged 1 commit intoJul 22, 2026
Merged
Conversation
…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>
Contributor
There was a problem hiding this comment.
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
Collaborator
|
Thank you! |
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.
What
The post-init Next Steps panel renders the recommended slash commands through the nested
_display_cmd()insrc/specify_cli/commands/init.py. It special-cased dollar-skills agents,kimi, slash-skills agents, andcline— but not Forge. For a Forge project_display_cmdfell through to:printing
/speckit.constitution,/speckit.specify,/speckit.plan, etc.Forge only registers the hyphenated form
/speckit-<name>(viaformat_forge_command_name/ForgeIntegration.build_command_invocation; the generated Forge command-file tests intest_integration_forge.pyalready 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 existingcline_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— runsspecify init --here --integration forgeand asserts the output contains/speckit-planand 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 checkclean.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.