fix(integrations): Cline dispatches hyphenated /speckit-<cmd> invocations#3622
Merged
Merged
Conversation
…ions Cline installs its slash-commands with hyphenated names (speckit-plan, speckit-git-commit) via format_cline_command_name + the hyphenated command_filename, but ClineIntegration inherited MarkdownIntegration's build_command_invocation, which builds the dotted /speckit.<cmd> — a name Cline never registered. Add a build_command_invocation override reusing format_cline_command_name, producing /speckit-<name>, mirroring the ForgeIntegration fix. Cline was the only remaining markdown integration with invoke_separator='-' + hyphenated command_filename that lacked the override. Tests assert Cline 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>
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns Cline command invocations with its hyphenated registered command names.
Changes:
- Overrides Cline invocation formatting using
format_cline_command_name. - Adds coverage for core commands, extension commands, and arguments.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/integrations/cline/__init__.py |
Generates hyphenated Cline invocations. |
tests/integrations/test_base.py |
Tests Cline invocation formatting. |
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
Cline installs its slash-commands with hyphenated names —
speckit-plan,speckit-git-commit— viaformat_cline_command_nameand the hyphenatedcommand_filename. ButClineIntegrationinheritsMarkdownIntegration.build_command_invocation, which builds the dotted form:So command/workflow dispatch invokes
/speckit.planwhile the registered Cline command is/speckit-plan— a name Cline never registered.Fix
Override
build_command_invocationinClineIntegrationto reuse the module's ownformat_cline_command_name, producing/speckit-<name>(with.→-for extension commands). This mirrors theForgeIntegrationfix (#3529) exactly — Cline was the only remaining markdown integration withinvoke_separator='-'+ hyphenatedcommand_filenamestill lacking the override.Test
test_cline_core_command_hyphenated/test_cline_extension_command_hyphenated(mirroring the forge tests) assert Cline 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.