gsd-opencode 1.5.2 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/agents/gsd-codebase-mapper.md +743 -0
  2. package/agents/gsd-debugger.md +1191 -0
  3. package/agents/gsd-executor.md +759 -0
  4. package/agents/gsd-integration-checker.md +427 -0
  5. package/agents/gsd-phase-researcher.md +637 -0
  6. package/agents/gsd-plan-checker.md +749 -0
  7. package/agents/gsd-planner.md +1373 -0
  8. package/agents/gsd-project-researcher.md +877 -0
  9. package/agents/gsd-research-synthesizer.md +250 -0
  10. package/agents/gsd-roadmapper.md +610 -0
  11. package/agents/gsd-verifier.md +782 -0
  12. package/bin/install.js +11 -1
  13. package/command/gsd/add-phase.md +5 -7
  14. package/command/gsd/add-todo.md +4 -6
  15. package/command/gsd/audit-milestone.md +257 -0
  16. package/command/gsd/check-todos.md +2 -4
  17. package/command/gsd/complete-milestone.md +53 -23
  18. package/command/gsd/debug.md +120 -30
  19. package/command/gsd/discuss-phase.md +51 -30
  20. package/command/gsd/execute-phase.md +192 -26
  21. package/command/gsd/help.md +66 -75
  22. package/command/gsd/insert-phase.md +6 -6
  23. package/command/gsd/list-phase-assumptions.md +1 -1
  24. package/command/gsd/map-codebase.md +15 -28
  25. package/command/gsd/new-milestone.md +693 -36
  26. package/command/gsd/new-project.md +668 -108
  27. package/command/gsd/pause-work.md +2 -2
  28. package/command/gsd/plan-milestone-gaps.md +284 -0
  29. package/command/gsd/plan-phase.md +449 -42
  30. package/command/gsd/progress.md +66 -36
  31. package/command/gsd/remove-phase.md +17 -19
  32. package/command/gsd/research-phase.md +155 -67
  33. package/command/gsd/resume-work.md +3 -3
  34. package/command/gsd/update.md +172 -0
  35. package/command/gsd/verify-work.md +186 -38
  36. package/command/gsd/whats-new.md +124 -0
  37. package/get-shit-done/references/checkpoints.md +599 -98
  38. package/get-shit-done/references/continuation-format.md +5 -11
  39. package/get-shit-done/references/questioning.md +87 -108
  40. package/get-shit-done/references/tdd.md +3 -3
  41. package/get-shit-done/references/ui-brand.md +160 -0
  42. package/get-shit-done/references/verification-patterns.md +595 -0
  43. package/get-shit-done/templates/DEBUG.md +3 -3
  44. package/get-shit-done/templates/UAT.md +247 -0
  45. package/get-shit-done/templates/codebase/architecture.md +5 -5
  46. package/get-shit-done/templates/codebase/concerns.md +1 -1
  47. package/get-shit-done/templates/codebase/conventions.md +1 -1
  48. package/get-shit-done/templates/codebase/structure.md +8 -8
  49. package/get-shit-done/templates/codebase/testing.md +2 -2
  50. package/get-shit-done/templates/context.md +221 -70
  51. package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  52. package/get-shit-done/templates/discovery.md +5 -5
  53. package/get-shit-done/templates/phase-prompt.md +115 -2
  54. package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  55. package/get-shit-done/templates/requirements.md +231 -0
  56. package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  57. package/get-shit-done/templates/research-project/FEATURES.md +147 -0
  58. package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  59. package/get-shit-done/templates/research-project/STACK.md +120 -0
  60. package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  61. package/get-shit-done/templates/research.md +2 -2
  62. package/get-shit-done/templates/roadmap.md +26 -20
  63. package/get-shit-done/templates/state.md +2 -17
  64. package/get-shit-done/templates/summary.md +13 -17
  65. package/get-shit-done/templates/user-setup.md +323 -0
  66. package/get-shit-done/templates/verification-report.md +322 -0
  67. package/get-shit-done/workflows/complete-milestone.md +152 -45
  68. package/get-shit-done/workflows/diagnose-issues.md +233 -0
  69. package/get-shit-done/workflows/discovery-phase.md +12 -17
  70. package/get-shit-done/workflows/discuss-phase.md +309 -124
  71. package/get-shit-done/workflows/execute-phase.md +177 -18
  72. package/get-shit-done/workflows/execute-plan.md +163 -145
  73. package/get-shit-done/workflows/map-codebase.md +86 -231
  74. package/get-shit-done/workflows/resume-project.md +18 -20
  75. package/get-shit-done/workflows/transition.md +7 -23
  76. package/get-shit-done/workflows/verify-phase.md +629 -0
  77. package/get-shit-done/workflows/verify-work.md +495 -134
  78. package/package.json +2 -1
  79. package/command/gsd/consider-issues.md +0 -201
  80. package/command/gsd/create-roadmap.md +0 -115
  81. package/command/gsd/discuss-milestone.md +0 -47
  82. package/command/gsd/execute-plan.md +0 -103
  83. package/command/gsd/plan-fix.md +0 -205
  84. package/command/gsd/status.md +0 -127
  85. package/get-shit-done/references/debugging/debugging-mindset.md +0 -253
  86. package/get-shit-done/references/debugging/hypothesis-testing.md +0 -373
  87. package/get-shit-done/references/debugging/investigation-techniques.md +0 -337
  88. package/get-shit-done/references/debugging/verification-patterns.md +0 -425
  89. package/get-shit-done/references/debugging/when-to-research.md +0 -361
  90. package/get-shit-done/references/plan-format.md +0 -475
  91. package/get-shit-done/references/principles.md +0 -157
  92. package/get-shit-done/references/research-pitfalls.md +0 -215
  93. package/get-shit-done/references/scope-estimation.md +0 -256
  94. package/get-shit-done/templates/agent-history.md +0 -263
  95. package/get-shit-done/templates/checkpoint-return.md +0 -204
  96. package/get-shit-done/templates/config.json +0 -26
  97. package/get-shit-done/templates/continuation-prompt.md +0 -235
  98. package/get-shit-done/templates/issues.md +0 -32
  99. package/get-shit-done/templates/milestone-context.md +0 -93
  100. package/get-shit-done/templates/subagent-task-prompt.md +0 -95
  101. package/get-shit-done/templates/uat-issues.md +0 -143
  102. package/get-shit-done/workflows/_archive/execute-phase.md +0 -899
  103. package/get-shit-done/workflows/create-milestone.md +0 -416
  104. package/get-shit-done/workflows/create-roadmap.md +0 -481
  105. package/get-shit-done/workflows/debug.md +0 -426
  106. package/get-shit-done/workflows/discuss-milestone.md +0 -236
  107. package/get-shit-done/workflows/plan-phase.md +0 -701
  108. package/get-shit-done/workflows/research-phase.md +0 -436
