Commit Graph

1285 Commits

Author SHA1 Message Date
marcus.salinas
f7031e2f20 fix(manager): address review — withProjectRoot, milestone filter, planningPaths
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>
2026-03-21 09:13:32 -05:00
marcus.salinas
5e5abe0961 Merge upstream/main and resolve conflicts
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>
2026-03-21 07:38:24 -05:00
marcus.salinas
afcd2a8ac2 feat(manager): add interactive command center with dependency-aware recommendations
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>
2026-03-21 07:22:21 -05:00
Tom Boucher
33db504934 Merge pull request #1274 from gsd-build/feat/discuss-mode-config-637
feat: add workflow.discuss_mode assumptions config
2026-03-21 01:18:20 -04:00
Tom Boucher
71b3a85d4b Merge pull request #1279 from gsd-build/fix/early-branch-creation-1278
fix: create strategy branch before first commit, not at execute-phase
2026-03-21 01:17:33 -04:00
Tom Boucher
9ddd6c1bdc fix: create strategy branch before first commit, not at execute-phase (#1278)
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>
2026-03-21 01:08:06 -04:00
Tom Boucher
7ceccc20d3 Merge pull request #1277 from gsd-build/fix/model-resolution-non-claude-1156
fix: resolve ProviderModelNotFoundError on non-Claude runtimes
2026-03-21 00:59:51 -04:00
Tom Boucher
02254db611 fix: resolve ProviderModelNotFoundError on non-Claude runtimes (#1156)
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>
2026-03-21 00:57:20 -04:00
Tom Boucher
3f2c0a16e0 Merge pull request #1276 from daresTheDevil/fix/stdout-pipe-truncation
fix: use fs.writeSync to prevent stdout truncation when piped
2026-03-21 00:41:42 -04:00
Tom Boucher
18bb0149c8 feat: add workflow.discuss_mode assumptions config (#637)
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>
2026-03-21 00:21:17 -04:00
David Kay
045eabbbf9 fix: use fs.writeSync for stdout to prevent pipe truncation
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)
2026-03-20 23:05:15 -05:00
Tom Boucher
377a78fc21 Merge pull request #1272 from gsd-build/fix/verification-data-flow-env-audit-1245
feat: data-flow tracing, environment audit, and behavioral spot-checks in verification
2026-03-20 22:28:51 -04:00
Tom Boucher
e98b41aa15 feat: add data-flow tracing, environment audit, and behavioral spot-checks
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>
2026-03-20 22:26:22 -04:00
Tom Boucher
df6fcf0033 Merge pull request #1271 from gsd-build/claude/resolve-merge-conflict-oXpxa
fix(tests): disable GPG signing in temp git repos to fix CI failures
2026-03-20 22:18:56 -04:00
Tom Boucher
1dde5df364 Merge pull request #1261 from j2h4u/fix/frontmatter-status-preservation
fix(state): preserve frontmatter status when body Status field is missing
2026-03-20 22:14:49 -04:00
Tom Boucher
a583b489f3 Merge pull request #1270 from gsd-build/fix/new-milestone-verification-gate-1269
fix: add verification gate before writing PROJECT.md in new-milestone
2026-03-20 22:13:36 -04:00
Tom Boucher
0d2ee412c8 Merge pull request #1265 from chrisesposito92/feat/plan-phase-reviews-flag
feat: implement --reviews flag for gsd:plan-phase
2026-03-20 22:13:10 -04:00
Tom Boucher
802092d8ff fix: add verification gate before writing PROJECT.md in new-milestone
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>
2026-03-20 22:07:57 -04:00
Tom Boucher
ae1a18ce2e Merge pull request #1267 from gsd-build/feat/multi-project-workspaces-1241
feat: add multi-project workspace commands
2026-03-20 21:57:13 -04:00
Claude
8f21ee0d4a merge: bring branch up to date with main
https://claude.ai/code/session_01Maa4rFLGVsFiLWynSbaVS8
2026-03-21 01:55:02 +00:00
Chris Esposito
71aedb28d5 test: add init tests for has_reviews and reviews_path
- 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>
2026-03-20 20:44:24 -04:00
chrisesposito92
31660d0f17 Update get-shit-done/workflows/plan-phase.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-20 20:41:06 -04:00
Claude
9db686625c fix(tests): disable gpg signing in temp git repos to fix CI failures
https://claude.ai/code/session_01Maa4rFLGVsFiLWynSbaVS8
2026-03-20 21:27:44 +00:00
Tom Boucher
ef4453ebf5 fix: respect HOME env var in workspace init functions for Windows compat
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>
2026-03-20 17:08:50 -04:00
Tom Boucher
5c4d5e5f47 feat: add multi-project workspace commands (#1241)
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>
2026-03-20 17:02:48 -04:00
Tom Boucher
ff3bf6622c docs: add multi-project workspaces design spec (#1241)
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>
2026-03-20 16:49:33 -04:00
Tom Boucher
cd2eabf9a1 Merge pull request #1266 from gsd-build/fix/stale-hook-check-path-1249
fix: stale hook detection checks wrong directory path
2026-03-20 16:32:08 -04:00
Tom Boucher
57cf0bd97b enhance: add 'Follow the Indirection' debugging technique to gsd-debugger
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>
2026-03-20 16:28:15 -04:00
Tom Boucher
c4b313c60f fix: stale hook detection checks wrong directory path
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>
2026-03-20 16:24:06 -04:00
Chris Esposito
4addcea4cf feat: implement --reviews flag for gsd:plan-phase
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>
2026-03-20 16:08:17 -04:00
Tom Boucher
fcb39e7e8b Merge pull request #1262 from gsd-build/fix/plan-checker-claude-md-enforcement
feat: CLAUDE.md compliance as plan-checker Dimension 10
2026-03-20 15:50:56 -04:00
Tom Boucher
6e31cb0944 Merge pull request #1264 from gsd-build/fix/tmp-file-cleanup-1251
fix: temp file reaper prevents unbounded /tmp growth
2026-03-20 15:50:18 -04:00
Tom Boucher
1a5259ce16 fix: add temp file reaper to prevent unbounded /tmp accumulation
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>
2026-03-20 15:46:06 -04:00
Tom Boucher
d032322bcb feat: add CLAUDE.md compliance as plan-checker Dimension 10
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>
2026-03-20 15:41:28 -04:00
j2h4u
f850952332 fix(state): preserve frontmatter status when body Status field is missing
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>
2026-03-21 00:33:13 +05:00
Tom Boucher
3f133fe3bc Merge pull request #1152 from gsd-build/Solvely/execute-phase-active-flags 2026-03-20 13:56:33 -04:00
Colin
81fa102b9c Merge branch 'main' into Solvely/execute-phase-active-flags 2026-03-20 13:52:26 -04:00
Tom Boucher
f6ee8eb1e7 Merge pull request #1259 from gsd-build/docs/v1.27-release-notes
docs: update README and docs/ for v1.27 release
2026-03-20 12:22:42 -04:00
Tom Boucher
d5f2a7ea19 docs: update README and docs/ for v1.27 release
Add documentation for all new v1.27 features:
- 7 new commands (/gsd:fast, /gsd:review, /gsd:plant-seed, /gsd:thread,
  /gsd:add-backlog, /gsd:review-backlog, /gsd:pr-branch)
- Security hardening (security.cjs, prompt guard hook, workflow guard hook)
- Multi-repo workspace support, discussion audit trail, advisor mode
- New config options (research_before_questions, hooks.workflow_guard)
- Updated component counts in ARCHITECTURE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 12:21:53 -04:00
Lex Christopherson
5cb4680017 docs: update Chinese README for v1.27.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 10:14:48 -06:00
Lex Christopherson
47cb2b5c16 1.27.0 2026-03-20 10:08:45 -06:00
Lex Christopherson
0ea6ebe87d docs: update changelog for v1.27.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 10:08:19 -06:00
Lex Christopherson
fb5c190075 docs: update README for v1.27.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 10:06:03 -06:00
Tom Boucher
51b3eee1ca Merge pull request #1258 from gsd-build/security/prompt-injection-guards
security: prompt injection guards, path traversal prevention, input validation
2026-03-20 11:41:14 -04:00
Tom Boucher
62db008570 security: add prompt injection guards, path traversal prevention, and input validation
Defense-in-depth security hardening for a codebase where markdown files become
LLM system prompts. Adds centralized security module, PreToolUse hook for
injection detection, and CI-ready codebase scan.

New files:
- security.cjs: path traversal prevention, prompt injection scanner/sanitizer,
  safe JSON parsing, field name validation, shell arg validation
- gsd-prompt-guard.js: PreToolUse hook scans .planning/ writes for injection
- security.test.cjs: 62 unit tests for all security functions
- prompt-injection-scan.test.cjs: CI scan of all agent/workflow/command files

Hardened code paths:
- readTextArgOrFile: path traversal guard (--prd, --text-file)
- cmdStateUpdate/Patch: field name validation prevents regex injection
- cmdCommit: sanitizeForPrompt strips invisible chars from commit messages
- gsd-tools --fields: safeJsonParse wraps unprotected JSON.parse
- cmdFrontmatterGet/Set: null byte rejection
- cmdVerifyPathExists: null byte rejection
- install.js: registers prompt guard hook, updates uninstaller

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 11:38:26 -04:00
Tom Boucher
5adbba81b2 Merge pull request #1211 from jecanore/feat/advisor-mode-v2
feat: add advisor mode with research-backed discussion
2026-03-20 11:07:56 -04:00
Tom Boucher
122bc0d7c3 Merge pull request #1181 from diegomarino/feat/materialize-new-project-config
feat: materialize full config on new-project initialization
2026-03-20 11:07:09 -04:00
Tom Boucher
2245d6375a Merge pull request #1257 from gsd-build/enhancement/decision-traceability-1243
enhancement(workflow): add decision IDs for discuss-to-plan traceability
2026-03-20 11:05:23 -04:00
Tom Boucher
2418e6c61d Merge pull request #1256 from gsd-build/enhancement/verifier-stub-detection-1244
enhancement(agents): add stub detection to verifier and executor
2026-03-20 11:04:56 -04:00
Tom Boucher
a6afdde460 Merge pull request #1255 from gsd-build/fix/context-monitor-matcher-1246
fix(install): add matcher and timeout to context-monitor hook
2026-03-20 11:04:34 -04:00