get-research-done 1.1.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 (127) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +560 -0
  3. package/agents/grd-architect.md +789 -0
  4. package/agents/grd-codebase-mapper.md +738 -0
  5. package/agents/grd-critic.md +1065 -0
  6. package/agents/grd-debugger.md +1203 -0
  7. package/agents/grd-evaluator.md +948 -0
  8. package/agents/grd-executor.md +784 -0
  9. package/agents/grd-explorer.md +2063 -0
  10. package/agents/grd-graduator.md +484 -0
  11. package/agents/grd-integration-checker.md +423 -0
  12. package/agents/grd-phase-researcher.md +641 -0
  13. package/agents/grd-plan-checker.md +745 -0
  14. package/agents/grd-planner.md +1386 -0
  15. package/agents/grd-project-researcher.md +865 -0
  16. package/agents/grd-research-synthesizer.md +256 -0
  17. package/agents/grd-researcher.md +2361 -0
  18. package/agents/grd-roadmapper.md +605 -0
  19. package/agents/grd-verifier.md +778 -0
  20. package/bin/install.js +1294 -0
  21. package/commands/grd/add-phase.md +207 -0
  22. package/commands/grd/add-todo.md +193 -0
  23. package/commands/grd/architect.md +283 -0
  24. package/commands/grd/audit-milestone.md +277 -0
  25. package/commands/grd/check-todos.md +228 -0
  26. package/commands/grd/complete-milestone.md +136 -0
  27. package/commands/grd/debug.md +169 -0
  28. package/commands/grd/discuss-phase.md +86 -0
  29. package/commands/grd/evaluate.md +1095 -0
  30. package/commands/grd/execute-phase.md +339 -0
  31. package/commands/grd/explore.md +258 -0
  32. package/commands/grd/graduate.md +323 -0
  33. package/commands/grd/help.md +482 -0
  34. package/commands/grd/insert-phase.md +227 -0
  35. package/commands/grd/insights.md +231 -0
  36. package/commands/grd/join-discord.md +18 -0
  37. package/commands/grd/list-phase-assumptions.md +50 -0
  38. package/commands/grd/map-codebase.md +71 -0
  39. package/commands/grd/new-milestone.md +721 -0
  40. package/commands/grd/new-project.md +1008 -0
  41. package/commands/grd/pause-work.md +134 -0
  42. package/commands/grd/plan-milestone-gaps.md +295 -0
  43. package/commands/grd/plan-phase.md +525 -0
  44. package/commands/grd/progress.md +364 -0
  45. package/commands/grd/quick-explore.md +236 -0
  46. package/commands/grd/quick.md +309 -0
  47. package/commands/grd/remove-phase.md +349 -0
  48. package/commands/grd/research-phase.md +200 -0
  49. package/commands/grd/research.md +681 -0
  50. package/commands/grd/resume-work.md +40 -0
  51. package/commands/grd/set-profile.md +106 -0
  52. package/commands/grd/settings.md +136 -0
  53. package/commands/grd/update.md +172 -0
  54. package/commands/grd/verify-work.md +219 -0
  55. package/get-research-done/config/default.json +15 -0
  56. package/get-research-done/references/checkpoints.md +1078 -0
  57. package/get-research-done/references/continuation-format.md +249 -0
  58. package/get-research-done/references/git-integration.md +254 -0
  59. package/get-research-done/references/model-profiles.md +73 -0
  60. package/get-research-done/references/planning-config.md +94 -0
  61. package/get-research-done/references/questioning.md +141 -0
  62. package/get-research-done/references/tdd.md +263 -0
  63. package/get-research-done/references/ui-brand.md +160 -0
  64. package/get-research-done/references/verification-patterns.md +612 -0
  65. package/get-research-done/templates/DEBUG.md +159 -0
  66. package/get-research-done/templates/UAT.md +247 -0
  67. package/get-research-done/templates/archive-reason.md +195 -0
  68. package/get-research-done/templates/codebase/architecture.md +255 -0
  69. package/get-research-done/templates/codebase/concerns.md +310 -0
  70. package/get-research-done/templates/codebase/conventions.md +307 -0
  71. package/get-research-done/templates/codebase/integrations.md +280 -0
  72. package/get-research-done/templates/codebase/stack.md +186 -0
  73. package/get-research-done/templates/codebase/structure.md +285 -0
  74. package/get-research-done/templates/codebase/testing.md +480 -0
  75. package/get-research-done/templates/config.json +35 -0
  76. package/get-research-done/templates/context.md +283 -0
  77. package/get-research-done/templates/continue-here.md +78 -0
  78. package/get-research-done/templates/critic-log.md +288 -0
  79. package/get-research-done/templates/data-report.md +173 -0
  80. package/get-research-done/templates/debug-subagent-prompt.md +91 -0
  81. package/get-research-done/templates/decision-log.md +58 -0
  82. package/get-research-done/templates/decision.md +138 -0
  83. package/get-research-done/templates/discovery.md +146 -0
  84. package/get-research-done/templates/experiment-readme.md +104 -0
  85. package/get-research-done/templates/graduated-script.md +180 -0
  86. package/get-research-done/templates/iteration-summary.md +234 -0
  87. package/get-research-done/templates/milestone-archive.md +123 -0
  88. package/get-research-done/templates/milestone.md +115 -0
  89. package/get-research-done/templates/objective.md +271 -0
  90. package/get-research-done/templates/phase-prompt.md +567 -0
  91. package/get-research-done/templates/planner-subagent-prompt.md +117 -0
  92. package/get-research-done/templates/project.md +184 -0
  93. package/get-research-done/templates/requirements.md +231 -0
  94. package/get-research-done/templates/research-project/ARCHITECTURE.md +204 -0
  95. package/get-research-done/templates/research-project/FEATURES.md +147 -0
  96. package/get-research-done/templates/research-project/PITFALLS.md +200 -0
  97. package/get-research-done/templates/research-project/STACK.md +120 -0
  98. package/get-research-done/templates/research-project/SUMMARY.md +170 -0
  99. package/get-research-done/templates/research.md +529 -0
  100. package/get-research-done/templates/roadmap.md +202 -0
  101. package/get-research-done/templates/scorecard.json +113 -0
  102. package/get-research-done/templates/state.md +287 -0
  103. package/get-research-done/templates/summary.md +246 -0
  104. package/get-research-done/templates/user-setup.md +311 -0
  105. package/get-research-done/templates/verification-report.md +322 -0
  106. package/get-research-done/workflows/complete-milestone.md +756 -0
  107. package/get-research-done/workflows/diagnose-issues.md +231 -0
  108. package/get-research-done/workflows/discovery-phase.md +289 -0
  109. package/get-research-done/workflows/discuss-phase.md +433 -0
  110. package/get-research-done/workflows/execute-phase.md +657 -0
  111. package/get-research-done/workflows/execute-plan.md +1844 -0
  112. package/get-research-done/workflows/list-phase-assumptions.md +178 -0
  113. package/get-research-done/workflows/map-codebase.md +322 -0
  114. package/get-research-done/workflows/resume-project.md +307 -0
  115. package/get-research-done/workflows/transition.md +556 -0
  116. package/get-research-done/workflows/verify-phase.md +628 -0
  117. package/get-research-done/workflows/verify-work.md +596 -0
  118. package/hooks/dist/grd-check-update.js +61 -0
  119. package/hooks/dist/grd-statusline.js +84 -0
  120. package/package.json +47 -0
  121. package/scripts/audit-help-commands.sh +115 -0
  122. package/scripts/build-hooks.js +42 -0
  123. package/scripts/verify-all-commands.sh +246 -0
  124. package/scripts/verify-architect-warning.sh +35 -0
  125. package/scripts/verify-insights-mode.sh +40 -0
  126. package/scripts/verify-quick-mode.sh +20 -0
  127. package/scripts/verify-revise-data-routing.sh +139 -0
