gsd-opencode 1.10.2 → 1.20.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 (164) hide show
  1. package/agents/gsd-codebase-mapper.md +29 -3
  2. package/agents/gsd-debugger.md +19 -21
  3. package/agents/gsd-executor.md +213 -528
  4. package/agents/gsd-integration-checker.md +20 -0
  5. package/agents/gsd-phase-researcher.md +189 -267
  6. package/agents/gsd-plan-checker.md +278 -279
  7. package/agents/gsd-planner.md +299 -490
  8. package/agents/gsd-project-researcher.md +103 -345
  9. package/agents/gsd-research-synthesizer.md +5 -22
  10. package/agents/gsd-roadmapper.md +43 -6
  11. package/agents/gsd-verifier.md +158 -377
  12. package/{lib → bin/dm/lib}/constants.js +10 -3
  13. package/{src → bin/dm/src}/commands/install.js +5 -4
  14. package/{src → bin/dm/src}/commands/uninstall.js +3 -1
  15. package/{src → bin/dm/src}/services/backup-manager.js +1 -1
  16. package/{src → bin/dm/src}/services/config.js +1 -1
  17. package/{src → bin/dm/src}/services/file-ops.js +20 -4
  18. package/{src → bin/dm/src}/services/health-checker.js +3 -1
  19. package/{src → bin/dm/src}/services/repair-service.js +3 -1
  20. package/{src → bin/dm/src}/services/settings.js +1 -1
  21. package/{src → bin/dm/src}/services/update-service.js +2 -2
  22. package/bin/gsd-install.js +0 -0
  23. package/bin/gsd.js +9 -9
  24. package/commands/gsd/gsd-add-phase.md +43 -0
  25. package/commands/gsd/gsd-add-todo.md +47 -0
  26. package/commands/gsd/gsd-audit-milestone.md +36 -0
  27. package/commands/gsd/gsd-check-todos.md +45 -0
  28. package/commands/gsd/gsd-cleanup.md +18 -0
  29. package/commands/gsd/{complete-milestone.md → gsd-complete-milestone.md} +1 -1
  30. package/commands/gsd/{debug.md → gsd-debug.md} +16 -21
  31. package/commands/gsd/{discuss-phase.md → gsd-discuss-phase.md} +6 -9
  32. package/commands/gsd/gsd-execute-phase.md +41 -0
  33. package/commands/gsd/gsd-health.md +22 -0
  34. package/commands/gsd/gsd-help.md +22 -0
  35. package/commands/gsd/gsd-insert-phase.md +32 -0
  36. package/commands/gsd/gsd-join-discord.md +18 -0
  37. package/commands/gsd/{list-phase-assumptions.md → gsd-list-phase-assumptions.md} +3 -7
  38. package/commands/gsd/{map-codebase.md → gsd-map-codebase.md} +3 -3
  39. package/commands/gsd/gsd-new-milestone.md +44 -0
  40. package/commands/gsd/gsd-new-project.md +42 -0
  41. package/commands/gsd/gsd-pause-work.md +38 -0
  42. package/commands/gsd/gsd-plan-milestone-gaps.md +34 -0
  43. package/commands/gsd/gsd-plan-phase.md +44 -0
  44. package/commands/gsd/gsd-progress.md +24 -0
  45. package/commands/gsd/gsd-quick.md +41 -0
  46. package/commands/gsd/gsd-reapply-patches.md +119 -0
  47. package/commands/gsd/gsd-remove-phase.md +31 -0
  48. package/commands/gsd/{research-phase.md → gsd-research-phase.md} +38 -49
  49. package/commands/gsd/{resume-work.md → gsd-resume-work.md} +2 -2
  50. package/commands/gsd/gsd-set-profile.md +34 -0
  51. package/commands/gsd/gsd-settings.md +36 -0
  52. package/commands/gsd/gsd-update.md +37 -0
  53. package/commands/gsd/gsd-verify-work.md +38 -0
  54. package/get-shit-done/bin/gsd-tools.cjs +553 -0
  55. package/get-shit-done/bin/gsd-tools.test.cjs +2346 -0
  56. package/get-shit-done/bin/lib/commands.cjs +556 -0
  57. package/get-shit-done/bin/lib/config.cjs +162 -0
  58. package/get-shit-done/bin/lib/core.cjs +377 -0
  59. package/get-shit-done/bin/lib/frontmatter.cjs +299 -0
  60. package/get-shit-done/bin/lib/init.cjs +694 -0
  61. package/get-shit-done/bin/lib/milestone.cjs +215 -0
  62. package/get-shit-done/bin/lib/phase.cjs +877 -0
  63. package/get-shit-done/bin/lib/roadmap.cjs +298 -0
  64. package/get-shit-done/bin/lib/state.cjs +490 -0
  65. package/get-shit-done/bin/lib/template.cjs +222 -0
  66. package/get-shit-done/bin/lib/verify.cjs +772 -0
  67. package/get-shit-done/references/checkpoints.md +62 -364
  68. package/get-shit-done/references/decimal-phase-calculation.md +65 -0
  69. package/get-shit-done/references/git-integration.md +10 -16
  70. package/get-shit-done/references/git-planning-commit.md +38 -0
  71. package/get-shit-done/references/model-profile-resolution.md +34 -0
  72. package/get-shit-done/references/model-profiles.md +54 -66
  73. package/get-shit-done/references/phase-argument-parsing.md +61 -0
  74. package/get-shit-done/references/planning-config.md +112 -10
  75. package/get-shit-done/references/questioning.md +4 -0
  76. package/get-shit-done/references/ui-brand.md +1 -1
  77. package/get-shit-done/templates/UAT.md +1 -1
  78. package/get-shit-done/templates/VALIDATION.md +104 -0
  79. package/get-shit-done/templates/codebase/structure.md +6 -6
  80. package/get-shit-done/templates/config.json +37 -0
  81. package/get-shit-done/templates/context.md +2 -10
  82. package/get-shit-done/templates/continue-here.md +6 -6
  83. package/get-shit-done/templates/debug-subagent-prompt.md +2 -2
  84. package/get-shit-done/templates/discovery.md +6 -6
  85. package/get-shit-done/templates/milestone-archive.md +3 -3
  86. package/get-shit-done/templates/phase-prompt.md +9 -7
  87. package/get-shit-done/templates/planner-subagent-prompt.md +6 -6
  88. package/get-shit-done/templates/research-project/ARCHITECTURE.md +1 -1
  89. package/get-shit-done/templates/research.md +29 -6
  90. package/get-shit-done/templates/roadmap.md +1 -1
  91. package/get-shit-done/templates/state.md +0 -30
  92. package/get-shit-done/templates/summary-complex.md +59 -0
  93. package/get-shit-done/templates/summary-minimal.md +41 -0
  94. package/get-shit-done/templates/summary-standard.md +48 -0
  95. package/get-shit-done/templates/summary.md +16 -37
  96. package/get-shit-done/templates/user-setup.md +1 -13
  97. package/get-shit-done/templates/verification-report.md +5 -5
  98. package/get-shit-done/workflows/add-phase.md +111 -0
  99. package/{commands/gsd → get-shit-done/workflows}/add-todo.md +24 -60
  100. package/{commands/gsd → get-shit-done/workflows}/audit-milestone.md +83 -63
  101. package/{commands/gsd → get-shit-done/workflows}/check-todos.md +21 -73
  102. package/get-shit-done/workflows/cleanup.md +152 -0
  103. package/get-shit-done/workflows/complete-milestone.md +251 -312
  104. package/get-shit-done/workflows/diagnose-issues.md +6 -31
  105. package/get-shit-done/workflows/discovery-phase.md +11 -11
  106. package/get-shit-done/workflows/discuss-phase.md +156 -49
  107. package/get-shit-done/workflows/execute-phase.md +238 -396
  108. package/get-shit-done/workflows/execute-plan.md +180 -1609
  109. package/get-shit-done/workflows/health.md +156 -0
  110. package/{commands/gsd → get-shit-done/workflows}/help.md +33 -35
  111. package/get-shit-done/workflows/insert-phase.md +129 -0
  112. package/get-shit-done/workflows/list-phase-assumptions.md +3 -3
  113. package/get-shit-done/workflows/map-codebase.md +73 -80
  114. package/get-shit-done/workflows/new-milestone.md +382 -0
  115. package/{commands/gsd → get-shit-done/workflows}/new-project.md +281 -234
  116. package/get-shit-done/workflows/oc-set-profile.md +320 -0
  117. package/{commands/gsd → get-shit-done/workflows}/pause-work.md +31 -43
  118. package/{commands/gsd → get-shit-done/workflows}/plan-milestone-gaps.md +29 -50
  119. package/get-shit-done/workflows/plan-phase.md +478 -0
  120. package/{commands/gsd → get-shit-done/workflows}/progress.md +64 -47
  121. package/get-shit-done/workflows/quick.md +453 -0
  122. package/get-shit-done/workflows/remove-phase.md +154 -0
  123. package/get-shit-done/workflows/research-phase.md +73 -0
  124. package/get-shit-done/workflows/resume-project.md +17 -26
  125. package/get-shit-done/workflows/set-profile.md +80 -0
  126. package/get-shit-done/workflows/settings.md +213 -0
  127. package/get-shit-done/workflows/transition.md +84 -104
  128. package/{commands/gsd → get-shit-done/workflows}/update.md +70 -28
  129. package/get-shit-done/workflows/verify-phase.md +106 -492
  130. package/get-shit-done/workflows/verify-work.md +26 -53
  131. package/package.json +7 -4
  132. package/rules/gsd-oc-work-hard.md +36 -0
  133. package/skills/gsd-oc-select-model/SKILL.md +348 -0
  134. package/skills/gsd-oc-select-model/scripts/select-models.cjs +268 -0
  135. package/agents/gsd-set-model.md +0 -287
  136. package/agents/gsd-set-profile.md +0 -239
  137. package/agents/gsd-settings.md +0 -749
  138. package/bin/install.js +0 -323
  139. package/commands/gsd/add-phase.md +0 -207
  140. package/commands/gsd/execute-phase.md +0 -339
  141. package/commands/gsd/insert-phase.md +0 -227
  142. package/commands/gsd/new-milestone.md +0 -721
  143. package/commands/gsd/plan-phase.md +0 -525
  144. package/commands/gsd/quick.md +0 -309
  145. package/commands/gsd/remove-phase.md +0 -349
  146. package/commands/gsd/set-model.md +0 -77
  147. package/commands/gsd/set-profile.md +0 -46
  148. package/commands/gsd/settings.md +0 -33
  149. package/commands/gsd/verify-work.md +0 -219
  150. package/commands/gsd/whats-new.md +0 -124
  151. /package/{src → bin/dm/src}/commands/check.js +0 -0
  152. /package/{src → bin/dm/src}/commands/config.js +0 -0
  153. /package/{src → bin/dm/src}/commands/list.js +0 -0
  154. /package/{src → bin/dm/src}/commands/repair.js +0 -0
  155. /package/{src → bin/dm/src}/commands/update.js +0 -0
  156. /package/{src → bin/dm/src}/services/manifest-manager.js +0 -0
  157. /package/{src → bin/dm/src}/services/migration-service.js +0 -0
  158. /package/{src → bin/dm/src}/services/scope-manager.js +0 -0
  159. /package/{src → bin/dm/src}/services/structure-detector.js +0 -0
  160. /package/{src → bin/dm/src}/utils/hash.js +0 -0
  161. /package/{src → bin/dm/src}/utils/interactive.js +0 -0
  162. /package/{src → bin/dm/src}/utils/logger.js +0 -0
  163. /package/{src → bin/dm/src}/utils/npm-registry.js +0 -0
  164. /package/{src → bin/dm/src}/utils/path-resolver.js +0 -0
