Skip to content

Fix shared script command hints for integration separators#2627

Open
WOLIKIMCHENG wants to merge 2 commits into
github:mainfrom
WOLIKIMCHENG:codex/fix-2587-shared-script-command-refs
Open

Fix shared script command hints for integration separators#2627
WOLIKIMCHENG wants to merge 2 commits into
github:mainfrom
WOLIKIMCHENG:codex/fix-2587-shared-script-command-refs

Conversation

@WOLIKIMCHENG
Copy link
Copy Markdown
Contributor

@WOLIKIMCHENG WOLIKIMCHENG commented May 19, 2026

Summary

  • Render bundled shared script command hints with the active integration invoke separator
  • Refresh managed shared infrastructure when default integration state/options change
  • Add regression coverage for dot and hyphen refs across bash, PowerShell, switch/use/upgrade paths, and customized shared script preservation

Fixes #2587.

Testing

  • uv run python -m pytest tests/integrations/test_cli.py::TestSharedInfraCommandRefs -q
  • uv run python -m pytest tests/integrations/test_integration_subcommand.py::TestIntegrationUpgrade::test_upgrade_default_refreshes_shared_script_refs_for_option_separator_change -q
  • uv run python -m pytest tests/integrations/test_integration_subcommand.py -q
  • uv run python -m pytest tests/integrations/test_integration_base_skills.py tests/integrations/test_integration_copilot.py -q
  • uv run python -m pytest tests/test_agent_config_consistency.py -q
  • uv run specify --help
  • Manual temp-project checks for Claude sh/ps, Copilot sh, and Copilot upgrade to --skills with customized shared script preservation

@WOLIKIMCHENG WOLIKIMCHENG marked this pull request as ready for review May 19, 2026 06:31
@WOLIKIMCHENG WOLIKIMCHENG requested a review from mnriem as a code owner May 19, 2026 06:31
@mnriem mnriem requested a review from Copilot May 21, 2026 01:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a command-hint mismatch in bundled shared scripts by templating /speckit command references and rendering them with the active integration’s invoke_separator during shared infrastructure installation/refresh, ensuring hints match actual command invocations for both dot (/speckit.plan) and hyphen (/speckit-plan) styles.

Changes:

  • Replaced hardcoded /speckit.* / /speckit-* references in shared bash/PowerShell scripts with __SPECKIT_COMMAND_<NAME>__ placeholders.
  • Updated shared infrastructure installation to resolve __SPECKIT_COMMAND_*__ placeholders in shared scripts (in addition to templates) using the active invoke_separator.
  • Expanded regression tests to cover script hint rendering and refresh behavior across install/use/switch/upgrade flows and customization preservation.
Show a summary per file
File Description
src/specify_cli/shared_infra.py Resolves __SPECKIT_COMMAND_*__ placeholders when copying shared scripts so command hints match the active integration separator.
src/specify_cli/__init__.py Switches default/upgrade refresh paths to re-install shared infra (scripts + templates) with refresh_managed=True and updates related CLI/help messaging.
scripts/bash/check-prerequisites.sh Replaces hardcoded /speckit.* hints with __SPECKIT_COMMAND_*__ placeholders for template-time rendering.
scripts/bash/common.sh Updates comments referencing commands to use __SPECKIT_COMMAND_*__ placeholders.
scripts/bash/setup-tasks.sh Replaces hardcoded /speckit.* hints with __SPECKIT_COMMAND_*__ placeholders.
scripts/powershell/check-prerequisites.ps1 Replaces hardcoded /speckit.* hints with __SPECKIT_COMMAND_*__ placeholders.
scripts/powershell/common.ps1 Updates comments referencing commands to use __SPECKIT_COMMAND_*__ placeholders.
scripts/powershell/setup-tasks.ps1 Replaces hardcoded /speckit.* hints with __SPECKIT_COMMAND_*__ placeholders.
tests/integrations/test_cli.py Adds direct coverage ensuring _install_shared_infra renders shared script command refs for both dot/hyphen separators.
tests/integrations/test_integration_subcommand.py Adds end-to-end regression coverage for script ref refresh across install/uninstall/use/switch/upgrade flows and customization preservation.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 10/10 changed files
  • Comments generated: 1

Comment on lines +1442 to 1450
_install_shared_infra(
project_root,
resolved_script,
invoke_separator=_invoke_separator_for_integration(
integration, {"integration_settings": settings}, key, parsed_options
),
force=refresh_templates_force,
refresh_managed=True,
)
@WOLIKIMCHENG
Copy link
Copy Markdown
Contributor Author

Addressed. integration use now passes a caller-specific shared infra refresh hint through _set_default_integration, so preserved/skipped shared files point users to specify integration use <key> --force. Added coverage to the existing integration-use preservation test.

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.

Bundled scripts print /speckit.X in error messages, ignoring integration's invoke_separator

2 participants