Commit Graph

81 Commits

Author SHA1 Message Date
Tom Boucher
e7198f419f fix: hook version tracking, stale hook detection, stdin timeout, and session-report command (#1153, #1157, #1161, #1162) (#1163)
* fix: hook version tracking, stale hook detection, and stdin timeout increase

- Add gsd-hook-version header to all hook files for version tracking (#1153)
- Install.js now stamps current version into hooks during installation
- gsd-check-update.js detects stale hooks by comparing version headers
- gsd-statusline.js shows warning when stale hooks are detected
- Increase context monitor stdin timeout from 3s to 10s (#1162)
- Set +x permission on hook files during installation (#1162)

Fixes #1153, #1162, #1161

* feat: add /gsd:session-report command for post-session summary generation

Adds a new command that generates SESSION_REPORT.md with:
- Work performed summary (phases touched, commits, files changed)
- Key outcomes and decisions made
- Active blockers and open items
- Estimated resource usage metrics

Reports are written to .planning/reports/ with date-stamped filenames.

Closes #1157

* test: update expected skill count from 39 to 40 for new session-report command
2026-03-18 09:57:20 -06:00
Berkay Karaman
a5f5d50f14 feat: add Antigravity runtime support (#1058)
* feat: add Antigravity runtime support

Add full installation support for the Antigravity AI agent, bringing
get-shit-done capabilities to the new runtime alongside Claude Code,
OpenCode, Gemini, Codex, and Copilot.

- New runtime installation capability in bin/install.js
- Commands natively copied to the unified skills directory
- New test integration suite: tests/antigravity-install.test.cjs
- Refactored copy utility to accommodate Antigravity syntax
- Documentation added into README.md

Co-authored-by: Antigravity <noreply@google.com>

* fix: add missing processAttribution call in copyCommandsAsAntigravitySkills

Antigravity SKILL.md files were written without commit attribution metadata,
inconsistent with the Copilot equivalent (copyCommandsAsCopilotSkills) which
calls processAttribution on each skill's content before writing it.

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

* fix: update Copilot install test assertions for 3 new UI agents

* docs: update CHANGELOG for Antigravity runtime support

---------

Co-authored-by: Antigravity <noreply@google.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 19:31:01 -06:00
TÂCHES
5d703954c9 fix: use absolute paths for gsd-tools.cjs in all install types (#820) (#1062)
Local installs wrote $HOME/.claude/get-shit-done/bin/gsd-tools.cjs into
workflow files, which breaks when GSD is installed outside $HOME (e.g.
external drives, symlinked projects) and when spawned subagents have an
empty $HOME environment variable.

- pathPrefix now always resolves to an absolute path via path.resolve()
- All $HOME/.claude/ replacements use the absolute prefix directly
- Codex installer uses absolute path for get-shit-done prefix
- Removed unused toHomePrefix() function

Tested: 535/535 existing tests pass, verified local install produces
correct absolute paths, verified global install unchanged, verified
empty $HOME scenario resolves correctly.

Closes #820

Made-with: Cursor

Co-authored-by: ralberts3 <ralberts3@gatech.edu>
2026-03-15 11:44:25 -06:00
flongstaff
386fc0f40c fix: handle agent frontmatter correctly in OpenCode conversion (#981)
convertClaudeToOpencodeFrontmatter() was designed for commands but is
also called for agents. For agents it incorrectly strips name: (needed
by OpenCode agents), keeps color:/skills:/tools: (should strip), and
doesn't add model: inherit / mode: subagent (required by OpenCode).

Add isAgent option to convertClaudeToOpencodeFrontmatter() so agent
installs get correct frontmatter: name preserved, Claude-only fields
stripped, model/mode injected. Command conversion unchanged (default).

Includes 14 test cases covering agent and command conversion paths.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 11:42:12 -06:00
TÂCHES
637a3e720c fix: respect existing opencode.jsonc config files (#1056)
The installer hardcoded `opencode.json` in all OpenCode config paths,
creating a duplicate file when users already had `opencode.jsonc`.

Add `resolveOpencodeConfigPath()` helper that prefers `.jsonc` when it
exists, and use it in all three OpenCode config touchpoints: attribution
check, permission configuration, and uninstall cleanup.

Closes #1053

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 11:39:53 -06:00
TÂCHES
e5b389cdb1 fix: handle EPERM/EACCES in scanForLeakedPaths on Windows (#1055)
Wrap readdirSync and readFileSync calls in try/catch to silently skip
directories and files with restricted ACLs (e.g. Chrome/Gemini certificate
stores on Windows) instead of crashing the installer.

Closes #964

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 11:39:47 -06:00
TÂCHES
b4781449f8 fix: remove deprecated Codex config keys causing UI instability (#1051)
* fix: remove deprecated Codex config keys causing UI instability (closes #1037)

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

* fix: update codex config tests to match simplified config structure

Tests asserted the old config structure ([features] section, multi_agent,
default_mode_request_user_input, [agents] table with max_threads/max_depth)
that was deliberately removed. Tests now verify the new behavior: config
block contains only the GSD marker and per-agent [agents.gsd-*] sections.

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

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 21:30:09 -06:00
TÂCHES
278414a0a7 fix: detect WSL + Windows Node.js mismatch and warn user (closes #1021) (#1049)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 21:24:08 -06:00
TÂCHES
8313cd27b2 fix: add uninstall mode indicator to banner output (closes #1024) (#1046)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 21:15:57 -06:00
TÂCHES
893cee85d7 fix: use tilde paths in templates to prevent PII leak in .planning/ files (closes #987) (#1047)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 21:15:09 -06:00
erre
c71c15c76e feat: add Copilot CLI runtime support and gsd-autonomous skill (#911)
* gsd: Installed

* docs: complete project research

Research for adding GitHub Copilot CLI as 5th runtime to installer.

Files:
- STACK.md: Zero new deps, Copilot reads from .github/, tool name mapping
- FEATURES.md: 18 table stakes, 4 differentiators, 6 anti-features
- ARCHITECTURE.md: Codex-parallel pattern, 5 new functions, 12 existing changes
- PITFALLS.md: 10 pitfalls with prevention strategies and phase mapping
- SUMMARY.md: Synthesized findings, 4-phase roadmap suggestion

* docs(01): create phase plan for core installer plumbing

* feat(01-01): add Copilot as 5th runtime across all install.js locations

- Add --copilot flag parsing and selectedRuntimes integration
- Add 'copilot' to --all array (5 runtimes)
- getDirName('copilot') returns '.github' (local path)
- getGlobalDir('copilot') returns ~/.copilot with COPILOT_CONFIG_DIR override
- getConfigDirFromHome handles copilot for both local/global
- Banner and help text updated to include Copilot
- promptRuntime: Copilot as option 5, All renumbered to option 6
- install(): isCopilot variable, runtimeLabel, skip hooks (Codex pattern)
- install(): Copilot early return before hooks/settings configuration
- finishInstall(): Copilot program name and /gsd-new-project command
- uninstall(): Copilot runtime label and isCopilot variable
- GSD_TEST_MODE exports: getDirName, getGlobalDir, getConfigDirFromHome

* test(01-01): add Copilot plumbing unit tests

- 19 tests covering getDirName, getGlobalDir, getConfigDirFromHome
- getGlobalDir: default path, explicit dir, COPILOT_CONFIG_DIR env var, priority
- Source code integration checks for CLI-01 through CLI-06
- Verifies --both flag unchanged, hooks skipped, prompt options correct
- All 481 tests pass (19 new + 462 existing, no regressions)

* docs(01-01): complete core installer plumbing plan

- Mark Phase 1 and Plan 01-01 as complete in ROADMAP.md
- All 6 requirements (CLI-01 through CLI-06) fulfilled

* gsd: planning

* docs(02): create phase 2 content conversion engine plans

* feat(02-01): add Copilot tool mapping constant and conversion functions

- Add claudeToCopilotTools constant (13 Claude→Copilot tool mappings)
- Add convertCopilotToolName() with mcp__context7__ wildcard handling
- Add convertClaudeToCopilotContent() for CONV-06 (4 path patterns) + CONV-07 (gsd:→gsd-)
- Add convertClaudeCommandToCopilotSkill() for skill frontmatter transformation
- Add convertClaudeAgentToCopilotAgent() with tool dedup and JSON array format
- Export all new functions + constant via GSD_TEST_MODE

* feat(02-01): wire Copilot conversion into install() flow

- Add copyCommandsAsCopilotSkills() for folder-per-skill structure
- Add isCopilot branch in install() skill copy section
- Add isCopilot branch in agent loop with .agent.md rename
- Skip generic path replacement for Copilot (converter handles it)
- Add isCopilot branch in copyWithPathReplacement for .md files
- Add .cjs/.js content transformation for CONV-06/CONV-07
- Export copyCommandsAsCopilotSkills via GSD_TEST_MODE
- CONV-09 not generated (discarded), CONV-10 confirmed working

* docs(02-01): complete content conversion engine plan

- Create 02-01-SUMMARY.md with execution results
- Update STATE.md with Phase 2 position and decisions
- Mark CONV-01 through CONV-10 requirements complete

* test(02-02): add unit tests for Copilot conversion functions

- 16 tests for convertCopilotToolName (all 12 direct mappings, mcp prefix, wildcard, unknown fallback, constant size)
- 8 tests for convertClaudeToCopilotContent (4 path patterns, gsd: conversion, mixed content, no double-replace, passthrough)
- 7 tests for convertClaudeCommandToCopilotSkill (all fields, missing optional fields, CONV-06/07, no frontmatter, agent field)
- 7 tests for convertClaudeAgentToCopilotAgent (dedup, JSON array, field preservation, mcp tools, no tools, CONV-06/07, no frontmatter)

* test(02-02): add integration tests for Copilot skill copy and agent conversion

- copyCommandsAsCopilotSkills produces 31 skill folders with SKILL.md files
- Skill content verified: comma-separated allowed-tools, no YAML multiline, CONV-06/07 applied
- Old skill directories cleaned up on re-run
- gsd-executor agent: 6 tools → 4 after dedup (Write+Edit→edit, Grep+Glob→search)
- gsd-phase-researcher: mcp__context7__* wildcard → io.github.upstash/context7/*
- All 11 agents convert without error, all have frontmatter and tools
- Engine .md and .cjs files: no ~/.claude/ or gsd: references after conversion
- Full suite: 527 tests pass, zero regressions

* docs(02-02): complete Copilot conversion test suite plan

- SUMMARY: 46 new tests covering all conversion functions
- STATE: Phase 02 complete, 3/3 plans done
- ROADMAP: Phase 02 marked complete

* docs(03): research phase domain

* docs(03-instructions-lifecycle): create phase plan

* feat(03-01): add copilot-instructions template and merge/strip functions

- Create get-shit-done/templates/copilot-instructions.md with 5 GSD instructions
- Add GSD_COPILOT_INSTRUCTIONS_MARKER and GSD_COPILOT_INSTRUCTIONS_CLOSE_MARKER constants
- Add mergeCopilotInstructions() with 3-case merge (create, replace, append)
- Add stripGsdFromCopilotInstructions() with null-return for GSD-only content

* feat(03-01): wire install, fix uninstall/manifest/patches for Copilot

- Wire mergeCopilotInstructions() into install() before Copilot early return
- Add else-if isCopilot uninstall branch: remove skills/gsd-*/ + clean instructions
- Fix writeManifest() to hash Copilot skills: (isCodex || isCopilot)
- Fix reportLocalPatches() to show /gsd-reapply-patches for Copilot
- Export new functions and constants in GSD_TEST_MODE
- All 527 existing tests pass with zero regressions

* docs(03-01): complete instructions lifecycle plan

- Create 03-01-SUMMARY.md with execution results
- Update STATE.md: Phase 3 Plan 1 position, decisions, session
- Update ROADMAP.md: Phase 03 progress (1/2 plans)
- Mark INST-01, INST-02, LIFE-01, LIFE-02, LIFE-03 complete

* test(03-02): add unit tests for mergeCopilotInstructions and stripGsdFromCopilotInstructions

- 10 new tests: 5 merge cases + 5 strip cases
- Tests cover create/replace/append merge scenarios
- Tests cover null-return, content preservation, no-markers passthrough
- Added beforeEach/afterEach imports for temp dir lifecycle
- Exported writeManifest and reportLocalPatches via GSD_TEST_MODE for Task 2

* test(03-02): add integration tests for uninstall, manifest, and patches Copilot fixes

- 3 uninstall tests: gsd-* skill identification, instructions cleanup, GSD-only deletion
- writeManifest hashes Copilot skills in manifest JSON (proves isCopilot fix)
- reportLocalPatches uses /gsd-reapply-patches for Copilot (dash format)
- reportLocalPatches uses /gsd:reapply-patches for Claude (no regression)
- Full suite: 543 tests pass, 0 failures

* docs(03-02): complete instructions lifecycle tests plan

- SUMMARY.md with 16 new tests documented
- STATE.md updated: Phase 3 complete, 5/5 plans done
- ROADMAP.md updated: Phase 03 marked complete

* docs(04): capture phase context

* docs(04): research phase domain

* docs(04): create phase plan — E2E integration tests for Copilot install/uninstall

* test(04-01): add E2E Copilot full install verification tests

- 9 tests: skills count/structure, agents count/names, instructions markers
- Manifest structure, categories, SHA256 integrity verification
- Engine directory completeness (bin, references, templates, workflows, CHANGELOG, VERSION)
- Uses execFileSync in isolated /tmp dirs with GSD_TEST_MODE stripped from env

* test(04-01): add E2E Copilot uninstall verification tests

- 6 tests: engine removal, instructions removal, GSD skills/agents cleanup
- Preserves non-GSD custom skills and agents after uninstall
- Standalone lifecycle tests for preservation (install → add custom → uninstall → verify)
- Full suite: 558 tests passing, 0 failures

* docs(04-01): complete E2E Copilot install/uninstall integration tests plan

- SUMMARY.md: 15 E2E tests, SHA256 integrity, 558 total tests passing
- STATE.md: Phase 4 complete, 6/6 plans done
- ROADMAP.md: Phase 4 marked complete
- REQUIREMENTS.md: QUAL-01 complete, QUAL-02 out of scope

* fix: use .github paths for Copilot --local instead of ~/.copilot

convertClaudeToCopilotContent() was hardcoded to always map ~/.claude/
and $HOME/.claude/ to ~/.copilot/ and $HOME/.copilot/ regardless of
install mode. For --local installs these should map to .github/ (repo-
relative, no ./ prefix) since Copilot resolves @file references from
the repo root.

Local mode:  ~/.claude/ → .github/  |  $HOME/.claude/ → .github/
Global mode: ~/.claude/ → ~/.copilot/  |  $HOME/.claude/ → $HOME/.copilot/

Added isGlobal parameter to convertClaudeToCopilotContent,
convertClaudeCommandToCopilotSkill, convertClaudeAgentToCopilotAgent,
copyCommandsAsCopilotSkills, and copyWithPathReplacement. All call
sites in install() now pass isGlobal through.

Tests updated to cover both local (default) and global modes.
565 tests passing, 0 failures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: use double quotes for argument-hint in Copilot skills

The converter was hardcoding single quotes around argument-hint values
in skill frontmatter. This breaks YAML parsing when the value itself
contains single quotes (e.g., "e.g., 'v1.1 Notifications'").

Now uses yamlQuote() (JSON.stringify) which produces double-quoted
strings with proper escaping.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore: complete v1.23 milestone — Copilot CLI Support

Archive milestone artifacts, retrospective, and update project docs.

- Archive: v1.23-ROADMAP.md, v1.23-REQUIREMENTS.md, v1.23-MILESTONE-AUDIT.md
- Create: MILESTONES.md, RETROSPECTIVE.md
- Evolve: PROJECT.md (validated reqs, key decisions, shipped context)
- Reorganize: ROADMAP.md (collapsed v1.23, progress table)
- Update: STATE.md (status: completed)
- Delete: REQUIREMENTS.md (archived, fresh for next milestone)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore: archive phase directories from v1.23 milestone

* chore: Clean gsd tracking

* fix: update test counts for new upstream commands and agents

Upstream added validate-phase command (32 skills) and nyquist-auditor agent (12 agents).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore: Remove copilot instructions

* chore: Improve loop

* gsd: installation

* docs: start milestone v1.24 Autonomous Skill

* docs: internal research for autonomous skill

* docs: define milestone v1.24 requirements

* docs: create milestone v1.24 roadmap (4 phases)

* docs: phase 5 context — skill scaffolding decisions

* docs(5): research phase domain

* docs(05): create phase plan — 2 plans in 2 waves

* docs(phase-5): add validation strategy

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* test(05-01): add failing tests for colon-outside-bold regex format

- Test get-phase with **Goal**: format (colon outside bold)
- Test analyze with **Goal**: and **Depends on**: formats
- Test mixed colon-inside and colon-outside bold formats
- All 3 new tests fail confirming the regex bug

* fix(05-01): fix regex for goal/depends_on extraction in roadmap.cjs

- Fix 3 regex patterns to support both **Goal:** and **Goal**: formats
- Pattern: /\*\*Goal(?::\*\*|\*\*:)/ handles colon inside or outside bold
- Fix in both source (get-shit-done/) and runtime (.github/) copies
- All 28 tests pass including 4 new colon-outside-bold tests
- Live verification: all 4 phases return non-null goals from real ROADMAP.md

* feat(05-01): create gsd:autonomous command file

- name: gsd:autonomous with argument-hint: [--from N]
- Sections: objective, execution_context, context, process
- References workflows/autonomous.md and references/ui-brand.md
- Follows exact pattern of new-milestone.md (42 lines)

* docs(05-01): complete roadmap regex fix + autonomous command plan

* feat(05-02): create autonomous workflow with phase discovery and Skill() execution

- Initialize step with milestone-op bootstrap and --from N flag parsing
- Phase discovery via roadmap analyze with incomplete filtering and sort
- Execute step uses Skill() flat calls for discuss/plan/execute (not Task())
- Progress banner: GSD ► AUTONOMOUS ▸ Phase N/T format with bar
- Iterate step re-reads ROADMAP.md after each phase for dynamic phase detection
- Handle blocker step with retry/skip/stop user options

* test(05-02): add autonomous skill generation tests and fix skill count

- Test autonomous.md converts to gsd-autonomous Copilot skill with correct frontmatter
- Test CONV-07 converts gsd: to gsd- in autonomous command body content
- Update skill count from 32 to 33 (autonomous.md added in plan 01)
- All 645 tests pass across full suite

* docs(05-02): complete autonomous workflow plan

* docs: phase 5 complete — update roadmap and state

* docs: phase 6 context — smart discuss decisions

* docs(06): research smart discuss phase domain

* docs(06): create phase plan

* feat(06-01): replace Skill(discuss-phase) with inline smart discuss

- Add <step name="smart_discuss"> with 5 sub-steps: load prior context, scout codebase, analyze phase with infrastructure detection, present proposals per area in tables, write CONTEXT.md
- Rewire execute_phase step 3a: check has_context before/after, reference smart_discuss inline
- Remove Skill(gsd:discuss-phase) call entirely
- Preserve Skill(gsd:plan-phase) and Skill(gsd:execute-phase) calls unchanged
- Update success criteria to mention smart discuss
- Grey area proposals use table format with recommended/alternative columns
- AskUserQuestion offers Accept all, Change QN, Discuss deeper per area
- Infrastructure phases auto-detected and skip to minimal CONTEXT.md
- CONTEXT.md output uses identical XML-wrapped sections as discuss-phase.md

* docs(06-01): complete smart discuss inline logic plan

* docs(07): phase execution chain context — flag strategy, validation routing, error recovery

* docs(07): research phase execution chain domain

* docs(07): create phase plan

* feat(07-01): wire phase execution chain with verification routing

- Add --no-transition flag to execute-phase Skill() call in step 3c
- Replace step 3d transition with VERIFICATION.md-based routing
- Route on passed/human_needed/gaps_found with appropriate user prompts
- Add gap closure cycle with 1-retry limit to prevent infinite loops
- Route execute-phase failures (no VERIFICATION.md) to handle_blocker
- Update success_criteria with all new verification behaviors

* docs(07-01): complete phase execution chain plan

* docs(08): multi-phase orchestration & lifecycle context

* docs(08): research phase domain

* docs(08): create phase plan

* feat(08-01): add lifecycle step, fix progress bar, document smart_discuss

- Add lifecycle step (audit→complete→cleanup) after all phases complete
- Fix progress bar N/T to use phase number/total milestone phases
- Add smart_discuss CTRL-03 compliance documentation note
- Rewire iterate step to route to lifecycle instead of manual banner
- Renumber handle_blocker from step 5 to step 6
- Add 10 lifecycle-related items to success criteria
- File grows from 630 to 743 lines, 6 to 7 named steps

* docs(08-01): complete multi-phase orchestration & lifecycle plan

* docs: v1.24 milestone audit — passed (18/18 requirements)

* chore: complete v1.24 milestone — Autonomous Skill

* chore: archive phase directories from v1.24 milestone

* gsd: clean

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-14 17:41:19 -06:00
Frank
0f38e3467e fix: strip unsupported Gemini agent skills frontmatter (#971) 2026-03-12 11:36:43 -06:00
Artspark
bc3d6db1c0 fix: emit valid codex agent TOML (#1008) 2026-03-12 11:36:04 -06:00
Lex Christopherson
e2b6179ba7 fix(install): replace $HOME/.claude paths for non-Claude runtimes
The installer only replaced ~/.claude/ (tilde form) when rewriting paths
for OpenCode, Gemini, and Codex installs. Source files also use
$HOME/.claude/ in bash code blocks (since ~ doesn't expand inside
double-quoted strings), leaving ~175 unreplaced references that break
gsd-tools.cjs invocations on non-Claude runtimes.

Adds $HOME/.claude/ replacement to all 6 path-rewriting code paths,
a toHomePrefix() utility to keep $HOME as a portable shell variable,
and a post-install scan that warns if any .claude references leak
through.

Closes #905

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 10:12:59 -06:00
Tibsfox
8b8d1074b8 fix(milestone): deduplicate phase filter and handle empty MILESTONES.md
Two hardening changes to cmdMilestoneComplete:

1. Replace 27 lines of inline isDirInMilestone logic (roadmap parsing,
   normalization, and matching) with a single call to the shared
   getMilestonePhaseFilter(cwd) from core.cjs. The inline copy was
   identical to the core version — deduplicating prevents future drift.

2. Handle empty MILESTONES.md files. Previously, an existing but empty
   file would fall into the headerMatch branch and produce malformed
   output. Now an empty file is treated the same as a missing one,
   writing the standard "# Milestones" header before the entry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 08:01:54 -06:00
Tibsfox
630a705bdc fix(gemini): use AfterTool instead of PostToolUse for Gemini CLI hooks
Gemini CLI uses AfterTool as the post-tool hook event name, not
PostToolUse (which is Claude Code's event name). The installer was
registering the context monitor under PostToolUse for all runtimes,
causing Gemini to print "Invalid hook event name" warnings on every
run and silently disabling the context monitor.

Changes:
- install.js: use runtime-aware event name (AfterTool for Gemini,
  PostToolUse for others) when registering context monitor hook
- install.js: uninstall cleans up both PostToolUse and AfterTool
  entries for backward compatibility with existing installs
- gsd-context-monitor.js: runtime-aware hookEventName in output
- docs/context-monitor.md: document both event names with Gemini
  example

Closes #750

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 05:38:11 -08:00
Lex Christopherson
1455931f79 feat(codex): add request_user_input mapping, multi-agent config, and agent role generation
Expand Codex adapter with AskUserQuestion → request_user_input parameter
mapping (including multiSelect workaround and Execute mode fallback) and
Task() → spawn_agent mapping (parallel fan-out, result parsing).

Add convertClaudeAgentToCodexAgent() that generates <codex_agent_role>
headers with role/tools/purpose and cleans agent frontmatter.

Generate config.toml with [features] (multi_agent, request_user_input)
and [agents.gsd-*] role sections pointing to per-agent .toml configs
with sandbox_mode (workspace-write/read-only) and developer_instructions.

Config merge handles 3 cases: new file, existing with GSD marker
(truncate + re-append), existing without marker (inject features +
append agents). Uninstall strips all GSD content including injected
feature keys while preserving user settings.

Closes #779

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 15:29:35 -06:00
dungan
dba401fe54 fix: statusline migration regex too broad, clobbers third-party statuslines (#670)
The #330 migration that renames `statusline.js` → `gsd-statusline.js`
uses `.includes('statusline.js')` which matches ANY file containing
that substring. For example, a user's custom `ted-statusline.js` gets
silently rewritten to `ted-gsd-statusline.js` (which doesn't exist).

This happens inside `cleanupOrphanedHooks()` which runs before the
interactive "Keep existing / Replace" prompt, so even choosing "Keep
existing" doesn't prevent the damage.

Fix: narrow the regex to only match the specific old GSD path pattern
`hooks/statusline.js` (or `hooks\statusline.js` on Windows).

Co-authored-by: ddungan <sckim@mococo.co.kr>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 13:33:53 -06:00
Lex Christopherson
5cb2e740fd feat: improve onboarding UX with /gsd:new-project as default command 2026-02-25 07:20:14 -06:00
Lex Christopherson
e9e11580a4 merge: resolve conflicts with main for Codex skills-first support
- bin/install.js: integrate isCommand parameter (Gemini TOML fix) with Codex branch
- package.json: keep v1.20.6 with Codex description
- CHANGELOG.md: merge Codex entries into Unreleased above existing releases
2026-02-23 09:46:48 -06:00
vinicius-tersi
7542d364b4 feat: context window monitor hook with agent-side WARNING/CRITICAL alerts
Adds PostToolUse hook that reads context metrics from statusline bridge file and injects alerts into agent conversation when context is low.

Features:
- Two-tier alerts: WARNING (<=35% remaining) and CRITICAL (<=25%)
- Smart debounce: 5 tool uses between warnings, severity escalation bypasses
- Silent fail: never blocks tool execution
- Security: session_id sanitized to prevent path traversal

Ref #212
2026-02-20 14:40:08 -06:00
Cristian Mos
2c0db8ea85 fix(gemini): prevent workflows and templates from being incorrectly converted to TOML 2026-02-20 20:49:59 +02:00
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
Paarth Tandon
5a733dca87 feat: add codex skills-first installer runtime 2026-02-18 13:30:16 -08: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