Three non-blocking findings from the adversarial re-review of the
workstream namespacing PR, addressed as a follow-up:
1. setActiveWorkstream now validates names with the same regex used
at CLI entry and cmdWorkstreamSet — defense-in-depth so future
callers can't poison the active-workstream file
2. Replaced tautological test assertion (result.success || !result.success
was always true) with actual validation that cmdWorkstreamSet returns
invalid_name error for path traversal attempts. Added 8 new tests
for setActiveWorkstream's own validation.
3. Updated stale comment in copilot-install.test.cjs (said 31, actual 56)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All code-writing agents (gsd-executor, gsd-debugger) were dispatched
without isolation: "worktree", causing branch pollution when agents
switched branches in the shared working tree during concurrent work.
Added isolation="worktree" to all Task() dispatch sites:
- execute-phase.md: executor agent dispatch
- execute-plan.md: Pattern A executor reference
- quick.md: quick task executor dispatch
- diagnose-issues.md: debugger agent dispatch
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- new-project Step 9: suggest /gsd:ui-phase when Phase 1 has UI hint
- progress Route B: show /gsd:ui-phase in options when current phase has UI
- progress Route C: show /gsd:ui-phase in options when next phase has UI
- Detection uses **UI hint**: yes annotation from roadmapper output
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add UI keyword detection list for identifying frontend-heavy phases
- Roadmapper annotates phases with **UI hint**: yes when keywords match
- Annotation consumed by downstream workflows to suggest /gsd:ui-phase
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Document resolve_model_ids: "omit" (set automatically by installer for
non-Claude runtimes), explain model_overrides with non-Claude model IDs,
and add a decision table for choosing between inherit, omit, and
overrides. Updates CONFIGURATION.md, USER-GUIDE.md, and the
model-profiles.md skill reference.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. Resolve read-only contradiction: critical_rules now explicitly allows
STATE.md session tracking alongside the forensic report write
2. Add label existence check before gh issue create --label "bug" to
handle repos without a "bug" label gracefully
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add parseMultiwordArg() to collect multi-token --flag values until the next
flag. Replace manual name-collection loops in milestone complete and scaffold
cases. Also fixes a bug in scaffold where args.slice() would include trailing
flags in the name value.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- core.cjs: add filterPlanFiles, filterSummaryFiles, getPhaseFileStats,
readSubdirectories helpers; use them in searchPhaseInDir and getArchivedPhaseDirs
- gsd-tools.cjs: add parseNamedArgs() helper; replace ~50 repetitive indexOf/ternary
patterns in state record-metric, add-decision, add-blocker, record-session,
begin-phase, signal-waiting, template fill, and frontmatter subcommands
- phase.cjs: decompose 250-line cmdPhaseRemove into renameDecimalPhases(),
renameIntegerPhases(), and updateRoadmapAfterPhaseRemoval(); import readSubdirectories
- workstream.cjs: import stateExtractField from state.cjs and shared helpers from
core.cjs; replace all inline regex state parsing and readdirSync+filter+map patterns
All 1062 tests pass.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Validates workstream name at all entry points — CLI --ws flag,
GSD_WORKSTREAM env var, active-workstream file, and cmdWorkstreamSet —
blocking names that don't match [a-zA-Z0-9_-]+. Also fixes
getActiveWorkstream to use planningRoot() consistently and validates
names read from the active-workstream file before using them in path
joins.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Enable multiple Claude Code instances to work on the same codebase
simultaneously by scoping .planning/ state into workstreams.
Core changes:
- planningDir(cwd, ws?) and planningPaths(cwd, ws?) are now workstream-aware
via GSD_WORKSTREAM env var (auto-detected from --ws flag or active-workstream file)
- All bin/lib modules use planningDir(cwd) for scoped paths (STATE.md, ROADMAP.md,
phases/, REQUIREMENTS.md) and planningRoot(cwd) for shared paths (milestones/,
PROJECT.md, config.json, codebase/)
- New workstream.cjs module: create, list, status, complete, set, get, progress
- gsd-tools.cjs: --ws flag parsing with priority chain
(--ws > GSD_WORKSTREAM env > active-workstream file > flat mode)
- Collision detection: transition.md checks for other active workstreams before
suggesting next-milestone continuation (prevents WS A from trampling WS B)
- ${GSD_WS} routing propagation across all 9 workflow files ensures workstream
scope chains automatically through the workflow lifecycle
New files:
- get-shit-done/bin/lib/workstream.cjs (CRUD + collision detection)
- get-shit-done/commands/gsd/workstreams.md (slash command)
- get-shit-done/references/workstream-flag.md (documentation)
- tests/workstream.test.cjs (20 tests covering CRUD, env var routing, --ws flag)
All 1062 tests passing (1042 existing + 20 new workstream tests).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When enabled, /gsd:autonomous chains directly from plan-phase to execute-phase,
skipping smart discuss. A minimal CONTEXT.md is auto-generated from the ROADMAP
phase goal so downstream agents have valid input. Manual /gsd:discuss-phase still
works regardless of the setting.
Changes:
- config.cjs: add workflow.skip_discuss to VALID_CONFIG_KEYS and hardcoded defaults (false)
- autonomous.md: check workflow.skip_discuss before smart_discuss, write minimal CONTEXT.md when skipping
- settings.md: add Skip Discuss toggle to interactive settings UI and global defaults
- config.test.cjs: 6 regression tests for the new config key
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add --pick flag to gsd-tools.cjs for extracting a single field from
JSON output, replacing all jq pipe usage across workflow and reference
files. Since Node.js is already a hard dependency, this eliminates the
need for jq on systems where it is not installed (notably Windows).
Changes:
- gsd-tools.cjs: add --pick <field> global flag with dot-notation and
bracket syntax support (e.g., --pick section, --pick directories[-1])
- Replace 15 jq pipe patterns across 6 workflow/reference files with
--pick flag or inline Node.js one-liner for variable extraction
- Add regression tests for --pick flag behavior
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The gsd-tools.cjs CLI uses hyphenated subcommands (config-get), but
two workflow files used a space-separated form (config get) which
causes "Unknown command: config" errors.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Main already bumped 53→54 from merged PRs. Our new milestone-summary
command adds one more skill, making the total 55.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New command that generates a comprehensive project summary from completed
milestone artifacts. Designed for team onboarding — new contributors can
run this against a completed project and understand what was built, how,
and why, with optional interactive Q&A grounded in build artifacts.
- commands/gsd/milestone-summary.md: command definition
- get-shit-done/workflows/milestone-summary.md: 9-step workflow
- tests/milestone-summary.test.cjs: 11 tests (command + workflow validation)
- tests/copilot-install.test.cjs: bump expected skill count 53→54
Reads: ROADMAP, REQUIREMENTS, PROJECT, CONTEXT, SUMMARY, VERIFICATION,
RETROSPECTIVE artifacts. Writes to .planning/reports/MILESTONE_SUMMARY-v{X}.md.
Closes#1298
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The discuss-phase command file contained a 93-line detailed <process>
block that competed with the actual workflow file. The agent treated
this summary as complete instructions and never read the execution_context
files (discuss-phase.md, discuss-phase-assumptions.md, context.md template).
Root cause: Unlike execute-phase and plan-phase commands (which have short
2-line process blocks deferring to the workflow file), discuss-phase had
inline step-by-step instructions detailed enough to act on without reading
the referenced workflow files.
Changes:
- Replace discuss-phase command's <process> block with a short directive
that forces reading the workflow file, matching execute-phase/plan-phase
pattern
- Add MANDATORY instruction that execution_context files ARE the
instructions, not optional reading
- Register workflow.research_before_questions and workflow.discuss_mode
as valid config keys (were missing from VALID_CONFIG_KEYS)
- Fix config key mismatch: workflows referenced "research_questions"
but documented key is "workflow.research_before_questions"
- Move research_before_questions from hooks section to workflow section
in settings workflow
- Add research_before_questions default to config template and builder
- Add suggestion mapping for deprecated hooks.research_questions key
- Add 6 regression tests covering config keys and process block guard
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Gemini CLI uses BeforeTool (not PreToolUse) for pre-tool hooks, matching
the existing pattern where AfterTool is used instead of PostToolUse. The
prompt injection guard hook was hardcoded to PreToolUse, causing Gemini
CLI to log "Invalid hook event name: PreToolUse" on startup.
Apply the same runtime-conditional mapping used for post-tool hooks, and
update the uninstall cleanup to iterate both event names.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fixes from trek-e's review on PR #1282:
1. Add missing withProjectRoot() wrapper on output — all other cmdInit*
functions include project_root in JSON, manager was the only one without it.
2. Add getMilestonePhaseFilter() to directory scan — prevents stale phase
directories from prior milestones appearing as phantom dashboard entries.
3. Replace hardcoded .planning/ paths with planningPaths(cwd) — forward
compatibility with workstream scoping (#1268).
4. Add 3 new tests:
- Conflict filter blocks dependent phase execution when dep is active
- Conflict filter allows independent phase execution in parallel
- Output includes project_root field
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The interactive prompt now accepts comma-separated or space-separated
choices (e.g., "1,4,6" or "1 4 6") to install multiple runtimes in
one go, without needing --all or running the installer multiple times.
- Replaced if/else-if chain with runtimeMap lookup + split parser
- Added hint text: "Select multiple: 1,4,6 or 1 4 6"
- Invalid choices silently filtered, duplicates deduplicated
- Empty input still defaults to Claude Code
- Choice "8" still selects all runtimes
Tests: 10 new tests covering comma/space/mixed separators,
deduplication, invalid input filtering, order preservation,
and source-level assertions.
Closes#1281
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Drop Node 20 (EOL April 2026)
- Reduce macOS to single runner (Node 22) — platform compat check
- Reduce Windows to single runner (Node 22) — slowest CI, smoke-test
- Keep Ubuntu × {22, 24} as primary test surface
Estimated savings: ~60% fewer runner-minutes per CI run
(~500s → ~190s, 9 jobs → 4 jobs)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The installer pathPrefix for global installs replaced os.homedir()
with ~, which does NOT expand inside double-quoted shell commands
in POSIX shells. This caused MODULE_NOT_FOUND errors when executing
commands like: node "~/.claude/get-shit-done/bin/gsd-tools.cjs"
Changed pathPrefix to use $HOME instead of ~, which correctly expands
inside double quotes. Also fixed a quoted-tilde instance in do.md.
- bin/install.js: $HOME prefix instead of ~ for global installs
- get-shit-done/workflows/do.md: node "$HOME/..." instead of "~/"
- tests/path-replacement.test.cjs: updated + 3 new regression tests
Closes#1284
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When running GSD from a monorepo subdirectory inside a git worktree,
resolveWorktreeRoot() resolved to the worktree root, discarding the
subdirectory where .planning/ lives. All commands failed with
"No ROADMAP.md found" even though the planning structure existed.
Now check if CWD already contains .planning/ before worktree
resolution. If it does, the CWD is already the correct project root
and worktree resolution is skipped.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Integrate upstream workspace features (new-workspace, list-workspaces,
remove-workspace) alongside manager feature. Bump copilot skill count
53 → 54 and agent count to 18 to account for both upstream additions
and the new manager skill.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add /gsd:manager — a single-terminal dashboard for managing milestones.
Shows all phases with visual status indicators (D/P/E columns), computes
recommended next actions, and dispatches discuss inline while plan/execute
run as background agents.
Key behaviors:
- Recommendation engine prioritizes execute > plan > discuss
- Filters parallel execute/plan when phases share dependency chains
- Independent phases (no direct or transitive dep relationship) CAN
run in parallel — dependent phases are serialized
- Dashboard shows compact Deps column for at-a-glance dependency view
- Sliding window limits discuss to one phase at a time
- Activity detection via file mtime (5-min window) for is_active flag
New files:
- commands/gsd/manager.md — skill definition
- get-shit-done/workflows/manager.md — full workflow spec
- get-shit-done/bin/lib/init.cjs — cmdInitManager() with phase parsing,
dependency graph traversal, and recommendation filtering
- get-shit-done/bin/gsd-tools.cjs — route 'init manager' to new command
- tests/init-manager.test.cjs — 16 tests covering status detection,
deps, sliding window, recommendations, and edge cases
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When branching_strategy is "phase" or "milestone", the branch was only
created during execute-phase — but discuss-phase, plan-phase, and
new-milestone all commit artifacts before that, landing them on main.
Move branch creation into cmdCommit() so the strategy branch is created
at the first commit point in any workflow. execute-phase's existing
handle_branching step becomes a harmless no-op (checkout existing branch).
Also fixes websearch test mocks broken by #1276 (fs.writeSync change).
Closes#1278
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>