Commit Graph

827 Commits

Author SHA1 Message Date
Lex Christopherson
2f258956a2 fix: tighten milestone audit requirements verification with 3-source cross-reference
Closes five gaps where requirements could slip through unchecked at milestone
level: audit now cross-references VERIFICATION.md + SUMMARY frontmatter +
REQUIREMENTS.md traceability, integration checker receives req IDs, gap objects
carry plan-level detail, plan-milestone-gaps updates traceability, and
complete-milestone gates on requirements status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 14:03:50 -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
710795ca88 1.20.2 2026-02-16 13:05:45 -06:00
Lex Christopherson
fb50d3a480 docs: update changelog for v1.20.2 2026-02-16 13:05:41 -06:00
Lex Christopherson
9ef582ef23 fix: close requirements verification loop and enforce MUST language
Tighten all requirements references to use MUST/REQUIRED/CRITICAL language
instead of passive suggestions. Close the verification loop by extracting
phase requirement IDs from ROADMAP and passing them through the full chain:
researcher receives IDs → planner writes to PLAN frontmatter → executor
copies to SUMMARY → verifier cross-references against REQUIREMENTS.md with
orphan detection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 13:03:14 -06:00
Lex Christopherson
cbf809417a fix: requirements tracking chain — strip brackets, add requirements field to plans and summaries
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 12:21:59 -06:00
Lex Christopherson
915d026ef3 1.20.1 2026-02-16 11:23:23 -06:00
Lex Christopherson
8ad9e835db docs: update changelog for v1.20.1 2026-02-16 11:23:20 -06:00
Lex Christopherson
4993678641 fix(auto): persist auto-advance to config and bypass checkpoints
- Write workflow.auto_advance to config.json so auto-mode survives
  context compaction (re-read from disk on every workflow init)
- Auto-approve human-verify and auto-select first option for decision
  checkpoints in both executor and orchestrator
- Pass --auto flag from plan-phase to execute-phase spawn
- Clear auto_advance on milestone complete (Route B)
- Document auto-mode checkpoint behavior in golden rules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 17:59:38 -06:00
Lex Christopherson
e8eab147f9 1.20.0 2026-02-15 17:15:04 -06:00
Lex Christopherson
7b7e5829ae docs: update changelog for v1.20.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 17:15:00 -06:00
Lex Christopherson
1104fc9bf6 docs: update README for v1.20.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 17:13:45 -06:00
Lex Christopherson
fc347d5cf9 fix: warn when planning without user context or discussing after plans exist
Closes #253 — plans were silently created without CONTEXT.md, and
discuss-phase didn't warn when plans already existed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 17:11:02 -06:00
Lex Christopherson
b27034b7ee feat(auto): wire --auto from new-project into phase chain
- Auto mode now chains: new-project → discuss-phase 1 → plan → execute → transition
- Accept pasted text OR file reference (not just @ references)
- YOLO mode implicit in --auto (skip that question)
- Config questions (depth, git, agents) asked FIRST in new Step 2a
- Step 5 skipped in auto mode (config already collected)
- Auto-advance banner shown before invoking discuss-phase

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 16:58:17 -06:00
Lex Christopherson
7510a8a84a feat(quick): add --full flag for plan-checking and verification
Enables quality guarantees on quick tasks without full milestone ceremony.
--full spawns plan-checker (max 2 iterations) and post-execution verifier,
produces VERIFICATION.md, and adds Status column to STATE.md table.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 16:56:31 -06:00
Lex Christopherson
1dcedb635e feat(auto-advance): chain phase execution across full milestone
Wire execute-phase to invoke transition.md inline when --auto flag or
workflow.auto_advance config is set, propagate --auto through transition
to next phase invocations, add config-get command to gsd-tools, and fix
broken "config get" calls to use hyphenated "config-get" subcommand.

Closes #344

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 16:37:47 -06:00
Lex Christopherson
cb7d4dbc3c feat(health): add /gsd:health command for planning directory validation
Validates .planning/ integrity and reports actionable issues:
- Missing/malformed files (PROJECT.md, ROADMAP.md, STATE.md, config.json)
- Phase directory naming, orphaned plans, roadmap/disk consistency
- Auto-repair for config.json and STATE.md with --repair flag

Closes #338

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 16:25:01 -06:00
Lex Christopherson
9aca081d2f docs: add workaround tip for modifying menu options
Document the #1 but... pattern for users who want a modified version
of an existing AskUserQuestion option without retyping it.

Closes #385

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 15:59:36 -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
99c5c41067 fix: respect commit_docs when merging branches in complete-milestone
Strip .planning/ from staging before merge commits when commit_docs is
false. Prevents planning files from being committed during milestone
completion even when using branching strategies.

