fix(#2543): replace legacy /gsd-<cmd> syntax with /gsd:<cmd> across all source files (#2595)

Commands are now installed as commands/gsd/<name>.md and invoked as
/gsd:<name> in Claude Code. The old hyphen form /gsd-<name> was still
hardcoded in hundreds of places across workflows, references, templates,
lib modules, and command files — causing "Unknown command" errors
whenever GSD suggested a command to the user.

Replace all /gsd-<cmd> occurrences where <cmd> is a known command name
(derived at runtime from commands/gsd/*.md) using a targeted Node.js
script. Agent names, tool names (gsd-sdk, gsd-tools), directory names,
and path fragments are not touched.

Adds regression test tests/bug-2543-gsd-slash-namespace.test.cjs that
enforces zero legacy occurrences going forward. Removes inverted
tests/stale-colon-refs.test.cjs (bug #1748) which enforced the now-obsolete
hyphen form; the new bug-2543 test supersedes it. Updates 5 assertion
tests that hardcoded the old hyphen form to accept the new colon form.

Closes #2543

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-04-22 12:04:25 -04:00
committed by GitHub
parent 533973700c
commit 73c1af5168
150 changed files with 962 additions and 939 deletions

View File

@@ -29,7 +29,7 @@ Extract:
If no `.planning/` directory exists:
```
No GSD project detected. Run `/gsd-new-project` to get started.
No GSD project detected. Run `/gsd:new-project` to get started.
```
Exit.
</step>
@@ -65,7 +65,7 @@ If found:
⛔ Hard stop: Project in error state
STATE.md shows status: {status}. Resolve the error before advancing.
Run `/gsd-health` to diagnose, or manually fix STATE.md.
Run `/gsd:health` to diagnose, or manually fix STATE.md.
Use `--force` to bypass this check.
```
Exit.
@@ -121,7 +121,7 @@ Choice [S]:
**Goal:** Resolve plans that ran without producing summaries during Phase {src} execution
**Source phase:** {src}
**Deferred at:** {date} during /gsd-next advancement to Phase {dest}
**Deferred at:** {date} during /gsd:next advancement to Phase {dest}
**Plans:**
- [ ] {N}-{M}: {slug} (ran, no SUMMARY.md)
```
@@ -151,7 +151,7 @@ If either count is > 0, display before routing:
{PENDING_SPIKES} spike(s) with unresolved verdicts in .planning/spikes/
{PENDING_SKETCHES} sketch(es) without a winning variant in .planning/sketches/
Resume with `/gsd-spike` or `/gsd-sketch`, or continue with phase work below.
Resume with `/gsd:spike` or `/gsd:sketch`, or continue with phase work below.
```
Only show lines for non-zero counts. If both are 0, skip this notice entirely.
@@ -162,35 +162,35 @@ Apply routing rules based on state:
**Route 1: No phases exist yet → discuss**
If ROADMAP has phases but no phase directories exist on disk:
→ Next action: `/gsd-discuss-phase <first-phase>`
→ Next action: `/gsd:discuss-phase <first-phase>`
**Route 2: Phase exists but has no CONTEXT.md or RESEARCH.md → discuss**
If the current phase directory exists but has neither CONTEXT.md nor RESEARCH.md:
→ Next action: `/gsd-discuss-phase <current-phase>`
→ Next action: `/gsd:discuss-phase <current-phase>`
**Route 3: Phase has context but no plans → plan**
If the current phase has CONTEXT.md (or RESEARCH.md) but no PLAN.md files:
→ Next action: `/gsd-plan-phase <current-phase>`
→ Next action: `/gsd:plan-phase <current-phase>`
**Route 4: Phase has plans but incomplete summaries → execute**
If plans exist but not all have matching summaries:
→ Next action: `/gsd-execute-phase <current-phase>`
→ Next action: `/gsd:execute-phase <current-phase>`
**Route 5: All plans have summaries → verify and complete**
If all plans in the current phase have summaries:
→ Next action: `/gsd-verify-work`
→ Next action: `/gsd:verify-work`
**Route 6: Phase complete, next phase exists → advance**
If the current phase is complete and the next phase exists in ROADMAP:
→ Next action: `/gsd-discuss-phase <next-phase>`
→ Next action: `/gsd:discuss-phase <next-phase>`
**Route 7: All phases complete → complete milestone**
If all phases are complete:
→ Next action: `/gsd-complete-milestone`
→ Next action: `/gsd:complete-milestone`
**Route 8: Paused → resume**
If STATE.md shows paused_at:
→ Next action: `/gsd-resume-work`
→ Next action: `/gsd:resume-work`
</step>
<step name="show_and_execute">
@@ -207,7 +207,7 @@ Display the determination:
```
Then immediately invoke the determined command via SlashCommand.
Do not ask for confirmation — the whole point of `/gsd-next` is zero-friction advancement.
Do not ask for confirmation — the whole point of `/gsd:next` is zero-friction advancement.
</step>
</process>