Commit Graph

161 Commits

Author SHA1 Message Date
Alan
2d80cc3afd fix: use ~/.codeium/windsurf as Windsurf global config dir (#1856) 2026-04-06 08:40:37 -04:00
Tom Boucher
c0145018f6 fix(installer): deploy commands directory in local installs (#1843)
* fix(installer): deploy commands directory in local installs (#1736)

Local Claude installs now populate .claude/commands/gsd/ with command .md
files. Claude Code reads local project commands from .claude/commands/gsd/,
not .claude/skills/ — only the global ~/.claude/skills/ is used for the
skills format. The previous code deployed skills/ for both global and local
installs, causing all /gsd-* commands to return "Unknown skill" after a
local install.

Global installs continue to use skills/gsd-xxx/SKILL.md (Claude Code 2.1.88+
format). Local installs now use commands/gsd/xxx.md (the format Claude Code
reads for local project commands).

Also adds execute-phase.md to the prompt-injection scan allowlist (the
workflow grew past 50K chars, matching the existing discuss-phase.md exemption).

Closes #1736

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(installer): fix test cleanup pattern and uninstall local/global split (#1736)

Replace try/finally with t.after() in all 3 regression tests per CONTRIBUTING.md
conventions. Split the Claude Code uninstall branch on isGlobal: global removes
skills/gsd-*/ directories (with legacy commands/gsd/ cleanup), local removes
commands/gsd/ as the primary install location since #1736.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 23:11:18 -04:00
Jeremy McSpadden
00c6a5ea68 fix(install): preserve non-array hook entries during uninstall (#1824)
* fix(install): preserve non-array hook entries during uninstall

Uninstall filtering returned null for hook entries without a hooks
array, silently deleting user-owned entries with unexpected shapes.
Return the entry unchanged instead so only GSD hooks are removed.

* test(install): add regression test for non-array hook entry preservation (#1825)

Fix mirrored filterGsdHooks helper to match production code and add
test proving non-array hook entries survive uninstall filtering.
2026-04-05 23:07:59 -04:00
Tom Boucher
b185529f48 fix(installer): guard .sh hook registration with fs.existsSync before writing settings.json (#1823)
Before registering each .sh hook (validate-commit, session-state, phase-boundary),
check that the target file was actually copied. If the .sh file is missing (e.g.
omitted from the npm package as in v1.32.0), skip registration and emit a warning
instead of writing a broken hook entry that errors on every tool invocation.

Closes #1817

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 17:49:20 -04:00
Tom Boucher
b602c1ddc7 fix: remove editorial parenthetical descriptions from product names (#1778)
Community PRs repeatedly add marketing commentary in parentheses next to
product names (licensing model, parent company, architecture). Product
listings should contain only the product name.

Cleaned across 8 files in 5 languages (EN, KO, JA, ZH, PT) plus
install.js code comments and CHANGELOG. Added static analysis guard
test that prevents this pattern from recurring.

Fixes #1777

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 12:41:17 -04:00
Tom Boucher
0b6ef6fa24 fix: register gsd-workflow-guard.js in settings.json during install (#1772)
The hook was built, copied to hooks/dist/, and installed to disk — but
never registered as a PreToolUse entry in settings.json, making the
hooks.workflow_guard config flag permanently inert.

Adds the registration block following the same pattern as the other
community hooks (prompt-guard, read-guard, validate-commit, etc.).

Includes regression test that verifies every JS hook in gsdHooks has a
corresponding command construction and registration block.

Fixes #1767

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 12:30:24 -04:00
Jeremy McSpadden
175d89efa9 fix(install): uninstall hook safety — per-hook granularity, legacy migration, workflow-guard cleanup
Addresses three findings from Codex adversarial review of #1768:

- Uninstall settings cleanup now filters at per-hook granularity instead of
  per-entry. User hooks that share an entry with a GSD hook are preserved
  instead of being removed as collateral damage.
- Add gsd-workflow-guard to PreToolUse/BeforeTool uninstall settings filter
  so opt-in users don't get dangling references after uninstall.
- Codex install now strips legacy gsd-update-check.js hook entries before
  appending the corrected gsd-check-update.js, preventing duplicate hooks
  on upgrade from affected versions.
- 8 new regression tests covering per-hook filtering, legacy migration regex.

Fixes #1755
2026-04-05 10:46:40 -05:00
Jeremy McSpadden
84de0cc760 fix(install): comprehensive audit cleanup of hook copy, uninstall, and manifest (#1755) (#1768)
- Add chmod +x for .sh hooks during install (fixes #1755 permission denied)
- Fix Codex hook: wrong path (get-shit-done/hooks/) and inverted filename (gsd-update-check.js → gsd-check-update.js)
- Fix cache invalidation path from ~/cache/ to ~/.cache/gsd/
- Track .sh hooks in writeManifest so saveLocalPatches detects modifications
- Add gsd-workflow-guard.js to uninstall file cleanup list
- Add community hooks (session-state, validate-commit, phase-boundary) to uninstall settings.json cleanup
- Remove phantom gsd-check-update.sh from uninstall list
- Remove dead isCursor/isWindsurf branches in uninstall (already handled by combined branch)
- Warn when expected .sh hooks are missing after verifyInstalled
- Add 15 regression tests in install-hooks-copy.test.cjs
- Update codex-config.test.cjs assertions for corrected hook filename

Fixes #1755
2026-04-05 11:37:27 -04:00
Tom Boucher
6bd786bf88 test: add stale /gsd: colon reference regression guard (#1753)
* test: add stale /gsd: colon reference regression guard

Fixes #1748

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: replace 39 stale /gsd: colon references with /gsd- hyphen format

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 10:23:41 -04:00
Jeremy McSpadden
931fef5425 fix: add Kilo path replacement in copyFlattenedCommands (#1710)
Fixes #1709

copyFlattenedCommands replaced ~/.opencode/ paths but had no
equivalent ~/.kilo/ replacement. Adds kiloDirRegex for symmetric
path handling between the OpenCode and Kilo install pipelines.
2026-04-04 16:17:11 -04:00
Tom Boucher
7185803543 fix(install): apply path replacement in copyCommandsAsClaudeSkills (#1677)
* ci: drop Windows runner, add static hardcoded-path detection

Replace the Windows CI runner with a static analysis test that catches
the same class of platform-specific path bugs (C:\, /home/, /Users/,
/tmp/) without requiring an actual Windows machine.

- tests/hardcoded-paths.test.cjs: new static scanner that checks string
  literals in all source JS/CJS files for hardcoded platform paths;
  runs on Linux/macOS in <100ms and fires on every PR
- .github/workflows/test.yml: remove windows-latest from matrix; switch
  macOS smoke-test runner from Node 22 → Node 24 (the declared standard)
- package.json: bump engines.node from >=20.0.0 to >=22.0.0 (Node 20
  reached EOL April 2026)

Matrix goes from 4 runners → 3 runners per run:
  ubuntu/22  ubuntu/24  macos/24

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(install): apply path replacement in copyCommandsAsClaudeSkills (#1653)

copyCommandsAsClaudeSkills received pathPrefix as a parameter but never
used it — all 51 SKILL.md files kept hardcoded ~/.claude/ paths even on
local (per-project) installs, causing every skill's @-file references
to resolve to a nonexistent global directory.

Add the same three regex replacements that copyCommandsAsCodexSkills
already applies: ~/.claude/ → pathPrefix, $HOME/.claude/ → pathPrefix,
./.claude/ → ./getDirName(runtime)/.

Closes #1653

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 15:12:58 -04:00
Tom Boucher
ca6a273685 fix: remove marketing text from runtime prompt, fix #1656 and #1657 (#1672)
* chore: ignore .worktrees directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(install): remove marketing taglines from runtime selection prompt

Closes #1654

The runtime selection menu had promotional copy appended to some
entries ("open source, the #1 AI coding platform on OpenRouter",
"open source, free models"). Replaced with just the name and path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(kilo): update test to assert marketing tagline is removed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(tests): use process.execPath so tests pass in shells without node on PATH

Three test patterns called bare `node` via shell, which fails in Claude Code
sessions where `node` is not on PATH:

- helpers.cjs string branch: execSync(`node ...`) → execFileSync(process.execPath)
  with a shell-style tokenizer that handles quoted args and inner-quote stripping
- hooks-opt-in.test.cjs: spawnSync('bash', ...) for hooks that call `node`
  internally → spawnHook() wrapper that injects process.execPath dir into PATH
- concurrency-safety.test.cjs: exec(`node ...`) for concurrent patch test
  → exec(`"${process.execPath}" ...`)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: resolve #1656 and #1657 — bash hooks missing from dist, SDK install prompt

#1656: Community bash hooks (gsd-session-state.sh, gsd-validate-commit.sh,
gsd-phase-boundary.sh) were never included in HOOKS_TO_COPY in build-hooks.js,
so hooks/dist/ never contained them and the installer could not copy them to
user machines. Fixed by adding the three .sh files to the copy array with
chmod +x preservation and skipping JS syntax validation for shell scripts.

#1657: promptSdk() called installSdk() which ran `npm install -g @gsd-build/sdk`
— a package that does not exist on npm, causing visible errors during interactive
installs. Removed promptSdk(), installSdk(), --sdk flag, and all call sites.

Regression tests in tests/bugs-1656-1657.test.cjs guard both fixes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: sort runtime list alphabetically after Claude Code

- Claude Code stays pinned at position 1
- Remaining 10 runtimes sorted A-Z: Antigravity(2), Augment(3), Codex(4),
  Copilot(5), Cursor(6), Gemini(7), Kilo(8), OpenCode(9), Trae(10), Windsurf(11)
- Updated runtimeMap, allRuntimes, and prompt display in promptRuntime()
- Updated multi-runtime-select, kilo-install, copilot-install tests to match

Also fix #1656 regression test: run build-hooks.js in before() hook so
hooks/dist/ is populated on CI (directory is gitignored; build runs via
prepublishOnly before publish, not during npm ci).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 14:15:30 -04:00
Tom Boucher
085f5b9c5b fix(install): remove marketing taglines from runtime selection prompt (#1655)
* chore: ignore .worktrees directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(install): remove marketing taglines from runtime selection prompt

Closes #1654

The runtime selection menu had promotional copy appended to some
entries ("open source, the #1 AI coding platform on OpenRouter",
"open source, free models"). Replaced with just the name and path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(kilo): update test to assert marketing tagline is removed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 13:23:15 -04:00
Tom Boucher
8d6577d101 fix: update Discord invite link from vanity URL to permanent link (#1648)
The discord.gg/gsd vanity link was lost due to a drop in server boosts.
Updated all references to the permanent invite link discord.gg/mYgfVNfA2r
across READMEs, issue templates, install script, and join-discord command.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 09:04:13 -04:00
Elwin
66368a42d9 feat: add Trae runtime install support (#1566)
* feat: add Trae runtime install support

- Add Trae as a supported runtime in bin/install.js
- Update README and ARCHITECTURE documentation for Trae support
- Add trae-install.test.cjs test file
- Update multi-runtime-select tests for Trae compatibility

* feat(trae): add TRAE_CONFIG_DIR environment variable support

Add support for TRAE_CONFIG_DIR environment variable as an additional way to specify the config directory for Trae runtime, following the same precedence pattern as other runtimes.

* fix(trae): improve slash command conversion and subagent type mapping

Update the slash command regex pattern to properly match and convert command names. Change subagent type mapping from "general-purpose" to "general_purpose_task" to match Trae's conventions. Also add comprehensive tests for Trae uninstall cleanup behavior.

* docs: add Trae and Windsurf to supported runtimes in translations

Update Korean, Japanese, and Portuguese README files to include Trae and Windsurf as supported runtimes in the documentation. Add installation and uninstallation instructions for Trae.

* fix: update runtime selection logic and path replacements

- Change 'All' shortcut from option 11 to 12 to accommodate new runtime
- Update path replacement regex to handle gsd- prefix more precisely
- Adjust test cases to reflect new runtime selection numbering
- Add configDir to trae install options for proper path resolution

* test(trae-install): add tests for getGlobalDir function

Add test cases to verify behavior of getGlobalDir function with different configurations:
- Default directory when no env var or explicit dir is provided
- Explicit directory takes priority
- Respects TRAE_CONFIG_DIR env var
- Priority of explicit dir over env var
- Compatibility with other runtimes
2026-04-04 08:13:15 -04:00
Tom Boucher
9d626de5fa fix(hooks): add read-before-edit guard for non-Claude runtimes (#1645)
* fix(hooks): add read-before-edit guidance for non-Claude runtimes

When models that don't natively enforce read-before-edit hit the guard,
the error message now includes explicit instruction to Read first.
This prevents infinite retry loops that burn through usage.

Closes #1628

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(build): register gsd-read-guard.js in HOOKS_TO_COPY and harden tests

The hook was missing from scripts/build-hooks.js, so global installs
would never receive the hook file in hooks/dist/. Also adds tests for
build registration, install uninstall list, and non-string file_path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 07:35:18 -04:00
Quang Do
d4767ac2e0 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>
2026-04-04 07:24:31 -04:00
Alex Alecu
5451e13abb fix: clean up remaining Kilo review follow-ups
Remove the unused JSONC helper and duplicate test export so the installer only keeps the shipped fixes. This closes the remaining code-level review feedback after the Kilo support sync.
2026-04-03 14:34:21 +03:00
Alex Alecu
0866290c1b merge: sync Kilo runtime branch with latest main 2026-04-03 12:47:24 +03:00
Alex Alecu
b8b01fca64 fix: normalize Kilo skill paths and guard OpenCode permissions
Keep Kilo skill path rewrites consistent and avoid rewriting valid string-valued OpenCode permission configs while preserving resolved config-dir handling.
2026-04-03 10:55:34 +03:00
Tom Boucher
647ddcecf9 Merge pull request #1524 from Tavernari/feat/augment-support
feat: Add Augment Code runtime support
2026-04-02 18:02:32 -04:00
Tom Boucher
56ec1f0360 Merge pull request #1428 from Tibsfox/fix/preserve-profile-on-update-1423
fix(install): preserve USER-PROFILE.md and dev-preferences.md on update
2026-04-02 18:01:30 -04:00
Tom Boucher
8af7ad96fc Merge pull request #1564 from Tibsfox/feat/hooks-opt-in-1473d
feat(hooks): opt-in session-state, commit-validation, phase-boundary hooks
2026-04-02 17:49:08 -04:00
Alex Alecu
fc1a4ccba1 merge: sync Kilo runtime branch with main
Bring the latest main branch updates into feat/kilo-runtime-support while preserving KILO_CONFIG resolution, Kilo agent permission conversion, and relative .claude path rewrites.
2026-04-02 16:00:09 +03:00
Tibsfox
6c5f89a4fd fix(install): preserve dev-preferences.md in Claude Code legacy cleanup path
After #1540 migrated Claude Code to skills/ format, the uninstall
added a legacy commands/gsd/ cleanup that wiped the directory without
checking for user files. Add preserve logic to the legacy cleanup path
matching what Gemini's commands/gsd/ path already has.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 05:55:42 -07:00
Tibsfox
bdd41f961e fix(install): add error handling on restore and scalability note
Address review feedback: wrap writeFileSync in try/catch so restore
failures surface a clear error instead of silently losing user files.
Add comment noting the naming convention approach for future scaling.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 05:54:19 -07:00
Tibsfox
6f3a9d88c7 fix(install): preserve USER-PROFILE.md and dev-preferences.md on update
The uninstall step wipes get-shit-done/ and commands/gsd/ directories
entirely, destroying user-generated files like USER-PROFILE.md (from
/gsd:profile-user) and dev-preferences.md. These files are now read
before rmSync and restored immediately after.

Closes #1423

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 05:54:19 -07:00
Alex Alecu
f8edfe7f15 fix: align Kilo config and agent conversion
Honor KILO_CONFIG across installer and workflow resolution, preserve Claude agent tool intent as explicit Kilo permissions, and rewrite relative .claude references during Kilo conversion.
2026-04-02 15:44:46 +03:00
Tibsfox
4157c7f20a feat(hooks): add opt-in community hooks for GSD projects
Port 3 community hooks from gsd-skill-creator, gated behind hooks.community config flag. All hooks are registered on install but are no-ops unless the project config has hooks: { community: true }.

gsd-session-state.sh (SessionStart): outputs STATE.md head for orientation. gsd-validate-commit.sh (PreToolUse/Bash): blocks non-Conventional-Commits messages. gsd-phase-boundary.sh (PostToolUse/Write|Edit): warns when .planning/ files are modified.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 04:23:44 -07:00
Alex Alecu
52585de4ab fix: move Kilo above OpenCode in installer 2026-04-02 11:34:31 +03:00
Nic Barrett
b12d684940 fix(opencode): guard string-valued permission config (#781) 2026-04-01 17:02:33 -05:00
Tom Boucher
a96b9e209c Merge pull request #1474 from Tibsfox/fix/reapply-patches-misclassification-1469
fix(reapply-patches): three-way merge and never-skip invariant for backed-up files
2026-04-01 17:25:55 -04:00
Victor Carvalho Tavernari
7e71fac76f fix: verify and correct Augment tool mappings based on auggie CLI 2026-04-01 22:24:33 +01:00
Victor Carvalho Tavernari
5a43437bc0 feat: add Augment Code runtime support
- Add --augment flag to install for Augment only
- Add Augment to --all and interactive menu (now 9 runtimes + All)
- Create conversion functions for Augment skills and agents:
  - convertClaudeToAugmentMarkdown: path and brand replacement
  - convertClaudeCommandToAugmentSkill: skill format with adapter header
  - convertClaudeAgentToAugmentAgent: agent format conversion
  - copyCommandsAsAugmentSkills: copy commands as skills
- Map tool names: Bash → launch-process, Edit → str-replace-editor, etc.
- Add runtime label and uninstall support for Augment
- Add tests: augment-conversion.test.cjs with 15 test cases
- Update multi-runtime-select.test.cjs to include Augment

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 22:24:33 +01:00
Tom Boucher
77953ec1d9 Merge pull request #1436 from Tibsfox/fix/codex-path-replacement-1430
fix(install): add .claude path replacement for Codex runtime
2026-04-01 17:11:54 -04:00
Tom Boucher
8cd6dd33c5 Merge pull request #1540 from gsd-build/fix/1504-claude-skills-migration
fix: migrate Claude Code commands/ to skills/ format for 2.1.88+
2026-04-01 17:07:43 -04:00
Tom Boucher
01fda70a19 fix: migrate Claude Code commands/ to skills/ format for 2.1.88+ compatibility
Claude Code 2.1.88+ deprecated commands/ subdirectory discovery in favor of
skills/*/SKILL.md format. This migrates the Claude Code installer to use the
same skills pattern already used by Codex, Copilot, Cursor, Windsurf, and
Antigravity.

Key changes:
- New convertClaudeCommandToClaudeSkill() preserving allowed-tools and argument-hint
- New copyCommandsAsClaudeSkills() mirroring Copilot pattern
- Install now writes skills/gsd-*/SKILL.md instead of commands/gsd/*.md
- Legacy commands/gsd/ cleaned up during install
- Manifest tracks skills/ for Claude Code
- Uninstall handles both skills/ and legacy commands/

Fixes #1504
Supersedes #1538

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 17:04:53 -04:00
Tom Boucher
2f03830f4c Merge pull request #1500 from Tibsfox/fix/settings-jsonc-comments-1461
fix(install): handle JSONC (comments) in settings.json without data loss
2026-04-01 17:00:55 -04:00
Tom Boucher
1dc0d90c6e Merge pull request #1394 from Tibsfox/fix/issue-triage-batch-1392-1391-1389
fix: trailing slash, slug newlines, and duplicate command registration
2026-04-01 12:12:37 -04:00
Nick Gagne
eecb06cabe Fix path replacement for ~/.claude to ~/.github (#1529)
* Fix path replacement for ~/.claude to ~/.github

The current rules miss replacing this path because the current rules look for the .claude directory with a trailing slash, which this does not have.

* Fix regex to replace trailing .claude with .github
2026-04-01 08:48:24 -06:00
Alex Alecu
ac4836d270 feat: add Kilo CLI runtime support 2026-03-31 15:59:31 +03:00
Tibsfox
ffe5319fe5 fix(install): handle JSONC (comments) in settings.json without data loss
When settings.json contains comments (// or /* */), which many CLI tools
allow, JSON.parse() fails and readSettings() silently returned {}.
This empty object was then written back by writeSettings(), destroying
the user's entire configuration.

Changes:
- Add stripJsonComments() that handles line comments, block comments,
  trailing commas, and preserves comments inside string values
- readSettings() tries standard JSON first (fast path), falls back to
  JSONC stripping on parse failure
- On truly malformed files (even JSONC stripping fails), return null
  with a warning instead of silently returning {} — prevents data loss
- All callers of readSettings() now guard against null return to skip
  settings modification rather than overwriting with empty object

Closes #1461

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 13:52:51 -07:00
Tibsfox
88af6fdcda fix(reapply-patches): three-way merge and never-skip invariant for backed-up files
The reapply-patches workflow used a two-way comparison (user's backup vs
new version) which couldn't distinguish user customizations from version
drift. This caused 10/10 files to be misclassified as "no custom content"
in real-world usage, silently discarding user modifications.

Changes:
- Rewrite workflow with three-way merge strategy (pristine baseline vs
  user-modified backup vs newly installed version)
- Add critical invariant: files in gsd-local-patches/ must NEVER be
  classified as "no custom content" — they were backed up because the
  installer's hash check detected modifications
- Add git-aware detection path using commit history when config dir is
  a git repo
- Add pristine_hashes to backup-meta.json so the reapply workflow can
  verify reconstructed baseline files
- Add from_manifest_timestamp to backup-meta.json for version tracking
- Conservative default: flag as CONFLICT when uncertain, not SKIP

Closes #1469

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 10:04:22 -07:00
Tibsfox
2b8c95a05c fix(install): add .claude path replacement for Codex runtime
convertClaudeToCodexMarkdown() was missing path replacement — unlike
Copilot/Gemini/Antigravity converters which all replace $HOME/.claude/
paths. This left hardcoded .claude references in Codex agent files,
causing ENOENT when gsd-tools.cjs tried to load from ~/.claude/ on
Codex installations.

Closes #1430

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 17:41:03 -07:00
TÂCHES
89f95c43ba feat: auto --init flag, headless prompts, and prompt sanitizer (#1417)
* fix: Created 10 headless prompt files (5 workflows + 5 agents) in sdk/p…

- "sdk/prompts/workflows/execute-plan.md"
- "sdk/prompts/workflows/research-phase.md"
- "sdk/prompts/workflows/plan-phase.md"
- "sdk/prompts/workflows/verify-phase.md"
- "sdk/prompts/workflows/discuss-phase.md"
- "sdk/prompts/agents/gsd-executor.md"
- "sdk/prompts/agents/gsd-phase-researcher.md"
- "sdk/prompts/agents/gsd-planner.md"

GSD-Task: S01/T02

* feat: Created prompt-sanitizer.ts, wired headless prompt loading into P…

- "sdk/src/prompt-sanitizer.ts"
- "sdk/src/phase-prompt.ts"
- "sdk/src/gsd-tools.ts"
- "sdk/src/gsd-tools.test.ts"
- "sdk/src/phase-runner-types.test.ts"

GSD-Task: S01/T01

* test: Added 111 unit tests covering sanitizePrompt(), headless prompt l…

- "sdk/src/prompt-sanitizer.test.ts"
- "sdk/src/headless-prompts.test.ts"
- "sdk/src/phase-prompt.test.ts"

GSD-Task: S01/T03

* feat: Wired sdkPromptsDir preference and sanitizePrompt into InitRunner…

- "sdk/src/init-runner.ts"
- "sdk/package.json"

GSD-Task: S02/T01

* feat: add --init flag to auto command for single-command PRD-to-execution

gsd-sdk auto --init @path/to/prd.md now bootstraps the project (init)
then immediately runs the autonomous phase execution loop.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: add remaining headless prompt files and templates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: Extended init-runner.test.ts with 7 sdkPromptsDir preference and…

- "sdk/src/init-runner.test.ts"

GSD-Task: S02/T03

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 22:40:34 -06:00
TÂCHES
a858c6ddff feat: add --sdk flag and interactive SDK prompt to installer (#1415)
Add installSdk() and promptSdk() to the installer so users can
optionally install @gsd-build/sdk during GSD setup. The --sdk flag
installs without prompting; interactive installs get a Y/N prompt
after runtime installation completes. SDK installs use @latest with
suppressed npm noise (--force --no-fund --loglevel=error, stdio: pipe).

Cherry-picked from fix/sdk-cli-runtime-bugs (de9f18f) which was
left out of #1407.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 22:02:23 -06:00
Tibsfox
69e104dffc fix(windsurf): remove trailing slash from .windsurf/rules path
Node v25 preserves trailing slashes in path.join, causing
writeFileSync to fail with ENOENT when the converted path
ends in '/'. Affects all Windsurf users on Node v25+.

Fixes gsd-build/get-shit-done#1392

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 01:13:46 -07:00
Tom Boucher
f4d8858188 fix: repair trapped non-boolean keys under [features] on Codex re-install
Pre-#1346 GSD installs prepended [features] before bare top-level keys
in ~/.codex/config.toml, trapping keys like model="gpt-5.3-codex" under
[features] where Codex expects only booleans. The #1346 fix prevented
NEW corruption but did not repair EXISTING corrupted configs. Re-installing
GSD left the trapped keys in place, causing "invalid type: string, expected
a boolean" on every Codex launch.

repairTrappedFeaturesKeys() now detects non-boolean key-value lines inside
[features] and relocates them before the [features] header during
ensureCodexHooksFeature(), so re-installs heal previously corrupted configs.

Fixes #1379

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 14:50:02 -04:00
Tom Boucher
60fda20885 Merge pull request #1346 from ChaptersOfFloatingLife/fix/codex-config-toplevel-keys
fix: preserve top-level config keys and use absolute agent paths for Codex ≥0.116
2026-03-23 22:26:56 -04:00
Tom Boucher
7f1479d370 Merge pull request #1347 from gsd-build/fix/hook-field-validation
fix: validate hook field requirements to prevent silent settings.json rejection
2026-03-23 22:18:29 -04:00