@@ -2,57 +2,147 @@
2
2
  name: gsd-debug
3
3
  description: Systematic debugging with persistent state across context resets
4
4
  argument-hint: [issue description]
5
- allowed-tools:
5
+ tools:
6
6
  - read
7
- - write
8
- - edit
9
7
  - bash
10
- - grep
11
- - glob
12
8
  - question
13
9
  ---
14
10
 
15
11
  <objective>
16
- Debug issues using scientific method with a persistent debug document that survives `/new`.
12
+ Debug issues using scientific method with subagent isolation.
17
13
 
18
- If resuming (no arguments and active session exists): pick up where you left off.
19
- If starting new: gather symptoms, then investigate autonomously.
20
- </objective>
14
+ **Orchestrator role:** Gather symptoms, spawn gsd-debugger agent, handle checkpoints, spawn continuations.
21
15
 
22
- <execution_context>
23
- @~/.config/opencode/get-shit-done/workflows/debug.md
24
- @~/.config/opencode/get-shit-done/templates/DEBUG.md
25
- </execution_context>
16
+ **Why subagent:** Investigation burns context fast (reading files, forming hypotheses, testing). Fresh 200k context per investigation. Main context stays lean for user interaction.
17
+ </objective>
26
18
 
27
19
  <context>
28
20
  User's issue: $ARGUMENTS
