fix: replace /gsd: slash command format with /gsd- skill format in all user-facing content (#1579)
* fix: replace /gsd: command format with /gsd- skill format in all suggestions All next-step suggestions shown to users were still using the old colon format (/gsd:xxx) which cannot be copy-pasted as skills. Migrated all occurrences across agents/, commands/, get-shit-done/, docs/, README files, bin/install.js (hardcoded defaults for claude runtime), and get-shit-done/bin/lib/*.cjs (generate-claude-md templates and error messages). Updated tests to assert new hyphen format instead of old colon format. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: migrate remaining /gsd: format to /gsd- in hooks, workflows, and sdk Addresses remaining user-facing occurrences missed in the initial migration: - hooks/: fix 4 user-facing messages (pause-work, update, fast, quick) and 2 comments in gsd-workflow-guard.js - get-shit-done/workflows/: fix 21 Skill() literal calls that Claude executes directly (installer does not transform workflow content) - sdk/prompt-sanitizer.ts: update regex to strip /gsd- format in addition to legacy /gsd: format; update JSDoc comment - tests/: update autonomous-ui-steps, prompt-sanitizer to assert new format Note: commands/gsd/*.md frontmatter (name: gsd:xxx) intentionally unchanged — installer derives skillName from directory path, not the name field. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(plan-phase): preserve --chain flag in auto-advance sync and handle ui-phase gate in chain mode Bug 1: step 15 sync-flag check only guarded against --auto, causing _auto_chain_active to be cleared when plan-phase is invoked without --auto in ARGUMENTS even though a --chain pipeline was active. Added --chain to the guard condition, matching discuss-phase behaviour. Bug 2: UI Design Contract gate (step 5.6) always exited the workflow when UI-SPEC was missing, breaking the discuss --chain pipeline silently. When _auto_chain_active is true, the gate now auto-invokes gsd-ui-phase --auto via Skill() and continues to step 6 without prompting. Manual invocations retain the existing AskUserQuestion flow. * fix: remove <sub>/clear</sub> pattern and duplicate old-format command in discuss-phase.md --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -44,10 +44,27 @@ describe('sanitizePrompt', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// ─── /gsd: slash commands ────────────────────────────────────────────────
|
||||
// ─── /gsd- skill commands ────────────────────────────────────────────────
|
||||
|
||||
describe('/gsd: slash commands', () => {
|
||||
it('strips lines containing /gsd: commands', () => {
|
||||
describe('/gsd- skill commands', () => {
|
||||
it('strips lines containing /gsd- commands', () => {
|
||||
const input = 'Before\nRun /gsd-execute-plan to proceed\nAfter';
|
||||
const result = sanitizePrompt(input);
|
||||
expect(result).not.toContain('/gsd-');
|
||||
expect(result).toContain('Before');
|
||||
expect(result).toContain('After');
|
||||
});
|
||||
|
||||
it('strips various /gsd- skill formats', () => {
|
||||
const input = [
|
||||
'Use /gsd-research-phase',
|
||||
'Then /gsd-plan-phase --auto',
|
||||
'Finally /gsd-verify-phase',
|
||||
].join('\n');
|
||||
expect(sanitizePrompt(input)).toBe('');
|
||||
});
|
||||
|
||||
it('strips legacy /gsd: slash commands for backward compatibility', () => {
|
||||
const input = 'Before\nRun /gsd:execute-plan to proceed\nAfter';
|
||||
const result = sanitizePrompt(input);
|
||||
expect(result).not.toContain('/gsd:');
|
||||
@@ -55,7 +72,7 @@ describe('sanitizePrompt', () => {
|
||||
expect(result).toContain('After');
|
||||
});
|
||||
|
||||
it('strips various /gsd: command formats', () => {
|
||||
it('strips various legacy /gsd: command formats', () => {
|
||||
const input = [
|
||||
'Use /gsd:research-phase',
|
||||
'Then /gsd:plan-phase --auto',
|
||||
@@ -190,7 +207,7 @@ describe('sanitizePrompt', () => {
|
||||
'',
|
||||
'Investigate the codebase using @file:context.md for context.',
|
||||
'',
|
||||
'When done, run /gsd:plan-phase to proceed.',
|
||||
'When done, run /gsd-plan-phase to proceed.',
|
||||
'',
|
||||
'If unclear, AskUserQuestion("What should I focus on?")',
|
||||
'',
|
||||
@@ -205,6 +222,7 @@ describe('sanitizePrompt', () => {
|
||||
|
||||
const result = sanitizePrompt(input);
|
||||
expect(result).not.toContain('@file:');
|
||||
expect(result).not.toContain('/gsd-');
|
||||
expect(result).not.toContain('/gsd:');
|
||||
expect(result).not.toContain('AskUserQuestion');
|
||||
expect(result).not.toContain('SlashCommand');
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* Patterns removed:
|
||||
* - @file:... references (file injection directives)
|
||||
* - /gsd:... slash commands
|
||||
* - /gsd-... skill commands
|
||||
* - AskUserQuestion(...) calls
|
||||
* - STOP directives in interactive contexts
|
||||
* - SlashCommand() calls
|
||||
@@ -22,8 +22,8 @@ const LINE_PATTERNS: RegExp[] = [
|
||||
// @file:path/to/something references — entire line
|
||||
/^.*@file:\S+.*$/gm,
|
||||
|
||||
// /gsd:command references — entire line containing a slash command
|
||||
/^.*\/gsd:\S+.*$/gm,
|
||||
// /gsd-command references — entire line containing a skill command
|
||||
/^.*\/gsd[:-]\S+.*$/gm,
|
||||
|
||||
// AskUserQuestion(...) calls — entire line
|
||||
/^.*AskUserQuestion\s*\(.*$/gm,
|
||||
|
||||
Reference in New Issue
Block a user