@howlil/ez-agents 3.1.0 → 3.4.2

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 (110) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +288 -718
  3. package/bin/install.js +438 -71
  4. package/commands/ez/auth.md +87 -0
  5. package/commands/ez/join-discord.md +18 -18
  6. package/ez-agents/bin/ez-tools.cjs +120 -2
  7. package/ez-agents/bin/lib/assistant-adapter.cjs +264 -205
  8. package/ez-agents/bin/lib/audit-exec.cjs +26 -9
  9. package/ez-agents/bin/lib/auth.cjs +2 -1
  10. package/ez-agents/bin/lib/circuit-breaker.cjs +118 -118
  11. package/ez-agents/bin/lib/commands.cjs +42 -23
  12. package/ez-agents/bin/lib/config.cjs +190 -183
  13. package/ez-agents/bin/lib/core.cjs +42 -25
  14. package/ez-agents/bin/lib/file-lock.cjs +236 -236
  15. package/ez-agents/bin/lib/frontmatter.cjs +299 -299
  16. package/ez-agents/bin/lib/fs-utils.cjs +153 -153
  17. package/ez-agents/bin/lib/git-utils.cjs +203 -203
  18. package/ez-agents/bin/lib/health-check.cjs +2 -3
  19. package/ez-agents/bin/lib/index.cjs +113 -113
  20. package/ez-agents/bin/lib/init.cjs +757 -710
  21. package/ez-agents/bin/lib/logger.cjs +52 -15
  22. package/ez-agents/bin/lib/milestone.cjs +241 -241
  23. package/ez-agents/bin/lib/model-provider.cjs +241 -146
  24. package/ez-agents/bin/lib/phase.cjs +925 -908
  25. package/ez-agents/bin/lib/planning-write.cjs +107 -0
  26. package/ez-agents/bin/lib/retry.cjs +119 -119
  27. package/ez-agents/bin/lib/roadmap.cjs +306 -305
  28. package/ez-agents/bin/lib/safe-exec.cjs +91 -5
  29. package/ez-agents/bin/lib/safe-path.cjs +130 -130
  30. package/ez-agents/bin/lib/state.cjs +736 -721
  31. package/ez-agents/bin/lib/temp-file.cjs +239 -239
  32. package/ez-agents/bin/lib/template.cjs +223 -222
  33. package/ez-agents/bin/lib/test-file-lock.cjs +112 -112
  34. package/ez-agents/bin/lib/test-graceful.cjs +93 -93
  35. package/ez-agents/bin/lib/test-logger.cjs +60 -60
  36. package/ez-agents/bin/lib/test-safe-exec.cjs +38 -38
  37. package/ez-agents/bin/lib/test-safe-path.cjs +33 -33
  38. package/ez-agents/bin/lib/test-temp-file.cjs +125 -125
  39. package/ez-agents/bin/lib/timeout-exec.cjs +63 -62
  40. package/ez-agents/bin/lib/verify.cjs +69 -26
  41. package/ez-agents/references/checkpoints.md +776 -776
  42. package/ez-agents/references/continuation-format.md +249 -249
  43. package/ez-agents/references/questioning.md +162 -162
  44. package/ez-agents/references/tdd.md +263 -263
  45. package/ez-agents/templates/codebase/concerns.md +310 -310
  46. package/ez-agents/templates/codebase/conventions.md +307 -307
  47. package/ez-agents/templates/codebase/integrations.md +280 -280
  48. package/ez-agents/templates/codebase/stack.md +186 -186
  49. package/ez-agents/templates/codebase/testing.md +480 -480
  50. package/ez-agents/templates/config.json +37 -37
  51. package/ez-agents/templates/continue-here.md +78 -78
  52. package/ez-agents/templates/milestone-archive.md +123 -123
  53. package/ez-agents/templates/milestone.md +115 -115
  54. package/ez-agents/templates/requirements.md +231 -231
  55. package/ez-agents/templates/research-project/ARCHITECTURE.md +204 -204
  56. package/ez-agents/templates/research-project/FEATURES.md +147 -147
  57. package/ez-agents/templates/research-project/PITFALLS.md +200 -200
  58. package/ez-agents/templates/research-project/STACK.md +120 -120
  59. package/ez-agents/templates/research-project/SUMMARY.md +170 -170
  60. package/ez-agents/templates/retrospective.md +54 -54
  61. package/ez-agents/templates/roadmap.md +202 -202
  62. package/ez-agents/templates/summary-minimal.md +41 -41
  63. package/ez-agents/templates/summary-standard.md +48 -48
  64. package/ez-agents/templates/summary.md +248 -248
  65. package/ez-agents/templates/user-setup.md +311 -311
  66. package/ez-agents/templates/verification-report.md +322 -322
  67. package/ez-agents/workflows/add-phase.md +112 -112
  68. package/ez-agents/workflows/add-tests.md +351 -351
  69. package/ez-agents/workflows/add-todo.md +158 -158
  70. package/ez-agents/workflows/audit-milestone.md +332 -332
  71. package/ez-agents/workflows/autonomous.md +743 -743
  72. package/ez-agents/workflows/check-todos.md +177 -177
  73. package/ez-agents/workflows/cleanup.md +152 -152
  74. package/ez-agents/workflows/complete-milestone.md +766 -766
  75. package/ez-agents/workflows/diagnose-issues.md +219 -219
  76. package/ez-agents/workflows/discovery-phase.md +289 -289
  77. package/ez-agents/workflows/discuss-phase.md +762 -762
  78. package/ez-agents/workflows/execute-phase.md +468 -468
  79. package/ez-agents/workflows/execute-plan.md +483 -483
  80. package/ez-agents/workflows/health.md +159 -159
  81. package/ez-agents/workflows/help.md +492 -492
  82. package/ez-agents/workflows/insert-phase.md +130 -130
  83. package/ez-agents/workflows/list-phase-assumptions.md +178 -178
  84. package/ez-agents/workflows/map-codebase.md +316 -316
  85. package/ez-agents/workflows/new-milestone.md +384 -384
  86. package/ez-agents/workflows/new-project.md +1113 -1111
  87. package/ez-agents/workflows/node-repair.md +92 -92
  88. package/ez-agents/workflows/pause-work.md +122 -122
  89. package/ez-agents/workflows/plan-milestone-gaps.md +274 -274
  90. package/ez-agents/workflows/plan-phase.md +651 -651
  91. package/ez-agents/workflows/progress.md +382 -382
  92. package/ez-agents/workflows/quick.md +610 -610
  93. package/ez-agents/workflows/remove-phase.md +155 -155
  94. package/ez-agents/workflows/research-phase.md +74 -74
  95. package/ez-agents/workflows/resume-project.md +307 -307
  96. package/ez-agents/workflows/set-profile.md +81 -81
  97. package/ez-agents/workflows/settings.md +242 -242
  98. package/ez-agents/workflows/stats.md +57 -57
  99. package/ez-agents/workflows/transition.md +544 -544
  100. package/ez-agents/workflows/ui-phase.md +290 -290
  101. package/ez-agents/workflows/ui-review.md +157 -157
  102. package/ez-agents/workflows/update.md +320 -320
  103. package/ez-agents/workflows/validate-phase.md +167 -167
  104. package/ez-agents/workflows/verify-phase.md +243 -243
  105. package/ez-agents/workflows/verify-work.md +584 -584
  106. package/package.json +2 -3
  107. package/scripts/build-hooks.js +43 -43
  108. package/scripts/fix-qwen-installation.js +144 -0
  109. package/scripts/run-tests.cjs +29 -29
  110. package/README.zh-CN.md +0 -702