29
21
 
30
- Check for active debug sessions:
22
+ Check for active sessions:
31
23
  ```bash
32
- ls .planning/debug/*.md 2>/dev/null | head -5
24
+ ls .planning/debug/*.md 2>/dev/null | grep -v resolved | head -5
33
25
  ```
34
26
  </context>
35
27
 
36
28
  <process>
37
- Follow the workflow in @~/.config/opencode/get-shit-done/workflows/debug.md
38
29
 
39
- **Quick reference:**
30
+ ## 1. Check Active Sessions
31
+
32
+ If active sessions exist AND no $ARGUMENTS:
33
+ - List sessions with status, hypothesis, next action
34
+ - User picks number to resume OR describes new issue
35
+
36
+ If $ARGUMENTS provided OR user describes new issue:
37
+ - Continue to symptom gathering
38
+
39
+ ## 2. Gather Symptoms (if new issue)
40
+
41
+ Use question for each:
42
+
43
+ 1. **Expected behavior** - What should happen?
44
+ 2. **Actual behavior** - What happens instead?
45
+ 3. **Error messages** - Any errors? (paste or describe)
46
+ 4. **Timeline** - When did this start? Ever worked?
47
+ 5. **Reproduction** - How do you trigger it?
48
+
49
+ After all gathered, confirm ready to investigate.
50
+
51
+ ## 3. Spawn gsd-debugger Agent
52
+
53
+ Fill prompt and spawn:
54
+
55
+ ```markdown
56
+ <objective>
57
+ Investigate issue: {slug}
58
+
59
+ **Summary:** {trigger}
60
+ </objective>
61
+
62
+ <symptoms>
63
+ expected: {expected}
64
+ actual: {actual}
65
+ errors: {errors}
66
+ reproduction: {reproduction}
67
+ timeline: {timeline}
68
+ </symptoms>
69
+
70
+ <mode>
71
+ symptoms_prefilled: true
72
+ goal: find_and_fix
73
+ </mode>
74
+
75
+ <debug_file>
76
+ Create: .planning/debug/{slug}.md
77
+ </debug_file>
78
+ ```
79
+
80
+ ```
81
+ Task(
82
+ prompt=filled_prompt,
83
+ subagent_type="gsd-debugger",
84
+ description="Debug {slug}"
85
+ )
86
+ ```
87
+
88
+ ## 4. Handle Agent Return
89
+
90
+ **If `## ROOT CAUSE FOUND`:**
91
+ - Display root cause and evidence summary
92
+ - Offer options:
93
+ - "Fix now" - spawn fix subagent
94
+ - "Plan fix" - suggest /gsd-plan-phase --gaps
95
+ - "Manual fix" - done
96
+
97
+ **If `## CHECKPOINT REACHED`:**
98
+ - Present checkpoint details to user
99
+ - Get user response
100
+ - Spawn continuation agent (see step 5)
101
+
102
+ **If `## INVESTIGATION INCONCLUSIVE`:**
103
+ - Show what was checked and eliminated
104
+ - Offer options:
105
+ - "Continue investigating" - spawn new agent with additional context
106
+ - "Manual investigation" - done
107
+ - "Add more context" - gather more symptoms, spawn again
108
+
109
+ ## 5. Spawn Continuation Agent (After Checkpoint)
110
+
111
+ When user responds to checkpoint, spawn fresh agent:
40
112
 
