fix(claude): restore namespaced /gsd:<command> references (#3452)

* fix(claude): restore namespaced /gsd:<command> references

* test(claude): align slash-command expectations to /gsd: form

* test(claude): align generated command references to /gsd:

* test(claude): finish /gsd: namespace expectation updates
This commit is contained in:
Tom Boucher
2026-05-12 21:53:24 -04:00
committed by GitHub
parent 740d718941
commit a60e05c714
187 changed files with 1089 additions and 1142 deletions

View File

@@ -130,7 +130,7 @@ process.stdin.on('end', () => {
const isGsdActive = fs.existsSync(path.join(cwd, '.planning', 'STATE.md'));
// On CRITICAL with active GSD project, auto-record session state as a
// breadcrumb for /gsd-resume-work (#1974). Fire-and-forget subprocess —
// breadcrumb for /gsd:resume-work (#1974). Fire-and-forget subprocess —
// doesn't block the hook or the agent. Fires ONCE per CRITICAL session,
// guarded by warnData.criticalRecorded to prevent repeated overwrites
// of the "crash moment" record on every debounce cycle.
@@ -163,7 +163,7 @@ process.stdin.on('end', () => {
? `CONTEXT CRITICAL: Usage at ${usedPct}%. Remaining: ${remaining}%. ` +
'Context is nearly exhausted. Do NOT start new complex work or write handoff files — ' +
'GSD state is already tracked in STATE.md. Inform the user so they can run ' +
'/gsd-pause-work at the next natural stopping point.'
'/gsd:pause-work at the next natural stopping point.'
: `CONTEXT CRITICAL: Usage at ${usedPct}%. Remaining: ${remaining}%. ` +
'Context is nearly exhausted. Inform the user that context is low and ask how they ' +
'want to proceed. Do NOT autonomously save state or write handoff files unless the user asks.';

View File

@@ -398,11 +398,11 @@ function runStatusline() {
try {
const cache = JSON.parse(fs.readFileSync(cacheFile, 'utf8'));
if (cache.update_available) {
gsdUpdate = '\x1b[33m⬆ /gsd-update\x1b[0m │ ';
gsdUpdate = '\x1b[33m⬆ /gsd:update\x1b[0m │ ';
}
if (cache.stale_hooks && cache.stale_hooks.length > 0) {
// If installed version is ahead of npm latest, this is a dev install.
// Running /gsd-update would downgrade — show a contextual warning instead.
// Running /gsd:update would downgrade — show a contextual warning instead.
const isDevInstall = (() => {
if (!cache.installed || !cache.latest || cache.latest === 'unknown') return false;
const parseV = v => v.replace(/^v/, '').split('.').map(Number);
@@ -413,7 +413,7 @@ function runStatusline() {
if (isDevInstall) {
gsdUpdate += '\x1b[33m⚠ dev install — re-run installer to sync hooks\x1b[0m │ ';
} else {
gsdUpdate += '\x1b[31m⚠ stale hooks — run /gsd-update\x1b[0m │ ';
gsdUpdate += '\x1b[31m⚠ stale hooks — run /gsd:update\x1b[0m │ ';
}
}
} catch (e) {}

View File

@@ -41,7 +41,7 @@ function buildBannerOutput(state) {
const installed = cache.installed || 'unknown';
const latest = cache.latest || 'unknown';
return {
systemMessage: `GSD update available: ${installed} → ${latest}. Run /gsd-update.`,
systemMessage: `GSD update available: ${installed} → ${latest}. Run /gsd:update.`,
};
}

View File

@@ -5,7 +5,7 @@
// (no active /gsd- skill or Task subagent) and injects an advisory warning.
//
// This is a SOFT guard — it advises, not blocks. The edit still proceeds.
// The warning nudges Claude to use /gsd-quick or /gsd-fast instead of
// The warning nudges Claude to use /gsd:quick or /gsd:fast instead of
// making direct edits that bypass state tracking.
//
// Enable via config: hooks.workflow_guard: true (default: false)
@@ -80,7 +80,7 @@ process.stdin.on('end', () => {
hookEventName: "PreToolUse",
additionalContext: `⚠️ WORKFLOW ADVISORY: You're editing ${path.basename(filePath)} directly without a GSD command. ` +
'This edit will not be tracked in STATE.md or produce a SUMMARY.md. ' +
'Consider using /gsd-fast for trivial fixes or /gsd-quick for larger changes ' +
'Consider using /gsd:fast for trivial fixes or /gsd:quick for larger changes ' +
'to maintain project state tracking. ' +
'If this is intentional (e.g., user explicitly asked for a direct edit), proceed normally.'
}