Commit Graph

89 Commits

Author SHA1 Message Date
Lex Christopherson
3b0ea3187f feat(research-phase): load REQUIREMENTS.md for focused research
Research now loads concrete requirements (e.g., "AUTH-02: User receives
email verification") to inform research domains, not just high-level
roadmap descriptions.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-15 01:43:30 -06:00
Lex Christopherson
bd4bd9db53 refactor: remove dead code, improve execute-phase UX, fix requirements flow
- Remove phantom status.md command (background agent model abandoned)
- Remove agent-history.md template (unused)
- Remove _archive/ directory
- Add narration to execute-phase (describe what's being built before/after waves)
- Update new-project to offer define-requirements as fast path
- Make define-requirements work without research (gather through questioning)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 01:04:41 -06:00
Lex Christopherson
365c04163c refactor: move requirements status update to commands (orchestrator)
Subagents can't determine if phase is complete. The orchestrator
(execute-plan and execute-phase commands) runs in main context,
can count plans vs summaries, and updates REQUIREMENTS.md when
phase completes.

- execute-plan: Step 2.5 updates requirements when summaries = plans
- execute-phase: Step 6 updates requirements (phase always complete)
- Removed duplicate from workflow (subagent can't run it anyway)
2026-01-15 00:20:00 -06:00
Lex Christopherson
e1b6655d57 feat: update requirement status to Complete when phase finishes
When all plans in a phase complete:
1. Look up phase's requirements from ROADMAP.md
2. Update REQUIREMENTS.md traceability table (Pending → Complete)
3. Include in metadata commit

Closes the loop on requirement tracking.
2026-01-15 00:11:35 -06:00
Lex Christopherson
fc0f861808 fix: align research-project next steps (both point to define-requirements) 2026-01-15 00:04:55 -06:00
Lex Christopherson
36ff4f4f94 fix: show full requirements list, not just counts
Summary step now displays every requirement inline so user can
see exactly what they're committing to before approval.
2026-01-14 23:56:59 -06:00
Lex Christopherson
1ccc66f16b fix: offer both define-requirements and create-roadmap as next steps
Requirements definition is recommended but not mandatory after research.
2026-01-14 23:53:41 -06:00
Lex Christopherson
fb2dcf6430 refactor: subagents write their own research files
Each research agent (stack, features, architecture, pitfalls) writes
directly to .planning/research/. Orchestrator only writes SUMMARY.md
after reading all agent outputs.

Benefits:
- Parallel writes (no aggregation bottleneck)
- Simpler orchestrator (just spawns and synthesizes)
- Better isolation (failed agent doesn't lose others' work)
- Leaner context (orchestrator doesn't hold 4 full docs)
2026-01-14 23:50:03 -06:00
Lex Christopherson
d0488c503f feat: add define-requirements command for scoped v1 requirements
Adds /gsd:define-requirements to transform research findings into
checkable requirements before roadmap creation.

New flow:
  new-project → research-project → define-requirements → create-roadmap

New files:
- commands/gsd/define-requirements.md
- get-shit-done/workflows/define-requirements.md
- get-shit-done/templates/requirements.md

Modified:
- new-project.md: updated next steps
- research-project.md: points to define-requirements
- create-roadmap.md: requires REQUIREMENTS.md, validates coverage
- workflows/create-roadmap.md: maps phases to requirements, updates traceability

Key changes:
- Phases now map to specific requirement IDs
- 100% requirement coverage required before roadmap creation
- REQUIREMENTS.md traceability section tracks phase assignments

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-14 23:25:41 -06:00
Lex Christopherson
53efcfbfe1 feat: add research-project command for pre-roadmap ecosystem research
Adds /gsd:research-project to research domain ecosystem before creating roadmap.
Spawns parallel agents to investigate stack, features, architecture, and pitfalls.

New files:
- commands/gsd/research-project.md
- get-shit-done/workflows/research-project.md
- get-shit-done/templates/research-project/ (5 templates)

Modified:
- new-project.md: offers research vs direct roadmap options
- create-roadmap.md: loads research if exists
- workflows/create-roadmap.md: uses research to inform phases

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-14 22:59:01 -06:00
Lex Christopherson
4da80d64a6 feat(gsd): add USER-SETUP.md for external service configuration
Problem: Phases introducing external services (Stripe, SendGrid, etc.) complete
successfully but user doesn't know about required env vars and dashboard config
until runtime failures occur.

Solution: Explicit declaration at planning time, enforced at execution time.

Changes:
- New template: user-setup.md - defines USER-SETUP.md structure
- phase-prompt.md: add user_setup frontmatter field
- plan-phase.md: add user setup detection guidance in break_into_tasks step
- execute-plan.md: add generate_user_setup step, surface in offer_next
- summary.md: add "User Setup Required" section

Flow:
1. Planning: Claude identifies external services, declares in user_setup frontmatter
2. Execution: After tasks complete, generates {phase}-USER-SETUP.md
3. Completion: Warning block prominently shows required setup before next steps

Automation-first rule: USER-SETUP.md contains ONLY what Claude cannot automate
(account creation, secret retrieval, dashboard config). Everything else Claude does.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 13:38:20 -06:00
Lex Christopherson
62f12794dd chore: remove dead ISSUES.md system
Remove the global ISSUES.md deferred enhancement tracking system.

- Delete /gsd:consider-issues command (never used)
- Delete issues.md template (never instantiated)
- Remove Rule 5 from deviation rules (never triggered)
- Remove all ISSUES.md, ISS-XXX, and "deferred issues" references
- Update STATE.md to track pending todos instead

The ISSUES.md system was designed to capture non-critical enhancements
during plan execution via "Rule 5", but it never fired in practice
across 100+ projects. The system added ~350 lines of dead code.

The /gsd:add-todo and /gsd:check-todos system serves the same purpose
and is actually used.

Note: UAT *-ISSUES.md files (per-plan, created by /gsd:verify-work)
are unaffected - those are a separate, active system.

Closes #56

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 12:33:18 -06:00
Lex Christopherson
00208b71af feat(debug): subagent isolation for investigation with checkpoint support
- Debug command now orchestrates: gather symptoms in main context, spawn
  investigation subagent with fresh 200k context
- Subagent template unified for both /gsd:debug (find_and_fix) and
  diagnose-issues (find_root_cause_only) flows via goal flag
- Checkpoint behavior enables subagent to pause for user input
  (human-verify, human-action, decision) with continuation agents
- Structured return formats: ROOT CAUSE FOUND, DEBUG COMPLETE,
  INVESTIGATION INCONCLUSIVE, CHECKPOINT REACHED
- diagnose-issues updated to match new template placeholders and returns

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-14 10:59:59 -06:00
Lex Christopherson
b1066c1f3c fix(debug): add DEBUG_DIR path constant to prevent typos
Define DEBUG_DIR=.planning/debug at top of debug-related files.
Reference ${DEBUG_DIR} throughout to reduce path typo risk.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-14 10:51:25 -06:00
Lex Christopherson
0e5f1ce8c7 fix: standardize debug file naming and invoke execute-plan
- Debug files from UAT use same naming as regular debug (slug only)
- UAT.md tracks link via debug_session field
- plan-fix actually invokes execute-plan when user selects it

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-14 10:24:51 -06:00
Lex Christopherson
1f358c55b8 fix: auto-diagnose issues instead of offering choice
Diagnosis always produces better fixes and runs in parallel anyway.
Removing the prompt reduces cognitive load.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-14 10:19:22 -06:00
Lex Christopherson
d498662938 feat: add parallel diagnosis before plan-fix
After UAT finds issues, spawn parallel debug agents to investigate
root causes before planning fixes. Each agent investigates one issue
with symptoms pre-filled from UAT, finds the root cause, and returns
diagnosis.

New files:
- workflows/diagnose-issues.md: Orchestrator for parallel debug agents
- templates/debug-subagent-prompt.md: Prompt template for debug subagents

Modified:
- workflows/debug.md: Add symptoms_prefilled and diagnose-only modes
- workflows/verify-work.md: Offer diagnosis step after issues found
- templates/UAT.md: Add root_cause and debug_session fields
- commands/gsd/plan-fix.md: Use root causes for targeted fix planning

Flow: UAT → diagnose (parallel) → plan-fix (with root causes) → execute

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-14 10:11:28 -06:00
Lex Christopherson
9e0808b409 feat: redesign verify-work as conversational UAT with persistent state
- One test at a time instead of full checklist upfront
- Plain text responses instead of AskUserQuestion forms
- Severity inferred from description, never asked
- Persistent UAT.md survives /clear (like debug workflow)
- Single file per phase replaces per-plan ISSUES.md
- Updated plan-fix to read from UAT.md

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-14 09:56:17 -06:00
Lex Christopherson
d30893a834 feat: pre-compute wave numbers at plan time
Wave numbers now computed during plan-phase and stored in PLAN.md
frontmatter. Execute-phase reads wave directly instead of deriving
from depends_on at runtime.

- Add assign_waves step to plan-phase workflow
- Add wave field to frontmatter (plan-format, phase-prompt template)
- Simplify execute-phase: remove analyze_dependencies and group_into_waves
- Replace with group_by_wave that just reads frontmatter integers

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-13 18:10:20 -06:00
Lex Christopherson
cd1bede183 docs: fix brownfield flow, remove deprecated resume-task
- Fix brownfield example to use execute-phase instead of execute-plan
- Remove /gsd:resume-task command (relies on broken Task resume)
- Checkpoint continuation now uses fresh agents, not resume

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:49:13 -06:00
Lex Christopherson
69300f975f fix(checkpoints): replace resume with fresh continuation agents
Resume fails when subagents use parallel tool calls due to Claude Code
serialization bug (consecutive assistant entries with same message ID).

Solution: Subagents return structured checkpoint state, orchestrator
spawns fresh agent with continuation-prompt template instead of resuming.

New files:
- templates/checkpoint-return.md: Structured format with completed tasks table
- templates/continuation-prompt.md: Template for spawning continuation agent

Updated:
- templates/subagent-task-prompt.md: Reference checkpoint-return, remove resume language
- workflows/execute-phase.md: Replace Task(resume=id) with fresh agent spawn
- workflows/execute-plan.md: Update checkpoint_return_for_orchestrator step

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:44:43 -06:00
Lex Christopherson
a4c83cf275 fix(discuss-phase): remove "what's out of scope" question
Scope boundaries are implicit from the roadmap. Asking about them
creates the sensation of scope creep and interrogates the user about
constraints they didn't mention.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-13 17:30:39 -06:00
Lex Christopherson
9e70b89ca1 docs(plan-phase): restore TDD reasoning explanation
Restored context-budget reasoning for why TDD features get dedicated plans:
- TDD requires 2-3 execution cycles consuming 50-60% context
- Test framework setup handled in first TDD plan's RED phase

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:07:29 -06:00
Lex Christopherson
d5c08e1685 feat(execute-phase): load project state before execution
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:03:06 -06:00
Lex Christopherson
72da23dec9 feat: add checkpoint pause/resume for spawned agents
- execute-plan.md: Add checkpoint_return_for_orchestrator step
  explaining how to return at checkpoints when spawned via Task tool
- subagent-task-prompt.md: Add checkpoint_behavior and completion_format
  sections to guide agents on returning for checkpoints

Tested: Task resume works - agent pauses at checkpoint, returns with
details, orchestrator presents to user, resumes with Task(resume=id).
Parallel agents each get unique agent_id for independent resume.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 16:47:33 -06:00
Lex Christopherson
e5d4ecc28c feat: parallel-first planning with dependency graphs and checkpoint-resume
- plan-phase.md: dependency-first planning, vertical slices default
- phase-prompt.md: autonomous field, wave structure, frontmatter table
- scope-estimation.md: parallel default, removed "parallel-aware" framing
- plan-format.md: frontmatter docs with depends_on, files_modified, autonomous
- execute-phase.md: checkpoint-resume flow using Task resume parameter

Plans now declare explicit dependencies via frontmatter. Wave assignment
is automatic based on depends_on + files_modified. Checkpoints pause
subagent, return to orchestrator, user responds, orchestrator resumes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 16:32:03 -06:00
Lex Christopherson
e30e387c00 refactor(execute-phase): wave-based blocking execution
Replace background agents + polling with blocking Task calls.
Orchestrator stays lean (~15% context), subagents load full workflow.

- Archive old execute-phase command and workflow
- Add subagent-task-prompt.md template (orchestrator→subagent contract)
- Rewrite execute-phase with wave-based parallelization
- Dependency analysis groups plans into execution waves
- Parallel Task calls within waves, sequential across waves
- No TaskOutput polling - Task blocks until completion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 16:06:17 -06:00
Lex Christopherson
7d109fde0f fix(debug): inline listing for multiple active sessions
- Shows table of all active debug sessions with status/hypothesis/next action
- Reply with number to resume, or describe new issue
- No AskUserQuestion for session selection - inline flow

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 12:11:07 -06:00
Lex Christopherson
f0b4c7d853 feat: add /gsd:debug for systematic debugging with persistent state
- Creates .planning/debug/[slug].md immediately on command
- Continuous updates: file IS the debugging brain
- Clear section rules: OVERWRITE (Current Focus, Resolution) vs APPEND (Evidence, Eliminated)
- Survives /clear perfectly - resume from any interruption point
- Scientific method: evidence → hypothesis → test → eliminate or confirm
- Includes debugging reference files (mindset, hypothesis testing, investigation techniques)

Closes #53, closes #44

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 11:48:14 -06:00
Lex Christopherson
755b28e644 refactor(10): simplify plan frontmatter for parallelization
Remove confusing `parallelizable` boolean field. It was redundant -
execute-phase already computes parallelizability from `depends_on`
and file conflicts.

Changes:
- Remove `parallelizable: true|false` from plan frontmatter
- Rename `files_exclusive` to `files_modified` (clearer intent)
- Simplify execute-phase dependency detection logic
- Update phase-prompt template and plan-phase workflow

Parallelization is now fully automatic based on:
- `depends_on: []` (empty = independent)
- `files_modified: [...]` (no overlap = can parallelize)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 14:55:40 -06:00
Lex Christopherson
c163004a15 feat(plan-phase): suggest execute-phase when multiple plans created
Routes to batch execution when 2+ plans exist, with execute-plan
as alternative for interactive mode.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 14:40:36 -06:00
Lex Christopherson
b810d1ddca fix(execute-phase): add one-subagent-per-plan constraint
Context isolation is the primary goal, not parallelization.
Even sequential plans spawn separate subagents for fresh 200k context.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 14:34:37 -06:00
Lex Christopherson
5c8e5dffbf feat(11-03): use frontmatter for categorization and wave calculation
- Update categorization table to show frontmatter-aware criteria
- Add categorization priority documentation
- Update calculate_wave() to check frontmatter depends_on first
- Handle parallelizable: false as implicit Wave 2+ assignment
- Fall back to inferred requires only when no frontmatter
- Add [frontmatter] annotation in wave output for plans using new fields
2026-01-12 14:18:30 -06:00
Lex Christopherson
9fcc2a4409 feat(11-03): read parallelization frontmatter in execute-phase
- Add PLAN_PARALLELIZABLE, PLAN_DEPENDS_ON, PLAN_FILES_EXCLUSIVE arrays
- Check for parallelizable, depends_on, files_exclusive in plan frontmatter
- Use frontmatter values directly when present
- Fall back to inference logic for old plans without frontmatter
- Document dependency detection priority
2026-01-12 14:17:52 -06:00
Lex Christopherson
31a77ae141 feat(11-02): add parallelization frontmatter to write_phase_prompt
- Include parallelizable, depends_on, files_exclusive in frontmatter
- Rules for parallelizable field determination
- Parallel-aware context section guidance
- Avoid reflexive SUMMARY references when parallel
2026-01-12 14:14:17 -06:00
Lex Christopherson
082c68960f feat(11-02): add parallelization_aware step to plan-phase
- File ownership analysis per task group
- Detect unnecessary inter-plan dependencies
- Restructure for vertical slices when beneficial
- Mark plans with parallelization frontmatter values
2026-01-12 14:13:34 -06:00
Lex Christopherson
8e67241e73 feat(11-01): add read_parallelization_config step to plan-phase workflow
- Reads .planning/config.json parallelization settings early
- Documents planning behavior when parallel enabled vs disabled
- Placed after load_project_state, before load_codebase_context
- Default: assume parallelization enabled for new projects
2026-01-12 14:08:19 -06:00
Lex Christopherson
8e8fba2793 fix(10-02): load execute-plan.md context in execute-phase command
- Command now loads both workflows (execution + orchestration)
- Agents commit tasks normally (removed DON'T COMMIT instruction)
- Orchestrator only commits metadata after all agents complete
- No duplication - single source of truth for execution logic
2026-01-12 13:23:16 -06:00
Lex Christopherson
511def76a3 feat(10-02): implement parallel spawning and monitoring
- spawn_parallel_agents: Task tool with run_in_background, XML agent prompt,
  agent-history.json tracking with parallel_group, wave queuing
- monitor_parallel_completion: TaskOutput polling loop, completion report parsing,
  check_and_spawn_dependents, failure handling, progress display
- orchestrator_commit: merge conflict detection failsafe, per-plan staging,
  conflict resolution options
- Total: 956 lines (within 800-1200 target)
2026-01-12 13:07:10 -06:00
Lex Christopherson
caf28103e6 feat(10-02): implement dependency analysis step
- Bash implementation for extracting frontmatter requires
- File conflict detection with automatic dependency injection
- Topological sort wave calculation algorithm
- Checkpoint handling separation for foreground/parallel
- Example dependency graph table visualization
2026-01-12 12:57:50 -06:00
Lex Christopherson
af7720c9d7 feat(10-02): create execute-phase.md workflow structure
- 9 steps: load_project_state, identify_phase, analyze_plan_dependencies,
  parallelization_config, spawn_parallel_agents, monitor_parallel_completion,
  orchestrator_commit, create_phase_summary, offer_next
- Purpose, when_to_use, error_handling, success_criteria sections
- 543 lines total
2026-01-12 12:54:49 -06:00
Lex Christopherson
4ea054b9f6 docs(10-01): update documentation mentions to execute-plan.md
- commands/gsd/resume-task.md: infrastructure mention
- get-shit-done/workflows/plan-phase.md: execution context reference
- get-shit-done/templates/agent-history.md: 2 workflow mentions
- get-shit-done/templates/summary.md: 3 workflow mentions
- get-shit-done/templates/codebase/structure.md: example workflow
2026-01-12 12:45:45 -06:00
Lex Christopherson
1690b53b31 refactor(10-01): rename execute-phase.md to execute-plan.md
- Preserves git history via git mv
- Prepares for separation of single-plan vs multi-plan execution
- execute-plan.md handles single PLAN.md execution
2026-01-12 12:38:43 -06:00
Lex Christopherson
6ba850712f feat: add subagent resume capability
Add ability to resume interrupted subagent executions using Task tool's
resume parameter. Tracks agent IDs during execution and enables seamless
continuation after session timeout, rate limits, or crashes.

- New /gsd:resume-task command for resuming interrupted agents
- Agent ID tracking in execute-phase workflow
- Dual storage: current-agent-id.txt (fast) + agent-history.json (audit)
- Auto-detection of interrupted agents in resume-project workflow
- File conflict warnings before resume

Closes #37

Co-Authored-By: davesienkowski <davesienkowski@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 14:19:10 -06:00
Lex Christopherson
810409c363 feat(plan-phase): add planning principles for security, performance, observability
Front-load mindset guidance before process steps:
- Secure by design: assume hostile input
- Performance by design: assume production load
- Observable by design: plan for self-debugging

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 12:23:37 -06:00
Lex Christopherson
863f86e4be feat: surface verify-work option after plan execution
Add /gsd:verify-work to "Also available" sections in execute-phase workflow:
- Route A: After plan completion, before next plan
- Route B: After phase completion, before next phase
- Route C: After milestone completion, before archiving

Users can now easily run manual acceptance testing at any completion point.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 10:07:04 -06:00
Lex Christopherson
a9a9efff86 feat(09-01): create verify-work workflow
- GSD-compliant XML structure with terse step names
- All user interaction via AskUserQuestion
- Issues logged to phase-scoped file (not global ISSUES.md)
- References uat-issues.md template
2026-01-08 08:56:43 -06:00
Lex Christopherson
da884ea7f0 fix: enforce mandatory verification before phase/milestone completion routing
- Rewrite offer_next step in execute-phase.md as mandatory verification gate
- Rewrite offer_next_phase step in transition.md with explicit verification
- Rewrite route step in progress.md with numbered verification steps
- Replace broken regex [0-9] (only matched single digits) with ROADMAP.md reading
- Add decision tables mapping conditions to explicit routes (A, B, C, D)
- Require Claude to "State the counts" before any routing decision
- Add "Do NOT skip this verification" instruction to prevent premature completion claims

Fixes issue where Claude would declare "phase complete" or "milestone complete"
without verifying remaining plans actually exist.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 15:19:22 -06:00
Lex Christopherson
1b9c2f2455 fix: commit phase artifacts when created (#12)
Each phase workflow now commits its artifacts immediately:
- discuss-phase.md commits CONTEXT.md
- research-phase.md commits RESEARCH.md
- plan-phase.md commits PLAN.md (and DISCOVERY.md)
- execute-phase.md commits only execution artifacts (SUMMARY, STATE, ROADMAP)

Planning artifacts are inputs to execution and should be saved when created.
Execution artifacts are outputs and are committed after execution completes.

Closes #12
2026-01-06 12:12:21 -06:00
Lex Christopherson
002a819a9c fix: persist milestone discussion context across /clear (#11)
- Add MILESTONE-CONTEXT.md template for handoff between commands
- discuss-milestone now writes context to .planning/MILESTONE-CONTEXT.md
- create-milestone reads context file and deletes after use

Fixes #11

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 11:33:25 -06:00