gsd-opencode 1.5.0 → 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 (112) 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 +6 -8
  14. package/command/gsd/add-todo.md +6 -8
  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 +68 -77
  22. package/command/gsd/insert-phase.md +7 -7
  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 +670 -110
  27. package/command/gsd/pause-work.md +3 -3
  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 +72 -42
  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 +609 -108
  38. package/get-shit-done/references/continuation-format.md +16 -22
  39. package/get-shit-done/references/git-integration.md +4 -4
  40. package/get-shit-done/references/questioning.md +87 -108
  41. package/get-shit-done/references/tdd.md +3 -3
  42. package/get-shit-done/references/ui-brand.md +160 -0
  43. package/get-shit-done/references/verification-patterns.md +595 -0
  44. package/get-shit-done/templates/DEBUG.md +9 -9
  45. package/get-shit-done/templates/UAT.md +247 -0
  46. package/get-shit-done/templates/codebase/architecture.md +6 -6
  47. package/get-shit-done/templates/codebase/concerns.md +2 -2
  48. package/get-shit-done/templates/codebase/conventions.md +2 -2
  49. package/get-shit-done/templates/codebase/structure.md +8 -8
  50. package/get-shit-done/templates/codebase/testing.md +2 -2
  51. package/get-shit-done/templates/context.md +221 -70
  52. package/get-shit-done/templates/continue-here.md +1 -1
  53. package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  54. package/get-shit-done/templates/discovery.md +5 -5
  55. package/get-shit-done/templates/phase-prompt.md +118 -5
  56. package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  57. package/get-shit-done/templates/project.md +1 -1
  58. package/get-shit-done/templates/requirements.md +231 -0
  59. package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  60. package/get-shit-done/templates/research-project/FEATURES.md +147 -0
  61. package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  62. package/get-shit-done/templates/research-project/STACK.md +120 -0
  63. package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  64. package/get-shit-done/templates/research.md +4 -4
  65. package/get-shit-done/templates/roadmap.md +26 -20
  66. package/get-shit-done/templates/state.md +3 -18
  67. package/get-shit-done/templates/summary.md +13 -17
  68. package/get-shit-done/templates/user-setup.md +323 -0
  69. package/get-shit-done/templates/verification-report.md +322 -0
  70. package/get-shit-done/workflows/complete-milestone.md +153 -46
  71. package/get-shit-done/workflows/diagnose-issues.md +233 -0
  72. package/get-shit-done/workflows/discovery-phase.md +13 -18
  73. package/get-shit-done/workflows/discuss-phase.md +311 -126
  74. package/get-shit-done/workflows/execute-phase.md +178 -19
  75. package/get-shit-done/workflows/execute-plan.md +169 -151
  76. package/get-shit-done/workflows/list-phase-assumptions.md +7 -7
  77. package/get-shit-done/workflows/map-codebase.md +87 -232
  78. package/get-shit-done/workflows/resume-project.md +20 -22
  79. package/get-shit-done/workflows/transition.md +9 -25
  80. package/get-shit-done/workflows/verify-phase.md +629 -0
  81. package/get-shit-done/workflows/verify-work.md +495 -134
  82. package/package.json +2 -1
  83. package/command/gsd/consider-issues.md +0 -201
  84. package/command/gsd/create-roadmap.md +0 -115
  85. package/command/gsd/discuss-milestone.md +0 -47
  86. package/command/gsd/execute-plan.md +0 -103
  87. package/command/gsd/plan-fix.md +0 -205
  88. package/command/gsd/status.md +0 -127
  89. package/get-shit-done/references/debugging/debugging-mindset.md +0 -253
  90. package/get-shit-done/references/debugging/hypothesis-testing.md +0 -373
  91. package/get-shit-done/references/debugging/investigation-techniques.md +0 -337
  92. package/get-shit-done/references/debugging/verification-patterns.md +0 -425
  93. package/get-shit-done/references/debugging/when-to-research.md +0 -361
  94. package/get-shit-done/references/plan-format.md +0 -475
  95. package/get-shit-done/references/principles.md +0 -157
  96. package/get-shit-done/references/research-pitfalls.md +0 -215
  97. package/get-shit-done/references/scope-estimation.md +0 -256
  98. package/get-shit-done/templates/agent-history.md +0 -263
  99. package/get-shit-done/templates/checkpoint-return.md +0 -204
  100. package/get-shit-done/templates/config.json +0 -26
  101. package/get-shit-done/templates/continuation-prompt.md +0 -235
  102. package/get-shit-done/templates/issues.md +0 -32
  103. package/get-shit-done/templates/milestone-context.md +0 -93
  104. package/get-shit-done/templates/subagent-task-prompt.md +0 -95
  105. package/get-shit-done/templates/uat-issues.md +0 -143
  106. package/get-shit-done/workflows/_archive/execute-phase.md +0 -899
  107. package/get-shit-done/workflows/create-milestone.md +0 -416
  108. package/get-shit-done/workflows/create-roadmap.md +0 -481
  109. package/get-shit-done/workflows/debug.md +0 -426
  110. package/get-shit-done/workflows/discuss-milestone.md +0 -236
  111. package/get-shit-done/workflows/plan-phase.md +0 -701
  112. package/get-shit-done/workflows/research-phase.md +0 -436
@@ -1,143 +1,411 @@
1
1
  <overview>
2
- Plans execute autonomously. Checkpoints formalize interaction points where human verification or decisions are needed.
2
+ Plans execute autonomously. Checkpoints formalize the interaction points where human verification or decisions are needed.
3
3
 
4
- **Core principle:** Opencode agent automates everything with CLI/API. Checkpoints are for verification and decisions, not manual work.
4
+ **Core principle:** OpenCode automates everything with CLI/API. Checkpoints are for verification and decisions, not manual work.
5
5
  </overview>
6
6
 
