Wire withPlanningLock into all ROADMAP.md write paths (phase add/insert/complete/remove, roadmap update-plan-progress) to prevent concurrent corruption when parallel agents modify planning files.
Extract acquireStateLock/releaseStateLock from writeStateMd and add readModifyWriteStateMd helper that holds the lock across the entire read-modify-write cycle, preventing lost updates.
Replace O(n^2) normalizeMd fence detection with single-pass O(n) pre-computed fence state array.
Warn on must_haves parse failure and stateReplaceFieldWithFallback field miss.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Port 3 community hooks from gsd-skill-creator, gated behind hooks.community config flag. All hooks are registered on install but are no-ops unless the project config has hooks: { community: true }.
gsd-session-state.sh (SessionStart): outputs STATE.md head for orientation. gsd-validate-commit.sh (PreToolUse/Bash): blocks non-Conventional-Commits messages. gsd-phase-boundary.sh (PostToolUse/Write|Edit): warns when .planning/ files are modified.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add W011: detect when STATE.md says current phase is N but ROADMAP.md shows it as [x] complete (can happen after crash mid-phase-complete). Add W012-W015: validate branching_strategy against known values, context_window as positive integer, phase_branch_template has {phase} placeholder, milestone_branch_template has {milestone} placeholder.
Add stateReplaceFieldWithFallback diagnostic: warn when neither primary nor fallback field name matches in STATE.md (surfaces template drift from external edits).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Read context_window config (default 200000) in execute-phase and plan-phase workflows. When >= 500000 (1M-class models), subagent prompts include richer context: executor agents receive CONTEXT.md, RESEARCH.md, and prior wave SUMMARYs; verifier agents receive all PLANs, SUMMARYs, and REQUIREMENTS.md; planner receives prior phase CONTEXT.md for cross-phase decision consistency.
At 200k (default), behavior is unchanged.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Both the gsd-executor and gsd-verifier Task() invocations were missing
the required `description` parameter, causing InputValidationError when
spawning agents in parallel during /gsd:execute-phase.
Add check-commit command to gsd-tools that acts as a pre-commit guard.
When commit_docs is false, rejects commits that stage .planning/ files
with an actionable error message including the unstage command.
Recreated cleanly on current main — previous version carried stale
shared fixes that are now upstream.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add --diagnose flag to /gsd:debug that stops after finding the root
cause without applying a fix. Returns a structured Root Cause Report
with confidence level, files involved, and suggested fix strategies.
Offers "Fix now" to spawn a continuation agent, "Plan fix", or
"Manual fix" options.
Recreated cleanly on current main — previous version carried stale
shared fixes that are now upstream.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The autonomous workflow previously had two extremes: full auto-answer
mode (--auto discuss, lean context but no user input) or manager mode
(interactive but bloated context from accumulating everything inline).
The --interactive flag bridges this gap:
- Discuss runs inline via gsd:discuss-phase (asks questions, waits for
user answers — preserving all design decisions)
- Plan and execute dispatch as background agents (fresh context per
phase — no accumulation in the main session)
- Pipeline parallelism: discuss Phase N+1 while Phase N builds in the
background
This keeps the main context lean (only discuss conversations accumulate)
while preserving user input on all decisions. Particularly helpful for
users hitting context limits with /gsd:manager on multi-phase milestones.
Usage:
/gsd:autonomous --interactive
/gsd:autonomous --interactive --from 3
/gsd:autonomous --interactive --only 5
Also adds --only N flag parsing to the upstream workflow (previously only
in PR #1444's branch).
Closes#1413
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
permissionMode: acceptEdits in gsd-executor and gsd-debugger frontmatter
is Claude Code-specific and causes Gemini CLI to hard-fail on agent load
with "Unrecognized key(s) in object: 'permissionMode'". The field also
has no effect in Claude Code (subagent Write permissions are controlled
at runtime level regardless). Remove it from both agents and update
tests to enforce cross-runtime compatibility.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When phase numbers are globally sequential across milestones (e.g.,
phases 61-67), the banner showed "Phase 63/5" where 5 was the count of
remaining phases — easily mistaken for "63 out of 5 total." Clarify
that T must be total milestone phases and add fallback display format
for when phase numbers exceed the total count.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
workstream set with no argument silently cleared the active workstream,
a footgun for users who forgot the name. Now requires a name arg and
errors with usage hint. Explicit clearing via --clear flag, which also
reports the previous workstream in its output.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>