41
- 1. **Check for active sessions** - Offer to resume or start new
42
- 2. **Gather symptoms** - What happened? What should happen? Errors? When?
43
- 3. **Create DEBUG.md** - Document symptoms in `.planning/debug/[slug].md`
44
- 4. **Investigate** - Evidence → Hypothesis → Test → Eliminate or Confirm
45
- 5. **Fix and verify** - Minimal fix, verify against original symptoms
46
- 6. **Archive** - Move to `.planning/debug/resolved/`
113
+ ```markdown
114
+ <objective>
115
+ Continue debugging {slug}. Evidence is in the debug file.
116
+ </objective>
117
+
118
+ <prior_state>
119
+ Debug file: @.planning/debug/{slug}.md
120
+ </prior_state>
121
+
122
+ <checkpoint_response>
123
+ **Type:** {checkpoint_type}
124
+ **Response:** {user_response}
125
+ </checkpoint_response>
126
+
127
+ <mode>
128
+ goal: find_and_fix
129
+ </mode>
130
+ ```
131
+
132
+ ```
133
+ Task(
134
+ prompt=continuation_prompt,
135
+ subagent_type="gsd-debugger",
136
+ description="Continue debug {slug}"
137
+ )
138
+ ```
47
139
 
48
- **Key principle:** The DEBUG.md is your memory. Update it constantly. It survives `/new`.
49
140
  </process>
50
141
 
51
142
  <success_criteria>
52
- - [ ] Active sessions checked before starting new
53
- - [ ] Symptoms gathered through question (not inline questions)
54
- - [ ] DEBUG.md tracks all investigation state
55
- - [ ] Scientific method followed (not random fixes)
56
- - [ ] Root cause confirmed with evidence before fixing
57
- - [ ] Fix verified and session archived
143
+ - [ ] Active sessions checked
144
+ - [ ] Symptoms gathered (if new)
145
+ - [ ] gsd-debugger spawned with context
146
+ - [ ] Checkpoints handled correctly
147
+ - [ ] Root cause confirmed before fixing
58
148
  </success_criteria>
@@ -1,15 +1,20 @@
1
1
  ---
2
2
  name: gsd-discuss-phase
3
3
  description: Gather phase context through adaptive questioning before planning
4
- argument-hint: "[phase]"
4
+ argument-hint: "<phase>"
5
+ tools: [read, write, bash, glob, grep, question]
5
6
  ---
6
7
 
7
8
  <objective>
8
- Help the user articulate their vision for a phase through collaborative thinking.
9
+ Extract implementation decisions that downstream agents need researcher and planner will use CONTEXT.md to know what to investigate and what choices are locked.
9
10
 
10
- Purpose: Understand HOW the user imagines this phase working — what it looks like, what's essential. You're a thinking partner helping them crystallize their vision, not an interviewer gathering technical requirements.
11
+ **How it works:**
12
+ 1. Analyze the phase to identify gray areas (UI, UX, behavior, etc.)
13
+ 2. Present gray areas — user selects which to discuss
14
+ 3. Deep-dive each selected area until satisfied
15
+ 4. Create CONTEXT.md with decisions that guide research and planning
11
16
 
12
- Output: {phase}-CONTEXT.md capturing the user's vision for the phase
17
+ **Output:** `{phase}-CONTEXT.md` decisions clear enough that downstream agents can act without asking the user again
13
18
  </objective>
14
19
 
15
20
  <execution_context>
@@ -20,7 +25,7 @@ Output: {phase}-CONTEXT.md capturing the user's vision for the phase
20
25
  <context>
21
26
  Phase number: $ARGUMENTS (required)
22
27
 
23
- **Load project state first:**
28
+ **Load project state:**
24
29
  @.planning/STATE.md
25
30
 
26
31
  **Load roadmap:**
@@ -28,32 +33,48 @@ Phase number: $ARGUMENTS (required)
28
33
  </context>
29
34
 
30
35
  <process>