@@ -0,0 +1,478 @@
1
+ <purpose>
2
+ Create executable phase prompts (PLAN.md files) for a roadmap phase with integrated research and verification. Default flow: Research (if needed) -> Plan -> Verify -> Done. Orchestrates gsd-phase-researcher, gsd-planner, and gsd-plan-checker agents with a revision loop (max 3 iterations).
3
+ </purpose>
4
+
5
+ <required_reading>
6
+ read all files referenced by the invoking prompt's execution_context before starting.
7
+
8
+ @~/.config/opencode/get-shit-done/references/ui-brand.md
9
+ </required_reading>
10
+
11
+ <process>
12
+
13
+ ## 1. Initialize
14
+
15
+ Load all context in one call (paths only to minimize orchestrator context):
16
+
17
+ ```bash
18
+ INIT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs init plan-phase "$PHASE")
19
+ ```
20
+
21
+ Parse JSON for: `researcher_model`, `planner_model`, `checker_model`, `research_enabled`, `plan_checker_enabled`, `nyquist_validation_enabled`, `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `has_research`, `has_context`, `has_plans`, `plan_count`, `planning_exists`, `roadmap_exists`.
22
+
23
+ **File paths (for <files_to_read> blocks):** `state_path`, `roadmap_path`, `requirements_path`, `context_path`, `research_path`, `verification_path`, `uat_path`. These are null if files don't exist.
24
+
25
+ **If `planning_exists` is false:** Error — run `/gsd-new-project` first.
26
+
27
+ ## 2. Parse and Normalize Arguments
28
+
29
+ Extract from $ARGUMENTS: phase number (integer or decimal like `2.1`), flags (`--research`, `--skip-research`, `--gaps`, `--skip-verify`).
30
+
31
+ **If no phase number:** Detect next unplanned phase from roadmap.
32
+
33
+ **If `phase_found` is false:** Validate phase exists in ROADMAP.md. If valid, create the directory using `phase_slug` and `padded_phase` from init:
34
+ ```bash
35
+ mkdir -p ".planning/phases/${padded_phase}-${phase_slug}"
36
+ ```
37
+
38
+ **Existing artifacts from init:** `has_research`, `has_plans`, `plan_count`.
39
+
40
+ ## 3. Validate Phase
41
+
42
+ ```bash
43
+ PHASE_INFO=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "${PHASE}")
44
+ ```
45
+
46
+ **If `found` is false:** Error with available phases. **If `found` is true:** Extract `phase_number`, `phase_name`, `goal` from JSON.
47
+
48
+ ## 4. Load CONTEXT.md
49
+
50
+ Check `context_path` from init JSON.
51
+
52
+ If `context_path` is not null, display: `Using phase context from: ${context_path}`
53
+
54
+ **If `context_path` is null (no CONTEXT.md exists):**
55
+
56
+ Use question:
57
+ - header: "No context"
58
+ - question: "No CONTEXT.md found for Phase {X}. Plans will use research and requirements only — your design preferences won't be included. Continue or capture context first?"
59
+ - options:
60
+ - "Continue without context" — Plan using research + requirements only
61
+ - "Run discuss-phase first" — Capture design decisions before planning
62
+
63
+ If "Continue without context": Proceed to step 5.
64
+ If "Run discuss-phase first": Display `/gsd-discuss-phase {X}` and exit workflow.
65
+
66
+ ## 5. Handle Research
67
+
68
+ **Skip if:** `--gaps` flag, `--skip-research` flag, or `research_enabled` is false (from init) without `--research` override.
69
+
70
+ **If `has_research` is true (from init) AND no `--research` flag:** Use existing, skip to step 6.
71
+
72
+ **If RESEARCH.md missing OR `--research` flag:**
73
+
74
+ Display banner:
75
+ ```
76
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
77
+ GSD ► RESEARCHING PHASE {X}
78
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
79
+
80
+ ◆ Spawning researcher...
81
+ ```
82
+
83
+ ### Spawn gsd-phase-researcher
84
+
85
+ ```bash
86
+ PHASE_DESC=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "${PHASE}" | jq -r '.section')
87
+ PHASE_REQ_IDS=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "${PHASE}" | jq -r '.section // empty' | grep -i "Requirements:" | head -1 | sed 's/.*Requirements:\*\*\s*//' | sed 's/[\[\]]//g' | tr ',' '\n' | sed 's/^ *//;s/ *$//' | grep -v '^$' | tr '\n' ',' | sed 's/,$//')
88
+ ```
89
+
90
+ Research prompt:
91
+
92
+ ```markdown
93
+ <objective>
94
+ Research how to implement Phase {phase_number}: {phase_name}
95
+ Answer: "What do I need to know to PLAN this phase well?"
96
+ </objective>
97
+
98
+ <files_to_read>
99
+ - {context_path} (USER DECISIONS from /gsd-discuss-phase)
100
+ - {requirements_path} (Project requirements)
101
+ - {state_path} (Project decisions and history)
102
+ </files_to_read>
103
+
104
+ <additional_context>
105
+ **Phase description:** {phase_description}
106
+ **Phase requirement IDs (MUST address):** {phase_req_ids}
107
+
108
+ **Project instructions:** read ./OPENCODE.md if exists — follow project-specific guidelines
109
+ **Project skills:** Check .agents/skills/ directory (if exists) — read SKILL.md files, research should account for project skill patterns
110
+ </additional_context>
111
+
112
+ <output>
113
+ write to: {phase_dir}/{phase_num}-RESEARCH.md
114
+ </output>
115
+ ```
116
+
117
+ ```
118
+ task(
119
+ prompt="First, read ~/.config/opencode/agents/gsd-phase-researcher.md for your role and instructions.\n\n" + research_prompt,
120
+ subagent_type="task",
121
+ model="{researcher_model}",
122
+ description="Research Phase {phase}"
123
+ )
124
+ ```
125
+
126
+ ### Handle Researcher Return
127
+
128
+ - **`## RESEARCH COMPLETE`:** Display confirmation, continue to step 6
129
+ - **`## RESEARCH BLOCKED`:** Display blocker, offer: 1) Provide context, 2) Skip research, 3) Abort
130
+
131
+ ## 5.5. Create Validation Strategy (if Nyquist enabled)
132
+
133
+ **Skip if:** `nyquist_validation_enabled` is false from INIT JSON.
134
+
135
+ After researcher completes, check if RESEARCH.md contains a Validation Architecture section:
136
+
137
+ ```bash
138
+ grep -l "## Validation Architecture" "${PHASE_DIR}"/*-RESEARCH.md 2>/dev/null
139
+ ```
140
+
141
+ **If found:**
142
+ 1. read validation template from `~/.config/opencode/get-shit-done/templates/VALIDATION.md`
143
+ 2. write to `${PHASE_DIR}/${PADDED_PHASE}-VALIDATION.md`
144
+ 3. Fill frontmatter: replace `{N}` with phase number, `{phase-slug}` with phase slug, `{date}` with current date
145
+ 4. If `commit_docs` is true:
146
+ ```bash
147
+ node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit-docs "docs(phase-${PHASE}): add validation strategy"
148
+ ```
149
+
150
+ **If not found (and nyquist enabled):** Display warning:
151
+ ```
152
+ ⚠ Nyquist validation enabled but researcher did not produce a Validation Architecture section.
153
+ Continuing without validation strategy. Plans may fail Dimension 8 check.
154
+ ```
155
+
156
+ ## 6. Check Existing Plans
157
+
158
+ ```bash
159
+ ls "${PHASE_DIR}"/*-PLAN.md 2>/dev/null
160
+ ```
161
+
162
+ **If exists:** Offer: 1) Add more plans, 2) View existing, 3) Replan from scratch.
163
+
164
+ ## 7. Use Context Paths from INIT
165
+
166
+ Extract from INIT JSON:
167
+
168
+ ```bash
169
+ STATE_PATH=$(echo "$INIT" | jq -r '.state_path // empty')
170
+ ROADMAP_PATH=$(echo "$INIT" | jq -r '.roadmap_path // empty')
171
+ REQUIREMENTS_PATH=$(echo "$INIT" | jq -r '.requirements_path // empty')
172
+ RESEARCH_PATH=$(echo "$INIT" | jq -r '.research_path // empty')
173
+ VERIFICATION_PATH=$(echo "$INIT" | jq -r '.verification_path // empty')
174
+ UAT_PATH=$(echo "$INIT" | jq -r '.uat_path // empty')
175
+ CONTEXT_PATH=$(echo "$INIT" | jq -r '.context_path // empty')
176
+ ```
177
+
178
+ ## 8. Spawn gsd-planner Agent
179
+
180
+ Display banner:
181
+ ```
182
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
183
+ GSD ► PLANNING PHASE {X}
184
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
185
+
186
+ ◆ Spawning planner...
187
+ ```
188
+
189
+ Planner prompt:
190
+
191
+ ```markdown
192
+ <planning_context>
193
+ **Phase:** {phase_number}
194
+ **Mode:** {standard | gap_closure}
195
+
196
+ <files_to_read>
197
+ - {state_path} (Project State)
198
+ - {roadmap_path} (Roadmap)
199
+ - {requirements_path} (Requirements)
200
+ - {context_path} (USER DECISIONS from /gsd-discuss-phase)
201
+ - {research_path} (Technical Research)
202
+ - {verification_path} (Verification Gaps - if --gaps)
203
+ - {uat_path} (UAT Gaps - if --gaps)
204
+ </files_to_read>
205
+
206
+ **Phase requirement IDs (every ID MUST appear in a plan's `requirements` field):** {phase_req_ids}
207
+
208
+ **Project instructions:** read ./OPENCODE.md if exists — follow project-specific guidelines
209
+ **Project skills:** Check .agents/skills/ directory (if exists) — read SKILL.md files, plans should account for project skill rules
210
+ </planning_context>
211
+
212
+ <downstream_consumer>
213
+ Output consumed by /gsd-execute-phase. Plans need:
214
+ - Frontmatter (wave, depends_on, files_modified, autonomous)
215
+ - Tasks in XML format
216
+ - Verification criteria
217
+ - must_haves for goal-backward verification
218
+ </downstream_consumer>
219
+
220
+ <quality_gate>
221
+ - [ ] PLAN.md files created in phase directory
222
+ - [ ] Each plan has valid frontmatter
223
+ - [ ] Tasks are specific and actionable
224
+ - [ ] Dependencies correctly identified
225
+ - [ ] Waves assigned for parallel execution
226
+ - [ ] must_haves derived from phase goal
227
+ </quality_gate>
228
+ ```
229
+
230
+ ```
231
+ task(
232
+ prompt="First, read ~/.config/opencode/agents/gsd-planner.md for your role and instructions.\n\n" + filled_prompt,
233
+ subagent_type="task",
234
+ model="{planner_model}",
235
+ description="Plan Phase {phase}"
236
+ )
237
+ ```
238
+
239
+ ## 9. Handle Planner Return
240
+
241
+ - **`## PLANNING COMPLETE`:** Display plan count. If `--skip-verify` or `plan_checker_enabled` is false (from init): skip to step 13. Otherwise: step 10.
242
+ - **`## CHECKPOINT REACHED`:** Present to user, get response, spawn continuation (step 12)
243
+ - **`## PLANNING INCONCLUSIVE`:** Show attempts, offer: Add context / Retry / Manual
244
+
245
+ ## 10. Spawn gsd-plan-checker Agent
246
+
247
+ Display banner:
248
+ ```
249
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
250
+ GSD ► VERIFYING PLANS
251
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
252
+
253
+ ◆ Spawning plan checker...
254
+ ```
255
+
256
+ Checker prompt:
257
+
258
+ ```markdown
259
+ <verification_context>
260
+ **Phase:** {phase_number}
261
+ **Phase Goal:** {goal from ROADMAP}
262
+
263
+ <files_to_read>
264
+ - {PHASE_DIR}/*-PLAN.md (Plans to verify)
265
+ - {roadmap_path} (Roadmap)
266
+ - {requirements_path} (Requirements)
267
+ - {context_path} (USER DECISIONS from /gsd-discuss-phase)
268
+ - {research_path} (Technical Research — includes Validation Architecture)
269
+ </files_to_read>
270
+
271
+ **Phase requirement IDs (MUST ALL be covered):** {phase_req_ids}
272
+
273
+ **Project instructions:** read ./OPENCODE.md if exists — verify plans honor project guidelines
274
+ **Project skills:** Check .agents/skills/ directory (if exists) — verify plans account for project skill rules
275
+ </verification_context>
276
+
277
+ <expected_output>
278
+ - ## VERIFICATION PASSED — all checks pass
279
+ - ## ISSUES FOUND — structured issue list
280
+ </expected_output>
281
+ ```
282
+
283
+ ```
284
+ task(
285
+ prompt=checker_prompt,
286
+ subagent_type="gsd-plan-checker",
287
+ model="{checker_model}",
288
+ description="Verify Phase {phase} plans"
289
+ )
290
+ ```
291
+
292
+ ## 11. Handle Checker Return
293
+
294
+ - **`## VERIFICATION PASSED`:** Display confirmation, proceed to step 13.
295
+ - **`## ISSUES FOUND`:** Display issues, check iteration count, proceed to step 12.
296
+
297
+ ## 12. Revision Loop (Max 3 Iterations)
298
+
299
+ Track `iteration_count` (starts at 1 after initial plan + check).
300
+
301
+ **If iteration_count < 3:**
302
+
303
+ Display: `Sending back to planner for revision... (iteration {N}/3)`
304
+
305
+ Revision prompt:
306
+
307
+ ```markdown
308
+ <revision_context>
309
+ **Phase:** {phase_number}
310
+ **Mode:** revision
311
+
312
+ <files_to_read>
313
+ - {PHASE_DIR}/*-PLAN.md (Existing plans)
314
+ - {context_path} (USER DECISIONS from /gsd-discuss-phase)
315
+ </files_to_read>
316
+
317
+ **Checker issues:** {structured_issues_from_checker}
318
+ </revision_context>
319
+
320
+ <instructions>
321
+ Make targeted updates to address checker issues.
322
+ Do NOT replan from scratch unless issues are fundamental.
323
+ Return what changed.
324
+ </instructions>
325
+ ```
326
+
327
+ ```
328
+ task(
329
+ prompt="First, read ~/.config/opencode/agents/gsd-planner.md for your role and instructions.\n\n" + revision_prompt,
330
+ subagent_type="task",
331
+ model="{planner_model}",
332
+ description="Revise Phase {phase} plans"
333
+ )
334
+ ```
335
+
336
+ After planner returns -> spawn checker again (step 10), increment iteration_count.
337
+
338
+ **If iteration_count >= 3:**
339
+
340
+ Display: `Max iterations reached. {N} issues remain:` + issue list
341
+
342
+ Offer: 1) Force proceed, 2) Provide guidance and retry, 3) Abandon
343
+
344
+ ## 13. Present Final Status
345
+
346
+ Route to `<offer_next>` OR `auto_advance` depending on flags/config.
347
+
348
+ ## 14. Auto-Advance Check
349
+
350
+ Check for auto-advance trigger:
351
+
352
+ 1. Parse `--auto` flag from $ARGUMENTS
353
+ 2. read `workflow.auto_advance` from config:
354
+ ```bash
355
+ AUTO_CFG=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs config-get workflow.auto_advance 2>/dev/null || echo "false")
356
+ ```
357
+
358
+ **If `--auto` flag present OR `AUTO_CFG` is true:**
359
+
360
+ Display banner:
361
+ ```
362
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
363
+ GSD ► AUTO-ADVANCING TO EXECUTE
364
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
365
+
366
+ Plans ready. Spawning execute-phase...
367
+ ```
368
+
369
+ Spawn execute-phase as task with direct workflow file reference (do NOT use skill tool — Skills don't resolve inside task subagents):
370
+ ```
371
+ task(
372
+ prompt="
373
+ <objective>
374
+ You are the execute-phase orchestrator. Execute all plans for Phase ${PHASE}: ${PHASE_NAME}.
375
+ </objective>
376
+
377
+ <execution_context>
378
+ @~/.config/opencode/get-shit-done/workflows/execute-phase.md
379
+ @~/.config/opencode/get-shit-done/references/checkpoints.md
380
+ @~/.config/opencode/get-shit-done/references/tdd.md
381
+ @~/.config/opencode/get-shit-done/references/model-profile-resolution.md
382
+ </execution_context>
383
+
384
+ <arguments>
385
+ PHASE=${PHASE}
386
+ ARGUMENTS='${PHASE} --auto --no-transition'
387
+ </arguments>
388
+
389
+ <instructions>
390
+ 1. read execute-phase.md from execution_context for your complete workflow
391
+ 2. Follow ALL steps: initialize, handle_branching, validate_phase, discover_and_group_plans, execute_waves, aggregate_results, close_parent_artifacts, verify_phase_goal, update_roadmap
392
+ 3. The --no-transition flag means: after verification + roadmap update, STOP and return status. Do NOT run transition.md.
393
+ 4. When spawning executor agents, use subagent_type='gsd-executor' with the existing @file pattern from the workflow
394
+ 5. When spawning verifier agents, use subagent_type='gsd-verifier'
395
+ 6. Preserve the classifyHandoffIfNeeded workaround (spot-check on that specific error)
396
+ 7. Do NOT use the skill tool or /gsd- commands
397
+ </instructions>
398
+ ",
399
+ subagent_type="task",
400
+ description="Execute Phase ${PHASE}"
401
+ )
402
+ ```
403
+
404
+ **Handle execute-phase return:**
405
+ - **PHASE COMPLETE** → Display final summary:
406
+ ```
407
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
408
+ GSD ► PHASE ${PHASE} COMPLETE ✓
409
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
410
+
411
+ Auto-advance pipeline finished.
412
+
413
+ Next: /gsd-discuss-phase ${NEXT_PHASE} --auto
414
+ ```
415
+ - **GAPS FOUND / VERIFICATION FAILED** → Display result, stop chain:
416
+ ```
417
+ Auto-advance stopped: Execution needs review.
418
+
419
+ Review the output above and continue manually:
420
+ /gsd-execute-phase ${PHASE}
421
+ ```
422
+
423
+ **If neither `--auto` nor config enabled:**
424
+ Route to `<offer_next>` (existing behavior).
425
+
426
+ </process>
427
+
428
+ <offer_next>
429
+ Output this markdown directly (not as a code block):
430
+
431
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
432
+ GSD ► PHASE {X} PLANNED ✓
433
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
434
+
435
+ **Phase {X}: {Name}** — {N} plan(s) in {M} wave(s)
436
+
437
+ | Wave | Plans | What it builds |
438
+ |------|-------|----------------|
439
+ | 1 | 01, 02 | [objectives] |
440
+ | 2 | 03 | [objective] |
441
+
442
+ Research: {Completed | Used existing | Skipped}
443
+ Verification: {Passed | Passed with override | Skipped}
444
+
445
+ ───────────────────────────────────────────────────────────────
446
+
447
+ ## ▶ Next Up
448
+
449
+ **Execute Phase {X}** — run all {N} plans
450
+
451
+ /gsd-execute-phase {X}
452
+
453
+ */new first → fresh context window*
454
+
455
+ ───────────────────────────────────────────────────────────────
456
+
457
+ **Also available:**
458
+ - cat .planning/phases/{phase-dir}/*-PLAN.md — review plans
459
+ - /gsd-plan-phase {X} --research — re-research first
460
+
461
+ ───────────────────────────────────────────────────────────────
462
+ </offer_next>
463
+
464
+ <success_criteria>
465
+ - [ ] .planning/ directory validated
466
+ - [ ] Phase validated against roadmap
467
+ - [ ] Phase directory created if needed
468
+ - [ ] CONTEXT.md loaded early (step 4) and passed to ALL agents
469
+ - [ ] Research completed (unless --skip-research or --gaps or exists)
470
+ - [ ] gsd-phase-researcher spawned with CONTEXT.md
471
+ - [ ] Existing plans checked
472
+ - [ ] gsd-planner spawned with CONTEXT.md + RESEARCH.md
473
+ - [ ] Plans created (PLANNING COMPLETE or CHECKPOINT handled)
474
+ - [ ] gsd-plan-checker spawned with CONTEXT.md
475
+ - [ ] Verification passed OR user override OR max iterations with user decision
476
+ - [ ] User sees status between agent spawns
477
+ - [ ] User knows next steps
478
+ </success_criteria>
@@ -1,33 +1,23 @@
1
- ---
2
- name: gsd-progress
3
- description: Check project progress, show context, and route to next action (execute or plan)
4
- tools:
5
- - read
6
- - bash
7
- - grep
8
- - glob
9
- - Command
10
- ---
11
-
12
- <objective>
13
- Check project progress, summarize recent work and what's ahead, then intelligently route to the next action - either executing an existing plan or creating the next one.
14
-
15
- Provides situational awareness before continuing work.
16
- </objective>
1
+ <purpose>
2
+ Check project progress, summarize recent work and what's ahead, then intelligently route to the next action — either executing an existing plan or creating the next one. Provides situational awareness before continuing work.
3
+ </purpose>
17
4
 
5
+ <required_reading>
6
+ read all files referenced by the invoking prompt's execution_context before starting.
7
+ </required_reading>
18
8
 
19
9
  <process>
20
10
 
21
- <step name="verify">
22
- **Verify planning structure exists:**
23
-
24
- Use bash (not glob) to check—glob respects .gitignore but .planning/ is often gitignored:
11
+ <step name="init_context">
12
+ **Load progress context (paths only):**
25
13
 
26
14
  ```bash
27
- test -d .planning && echo "exists" || echo "missing"
15
+ INIT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs init progress)
28
16
  ```
29
17
 
30
- If no `.planning/` directory:
18
+ Extract from init JSON: `project_exists`, `roadmap_exists`, `state_exists`, `phases`, `current_phase`, `next_phase`, `milestone_version`, `completed_count`, `phase_count`, `paused_at`, `state_path`, `roadmap_path`, `project_path`, `config_path`.
19
+
20
+ If `project_exists` is false (no `.planning/` directory):
31
21
 
32
22
  ```
33
23
  No planning structure found.
@@ -47,57 +37,84 @@ If missing both ROADMAP.md and PROJECT.md: suggest `/gsd-new-project`.
47
37
  </step>
48
38
 
49
39
  <step name="load">
50
- **Load full project context:**
40
+ **Use structured extraction from gsd-tools:**
51
41
 
52
- - read `.planning/STATE.md` for living memory (position, decisions, issues)
53
- - read `.planning/ROADMAP.md` for phase structure and objectives
54
- - read `.planning/PROJECT.md` for current state (What This Is, Core Value, Requirements)
55
- - read `.planning/config.json` for settings (model_profile, workflow toggles)
56
- </step>
42
+ Instead of reading full files, use targeted tools to get only the data needed for the report:
43
+ - `ROADMAP=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs roadmap analyze)`
44
+ - `STATE=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs state-snapshot)`
45
+
46
+ This minimizes orchestrator context usage.
47
+ </step>
48
+
49
+ <step name="analyze_roadmap">
50
+ **Get comprehensive roadmap analysis (replaces manual parsing):**
51
+
52
+ ```bash
53
+ ROADMAP=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs roadmap analyze)
54
+ ```
55
+
56
+ This returns structured JSON with:
57
+ - All phases with disk status (complete/partial/planned/empty/no_directory)
58
+ - Goal and dependencies per phase
59
+ - Plan and summary counts per phase
60
+ - Aggregated stats: total plans, summaries, progress percent
61
+ - Current and next phase identification
62
+
63
+ Use this instead of manually reading/parsing ROADMAP.md.
64
+ </step>
57
65
 
58
66
  <step name="recent">
59
67
  **Gather recent work context:**
60
68
 
61
69
  - Find the 2-3 most recent SUMMARY.md files
62
- - Extract from each: what was accomplished, key decisions, any issues logged
70
+ - Use `summary-extract` for efficient parsing:
71
+ ```bash
72
+ node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs summary-extract <path> --fields one_liner
73
+ ```
63
74
  - This shows "what we've been working on"
64
75
  </step>
65
76
 
66
77
  <step name="position">
67
- **Parse current position:**
78
+ **Parse current position from init context and roadmap analysis:**
68
79
 
69
- - From STATE.md: current phase, plan number, status
70
- - Calculate: total plans, completed plans, remaining plans
71
- - Note any blockers or concerns
72
- - Check for CONTEXT.md: For phases without PLAN.md files, check if `{phase}-CONTEXT.md` exists in phase directory
73
- - Count pending todos: `ls .planning/todos/pending/*.md 2>/dev/null | wc -l`
80
+ - Use `current_phase` and `next_phase` from `$ROADMAP`
81
+ - Note `paused_at` if work was paused (from `$STATE`)
82
+ - Count pending todos: use `init todos` or `list-todos`
74
83
  - Check for active debug sessions: `ls .planning/debug/*.md 2>/dev/null | grep -v resolved | wc -l`
75
84
  </step>
76
85
 
77
86
  <step name="report">
78
- **Present rich status report:**
87
+ **Generate progress bar from gsd-tools, then present rich status report:**
88
+
89
+ ```bash
90
+ # Get formatted progress bar
91
+ PROGRESS_BAR=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs progress bar --raw)
92
+ ```
93
+
94
+ Present:
79
95
 
80
96
  ```
81
97
  # [Project Name]
82
98
 
83
- **Progress:** [████████░░] 8/10 plans complete
84
- **Profile:** [quality/balanced/budget]
99
+ **Progress:** {PROGRESS_BAR}
100
+ **Profile:** [simple/smart/custom]
85
101
 
86
102
  ## Recent Work
87
- - [Phase X, Plan Y]: [what was accomplished - 1 line]
88
- - [Phase X, Plan Z]: [what was accomplished - 1 line]
103
+ - [Phase X, Plan Y]: [what was accomplished - 1 line from summary-extract]
104
+ - [Phase X, Plan Z]: [what was accomplished - 1 line from summary-extract]
89
105
 
90
106
  ## Current Position
91
107
  Phase [N] of [total]: [phase-name]
92
108
  Plan [M] of [phase-total]: [status]
93
- CONTEXT: [✓ if CONTEXT.md exists | - if not]
109
+ CONTEXT: [✓ if has_context | - if not]
94
110
 
95
111
  ## Key Decisions Made
96
- - [decision 1 from STATE.md]
97
- - [decision 2]
112
+ - [extract from $STATE.decisions[]]
113
+ - [e.g. jq -r '.decisions[].decision' from state-snapshot]
98
114
 
99
115
  ## Blockers/Concerns
100
- - [any blockers or concerns from STATE.md]
116
+ - [extract from $STATE.blockers[]]
117
+ - [e.g. jq -r '.blockers[].text' from state-snapshot]
101
118
 
102
119
  ## Pending Todos
103
120
  - [count] pending — /gsd-check-todos to review
@@ -107,7 +124,7 @@ CONTEXT: [✓ if CONTEXT.md exists | - if not]
107
124
  (Only show this section if count > 0)
108
125
 
109
126
  ## What's Next
110
- [Next phase/plan objective from ROADMAP]
127
+ [Next phase/plan objective from roadmap analyze]
111
128
  ```
112
129
 
113
130
  </step>
@@ -173,7 +190,7 @@ read its `<objective>` section.
173
190
 
174
191
  **Route B: Phase needs planning**
175
192
 
176
- Check if `{phase}-CONTEXT.md` exists in phase directory.
193
+ Check if `{phase_num}-CONTEXT.md` exists in phase directory.
177
194
 
178
195
  **If CONTEXT.md exists:**
179
196
 
@@ -225,7 +242,7 @@ UAT.md exists with gaps (diagnosed issues). User needs to plan fixes.
225
242
 
226
243
  ## ⚠ UAT Gaps Found
227
244
 
228
- **{phase}-UAT.md** has {N} gaps requiring fixes.
245
+ **{phase_num}-UAT.md** has {N} gaps requiring fixes.
229
246
 
230
247
  `/gsd-plan-phase {phase} --gaps`
231
248