Commit Graph

58 Commits

Author SHA1 Message Date
Lex Christopherson
d55998b601 Revert "feat(codex): convert Task() calls to codex exec during install"
This reverts commit 87c387348f.
2026-02-19 14:34:39 -06:00
Lex Christopherson
e8202637e5 Revert "feat(codex): install GSD commands as prompts for '/' menu discoverability"
This reverts commit db1d003d86.
2026-02-19 14:34:39 -06:00
Lex Christopherson
db1d003d86 feat(codex): install GSD commands as prompts for '/' menu discoverability
Skills use '$gsd-*' syntax which isn't visible in the '/' command menu.
Adding parallel install to ~/.codex/prompts/gsd_*.md surfaces all GSD
commands as /prompts:gsd_* entries in the Codex UI slash command menu.

- Add installCodexPrompts() to install commands/gsd/*.md as prompts/gsd_*.md
- Add convertClaudeToCodexPrompt() to strip to description/argument-hint only
- Remove cleanupOrphanedFiles() code that was deleting prompts/gsd_*.md
- Both skills (30) and prompts (30) now install side by side

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 11:35:24 -06:00
Lex Christopherson
87c387348f feat(codex): convert Task() calls to codex exec during install
Adds convertTaskCallsForCodex() to bin/install.js that transforms
Task(...) orchestration calls in workflow files to codex exec heredoc
invocations during Codex install.

- Paren-depth scanner handles multi-line Task() blocks reliably
- Supports all prompt= forms: literal, concat (+ var), bare var, triple-quoted
- Skips prose Task() references (no prompt= param or empty body)
- Applies only to workflows/ subdirectory, not references/templates/agents
- Sequential AGENT_OUTPUT_N capture vars for return value checks
- Source files unchanged; Claude/OpenCode/Gemini installs unaffected

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 11:08:45 -06:00
Lex Christopherson
e449c5afa6 fix(gemini): escape shell variables in agent bodies for Gemini CLI
Gemini CLI's templateString() treats all ${word} patterns in agent
system prompts as template variables, throwing "Template validation
failed: Missing required input parameters: PHASE" when GSD agents
contain shell variables like ${PHASE} in bash code blocks.

Convert ${VAR} to $VAR in agent bodies during Gemini installation.
Both forms are equivalent bash; $VAR is invisible to Gemini's
/\$\{(\w+)\}/g template regex. Complex expansions like ${VAR:-default}
are preserved since they don't match the word-only pattern.

Closes #613

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 14:03:40 -06:00
Lex Christopherson
474b75ea97 fix(installer): convert general-purpose subagent to OpenCode's "general"
OpenCode uses "general" as its built-in general-purpose subagent type,
while Claude Code uses "general-purpose". This caused "Unknown agent type:
general-purpose is not a valid agent type" errors in OpenCode when running
workflows that spawn subagents (plan-phase, new-project, debug, etc.).

Fixes #411

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 15:44:04 -06:00
Lex Christopherson
0dde97980c fix(installer): use correct config path for local OpenCode installs
Local OpenCode installs were overwriting ~/.config/opencode/opencode.json
instead of ./.opencode/opencode.json. This fix threads the isGlobal flag
through the install/uninstall chain so permissions are written to the
correct location.

Fixes #435

Co-Authored-By: Gary Trakhman <gtrak@users.noreply.github.com>
2026-02-15 14:33:50 -06:00
Lex Christopherson
c5fbd051f6 fix(installer): quote config dir in hook templates for local installs (#605)
Local installs returned unquoted dir name, producing invalid JS in hook files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 11:01:00 -06:00
Lex Christopherson
9a7bb22ea7 fix(install): template hook paths for OpenCode/Gemini runtimes (#585)
Hooks had hardcoded `.claude` paths that broke OpenCode users. The
installer now templates `.js` hooks with runtime-specific config dirs,
same as it already does for `.md` files. Also added `./.claude/`
replacement for local install paths in workflows.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 08:40:04 -06:00
Lex Christopherson
5154446056 fix(install): add package.json to prevent ESM inheritance (#602)
Projects with "type": "module" in package.json cause GSD scripts to fail
with "require is not defined" because Node.js walks up the directory tree
and inherits the module type.

Fix: Write {"type":"commonjs"} package.json to the install target (.claude/)
during installation. This stops Node from inheriting the project's ESM config.

- Install: writes package.json after VERSION file
- Uninstall: removes package.json only if it matches our marker

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 07:44:26 -06:00
Lex Christopherson
9d815d31db Revert 12 PRs merged without authorization
Reverts:
- #413 fix(install): build hooks/dist on the fly for dev installs
- #396 refactor(statusline): display git branch in status line
- #543 Add in-progress state for todos
- #532 feat: add git_tag config option
- #171 Add OpenCode installer package
- #519 feat: Add Mistral Vibe CLI Support
- #389 docs: use @latest for uninstall commands
- #288 fix(install): auto-migrate renamed statusline.js reference
- #502 fix(#501): verify-work defers diagnosis/planning
- #497 fix: move resolved debug sessions to resolved/ folder
- #512 fix: create feature branch before first commit
- #545 fix: add Write tool to gsd-verifier

These were merged without owner approval.
2026-02-14 14:25:26 -06:00
odin free
e146b0846a fix(install): build hooks/dist on the fly for dev installs (#413)
fix: Build hooks/dist automatically for git clone installs
2026-02-14 14:18:12 -06:00
nullius
fbd727e9fd feat: Add Mistral Vibe CLI Support (#519)
feat: Add Mistral Vibe CLI support
2026-02-14 14:17:58 -06:00
superresistant
f4d6b30f8d fix(install): auto-migrate renamed statusline.js reference (#288)
Bug fix: Auto-migrate renamed statusline.js reference during install
2026-02-14 14:17:16 -06:00
min-k-khant
ca03a061a8 feat: preserve local patches across GSD updates (#481)
When users modify GSD workflow files (e.g., adding bug workarounds),
those changes get wiped on every /gsd:update. This adds automatic
backup and guided restore:

**install.js changes:**
- Writes `gsd-file-manifest.json` after install with SHA256 hashes
  of every installed GSD file
- Before wiping on update, compares current files against manifest
  to detect user modifications
- Backs up modified files to `gsd-local-patches/` directory
- Reports backed-up patches after install completes

**New command: /gsd:reapply-patches**
- LLM-guided merge of backed-up modifications into new version
- Handles cases where upstream also changed the same file
- Reports merge status per file (merged/skipped/conflict)

**update.md changes:**
- Warning text now mentions automatic backup instead of manual
- New step after install to check for and report backed-up patches

Flow: modify GSD file → /gsd:update → modifications auto-backed up →
new version installed → /gsd:reapply-patches → modifications merged back

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 08:35:42 -06:00
Royi Mindel
1c6a35f7ba fix: normalize Windows backslashes in gsd-tools path prefix
On Windows, path.join(os.homedir(), '.cursor') produces backslash paths (e.g. C:\Users\user\.cursor). When appended with forward slashes to build pathPrefix, this creates mixed-separator paths that break gsd-tools invocations:

  Bash(node C:\Users\user\.claude/get-shit-done/bin/gsd-tools.js init map-codebase)

Normalize targetDir and opencodeConfigDir to forward slashes before concatenation so Node.js receives consistent paths on all platforms.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 10:14:55 +02:00
TÂCHES
6cf4a4e3f6 fix: prevent installer from deleting opencode.json on parse errors (#475)
The installer was using JSON.parse() which fails on JSONC (JSON with
Comments) files. OpenCode supports JSONC via jsonc-parser, so users
may have comments or trailing commas in their config.

Previously, parse failures would reset config to {} and overwrite the
user's file, causing data loss.

Changes:
- Add parseJsonc() to handle comments, trailing commas, and BOM
- On parse failure, skip permission config entirely instead of
  overwriting user's file
- Show helpful error message with reason

Fixes #474

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 01:14:50 -06:00
Lex Christopherson
cc3c6aca56 revert: remove GSD Memory system (not ready for release)
Reverts af7a057 "feat: add GSD Memory cross-project knowledge system"

The memory system needs more work before shipping:
- Workflow integration is incomplete (writes but doesn't query)
- UX requires too much manual intervention
- Setup friction exceeds value for most users

Preserved on branch `memory-wip` for continued development.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 09:48:09 -06:00
Lex Christopherson
af7a057294 feat: add GSD Memory cross-project knowledge system
Implements MCP server for semantic search across GSD projects:

MCP Tools:
- gsd_memory_search: Search across all registered projects
- gsd_memory_decisions: Find decisions from SUMMARY/PROJECT.md
- gsd_memory_patterns: Find patterns from SUMMARY.md
- gsd_memory_pitfalls: Find pitfalls from RESEARCH.md
- gsd_memory_stack: Find tech stack entries
- gsd_memory_register: Register project with memory
- gsd_memory_index: Trigger indexing/update
- gsd_memory_status: Show system status

Architecture:
- QMD wrapper with grep fallback when QMD unavailable
- YAML frontmatter extractors for GSD document types
- Project registry at ~/.gsd/projects.json
- Auto-install via bin/install.js for Claude Code

Workflow integrations:
- new-project: Registers project with memory
- plan-phase: Indexes after planning
- execute-phase: Indexes after execution
- complete-milestone: Indexes milestone completion
- Researcher agents query memory before Context7

Tests: 117 passing (66 unit + 51 integration)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:13:22 -06:00
Justin Adams
9d7ea9c188 fix: statusline crash handling, color validation, git staging rules
Fixed three critical bugs and documented findings:

1. hooks/gsd-statusline.js - Added error handling for file system operations
   - Wrapped fs.readdirSync and fs.statSync in try-catch
   - Prevents crashes from permission errors or race conditions

2. bin/install.js - Added hex color validation
   - Validates hex color format (#RGB or #RRGGBB)
   - Prevents invalid colors from being written to config

3. commands/gsd/execute-phase.md - Fixed git staging violation
   - Replaced 'git add -u' with individual file staging
   - Maintains consistency with documented git commit rules

Documentation:
- BUG_REPORT.md - Comprehensive review findings (8 bugs total)
- FIXES_APPLIED.md - Details of fixes applied and testing recommendations

Known issues remaining:
- JSON config parsing uses fragile grep/sed (requires jq or refactor)
- Documented workarounds and recommendations for future fixes

https://claude.ai/code/session_01RAgU8GfJ2dwtBSmJDGzpWA

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-03 11:10:53 -06:00
TÂCHES
074b2bcc20 fix(#330): update statusline.js reference during install (#392)
When updating GSD, the installer renames statusline.js to gsd-statusline.js
but didn't update existing settings.json references. Users with the old
config would see their status line disappear.

Now cleanupOrphanedHooks() also checks for and updates any statusLine
config pointing to the old path.

Fixes #330

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 09:20:24 -06:00
superresistant
d1654960ab feat(install): respect attribution.commit setting (compatible opencode) (#286)
- Reads user's attribution settings during install and processes Co-Authored-By lines accordingly
- Claude Code: reads `attribution.commit` from `~/.claude/settings.json`
  - Empty string ("") → removes Co-Authored-By
  - Custom value ("jojo99") → uses custom attribution
  - Not set → keeps default
- OpenCode: reads `disable_ai_attribution` from `~/.config/opencode/opencode.json`
  - true → removes Co-Authored-By
  - Not set → keeps default
- Gemini: reads `attribution.commit` from `~/.gemini/settings.json` (same as Claude)
- Caches attribution setting per-runtime to avoid repeated file reads
- Escapes $ in custom attribution to prevent regex backreference injection

Rebased onto v1.11.1
2026-02-02 06:45:50 -06:00
Cristian Uibar
5660b6fc0b fix: Gemini CLI agent loading errors (#347)
* fix: convert agent frontmatter for Gemini CLI compatibility

- Add claudeToGeminiTools mapping (Read→read_file, Bash→run_shell_command, etc.)
- Add convertGeminiToolName() to map tools and filter out mcp__*/Task
- Add convertClaudeToGeminiAgent() to convert agent YAML frontmatter
- Hook conversion into agent copy logic for Gemini installs
- Fixes: tools as YAML array (not string), color field removed, mcp__* excluded