31
- 1. Validate phase number argument (error if missing or invalid)
32
- 2. Check if phase exists in roadmap
33
- 3. Check if CONTEXT.md already exists (offer to update if yes)
34
- 4. Follow discuss-phase.md workflow with **ALL questions using question**:
35
- - Present phase from roadmap
36
- - Use question: "How do you imagine this working?" with interpretation options
37
- - Use question to follow their thread — probe what excites them
38
- - Use question to sharpen the core — what's essential for THIS phase
39
- - Use question for decision gate (ready / ask more / let me add context)
40
- - Create CONTEXT.md capturing their vision
41
- 5. Offer next steps (research or plan the phase)
42
-
43
- **CRITICAL: ALL questions use question. Never ask inline text questions.**
44
-
45
- User is the visionary, you are the builder:
46
- - Ask about vision, feel, essential outcomes
47
- - DON'T ask about technical risks (you figure those out)
48
- - DON'T ask about codebase patterns (you read the code)
49
- - DON'T ask about success metrics (too corporate)
50
- - DON'T interrogate about constraints they didn't mention
36
+ 1. Validate phase number (error if missing or not in roadmap)
37
+ 2. Check if CONTEXT.md exists (offer update/view/skip if yes)
38
+ 3. **Analyze phase** Identify domain and generate phase-specific gray areas
39
+ 4. **Present gray areas** — Multi-select: which to discuss? (NO skip option)
40
+ 5. **Deep-dive each area** 4 questions per area, then offer more/next
41
+ 6. **write CONTEXT.md** Sections match areas discussed
42
+ 7. Offer next steps (research or plan)
43
+
44
+ **CRITICAL: Scope guardrail**
45
+ - Phase boundary from ROADMAP.md is FIXED
46
+ - Discussion clarifies HOW to implement, not WHETHER to add more
47
+ - If user suggests new capabilities: "That's its own phase. I'll note it for later."
48
+ - Capture deferred ideas don't lose them, don't act on them
49
+
50
+ **Domain-aware gray areas:**
51
+ Gray areas depend on what's being built. Analyze the phase goal:
52
+ - Something users SEE layout, density, interactions, states
53
+ - Something users CALL responses, errors, auth, versioning
54
+ - Something users RUN output format, flags, modes, error handling
55
+ - Something users READ structure, tone, depth, flow
56
+ - Something being ORGANIZED → criteria, grouping, naming, exceptions
57
+
58
+ Generate 3-4 **phase-specific** gray areas, not generic categories.
59
+
60
+ **Probing depth:**
61
+ - Ask 4 questions per area before checking
62
+ - "More questions about [area], or move to next?"
63
+ - If more → ask 4 more, check again
64
+ - After all areas → "Ready to create context?"
65
+
66
+ **Do NOT ask about (OpenCode handles these):**
67
+ - Technical implementation
68
+ - Architecture choices
69
+ - Performance concerns
70
+ - Scope expansion
51
71
  </process>
52
72
 
53
73
  <success_criteria>
54
-
55
- - Phase validated against roadmap
56
- - Vision gathered through collaborative thinking (not interrogation)
57
- - CONTEXT.md captures: how it works, what's essential
58
- - User knows next steps (research or plan the phase)
74
+ - Gray areas identified through intelligent analysis
75
+ - User chose which areas to discuss
76
+ - Each selected area explored until satisfied
77
+ - Scope creep redirected to deferred ideas
78
+ - CONTEXT.md captures decisions, not vague vision
79
+ - User knows next steps
59
80
  </success_criteria>
@@ -1,15 +1,14 @@
1
1
  ---
2
2
  name: gsd-execute-phase
3
3
  description: Execute all plans in a phase with wave-based parallelization
4
- argument-hint: "<phase-number>"
5
- allowed-tools:
4
+ argument-hint: "<phase-number> [--gaps-only]"
5
+ tools:
6
6
  - read
7
7
  - write
8
8
  - edit
9
9
  - glob
10
10
  - grep
11
11
  - bash
12
- - task
13
12
  - todowrite
14
13
  - question
15
14
  ---
@@ -23,13 +22,16 @@ Context budget: ~15% orchestrator, 100% fresh per subagent.
23
22
  </objective>
24
23
 
25
24
  <execution_context>
25
+ @~/.config/opencode/get-shit-done/references/ui-brand.md
26
26
  @~/.config/opencode/get-shit-done/workflows/execute-phase.md
27
- @~/.config/opencode/get-shit-done/templates/subagent-task-prompt.md
28
27
  </execution_context>
29
28
 
30
29
  <context>
31
30
  Phase: $ARGUMENTS
32
31
 
