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

@@ -963,13 +963,13 @@ If `SECURITY_CFG` is `true` AND `SECURITY_FILE` is empty (no SECURITY.md yet):
Include in the next-steps routing output:
```
⚠ Security enforcement enabled — run before advancing:
/gsd-secure-phase {PHASE} ${GSD_WS}
/gsd:secure-phase {PHASE} ${GSD_WS}
```
If `SECURITY_CFG` is `true` AND SECURITY.md exists: check frontmatter `threats_open`. If > 0:
```
⚠ Security gate: {threats_open} threats open
/gsd-secure-phase {PHASE} — resolve before advancing
/gsd:secure-phase {PHASE} — resolve before advancing
```
</step>
@@ -1039,8 +1039,8 @@ Apply the same "incomplete" filtering rules as earlier:
Selected wave finished successfully. This phase still has incomplete plans, so phase-level verification and completion were intentionally skipped.
/gsd-execute-phase {phase} ${GSD_WS} # Continue remaining waves
/gsd-execute-phase {phase} --wave {next} ${GSD_WS} # Run the next wave explicitly
/gsd:execute-phase {phase} ${GSD_WS} # Continue remaining waves
/gsd:execute-phase {phase} --wave {next} ${GSD_WS} # Run the next wave explicitly
```
**If no incomplete plans remain after the selected wave finishes:**
@@ -1073,7 +1073,7 @@ REVIEW_STATUS=$(sed -n '/^---$/,/^---$/p' "$REVIEW_FILE" | grep "^status:" | hea
If REVIEW_STATUS is not "clean" and not "skipped" and not empty, display:
```
Code review found issues. Consider running:
/gsd-code-review-fix ${PHASE_NUMBER}
/gsd:code-review-fix ${PHASE_NUMBER}
```
**Error handling:** If the Skill invocation fails or throws, catch the error, display "Code review encountered an error (non-blocking): {error}" and proceed to next step. Review failures must never block execution.
@@ -1314,7 +1314,7 @@ grep "^status:" "$PHASE_DIR"/*-VERIFICATION.md | cut -d: -f2 | tr -d ' '
|--------|--------|
| `passed` | → update_roadmap |
| `human_needed` | Present items for human testing, get approval or feedback |
| `gaps_found` | Present gap summary, offer `/gsd-plan-phase {phase} --gaps ${GSD_WS}` |
| `gaps_found` | Present gap summary, offer `/gsd:plan-phase {phase} --gaps ${GSD_WS}` |
**If human_needed:**
@@ -1369,12 +1369,12 @@ All automated checks passed. {N} items need human testing:
{From VERIFICATION.md human_verification section}
Items saved to `{phase_num}-HUMAN-UAT.md` — they will appear in `/gsd-progress` and `/gsd-audit-uat`.
Items saved to `{phase_num}-HUMAN-UAT.md` — they will appear in `/gsd:progress` and `/gsd:audit-uat`.
"approved" → continue | Report issues → gap closure
```
**If user says "approved":** Proceed to `update_roadmap`. The HUMAN-UAT.md file persists with `status: partial` and will surface in future progress checks until the user runs `/gsd-verify-work` on it.
**If user says "approved":** Proceed to `update_roadmap`. The HUMAN-UAT.md file persists with `status: partial` and will surface in future progress checks until the user runs `/gsd:verify-work` on it.
**If user reports issues:** Proceed to gap closure as currently implemented.
@@ -1393,13 +1393,13 @@ Items saved to `{phase_num}-HUMAN-UAT.md` — they will appear in `/gsd-progress
`/clear` then:
`/gsd-plan-phase {X} --gaps ${GSD_WS}`
`/gsd:plan-phase {X} --gaps ${GSD_WS}`
Also: `cat {phase_dir}/{phase_num}-VERIFICATION.md` — full report
Also: `/gsd-verify-work {X} ${GSD_WS}` — manual testing first
Also: `/gsd:verify-work {X} ${GSD_WS}` — manual testing first
```
Gap closure cycle: `/gsd-plan-phase {X} --gaps ${GSD_WS}` reads VERIFICATION.md → creates gap plans with `gap_closure: true` → user runs `/gsd-execute-phase {X} --gaps-only ${GSD_WS}` → verifier re-runs.
Gap closure cycle: `/gsd:plan-phase {X} --gaps ${GSD_WS}` reads VERIFICATION.md → creates gap plans with `gap_closure: true` → user runs `/gsd:execute-phase {X} --gaps-only ${GSD_WS}` → verifier re-runs.
</step>
<step name="update_roadmap">
@@ -1425,7 +1425,7 @@ Extract from result: `next_phase`, `next_phase_name`, `is_last_phase`, `warnings
{list each warning}
These items are tracked and will appear in `/gsd-progress` and `/gsd-audit-uat`.
These items are tracked and will appear in `/gsd:progress` and `/gsd:audit-uat`.
```
```bash
@@ -1512,7 +1512,7 @@ gsd-sdk query commit "docs(phase-{X}): evolve PROJECT.md after phase completion"
<step name="offer_next">
**Exception:** If `gaps_found`, the `verify_phase_goal` step already presents the gap-closure path (`/gsd-plan-phase {X} --gaps`). No additional routing needed — skip auto-advance.
**Exception:** If `gaps_found`, the `verify_phase_goal` step already presents the gap-closure path (`/gsd:plan-phase {X} --gaps`). No additional routing needed — skip auto-advance.
**No-transition check (spawned by auto-advance chain):**
@@ -1575,10 +1575,10 @@ If CONTEXT.md does **not** exist for the next phase, present:
```
## ✓ Phase {X}: {Name} Complete
/gsd-progress ${GSD_WS} — see updated roadmap
/gsd-discuss-phase {next} ${GSD_WS} — start here: discuss next phase before planning ← recommended
/gsd-plan-phase {next} ${GSD_WS} — plan next phase (skip discuss)
/gsd-execute-phase {next} ${GSD_WS} — execute next phase (skip discuss and plan)
/gsd:progress ${GSD_WS} — see updated roadmap
/gsd:discuss-phase {next} ${GSD_WS} — start here: discuss next phase before planning ← recommended
/gsd:plan-phase {next} ${GSD_WS} — plan next phase (skip discuss)
/gsd:execute-phase {next} ${GSD_WS} — execute next phase (skip discuss and plan)
```
If CONTEXT.md **exists** for the next phase, present:
@@ -1586,10 +1586,10 @@ If CONTEXT.md **exists** for the next phase, present:
```
## ✓ Phase {X}: {Name} Complete
/gsd-progress ${GSD_WS} — see updated roadmap
/gsd-plan-phase {next} ${GSD_WS} — start here: plan next phase (CONTEXT.md already present) ← recommended
/gsd-discuss-phase {next} ${GSD_WS} — re-discuss next phase
/gsd-execute-phase {next} ${GSD_WS} — execute next phase (skip planning)
/gsd:progress ${GSD_WS} — see updated roadmap
/gsd:plan-phase {next} ${GSD_WS} — start here: plan next phase (CONTEXT.md already present) ← recommended
/gsd:discuss-phase {next} ${GSD_WS} — re-discuss next phase
/gsd:execute-phase {next} ${GSD_WS} — execute next phase (skip planning)
```
Only suggest the commands listed above. Do not invent or hallucinate command names.
@@ -1616,7 +1616,7 @@ For 1M+ context models, consider:
</failure_handling>
<resumption>
Re-run `/gsd-execute-phase {phase}` → discover_plans finds completed SUMMARYs → skips them → resumes from first incomplete plan → continues wave execution.
Re-run `/gsd:execute-phase {phase}` → discover_plans finds completed SUMMARYs → skips them → resumes from first incomplete plan → continues wave execution.
STATE.md tracks: last completed plan, current wave, pending checkpoints.
</resumption>