@@ -0,0 +1,1078 @@
1
+ <overview>
2
+ Plans execute autonomously. Checkpoints formalize the interaction points where human verification or decisions are needed.
3
+
4
+ **Core principle:** Claude automates everything with CLI/API. Checkpoints are for verification and decisions, not manual work.
5
+
6
+ **Golden rules:**
7
+ 1. **If Claude can run it, Claude runs it** - Never ask user to execute CLI commands, start servers, or run builds
8
+ 2. **Claude sets up the verification environment** - Start dev servers, seed databases, configure env vars
9
+ 3. **User only does what requires human judgment** - Visual checks, UX evaluation, "does this feel right?"
10
+ 4. **Secrets come from user, automation comes from Claude** - Ask for API keys, then Claude uses them via CLI
11
+ </overview>
12
+
13
+ <checkpoint_types>
14
+
15
+ <type name="human-verify">
16
+ ## checkpoint:human-verify (Most Common - 90%)
17
+
18
+ **When:** Claude completed automated work, human confirms it works correctly.
19
+
20
+ **Use for:**
21
+ - Visual UI checks (layout, styling, responsiveness)
22
+ - Interactive flows (click through wizard, test user flows)
23
+ - Functional verification (feature works as expected)
24
+ - Audio/video playback quality
25
+ - Animation smoothness
26
+ - Accessibility testing
27
+
28
+ **Structure:**
29
+ ```xml
30
+ <task type="checkpoint:human-verify" gate="blocking">
31
+ <what-built>[What Claude automated and deployed/built]</what-built>
32
+ <how-to-verify>
33
+ [Exact steps to test - URLs, commands, expected behavior]
34
+ </how-to-verify>
35
+ <resume-signal>[How to continue - "approved", "yes", or describe issues]</resume-signal>
36
+ </task>
37
+ ```
38
+
39
+ **Key elements:**
40
+ - `<what-built>`: What Claude automated (deployed, built, configured)
41
+ - `<how-to-verify>`: Exact steps to confirm it works (numbered, specific)
42
+ - `<resume-signal>`: Clear indication of how to continue
43
+
44
+ **Example: Vercel Deployment**
45
+ ```xml
46
+ <task type="auto">
47
+ <name>Deploy to Vercel</name>
48
+ <files>.vercel/, vercel.json</files>
49
+ <action>Run `vercel --yes` to create project and deploy. Capture deployment URL from output.</action>
50
+ <verify>vercel ls shows deployment, curl {url} returns 200</verify>
51
+ <done>App deployed, URL captured</done>
52
+ </task>
53
+
54
+ <task type="checkpoint:human-verify" gate="blocking">
55
+ <what-built>Deployed to Vercel at https://myapp-abc123.vercel.app</what-built>
56
+ <how-to-verify>
57
+ Visit https://myapp-abc123.vercel.app and confirm:
58
+ - Homepage loads without errors
59
+ - Login form is visible
60
+ - No console errors in browser DevTools
61
+ </how-to-verify>
62
+ <resume-signal>Type "approved" to continue, or describe issues to fix</resume-signal>
63
+ </task>
64
+ ```
65
+
66
+ **Example: UI Component**
67
+ ```xml
68
+ <task type="auto">
69
+ <name>Build responsive dashboard layout</name>
70
+ <files>src/components/Dashboard.tsx, src/app/dashboard/page.tsx</files>
71
+ <action>Create dashboard with sidebar, header, and content area. Use Tailwind responsive classes for mobile.</action>
72
+ <verify>npm run build succeeds, no TypeScript errors</verify>
73
+ <done>Dashboard component builds without errors</done>
74
+ </task>
75
+
76
+ <task type="auto">
77
+ <name>Start dev server for verification</name>
78
+ <action>Run `npm run dev` in background, wait for "ready" message, capture port</action>
79
+ <verify>curl http://localhost:3000 returns 200</verify>
80
+ <done>Dev server running at http://localhost:3000</done>
81
+ </task>
82
+
83
+ <task type="checkpoint:human-verify" gate="blocking">
84
+ <what-built>Responsive dashboard layout - dev server running at http://localhost:3000</what-built>
85
+ <how-to-verify>
86
+ Visit http://localhost:3000/dashboard and verify:
87
+ 1. Desktop (>1024px): Sidebar left, content right, header top
88
+ 2. Tablet (768px): Sidebar collapses to hamburger menu
89
+ 3. Mobile (375px): Single column layout, bottom nav appears
90
+ 4. No layout shift or horizontal scroll at any size
91
+ </how-to-verify>
92
+ <resume-signal>Type "approved" or describe layout issues</resume-signal>
93
+ </task>
94
+ ```
95
+
96
+ **Key pattern:** Claude starts the dev server BEFORE the checkpoint. User only needs to visit the URL.
97
+
98
+ **Example: Xcode Build**
99
+ ```xml
100
+ <task type="auto">
101
+ <name>Build macOS app with Xcode</name>
102
+ <files>App.xcodeproj, Sources/</files>
103
+ <action>Run `xcodebuild -project App.xcodeproj -scheme App build`. Check for compilation errors in output.</action>
104
+ <verify>Build output contains "BUILD SUCCEEDED", no errors</verify>
105
+ <done>App builds successfully</done>
106
+ </task>
107
+
108
+ <task type="checkpoint:human-verify" gate="blocking">
109
+ <what-built>Built macOS app at DerivedData/Build/Products/Debug/App.app</what-built>
110
+ <how-to-verify>
111
+ Open App.app and test:
112
+ - App launches without crashes
113
+ - Menu bar icon appears
114
+ - Preferences window opens correctly
115
+ - No visual glitches or layout issues
116
+ </how-to-verify>
117
+ <resume-signal>Type "approved" or describe issues</resume-signal>
118
+ </task>
119
+ ```
120
+ </type>
121
+
122
+ <type name="decision">
123
+ ## checkpoint:decision (9%)
124
+
125
+ **When:** Human must make choice that affects implementation direction.
126
+
127
+ **Use for:**
128
+ - Technology selection (which auth provider, which database)
129
+ - Architecture decisions (monorepo vs separate repos)
130
+ - Design choices (color scheme, layout approach)
131
+ - Feature prioritization (which variant to build)
132
+ - Data model decisions (schema structure)
133
+
134
+ **Structure:**
135
+ ```xml
136
+ <task type="checkpoint:decision" gate="blocking">
137
+ <decision>[What's being decided]</decision>
138
+ <context>[Why this decision matters]</context>
139
+ <options>
140
+ <option id="option-a">
141
+ <name>[Option name]</name>
142
+ <pros>[Benefits]</pros>
143
+ <cons>[Tradeoffs]</cons>
144
+ </option>
145
+ <option id="option-b">
146
+ <name>[Option name]</name>
147
+ <pros>[Benefits]</pros>
148
+ <cons>[Tradeoffs]</cons>
149
+ </option>
150
+ </options>
151
+ <resume-signal>[How to indicate choice]</resume-signal>
152
+ </task>
153
+ ```
154
+
155
+ **Key elements:**
156
+ - `<decision>`: What's being decided
157
+ - `<context>`: Why this matters
158
+ - `<options>`: Each option with balanced pros/cons (not prescriptive)
159
+ - `<resume-signal>`: How to indicate choice
160
+
161
+ **Example: Auth Provider Selection**
162
+ ```xml
163
+ <task type="checkpoint:decision" gate="blocking">
164
+ <decision>Select authentication provider</decision>
165
+ <context>
166
+ Need user authentication for the app. Three solid options with different tradeoffs.
167
+ </context>
168
+ <options>
169
+ <option id="supabase">
170
+ <name>Supabase Auth</name>
171
+ <pros>Built-in with Supabase DB we're using, generous free tier, row-level security integration</pros>
172
+ <cons>Less customizable UI, tied to Supabase ecosystem</cons>
173
+ </option>
174
+ <option id="clerk">
175
+ <name>Clerk</name>
176
+ <pros>Beautiful pre-built UI, best developer experience, excellent docs</pros>
177
+ <cons>Paid after 10k MAU, vendor lock-in</cons>
178
+ </option>
179
+ <option id="nextauth">
180
+ <name>NextAuth.js</name>
181
+ <pros>Free, self-hosted, maximum control, widely adopted</pros>
182
+ <cons>More setup work, you manage security updates, UI is DIY</cons>
183
+ </option>
184
+ </options>
185
+ <resume-signal>Select: supabase, clerk, or nextauth</resume-signal>
186
+ </task>
187
+ ```
188
+
189
+ **Example: Database Selection**
190
+ ```xml
191
+ <task type="checkpoint:decision" gate="blocking">
192
+ <decision>Select database for user data</decision>
193
+ <context>
194
+ App needs persistent storage for users, sessions, and user-generated content.
195
+ Expected scale: 10k users, 1M records first year.
196
+ </context>
197
+ <options>
198
+ <option id="supabase">
199
+ <name>Supabase (Postgres)</name>
200
+ <pros>Full SQL, generous free tier, built-in auth, real-time subscriptions</pros>
201
+ <cons>Vendor lock-in for real-time features, less flexible than raw Postgres</cons>
202
+ </option>
203
+ <option id="planetscale">
204
+ <name>PlanetScale (MySQL)</name>
205
+ <pros>Serverless scaling, branching workflow, excellent DX</pros>
206
+ <cons>MySQL not Postgres, no foreign keys in free tier</cons>
207
+ </option>
208
+ <option id="convex">
209
+ <name>Convex</name>
210
+ <pros>Real-time by default, TypeScript-native, automatic caching</pros>
211
+ <cons>Newer platform, different mental model, less SQL flexibility</cons>
212
+ </option>
213
+ </options>
214
+ <resume-signal>Select: supabase, planetscale, or convex</resume-signal>
215
+ </task>
216
+ ```
217
+ </type>
218
+
219
+ <type name="human-action">
220
+ ## checkpoint:human-action (1% - Rare)
221
+
222
+ **When:** Action has NO CLI/API and requires human-only interaction, OR Claude hit an authentication gate during automation.
223
+
224
+ **Use ONLY for:**
225
+ - **Authentication gates** - Claude tried to use CLI/API but needs credentials to continue (this is NOT a failure)
226
+ - Email verification links (account creation requires clicking email)
227
+ - SMS 2FA codes (phone verification)
228
+ - Manual account approvals (platform requires human review before API access)
229
+ - Credit card 3D Secure flows (web-based payment authorization)
230
+ - OAuth app approvals (some platforms require web-based approval)
231
+
232
+ **Do NOT use for pre-planned manual work:**
233
+ - Manually deploying to Vercel (use `vercel` CLI - auth gate if needed)
234
+ - Manually creating Stripe webhooks (use Stripe API - auth gate if needed)
235
+ - Manually creating databases (use provider CLI - auth gate if needed)
236
+ - Running builds/tests manually (use Bash tool)
237
+ - Creating files manually (use Write tool)
238
+
239
+ **Structure:**
240
+ ```xml
241
+ <task type="checkpoint:human-action" gate="blocking">
242
+ <action>[What human must do - Claude already did everything automatable]</action>
243
+ <instructions>
244
+ [What Claude already automated]
245
+ [The ONE thing requiring human action]
246
+ </instructions>
247
+ <verification>[What Claude can check afterward]</verification>
248
+ <resume-signal>[How to continue]</resume-signal>
249
+ </task>
250
+ ```
251
+
252
+ **Key principle:** Claude automates EVERYTHING possible first, only asks human for the truly unavoidable manual step.
253
+
254
+ **Example: Email Verification**
255
+ ```xml
256
+ <task type="auto">
257
+ <name>Create SendGrid account via API</name>
258
+ <action>Use SendGrid API to create subuser account with provided email. Request verification email.</action>
259
+ <verify>API returns 201, account created</verify>
260
+ <done>Account created, verification email sent</done>
261
+ </task>
262
+
263
+ <task type="checkpoint:human-action" gate="blocking">
264
+ <action>Complete email verification for SendGrid account</action>
265
+ <instructions>
266
+ I created the account and requested verification email.
267
+ Check your inbox for SendGrid verification link and click it.
268
+ </instructions>
269
+ <verification>SendGrid API key works: curl test succeeds</verification>
270
+ <resume-signal>Type "done" when email verified</resume-signal>
271
+ </task>
272
+ ```
273
+
274
+ **Example: Credit Card 3D Secure**
275
+ ```xml
276
+ <task type="auto">
277
+ <name>Create Stripe payment intent</name>
278
+ <action>Use Stripe API to create payment intent for $99. Generate checkout URL.</action>
279
+ <verify>Stripe API returns payment intent ID and URL</verify>
280
+ <done>Payment intent created</done>
281
+ </task>
282
+
283
+ <task type="checkpoint:human-action" gate="blocking">
284
+ <action>Complete 3D Secure authentication</action>
285
+ <instructions>
286
+ I created the payment intent: https://checkout.stripe.com/pay/cs_test_abc123
287
+ Visit that URL and complete the 3D Secure verification flow with your test card.
288
+ </instructions>
289
+ <verification>Stripe webhook receives payment_intent.succeeded event</verification>
290
+ <resume-signal>Type "done" when payment completes</resume-signal>
291
+ </task>
292
+ ```
293
+
294
+ **Example: Authentication Gate (Dynamic Checkpoint)**
295
+ ```xml
296
+ <task type="auto">
297
+ <name>Deploy to Vercel</name>
298
+ <files>.vercel/, vercel.json</files>
299
+ <action>Run `vercel --yes` to deploy</action>
300
+ <verify>vercel ls shows deployment, curl returns 200</verify>
301
+ </task>
302
+
303
+ <!-- If vercel returns "Error: Not authenticated", Claude creates checkpoint on the fly -->
304
+
305
+ <task type="checkpoint:human-action" gate="blocking">
306
+ <action>Authenticate Vercel CLI so I can continue deployment</action>
307
+ <instructions>
308
+ I tried to deploy but got authentication error.
309
+ Run: vercel login
310
+ This will open your browser - complete the authentication flow.
311
+ </instructions>
312
+ <verification>vercel whoami returns your account email</verification>
313
+ <resume-signal>Type "done" when authenticated</resume-signal>
314
+ </task>
315
+
316
+ <!-- After authentication, Claude retries the deployment -->
317
+
318
+ <task type="auto">
319
+ <name>Retry Vercel deployment</name>
320
+ <action>Run `vercel --yes` (now authenticated)</action>
321
+ <verify>vercel ls shows deployment, curl returns 200</verify>
322
+ </task>
323
+ ```
324
+
325
+ **Key distinction:** Authentication gates are created dynamically when Claude encounters auth errors during automation. They're NOT pre-planned - Claude tries to automate first, only asks for credentials when blocked.
326
+ </type>
327
+ </checkpoint_types>
328
+
329
+ <execution_protocol>
330
+
331
+ When Claude encounters `type="checkpoint:*"`:
332
+
333
+ 1. **Stop immediately** - do not proceed to next task
334
+ 2. **Display checkpoint clearly** using the format below
335
+ 3. **Wait for user response** - do not hallucinate completion
336
+ 4. **Verify if possible** - check files, run tests, whatever is specified
337
+ 5. **Resume execution** - continue to next task only after confirmation
338
+
339
+ **For checkpoint:human-verify:**
340
+ ```
341
+ ╔═══════════════════════════════════════════════════════╗
342
+ ║ CHECKPOINT: Verification Required ║
343
+ ╚═══════════════════════════════════════════════════════╝
344
+
345
+ Progress: 5/8 tasks complete
346
+ Task: Responsive dashboard layout
347
+
348
+ Built: Responsive dashboard at /dashboard
349
+
350
+ How to verify:
351
+ 1. Run: npm run dev
352
+ 2. Visit: http://localhost:3000/dashboard
353
+ 3. Desktop (>1024px): Sidebar visible, content fills remaining space
354
+ 4. Tablet (768px): Sidebar collapses to icons
355
+ 5. Mobile (375px): Sidebar hidden, hamburger menu appears
356
+
357
+ ────────────────────────────────────────────────────────
358
+ → YOUR ACTION: Type "approved" or describe issues
359
+ ────────────────────────────────────────────────────────
360
+ ```
361
+
362
+ **For checkpoint:decision:**
363
+ ```
364
+ ╔═══════════════════════════════════════════════════════╗
365
+ ║ CHECKPOINT: Decision Required ║
366
+ ╚═══════════════════════════════════════════════════════╝
367
+
368
+ Progress: 2/6 tasks complete
369
+ Task: Select authentication provider
370
+
371
+ Decision: Which auth provider should we use?
372
+
373
+ Context: Need user authentication. Three options with different tradeoffs.
374
+
375
+ Options:
376
+ 1. supabase - Built-in with our DB, free tier
377
+ Pros: Row-level security integration, generous free tier
378
+ Cons: Less customizable UI, ecosystem lock-in
379
+
380
+ 2. clerk - Best DX, paid after 10k users
381
+ Pros: Beautiful pre-built UI, excellent documentation
382
+ Cons: Vendor lock-in, pricing at scale
383
+
384
+ 3. nextauth - Self-hosted, maximum control
385
+ Pros: Free, no vendor lock-in, widely adopted
386
+ Cons: More setup work, DIY security updates
387
+
388
+ ────────────────────────────────────────────────────────
389
+ → YOUR ACTION: Select supabase, clerk, or nextauth
390
+ ────────────────────────────────────────────────────────
391
+ ```
392
+
393
+ **For checkpoint:human-action:**
394
+ ```
395
+ ╔═══════════════════════════════════════════════════════╗
396
+ ║ CHECKPOINT: Action Required ║
397
+ ╚═══════════════════════════════════════════════════════╝
398
+
399
+ Progress: 3/8 tasks complete
400
+ Task: Deploy to Vercel
401
+
402
+ Attempted: vercel --yes
403
+ Error: Not authenticated. Please run 'vercel login'
404
+
405
+ What you need to do:
406
+ 1. Run: vercel login
407
+ 2. Complete browser authentication when it opens
408
+ 3. Return here when done
409
+
410
+ I'll verify: vercel whoami returns your account
411
+
412
+ ────────────────────────────────────────────────────────
413
+ → YOUR ACTION: Type "done" when authenticated
414
+ ────────────────────────────────────────────────────────
415
+ ```
416
+ </execution_protocol>
417
+
418
+ <authentication_gates>
419
+
420
+ **Critical:** When Claude tries CLI/API and gets auth error, this is NOT a failure - it's a gate requiring human input to unblock automation.
421
+
422
+ **Pattern:** Claude tries automation → auth error → creates checkpoint → you authenticate → Claude retries → continues
423
+
424
+ **Gate protocol:**
425
+ 1. Recognize it's not a failure - missing auth is expected
426
+ 2. Stop current task - don't retry repeatedly
427
+ 3. Create checkpoint:human-action dynamically
428
+ 4. Provide exact authentication steps
429
+ 5. Verify authentication works
430
+ 6. Retry the original task
431
+ 7. Continue normally
432
+
433
+ **Example execution flow (Vercel auth gate):**
434
+
435
+ ```
436
+ Claude: Running `vercel --yes` to deploy...
437
+
438
+ Error: Not authenticated. Please run 'vercel login'
439
+
440
+ ╔═══════════════════════════════════════════════════════╗
441
+ ║ CHECKPOINT: Action Required ║
442
+ ╚═══════════════════════════════════════════════════════╝
443
+
444
+ Progress: 2/8 tasks complete
445
+ Task: Deploy to Vercel
446
+
447
+ Attempted: vercel --yes
448
+ Error: Not authenticated
449
+
450
+ What you need to do:
451
+ 1. Run: vercel login
452
+ 2. Complete browser authentication
453
+
454
+ I'll verify: vercel whoami returns your account
455
+
456
+ ────────────────────────────────────────────────────────
457
+ → YOUR ACTION: Type "done" when authenticated
458
+ ────────────────────────────────────────────────────────
459
+
460
+ User: done
461
+
462
+ Claude: Verifying authentication...
463
+ Running: vercel whoami
464
+ ✓ Authenticated as: user@example.com
465
+
466
+ Retrying deployment...
467
+ Running: vercel --yes
468
+ ✓ Deployed to: https://myapp-abc123.vercel.app
469
+
470
+ Task 3 complete. Continuing to task 4...
471
+ ```
472
+
473
+ **Key distinction:**
474
+ - Pre-planned checkpoint: "I need you to do X" (wrong - Claude should automate)
475
+ - Auth gate: "I tried to automate X but need credentials" (correct - unblocks automation)
476
+
477
+ </authentication_gates>
478
+
479
+ <automation_reference>
480
+
481
+ **The rule:** If it has CLI/API, Claude does it. Never ask human to perform automatable work.
482
+
483
+ ## Service CLI Reference
484
+
485
+ | Service | CLI/API | Key Commands | Auth Gate |
486
+ |---------|---------|--------------|-----------|
487
+ | Vercel | `vercel` | `--yes`, `env add`, `--prod`, `ls` | `vercel login` |
488
+ | Railway | `railway` | `init`, `up`, `variables set` | `railway login` |
489
+ | Fly | `fly` | `launch`, `deploy`, `secrets set` | `fly auth login` |
490
+ | Stripe | `stripe` + API | `listen`, `trigger`, API calls | API key in .env |
491
+ | Supabase | `supabase` | `init`, `link`, `db push`, `gen types` | `supabase login` |
492
+ | Upstash | `upstash` | `redis create`, `redis get` | `upstash auth login` |
493
+ | PlanetScale | `pscale` | `database create`, `branch create` | `pscale auth login` |
494
+ | GitHub | `gh` | `repo create`, `pr create`, `secret set` | `gh auth login` |
495
+ | Node | `npm`/`pnpm` | `install`, `run build`, `test`, `run dev` | N/A |
496
+ | Xcode | `xcodebuild` | `-project`, `-scheme`, `build`, `test` | N/A |
497
+ | Convex | `npx convex` | `dev`, `deploy`, `env set`, `env get` | `npx convex login` |
498
+
499
+ ## Environment Variable Automation
500
+
501
+ **Env files:** Use Write/Edit tools. Never ask human to create .env manually.
502
+
503
+ **Dashboard env vars via CLI:**
504
+
505
+ | Platform | CLI Command | Example |
506
+ |----------|-------------|---------|
507
+ | Convex | `npx convex env set` | `npx convex env set OPENAI_API_KEY sk-...` |
508
+ | Vercel | `vercel env add` | `vercel env add STRIPE_KEY production` |
509
+ | Railway | `railway variables set` | `railway variables set API_KEY=value` |
510
+ | Fly | `fly secrets set` | `fly secrets set DATABASE_URL=...` |
511
+ | Supabase | `supabase secrets set` | `supabase secrets set MY_SECRET=value` |
512
+
513
+ **Pattern for secret collection:**
514
+ ```xml
515
+ <!-- WRONG: Asking user to add env vars in dashboard -->
516
+ <task type="checkpoint:human-action">
517
+ <action>Add OPENAI_API_KEY to Convex dashboard</action>
518
+ <instructions>Go to dashboard.convex.dev → Settings → Environment Variables → Add</instructions>
519
+ </task>
520
+
521
+ <!-- RIGHT: Claude asks for value, then adds via CLI -->
522
+ <task type="checkpoint:human-action">
523
+ <action>Provide your OpenAI API key</action>
524
+ <instructions>
525
+ I need your OpenAI API key to configure the Convex backend.
526
+ Get it from: https://platform.openai.com/api-keys
527
+ Paste the key (starts with sk-)
528
+ </instructions>
529
+ <verification>I'll add it via `npx convex env set` and verify it's configured</verification>
530
+ <resume-signal>Paste your API key</resume-signal>
531
+ </task>
532
+
533
+ <task type="auto">
534
+ <name>Configure OpenAI key in Convex</name>
535
+ <action>Run `npx convex env set OPENAI_API_KEY {user-provided-key}`</action>
536
+ <verify>`npx convex env get OPENAI_API_KEY` returns the key (masked)</verify>
537
+ </task>
538
+ ```
539
+
540
+ ## Dev Server Automation
541
+
542
+ **Claude starts servers, user visits URLs:**
543
+
544
+ | Framework | Start Command | Ready Signal | Default URL |
545
+ |-----------|---------------|--------------|-------------|
546
+ | Next.js | `npm run dev` | "Ready in" or "started server" | http://localhost:3000 |
547
+ | Vite | `npm run dev` | "ready in" | http://localhost:5173 |
548
+ | Convex | `npx convex dev` | "Convex functions ready" | N/A (backend only) |
549
+ | Express | `npm start` | "listening on port" | http://localhost:3000 |
550
+ | Django | `python manage.py runserver` | "Starting development server" | http://localhost:8000 |
551
+
552
+ ### Server Lifecycle Protocol
553
+
554
+ **Starting servers:**
555
+ ```bash
556
+ # Run in background, capture PID for cleanup
557
+ npm run dev &
558
+ DEV_SERVER_PID=$!
559
+
560
+ # Wait for ready signal (max 30s)
561
+ timeout 30 bash -c 'until curl -s localhost:3000 > /dev/null 2>&1; do sleep 1; done'
562
+ ```
563
+
564
+ **Port conflicts:**
565
+ If default port is in use, check what's running and either:
566
+ 1. Kill the existing process if it's stale: `lsof -ti:3000 | xargs kill`
567
+ 2. Use alternate port: `npm run dev -- --port 3001`
568
+
569
+ **Server stays running** for the duration of the checkpoint. After user approves, server continues running for subsequent tasks. Only kill explicitly if:
570
+ - Plan is complete and no more verification needed
571
+ - Switching to production deployment
572
+ - Port needed for different service
573
+
574
+ **Pattern:**
575
+ ```xml
576
+ <!-- Claude starts server before checkpoint -->
577
+ <task type="auto">
578
+ <name>Start dev server</name>
579
+ <action>Run `npm run dev` in background, wait for ready signal</action>
580
+ <verify>curl http://localhost:3000 returns 200</verify>
581
+ <done>Dev server running</done>
582
+ </task>
583
+
584
+ <!-- User only visits URL -->
585
+ <task type="checkpoint:human-verify">
586
+ <what-built>Feature X - dev server running at http://localhost:3000</what-built>
587
+ <how-to-verify>
588
+ Visit http://localhost:3000/feature and verify:
589
+ 1. [Visual check 1]
590
+ 2. [Visual check 2]
591
+ </how-to-verify>
592
+ </task>
593
+ ```
594
+
595
+ ## CLI Installation Handling
596
+
597
+ **When a required CLI is not installed:**
598
+
599
+ | CLI | Auto-install? | Command |
600
+ |-----|---------------|---------|
601
+ | npm/pnpm/yarn | No - ask user | User chooses package manager |
602
+ | vercel | Yes | `npm i -g vercel` |
603
+ | gh (GitHub) | Yes | `brew install gh` (macOS) or `apt install gh` (Linux) |
604
+ | stripe | Yes | `npm i -g stripe` |
605
+ | supabase | Yes | `npm i -g supabase` |
606
+ | convex | No - use npx | `npx convex` (no install needed) |
607
+ | fly | Yes | `brew install flyctl` or curl installer |
608
+ | railway | Yes | `npm i -g @railway/cli` |
609
+
610
+ **Protocol:**
611
+ 1. Try the command
612
+ 2. If "command not found", check if auto-installable
613
+ 3. If yes: install silently, retry command
614
+ 4. If no: create checkpoint asking user to install
615
+
616
+ ```xml
617
+ <!-- Example: vercel not found -->
618
+ <task type="auto">
619
+ <name>Install Vercel CLI</name>
620
+ <action>Run `npm i -g vercel`</action>
621
+ <verify>`vercel --version` succeeds</verify>
622
+ <done>Vercel CLI installed</done>
623
+ </task>
624
+ ```
625
+
626
+ ## Pre-Checkpoint Automation Failures
627
+
628
+ **When setup fails before checkpoint:**
629
+
630
+ | Failure | Response |
631
+ |---------|----------|
632
+ | Server won't start | Check error output, fix issue, retry (don't proceed to checkpoint) |
633
+ | Port in use | Kill stale process or use alternate port |
634
+ | Missing dependency | Run `npm install`, retry |
635
+ | Build error | Fix the error first (this is a bug, not a checkpoint issue) |
636
+ | Auth error | Create auth gate checkpoint |
637
+ | Network timeout | Retry with backoff, then checkpoint if persistent |
638
+
639
+ **Key principle:** Never present a checkpoint with broken verification environment. If `curl localhost:3000` fails, don't ask user to "visit localhost:3000".
640
+
641
+ ```xml
642
+ <!-- WRONG: Checkpoint with broken environment -->
643
+ <task type="checkpoint:human-verify">
644
+ <what-built>Dashboard (server failed to start)</what-built>
645
+ <how-to-verify>Visit http://localhost:3000...</how-to-verify>
646
+ </task>
647
+
648
+ <!-- RIGHT: Fix first, then checkpoint -->
649
+ <task type="auto">
650
+ <name>Fix server startup issue</name>
651
+ <action>Investigate error, fix root cause, restart server</action>
652
+ <verify>curl http://localhost:3000 returns 200</verify>
653
+ <done>Server running correctly</done>
654
+ </task>
655
+
656
+ <task type="checkpoint:human-verify">
657
+ <what-built>Dashboard - server running at http://localhost:3000</what-built>
658
+ <how-to-verify>Visit http://localhost:3000/dashboard...</how-to-verify>
659
+ </task>
660
+ ```
661
+
662
+ ## Quick Reference
663
+
664
+ | Action | Automatable? | Claude does it? |
665
+ |--------|--------------|-----------------|
666
+ | Deploy to Vercel | Yes (`vercel`) | YES |
667
+ | Create Stripe webhook | Yes (API) | YES |
668
+ | Write .env file | Yes (Write tool) | YES |
669
+ | Create Upstash DB | Yes (`upstash`) | YES |
670
+ | Run tests | Yes (`npm test`) | YES |
671
+ | Start dev server | Yes (`npm run dev`) | YES |
672
+ | Add env vars to Convex | Yes (`npx convex env set`) | YES |
673
+ | Add env vars to Vercel | Yes (`vercel env add`) | YES |
674
+ | Seed database | Yes (CLI/API) | YES |
675
+ | Click email verification link | No | NO |
676
+ | Enter credit card with 3DS | No | NO |
677
+ | Complete OAuth in browser | No | NO |
678
+ | Visually verify UI looks correct | No | NO |
679
+ | Test interactive user flows | No | NO |
680
+
681
+ </automation_reference>
682
+
683
+ <writing_guidelines>
684
+
685
+ **DO:**
686
+ - Automate everything with CLI/API before checkpoint
687
+ - Be specific: "Visit https://myapp.vercel.app" not "check deployment"
688
+ - Number verification steps: easier to follow
689
+ - State expected outcomes: "You should see X"
690
+ - Provide context: why this checkpoint exists
691
+ - Make verification executable: clear, testable steps
692
+
693
+ **DON'T:**
694
+ - Ask human to do work Claude can automate (deploy, create resources, run builds)
695
+ - Assume knowledge: "Configure the usual settings" ❌
696
+ - Skip steps: "Set up database" ❌ (too vague)
697
+ - Mix multiple verifications in one checkpoint (split them)
698
+ - Make verification impossible (Claude can't check visual appearance without user confirmation)
699
+
700
+ **Placement:**
701
+ - **After automation completes** - not before Claude does the work
702
+ - **After UI buildout** - before declaring phase complete
703
+ - **Before dependent work** - decisions before implementation
704
+ - **At integration points** - after configuring external services
705
+
706
+ **Bad placement:**
707
+ - Before Claude automates (asking human to do automatable work) ❌
708
+ - Too frequent (every other task is a checkpoint) ❌
709
+ - Too late (checkpoint is last task, but earlier tasks needed its result) ❌
710
+ </writing_guidelines>
711
+
712
+ <examples>
713
+
714
+ ### Example 1: Deployment Flow (Correct)
715
+
716
+ ```xml
717
+ <!-- Claude automates everything -->
718
+ <task type="auto">
719
+ <name>Deploy to Vercel</name>
720
+ <files>.vercel/, vercel.json, package.json</files>
721
+ <action>
722
+ 1. Run `vercel --yes` to create project and deploy
723
+ 2. Capture deployment URL from output
724
+ 3. Set environment variables with `vercel env add`
725
+ 4. Trigger production deployment with `vercel --prod`
726
+ </action>
727
+ <verify>
728
+ - vercel ls shows deployment
729
+ - curl {url} returns 200
730
+ - Environment variables set correctly
731
+ </verify>
732
+ <done>App deployed to production, URL captured</done>
733
+ </task>
734
+
735
+ <!-- Human verifies visual/functional correctness -->
736
+ <task type="checkpoint:human-verify" gate="blocking">
737
+ <what-built>Deployed to https://myapp.vercel.app</what-built>
738
+ <how-to-verify>
739
+ Visit https://myapp.vercel.app and confirm:
740
+ - Homepage loads correctly
741
+ - All images/assets load
742
+ - Navigation works
743
+ - No console errors
744
+ </how-to-verify>
745
+ <resume-signal>Type "approved" or describe issues</resume-signal>
746
+ </task>
747
+ ```
748
+
749
+ ### Example 2: Database Setup (No Checkpoint Needed)
750
+
751
+ ```xml
752
+ <!-- Claude automates everything -->
753
+ <task type="auto">
754
+ <name>Create Upstash Redis database</name>
755
+ <files>.env</files>
756
+ <action>
757
+ 1. Run `upstash redis create myapp-cache --region us-east-1`
758
+ 2. Capture connection URL from output
759
+ 3. Write to .env: UPSTASH_REDIS_URL={url}
760
+ 4. Verify connection with test command
761
+ </action>
762
+ <verify>
763
+ - upstash redis list shows database
764
+ - .env contains UPSTASH_REDIS_URL
765
+ - Test connection succeeds
766
+ </verify>
767
+ <done>Redis database created and configured</done>
768
+ </task>
769
+
770
+ <!-- NO CHECKPOINT NEEDED - Claude automated everything and verified programmatically -->
771
+ ```
772
+
773
+ ### Example 3: Stripe Webhooks (Correct)
774
+
775
+ ```xml
776
+ <!-- Claude automates everything -->
777
+ <task type="auto">
778
+ <name>Configure Stripe webhooks</name>
779
+ <files>.env, src/app/api/webhooks/route.ts</files>
780
+ <action>
781
+ 1. Use Stripe API to create webhook endpoint pointing to /api/webhooks
782
+ 2. Subscribe to events: payment_intent.succeeded, customer.subscription.updated
783
+ 3. Save webhook signing secret to .env
784
+ 4. Implement webhook handler in route.ts
785
+ </action>
786
+ <verify>
787
+ - Stripe API returns webhook endpoint ID
788
+ - .env contains STRIPE_WEBHOOK_SECRET
789
+ - curl webhook endpoint returns 200
790
+ </verify>
791
+ <done>Stripe webhooks configured and handler implemented</done>
792
+ </task>
793
+
794
+ <!-- Human verifies in Stripe dashboard -->
795
+ <task type="checkpoint:human-verify" gate="blocking">
796
+ <what-built>Stripe webhook configured via API</what-built>
797
+ <how-to-verify>
798
+ Visit Stripe Dashboard > Developers > Webhooks
799
+ Confirm: Endpoint shows https://myapp.com/api/webhooks with correct events
800
+ </how-to-verify>
801
+ <resume-signal>Type "yes" if correct</resume-signal>
802
+ </task>
803
+ ```
804
+
805
+ ### Example 4: Full Auth Flow Verification (Correct)
806
+
807
+ ```xml
808
+ <task type="auto">
809
+ <name>Create user schema</name>
810
+ <files>src/db/schema.ts</files>
811
+ <action>Define User, Session, Account tables with Drizzle ORM</action>
812
+ <verify>npm run db:generate succeeds</verify>
813
+ </task>
814
+
815
+ <task type="auto">
816
+ <name>Create auth API routes</name>
817
+ <files>src/app/api/auth/[...nextauth]/route.ts</files>
818
+ <action>Set up NextAuth with GitHub provider, JWT strategy</action>
819
+ <verify>TypeScript compiles, no errors</verify>
820
+ </task>
821
+
822
+ <task type="auto">
823
+ <name>Create login UI</name>
824
+ <files>src/app/login/page.tsx, src/components/LoginButton.tsx</files>
825
+ <action>Create login page with GitHub OAuth button</action>
826
+ <verify>npm run build succeeds</verify>
827
+ </task>
828
+
829
+ <task type="auto">
830
+ <name>Start dev server for auth testing</name>
831
+ <action>Run `npm run dev` in background, wait for ready signal</action>
832
+ <verify>curl http://localhost:3000 returns 200</verify>
833
+ <done>Dev server running at http://localhost:3000</done>
834
+ </task>
835
+
836
+ <!-- ONE checkpoint at end verifies the complete flow - Claude already started server -->
837
+ <task type="checkpoint:human-verify" gate="blocking">
838
+ <what-built>Complete authentication flow - dev server running at http://localhost:3000</what-built>
839
+ <how-to-verify>
840
+ 1. Visit: http://localhost:3000/login
841
+ 2. Click "Sign in with GitHub"
842
+ 3. Complete GitHub OAuth flow
843
+ 4. Verify: Redirected to /dashboard, user name displayed
844
+ 5. Refresh page: Session persists
845
+ 6. Click logout: Session cleared
846
+ </how-to-verify>
847
+ <resume-signal>Type "approved" or describe issues</resume-signal>
848
+ </task>
849
+ ```
850
+ </examples>
851
+
852
+ <anti_patterns>
853
+
854
+ ### ❌ BAD: Asking user to start dev server
855
+
856
+ ```xml
857
+ <task type="checkpoint:human-verify" gate="blocking">
858
+ <what-built>Dashboard component</what-built>
859
+ <how-to-verify>
860
+ 1. Run: npm run dev
861
+ 2. Visit: http://localhost:3000/dashboard
862
+ 3. Check layout is correct
863
+ </how-to-verify>
864
+ </task>
865
+ ```
866
+
867
+ **Why bad:** Claude can run `npm run dev`. User should only visit URLs, not execute commands.
868
+
869
+ ### ✅ GOOD: Claude starts server, user visits
870
+
871
+ ```xml
872
+ <task type="auto">
873
+ <name>Start dev server</name>
874
+ <action>Run `npm run dev` in background</action>
875
+ <verify>curl localhost:3000 returns 200</verify>
876
+ </task>
877
+
878
+ <task type="checkpoint:human-verify" gate="blocking">
879
+ <what-built>Dashboard at http://localhost:3000/dashboard (server running)</what-built>
880
+ <how-to-verify>
881
+ Visit http://localhost:3000/dashboard and verify:
882
+ 1. Layout matches design
883
+ 2. No console errors
884
+ </how-to-verify>
885
+ </task>
886
+ ```
887
+
888
+ ### ❌ BAD: Asking user to add env vars in dashboard
889
+
890
+ ```xml
891
+ <task type="checkpoint:human-action" gate="blocking">
892
+ <action>Add environment variables to Convex</action>
893
+ <instructions>
894
+ 1. Go to dashboard.convex.dev
895
+ 2. Select your project
896
+ 3. Navigate to Settings → Environment Variables
897
+ 4. Add OPENAI_API_KEY with your key
898
+ </instructions>
899
+ </task>
900
+ ```
901
+
902
+ **Why bad:** Convex has `npx convex env set`. Claude should ask for the key value, then run the CLI command.
903
+
904
+ ### ✅ GOOD: Claude collects secret, adds via CLI
905
+
906
+ ```xml
907
+ <task type="checkpoint:human-action" gate="blocking">
908
+ <action>Provide your OpenAI API key</action>
909
+ <instructions>
910
+ I need your OpenAI API key. Get it from: https://platform.openai.com/api-keys
911
+ Paste the key below (starts with sk-)
912
+ </instructions>
913
+ <verification>I'll configure it via CLI</verification>
914
+ <resume-signal>Paste your key</resume-signal>
915
+ </task>
916
+
917
+ <task type="auto">
918
+ <name>Add OpenAI key to Convex</name>
919
+ <action>Run `npx convex env set OPENAI_API_KEY {key}`</action>
920
+ <verify>`npx convex env get` shows OPENAI_API_KEY configured</verify>
921
+ </task>
922
+ ```
923
+
924
+ ### ❌ BAD: Asking human to deploy
925
+
926
+ ```xml
927
+ <task type="checkpoint:human-action" gate="blocking">
928
+ <action>Deploy to Vercel</action>
929
+ <instructions>
930
+ 1. Visit vercel.com/new
931
+ 2. Import Git repository
932
+ 3. Click Deploy
933
+ 4. Copy deployment URL
934
+ </instructions>
935
+ <verification>Deployment exists</verification>
936
+ <resume-signal>Paste URL</resume-signal>
937
+ </task>
938
+ ```
939
+
940
+ **Why bad:** Vercel has a CLI. Claude should run `vercel --yes`.
941
+
942
+ ### ✅ GOOD: Claude automates, human verifies
943
+
944
+ ```xml
945
+ <task type="auto">
946
+ <name>Deploy to Vercel</name>
947
+ <action>Run `vercel --yes`. Capture URL.</action>
948
+ <verify>vercel ls shows deployment, curl returns 200</verify>
949
+ </task>
950
+
951
+ <task type="checkpoint:human-verify">
952
+ <what-built>Deployed to {url}</what-built>
953
+ <how-to-verify>Visit {url}, check homepage loads</how-to-verify>
954
+ <resume-signal>Type "approved"</resume-signal>
955
+ </task>
956
+ ```
957
+
958
+ ### ❌ BAD: Too many checkpoints
959
+
960
+ ```xml
961
+ <task type="auto">Create schema</task>
962
+ <task type="checkpoint:human-verify">Check schema</task>
963
+ <task type="auto">Create API route</task>
964
+ <task type="checkpoint:human-verify">Check API</task>
965
+ <task type="auto">Create UI form</task>
966
+ <task type="checkpoint:human-verify">Check form</task>
967
+ ```
968
+
969
+ **Why bad:** Verification fatigue. Combine into one checkpoint at end.
970
+
971
+ ### ✅ GOOD: Single verification checkpoint
972
+
973
+ ```xml
974
+ <task type="auto">Create schema</task>
975
+ <task type="auto">Create API route</task>
976
+ <task type="auto">Create UI form</task>
977
+
978
+ <task type="checkpoint:human-verify">
979
+ <what-built>Complete auth flow (schema + API + UI)</what-built>
980
+ <how-to-verify>Test full flow: register, login, access protected page</how-to-verify>
981
+ <resume-signal>Type "approved"</resume-signal>
982
+ </task>
983
+ ```
984
+
985
+ ### ❌ BAD: Asking for automatable file operations
986
+
987
+ ```xml
988
+ <task type="checkpoint:human-action">
989
+ <action>Create .env file</action>
990
+ <instructions>
991
+ 1. Create .env in project root
992
+ 2. Add: DATABASE_URL=...
993
+ 3. Add: STRIPE_KEY=...
994
+ </instructions>
995
+ </task>
996
+ ```
997
+
998
+ **Why bad:** Claude has Write tool. This should be `type="auto"`.
999
+
1000
+ ### ❌ BAD: Vague verification steps
1001
+
1002
+ ```xml
1003
+ <task type="checkpoint:human-verify">
1004
+ <what-built>Dashboard</what-built>
1005
+ <how-to-verify>Check it works</how-to-verify>
1006
+ <resume-signal>Continue</resume-signal>
1007
+ </task>
1008
+ ```
1009
+
1010
+ **Why bad:** No specifics. User doesn't know what to test or what "works" means.
1011
+
1012
+ ### ✅ GOOD: Specific verification steps (server already running)
1013
+
1014
+ ```xml
1015
+ <task type="checkpoint:human-verify">
1016
+ <what-built>Responsive dashboard - server running at http://localhost:3000</what-built>
1017
+ <how-to-verify>
1018
+ Visit http://localhost:3000/dashboard and verify:
1019
+ 1. Desktop (>1024px): Sidebar visible, content area fills remaining space
1020
+ 2. Tablet (768px): Sidebar collapses to icons
1021
+ 3. Mobile (375px): Sidebar hidden, hamburger menu in header
1022
+ 4. No horizontal scroll at any size
1023
+ </how-to-verify>
1024
+ <resume-signal>Type "approved" or describe layout issues</resume-signal>
1025
+ </task>
1026
+ ```
1027
+
1028
+ ### ❌ BAD: Asking user to run any CLI command
1029
+
1030
+ ```xml
1031
+ <task type="checkpoint:human-action">
1032
+ <action>Run database migrations</action>
1033
+ <instructions>
1034
+ 1. Run: npx prisma migrate deploy
1035
+ 2. Run: npx prisma db seed
1036
+ 3. Verify tables exist
1037
+ </instructions>
1038
+ </task>
1039
+ ```
1040
+
1041
+ **Why bad:** Claude can run these commands. User should never execute CLI commands.
1042
+
1043
+ ### ❌ BAD: Asking user to copy values between services
1044
+
1045
+ ```xml
1046
+ <task type="checkpoint:human-action">
1047
+ <action>Configure webhook URL in Stripe</action>
1048
+ <instructions>
1049
+ 1. Copy the deployment URL from terminal
1050
+ 2. Go to Stripe Dashboard → Webhooks
1051
+ 3. Add endpoint with URL + /api/webhooks
1052
+ 4. Copy webhook signing secret
1053
+ 5. Add to .env file
1054
+ </instructions>
1055
+ </task>
1056
+ ```
1057
+
1058
+ **Why bad:** Stripe has an API. Claude should create the webhook via API and write to .env directly.
1059
+
1060
+ </anti_patterns>
1061
+
1062
+ <summary>
1063
+
1064
+ Checkpoints formalize human-in-the-loop points. Use them when Claude cannot complete a task autonomously OR when human verification is required for correctness.
1065
+
1066
+ **The golden rule:** If Claude CAN automate it, Claude MUST automate it.
1067
+
1068
+ **Checkpoint priority:**
1069
+ 1. **checkpoint:human-verify** (90% of checkpoints) - Claude automated everything, human confirms visual/functional correctness
1070
+ 2. **checkpoint:decision** (9% of checkpoints) - Human makes architectural/technology choices
1071
+ 3. **checkpoint:human-action** (1% of checkpoints) - Truly unavoidable manual steps with no API/CLI
1072
+
1073
+ **When NOT to use checkpoints:**
1074
+ - Things Claude can verify programmatically (tests pass, build succeeds)
1075
+ - File operations (Claude can read files to verify)
1076
+ - Code correctness (use tests and static analysis)
1077
+ - Anything automatable via CLI/API
1078
+ </summary>