7
7
  <checkpoint_types>
8
8
 
9
- ## checkpoint:human-verify (90% of checkpoints)
9
+ <type name="human-verify">
10
+ ## checkpoint:human-verify (Most Common - 90%)
10
11
 
11
- **When:** Opencode agent completed automated work, human confirms it works correctly.
12
+ **When:** OpenCode completed automated work, human confirms it works correctly.
12
13
 
13
- **Use for:** Visual UI checks, interactive flows, functional verification, audio/video quality, animation smoothness, accessibility testing.
14
+ **Use for:**
15
+ - Visual UI checks (layout, styling, responsiveness)
16
+ - Interactive flows (click through wizard, test user flows)
17
+ - Functional verification (feature works as expected)
18
+ - Audio/video playback quality
19
+ - Animation smoothness
20
+ - Accessibility testing
14
21
 
15
22
  **Structure:**
16
23
  ```xml
17
24
  <task type="checkpoint:human-verify" gate="blocking">
18
- <what-built>[What Opencode agent automated]</what-built>
19
- <how-to-verify>[Numbered steps - URLs, commands, expected behavior]</how-to-verify>
20
- <resume-signal>[How to continue - "approved" or describe issues]</resume-signal>
25
+ <what-built>[What OpenCode automated and deployed/built]</what-built>
26
+ <how-to-verify>
27
+ [Exact steps to test - URLs, commands, expected behavior]
28
+ </how-to-verify>
29
+ <resume-signal>[How to continue - "approved", "yes", or describe issues]</resume-signal>
21
30
  </task>
22
31
  ```
23
32
 
24
- **Example:**
33
+ **Key elements:**
34
+ - `<what-built>`: What OpenCode automated (deployed, built, configured)
35
+ - `<how-to-verify>`: Exact steps to confirm it works (numbered, specific)
36
+ - `<resume-signal>`: Clear indication of how to continue
37
+
38
+ **Example: Vercel Deployment**
25
39
  ```xml
26
40
  <task type="auto">
27
41
  <name>Deploy to Vercel</name>
28
- <action>Run `vercel --yes` to deploy. Capture URL.</action>
42
+ <files>.vercel/, vercel.json</files>
43
+ <action>Run `vercel --yes` to create project and deploy. Capture deployment URL from output.</action>
29
44
  <verify>vercel ls shows deployment, curl {url} returns 200</verify>
45
+ <done>App deployed, URL captured</done>
30
46
  </task>
31
47
 
32
48
  <task type="checkpoint:human-verify" gate="blocking">
33
- <what-built>Deployed to https://myapp.vercel.app</what-built>
49
+ <what-built>Deployed to Vercel at https://myapp-abc123.vercel.app</what-built>
50
+ <how-to-verify>
51
+ Visit https://myapp-abc123.vercel.app and confirm:
52
+ - Homepage loads without errors
53
+ - Login form is visible
54
+ - No console errors in browser DevTools
55
+ </how-to-verify>
56
+ <resume-signal>Type "approved" to continue, or describe issues to fix</resume-signal>
57
+ </task>
58
+ ```
59
+
60
+ **Example: UI Component**
61
+ ```xml
62
+ <task type="auto">
63
+ <name>Build responsive dashboard layout</name>
64
+ <files>src/components/Dashboard.tsx, src/app/dashboard/page.tsx</files>
65
+ <action>Create dashboard with sidebar, header, and content area. Use Tailwind responsive classes for mobile.</action>
66
+ <verify>npm run build succeeds, no TypeScript errors</verify>
67
+ <done>Dashboard component builds without errors</done>
68
+ </task>
69
+
70
+ <task type="checkpoint:human-verify" gate="blocking">
71
+ <what-built>Responsive dashboard layout at /dashboard</what-built>
34
72
  <how-to-verify>
35
- Visit URL and confirm:
36
- 1. Homepage loads without errors
37
- 2. All images/assets load
38
- 3. No console errors
73
+ 1. Run: npm run dev
74
+ 2. Visit: http://localhost:3000/dashboard
75
+ 3. Desktop (>1024px): Verify sidebar left, content right, header top
76
+ 4. Tablet (768px): Verify sidebar collapses to hamburger
77
+ 5. Mobile (375px): Verify single column, bottom nav
78
+ 6. Check: No layout shift, no horizontal scroll
79
+ </how-to-verify>
80
+ <resume-signal>Type "approved" or describe layout issues</resume-signal>
81
+ </task>
82
+ ```
83
+
84
+ **Example: Xcode Build**
85
+ ```xml
86
+ <task type="auto">
87
+ <name>Build macOS app with Xcode</name>
88
+ <files>App.xcodeproj, Sources/</files>
89
+ <action>Run `xcodebuild -project App.xcodeproj -scheme App build`. Check for compilation errors in output.</action>
90
+ <verify>Build output contains "BUILD SUCCEEDED", no errors</verify>
91
+ <done>App builds successfully</done>
92
+ </task>
93
+
94
+ <task type="checkpoint:human-verify" gate="blocking">
95
+ <what-built>Built macOS app at DerivedData/Build/Products/Debug/App.app</what-built>
96
+ <how-to-verify>
97
+ Open App.app and test:
98
+ - App launches without crashes
99
+ - Menu bar icon appears
100
+ - Preferences window opens correctly
101
+ - No visual glitches or layout issues
39
102
  </how-to-verify>
40
103
  <resume-signal>Type "approved" or describe issues</resume-signal>
41
104
  </task>
42
105
  ```
106
+ </type>
43
107
 
44
- ## checkpoint:decision (9% of checkpoints)
108
+ <type name="decision">
109
+ ## checkpoint:decision (9%)
45
110
 
46
111
  **When:** Human must make choice that affects implementation direction.
47
112
 
