gsd-opencode 1.10.2 → 1.20.1

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,320 @@
1
+
2
+ <role>
3
+ You are executing the `/gsd-set-profile` command. Switch the project's active model profile (simple/smart/genius) with optional model reuse.
4
+
5
+ This command reads/writes:
6
+ - `.planning/config.json` — profile state (profile_type, models)
7
+ - `opencode.json` — agent model assignments (derived from profile)
8
+
9
+ Do NOT modify agent .md files. Profile switching updates `opencode.json` in the project root.
10
+ </role>
11
+
12
+ <context>
13
+ **Invocation styles:**
14
+
15
+ 1. No args (interactive wizard): `/gsd-set-profile`
16
+ 2. Positional with type: `/gsd-set-profile simple|smart|genius`
17
+ 3. With reuse flag: `/gsd-set-profile smart --reuse`
18
+
19
+ **Stage-to-agent mapping (11 agents):**
20
+
21
+ | Stage | Agents |
22
+ |--------------|--------|
23
+ | Planning | gsd-planner, gsd-plan-checker, gsd-phase-researcher, gsd-roadmapper, gsd-project-researcher, gsd-research-synthesizer, gsd-codebase-mapper |
24
+ | Execution | gsd-executor, gsd-debugger |
25
+ | Verification | gsd-verifier, gsd-integration-checker |
26
+
27
+ **Profile types:**
28
+
29
+ - **Simple**: 1 model total — all stages use same model
30
+ - **Smart**: 2 models — planning+execution share model, verification uses different
31
+ - **Genius**: 3 models — each stage can have different model
32
+
33
+ **Migration:** Old configs with `model_profile: quality / balanced / budget` are auto-migrated to genius profile.
34
+ </context>
35
+
36
+ <behavior>
37
+
38
+ ## Step 1: Load and validate config
39
+
40
+ read `.planning/config.json`. Handle these cases:
41
+
42
+ **Case A: File missing or invalid**
43
+ - Print: `Error: No GSD project found. Run /gsd-new-project first.`
44
+ - Stop.
45
+
46
+ **Case B: Legacy config (has model_profile but no profiles.profile_type)**
47
+ - Auto-migrate to genius profile
48
+ - Use OLD_PROFILE_MODEL_MAP to convert quality / balanced / budget → genius
49
+
50
+ **Case C: Current config**
51
+ - Use `profiles.profile_type` and `profiles.models`
52
+
53
+ **Also check `opencode.json`:**
54
+ - If missing, it will be created
55
+ - If exists, merge agent assignments (preserve other keys)
56
+
57
+
58
+ ## Step 3: Display current state
59
+
60
+ If profile exists:
61
+
62
+ ```
63
+ Active profile: {profile_type}
64
+
65
+ Current configuration:
66
+ | Stage | Model |
67
+ |--------------|-------|
68
+ | planning | {models.planning} |
69
+ | execution | {models.execution} |
70
+ | verification | {models.verification} |
71
+ ```
72
+
73
+ ## Step 4: Determine requested profile
74
+
75
+ **A) Check for positional argument:**
76
+ - If user typed `/gsd-set-profile simple|smart|genius`, use that as `newProfileType`
77
+
78
+ **B) Interactive picker (no args):**
79
+
80
+ Use question tool:
81
+
82
+ ```
83
+ header: "Profile Type"
84
+ question: "Select a profile type for model configuration"
85
+ options:
86
+ - label: "Simple"
87
+ description: "1 model for all gsd stages (easiest setup)"
88
+ - label: "Smart"
89
+ description: "2 models: advanced for planning & execution, cheaper for verification stages"
90
+ - label: "Genius"
91
+ description: "3 models: different model for planning, execution, or verification stages"
92
+ - label: "Cancel"
93
+ description: "Exit without changes"
94
+ ```
95
+
96
+ If Cancel selected, print cancellation message and stop.
97
+
98
+ **C) Invalid profile handling:**
99
+
100
+ If invalid profile name:
101
+ - Print: `Unknown profile type '{name}'. Valid options: simple, smart, genius`
102
+ - Fall back to interactive picker
103
+
104
+ ## Step 5: Handle --reuse flag
105
+
106
+ If `--reuse` flag present and current profile exists:
107
+
108
+ ```bash
109
+ node gsd-opencode/get-shit-done/bin/gsd-tools.cjs profile-switch {newProfileType} --reuse --raw
110
+ ```
111
+
112
+ Parse the reuse analysis:
113
+ - Shows which stages can reuse existing models
114
+ - Displays suggestions for each stage
115
+
116
+ Present to user:
117
+
118
+ ```
119
+ Model Reuse Analysis for {newProfileType} profile:
120
+
121
+ Current models:
122
+ - Planning: {current.planning}
123
+ - Execution: {current.execution}
124
+ - Verification: {current.verification}
125
+
126
+ Suggested reuse:
127
+ {reuse analysis from tool}
128
+
129
+ Use these suggestions? (yes/no)
130
+ ```
131
+
132
+ If yes, proceed with suggested models.
133
+ If no, run full model selection wizard.
134
+
135
+ ## Step 6: Model selection wizard
136
+
137
+ Based on profile type, prompt for models:
138
+
139
+ ### Simple Profile (1 model)
140
+
141
+ Use gsd-oc-select-model skill to select model for "Simple Profile - One model to rule them all".
142
+
143
+ Store selected model. All stages will use this model.
144
+
145
+ ### Smart Profile (2 models)
146
+
147
+ Use gsd-oc-select-model skill twice.
148
+
149
+ **First model** (planning + execution):
150
+
151
+ Use gsd-oc-select-model skill to select model for "Smart Profile - Planning & Execution"
152
+
153
+ **Second model** (verification):
154
+
155
+ Use gsd-oc-select-model skill to select model for "Smart Profile - Verification"
156
+
157
+ Store selected models.
158
+
159
+ Planning + Execution will use First model selected.
160
+ Verification will use Second model selected.
161
+
162
+
163
+ ### Genius Profile (3 models)
164
+
165
+ Use gsd-oc-select-model skill
166
+
167
+
168
+ **First model** (planning):
169
+
170
+ Use gsd-oc-select-model skill to select model for "Genius Profile - Planning"
171
+
172
+ **Second model** (execution)
173
+
174
+ Use gsd-oc-select-model skill to select model for "Genius Profile - Execution"
175
+
176
+ **Thrid model** (verification):
177
+
178
+ Use gsd-oc-select-model skill to select model for "Genius Profile - Verification"
179
+
180
+ Store selected models.
181
+
182
+ Planning will use First model selected.
183
+ Execution will use Second model selected.
184
+ Verification will use Third model selected.
185
+
186
+
187
+
188
+ ## Step 7: Validate selected models
189
+
190
+ Before writing files, validate models exist:
191
+
192
+ ```bash
193
+ opencode models | grep -q "^{model}$" && echo "valid" || echo "invalid"
194
+ ```
195
+
196
+ If any model invalid:
197
+ - Print error with list of missing models
198
+ - Stop. Do NOT write config files.
199
+
200
+ ## Step 8: Apply changes
201
+
202
+ ### Save config.json
203
+
204
+ Save config.json Or build and save manually:
205
+
206
+ ```json
207
+ {
208
+ "profiles": {
209
+ "profile_type": "{simple|smart|genius}",
210
+ "models": {
211
+ "planning": "{model}",
212
+ "execution": "{model}",
213
+ "verification": "{model}"
214
+ }
215
+ }
216
+ }
217
+ ```
218
+
219
+
220
+ ## Step 8: Check for changes
221
+
222
+ If no changes were made (all stages selected "Keep current"):
223
+ ```
224
+ No changes made to {targetProfile} profile.
225
+ ```
226
+ Stop.
227
+
228
+ ## Step 9: Save changes
229
+
230
+ Use the **write tool directly** to update files. Do NOT use bash, python, or other scripts—use native file writing.
231
+
232
+ 1. **Update .planning/config.json:**
233
+
234
+ - Set `config.profiles.presets[targetProfile].planning` to selected value
235
+ - Set `config.profiles.presets[targetProfile].execution` to selected value
236
+ - Set `config.profiles.presets[targetProfile].verification` to selected value
237
+ - write the config file (preserve all other keys)
238
+
239
+ 2. **Update opencode.json (only if targetProfile is active):**
240
+
241
+ Check if `config.profiles.active_profile === targetProfile`. If so, regenerate `opencode.json` with the new effective models.
242
+
243
+ Compute effective models (preset + overrides):
244
+ ```
245
+ overrides = config.profiles.genius_overrides[targetProfile] || {}
246
+ effective.planning = overrides.planning || newPreset.planning
247
+ effective.execution = overrides.execution || newPreset.execution
248
+ effective.verification = overrides.verification || newPreset.verification
249
+ ```
250
+
251
+ Build agent config:
252
+
253
+ ```json
254
+ {
255
+ "$schema": "https://opencode.ai/config.json",
256
+ "agent": {
257
+ "gsd-planner": { "model": "{effective.planning}" },
258
+ "gsd-plan-checker": { "model": "{effective.planning}" },
259
+ "gsd-phase-researcher": { "model": "{effective.planning}" },
260
+ "gsd-roadmapper": { "model": "{effective.planning}" },
261
+ "gsd-project-researcher": { "model": "{effective.planning}" },
262
+ "gsd-research-synthesizer": { "model": "{effective.planning}" },
263
+ "gsd-codebase-mapper": { "model": "{effective.planning}" },
264
+ "gsd-executor": { "model": "{effective.execution}" },
265
+ "gsd-debugger": { "model": "{effective.execution}" },
266
+ "gsd-verifier": { "model": "{effective.verification}" },
267
+ "gsd-integration-checker": { "model": "{effective.verification}" },
268
+ }
269
+ }
270
+ ```
271
+
272
+ If `opencode.json` already exists, merge the `agent` key (preserve other top-level keys).
273
+
274
+ ## Step 10: Report success
275
+
276
+ ```text
277
+ ✓ Updated {targetProfile} profile:
278
+
279
+ | Stage | Model |
280
+ |--------------|-------|
281
+ | planning | {newPreset.planning} |
282
+ | execution | {newPreset.execution} |
283
+ | verification | {newPreset.verification} |
284
+ ```
285
+
286
+ If `targetProfile` is the active profile:
287
+ ```text
288
+ Note: This is your active profile. Quit and relaunch OpenCode to apply model changes.
289
+ ```
290
+
291
+ If `targetProfile` is NOT the active profile:
292
+ ```text
293
+ To use this profile, run: /gsd-set-profile {targetProfile}
294
+ ```
295
+
296
+ </behavior>
297
+
298
+
299
+ Parse output and write to `opencode.json`, merging with existing content.
300
+
301
+ Note: Quit and relaunch OpenCode to apply model changes.
302
+ ```
303
+
304
+ If migration occurred:
305
+ ```
306
+ ⚡ Auto-migrated from {old_profile} to genius profile
307
+ ```
308
+
309
+ </behavior>
310
+
311
+ <notes>
312
+ - Use question tool for ALL user input
313
+ - Always show full model IDs (e.g., `opencode/glm-4.7-free`)
314
+ - Preserve all other config.json keys when writing
315
+ - Do NOT rewrite agent .md files — only update opencode.json
316
+ - If opencode.json doesn't exist, create it
317
+ - **Source of truth:** `config.json` stores profile_type and models; `opencode.json` is derived
318
+ - When migrating, preserve old model_profile field for backward compat during transition
319
+ - Model selection uses gsd-oc-select-model skill
320
+ </notes>
@@ -1,26 +1,22 @@
1
- ---
2
- name: gsd-pause-work
3
- description: Create context handoff when pausing work mid-phase
4
- tools:
5
- - read
6
- - write
7
- - bash
8
- ---
9
-
10
- <objective>
11
- Create `.continue-here.md` handoff file to preserve complete work state across sessions.
1
+ <purpose>
2
+ Create `.continue-here.md` handoff file to preserve complete work state across sessions. Enables seamless resumption with full context restoration.
3
+ </purpose>
12
4
 
13
- Enables seamless resumption in fresh session with full context restoration.
14
- </objective>
15
-
16
- <context>
17
- @.planning/STATE.md
18
- </context>
5
+ <required_reading>
6
+ read all files referenced by the invoking prompt's execution_context before starting.
7
+ </required_reading>
19
8
 
20
9
  <process>
21
10
 
22
11
  <step name="detect">
23
- Find current phase directory from most recently modified files.
12
+ Find current phase directory from most recently modified files:
13
+
14
+ ```bash
15
+ # Find most recent phase directory with work
16
+ ls -lt .planning/phases/*/PLAN.md 2>/dev/null | head -1 | grep -oP 'phases/\K[^/]+'
17
+ ```
18
+
19
+ If no active phase detected, ask user which phase they're pausing work on.
24
20
  </step>
25
21
 
26
22
  <step name="gather">
@@ -34,7 +30,7 @@ Find current phase directory from most recently modified files.
34
30
  6. **Mental context**: The approach, next steps, "vibe"
35
31
  7. **Files modified**: What's changed but not committed
36
32
 
37
- Ask user for clarifications if needed.
33
+ Ask user for clarifications if needed via conversational questions.
38
34
  </step>
39
35
 
40
36
  <step name="write">
@@ -46,7 +42,7 @@ phase: XX-name
46
42
  task: 3
47
43
  total_tasks: 7
48
44
  status: in_progress
49
- last_updated: [timestamp]
45
+ last_updated: [timestamp from current-timestamp]
50
46
  ---
51
47
 
52
48
  <current_state>
@@ -55,23 +51,23 @@ last_updated: [timestamp]
55
51
 
56
52
  <completed_work>
57
53
 
58
- - Task 1: [name] - Done
59
- - Task 2: [name] - Done
60
- - Task 3: [name] - In progress, [what's done]
61
- </completed_work>
54
+ - task 1: [name] - Done
55
+ - task 2: [name] - Done
56
+ - task 3: [name] - In progress, [what's done]
57
+ </completed_work>
62
58
 
63
59
  <remaining_work>
64
60
 
65
- - Task 3: [what's left]
66
- - Task 4: Not started
67
- - Task 5: Not started
68
- </remaining_work>
61
+ - task 3: [what's left]
62
+ - task 4: Not started
63
+ - task 5: Not started
64
+ </remaining_work>
69
65
 
70
66
  <decisions_made>
71
67
 
72
68
  - Decided to use [X] because [reason]
73
69
  - Chose [approach] over [alternative] because [reason]
74
- </decisions_made>
70
+ </decisions_made>
75
71
 
76
72
  <blockers>
77
73
  - [Blocker 1]: [status/workaround]
@@ -87,23 +83,16 @@ Start with: [specific first action when resuming]
87
83
  ```
88
84
 
89
85
  Be specific enough for a fresh OpenCode to understand immediately.
90
- </step>
91
-
92
- <step name="commit">
93
- **Check planning config:**
94
86
 
87
+ Use `current-timestamp` for last_updated field. You can use init todos (which provides timestamps) or call directly:
95
88
  ```bash
96
- COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
97
- git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
89
+ timestamp=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs current-timestamp full --raw)
98
90
  ```
91
+ </step>
99
92
 
100
- **If `COMMIT_PLANNING_DOCS=false`:** Skip git operations
101
-
102
- **If `COMMIT_PLANNING_DOCS=true` (default):**
103
-
93
+ <step name="commit">
104
94
  ```bash
105
- git add .planning/phases/*/.continue-here.md
106
- git commit -m "wip: [phase-name] paused at task [X]/[Y]"
95
+ node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "wip: [phase-name] paused at task [X]/[Y]" --files .planning/phases/*/.continue-here.md
107
96
  ```
108
97
  </step>
109
98
 
@@ -114,7 +103,7 @@ git commit -m "wip: [phase-name] paused at task [X]/[Y]"
114
103
  Current state:
115
104
 
116
105
  - Phase: [XX-name]
117
- - Task: [X] of [Y]
106
+ - task: [X] of [Y]
118
107
  - Status: [in_progress/blocked]
119
108
  - Committed as WIP
120
109
 
@@ -131,4 +120,3 @@ To resume: /gsd-resume-work
131
120
  - [ ] Committed as WIP
132
121
  - [ ] User knows location and how to resume
133
122
  </success_criteria>
134
- ```
@@ -1,39 +1,10 @@
1
- ---
2
- name: gsd-plan-milestone-gaps
3
- description: Create phases to close all gaps identified by milestone audit
4
- tools:
5
- - read
6
- - write
7
- - bash
8
- - glob
9
- - grep
10
- - question
11
- ---
12
-
13
- <objective>
14
- Create all phases necessary to close gaps identified by `/gsd-audit-milestone`.
15
-
16
- Reads MILESTONE-AUDIT.md, groups gaps into logical phases, creates phase entries in ROADMAP.md, and offers to plan each phase.
17
-
18
- One command creates all fix phases — no manual `/gsd-add-phase` per gap.
19
- </objective>
20
-
21
- <execution_context>
22
- <!-- Spawns gsd-planner agent which has all planning expertise baked in -->
23
- </execution_context>
24
-
25
- <context>
26
- **Audit results:**
27
- glob: .planning/v*-MILESTONE-AUDIT.md (use most recent)
1
+ <purpose>
2
+ Create all phases necessary to close gaps identified by `/gsd-audit-milestone`. Reads MILESTONE-AUDIT.md, groups gaps into logical phases, creates phase entries in ROADMAP.md, and offers to plan each phase. One command creates all fix phases — no manual `/gsd-add-phase` per gap.
3
+ </purpose>
28
4
 
29
- **Original intent (for prioritization):**
30
- @.planning/PROJECT.md
31
- @.planning/REQUIREMENTS.md
32
-
33
- **Current state:**
34
- @.planning/ROADMAP.md
35
- @.planning/STATE.md
36
- </context>
5
+ <required_reading>
6
+ read all files referenced by the invoking prompt's execution_context before starting.
7
+ </required_reading>
37
8
 
38
9
  <process>
39
10
 
@@ -93,7 +64,9 @@ Gap: Flow "View dashboard" broken at data fetch
93
64
 
94
65
  Find highest existing phase:
95
66
  ```bash
96
- ls -d .planning/phases/*/ | sort -V | tail -1
67
+ # Get sorted phase list, extract last one
68
+ PHASES=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs phases list)
69
+ HIGHEST=$(echo "$PHASES" | jq -r '.directories[-1]')
97
70
  ```
98
71
 
99
72
  New phases continue from there:
@@ -150,31 +123,34 @@ Add new phases to current milestone:
150
123
  ...
151
124
  ```