32
+ **Flags:**
33
+ - `--gaps-only` — Execute only gap closure plans (plans with `gap_closure: true` in frontmatter). Use after verify-work creates fix plans.
34
+
33
35
  @.planning/ROADMAP.md
34
36
  @.planning/STATE.md
35
37
  </context>
@@ -43,53 +45,208 @@ Phase: $ARGUMENTS
43
45
  2. **Discover plans**
44
46
  - List all *-PLAN.md files in phase directory
45
47
  - Check which have *-SUMMARY.md (already complete)
48
+ - If `--gaps-only`: filter to only plans with `gap_closure: true`
46
49
  - Build list of incomplete plans
47
50
 
48
51
  3. **Group by wave**
49
- - Read `wave` from each plan's frontmatter
52
+ - read `wave` from each plan's frontmatter
50
53
  - Group plans by wave number
51
54
  - Report wave structure to user
52
55
 
53
56
  4. **Execute waves**
54
57
  For each wave in order:
55
- - Fill subagent-task-prompt template for each plan
56
- - Spawn all agents in wave simultaneously (parallel task calls)
57
- - Wait for completion (task blocks)
58
+ - Spawn `gsd-executor` for each plan in wave (parallel Task calls)
59
+ - Wait for completion (Task blocks)
58
60
  - Verify SUMMARYs created
59
61
  - Proceed to next wave
60
62
 
61
63
  5. **Aggregate results**
62
64
  - Collect summaries from all plans
63
65
  - Report phase completion status
64
- - Update ROADMAP.md
65
66
 
66
- 6. **Offer next steps**
67
- - More phases `/gsd-plan-phase {next}`
68
- - Milestone complete → `/gsd-complete-milestone`
67
+ 6. **Commit any orchestrator corrections**
68
+ Check for uncommitted changes before verification:
69
+ ```bash
70
+ git status --porcelain
71
+ ```
72
+
73
+ **If changes exist:** Orchestrator made corrections between executor completions. Commit them:
74
+ ```bash
75
+ git add -u && git commit -m "fix({phase}): orchestrator corrections"
76
+ ```
77
+
78
+ **If clean:** Continue to verification.
79
+
80
+ 7. **Verify phase goal**
81
+ - Spawn `gsd-verifier` subagent with phase directory and goal
82
+ - Verifier checks must_haves against actual codebase (not SUMMARY claims)
83
+ - Creates VERIFICATION.md with detailed report
84
+ - Route by status:
85
+ - `passed` → continue to step 8
86
+ - `human_needed` → present items, get approval or feedback
87
+ - `gaps_found` → present gaps, offer `/gsd-plan-phase {X} --gaps`
88
+
89
+ 8. **Update roadmap and state**
90
+ - Update ROADMAP.md, STATE.md
91
+
92
+ 9. **Update requirements**
93
+ Mark phase requirements as Complete:
94
+ - read ROADMAP.md, find this phase's `Requirements:` line (e.g., "AUTH-01, AUTH-02")
95
+ - read REQUIREMENTS.md traceability table
96
+ - For each REQ-ID in this phase: change Status from "Pending" to "Complete"
97
+ - write updated REQUIREMENTS.md
98
+ - Skip if: REQUIREMENTS.md doesn't exist, or phase has no Requirements line
99
+
100
+ 10. **Commit phase completion**
101
+ Bundle all phase metadata updates in one commit:
102
+ - Stage: `git add .planning/ROADMAP.md .planning/STATE.md`
103
+ - Stage REQUIREMENTS.md if updated: `git add .planning/REQUIREMENTS.md`
104
+ - Commit: `docs({phase}): complete {phase-name} phase`
105
+
106
+ 11. **Offer next steps**
107
+ - Route to next action (see `<offer_next>`)
69
108
  </process>
70
109
 