48
- **Use for:** Technology selection, architecture decisions, design choices, feature prioritization.
113
+ **Use for:**
114
+ - Technology selection (which auth provider, which database)
115
+ - Architecture decisions (monorepo vs separate repos)
116
+ - Design choices (color scheme, layout approach)
117
+ - Feature prioritization (which variant to build)
118
+ - Data model decisions (schema structure)
49
119
 
50
120
  **Structure:**
51
121
  ```xml
52
122
  <task type="checkpoint:decision" gate="blocking">
53
123
  <decision>[What's being decided]</decision>
54
- <context>[Why this matters]</context>
124
+ <context>[Why this decision matters]</context>
55
125
  <options>
56
- <option id="option-a"><name>[Name]</name><pros>[Benefits]</pros><cons>[Tradeoffs]</cons></option>
57
- <option id="option-b"><name>[Name]</name><pros>[Benefits]</pros><cons>[Tradeoffs]</cons></option>
126
+ <option id="option-a">
127
+ <name>[Option name]</name>
128
+ <pros>[Benefits]</pros>
129
+ <cons>[Tradeoffs]</cons>
130
+ </option>
131
+ <option id="option-b">
132
+ <name>[Option name]</name>
133
+ <pros>[Benefits]</pros>
134
+ <cons>[Tradeoffs]</cons>
135
+ </option>
58
136
  </options>
59
137
  <resume-signal>[How to indicate choice]</resume-signal>
60
138
  </task>
61
139
  ```
62
140
 
63
- **Example:**
141
+ **Key elements:**
142
+ - `<decision>`: What's being decided
143
+ - `<context>`: Why this matters
144
+ - `<options>`: Each option with balanced pros/cons (not prescriptive)
145
+ - `<resume-signal>`: How to indicate choice
146
+
147
+ **Example: Auth Provider Selection**
64
148
  ```xml
65
149
  <task type="checkpoint:decision" gate="blocking">
66
150
  <decision>Select authentication provider</decision>
67
- <context>Need user auth. Three options with different tradeoffs.</context>
151
+ <context>
152
+ Need user authentication for the app. Three solid options with different tradeoffs.
153
+ </context>
68
154
  <options>
69
- <option id="supabase"><name>Supabase Auth</name><pros>Built-in with DB, free tier, RLS integration</pros><cons>Less customizable, ecosystem lock-in</cons></option>
70
- <option id="clerk"><name>Clerk</name><pros>Beautiful UI, best DX</pros><cons>Paid after 10k MAU</cons></option>
71
- <option id="nextauth"><name>NextAuth.js</name><pros>Free, self-hosted, max control</pros><cons>More setup, DIY security</cons></option>
155
+ <option id="supabase">
156
+ <name>Supabase Auth</name>
157
+ <pros>Built-in with Supabase DB we're using, generous free tier, row-level security integration</pros>
158
+ <cons>Less customizable UI, tied to Supabase ecosystem</cons>
159
+ </option>
160
+ <option id="clerk">
161
+ <name>Clerk</name>
162
+ <pros>Beautiful pre-built UI, best developer experience, excellent docs</pros>
163
+ <cons>Paid after 10k MAU, vendor lock-in</cons>
164
+ </option>
165
+ <option id="nextauth">
166
+ <name>NextAuth.js</name>
167
+ <pros>Free, self-hosted, maximum control, widely adopted</pros>
168
+ <cons>More setup work, you manage security updates, UI is DIY</cons>
169
+ </option>
72
170
  </options>
73
171
  <resume-signal>Select: supabase, clerk, or nextauth</resume-signal>
74
172
  </task>
75
173
  ```
76
174
 
77
- ## checkpoint:human-action (1% - rare)
175
+ **Example: Database Selection**
176
+ ```xml
177
+ <task type="checkpoint:decision" gate="blocking">
178
+ <decision>Select database for user data</decision>
179
+ <context>
180
+ App needs persistent storage for users, sessions, and user-generated content.
181
+ Expected scale: 10k users, 1M records first year.
182
+ </context>
183
+ <options>
184
+ <option id="supabase">
185
+ <name>Supabase (Postgres)</name>
186
+ <pros>Full SQL, generous free tier, built-in auth, real-time subscriptions</pros>
187
+ <cons>Vendor lock-in for real-time features, less flexible than raw Postgres</cons>
188
+ </option>
189
+ <option id="planetscale">
190
+ <name>PlanetScale (MySQL)</name>
191
+ <pros>Serverless scaling, branching workflow, excellent DX</pros>
192
+ <cons>MySQL not Postgres, no foreign keys in free tier</cons>
193
+ </option>
194
+ <option id="convex">
195
+ <name>Convex</name>
196
+ <pros>Real-time by default, TypeScript-native, automatic caching</pros>
197
+ <cons>Newer platform, different mental model, less SQL flexibility</cons>
198
+ </option>
199
+ </options>
200
+ <resume-signal>Select: supabase, planetscale, or convex</resume-signal>
201
+ </task>
202
+ ```
203
+ </type>
204
+
205
+ <type name="human-action">
206
+ ## checkpoint:human-action (1% - Rare)
78
207
 
79
- **When:** Action has NO CLI/API and requires human-only interaction.
208
+ **When:** Action has NO CLI/API and requires human-only interaction, OR OpenCode hit an authentication gate during automation.
80
209
 
81
- **Use ONLY for:** Email verification links, SMS 2FA codes, manual account approvals, 3D Secure payment flows, OAuth app approvals.
210
+ **Use ONLY for:**
211
+ - **Authentication gates** - OpenCode tried to use CLI/API but needs credentials to continue (this is NOT a failure)
212
+ - Email verification links (account creation requires clicking email)
213
+ - SMS 2FA codes (phone verification)
214
+ - Manual account approvals (platform requires human review before API access)
215
+ - Credit card 3D Secure flows (web-based payment authorization)
216
+ - OAuth app approvals (some platforms require web-based approval)
82
217
 