* fix: enable experimental.enableAgents for Gemini CLI installs

* fix: strip HTML <sub> tags for Gemini CLI terminal output

* fix: replace ${VAR} with $VAR in agent templates to avoid Gemini CLI template parsing
2026-01-29 19:43:01 -06:00
Lex Christopherson
91aaa3533c chore: remove dead code from Gemini PR
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>
2026-01-29 13:24:29 -06:00
Dryade AI
5379832fc2 feat: add Gemini support to installer (#301) 2026-01-29 13:22:46 -06:00
Lex Christopherson
bdbcbc4787 feat: show Discord invite link in install completion message
Helps new users discover the community right after installation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 01:45:03 -06:00
Lex Christopherson
12e6acbf53 feat(installer): add --uninstall flag to remove GSD files
Adds -u/--uninstall option that cleanly removes all GSD-installed files:
- commands/gsd/ directory (Claude Code) or gsd-*.md files (OpenCode)
- get-shit-done/ directory
- gsd-*.md agent files
- GSD hooks (gsd-statusline.js, gsd-check-update.js/sh)
- GSD entries from settings.json (statusline, hooks)
- GSD permissions from opencode.json (OpenCode only)

Usage: npx get-shit-done-cc --claude --global --uninstall

Closes #236

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 20:37:35 -06:00
Juliano Farias
707d4b47b0 fix(installer): use correct OpenCode config path (~/.config/opencode) (#233)
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.
2026-01-22 15:00:53 -06:00
Lex Christopherson
820f1086ce feat(installer): add interactive runtime selection prompt
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>
2026-01-22 12:53:46 -06:00
dan
cfb9e261a2 feat(opencode): auto-configure read permissions for GSD docs
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>
2026-01-22 10:28:35 -08:00
TÂCHES
6e30261062 Merge pull request #224 from dbachelder/opencode
feat(opencode): make installer work for opencode
2026-01-22 11:35:26 -06:00
Lex Christopherson
67201cb039 fix(install): escape/Ctrl+C cancels instead of installing globally
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>
2026-01-22 10:37:22 -06:00
dan
bf73de8946 feat(opencode): make installer work for opencode 2026-01-21 21:23:13 -08:00
superresistant
a1d60b7160 fix(install): use absolute paths for hook commands on Windows (#207)
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
2026-01-21 12:43:03 -06:00
Lex Christopherson
e10a87ac65 fix: clean up removed intel hooks from settings.json on install 2026-01-21 10:34:58 -06:00
Lex Christopherson
d1fda80c7f revert: remove codebase intelligence system
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>
2026-01-21 10:28:53 -06:00
Lex Christopherson
900fc95efc fix: rename statusline.js to gsd-statusline.js for consistent hook naming
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>
2026-01-20 11:55:59 -06:00
Lex Christopherson
39ea6f4457 refactor(hooks): rename intel hooks with gsd- prefix
- intel-index.js → gsd-intel-index.js
- intel-session.js → gsd-intel-session.js
- intel-prune.js → gsd-intel-prune.js

Consistent naming allows installer to manage GSD hooks easily.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 00:50:09 -06:00
Lex Christopherson
fa48a13c9c feat(intel): add Stop hook to prune deleted files
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>
2026-01-20 00:49:07 -06:00
Lex Christopherson
e5c9abaa55 feat(03-02): register intel hooks in install.js
- Add intel-index PostToolUse hook for codebase indexing
- Add intel-session SessionStart hook for context injection
- Hooks registered conditionally (skip if already exists)
2026-01-20 00:05:54 -06:00
Joshua Shanks
80414a785b fix: validate empty --config-dir value (#177)
Reject --config-dir= with empty value with a clear error message
instead of silently failing. Helps users catch typos.
2026-01-19 14:45:33 -06:00
Lex Christopherson
c233f71163 fix(install): handle non-TTY stdin and verify file installation
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>
2026-01-17 08:42:42 -06:00
Lex Christopherson
6c435b3dd8 fix(install): clean up orphaned gsd-notify.sh from previous versions
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>
2026-01-17 08:37:06 -06:00
Lex Christopherson
acd62c0f6e feat(installer): clean install removes orphaned files
- 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
2026-01-17 00:42:09 -06:00
Lex Christopherson
967734df21 fix: Windows hook support via Node.js conversion
- 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>
2026-01-16 22:56:26 -06:00
Lex Christopherson
35989f20d7 feat(hooks): add cross-platform completion notification hook
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>
2026-01-16 13:02:01 -06:00
Lex Christopherson
7a451e6410 feat(statusline): show update indicator when new GSD version available
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>
2026-01-16 12:53:45 -06:00
Lex Christopherson
159925c058 feat: add statusline with context usage, model, and current task
- 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>
2026-01-16 07:12:11 -06:00
Lex Christopherson
b2646c894c feat: add gsd-executor subagent with dedicated plan execution logic
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>
2026-01-15 09:34:26 -06:00
Lex Christopherson
b281148aa9 feat(12-03): write VERSION file during installation
- Creates VERSION file in get-shit-done folder
- Contains package version (e.g., "1.4.24")
- Enables /gsd:whats-new to detect installed version
2026-01-14 14:06:31 -06:00