110
+ <offer_next>
111
+ Output this markdown directly (not as a code block). Route based on status:
112
+
113
+ | Status | Route |
114
+ |--------|-------|
115
+ | `gaps_found` | Route C (gap closure) |
116
+ | `human_needed` | Present checklist, then re-route based on approval |
117
+ | `passed` + more phases | Route A (next phase) |
118
+ | `passed` + last phase | Route B (milestone complete) |
119
+
120
+ ---
121
+
122
+ **Route A: Phase verified, more phases remain**
123
+
124
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
125
+ GSD ► PHASE {Z} COMPLETE ✓
126
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
127
+
128
+ **Phase {Z}: {Name}**
129
+
130
+ {Y} plans executed
131
+ Goal verified ✓
132
+
133
+ ───────────────────────────────────────────────────────────────
134
+
135
+ ## ▶ Next Up
136
+
137
+ **Phase {Z+1}: {Name}** — {Goal from ROADMAP.md}
138
+
139
+ /gsd-discuss-phase {Z+1} — gather context and clarify approach
140
+
141
+ */new first → fresh context window*
142
+
143
+ ───────────────────────────────────────────────────────────────
144
+
145
+ **Also available:**
146
+ - /gsd-plan-phase {Z+1} — skip discussion, plan directly
147
+ - /gsd-verify-work {Z} — manual acceptance testing before continuing
148
+
149
+ ───────────────────────────────────────────────────────────────
150
+
151
+ ---
152
+
153
+ **Route B: Phase verified, milestone complete**
154
+
155
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
156
+ GSD ► MILESTONE COMPLETE 🎉
157
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
158
+
159
+ **v1.0**
160
+
161
+ {N} phases completed
162
+ All phase goals verified ✓
163
+
164
+ ───────────────────────────────────────────────────────────────
165
+
166
+ ## ▶ Next Up
167
+
168
+ **Audit milestone** — verify requirements, cross-phase integration, E2E flows
169
+
170
+ /gsd-audit-milestone
171
+
172
+ */new first → fresh context window*
173
+
174
+ ───────────────────────────────────────────────────────────────
175
+
176
+ **Also available:**
177
+ - /gsd-verify-work — manual acceptance testing
178
+ - /gsd-complete-milestone — skip audit, archive directly
179
+
180
+ ───────────────────────────────────────────────────────────────
181
+
182
+ ---
183
+
184
+ **Route C: Gaps found — need additional planning**
185
+
186
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
187
+ GSD ► PHASE {Z} GAPS FOUND ⚠
188
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
189
+
190
+ **Phase {Z}: {Name}**
191
+
192
+ Score: {N}/{M} must-haves verified
193
+ Report: .planning/phases/{phase_dir}/{phase}-VERIFICATION.md
194
+
195
+ ### What's Missing
196
+
197
+ {Extract gap summaries from VERIFICATION.md}
198
+
199
+ ───────────────────────────────────────────────────────────────
200
+
201
+ ## ▶ Next Up
202
+
203
+ **Plan gap closure** — create additional plans to complete the phase
204
+
205
+ /gsd-plan-phase {Z} --gaps
206
+
207
+ */new first → fresh context window*
208
+
209
+ ───────────────────────────────────────────────────────────────
210
+
211
+ **Also available:**
212
+ - cat .planning/phases/{phase_dir}/{phase}-VERIFICATION.md — see full report
213
+ - /gsd-verify-work {Z} — manual testing before planning
214
+
215
+ ───────────────────────────────────────────────────────────────
216
+
217
+ ---
218
+
219
+ After user runs /gsd-plan-phase {Z} --gaps:
220
+ 1. Planner reads VERIFICATION.md gaps
221
+ 2. Creates plans 04, 05, etc. to close gaps
222
+ 3. User runs /gsd-execute-phase {Z} again
223
+ 4. Execute-phase runs incomplete plans (04, 05...)
224
+ 5. Verifier runs again → loop until passed
225
+ </offer_next>
226
+
71
227
  <wave_execution>
72
228
  **Parallel spawning:**
73
229
 
74
- Spawn all plans in a wave with a single message containing multiple task calls:
230
+ Spawn all plans in a wave with a single message containing multiple Task calls:
75
231
 