83
- **Do NOT use for:** Deployments (use CLI), creating resources (use CLI/API), builds/tests (use Bash), file operations (use Write/Edit).
218
+ **Do NOT use for pre-planned manual work:**
219
+ - Manually deploying to Vercel (use `vercel` CLI - auth gate if needed)
220
+ - Manually creating Stripe webhooks (use Stripe API - auth gate if needed)
221
+ - Manually creating databases (use provider CLI - auth gate if needed)
222
+ - Running builds/tests manually (use bash tool)
223
+ - Creating files manually (use write tool)
84
224
 
85
225
  **Structure:**
86
226
  ```xml
87
227
  <task type="checkpoint:human-action" gate="blocking">
88
- <action>[Unavoidable manual step]</action>
89
- <instructions>[What Opencode agent automated] [ONE thing requiring human action]</instructions>
90
- <verification>[What Opencode agent checks afterward]</verification>
228
+ <action>[What human must do - OpenCode already did everything automatable]</action>
229
+ <instructions>
230
+ [What OpenCode already automated]
231
+ [The ONE thing requiring human action]
232
+ </instructions>
233
+ <verification>[What OpenCode can check afterward]</verification>
91
234
  <resume-signal>[How to continue]</resume-signal>
92
235
  </task>
93
236
  ```
94
237
 
95
- **Example (email verification):**
238
+ **Key principle:** OpenCode automates EVERYTHING possible first, only asks human for the truly unavoidable manual step.
239
+
240
+ **Example: Email Verification**
96
241
  ```xml
242
+ <task type="auto">
243
+ <name>Create SendGrid account via API</name>
244
+ <action>Use SendGrid API to create subuser account with provided email. Request verification email.</action>
245
+ <verify>API returns 201, account created</verify>
246
+ <done>Account created, verification email sent</done>
247
+ </task>
248
+
97
249
  <task type="checkpoint:human-action" gate="blocking">
98
250
  <action>Complete email verification for SendGrid account</action>
99
251
  <instructions>
100
252
  I created the account and requested verification email.
101
- Check your inbox for verification link and click it.
253
+ Check your inbox for SendGrid verification link and click it.
102
254
  </instructions>
103
255
  <verification>SendGrid API key works: curl test succeeds</verification>
104
- <resume-signal>Type "done" when verified</resume-signal>
256
+ <resume-signal>Type "done" when email verified</resume-signal>
257
+ </task>
258
+ ```
259
+
260
+ **Example: Credit Card 3D Secure**
261
+ ```xml
262
+ <task type="auto">
263
+ <name>Create Stripe payment intent</name>
264
+ <action>Use Stripe API to create payment intent for $99. Generate checkout URL.</action>
265
+ <verify>Stripe API returns payment intent ID and URL</verify>
266
+ <done>Payment intent created</done>
267
+ </task>
268
+
269
+ <task type="checkpoint:human-action" gate="blocking">
270
+ <action>Complete 3D Secure authentication</action>
271
+ <instructions>
272
+ I created the payment intent: https://checkout.stripe.com/pay/cs_test_abc123
273
+ Visit that URL and complete the 3D Secure verification flow with your test card.
274
+ </instructions>
275
+ <verification>Stripe webhook receives payment_intent.succeeded event</verification>
276
+ <resume-signal>Type "done" when payment completes</resume-signal>
277
+ </task>
278
+ ```
279
+
280
+ **Example: Authentication Gate (Dynamic Checkpoint)**
281
+ ```xml
282
+ <task type="auto">
283
+ <name>Deploy to Vercel</name>
284
+ <files>.vercel/, vercel.json</files>
285
+ <action>Run `vercel --yes` to deploy</action>
286
+ <verify>vercel ls shows deployment, curl returns 200</verify>
287
+ </task>
288
+
289
+ <!-- If vercel returns "Error: Not authenticated", OpenCode creates checkpoint on the fly -->
290
+
291
+ <task type="checkpoint:human-action" gate="blocking">
292
+ <action>Authenticate Vercel CLI so I can continue deployment</action>
293
+ <instructions>
294
+ I tried to deploy but got authentication error.
295
+ Run: vercel login
296
+ This will open your browser - complete the authentication flow.
297
+ </instructions>
298
+ <verification>vercel whoami returns your account email</verification>
299
+ <resume-signal>Type "done" when authenticated</resume-signal>
300
+ </task>
301
+
302
+ <!-- After authentication, OpenCode retries the deployment -->
303
+
304
+ <task type="auto">
305
+ <name>Retry Vercel deployment</name>
306
+ <action>Run `vercel --yes` (now authenticated)</action>
307
+ <verify>vercel ls shows deployment, curl returns 200</verify>
105
308
  </task>
106
309
  ```
107
310
 
311
+ **Key distinction:** Authentication gates are created dynamically when OpenCode encounters auth errors during automation. They're NOT pre-planned - OpenCode tries to automate first, only asks for credentials when blocked.
312
+ </type>
108
313
  </checkpoint_types>
109
314
 
110
315
  <execution_protocol>
111
316
 
112
- When Opencode agent encounters `type="checkpoint:*"`:
317
+ When OpenCode encounters `type="checkpoint:*"`:
113
318
 
114
319
  1. **Stop immediately** - do not proceed to next task
115
- 2. **Display checkpoint clearly:**
320
+ 2. **Display checkpoint clearly** using the format below
321
+ 3. **Wait for user response** - do not hallucinate completion
322
+ 4. **Verify if possible** - check files, run tests, whatever is specified
323
+ 5. **Resume execution** - continue to next task only after confirmation
116
324
 