- Add commit_docs to config extraction in handle_branches step
- Reset .planning/ from staging before squash merge commits
- Use --no-commit flag for --no-ff merges to allow reset before commit
- Document branch merge behavior in planning-config.md

Closes #608

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 15:42:48 -06:00
Lex Christopherson
0f2a3fafff fix: add .gitkeep to phase directories for git tracking
Phase directories created by /gsd:add-phase and /gsd:insert-phase were
empty until planning, causing git to ignore them. This prevented syncing
across machines.

Fixes #427

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 15:03:06 -06:00
Lex Christopherson
1e3194a233 1.19.2 2026-02-15 14:40:27 -06:00
Lex Christopherson
00a13f58dc docs: update changelog for v1.19.2 2026-02-15 14:38:34 -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
04380c8314 docs: add wave execution diagram to clarify parallelization
Adds ASCII diagram showing how plans are grouped into waves based on
dependencies. Independent plans run in parallel within a wave; waves
run sequentially when dependencies exist.

Addresses user confusion in #486 about why phases may not parallelize
(dependencies prevent parallel execution by design).
2026-02-15 14:33:50 -06:00
Lex Christopherson
41cb7455f5 feat(phases): archive completed milestone phase directories (closes #489)
Add optional phase archival to milestone completion and a standalone
/gsd:cleanup command for retroactive use. Phase dirs move to
.planning/milestones/v{X.Y}-phases/, reducing phases/ clutter after
multiple milestones.

Core changes:
- getArchivedPhaseDirs() and searchPhaseInDir() helpers in gsd-tools
- findPhaseInternal() searches archives when phase not found in current
- cmdPhasesList() accepts --include-archived flag
- cmdHistoryDigest() scans both current and archived phases
- cmdMilestoneComplete() accepts --archive-phases flag
- Workflow globs replaced with find-phase/phases-list CLI calls

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 14:33:50 -06:00
Lex Christopherson
8d977328e4 fix(tools): write large JSON payloads to tmpfile to prevent truncation (closes #493)
When init commands include many file contents (state, roadmap, requirements,
etc.), the JSON output can exceed Claude Code's Bash tool buffer (~50KB),
causing parse errors. The output() function now auto-detects large payloads
and writes to a tmpfile, returning @file:/path instead. All workflows that
consume init output handle both formats.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 14:33:50 -06:00
TÂCHES
bc13b4919f Merge pull request #505 from pablo-alonso-arista/docs/user-guide
docs: add User Guide (workflow diagrams, troubleshooting, config reference)
2026-02-15 13:18:48 -06:00
Lex Christopherson
8b75531b22 fix(agents): add scope boundary and fix attempt limit to executor (closes #490)
- Only auto-fix issues directly caused by current task's changes
- Log pre-existing/unrelated issues to deferred-items.md instead of fixing
- Cap auto-fix attempts at 3 per task to prevent infinite build/fix loops

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 11:19:23 -06:00
Lex Christopherson
9aeafc0f48 fix(tools): support #### heading depth in phase matching
Multi-milestone roadmaps use #### for phases nested under milestone
headers. Expanded all phase-matching regexes from #{2,3} to #{2,4}.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 11:15:08 -06:00
Lex Christopherson
37bb14eaf8 feat(config): add user-level default settings via ~/.gsd/defaults.json (closes #492)
New projects seed config from ~/.gsd/defaults.json when available,
skipping the 8 setup questions. /gsd:settings offers to save current
settings as global defaults after configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 11:14:58 -06:00
Lex Christopherson
afb93a37c6 fix(tools): normalize phase padding in insert command (closes #494)
Phase insert failed when zero-padding differed between user input and
ROADMAP.md headers (e.g. "9.05" vs "09.05"). Normalize input and use
flexible regex matching with optional leading zeros.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 11:14:17 -06:00
Lex Christopherson
24b933e018 fix: rename gsd-tools.js to .cjs to prevent ESM conflicts (closes #495)
Projects with "type": "module" in package.json cause Node to treat
gsd-tools.js as ESM, crashing on require(). The .cjs extension forces
CommonJS regardless of the host project's module configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 11:03:22 -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
a5caf9194b feat(config): add per-agent model overrides (#510)
Allow overriding specific agent models without changing the entire profile.
Add model_overrides key to config that takes precedence over profile lookup.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 10:41:04 -06:00
Lex Christopherson
c4ea358920 fix(agents): use Write tool for file creation to prevent settings.local.json corruption
Agents (executor, verifier, planner) were writing markdown files via
Bash heredocs. When approved, Claude Code persisted the entire heredoc
as a permission entry, breaking settings.local.json on next launch.

Added explicit "use Write tool" directives to all three agents and
added missing Write tool to gsd-verifier's tool list.

Closes #526
Closes #491

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 10:25:44 -06:00
Lex Christopherson
7ed1ec89ad fix(commands): remove "execution" from plan-phase description to fix autocomplete (#518)
Typing /exec matched plan-phase instead of execute-phase because the
plan-phase description contained "execution plan".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 10:07:09 -06:00
Lex Christopherson
a4ad25dad0 1.19.1 2026-02-15 10:05:32 -06:00
Lex Christopherson
a679bfc9ef docs: update changelog for v1.19.1 2026-02-15 10:05:27 -06:00
Lex Christopherson
d8f3bac692 docs: update README for v1.19.1 — auto-advance flag and config 2026-02-15 10:04:44 -06:00
Lex Christopherson
91e4ef77f4 fix(workflow): consistent phase transition routing through discuss-phase (#530)
Three routing fixes:
- transition.md checks for CONTEXT.md before routing — discuss-phase when
  missing, plan-phase when present (matches progress.md behavior)
- execute-phase.md offer_next delegates to transition.md instead of emitting
  duplicate "Next Up" blocks
- discuss-phase.md adds explicit handling for "Other" free-text responses

Closes #530

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 10:00:40 -06:00
Lex Christopherson
c8827fede1 fix(tools): deterministic ROADMAP progress table updates from disk (#537)
Replace NL instructions in execute-plan and execute-phase workflows with
deterministic `roadmap update-plan-progress` command that counts PLAN vs
SUMMARY files on disk. Prevents LLM from miscounting plan progress.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 09:58:32 -06:00
Lex Christopherson
ed1768404c feat(workflow): add auto-advance pipeline (--auto flag + workflow.auto_advance config)
Add opt-in mechanism to chain discuss → plan → execute automatically
via Task() subagents, eliminating manual /clear + paste overhead.

- Add `--auto` flag to discuss-phase and plan-phase commands
- Add `workflow.auto_advance` config toggle (default: false)
- Add auto_advance step to discuss-phase workflow (spawns plan-phase)
- Add step 14 to plan-phase workflow (spawns execute-phase)
- Add auto_advance toggle to /gsd:settings

Chain stops gracefully on INCONCLUSIVE, CHECKPOINT, or verification
failures. No work lost — artifacts persist at each step.

Closes #541

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 09:54:05 -06:00
Lex Christopherson
4fb04287d0 fix(verifier): use ROADMAP Success Criteria instead of deriving truths from Goal (#538)
The verifier was deriving verification truths from the vague one-line Goal
field, allowing partial implementations to pass. Now extracts Success Criteria
as a structured array from `roadmap get-phase` and uses them directly as truths,
with Goal derivation as fallback for older ROADMAPs without Success Criteria.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 09:53:13 -06:00
Lex Christopherson
a142002dfe fix(tools): update REQUIREMENTS.md traceability when phase completes
cmdPhaseComplete now updates REQUIREMENTS.md when a phase finishes:
- Checks off requirement checkboxes (- [ ] → - [x])
- Updates traceability table status (Pending → Complete)

Parses Requirements line from ROADMAP.md phase section to find
which REQ-IDs belong to the completing phase.

Fixes #539

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 09:51:37 -06:00
Lex Christopherson
dcdb31cdf5 fix(workflow): update STATE.md after discuss-phase completes (#556)
Add update_state step to record session info after context gathering,
matching the pattern used by execute-plan, add-todo, and other workflows.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 09:36:48 -06:00
Lex Christopherson
765476ea3f fix(workflow): enforce 12-char AskUserQuestion header limit (#559)
Fix hardcoded headers exceeding the 12-character validation limit and
add max-length guidance for dynamically generated headers.

Closes #559

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 09:22:07 -06:00
Lex Christopherson
2b9951b9c8 fix(agents): return 'inherit' instead of 'opus' for model resolution (#558)
Claude Code's "opus" alias maps to a specific model version (claude-opus-4-1).
Organizations that block older opus versions while allowing newer ones see
agents silently fall back to Sonnet. By returning "inherit" instead, agents
use whatever opus version the user has configured in their session.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 09:21:40 -06:00
Lex Christopherson
ca18c24474 1.19.0 2026-02-15 09:07:40 -06:00
Lex Christopherson
4622aa7546 docs: update changelog for v1.19.0 2026-02-15 09:07:34 -06:00