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>
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>
Extend resolve_model_ids to accept "omit" value: returns empty string
so non-Claude runtimes (OpenCode, Codex, Gemini, etc.) use their
configured default model instead of unresolvable Claude aliases.
- resolve_model_ids: "omit" short-circuits before alias resolution
- model_overrides still respected (checked first) for explicit IDs
- Installer sets resolve_model_ids: "omit" in ~/.gsd/defaults.json
for non-Claude runtimes during install
- 4 new tests covering omit behavior and override passthrough
- Fix websearch test mocks for fs.writeSync output change (#1276)
Closes#1156
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add codebase-first assumption-driven alternative to the interview-style
discuss-phase. New `workflow.discuss_mode: "assumptions"` config routes
to a separate workflow that spawns a gsd-assumptions-analyzer agent to
read 5-15 codebase files, surface assumptions with evidence, and ask
only for corrections (~2-4 interactions vs ~15-20).
- New gsd-assumptions-analyzer agent for deep codebase analysis
- New discuss-phase-assumptions.md workflow (15 steps)
- Command-level routing via dual @reference + process gate
- Identical CONTEXT.md output — downstream agents unaffected
- Existing discuss-phase.md workflow untouched (zero diff)
- Mode-aware plan-phase gate and progress display
- User documentation and integration tests
- Update agent count and list in copilot-install tests (17 → 18)
Closes#637
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
process.stdout.write() is async when stdout is a pipe. The
immediate process.exit(0) tears down the process before the
downstream reader (jq, python3, etc) consumes the buffer,
producing truncated JSON.
Replace with fs.writeSync(1, data) which blocks until the
kernel pipe buffer accepts the bytes, and drop process.exit(0)
on the success path so the event loop drains naturally.
Fixes#1275
Related: #493 (addressed >50KB case, this fixes <50KB)
Verification checked structure but not whether data actually flows
end-to-end or whether external dependencies are available. Adds:
- Step 4b (Data-Flow Trace): Level 4 verification traces upstream from
wired artifacts to verify data sources produce real data, catching
hollow components that render empty/hardcoded values
- Step 7b (Behavioral Spot-Checks): lightweight smoke tests that verify
runnable code produces expected output, not just that it exists
- Step 2.6 (Environment Audit): researcher probes target machine for
external tools/services/runtimes before planning, so plans include
fallback strategies for missing dependencies
Closes#1245
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
After gathering milestone goals and determining version, the workflow
now presents a summary and asks for confirmation before writing any
files. Users can adjust until satisfied, preventing the previous
behavior where GSD would immediately write PROJECT.md without verifying
its understanding of the milestone scope.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test that has_reviews=true and reviews_path is set when REVIEWS.md exists
- Test that reviews_path is undefined and has_reviews=false when missing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On Windows, os.homedir() reads USERPROFILE, not HOME. Tests pass HOME
override for sandboxing. Use process.env.HOME with os.homedir() fallback
so tests work cross-platform.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Three new commands for managing isolated GSD workspaces:
- /gsd:new-workspace — create workspace with repo worktrees/clones
- /gsd:list-workspaces — scan ~/gsd-workspaces/ for active workspaces
- /gsd:remove-workspace — clean up workspace and git worktrees
Supports both multi-repo orchestration (subset of repos from a parent
directory) and feature branch isolation (worktree of current repo with
independent .planning/).
Includes init functions, command routing, workflows, 24 tests, and
user documentation.
Closes#1241
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Physical workspace model with three commands: new-workspace,
list-workspaces, remove-workspace. Supports both multi-repo
orchestration and same-repo feature branch isolation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Teaches the debugger agent to trace path/URL/key construction across
producer and consumer code — prevents shallow investigation that misses
directory mismatches like the stale hooks bug (#1249).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gsd-check-update.js looked for hooks in configDir/hooks/ (e.g.,
~/.claude/hooks/) but the installer writes hooks to
configDir/get-shit-done/hooks/. This mismatch caused false stale
hook warnings that persisted even after updating.
Also clears the update cache during install so the next session
re-evaluates hook versions with the correct path.
Closes#1249
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire the --reviews flag through the full stack so plan-phase can
replan incorporating cross-AI review feedback from REVIEWS.md:
- core.cjs: add has_reviews detection in searchPhaseInDir
- init.cjs: wire has_reviews and reviews_path through all init functions
- plan-phase.md command: add --reviews to argument-hint and flags
- plan-phase.md workflow: add step 2.5 validation, skip research,
skip existing plans prompt, pass reviews_path to planner
- gsd-planner.md: add reviews_mode section for consuming review feedback
- COMMANDS.md: add --reviews and missing flags to docs
Closes the gap where --reviews was referenced in 6 places (review
workflow, review command, help workflow, COMMANDS.md, FEATURES.md)
but never implemented.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
core.cjs output() created gsd-*.json files in /tmp for large payloads
but never cleaned them up, causing unbounded disk usage (800+ GB
reported in #1251). Similarly, profile-pipeline.cjs created
gsd-pipeline-* and gsd-profile-* temp directories without cleanup.
Adds reapStaleTempFiles() that removes gsd-prefixed temp files/dirs
older than 5 minutes. Called opportunistically before each new temp
file/dir creation. Non-critical — cleanup failures never break output.
Closes#1251
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add CLAUDE.md enforcement across the three core agents:
- gsd-plan-checker: new Dimension 10 verifies plans respect project
conventions, forbidden patterns, and required tools from CLAUDE.md
- gsd-phase-researcher: outputs Project Constraints section from
CLAUDE.md so planner can verify compliance
- gsd-executor: treats CLAUDE.md directives as hard constraints,
with precedence over plan instructions
Includes 4 regression tests validating the new dimension and
enforcement directives across all three agents.
Closes#1260
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
syncStateFrontmatter() rebuilds YAML frontmatter from the body on every
writeStateMd() call. If an agent removes or omits the Status: field from
the body, buildStateFrontmatter() defaults to 'unknown', overwriting a
previously valid status (e.g., 'executing').
Fix: read existing frontmatter before stripping, and preserve its status
value when the body-derived status would be 'unknown'. This makes
frontmatter self-healing — once a status is set, it persists even if the
body loses the field.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>