@@ -1,311 +1,311 @@
1
- # User Setup Template
2
-
3
- Template for `.planning/phases/XX-name/{phase}-USER-SETUP.md` - human-required configuration that Claude cannot automate.
4
-
5
- **Purpose:** Document setup tasks that literally require human action - account creation, dashboard configuration, secret retrieval. Claude automates everything possible; this file captures only what remains.
6
-
7
- ---
8
-
9
- ## File Template
10
-
11
- ```markdown
12
- # Phase {X}: User Setup Required
13
-
14
- **Generated:** [YYYY-MM-DD]
15
- **Phase:** {phase-name}
16
- **Status:** Incomplete
17
-
18
- Complete these items for the integration to function. Claude automated everything possible; these items require human access to external dashboards/accounts.
19
-
20
- ## Environment Variables
21
-
22
- | Status | Variable | Source | Add to |
23
- |--------|----------|--------|--------|
24
- | [ ] | `ENV_VAR_NAME` | [Service Dashboard → Path → To → Value] | `.env.local` |
25
- | [ ] | `ANOTHER_VAR` | [Service Dashboard → Path → To → Value] | `.env.local` |
26
-
27
- ## Account Setup
28
-
29
- [Only if new account creation is required]
30
-
31
- - [ ] **Create [Service] account**
32
- - URL: [signup URL]
33
- - Skip if: Already have account
34
-
35
- ## Dashboard Configuration
36
-
37
- [Only if dashboard configuration is required]
38
-
39
- - [ ] **[Configuration task]**
40
- - Location: [Service Dashboard → Path → To → Setting]
41
- - Set to: [Required value or configuration]
42
- - Notes: [Any important details]
43
-
44
- ## Verification
45
-
46
- After completing setup, verify with:
47
-
48
- ```bash
49
- # [Verification commands]
50
- ```
51
-
52
- Expected results:
53
- - [What success looks like]
54
-
55
- ---
56
-
57
- **Once all items complete:** Mark status as "Complete" at top of file.
58
- ```
59
-
60
- ---
61
-
62
- ## When to Generate
63
-
64
- Generate `{phase}-USER-SETUP.md` when plan frontmatter contains `user_setup` field.
65
-
66
- **Trigger:** `user_setup` exists in PLAN.md frontmatter and has items.
67
-
68
- **Location:** Same directory as PLAN.md and SUMMARY.md.
69
-
70
- **Timing:** Generated during execute-plan.md after tasks complete, before SUMMARY.md creation.
71
-
72
- ---
73
-
74
- ## Frontmatter Schema
75
-
76
- In PLAN.md, `user_setup` declares human-required configuration:
77
-
78
- ```yaml
79
- user_setup:
80
- - service: stripe
81
- why: "Payment processing requires API keys"
82
- env_vars:
83
- - name: STRIPE_SECRET_KEY
84
- source: "Stripe Dashboard → Developers → API keys → Secret key"
85
- - name: STRIPE_WEBHOOK_SECRET
86
- source: "Stripe Dashboard → Developers → Webhooks → Signing secret"
87
- dashboard_config:
88
- - task: "Create webhook endpoint"
89
- location: "Stripe Dashboard → Developers → Webhooks → Add endpoint"
90
- details: "URL: https://[your-domain]/api/webhooks/stripe, Events: checkout.session.completed, customer.subscription.*"
91
- local_dev:
92
- - "Run: stripe listen --forward-to localhost:3000/api/webhooks/stripe"
93
- - "Use the webhook secret from CLI output for local testing"
94
- ```
95
-
96
- ---
97
-
98
- ## The Automation-First Rule
99
-
100
- **USER-SETUP.md contains ONLY what Claude literally cannot do.**
101
-
102
- | Claude CAN Do (not in USER-SETUP) | Claude CANNOT Do (→ USER-SETUP) |
103
- |-----------------------------------|--------------------------------|
104
- | `npm install stripe` | Create Stripe account |
105
- | Write webhook handler code | Get API keys from dashboard |
106
- | Create `.env.local` file structure | Copy actual secret values |
107
- | Run `stripe listen` | Authenticate Stripe CLI (browser OAuth) |
108
- | Configure package.json | Access external service dashboards |
109
- | Write any code | Retrieve secrets from third-party systems |
110
-
111
- **The test:** "Does this require a human in a browser, accessing an account Claude doesn't have credentials for?"
112
- - Yes → USER-SETUP.md
113
- - No → Claude does it automatically
114
-
115
- ---
116
-
117
- ## Service-Specific Examples
118
-
119
- <stripe_example>
120
- ```markdown
121
- # Phase 10: User Setup Required
122
-
123
- **Generated:** 2025-01-14
124
- **Phase:** 10-monetization
125
- **Status:** Incomplete
126
-
127
- Complete these items for Stripe integration to function.
128
-
129
- ## Environment Variables
130
-
131
- | Status | Variable | Source | Add to |
132
- |--------|----------|--------|--------|
133
- | [ ] | `STRIPE_SECRET_KEY` | Stripe Dashboard → Developers → API keys → Secret key | `.env.local` |
134
- | [ ] | `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY` | Stripe Dashboard → Developers → API keys → Publishable key | `.env.local` |
135
- | [ ] | `STRIPE_WEBHOOK_SECRET` | Stripe Dashboard → Developers → Webhooks → [endpoint] → Signing secret | `.env.local` |
136
-
137
- ## Account Setup
138
-
139
- - [ ] **Create Stripe account** (if needed)
140
- - URL: https://dashboard.stripe.com/register
141
- - Skip if: Already have Stripe account
142
-
143
- ## Dashboard Configuration
144
-
145
- - [ ] **Create webhook endpoint**
146
- - Location: Stripe Dashboard → Developers → Webhooks → Add endpoint
147
- - Endpoint URL: `https://[your-domain]/api/webhooks/stripe`
148
- - Events to send:
149
- - `checkout.session.completed`
150
- - `customer.subscription.created`
151
- - `customer.subscription.updated`
152
- - `customer.subscription.deleted`
153
-
154
- - [ ] **Create products and prices** (if using subscription tiers)
155
- - Location: Stripe Dashboard → Products → Add product
156
- - Create each subscription tier
157
- - Copy Price IDs to:
158
- - `STRIPE_STARTER_PRICE_ID`
159
- - `STRIPE_PRO_PRICE_ID`
160
-
161
- ## Local Development
162
-
163
- For local webhook testing:
164
- ```bash
165
- stripe listen --forward-to localhost:3000/api/webhooks/stripe
166
- ```
167
- Use the webhook signing secret from CLI output (starts with `whsec_`).
168
-
169
- ## Verification
170
-
171
- After completing setup:
172
-
173
- ```bash
174
- # Check env vars are set
175
- grep STRIPE .env.local
176
-
177
- # Verify build passes
178
- npm run build
179
-
180
- # Test webhook endpoint (should return 400 bad signature, not 500 crash)
181
- curl -X POST http://localhost:3000/api/webhooks/stripe \
182
- -H "Content-Type: application/json" \
183
- -d '{}'
184
- ```
185
-
186
- Expected: Build passes, webhook returns 400 (signature validation working).
187
-
188
- ---
189
-
190
- **Once all items complete:** Mark status as "Complete" at top of file.
191
- ```
192
- </stripe_example>
193
-
194
- <supabase_example>
195
- ```markdown
196
- # Phase 2: User Setup Required
197
-
198
- **Generated:** 2025-01-14
199
- **Phase:** 02-authentication
200
- **Status:** Incomplete
201
-
202
- Complete these items for Supabase Auth to function.
203
-
204
- ## Environment Variables
205
-
206
- | Status | Variable | Source | Add to |
207
- |--------|----------|--------|--------|
208
- | [ ] | `NEXT_PUBLIC_SUPABASE_URL` | Supabase Dashboard → Settings → API → Project URL | `.env.local` |
209
- | [ ] | `NEXT_PUBLIC_SUPABASE_ANON_KEY` | Supabase Dashboard → Settings → API → anon public | `.env.local` |
210
- | [ ] | `SUPABASE_SERVICE_ROLE_KEY` | Supabase Dashboard → Settings → API → service_role | `.env.local` |
211
-
212
- ## Account Setup
213
-
214
- - [ ] **Create Supabase project**
215
- - URL: https://supabase.com/dashboard/new
216
- - Skip if: Already have project for this app
217
-
218
- ## Dashboard Configuration
219
-
220
- - [ ] **Enable Email Auth**
221
- - Location: Supabase Dashboard → Authentication → Providers
222
- - Enable: Email provider
223
- - Configure: Confirm email (on/off based on preference)
224
-
225
- - [ ] **Configure OAuth providers** (if using social login)
226
- - Location: Supabase Dashboard → Authentication → Providers
227
- - For Google: Add Client ID and Secret from Google Cloud Console
228
- - For GitHub: Add Client ID and Secret from GitHub OAuth Apps
229
-
230
- ## Verification
231
-
232
- After completing setup:
233
-
234
- ```bash
235
- # Check env vars
236
- grep SUPABASE .env.local
237
-
238
- # Verify connection (run in project directory)
239
- npx supabase status
240
- ```
241
-
242
- ---
243
-
244
- **Once all items complete:** Mark status as "Complete" at top of file.
245
- ```
246
- </supabase_example>
247
-
248
- <sendgrid_example>
249
- ```markdown
250
- # Phase 5: User Setup Required
251
-
252
- **Generated:** 2025-01-14
253
- **Phase:** 05-notifications
254
- **Status:** Incomplete
255
-
256
- Complete these items for SendGrid email to function.
257
-
258
- ## Environment Variables
259
-
260
- | Status | Variable | Source | Add to |
261
- |--------|----------|--------|--------|
262
- | [ ] | `SENDGRID_API_KEY` | SendGrid Dashboard → Settings → API Keys → Create API Key | `.env.local` |
263
- | [ ] | `SENDGRID_FROM_EMAIL` | Your verified sender email address | `.env.local` |
264
-
265
- ## Account Setup
266
-
267
- - [ ] **Create SendGrid account**
268
- - URL: https://signup.sendgrid.com/
269
- - Skip if: Already have account
270
-
271
- ## Dashboard Configuration
272
-
273
- - [ ] **Verify sender identity**
274
- - Location: SendGrid Dashboard → Settings → Sender Authentication
275
- - Option 1: Single Sender Verification (quick, for dev)
276
- - Option 2: Domain Authentication (production)
277
-
278
- - [ ] **Create API Key**
279
- - Location: SendGrid Dashboard → Settings → API Keys → Create API Key
280
- - Permission: Restricted Access → Mail Send (Full Access)
281
- - Copy key immediately (shown only once)
282
-
283
- ## Verification
284
-
285
- After completing setup:
286
-
287
- ```bash
288
- # Check env var
289
- grep SENDGRID .env.local
290
-
291
- # Test email sending (replace with your test email)
292
- curl -X POST http://localhost:3000/api/test-email \
293
- -H "Content-Type: application/json" \
294
- -d '{"to": "your@email.com"}'
295
- ```
296
-
297
- ---
298
-
299
- **Once all items complete:** Mark status as "Complete" at top of file.
300
- ```
301
- </sendgrid_example>
302
-
303
- ---
304
-
305
- ## Guidelines
306
-
307
- **Never include:** Actual secret values. Steps Claude can automate (package installs, code changes).
308
-
309
- **Naming:** `{phase}-USER-SETUP.md` matches the phase number pattern.
310
- **Status tracking:** User marks checkboxes and updates status line when complete.
311
- **Searchability:** `grep -r "USER-SETUP" .planning/` finds all phases with user requirements.
1
+ # User Setup Template
2
+
3
+ Template for `.planning/phases/XX-name/{phase}-USER-SETUP.md` - human-required configuration that Claude cannot automate.
4
+
5
+ **Purpose:** Document setup tasks that literally require human action - account creation, dashboard configuration, secret retrieval. Claude automates everything possible; this file captures only what remains.
6
+
7
+ ---
8
+
9
+ ## File Template
10
+
11
+ ```markdown
12
+ # Phase {X}: User Setup Required
13
+
14
+ **Generated:** [YYYY-MM-DD]
15
+ **Phase:** {phase-name}
16
+ **Status:** Incomplete
17
+
18
+ Complete these items for the integration to function. Claude automated everything possible; these items require human access to external dashboards/accounts.
19
+
20
+ ## Environment Variables
21
+
22
+ | Status | Variable | Source | Add to |
23
+ |--------|----------|--------|--------|
24
+ | [ ] | `ENV_VAR_NAME` | [Service Dashboard → Path → To → Value] | `.env.local` |
25
+ | [ ] | `ANOTHER_VAR` | [Service Dashboard → Path → To → Value] | `.env.local` |
26
+
27
+ ## Account Setup
28
+
29
+ [Only if new account creation is required]
30
+
31
+ - [ ] **Create [Service] account**
32
+ - URL: [signup URL]
33
+ - Skip if: Already have account
34
+
35
+ ## Dashboard Configuration
36
+
37
+ [Only if dashboard configuration is required]
38
+
39
+ - [ ] **[Configuration task]**
40
+ - Location: [Service Dashboard → Path → To → Setting]
41
+ - Set to: [Required value or configuration]
42
+ - Notes: [Any important details]
43
+
44
+ ## Verification
45
+
46
+ After completing setup, verify with:
47
+
48
+ ```bash
49
+ # [Verification commands]
50
+ ```
51
+
52
+ Expected results:
53
+ - [What success looks like]
54
+
55
+ ---
56
+
57
+ **Once all items complete:** Mark status as "Complete" at top of file.
58
+ ```
59
+
60
+ ---
61
+
62
+ ## When to Generate
63
+
64
+ Generate `{phase}-USER-SETUP.md` when plan frontmatter contains `user_setup` field.
65
+
66
+ **Trigger:** `user_setup` exists in PLAN.md frontmatter and has items.
67
+
68
+ **Location:** Same directory as PLAN.md and SUMMARY.md.
69
+
70
+ **Timing:** Generated during execute-plan.md after tasks complete, before SUMMARY.md creation.
71
+
72
+ ---
73
+
74
+ ## Frontmatter Schema
75
+
76
+ In PLAN.md, `user_setup` declares human-required configuration:
77
+
78
+ ```yaml
79
+ user_setup:
80
+ - service: stripe
81
+ why: "Payment processing requires API keys"
82
+ env_vars:
83
+ - name: STRIPE_SECRET_KEY
84
+ source: "Stripe Dashboard → Developers → API keys → Secret key"
85
+ - name: STRIPE_WEBHOOK_SECRET
86
+ source: "Stripe Dashboard → Developers → Webhooks → Signing secret"
87
+ dashboard_config:
88
+ - task: "Create webhook endpoint"
89
+ location: "Stripe Dashboard → Developers → Webhooks → Add endpoint"
90
+ details: "URL: https://[your-domain]/api/webhooks/stripe, Events: checkout.session.completed, customer.subscription.*"
91
+ local_dev:
92
+ - "Run: stripe listen --forward-to localhost:3000/api/webhooks/stripe"
93
+ - "Use the webhook secret from CLI output for local testing"
94
+ ```
95
+
96
+ ---
97
+
98
+ ## The Automation-First Rule
99
+
100
+ **USER-SETUP.md contains ONLY what Claude literally cannot do.**
101
+
102
+ | Claude CAN Do (not in USER-SETUP) | Claude CANNOT Do (→ USER-SETUP) |
103
+ |-----------------------------------|--------------------------------|
104
+ | `npm install stripe` | Create Stripe account |
105
+ | Write webhook handler code | Get API keys from dashboard |
106
+ | Create `.env.local` file structure | Copy actual secret values |
107
+ | Run `stripe listen` | Authenticate Stripe CLI (browser OAuth) |
108
+ | Configure package.json | Access external service dashboards |
109
+ | Write any code | Retrieve secrets from third-party systems |
110
+
111
+ **The test:** "Does this require a human in a browser, accessing an account Claude doesn't have credentials for?"
112
+ - Yes → USER-SETUP.md
113
+ - No → Claude does it automatically
114
+
115
+ ---
116
+
117
+ ## Service-Specific Examples
118
+
119
+ <stripe_example>
120
+ ```markdown
121
+ # Phase 10: User Setup Required
122
+
123
+ **Generated:** 2025-01-14
124
+ **Phase:** 10-monetization
125
+ **Status:** Incomplete
126
+
127
+ Complete these items for Stripe integration to function.
128
+
129
+ ## Environment Variables
130
+
131
+ | Status | Variable | Source | Add to |
132
+ |--------|----------|--------|--------|
133
+ | [ ] | `STRIPE_SECRET_KEY` | Stripe Dashboard → Developers → API keys → Secret key | `.env.local` |
134
+ | [ ] | `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY` | Stripe Dashboard → Developers → API keys → Publishable key | `.env.local` |
135
+ | [ ] | `STRIPE_WEBHOOK_SECRET` | Stripe Dashboard → Developers → Webhooks → [endpoint] → Signing secret | `.env.local` |
136
+
137
+ ## Account Setup
138
+
139
+ - [ ] **Create Stripe account** (if needed)
140
+ - URL: https://dashboard.stripe.com/register
141
+ - Skip if: Already have Stripe account
142
+
143
+ ## Dashboard Configuration
144
+
145
+ - [ ] **Create webhook endpoint**
146
+ - Location: Stripe Dashboard → Developers → Webhooks → Add endpoint
147
+ - Endpoint URL: `https://[your-domain]/api/webhooks/stripe`
148
+ - Events to send:
149
+ - `checkout.session.completed`
150
+ - `customer.subscription.created`
151
+ - `customer.subscription.updated`
152
+ - `customer.subscription.deleted`
153
+
154
+ - [ ] **Create products and prices** (if using subscription tiers)
155
+ - Location: Stripe Dashboard → Products → Add product
156
+ - Create each subscription tier
157
+ - Copy Price IDs to:
158
+ - `STRIPE_STARTER_PRICE_ID`
159
+ - `STRIPE_PRO_PRICE_ID`
160
+
161
+ ## Local Development
162
+
163
+ For local webhook testing:
164
+ ```bash
165
+ stripe listen --forward-to localhost:3000/api/webhooks/stripe
166
+ ```
167
+ Use the webhook signing secret from CLI output (starts with `whsec_`).
168
+
169
+ ## Verification
170
+
171
+ After completing setup:
172
+
173
+ ```bash
174
+ # Check env vars are set
175
+ grep STRIPE .env.local
176
+
177
+ # Verify build passes
178
+ npm run build
179
+
180
+ # Test webhook endpoint (should return 400 bad signature, not 500 crash)
181
+ curl -X POST http://localhost:3000/api/webhooks/stripe \
182
+ -H "Content-Type: application/json" \
183
+ -d '{}'
184
+ ```
185
+
186
+ Expected: Build passes, webhook returns 400 (signature validation working).
187
+
188
+ ---
189
+
190
+ **Once all items complete:** Mark status as "Complete" at top of file.
191
+ ```
192
+ </stripe_example>
193
+
194
+ <supabase_example>
195
+ ```markdown
196
+ # Phase 2: User Setup Required
197
+
198
+ **Generated:** 2025-01-14
199
+ **Phase:** 02-authentication
200
+ **Status:** Incomplete
201
+
202
+ Complete these items for Supabase Auth to function.
203
+
204
+ ## Environment Variables
205
+
206
+ | Status | Variable | Source | Add to |
207
+ |--------|----------|--------|--------|
208
+ | [ ] | `NEXT_PUBLIC_SUPABASE_URL` | Supabase Dashboard → Settings → API → Project URL | `.env.local` |
209
+ | [ ] | `NEXT_PUBLIC_SUPABASE_ANON_KEY` | Supabase Dashboard → Settings → API → anon public | `.env.local` |
210
+ | [ ] | `SUPABASE_SERVICE_ROLE_KEY` | Supabase Dashboard → Settings → API → service_role | `.env.local` |
211
+
212
+ ## Account Setup
213
+
214
+ - [ ] **Create Supabase project**
215
+ - URL: https://supabase.com/dashboard/new
216
+ - Skip if: Already have project for this app
217
+
218
+ ## Dashboard Configuration
219
+
220
+ - [ ] **Enable Email Auth**
221
+ - Location: Supabase Dashboard → Authentication → Providers
222
+ - Enable: Email provider
223
+ - Configure: Confirm email (on/off based on preference)
224
+
225
+ - [ ] **Configure OAuth providers** (if using social login)
226
+ - Location: Supabase Dashboard → Authentication → Providers
227
+ - For Google: Add Client ID and Secret from Google Cloud Console
228
+ - For GitHub: Add Client ID and Secret from GitHub OAuth Apps
229
+
230
+ ## Verification
231
+
232
+ After completing setup:
233
+
234
+ ```bash
235
+ # Check env vars
236
+ grep SUPABASE .env.local
237
+
238
+ # Verify connection (run in project directory)
239
+ npx supabase status
240
+ ```
241
+
242
+ ---
243
+
244
+ **Once all items complete:** Mark status as "Complete" at top of file.
245
+ ```
246
+ </supabase_example>
247
+
248
+ <sendgrid_example>
249
+ ```markdown
250
+ # Phase 5: User Setup Required
251
+
252
+ **Generated:** 2025-01-14
253
+ **Phase:** 05-notifications
254
+ **Status:** Incomplete
255
+
256
+ Complete these items for SendGrid email to function.
257
+
258
+ ## Environment Variables
259
+
260
+ | Status | Variable | Source | Add to |
261
+ |--------|----------|--------|--------|
262
+ | [ ] | `SENDGRID_API_KEY` | SendGrid Dashboard → Settings → API Keys → Create API Key | `.env.local` |
263
+ | [ ] | `SENDGRID_FROM_EMAIL` | Your verified sender email address | `.env.local` |
264
+
265
+ ## Account Setup
266
+
267
+ - [ ] **Create SendGrid account**
268
+ - URL: https://signup.sendgrid.com/
269
+ - Skip if: Already have account
270
+
271
+ ## Dashboard Configuration
272
+
273
+ - [ ] **Verify sender identity**
274
+ - Location: SendGrid Dashboard → Settings → Sender Authentication
275
+ - Option 1: Single Sender Verification (quick, for dev)
276
+ - Option 2: Domain Authentication (production)
277
+
278
+ - [ ] **Create API Key**
279
+ - Location: SendGrid Dashboard → Settings → API Keys → Create API Key
280
+ - Permission: Restricted Access → Mail Send (Full Access)
281
+ - Copy key immediately (shown only once)
282
+
283
+ ## Verification
284
+
285
+ After completing setup:
286
+
287
+ ```bash
288
+ # Check env var
289
+ grep SENDGRID .env.local
290
+
291
+ # Test email sending (replace with your test email)
292
+ curl -X POST http://localhost:3000/api/test-email \
293
+ -H "Content-Type: application/json" \
294
+ -d '{"to": "your@email.com"}'
295
+ ```
296
+
297
+ ---
298
+
299
+ **Once all items complete:** Mark status as "Complete" at top of file.
300
+ ```
301
+ </sendgrid_example>
302
+
303
+ ---
304
+
305
+ ## Guidelines
306
+
307
+ **Never include:** Actual secret values. Steps Claude can automate (package installs, code changes).
308
+
309
+ **Naming:** `{phase}-USER-SETUP.md` matches the phase number pattern.
310
+ **Status tracking:** User marks checkboxes and updates status line when complete.
311
+ **Searchability:** `grep -r "USER-SETUP" .planning/` finds all phases with user requirements.