152
125
 
153
- ## 7. Create Phase Directories
126
+ ## 7. Update REQUIREMENTS.md Traceability Table (REQUIRED)
127
+
128
+ For each REQ-ID assigned to a gap closure phase:
129
+ - Update the Phase column to reflect the new gap closure phase
130
+ - Reset Status to `Pending`
131
+
132
+ Reset checked-off requirements the audit found unsatisfied:
133
+ - Change `[x]` → `[ ]` for any requirement marked unsatisfied in the audit
134
+ - Update coverage count at top of REQUIREMENTS.md
154
135
 
155
136
  ```bash
156
- mkdir -p ".planning/phases/{NN}-{name}"
137
+ # Verify traceability table reflects gap closure assignments
138
+ grep -c "Pending" .planning/REQUIREMENTS.md
157
139
  ```
158
140
 
159
- ## 8. Commit Roadmap Update
160
-
161
- **Check planning config:**
141
+ ## 8. Create Phase Directories
162
142
 
163
143
  ```bash
164
- COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
165
- git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
144
+ mkdir -p ".planning/phases/{NN}-{name}"
166
145
  ```
167
146
 
168
- **If `COMMIT_PLANNING_DOCS=false`:** Skip git operations
169
-
170
- **If `COMMIT_PLANNING_DOCS=true` (default):**
147
+ ## 9. Commit Roadmap and Requirements Update
171
148
 
172
149
  ```bash
173
- git add .planning/ROADMAP.md
174
- git commit -m "docs(roadmap): add gap closure phases {N}-{M}"
150
+ node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "docs(roadmap): add gap closure phases {N}-{M}" --files .planning/ROADMAP.md .planning/REQUIREMENTS.md
175
151
  ```
176
152
 
177
- ## 9. Offer Next Steps
153
+ ## 10. Offer Next Steps
178
154
 
179
155
  ```markdown
180
156
  ## ✓ Gap Closure Phases Created
@@ -289,7 +265,10 @@ becomes:
289
265
  - [ ] Gaps grouped into logical phases
290
266
  - [ ] User confirmed phase plan
291
267
  - [ ] ROADMAP.md updated with new phases
268
+ - [ ] REQUIREMENTS.md traceability table updated with gap closure phase assignments
269
+ - [ ] Unsatisfied requirement checkboxes reset (`[x]` → `[ ]`)
270
+ - [ ] Coverage count updated in REQUIREMENTS.md
292
271
  - [ ] Phase directories created
293
- - [ ] Changes committed
272
+ - [ ] Changes committed (includes REQUIREMENTS.md)
294
273
  - [ ] User knows to run `/gsd-plan-phase` next
295
274
  </success_criteria>