76
232
  ```
77
- task(prompt=filled_template_for_plan_01, subagent_type="general")
78
- task(prompt=filled_template_for_plan_02, subagent_type="general")
79
- task(prompt=filled_template_for_plan_03, subagent_type="general")
233
+ Task(prompt="Execute plan at {plan_01_path}\n\nPlan: @{plan_01_path}\nProject state: @.planning/STATE.md", subagent_type="gsd-executor")
234
+ Task(prompt="Execute plan at {plan_02_path}\n\nPlan: @{plan_02_path}\nProject state: @.planning/STATE.md", subagent_type="gsd-executor")
235
+ Task(prompt="Execute plan at {plan_03_path}\n\nPlan: @{plan_03_path}\nProject state: @.planning/STATE.md", subagent_type="gsd-executor")
80
236
  ```
81
237
 
82
- All three run in parallel. task tool blocks until all complete.
238
+ All three run in parallel. Task tool blocks until all complete.
83
239
 
84
- **No polling.** No background agents.
240
+ **No polling.** No background agents. No TaskOutput loops.
85
241
  </wave_execution>
86
242
 
87
243
  <checkpoint_handling>
88
- Plans with `autonomous: false` in frontmatter have checkpoints:
89
- - Run in their assigned wave (can be parallel with other plans)
90
- - Pause at checkpoint, return to orchestrator
91
- - Orchestrator presents checkpoint to user
92
- - User responds, orchestrator resumes agent
244
+ Plans with `autonomous: false` have checkpoints. The execute-phase.md workflow handles the full checkpoint flow:
245
+ - Subagent pauses at checkpoint, returns structured state
246
+ - Orchestrator presents to user, collects response
247
+ - Spawns fresh continuation agent (not resume)
248
+
249
+ See `@~/.config/opencode/get-shit-done/workflows/execute-phase.md` step `checkpoint_handling` for complete details.
93
250
  </checkpoint_handling>
94
251
 
95
252
  <deviation_rules>
@@ -99,7 +256,6 @@ During execution, handle discoveries automatically:
99
256
  2. **Auto-add critical** - Security/correctness gaps, add and document
100
257
  3. **Auto-fix blockers** - Can't proceed without fix, do it and document
101
258
  4. **Ask about architectural** - Major structural changes, stop and ask user
102
- 5. **Log enhancements** - Nice-to-haves, log to ISSUES.md, continue
103
259
 
104
260
  Only rule 4 requires user intervention.
105
261
  </deviation_rules>
@@ -115,11 +271,18 @@ After each task completes:
115
271
 
116
272
  **Plan Metadata Commit:**
117
273
 
118
- After all tasks complete:
119
- 1. Stage planning artifacts only: PLAN.md, SUMMARY.md, STATE.md, ROADMAP.md
274
+ After all tasks in a plan complete:
275
+ 1. Stage plan artifacts only: PLAN.md, SUMMARY.md
120
276
  2. Commit with format: `docs({phase}-{plan}): complete [plan-name] plan`
121
277
  3. NO code files (already committed per-task)
122
278
 
279
+ **Phase Completion Commit:**
280
+
281
+ After all plans in phase complete (step 7):
282
+ 1. Stage: ROADMAP.md, STATE.md, REQUIREMENTS.md (if updated), VERIFICATION.md
283
+ 2. Commit with format: `docs({phase}): complete {phase-name} phase`
284
+ 3. Bundles all phase-level state updates in one commit
285
+
123
286
  **NEVER use:**
124
287
  - `git add .`
125
288
  - `git add -A`
@@ -131,7 +294,10 @@ After all tasks complete:
131
294
  <success_criteria>
132
295
  - [ ] All incomplete plans in phase executed
133
296
  - [ ] Each plan has SUMMARY.md
297
+ - [ ] Phase goal verified (must_haves checked against codebase)
298
+ - [ ] VERIFICATION.md created in phase directory
134
299
  - [ ] STATE.md reflects phase completion
135
300
  - [ ] ROADMAP.md updated
301
+ - [ ] REQUIREMENTS.md updated (phase requirements marked Complete)
136
302
  - [ ] User informed of next steps
137
303
  </success_criteria>