loadConfig() never returned model_overrides, so resolveModelInternal()
could never find per-agent overrides — they were silently ignored.
Additionally, cmdResolveModel duplicated model resolution logic but
skipped the override check entirely. Now delegates to resolveModelInternal
so both code paths behave consistently.
The verifier was the only agent missing the <project_context> section
that executor, planner, researcher, and plan-checker all have. This
aligns it with the existing pattern so project skills and CLAUDE.md
instructions are applied during verification and anti-pattern scanning.
Closes discussion from PR #723.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase number parsing only matched single-decimal (e.g. 03.2) but crashed
on multi-level decimals (e.g. 03.2.1). Requirement IDs with regex
metacharacters (parentheses, dots) were interpolated raw into RegExp
constructors, causing SyntaxError crashes.
- Add escapeRegex() utility for safe regex interpolation
- Update normalizePhaseName/comparePhaseNum for multi-level decimals
- Replace all .replace('.', '\\.') with escapeRegex() across modules
- Escape reqId before regex interpolation in cmdPhaseComplete
- Update all phase dir matching regexes from (?:\.\d+)? to (?:\.\d+)*
- Add regression test for phase complete 03.2.1
Closes#621
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Fix /gsd:update to pin installer to latest
* Harden /gsd:update install detection with global fallback
---------
Co-authored-by: Colin <colin@solvely.net>
Reduces token overhead of Dimension 8 and related agent additions by ~37%
with no behavioral change. Removes theory explanation, dead XML tags
(<manual>, <sampling_rate>), aspirational execution tracking, and
documentation-density prose from runtime agent bodies.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Add requirements_completed field to summary-extract output, mapping
from SUMMARY frontmatter requirements-completed key. Enables
/gsd:audit-milestone cross-check to receive data from SUMMARY source.
Re-applied from #631 against refactored codebase (commands.cjs + split tests).
Co-authored-by: Colin Johnson <Solvely-Colin@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
When orphaned SUMMARY.md files cause totalSummaries > totalPlans, the
progress percentage exceeds 100%, making String.repeat() throw RangeError
on negative arguments. Clamp percent to Math.min(100, ...) at all three
computation sites (state, commands, roadmap).
Closes#633
Co-authored-by: vinicius-tersi <vinicius-tersi@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Add native Codex support to the installer with a skills-first integration
path (--codex), including Codex-specific install/uninstall/manifest handling.
Closes#449
Records test generation in project state via state-snapshot call,
keeping add-tests consistent with other GSD workflows that track
their operations.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New command that generates unit and E2E tests for completed phases:
- Analyzes implementation files and classifies into TDD/E2E/Skip
- Enforces RED-GREEN gates for both unit and E2E tests
- Uses phase SUMMARY.md, CONTEXT.md, and VERIFICATION.md as test specs
- Presents test plan for user approval before generating
Test classification rules:
- TDD: pure functions where expect(fn(input)).toBe(output) is writable
- E2E: UI behavior verifiable by Playwright (keyboard, navigation, forms)
- Skip: styling, config, glue code, migrations, simple CRUD
Ref: Issue #302
Add --cwd <path> / --cwd=<path> support so sandboxed subagents running
outside the project root can target a specific directory. Invalid paths
return a clear error. Tests ported to tests/state.test.cjs (the old
monolithic test file was split into domain files on main).
Closes#622
Co-Authored-By: Colin Johnson <colin@solvely.net>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The `--auto` flag on discuss-phase and plan-phase chains stages automatically:
discuss → plan → execute, each in a fresh context window. Currently the chain
is broken because auto-advance spawns `Task(prompt="Run /gsd:plan-phase --auto")`
which requires the Skill tool — but Skills don't resolve inside Task subagents.
Result: plan-phase never runs from discuss's auto-advance, execute-phase never
runs from plan's auto-advance, and gsd-executor subagents are never spawned.
Fix: Replace `Task(prompt="Run /gsd:XXX")` with Task calls that tell the
subagent to read the workflow .md file directly via @file references — the same
pattern that already works for gsd-executor spawning in execute-phase.
Changes:
- execute-phase.md: Add --no-transition flag handling so execute-phase can
return status to parent instead of running transition.md when spawned by
plan-phase's auto-advance
- plan-phase.md: Replace Skill-based Task call with direct @file reference
to execute-phase.md, passing --no-transition to prevent transition chaining
- discuss-phase.md: Replace Skill-based Task call with direct @file reference
to plan-phase.md, with richer return status handling (PHASE COMPLETE,
PLANNING COMPLETE, PLANNING INCONCLUSIVE, GAPS FOUND)
Nesting depth: discuss → Task(plan) → Task(execute) → Task(executor) = 3 levels
max. Each level gets clean 200k context.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Break the 5324-line monolith into focused modules:
- core.cjs: shared utilities, constants, internal helpers
- frontmatter.cjs: YAML frontmatter parsing/serialization/CRUD
- state.cjs: STATE.md operations + progression engine
- phase.cjs: phase CRUD, query, and lifecycle
- roadmap.cjs: roadmap parsing and updates
- verify.cjs: verification suite + consistency/health validation
- config.cjs: config ensure/set/get
- template.cjs: template selection and fill
- milestone.cjs: milestone + requirements lifecycle
- commands.cjs: standalone utility commands
- init.cjs: compound init commands for workflow bootstrapping
gsd-tools.cjs is now a thin CLI router (~550 lines including
JSDoc) that imports from lib/ modules. All 81 tests pass.
Also updates package.json test script to point to tests/.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move 81 tests (18 describe blocks) from single monolithic test file
into 7 domain-specific test files under tests/ with shared helpers.
Test parity verified: 81/81 pass before and after split.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds automated feedback architecture research to gsd-phase-researcher,
enforces it as Dimension 8 in gsd-plan-checker, and introduces
{phase}-VALIDATION.md as the per-phase validation contract.
Ensures every phase plan includes automated verify commands before
execution begins. Opt-out via workflow.nyquist_validation: false.
Closes#122 (partial), related #117
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
/gsd:health --repair now creates a timestamped backup
(STATE.md.bak-YYYY-MM-DDTHH-MM-SS) before overwriting STATE.md,
preventing accidental data loss of accumulated context.
Co-Authored-By: Claude <noreply@anthropic.com>
Subagents now read project-level CLAUDE.md if it exists:
- Workflows: execute-phase, plan-phase, quick
- Agents: gsd-executor, gsd-planner, gsd-phase-researcher, gsd-plan-checker
Agents read ./CLAUDE.md in their fresh context, following project-specific
guidelines, security requirements, and coding conventions.
Fixes: #671
Co-Authored-By: Claude <noreply@anthropic.com>