325
+ **For checkpoint:human-verify:**
117
326
  ```
118
- ════════════════════════════════════════
119
- CHECKPOINT: [Type]
120
- ════════════════════════════════════════
327
+ ╔═══════════════════════════════════════════════════════╗
328
+ CHECKPOINT: Verification Required ║
329
+ ╚═══════════════════════════════════════════════════════╝
121
330
 
122
- Task [X] of [Y]: [Name]
331
+ Progress: 5/8 tasks complete
332
+ Task: Responsive dashboard layout
123
333
 
124
- [Checkpoint-specific content]
334
+ Built: Responsive dashboard at /dashboard
125
335
 
126
- [Resume signal instruction]
127
- ════════════════════════════════════════
336
+ How to verify:
337
+ 1. Run: npm run dev
338
+ 2. Visit: http://localhost:3000/dashboard
339
+ 3. Desktop (>1024px): Sidebar visible, content fills remaining space
340
+ 4. Tablet (768px): Sidebar collapses to icons
341
+ 5. Mobile (375px): Sidebar hidden, hamburger menu appears
342
+
343
+ ────────────────────────────────────────────────────────
344
+ → YOUR ACTION: Type "approved" or describe issues
345
+ ────────────────────────────────────────────────────────
128
346
  ```
129
347
 
130
- 3. **Wait for user response** - do not hallucinate completion
131
- 4. **Verify if possible** - check files, run tests
132
- 5. **Resume execution** - continue only after confirmation
348
+ **For checkpoint:decision:**
349
+ ```
350
+ ╔═══════════════════════════════════════════════════════╗
351
+ ║ CHECKPOINT: Decision Required ║
352
+ ╚═══════════════════════════════════════════════════════╝
353
+
354
+ Progress: 2/6 tasks complete
355
+ Task: Select authentication provider
356
+
357
+ Decision: Which auth provider should we use?
358
+
359
+ Context: Need user authentication. Three options with different tradeoffs.
360
+
361
+ Options:
362
+ 1. supabase - Built-in with our DB, free tier
363
+ Pros: Row-level security integration, generous free tier
364
+ Cons: Less customizable UI, ecosystem lock-in
365
+
366
+ 2. clerk - Best DX, paid after 10k users
367
+ Pros: Beautiful pre-built UI, excellent documentation
368
+ Cons: Vendor lock-in, pricing at scale
369
+
370
+ 3. nextauth - Self-hosted, maximum control
371
+ Pros: Free, no vendor lock-in, widely adopted
372
+ Cons: More setup work, DIY security updates
133
373
 
374
+ ────────────────────────────────────────────────────────
375
+ → YOUR ACTION: Select supabase, clerk, or nextauth
376
+ ────────────────────────────────────────────────────────
377
+ ```
378
+
379
+ **For checkpoint:human-action:**
380
+ ```
381
+ ╔═══════════════════════════════════════════════════════╗
382
+ ║ CHECKPOINT: Action Required ║
383
+ ╚═══════════════════════════════════════════════════════╝
384
+
385
+ Progress: 3/8 tasks complete
386
+ Task: Deploy to Vercel
387
+
388
+ Attempted: vercel --yes
389
+ Error: Not authenticated. Please run 'vercel login'
390
+
391
+ What you need to do:
392
+ 1. Run: vercel login
393
+ 2. Complete browser authentication when it opens
394
+ 3. Return here when done
395
+
396
+ I'll verify: vercel whoami returns your account
397
+
398
+ ────────────────────────────────────────────────────────
399
+ → YOUR ACTION: Type "done" when authenticated
400
+ ────────────────────────────────────────────────────────
401
+ ```
134
402
  </execution_protocol>
135
403
 
136
404
  <authentication_gates>
137
405
 
138
- **Critical:** When Opencode agent tries CLI/API and gets auth error, this is NOT a failure - it's a gate requiring human input to unblock automation.
406
+ **Critical:** When OpenCode tries CLI/API and gets auth error, this is NOT a failure - it's a gate requiring human input to unblock automation.
139
407
 
140
- **Pattern:** Opencode agent tries automation → auth error → creates checkpoint → you authenticate → Opencode agent retries → continues
408
+ **Pattern:** OpenCode tries automation → auth error → creates checkpoint → you authenticate → OpenCode retries → continues
141
409
 
142
410
  **Gate protocol:**
143
411
  1. Recognize it's not a failure - missing auth is expected
@@ -148,41 +416,55 @@ Task [X] of [Y]: [Name]
148
416
  6. Retry the original task
149
417
  7. Continue normally
150
418
 
151
- **Example (Vercel auth gate):**
152
- ```xml
153
- <!-- Opencode agent tries to deploy -->
154
- <task type="auto">
155
- <name>Deploy to Vercel</name>
156
- <action>Run `vercel --yes` to deploy</action>
157
- </task>
419
+ **Example execution flow (Vercel auth gate):**
158
420
 
159
- <!-- If vercel returns "Error: Not authenticated" -->
160
- <task type="checkpoint:human-action" gate="blocking">
161
- <action>Authenticate Vercel CLI so I can continue</action>
162
- <instructions>
163
- I tried to deploy but got authentication error.
164
- Run: vercel login (opens browser)
165
- </instructions>
166
- <verification>vercel whoami returns your account</verification>
167
- <resume-signal>Type "done" when authenticated</resume-signal>
168
- </task>
421
+ ```
422
+ OpenCode: Running `vercel --yes` to deploy...
169
423
 
