The if/else branches in copyFlattenedCommands were identical.
This function is only used by OpenCode (Gemini uses copyWithPathReplacement).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
OpenCode follows XDG Base Directory spec and expects config at
~/.config/opencode/, not ~/.opencode/. This fix:
- Add getOpencodeGlobalDir() to detect correct path via:
- OPENCODE_CONFIG_DIR env var
- OPENCODE_CONFIG env var (uses dirname)
- XDG_CONFIG_HOME/opencode
- ~/.config/opencode (default)
- Use 'command/' (singular) instead of 'commands/' (plural)
- Use flat file structure: command/gsd-help.md instead of
commands/gsd/help.md (invoked as /gsd-help)
- Write permissions to ~/.config/opencode/opencode.json
- Update content conversion to replace ~/.claude with
~/.config/opencode and /gsd: with /gsd-
Fixes OpenCode installation which was previously installing to
~/.opencode/ where OpenCode couldn't find the commands.
Users can now choose to install for Claude Code, OpenCode, or both
when running the installer interactively. New CLI flags:
- --claude: Install for Claude Code only
- --opencode: Install for OpenCode only
- --both: Install for both runtimes
The installer prompts for runtime first, then location. Backward
compatible - existing --global and --local flags still work.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When installing with --opencode, the installer now adds read and
external_directory permissions for ~/.opencode/get-shit-done/* to
~/.opencode.json. This prevents OpenCode from prompting for permission
every time GSD commands access reference docs.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously, closing the readline (via Escape, Ctrl+C, or stdin closure)
would default to global install. Now it cancels the installation.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace $HOME with actual resolved path in hook command strings.
$HOME is a Unix shell variable that is not expanded by cmd.exe or
PowerShell on Windows, causing hooks to fail with MODULE_NOT_FOUND.
The fix uses a new buildHookCommand() helper that:
- Uses the actual claudeDir path instead of $HOME
- Normalizes backslashes to forward slashes for Node.js compatibility
Rolled back the intel system due to overengineering concerns:
- 1200+ line hook with SQLite graph database
- 21MB sql.js dependency
- Entity generation spawning additional Claude calls
- Complex system with unclear value
Removed:
- /gsd:analyze-codebase command
- /gsd:query-intel command
- gsd-intel-index.js, gsd-intel-session.js, gsd-intel-prune.js hooks
- gsd-entity-generator, gsd-indexer agents
- entity.md template
- sql.js dependency
Preserved:
- Model profiles feature
- Statusline hook
- All other v1.9.x improvements
-3,065 lines removed
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
All GSD hooks now use gsd- prefix. Installer updated to clean up old
statusline.js file and hook registration from previous installs.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New intel-prune.js hook runs after each Claude response.
Checks if indexed files still exist, removes stale entries.
Fast (only fs.existsSync checks) and silent (never blocks).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes#119 - Installation on WSL2 via npx would report success but
files weren't actually copied due to stdin handling issues.
Changes:
- Detect non-TTY stdin and fall back to global install automatically
- Handle premature readline close events
- Verify each component exists after copying before showing success
- Exit with error if any critical component fails to install
- Show workaround command when installation fails
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Users who installed before the hook was removed have stranded files
and hook registrations. Installer now removes both:
- The orphaned file (hooks/gsd-notify.sh)
- The hook registration in settings.json
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Wipe commands/gsd/ and get-shit-done/ before copying
- Delete only gsd-*.md agents (preserves user agents)
- Add confirmation step to /gsd:update with changelog preview
- Warn users about clean install behavior before updating
- Convert statusline.sh and gsd-check-update.sh to Node.js
- Remove gsd-notify.sh (blocking popups, not true toasts)
- Remove --force-notify and --no-notify flags from installer
- Use `node` command for cross-platform hook execution
Fixes#114
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Alerts user when Claude stops (task complete, needs input, etc.)
with context about what completed. Works on Mac (osascript alert),
Linux (notify-send/zenity), and Windows (PowerShell MessageBox).
Follows same optional install pattern as statusline:
- Prompts in interactive mode if existing hook detected
- --force-notify to replace existing
- --no-notify to skip installation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds SessionStart hook that checks npm in background, caches result.
Statusline shows "⬆ /gsd:update │" when update available.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Install statusline.sh to {claudeDir}/hooks/
- Configure statusLine in settings.json automatically
- Skip if statusline already exists (non-interactive)
- Prompt to keep/replace in interactive mode
- Add --force-statusline flag to override
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Moves all plan execution logic into a dedicated subagent:
- Deviation rules, checkpoint protocols, commit formatting
- Summary creation, state updates, TDD execution
- Authentication gate handling, continuation support
Installer now copies agents/ to ~/.claude/agents/
Co-Authored-By: Claude <noreply@anthropic.com>
- Error when --config-dir is used without a path value
- Error when --config-dir is combined with --local flag
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Global installs now respect CLAUDE_CONFIG_DIR when set, allowing users
to customize their Claude config location. Handles tilde expansion for
paths like ~/custom-claude.
Closes#10🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace ~/.claude/ with ./.claude/ in all .md files when
installing locally, so file references work correctly.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Prompt user to choose global (~/.claude) or local (./.claude)
- Support --global/-g and --local/-l flags for non-interactive use
- Default to global when Enter pressed
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>