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
@@ -1,8 +1,14 @@
1
1
  # Phase Context Template
2
2
 
3
- Template for `.planning/phases/XX-name/{phase}-CONTEXT.md` - captures the user's vision for a phase.
3
+ Template for `.planning/phases/XX-name/{phase}-CONTEXT.md` - captures implementation decisions for a phase.
4
4
 
5
- **Purpose:** Document how the user imagines the phase working. This is vision context, not technical analysis. Technical details come from research.
5
+ **Purpose:** Document decisions that downstream agents need. Researcher uses this to know WHAT to investigate. Planner uses this to know WHAT choices are locked vs flexible.
6
+
7
+ **Key principle:** Categories are NOT predefined. They emerge from what was actually discussed for THIS phase. A CLI phase has CLI-relevant sections, a UI phase has UI-relevant sections.
8
+
9
+ **Downstream consumers:**
10
+ - `gsd-phase-researcher` — Reads decisions to focus research (e.g., "card layout" → research card component patterns)
11
+ - `gsd-planner` — Reads decisions to create specific tasks (e.g., "infinite scroll" → task includes virtualization)
6
12
 
7
13
  ---
8
14
 
@@ -12,43 +18,50 @@ Template for `.planning/phases/XX-name/{phase}-CONTEXT.md` - captures the user's
12
18
  # Phase [X]: [Name] - Context
13
19
 
14
20
  **Gathered:** [date]
15
- **Status:** [Ready for research / Ready for planning]
21
+ **Status:** Ready for planning
22
+
23
+ <domain>
24
+ ## Phase Boundary
16
25
 
17
- <vision>
18
- ## How This Should Work
26
+ [Clear statement of what this phase delivers — the scope anchor. This comes from ROADMAP.md and is fixed. Discussion clarifies implementation within this boundary.]
19
27
 