170
- <!-- After auth, Opencode agent retries automatically -->
171
- <task type="auto">
172
- <name>Retry deployment</name>
173
- <action>Run `vercel --yes` (now authenticated)</action>
174
- </task>
424
+ Error: Not authenticated. Please run 'vercel login'
425
+
426
+ ╔═══════════════════════════════════════════════════════╗
427
+ CHECKPOINT: Action Required ║
428
+ ╚═══════════════════════════════════════════════════════╝
429
+
430
+ Progress: 2/8 tasks complete
431
+ Task: Deploy to Vercel
432
+
433
+ Attempted: vercel --yes
434
+ Error: Not authenticated
435
+
436
+ What you need to do:
437
+ 1. Run: vercel login
438
+ 2. Complete browser authentication
439
+
440
+ I'll verify: vercel whoami returns your account
441
+
442
+ ────────────────────────────────────────────────────────
443
+ → YOUR ACTION: Type "done" when authenticated
444
+ ────────────────────────────────────────────────────────
445
+
446
+ User: done
447
+
448
+ OpenCode: Verifying authentication...
449
+ Running: vercel whoami
450
+ ✓ Authenticated as: user@example.com
451
+
452
+ Retrying deployment...
453
+ Running: vercel --yes
454
+ ✓ Deployed to: https://myapp-abc123.vercel.app
455
+
456
+ Task 3 complete. Continuing to task 4...
175
457
  ```
176
458
 
177
459
  **Key distinction:**
178
- - Pre-planned checkpoint: "I need you to do X" (wrong - Opencode agent should automate)
460
+ - Pre-planned checkpoint: "I need you to do X" (wrong - OpenCode should automate)
179
461
  - Auth gate: "I tried to automate X but need credentials" (correct - unblocks automation)
180
462
 
181
463
  </authentication_gates>
182
464
 
183
465
  <automation_reference>
184
466
 
185
- **The rule:** If it has CLI/API, Opencode agent does it. Never ask human to perform automatable work.
467
+ **The rule:** If it has CLI/API, OpenCode does it. Never ask human to perform automatable work.
186
468
 
187
469
  | Service | CLI/API | Key Commands | Auth Gate |
188
470
  |---------|---------|--------------|-----------|
@@ -196,75 +478,292 @@ Task [X] of [Y]: [Name]
196
478
  | GitHub | `gh` | `repo create`, `pr create`, `secret set` | `gh auth login` |
197
479
  | Node | `npm`/`pnpm` | `install`, `run build`, `test` | N/A |
198
480
  | Xcode | `xcodebuild` | `-project`, `-scheme`, `build`, `test` | N/A |
481
+ | Convex | `npx convex` | `dev`, `deploy`, `import` | `npx convex login` |
199
482
 
200
- **Env files:** Use Write/Edit tools. Never ask human to create .env manually.
483
+ **Env files:** Use write/edit tools. Never ask human to create .env manually.
201
484
 
202
485
  **Quick reference:**
203
486
 
204
- | Action | Automatable? | Opencode agent does it? |
487
+ | Action | Automatable? | OpenCode does it? |
205
488
  |--------|--------------|-----------------|
206
489
  | Deploy to Vercel | Yes (`vercel`) | YES |
207
490
  | Create Stripe webhook | Yes (API) | YES |
208
- | Write .env file | Yes (Write tool) | YES |
491
+ | write .env file | Yes (write tool) | YES |
209
492
  | Create Upstash DB | Yes (`upstash`) | YES |
210
493
  | Run tests | Yes (`npm test`) | YES |
211
494
  | Click email verification link | No | NO |
212
495
  | Enter credit card with 3DS | No | NO |
496
+ | Complete OAuth in browser | No | NO |
213
497
 
214
498
  </automation_reference>
215
499
 
216
- <guidelines>
500
+ <writing_guidelines>
217
501
 
218
502
  **DO:**
219
503
  - Automate everything with CLI/API before checkpoint
220
504
  - Be specific: "Visit https://myapp.vercel.app" not "check deployment"
221
- - Number verification steps
222
- - State expected outcomes
223
- - Make verification executable
505
+ - Number verification steps: easier to follow
506
+ - State expected outcomes: "You should see X"
507
+ - Provide context: why this checkpoint exists
508
+ - Make verification executable: clear, testable steps
224
509
 
225
510
  **DON'T:**
226
- - Ask human to do work Opencode agent can automate
227
- - Assume knowledge: "Configure the usual settings"
228
- - Mix multiple verifications in one checkpoint
229
- - Use checkpoints too frequently (verification fatigue)
511
+ - Ask human to do work OpenCode can automate (deploy, create resources, run builds)
512
+ - Assume knowledge: "Configure the usual settings"
513
+ - Skip steps: "Set up database" ❌ (too vague)
514
+ - Mix multiple verifications in one checkpoint (split them)
515
+ - Make verification impossible (OpenCode can't check visual appearance without user confirmation)
230
516
 
231
517
  **Placement:**
232
- - After automation completes (not before)
233
- - After UI buildout
234
- - Before dependent work (decisions)
235
- - At integration points
518
+ - **After automation completes** - not before OpenCode does the work
519
+ - **After UI buildout** - before declaring phase complete
520
+ - **Before dependent work** - decisions before implementation
521
+ - **At integration points** - after configuring external services
522
+
523
+ **Bad placement:**
524
+ - Before OpenCode automates (asking human to do automatable work) ❌
525
+ - Too frequent (every other task is a checkpoint) ❌
526
+ - Too late (checkpoint is last task, but earlier tasks needed its result) ❌
527
+ </writing_guidelines>
528
+
529
+ <examples>
530
+
531
+ ### Example 1: Deployment Flow (Correct)
532
+
533
+ ```xml
534
+ <!-- OpenCode automates everything -->
535
+ <task type="auto">
536
+ <name>Deploy to Vercel</name>
537
+ <files>.vercel/, vercel.json, package.json</files>
538
+ <action>
539
+ 1. Run `vercel --yes` to create project and deploy
540
+ 2. Capture deployment URL from output
541
+ 3. Set environment variables with `vercel env add`
542
+ 4. Trigger production deployment with `vercel --prod`
543
+ </action>
544
+ <verify>
545
+ - vercel ls shows deployment
546
+ - curl {url} returns 200
547
+ - Environment variables set correctly
548
+ </verify>
549
+ <done>App deployed to production, URL captured</done>
550
+ </task>
551
+
552
+ <!-- Human verifies visual/functional correctness -->
553
+ <task type="checkpoint:human-verify" gate="blocking">
554
+ <what-built>Deployed to https://myapp.vercel.app</what-built>
555
+ <how-to-verify>
556
+ Visit https://myapp.vercel.app and confirm:
557
+ - Homepage loads correctly
558
+ - All images/assets load
559
+ - Navigation works
560
+ - No console errors
561
+ </how-to-verify>
562
+ <resume-signal>Type "approved" or describe issues</resume-signal>
563
+ </task>
564
+ ```
565
+
566
+ ### Example 2: Database Setup (No Checkpoint Needed)
567
+
568
+ ```xml
569
+ <!-- OpenCode automates everything -->
570
+ <task type="auto">
571
+ <name>Create Upstash Redis database</name>
572
+ <files>.env</files>
573
+ <action>
574
+ 1. Run `upstash redis create myapp-cache --region us-east-1`
575
+ 2. Capture connection URL from output
576
+ 3. write to .env: UPSTASH_REDIS_URL={url}
577
+ 4. Verify connection with test command
578
+ </action>
579
+ <verify>
580
+ - upstash redis list shows database
581
+ - .env contains UPSTASH_REDIS_URL
582
+ - Test connection succeeds
583
+ </verify>
584
+ <done>Redis database created and configured</done>
585
+ </task>
586
+
587
+ <!-- NO CHECKPOINT NEEDED - OpenCode automated everything and verified programmatically -->
588
+ ```
589
+
590
+ ### Example 3: Stripe Webhooks (Correct)
591
+
592
+ ```xml
593
+ <!-- OpenCode automates everything -->
594
+ <task type="auto">
595
+ <name>Configure Stripe webhooks</name>
596
+ <files>.env, src/app/api/webhooks/route.ts</files>
597
+ <action>
598
+ 1. Use Stripe API to create webhook endpoint pointing to /api/webhooks
599
+ 2. Subscribe to events: payment_intent.succeeded, customer.subscription.updated
600
+ 3. Save webhook signing secret to .env
601
+ 4. Implement webhook handler in route.ts
602
+ </action>
603
+ <verify>
604
+ - Stripe API returns webhook endpoint ID
605
+ - .env contains STRIPE_WEBHOOK_SECRET
606
+ - curl webhook endpoint returns 200
607
+ </verify>
608
+ <done>Stripe webhooks configured and handler implemented</done>
609
+ </task>
610
+
611
+ <!-- Human verifies in Stripe dashboard -->
612
+ <task type="checkpoint:human-verify" gate="blocking">
613
+ <what-built>Stripe webhook configured via API</what-built>
614
+ <how-to-verify>
615
+ Visit Stripe Dashboard > Developers > Webhooks
616
+ Confirm: Endpoint shows https://myapp.com/api/webhooks with correct events
617
+ </how-to-verify>
618
+ <resume-signal>Type "yes" if correct</resume-signal>
619
+ </task>
620
+ ```
621
+
622
+ ### Example 4: Full Auth Flow Verification (Correct)
623
+
624
+ ```xml
625
+ <task type="auto">
626
+ <name>Create user schema</name>
627
+ <files>src/db/schema.ts</files>
628
+ <action>Define User, Session, Account tables with Drizzle ORM</action>
629
+ <verify>npm run db:generate succeeds</verify>
630
+ </task>
631
+
632
+ <task type="auto">
633
+ <name>Create auth API routes</name>
634
+ <files>src/app/api/auth/[...nextauth]/route.ts</files>
635
+ <action>Set up NextAuth with GitHub provider, JWT strategy</action>
636
+ <verify>TypeScript compiles, no errors</verify>
637
+ </task>
638
+
639
+ <task type="auto">
640
+ <name>Create login UI</name>
641
+ <files>src/app/login/page.tsx, src/components/LoginButton.tsx</files>
642
+ <action>Create login page with GitHub OAuth button</action>
643
+ <verify>npm run build succeeds</verify>
644
+ </task>
236
645
 
