Skip to content

fix(integrations): show hyphenated command names for docker-agent and junie - #4910

Merged
mnriem merged 3 commits into
github:mainfrom
Chaoqi31:fix/hyphenated-command-names
Oct 13, 2026
Merged

mnriem merged 3 commits into
github:mainfrom
Chaoqi31:fix/hyphenated-command-names

Conversation

@Chaoqi31

@Chaoqi31 Chaoqi31 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Description

docker-agent and junie both register hyphenated commands (/speckit-<name>), and their own build_command_invocation returns that form. Spec Kit still showed their users the dotted names (/speckit.<name>), which those agents never register:

  • docker-agent installs .agents/skills/speckit-<name>/SKILL.md, the same layout as zed and muse, but it was missing from ALWAYS_SLASH_AGENTS. So is_slash_skills_agent("docker-agent", ...) returned False. The specify init next-steps banner listed /speckit.specify, /speckit.plan, and so on. Extension hooks rendered /speckit.git.commit. fix(alquimia): render /speckit-<name> invocations for the skills-only Alquimia agent #4137 fixed the same gap for alquimia by adding its key to the set. docker-agent has no non-skills mode, so it belongs with zed and muse in ALWAYS_SLASH_AGENTS.
  • junie installs .junie/commands/speckit-<name>.md. Hook rendering already special-cases it, but the init banner only special-cased cline and forge. So specify init --integration junie listed /speckit.constitution, /speckit.plan, and so on.

The init banner now builds command names from the integration's invoke prefix and separator, the same values init passes to _install_shared_infra_or_exit to render the installed commands. That replaces the banner's hard-coded agent list, so the next integration cannot drift from the banner the way junie did. docker-agent still needs its key in ALWAYS_SLASH_AGENTS, because hook rendering reads that set. A check over all registered integrations found no other mismatch between hook rendering and build_command_invocation.

Testing

  • New test_is_slash_skills_agent and test_hook_invocation_renders_the_hyphenated_form in test_integration_docker_agent.py, modelled on the alquimia tests. On main: assert False is True and assert '/speckit.git.commit' == '/speckit-git-commit'.
  • New test_init_next_steps_show_hyphenated_commands in test_integration_junie.py. On main the banner contains /speckit.plan, not /speckit-plan.
  • With the fix: the two changed test files pass (87 passed). tests/integrations, tests/specify_cli/test_command_init.py, tests/test_extensions.py, tests/specify_cli/integrations and tests/specify_cli/extensions: 4612 passed, 5 skipped.
  • Banner check: ran specify init for every registered integration in each of its modes (60 cases, including --skills, --commands and --legacy-commands where offered). The banner command is the same before and after the switch to the integration's prefix and separator.
  • CLI: specify init <dir> --integration <docker-agent|junie> --ignore-agent-tools --non-interactive now prints /speckit-plan (was /speckit.plan) for both. docker-agent's before_plan hook now prints /speckit-git-commit.

Equivalent local checks: tests ran with .venv/bin/python -m pytest and the CLI with the venv's specify, on macOS.

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (fill in the disclosure below)

AI disclosure: This contribution was produced by Claude Code running autonomously on behalf of @Chaoqi31. An audit agent (Claude Fable 5.1, max reasoning effort) found the docker-agent gap and wrote a failing reproduction. The orchestrating agent (Claude Opus 5) found the junie banner case. A fix agent (Claude Opus 5, xhigh effort) wrote the fix and tests. A separate review agent checked the branch, and the orchestrating agent wrote the commits and this description. Claude Code (Claude Opus 5) also wrote the follow-up commit for review feedback. AI generated the code, tests and text. No human reviewed the diff line by line before submission.

Assisted-by: Claude Code (model: Claude Opus 5, autonomous)
… junie

Both agents register `/speckit-<name>` commands, and their own
`build_command_invocation` returns that form, but Spec Kit showed users the
dotted `/speckit.<name>` names in two places:

- docker-agent was missing from `ALWAYS_SLASH_AGENTS`, so the `init`
  next-steps banner and extension hook invocations used dotted names
  (github#4137 fixed the same gap for alquimia).
- The `init` banner special-cased cline and forge but not junie, which
  installs hyphenated commands the same way.

Assisted-by: Claude Code (model: Claude Opus 5, autonomous)

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.

🟡 Changes recommended

The Junie fix duplicates integration-specific invocation metadata in the init command, preserving the drift that caused the regression.

1 open finding
What changed in this PR

Fixes invocation guidance so Docker Agent and Junie users see registered hyphenated commands.

Changes:

  • Classifies Docker Agent as always using slash skills.
  • Updates Junie’s init banner and adds regression coverage.
File Description
src/​specify_cli/​_invocation_style.py Adds Docker Agent to slash-style integrations.
src/​specify_cli/​command_init.py Displays hyphenated Junie commands.
tests/​integrations/​test_integration_docker_agent.py Tests helper and hook rendering.
tests/​integrations/​test_integration_junie.py Tests Junie’s init guidance.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/specify_cli/command_init.py Outdated
@mnriem

mnriem commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

Please address Copilot feedback

@mnriem mnriem added triage-nice-to-have Verdict: evidence-backed fix or greenlit feature — land after review author-awaiting Waiting on author response labels Oct 13, 2026
The next-steps banner kept its own list of agents that use /speckit-<name>,
which is how junie went missing from it. Build the names from the
integration's invoke prefix and separator instead, the values init already
uses to render the installed commands. The banner is unchanged for every
registered integration in each of its modes.

Assisted-by: Claude Code (model: Claude Opus 5, autonomous)

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.

🟢 Approval recommended

The focused fixes align invocation output with installed commands and include direct regression coverage.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@mnriem
mnriem merged commit 9801d2b into github:main Oct 13, 2026
16 checks passed
@mnriem

mnriem commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

@Chaoqi31

Copy link
Copy Markdown
Contributor Author

@mnriem The Copilot feedback is addressed in cecb82a. Details are in the thread, and the description is updated.

AI disclosure: Claude Code (Claude Opus 5), running autonomously for @Chaoqi31, wrote this change and this reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author-awaiting Waiting on author response triage-nice-to-have Verdict: evidence-backed fix or greenlit feature — land after review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants