@m3hti/commit-genie 3.2.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/.claude/agents/gsd-codebase-mapper.md +764 -0
  2. package/.claude/agents/gsd-debugger.md +1246 -0
  3. package/.claude/agents/gsd-executor.md +469 -0
  4. package/.claude/agents/gsd-integration-checker.md +443 -0
  5. package/.claude/agents/gsd-phase-researcher.md +546 -0
  6. package/.claude/agents/gsd-plan-checker.md +690 -0
  7. package/.claude/agents/gsd-planner.md +1275 -0
  8. package/.claude/agents/gsd-project-researcher.md +621 -0
  9. package/.claude/agents/gsd-research-synthesizer.md +239 -0
  10. package/.claude/agents/gsd-roadmapper.md +642 -0
  11. package/.claude/agents/gsd-verifier.md +573 -0
  12. package/.claude/commands/gsd/add-phase.md +43 -0
  13. package/.claude/commands/gsd/add-tests.md +41 -0
  14. package/.claude/commands/gsd/add-todo.md +47 -0
  15. package/.claude/commands/gsd/audit-milestone.md +36 -0
  16. package/.claude/commands/gsd/check-todos.md +45 -0
  17. package/.claude/commands/gsd/cleanup.md +18 -0
  18. package/.claude/commands/gsd/complete-milestone.md +136 -0
  19. package/.claude/commands/gsd/debug.md +167 -0
  20. package/.claude/commands/gsd/discuss-phase.md +83 -0
  21. package/.claude/commands/gsd/execute-phase.md +41 -0
  22. package/.claude/commands/gsd/health.md +22 -0
  23. package/.claude/commands/gsd/help.md +22 -0
  24. package/.claude/commands/gsd/insert-phase.md +32 -0
  25. package/.claude/commands/gsd/join-discord.md +18 -0
  26. package/.claude/commands/gsd/list-phase-assumptions.md +46 -0
  27. package/.claude/commands/gsd/map-codebase.md +71 -0
  28. package/.claude/commands/gsd/new-milestone.md +44 -0
  29. package/.claude/commands/gsd/new-project.md +42 -0
  30. package/.claude/commands/gsd/new-project.md.bak +1041 -0
  31. package/.claude/commands/gsd/pause-work.md +38 -0
  32. package/.claude/commands/gsd/plan-milestone-gaps.md +34 -0
  33. package/.claude/commands/gsd/plan-phase.md +45 -0
  34. package/.claude/commands/gsd/progress.md +24 -0
  35. package/.claude/commands/gsd/quick.md +41 -0
  36. package/.claude/commands/gsd/reapply-patches.md +110 -0
  37. package/.claude/commands/gsd/remove-phase.md +31 -0
  38. package/.claude/commands/gsd/research-phase.md +189 -0
  39. package/.claude/commands/gsd/resume-work.md +40 -0
  40. package/.claude/commands/gsd/set-profile.md +34 -0
  41. package/.claude/commands/gsd/settings.md +36 -0
  42. package/.claude/commands/gsd/update.md +37 -0
  43. package/.claude/commands/gsd/verify-work.md +38 -0
  44. package/.claude/get-shit-done/VERSION +1 -0
  45. package/.claude/get-shit-done/bin/gsd-tools.cjs +588 -0
  46. package/.claude/get-shit-done/bin/lib/commands.cjs +553 -0
  47. package/.claude/get-shit-done/bin/lib/config.cjs +162 -0
  48. package/.claude/get-shit-done/bin/lib/core.cjs +411 -0
  49. package/.claude/get-shit-done/bin/lib/frontmatter.cjs +299 -0
  50. package/.claude/get-shit-done/bin/lib/init.cjs +710 -0
  51. package/.claude/get-shit-done/bin/lib/milestone.cjs +216 -0
  52. package/.claude/get-shit-done/bin/lib/phase.cjs +871 -0
  53. package/.claude/get-shit-done/bin/lib/roadmap.cjs +298 -0
  54. package/.claude/get-shit-done/bin/lib/state.cjs +679 -0
  55. package/.claude/get-shit-done/bin/lib/template.cjs +222 -0
  56. package/.claude/get-shit-done/bin/lib/verify.cjs +773 -0
  57. package/.claude/get-shit-done/references/checkpoints.md +776 -0
  58. package/.claude/get-shit-done/references/continuation-format.md +249 -0
  59. package/.claude/get-shit-done/references/decimal-phase-calculation.md +65 -0
  60. package/.claude/get-shit-done/references/git-integration.md +248 -0
  61. package/.claude/get-shit-done/references/git-planning-commit.md +38 -0
  62. package/.claude/get-shit-done/references/model-profile-resolution.md +34 -0
  63. package/.claude/get-shit-done/references/model-profiles.md +92 -0
  64. package/.claude/get-shit-done/references/phase-argument-parsing.md +61 -0
  65. package/.claude/get-shit-done/references/planning-config.md +196 -0
  66. package/.claude/get-shit-done/references/questioning.md +145 -0
  67. package/.claude/get-shit-done/references/tdd.md +263 -0
  68. package/.claude/get-shit-done/references/ui-brand.md +160 -0
  69. package/.claude/get-shit-done/references/verification-patterns.md +612 -0
  70. package/.claude/get-shit-done/templates/DEBUG.md +164 -0
  71. package/.claude/get-shit-done/templates/UAT.md +247 -0
  72. package/.claude/get-shit-done/templates/VALIDATION.md +76 -0
  73. package/.claude/get-shit-done/templates/codebase/architecture.md +255 -0
  74. package/.claude/get-shit-done/templates/codebase/concerns.md +310 -0
  75. package/.claude/get-shit-done/templates/codebase/conventions.md +307 -0
  76. package/.claude/get-shit-done/templates/codebase/integrations.md +280 -0
  77. package/.claude/get-shit-done/templates/codebase/stack.md +186 -0
  78. package/.claude/get-shit-done/templates/codebase/structure.md +285 -0
  79. package/.claude/get-shit-done/templates/codebase/testing.md +480 -0
  80. package/.claude/get-shit-done/templates/config.json +37 -0
  81. package/.claude/get-shit-done/templates/context.md +283 -0
  82. package/.claude/get-shit-done/templates/continue-here.md +78 -0
  83. package/.claude/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  84. package/.claude/get-shit-done/templates/discovery.md +146 -0
  85. package/.claude/get-shit-done/templates/milestone-archive.md +123 -0
  86. package/.claude/get-shit-done/templates/milestone.md +115 -0
  87. package/.claude/get-shit-done/templates/phase-prompt.md +569 -0
  88. package/.claude/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  89. package/.claude/get-shit-done/templates/project.md +184 -0
  90. package/.claude/get-shit-done/templates/requirements.md +231 -0
  91. package/.claude/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  92. package/.claude/get-shit-done/templates/research-project/FEATURES.md +147 -0
  93. package/.claude/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  94. package/.claude/get-shit-done/templates/research-project/STACK.md +120 -0
  95. package/.claude/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  96. package/.claude/get-shit-done/templates/research.md +552 -0
  97. package/.claude/get-shit-done/templates/retrospective.md +54 -0
  98. package/.claude/get-shit-done/templates/roadmap.md +202 -0
  99. package/.claude/get-shit-done/templates/state.md +176 -0
  100. package/.claude/get-shit-done/templates/summary-complex.md +59 -0
  101. package/.claude/get-shit-done/templates/summary-minimal.md +41 -0
  102. package/.claude/get-shit-done/templates/summary-standard.md +48 -0
  103. package/.claude/get-shit-done/templates/summary.md +248 -0
  104. package/.claude/get-shit-done/templates/user-setup.md +311 -0
  105. package/.claude/get-shit-done/templates/verification-report.md +322 -0
  106. package/.claude/get-shit-done/workflows/add-phase.md +111 -0
  107. package/.claude/get-shit-done/workflows/add-tests.md +350 -0
  108. package/.claude/get-shit-done/workflows/add-todo.md +157 -0
  109. package/.claude/get-shit-done/workflows/audit-milestone.md +297 -0
  110. package/.claude/get-shit-done/workflows/check-todos.md +176 -0
  111. package/.claude/get-shit-done/workflows/cleanup.md +152 -0
  112. package/.claude/get-shit-done/workflows/complete-milestone.md +763 -0
  113. package/.claude/get-shit-done/workflows/diagnose-issues.md +219 -0
  114. package/.claude/get-shit-done/workflows/discovery-phase.md +289 -0
  115. package/.claude/get-shit-done/workflows/discuss-phase.md +542 -0
  116. package/.claude/get-shit-done/workflows/execute-phase.md +449 -0
  117. package/.claude/get-shit-done/workflows/execute-plan.md +448 -0
  118. package/.claude/get-shit-done/workflows/health.md +156 -0
  119. package/.claude/get-shit-done/workflows/help.md +489 -0
  120. package/.claude/get-shit-done/workflows/insert-phase.md +129 -0
  121. package/.claude/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  122. package/.claude/get-shit-done/workflows/map-codebase.md +315 -0
  123. package/.claude/get-shit-done/workflows/new-milestone.md +382 -0
  124. package/.claude/get-shit-done/workflows/new-project.md +1116 -0
  125. package/.claude/get-shit-done/workflows/pause-work.md +122 -0
  126. package/.claude/get-shit-done/workflows/plan-milestone-gaps.md +274 -0
  127. package/.claude/get-shit-done/workflows/plan-phase.md +569 -0
  128. package/.claude/get-shit-done/workflows/progress.md +381 -0
  129. package/.claude/get-shit-done/workflows/quick.md +453 -0
  130. package/.claude/get-shit-done/workflows/remove-phase.md +154 -0
  131. package/.claude/get-shit-done/workflows/research-phase.md +73 -0
  132. package/.claude/get-shit-done/workflows/resume-project.md +306 -0
  133. package/.claude/get-shit-done/workflows/set-profile.md +80 -0
  134. package/.claude/get-shit-done/workflows/settings.md +213 -0
  135. package/.claude/get-shit-done/workflows/transition.md +544 -0
  136. package/.claude/get-shit-done/workflows/update.md +219 -0
  137. package/.claude/get-shit-done/workflows/verify-phase.md +242 -0
  138. package/.claude/get-shit-done/workflows/verify-work.md +569 -0
  139. package/.claude/gsd-file-manifest.json +144 -0
  140. package/.claude/hooks/gsd-check-update.js +62 -0
  141. package/.claude/hooks/gsd-context-monitor.js +122 -0
  142. package/.claude/hooks/gsd-statusline.js +108 -0
  143. package/.claude/package.json +1 -0
  144. package/.claude/settings.json +49 -0
  145. package/dist/commands/generate.d.ts.map +1 -1
  146. package/dist/commands/generate.js +18 -8
  147. package/dist/commands/generate.js.map +1 -1
  148. package/dist/services/analyzerService.d.ts.map +1 -1
  149. package/dist/services/analyzerService.js +10 -0
  150. package/dist/services/analyzerService.js.map +1 -1
  151. package/dist/services/descriptionGenerator.d.ts.map +1 -1
  152. package/dist/services/descriptionGenerator.js +56 -14
  153. package/dist/services/descriptionGenerator.js.map +1 -1
  154. package/dist/services/fileContentAnalyzer.js +136 -17
  155. package/dist/services/fileContentAnalyzer.js.map +1 -1
  156. package/dist/services/fileContentAnalyzer.test.js +64 -0
  157. package/dist/services/fileContentAnalyzer.test.js.map +1 -1
  158. package/dist/services/semanticAnalyzer.js +20 -0
  159. package/dist/services/semanticAnalyzer.js.map +1 -1
  160. package/package.json +1 -1