20
- [User's description of how they imagine this phase working. What happens when someone uses it? What does it look/feel like? This is the "pitch" version, not the technical spec.]
28
+ </domain>
21
29
 
22
- </vision>
30
+ <decisions>
31
+ ## Implementation Decisions
23
32
 
24
- <essential>
25
- ## What Must Be Nailed
33
+ ### [Area 1 that was discussed]
34
+ - [Specific decision made]
35
+ - [Another decision if applicable]
26
36
 
27
- [The core of this phase. If we only get one thing right, what is it? What's the non-negotiable that makes this phase successful?]
37
+ ### [Area 2 that was discussed]
38
+ - [Specific decision made]
28
39
 
29
- - [Essential thing 1]
30
- - [Essential thing 2]
31
- - [Essential thing 3 if applicable]
40
+ ### [Area 3 that was discussed]
41
+ - [Specific decision made]
32
42
 
33
- </essential>
43
+ ### OpenCode's Discretion
44
+ [Areas where user explicitly said "you decide" — OpenCode has flexibility here during planning/implementation]
45
+
46
+ </decisions>
34
47
 
35
48
  <specifics>
36
49
  ## Specific Ideas
37
50
 
38
- [Any particular things the user has in mind. References to existing products/features they like. Specific behaviors or interactions. "I want it to work like X" or "When you click Y, it should Z."]
51
+ [Any particular references, examples, or "I want it like X" moments from discussion. Product references, specific behaviors, interaction patterns.]
39
52
 
40
- [If none: "No specific requirements - open to standard approaches"]
53
+ [If none: "No specific requirements open to standard approaches"]
41
54
 
42
55
  </specifics>
43
56
 
44
- <notes>
45
- ## Additional Context
57
+ <deferred>
58
+ ## Deferred Ideas
46
59
 
47
- [Anything else captured during the discussion that doesn't fit above. User's priorities, concerns mentioned, relevant background.]
60
+ [Ideas that came up during discussion but belong in other phases. Captured here so they're not lost, but explicitly out of scope for this phase.]
48
61
 
49
- [If none: "No additional notes"]
62
+ [If none: "None discussion stayed within phase scope"]
50
63
 
51
- </notes>
64
+ </deferred>
52
65
 
53
66
  ---
54
67
 
@@ -57,84 +70,222 @@ Template for `.planning/phases/XX-name/{phase}-CONTEXT.md` - captures the user's
57
70
  ```
58
71
 
59
72
  <good_examples>
73
+
74
+ **Example 1: Visual feature (Post Feed)**
75
+
60
76
  ```markdown
61
- # Phase 3: User Dashboard - Context
77
+ # Phase 3: Post Feed - Context
62
78
 
63
79
  **Gathered:** 2025-01-20
64
- **Status:** Ready for research
80
+ **Status:** Ready for planning
81
+
82
+ <domain>
83
+ ## Phase Boundary
65
84
 
66
- <vision>
67
- ## How This Should Work
85
+ Display posts from followed users in a scrollable feed. Users can view posts and see engagement counts. Creating posts and interactions are separate phases.
68
86
 
69
- When users log in, they land on a dashboard that shows them everything important at a glance. I imagine it feeling calm and organized - not overwhelming like Jira or cluttered like Notion.
87
+ </domain>
70
88
 
71
- The main thing is seeing their active projects and what needs attention. Think of it like a "what should I work on today" view. It should feel personal, not like enterprise software.
89
+ <decisions>
90
+ ## Implementation Decisions
72
91
 
73
- </vision>
92
+ ### Layout style
93
+ - Card-based layout, not timeline or list
94
+ - Each card shows: author avatar, name, timestamp, full post content, reaction counts
95
+ - Cards have subtle shadows, rounded corners — modern feel
74
96
 
75
- <essential>
76
- ## What Must Be Nailed
97
+ ### Loading behavior
98
+ - Infinite scroll, not pagination
99
+ - Pull-to-refresh on mobile
100
+ - New posts indicator at top ("3 new posts") rather than auto-inserting
77
101
 
78
- - **At-a-glance clarity** - Within 2 seconds of landing, user knows what needs their attention
79
- - **Personal feel** - This is YOUR dashboard, not a team dashboard. It should feel like opening your personal notebook.
102
+ ### Empty state
103
+ - Friendly illustration + "Follow people to see posts here"
104
+ - Suggest 3-5 accounts to follow based on interests
80
105
 
81
- </essential>
106
+ ### OpenCode's Discretion
107
+ - Loading skeleton design
108
+ - Exact spacing and typography
109
+ - Error state handling
110
+
111
+ </decisions>
82
112
 
83
113
  <specifics>
84
114
  ## Specific Ideas
85
115
 
86
- - I like how Linear's home screen highlights what's assigned to you without noise
87
- - Should show projects in a card format, not a list
88
- - Maybe a "Today" section at the top with urgent stuff
89
- - Dark mode is essential (already have this from Phase 2)
116
+ - "I like how Twitter shows the new posts indicator without disrupting your scroll position"
117
+ - Cards should feel like Linear's issue cards — clean, not cluttered
90
118
 
91
119
  </specifics>
92
120
 
93
- <notes>
94
- ## Additional Context
121
+ <deferred>
122
+ ## Deferred Ideas
123
+
124
+ - Commenting on posts — Phase 5
125
+ - Bookmarking posts — add to backlog
126
+
127
+ </deferred>
128
+
129
+ ---
130
+
131
+ *Phase: 03-post-feed*
132
+ *Context gathered: 2025-01-20*
133
+ ```
134
+
135
+ **Example 2: CLI tool (Database backup)**
136
+
137
+ ```markdown
138
+ # Phase 2: Backup Command - Context
139
+
140
+ **Gathered:** 2025-01-20
141
+ **Status:** Ready for planning
142
+
143
+ <domain>
144
+ ## Phase Boundary
145
+
146
+ CLI command to backup database to local file or S3. Supports full and incremental backups. Restore command is a separate phase.
147
+
148
+ </domain>
149
+
150
+ <decisions>
151
+ ## Implementation Decisions
152
+
153
+ ### Output format
154
+ - JSON for programmatic use, table format for humans
155
+ - Default to table, --json flag for JSON
156
+ - Verbose mode (-v) shows progress, silent by default
157
+
158
+ ### Flag design
159
+ - Short flags for common options: -o (output), -v (verbose), -f (force)
160
+ - Long flags for clarity: --incremental, --compress, --encrypt
161
+ - Required: database connection string (positional or --db)
162
+
163
+ ### Error recovery
164
+ - Retry 3 times on network failure, then fail with clear message
165
+ - --no-retry flag to fail fast
166
+ - Partial backups are deleted on failure (no corrupt files)
167
+
168
+ ### OpenCode's Discretion
169
+ - Exact progress bar implementation
170
+ - Compression algorithm choice
171
+ - Temp file handling
172
+
173
+ </decisions>
174
+
175
+ <specifics>
176
+ ## Specific Ideas
177
+
178
+ - "I want it to feel like pg_dump — familiar to database people"
179
+ - Should work in CI pipelines (exit codes, no interactive prompts)
180
+
181
+ </specifics>
95
182
 
96
- User mentioned they've abandoned several dashboards before because they felt too "corporate." The key differentiator is making it feel personal and calm.
183
+ <deferred>
184
+ ## Deferred Ideas
97
185
 
98
- Priority is clarity over features. Better to show less and make it obvious than show everything.
186
+ - Scheduled backups separate phase
187
+ - Backup rotation/retention — add to backlog
99
188
 
100
- </notes>
189
+ </deferred>
101
190
 
102
191
  ---
103
192
 
104
- *Phase: 03-user-dashboard*
193
+ *Phase: 02-backup-command*
105
194
  *Context gathered: 2025-01-20*
106
195
  ```
196
+
197
+ **Example 3: Organization task (Photo library)**
198
+
199
+ ```markdown
200
+ # Phase 1: Photo Organization - Context
201
+
202
+ **Gathered:** 2025-01-20
203
+ **Status:** Ready for planning
204
+
205
+ <domain>
206
+ ## Phase Boundary
207
+
208
+ Organize existing photo library into structured folders. Handle duplicates and apply consistent naming. Tagging and search are separate phases.
209
+
210
+ </domain>
211
+
212
+ <decisions>
213
+ ## Implementation Decisions
214
+
215
+ ### Grouping criteria
216
+ - Primary grouping by year, then by month
217
+ - Events detected by time clustering (photos within 2 hours = same event)
218
+ - Event folders named by date + location if available
219
+
220
+ ### Duplicate handling
221
+ - Keep highest resolution version
222
+ - Move duplicates to _duplicates folder (don't delete)
223
+ - Log all duplicate decisions for review
224
+
225
+ ### Naming convention
226
+ - Format: YYYY-MM-DD_HH-MM-SS_originalname.ext
227
+ - Preserve original filename as suffix for searchability
228
+ - Handle name collisions with incrementing suffix
229
+
230
+ ### OpenCode's Discretion
231
+ - Exact clustering algorithm
232
+ - How to handle photos with no EXIF data
233
+ - Folder emoji usage
234
+
235
+ </decisions>
236
+
237
+ <specifics>
238
+ ## Specific Ideas
239
+
240
+ - "I want to be able to find photos by roughly when they were taken"
241
+ - Don't delete anything — worst case, move to a review folder
242
+
243
+ </specifics>
244
+
245
+ <deferred>
246
+ ## Deferred Ideas
247
+
248
+ - Face detection grouping — future phase
249
+ - Cloud sync — out of scope for now
250
+
251
+ </deferred>
252
+
253
+ ---
254
+
255
+ *Phase: 01-photo-organization*
256
+ *Context gathered: 2025-01-20*
257
+ ```
258
+
107
259
  </good_examples>
108
260
 
109
261
  <guidelines>
110
- **This template captures VISION, not technical specs.**
111
-
112
- The user is the visionary. They know:
113
- - How they imagine it working
114
- - What it should feel like
115
- - What's essential vs nice-to-have
116
- - References to things they like
117
-
118
- The user does NOT know (and shouldn't be asked):
119
- - Codebase patterns (OpenCode reads the code)
120
- - Technical risks (OpenCode identifies during research)
121
- - Implementation constraints (OpenCode figures out)
122
- - Success metrics (OpenCode infers from the work)
123
-
124
- **Content should read like:**
125
- - A founder describing their product vision
126
- - "When you use this, it should feel like..."
127
- - "The most important thing is..."
128
- - "I don't want it to be like X, I want it to feel like Y"
129
-
130
- **Content should NOT read like:**
131
- - A technical specification
132
- - Risk assessment matrix
133
- - Success criteria checklist
134
- - Codebase analysis
262
+ **This template captures DECISIONS for downstream agents.**
263
+
264
+ The output should answer: "What does the researcher need to investigate? What choices are locked for the planner?"
265
+
266
+ **Good content (concrete decisions):**
267
+ - "Card-based layout, not timeline"
268
+ - "Retry 3 times on network failure, then fail"
269
+ - "Group by year, then by month"
270
+ - "JSON for programmatic use, table for humans"
271
+
272
+ **Bad content (too vague):**
273
+ - "Should feel modern and clean"
274
+ - "Good user experience"
275
+ - "Fast and responsive"
276
+ - "Easy to use"
277
+
278
+ **Sections explained:**
279
+
280
+ - **Domain** The scope anchor. Copied/derived from ROADMAP.md. Fixed boundary.
281
+ - **Decisions** — Organized by areas discussed (NOT predefined categories). Section headers come from the actual discussion — "Layout style", "Flag design", "Grouping criteria", etc.
282
+ - **OpenCode's Discretion** Explicit acknowledgment of what OpenCode can decide during implementation.
283
+ - **Specifics** Product references, examples, "like X but..." statements.
284
+ - **Deferred** Ideas captured but explicitly out of scope. Prevents scope creep while preserving good ideas.
135
285
 
136
286
  **After creation:**
137
287
  - File lives in phase directory: `.planning/phases/XX-name/{phase}-CONTEXT.md`
138
- - Research phase adds technical context (patterns, risks, constraints)
139
- - Planning phase creates executable tasks informed by both vision AND research
288
+ - `gsd-phase-researcher` uses decisions to focus investigation
289
+ - `gsd-planner` uses decisions + research to create executable tasks
290
+ - Downstream agents should NOT need to ask the user again about captured decisions
140
291
  </guidelines>
@@ -0,0 +1,91 @@
1
+ # Debug Subagent Prompt Template
2
+
3
+ Template for spawning gsd-debugger agent. The agent contains all debugging expertise - this template provides problem context only.
4
+
5
+ ---
6
+
7
+ ## Template
8
+
9
+ ```markdown
10
+ <objective>
11
+ Investigate issue: {issue_id}
12
+
13
+ **Summary:** {issue_summary}
14
+ </objective>
15
+
16
+ <symptoms>
17
+ expected: {expected}
18
+ actual: {actual}
19
+ errors: {errors}
20
+ reproduction: {reproduction}
21
+ timeline: {timeline}
22
+ </symptoms>
23
+
24
+ <mode>
25
+ symptoms_prefilled: {true_or_false}
26
+ goal: {find_root_cause_only | find_and_fix}
27
+ </mode>
28
+
29
+ <debug_file>
30
+ Create: .planning/debug/{slug}.md
31
+ </debug_file>
32
+ ```
33
+
34
+ ---
35
+
36
+ ## Placeholders
37
+
38
+ | Placeholder | Source | Example |
39
+ |-------------|--------|---------|
40
+ | `{issue_id}` | Orchestrator-assigned | `auth-screen-dark` |
41
+ | `{issue_summary}` | User description | `Auth screen is too dark` |
42
+ | `{expected}` | From symptoms | `See logo clearly` |
43
+ | `{actual}` | From symptoms | `Screen is dark` |
44
+ | `{errors}` | From symptoms | `None in console` |
45
+ | `{reproduction}` | From symptoms | `Open /auth page` |
46
+ | `{timeline}` | From symptoms | `After recent deploy` |
47
+ | `{goal}` | Orchestrator sets | `find_and_fix` |
48
+ | `{slug}` | Generated | `auth-screen-dark` |
49
+
50
+ ---
51
+
52
+ ## Usage
53
+
54
+ **From /gsd-debug:**
55
+ ```python
56
+ Task(
57
+ prompt=filled_template,
58
+ subagent_type="gsd-debugger",
59
+ description="Debug {slug}"
60
+ )
61
+ ```
62
+
63
+ **From diagnose-issues (UAT):**
64
+ ```python
65
+ Task(prompt=template, subagent_type="gsd-debugger", description="Debug UAT-001")
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Continuation
71
+
72
+ For checkpoints, spawn fresh agent with:
73
+
74
+ ```markdown
75
+ <objective>
76
+ Continue debugging {slug}. Evidence is in the debug file.
77
+ </objective>
78
+
79
+ <prior_state>
80
+ Debug file: @.planning/debug/{slug}.md
81
+ </prior_state>
82
+
83
+ <checkpoint_response>
84
+ **Type:** {checkpoint_type}
85
+ **Response:** {user_response}
86
+ </checkpoint_response>
87
+
88
+ <mode>
89
+ goal: {goal}
90
+ </mode>
91
+ ```
@@ -51,21 +51,21 @@ Output: DISCOVERY.md with recommendation
51
51
  **Source Priority:**
52
52
  1. **Context7 MCP** - For library/framework documentation (current, authoritative)
53
53
  2. **Official Docs** - For platform-specific or non-indexed libraries
54
- 3. **WebSearch** - For comparisons, trends, community patterns (verify all findings)
54
+ 3. **webfetch** - For comparisons, trends, community patterns (verify all findings)
55
55
 
56
56
  **Quality Checklist:**
57
57
  Before completing discovery, verify:
58
58
  - [ ] All claims have authoritative sources (Context7 or official docs)
59
59
  - [ ] Negative claims ("X is not possible") verified with official documentation
60
- - [ ] API syntax/configuration from Context7 or official docs (never WebSearch alone)
61
- - [ ] WebSearch findings cross-checked with authoritative sources
60
+ - [ ] API syntax/configuration from Context7 or official docs (never webfetch alone)
61
+ - [ ] webfetch findings cross-checked with authoritative sources
62
62
  - [ ] Recent updates/changelogs checked for breaking changes
63
63
  - [ ] Alternative approaches considered (not just first solution found)
64
64
 
65
65
  **Confidence Levels:**
66
66
  - HIGH: Context7 or official docs confirm
67
- - MEDIUM: WebSearch + Context7/official docs confirm
68
- - LOW: WebSearch only or training knowledge only (mark for validation)
67
+ - MEDIUM: webfetch + Context7/official docs confirm
68
+ - LOW: webfetch only or training knowledge only (mark for validation)
69
69
 
70
70
  </discovery_protocol>
71
71
 
@@ -1,5 +1,8 @@
1
1
  # Phase Prompt Template
2
2
 
3
+ > **Note:** Planning methodology is in `agents/gsd-planner.md`.
4
+ > This template defines the PLAN.md output format that the agent produces.
5
+
3
6
  Template for `.planning/phases/XX-name/{phase}-{plan}-PLAN.md` - executable phase plans optimized for parallel execution.
4
7
 
5
8
  **Naming:** Use `{phase}-{plan}-PLAN.md` format (e.g., `01-02-PLAN.md` for Phase 1, Plan 2)
@@ -17,7 +20,13 @@ wave: N # Execution wave (1, 2, 3...). Pre-computed at plan
17
20
  depends_on: [] # Plan IDs this plan requires (e.g., ["01-01"]).
18
21
  files_modified: [] # Files this plan modifies.
19
22
  autonomous: true # false if plan has checkpoints requiring user interaction
20
- domain: [optional - if domain skill loaded]
23
+ user_setup: [] # Human-required setup OpenCode cannot automate (see below)
24
+
25
+ # Goal-backward verification (derived during planning, verified after execution)
26
+ must_haves:
27
+ truths: [] # Observable behaviors that must be true for goal achievement
28
+ artifacts: [] # Files that must exist with real implementation
29
+ key_links: [] # Critical connections between artifacts
21
30
  ---
22
31
 
23
32
  <objective>
@@ -130,10 +139,13 @@ After completion, create `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md`
130
139
  | `depends_on` | Yes | Array of plan IDs this plan requires. |
131
140
  | `files_modified` | Yes | Files this plan touches. |
132
141
  | `autonomous` | Yes | `true` if no checkpoints, `false` if has checkpoints |
133
- | `domain` | No | Domain skill if loaded (e.g., `next-js`) |
142
+ | `user_setup` | No | Array of human-required setup items (external services) |
143
+ | `must_haves` | Yes | Goal-backward verification criteria (see below) |
134
144
 
135
145
  **Wave is pre-computed:** Wave numbers are assigned during `/gsd-plan-phase`. Execute-phase reads `wave` directly from frontmatter and groups plans by wave number. No runtime dependency analysis needed.
136
146
 
147
+ **Must-haves enable verification:** The `must_haves` field carries goal-backward requirements from planning to execution. After all plans complete, execute-phase spawns a verification subagent that checks these criteria against the actual codebase.
148
+
137
149
  ---
138
150
 
139
151
  ## Parallel vs Sequential
@@ -461,3 +473,104 @@ files_modified: [...]
461
473
  - Only reference prior SUMMARYs when genuinely needed
462
474
  - Group checkpoints with related auto tasks in same plan
463
475
  - 2-3 tasks per plan, ~50% context max
476
+
477
+ ---
478
+
479
+ ## User Setup (External Services)
480
+
481
+ When a plan introduces external services requiring human configuration, declare in frontmatter:
482
+
483
+ ```yaml
484
+ user_setup:
485
+ - service: stripe
486
+ why: "Payment processing requires API keys"
487
+ env_vars:
488
+ - name: STRIPE_SECRET_KEY
489
+ source: "Stripe Dashboard → Developers → API keys → Secret key"
490
+ - name: STRIPE_WEBHOOK_SECRET
491
+ source: "Stripe Dashboard → Developers → Webhooks → Signing secret"
492
+ dashboard_config:
493
+ - task: "Create webhook endpoint"
494
+ location: "Stripe Dashboard → Developers → Webhooks → Add endpoint"
495
+ details: "URL: https://[your-domain]/api/webhooks/stripe"
496
+ local_dev:
497
+ - "stripe listen --forward-to localhost:3000/api/webhooks/stripe"
498
+ ```
499
+
500
+ **The automation-first rule:** `user_setup` contains ONLY what OpenCode literally cannot do:
501
+ - Account creation (requires human signup)
502
+ - Secret retrieval (requires dashboard access)
503
+ - Dashboard configuration (requires human in browser)
504
+
505
+ **NOT included:** Package installs, code changes, file creation, CLI commands OpenCode can run.
506
+
507
+ **Result:** Execute-plan generates `{phase}-USER-SETUP.md` with checklist for the user.
508
+
509
+ See `~/.config/opencode/get-shit-done/templates/user-setup.md` for full schema and examples
510
+
511
+ ---
512
+
513
+ ## Must-Haves (Goal-Backward Verification)
514
+
515
+ The `must_haves` field defines what must be TRUE for the phase goal to be achieved. Derived during planning, verified after execution.
516
+
517
+ **Structure:**
518
+
519
+ ```yaml
520
+ must_haves:
521
+ truths:
522
+ - "User can see existing messages"
523
+ - "User can send a message"
524
+ - "Messages persist across refresh"
525
+ artifacts:
526
+ - path: "src/components/Chat.tsx"
527
+ provides: "Message list rendering"
528
+ min_lines: 30
529
+ - path: "src/app/api/chat/route.ts"
530
+ provides: "Message CRUD operations"
531
+ exports: ["GET", "POST"]
532
+ - path: "prisma/schema.prisma"
533
+ provides: "Message model"
534
+ contains: "model Message"
535
+ key_links:
536
+ - from: "src/components/Chat.tsx"
537
+ to: "/api/chat"
538
+ via: "fetch in useEffect"
539
+ pattern: "fetch.*api/chat"
540
+ - from: "src/app/api/chat/route.ts"
541
+ to: "prisma.message"
542
+ via: "database query"
543
+ pattern: "prisma\\.message\\.(find|create)"
544
+ ```
545
+
546
+ **Field descriptions:**
547
+
548
+ | Field | Purpose |
549
+ |-------|---------|
550
+ | `truths` | Observable behaviors from user perspective. Each must be testable. |
551
+ | `artifacts` | Files that must exist with real implementation. |
552
+ | `artifacts[].path` | File path relative to project root. |
553
+ | `artifacts[].provides` | What this artifact delivers. |
554
+ | `artifacts[].min_lines` | Optional. Minimum lines to be considered substantive. |
555
+ | `artifacts[].exports` | Optional. Expected exports to verify. |
556
+ | `artifacts[].contains` | Optional. Pattern that must exist in file. |
557
+ | `key_links` | Critical connections between artifacts. |
558
+ | `key_links[].from` | Source artifact. |
559
+ | `key_links[].to` | Target artifact or endpoint. |
560
+ | `key_links[].via` | How they connect (description). |
561
+ | `key_links[].pattern` | Optional. Regex to verify connection exists. |
562
+
563
+ **Why this matters:**
564
+
565
+ Task completion ≠ Goal achievement. A task "create chat component" can complete by creating a placeholder. The `must_haves` field captures what must actually work, enabling verification to catch gaps before they compound.
566
+
567
+ **Verification flow:**
568
+
569
+ 1. Plan-phase derives must_haves from phase goal (goal-backward)
570
+ 2. Must_haves written to PLAN.md frontmatter
571
+ 3. Execute-phase runs all plans
572
+ 4. Verification subagent checks must_haves against codebase
573
+ 5. Gaps found → fix plans created → execute → re-verify
574
+ 6. All must_haves pass → phase complete
575
+
576
+ See `~/.config/opencode/get-shit-done/workflows/verify-phase.md` for verification logic.