237
- </guidelines>
646
+ <!-- ONE checkpoint at end verifies the complete flow -->
647
+ <task type="checkpoint:human-verify" gate="blocking">
648
+ <what-built>Complete authentication flow (schema + API + UI)</what-built>
649
+ <how-to-verify>
650
+ 1. Run: npm run dev
651
+ 2. Visit: http://localhost:3000/login
652
+ 3. Click "Sign in with GitHub"
653
+ 4. Complete GitHub OAuth flow
654
+ 5. Verify: Redirected to /dashboard, user name displayed
655
+ 6. Refresh page: Session persists
656
+ 7. Click logout: Session cleared
657
+ </how-to-verify>
658
+ <resume-signal>Type "approved" or describe issues</resume-signal>
659
+ </task>
660
+ ```
661
+ </examples>
238
662
 
239
663
  <anti_patterns>
240
664
 
241
- **BAD: Asking human to automate**
665
+ ### ❌ BAD: Asking human to automate
666
+
242
667
  ```xml
243
- <task type="checkpoint:human-action">
668
+ <task type="checkpoint:human-action" gate="blocking">
244
669
  <action>Deploy to Vercel</action>
245
- <instructions>Visit vercel.com/new, import repo, click Deploy</instructions>
670
+ <instructions>
671
+ 1. Visit vercel.com/new
672
+ 2. Import Git repository
673
+ 3. Click Deploy
674
+ 4. Copy deployment URL
675
+ </instructions>
676
+ <verification>Deployment exists</verification>
677
+ <resume-signal>Paste URL</resume-signal>
678
+ </task>
679
+ ```
680
+
681
+ **Why bad:** Vercel has a CLI. OpenCode should run `vercel --yes`.
682
+
683
+ ### ✅ GOOD: OpenCode automates, human verifies
684
+
685
+ ```xml
686
+ <task type="auto">
687
+ <name>Deploy to Vercel</name>
688
+ <action>Run `vercel --yes`. Capture URL.</action>
689
+ <verify>vercel ls shows deployment, curl returns 200</verify>
690
+ </task>
691
+
692
+ <task type="checkpoint:human-verify">
693
+ <what-built>Deployed to {url}</what-built>
694
+ <how-to-verify>Visit {url}, check homepage loads</how-to-verify>
695
+ <resume-signal>Type "approved"</resume-signal>
246
696
  </task>
