Skip to content

fix: render script command hints with active agent separator#2649

Open
PascalThuet wants to merge 2 commits into
github:mainfrom
PascalThuet:codex/agent-aware-script-command-hints
Open

fix: render script command hints with active agent separator#2649
PascalThuet wants to merge 2 commits into
github:mainfrom
PascalThuet:codex/agent-aware-script-command-hints

Conversation

@PascalThuet
Copy link
Copy Markdown
Contributor

Summary

  • Render user-facing script command hints with the active integration's invoke_separator.
  • Update bash and PowerShell prerequisite guards in setup-tasks and check-prerequisites.
  • Add regression tests for hyphenated agent command hints.

Why

Shared scripts were hardcoding dotted slash commands such as /speckit.plan, /speckit.specify, and /speckit.tasks.

That is correct for internal command IDs and dot-based integrations, but it is confusing for agents whose installed commands use invoke_separator: "-", where the resolvable slash command is /speckit-plan.

Implementation

The shared script helpers now read .specify/integration.json, resolve the default integration's stored invoke_separator, and format the displayed slash command accordingly. If state is missing or malformed, they fall back to the dotted form.

Validation

  • git diff --check
  • bash -n scripts/bash/common.sh
  • bash -n scripts/bash/setup-tasks.sh
  • bash -n scripts/bash/check-prerequisites.sh
  • uv run pytest tests/test_setup_tasks.py -v
  • uv run pytest tests/test_timestamp_branches.py -v

PowerShell was not available in the local environment, so the PowerShell regression tests were collected but skipped.

Copilot AI review requested due to automatic review settings May 20, 2026 14:45
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

Note

Copilot was unable to run its full agentic suite in this review.

This PR updates the Bash and PowerShell helper scripts to format user-facing “Run /speckit…” hints using the configured invoke_separator from .specify/integration.json, and adds tests to validate the updated messaging.

Changes:

  • Add shared helpers to compute the invoke separator and format /speckit{separator}{command} consistently (Bash + PowerShell).
  • Update setup/check scripts to use the formatted command in error/help hints.
  • Extend integration tests to cover separator-aware messaging for both Bash and PowerShell.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/test_setup_tasks.py Adds helper to write integration.json and new assertions for separator-aware hint strings.
scripts/powershell/setup-tasks.ps1 Uses Format-SpecKitCommand to generate plan/specify hint commands dynamically.
scripts/powershell/common.ps1 Adds Get-InvokeSeparator + Format-SpecKitCommand helpers.
scripts/powershell/check-prerequisites.ps1 Uses Format-SpecKitCommand for specify/plan/tasks hints.
scripts/bash/setup-tasks.sh Uses format_speckit_command for plan/specify hints.
scripts/bash/common.sh Adds get_invoke_separator + format_speckit_command helpers.
scripts/bash/check-prerequisites.sh Uses format_speckit_command for specify/plan/tasks hints.

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

Comment thread scripts/powershell/common.ps1 Outdated
Comment thread tests/test_setup_tasks.py Outdated
Comment thread scripts/bash/common.sh Outdated
@PascalThuet PascalThuet force-pushed the codex/agent-aware-script-command-hints branch from 5df378d to 6cfa652 Compare May 20, 2026 15:21
@PascalThuet PascalThuet marked this pull request as ready for review May 20, 2026 15:23
@PascalThuet PascalThuet requested a review from mnriem as a code owner May 20, 2026 15:23
Copilot AI review requested due to automatic review settings May 20, 2026 15:23
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

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Comment thread scripts/bash/common.sh
Comment thread scripts/bash/common.sh
Comment thread scripts/powershell/common.ps1 Outdated
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.

2 participants