@@ -0,0 +1,248 @@
1
+ # Summary Template
2
+
3
+ Template for `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md` - phase completion documentation.
4
+
5
+ ---
6
+
7
+ ## File Template
8
+
9
+ ```markdown
10
+ ---
11
+ phase: XX-name
12
+ plan: YY
13
+ subsystem: [primary category: auth, payments, ui, api, database, infra, testing, etc.]
14
+ tags: [searchable tech: jwt, stripe, react, postgres, prisma]
15
+
16
+ # Dependency graph
17
+ requires:
18
+ - phase: [prior phase this depends on]
19
+ provides: [what that phase built that this uses]
20
+ provides:
21
+ - [bullet list of what this phase built/delivered]
22
+ affects: [list of phase names or keywords that will need this context]
23
+
24
+ # Tech tracking
25
+ tech-stack:
26
+ added: [libraries/tools added in this phase]
27
+ patterns: [architectural/code patterns established]
28
+
29
+ key-files:
30
+ created: [important files created]
31
+ modified: [important files modified]
32
+
33
+ key-decisions:
34
+ - "Decision 1"
35
+ - "Decision 2"
36
+
37
+ patterns-established:
38
+ - "Pattern 1: description"
39
+ - "Pattern 2: description"
40
+
41
+ requirements-completed: [] # REQUIRED — Copy ALL requirement IDs from this plan's `requirements` frontmatter field.
42
+
43
+ # Metrics
44
+ duration: Xmin
45
+ completed: YYYY-MM-DD
46
+ ---
47
+
48
+ # Phase [X]: [Name] Summary
49
+
50
+ **[Substantive one-liner describing outcome - NOT "phase complete" or "implementation finished"]**
51
+
52
+ ## Performance
53
+
54
+ - **Duration:** [time] (e.g., 23 min, 1h 15m)
55
+ - **Started:** [ISO timestamp]
56
+ - **Completed:** [ISO timestamp]
57
+ - **Tasks:** [count completed]
58
+ - **Files modified:** [count]
59
+
60
+ ## Accomplishments
61
+ - [Most important outcome]
62
+ - [Second key accomplishment]
63
+ - [Third if applicable]
64
+
65
+ ## Task Commits
66
+
67
+ Each task was committed atomically:
68
+
69
+ 1. **Task 1: [task name]** - `abc123f` (feat/fix/test/refactor)
70
+ 2. **Task 2: [task name]** - `def456g` (feat/fix/test/refactor)
71
+ 3. **Task 3: [task name]** - `hij789k` (feat/fix/test/refactor)
72
+
73
+ **Plan metadata:** `lmn012o` (docs: complete plan)
74
+
75
+ _Note: TDD tasks may have multiple commits (test → feat → refactor)_
76
+
77
+ ## Files Created/Modified
78
+ - `path/to/file.ts` - What it does
79
+ - `path/to/another.ts` - What it does
80
+
81
+ ## Decisions Made
82
+ [Key decisions with brief rationale, or "None - followed plan as specified"]
83
+
84
+ ## Deviations from Plan
85
+
86
+ [If no deviations: "None - plan executed exactly as written"]
87
+
88
+ [If deviations occurred:]
89
+
90
+ ### Auto-fixed Issues
91
+
92
+ **1. [Rule X - Category] Brief description**
93
+ - **Found during:** Task [N] ([task name])
94
+ - **Issue:** [What was wrong]
95
+ - **Fix:** [What was done]
96
+ - **Files modified:** [file paths]
97
+ - **Verification:** [How it was verified]
98
+ - **Committed in:** [hash] (part of task commit)
99
+
100
+ [... repeat for each auto-fix ...]
101
+
102
+ ---
103
+
104
+ **Total deviations:** [N] auto-fixed ([breakdown by rule])
105
+ **Impact on plan:** [Brief assessment - e.g., "All auto-fixes necessary for correctness/security. No scope creep."]
106
+
107
+ ## Issues Encountered
108
+ [Problems and how they were resolved, or "None"]
109
+
110
+ [Note: "Deviations from Plan" documents unplanned work that was handled automatically via deviation rules. "Issues Encountered" documents problems during planned work that required problem-solving.]
111
+
112
+ ## User Setup Required
113
+
114
+ [If USER-SETUP.md was generated:]
115
+ **External services require manual configuration.** See [{phase}-USER-SETUP.md](./{phase}-USER-SETUP.md) for:
116
+ - Environment variables to add
117
+ - Dashboard configuration steps
118
+ - Verification commands
119
+
120
+ [If no USER-SETUP.md:]
121
+ None - no external service configuration required.
122
+
123
+ ## Next Phase Readiness
124
+ [What's ready for next phase]
125
+ [Any blockers or concerns]
126
+
127
+ ---
128
+ *Phase: XX-name*
129
+ *Completed: [date]*
130
+ ```
131
+
132
+ <frontmatter_guidance>
133
+ **Purpose:** Enable automatic context assembly via dependency graph. Frontmatter makes summary metadata machine-readable so plan-phase can scan all summaries quickly and select relevant ones based on dependencies.
134
+
135
+ **Fast scanning:** Frontmatter is first ~25 lines, cheap to scan across all summaries without reading full content.
136
+
137
+ **Dependency graph:** `requires`/`provides`/`affects` create explicit links between phases, enabling transitive closure for context selection.
138
+
139
+ **Subsystem:** Primary categorization (auth, payments, ui, api, database, infra, testing) for detecting related phases.
140
+
141
+ **Tags:** Searchable technical keywords (libraries, frameworks, tools) for tech stack awareness.
142
+
143
+ **Key-files:** Important files for @context references in PLAN.md.
144
+
145
+ **Patterns:** Established conventions future phases should maintain.
146
+
147
+ **Population:** Frontmatter is populated during summary creation in execute-plan.md. See `<step name="create_summary">` for field-by-field guidance.
148
+ </frontmatter_guidance>
149
+
150
+ <one_liner_rules>
151
+ The one-liner MUST be substantive:
152
+
153
+ **Good:**
154
+ - "JWT auth with refresh rotation using jose library"
155
+ - "Prisma schema with User, Session, and Product models"
156
+ - "Dashboard with real-time metrics via Server-Sent Events"
157
+
158
+ **Bad:**
159
+ - "Phase complete"
160
+ - "Authentication implemented"
161
+ - "Foundation finished"
162
+ - "All tasks done"
163
+
164
+ The one-liner should tell someone what actually shipped.
165
+ </one_liner_rules>
166
+
167
+ <example>
168
+ ```markdown
169
+ # Phase 1: Foundation Summary
170
+
171
+ **JWT auth with refresh rotation using jose library, Prisma User model, and protected API middleware**
172
+
173
+ ## Performance
174
+
175
+ - **Duration:** 28 min
176
+ - **Started:** 2025-01-15T14:22:10Z
177
+ - **Completed:** 2025-01-15T14:50:33Z
178
+ - **Tasks:** 5
179
+ - **Files modified:** 8
180
+
181
+ ## Accomplishments
182
+ - User model with email/password auth
183
+ - Login/logout endpoints with httpOnly JWT cookies
184
+ - Protected route middleware checking token validity
185
+ - Refresh token rotation on each request
186
+
187
+ ## Files Created/Modified
188
+ - `prisma/schema.prisma` - User and Session models
189
+ - `src/app/api/auth/login/route.ts` - Login endpoint
190
+ - `src/app/api/auth/logout/route.ts` - Logout endpoint
191
+ - `src/middleware.ts` - Protected route checks
192
+ - `src/lib/auth.ts` - JWT helpers using jose
193
+
194
+ ## Decisions Made
195
+ - Used jose instead of jsonwebtoken (ESM-native, Edge-compatible)
196
+ - 15-min access tokens with 7-day refresh tokens
197
+ - Storing refresh tokens in database for revocation capability
198
+
199
+ ## Deviations from Plan
200
+
201
+ ### Auto-fixed Issues
202
+
203
+ **1. [Rule 2 - Missing Critical] Added password hashing with bcrypt**
204
+ - **Found during:** Task 2 (Login endpoint implementation)
205
+ - **Issue:** Plan didn't specify password hashing - storing plaintext would be critical security flaw
206
+ - **Fix:** Added bcrypt hashing on registration, comparison on login with salt rounds 10
207
+ - **Files modified:** src/app/api/auth/login/route.ts, src/lib/auth.ts
208
+ - **Verification:** Password hash test passes, plaintext never stored
209
+ - **Committed in:** abc123f (Task 2 commit)
210
+
211
+ **2. [Rule 3 - Blocking] Installed missing jose dependency**
212
+ - **Found during:** Task 4 (JWT token generation)
213
+ - **Issue:** jose package not in package.json, import failing
214
+ - **Fix:** Ran `npm install jose`
215
+ - **Files modified:** package.json, package-lock.json
216
+ - **Verification:** Import succeeds, build passes
217
+ - **Committed in:** def456g (Task 4 commit)
218
+
219
+ ---
220
+
221
+ **Total deviations:** 2 auto-fixed (1 missing critical, 1 blocking)
222
+ **Impact on plan:** Both auto-fixes essential for security and functionality. No scope creep.
223
+
224
+ ## Issues Encountered
225
+ - jsonwebtoken CommonJS import failed in Edge runtime - switched to jose (planned library change, worked as expected)
226
+
227
+ ## Next Phase Readiness
228
+ - Auth foundation complete, ready for feature development
229
+ - User registration endpoint needed before public launch
230
+
231
+ ---
232
+ *Phase: 01-foundation*
233
+ *Completed: 2025-01-15*
234
+ ```
235
+ </example>
236
+
237
+ <guidelines>
238
+ **Frontmatter:** MANDATORY - complete all fields. Enables automatic context assembly for future planning.
239
+
240
+ **One-liner:** Must be substantive. "JWT auth with refresh rotation using jose library" not "Authentication implemented".
241
+
242
+ **Decisions section:**
243
+ - Key decisions made during execution with rationale
244
+ - Extracted to STATE.md accumulated context
245
+ - Use "None - followed plan as specified" if no deviations
246
+
247
+ **After creation:** STATE.md updated with position, decisions, issues.
248
+ </guidelines>
@@ -0,0 +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.