247
697
  ```
248
- Why bad: Vercel has CLI. Use `vercel --yes`.
249
698
 
250
- **BAD: Too many checkpoints**
699
+ ### ❌ BAD: Too many checkpoints
700
+
251
701
  ```xml
252
702
  <task type="auto">Create schema</task>
253
703
  <task type="checkpoint:human-verify">Check schema</task>
254
- <task type="auto">Create API</task>
704
+ <task type="auto">Create API route</task>
255
705
  <task type="checkpoint:human-verify">Check API</task>
706
+ <task type="auto">Create UI form</task>
707
+ <task type="checkpoint:human-verify">Check form</task>
256
708
  ```
257
- Why bad: Verification fatigue. Combine into one checkpoint at end.
258
709
 
259
- **GOOD: Opencode agent automates, human verifies once**
710
+ **Why bad:** Verification fatigue. Combine into one checkpoint at end.
711
+
712
+ ### ✅ GOOD: Single verification checkpoint
713
+
260
714
  ```xml
261
715
  <task type="auto">Create schema</task>
262
- <task type="auto">Create API</task>
263
- <task type="auto">Create UI</task>
716
+ <task type="auto">Create API route</task>
717
+ <task type="auto">Create UI form</task>
264
718
 
265
719
  <task type="checkpoint:human-verify">
266
- <what-built>Complete auth flow</what-built>
720
+ <what-built>Complete auth flow (schema + API + UI)</what-built>
267
721
  <how-to-verify>Test full flow: register, login, access protected page</how-to-verify>
722
+ <resume-signal>Type "approved"</resume-signal>
723
+ </task>
724
+ ```
725
+
726
+ ### ❌ BAD: Asking for automatable file operations
727
+
728
+ ```xml
729
+ <task type="checkpoint:human-action">
730
+ <action>Create .env file</action>
731
+ <instructions>
732
+ 1. Create .env in project root
733
+ 2. Add: DATABASE_URL=...
734
+ 3. Add: STRIPE_KEY=...
735
+ </instructions>
736
+ </task>
737
+ ```
738
+
739
+ **Why bad:** OpenCode has write tool. This should be `type="auto"`.
740
+
741
+ ### ❌ BAD: Vague verification steps
742
+
743
+ ```xml
744
+ <task type="checkpoint:human-verify">
745
+ <what-built>Dashboard</what-built>
746
+ <how-to-verify>Check it works</how-to-verify>
747
+ <resume-signal>Continue</resume-signal>
748
+ </task>
749
+ ```
750
+
751
+ **Why bad:** No specifics. User doesn't know what to test or what "works" means.
752
+
753
+ ### ✅ GOOD: Specific verification steps
754
+
755
+ ```xml
756
+ <task type="checkpoint:human-verify">
757
+ <what-built>Responsive dashboard at /dashboard</what-built>
758
+ <how-to-verify>
759
+ 1. Run: npm run dev
760
+ 2. Visit: http://localhost:3000/dashboard
761
+ 3. Desktop (>1024px): Sidebar visible, content area fills remaining space
762
+ 4. Tablet (768px): Sidebar collapses to icons
763
+ 5. Mobile (375px): Sidebar hidden, hamburger menu in header
764
+ 6. Check: No horizontal scroll at any size
765
+ </how-to-verify>
766
+ <resume-signal>Type "approved" or describe layout issues</resume-signal>
268
767
  </task>
269
768
  ```
270
769
 
@@ -272,16 +771,18 @@ Why bad: Verification fatigue. Combine into one checkpoint at end.
272
771
 
273
772
  <summary>
274
773
 
275
- **The golden rule:** If Opencode agent CAN automate it, Opencode agent MUST automate it.
774
+ Checkpoints formalize human-in-the-loop points. Use them when OpenCode cannot complete a task autonomously OR when human verification is required for correctness.
775
+
776
+ **The golden rule:** If OpenCode CAN automate it, OpenCode MUST automate it.
276
777
 
277
778
  **Checkpoint priority:**
278
- 1. **checkpoint:human-verify** (90%) - Opencode agent automated, human confirms visual/functional correctness
279
- 2. **checkpoint:decision** (9%) - Human makes architectural/technology choices
280
- 3. **checkpoint:human-action** (1%) - Truly unavoidable manual steps with no API/CLI
779
+ 1. **checkpoint:human-verify** (90% of checkpoints) - OpenCode automated everything, human confirms visual/functional correctness
780
+ 2. **checkpoint:decision** (9% of checkpoints) - Human makes architectural/technology choices
781
+ 3. **checkpoint:human-action** (1% of checkpoints) - Truly unavoidable manual steps with no API/CLI
281
782
 
282
783
  **When NOT to use checkpoints:**
283
- - Things Opencode agent can verify programmatically (tests, builds)
284
- - File operations (Opencode agent can read/write)
285
- - Anything with CLI/API available
286
-
784
+ - Things OpenCode can verify programmatically (tests pass, build succeeds)
785
+ - File operations (OpenCode can read files to verify)
786
+ - Code correctness (use tests and static analysis)
787
+ - Anything automatable via CLI/API
287
788
  </summary>