mindsystem-cc 3.0.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 (139) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +501 -0
  3. package/agents/ms-codebase-mapper.md +739 -0
  4. package/agents/ms-debugger.md +1184 -0
  5. package/agents/ms-designer.md +414 -0
  6. package/agents/ms-executor.md +760 -0
  7. package/agents/ms-integration-checker.md +423 -0
  8. package/agents/ms-milestone-auditor.md +448 -0
  9. package/agents/ms-mock-generator.md +182 -0
  10. package/agents/ms-plan-checker.md +746 -0
  11. package/agents/ms-research-synthesizer.md +248 -0
  12. package/agents/ms-researcher.md +962 -0
  13. package/agents/ms-roadmapper.md +606 -0
  14. package/agents/ms-verifier.md +779 -0
  15. package/agents/ms-verify-fixer.md +124 -0
  16. package/bin/install.js +296 -0
  17. package/commands/ms/add-phase.md +207 -0
  18. package/commands/ms/add-todo.md +182 -0
  19. package/commands/ms/audit-milestone.md +318 -0
  20. package/commands/ms/check-phase.md +162 -0
  21. package/commands/ms/check-todos.md +217 -0
  22. package/commands/ms/complete-milestone.md +137 -0
  23. package/commands/ms/create-roadmap.md +273 -0
  24. package/commands/ms/debug.md +149 -0
  25. package/commands/ms/define-requirements.md +121 -0
  26. package/commands/ms/design-phase.md +341 -0
  27. package/commands/ms/discuss-milestone.md +48 -0
  28. package/commands/ms/discuss-phase.md +60 -0
  29. package/commands/ms/do-work.md +90 -0
  30. package/commands/ms/execute-phase.md +289 -0
  31. package/commands/ms/help.md +623 -0
  32. package/commands/ms/insert-phase.md +227 -0
  33. package/commands/ms/list-phase-assumptions.md +50 -0
  34. package/commands/ms/map-codebase.md +71 -0
  35. package/commands/ms/new-milestone.md +193 -0
  36. package/commands/ms/new-project.md +338 -0
  37. package/commands/ms/pause-work.md +123 -0
  38. package/commands/ms/plan-milestone-gaps.md +285 -0
  39. package/commands/ms/plan-phase.md +105 -0
  40. package/commands/ms/progress.md +370 -0
  41. package/commands/ms/remove-phase.md +338 -0
  42. package/commands/ms/research-phase.md +175 -0
  43. package/commands/ms/research-project.md +339 -0
  44. package/commands/ms/resume-work.md +40 -0
  45. package/commands/ms/review-design.md +484 -0
  46. package/commands/ms/simplify-flutter.md +193 -0
  47. package/commands/ms/update.md +159 -0
  48. package/commands/ms/verify-work.md +92 -0
  49. package/commands/ms/whats-new.md +124 -0
  50. package/mindsystem/references/checkpoints.md +788 -0
  51. package/mindsystem/references/continuation-format.md +255 -0
  52. package/mindsystem/references/debugging/debugging-mindset.md +11 -0
  53. package/mindsystem/references/debugging/hypothesis-testing.md +11 -0
  54. package/mindsystem/references/debugging/investigation-techniques.md +11 -0
  55. package/mindsystem/references/debugging/verification-patterns.md +11 -0
  56. package/mindsystem/references/debugging/when-to-research.md +11 -0
  57. package/mindsystem/references/git-integration.md +254 -0
  58. package/mindsystem/references/goal-backward.md +286 -0
  59. package/mindsystem/references/mock-patterns.md +294 -0
  60. package/mindsystem/references/plan-format.md +473 -0
  61. package/mindsystem/references/principles.md +73 -0
  62. package/mindsystem/references/questioning.md +140 -0
  63. package/mindsystem/references/research-pitfalls.md +233 -0
  64. package/mindsystem/references/scope-estimation.md +256 -0
  65. package/mindsystem/references/tdd.md +263 -0
  66. package/mindsystem/references/verification-patterns.md +595 -0
  67. package/mindsystem/templates/DEBUG.md +159 -0
  68. package/mindsystem/templates/UAT.md +403 -0
  69. package/mindsystem/templates/adhoc-summary.md +153 -0
  70. package/mindsystem/templates/codebase/architecture.md +255 -0
  71. package/mindsystem/templates/codebase/concerns.md +310 -0
  72. package/mindsystem/templates/codebase/conventions.md +307 -0
  73. package/mindsystem/templates/codebase/integrations.md +280 -0
  74. package/mindsystem/templates/codebase/stack.md +186 -0
  75. package/mindsystem/templates/codebase/structure.md +285 -0
  76. package/mindsystem/templates/codebase/testing.md +480 -0
  77. package/mindsystem/templates/config.json +26 -0
  78. package/mindsystem/templates/context.md +140 -0
  79. package/mindsystem/templates/continue-here.md +78 -0
  80. package/mindsystem/templates/debug-subagent-prompt.md +91 -0
  81. package/mindsystem/templates/design-iteration.md +208 -0
  82. package/mindsystem/templates/design.md +417 -0
  83. package/mindsystem/templates/discovery.md +146 -0
  84. package/mindsystem/templates/milestone-archive.md +123 -0
  85. package/mindsystem/templates/milestone-context.md +93 -0
  86. package/mindsystem/templates/milestone.md +115 -0
  87. package/mindsystem/templates/phase-prompt.md +574 -0
  88. package/mindsystem/templates/project.md +184 -0
  89. package/mindsystem/templates/requirements.md +231 -0
  90. package/mindsystem/templates/research-project/ARCHITECTURE.md +204 -0
  91. package/mindsystem/templates/research-project/FEATURES.md +147 -0
  92. package/mindsystem/templates/research-project/PITFALLS.md +200 -0
  93. package/mindsystem/templates/research-project/STACK.md +120 -0
  94. package/mindsystem/templates/research-project/SUMMARY.md +170 -0
  95. package/mindsystem/templates/research-subagent-prompt.md +92 -0
  96. package/mindsystem/templates/research.md +529 -0
  97. package/mindsystem/templates/roadmap.md +214 -0
  98. package/mindsystem/templates/state.md +224 -0
  99. package/mindsystem/templates/summary.md +269 -0
  100. package/mindsystem/templates/user-setup.md +323 -0
  101. package/mindsystem/templates/verification-report.md +322 -0
  102. package/mindsystem/workflows/complete-milestone.md +759 -0
  103. package/mindsystem/workflows/create-milestone.md +203 -0
  104. package/mindsystem/workflows/debug.md +14 -0
  105. package/mindsystem/workflows/define-requirements.md +330 -0
  106. package/mindsystem/workflows/diagnose-issues.md +241 -0
  107. package/mindsystem/workflows/discovery-phase.md +293 -0
  108. package/mindsystem/workflows/discuss-milestone.md +310 -0
  109. package/mindsystem/workflows/discuss-phase.md +237 -0
  110. package/mindsystem/workflows/do-work.md +359 -0
  111. package/mindsystem/workflows/execute-phase.md +644 -0
  112. package/mindsystem/workflows/execute-plan.md +1828 -0
  113. package/mindsystem/workflows/generate-mocks.md +187 -0
  114. package/mindsystem/workflows/list-phase-assumptions.md +178 -0
  115. package/mindsystem/workflows/map-codebase.md +289 -0
  116. package/mindsystem/workflows/plan-phase.md +876 -0
  117. package/mindsystem/workflows/research-phase.md +17 -0
  118. package/mindsystem/workflows/research-project.md +23 -0
  119. package/mindsystem/workflows/resume-project.md +311 -0
  120. package/mindsystem/workflows/transition.md +564 -0
  121. package/mindsystem/workflows/verify-phase.md +629 -0
  122. package/mindsystem/workflows/verify-work.md +823 -0
  123. package/package.json +32 -0
  124. package/scripts/generate-phase-patch.sh +169 -0
  125. package/scripts/ms-lookup/README.md +112 -0
  126. package/scripts/ms-lookup/ms_lookup/__init__.py +3 -0
  127. package/scripts/ms-lookup/ms_lookup/__main__.py +6 -0
  128. package/scripts/ms-lookup/ms_lookup/backends/__init__.py +6 -0
  129. package/scripts/ms-lookup/ms_lookup/backends/context7.py +219 -0
  130. package/scripts/ms-lookup/ms_lookup/backends/perplexity.py +145 -0
  131. package/scripts/ms-lookup/ms_lookup/cache.py +48 -0
  132. package/scripts/ms-lookup/ms_lookup/cli.py +219 -0
  133. package/scripts/ms-lookup/ms_lookup/config.py +23 -0
  134. package/scripts/ms-lookup/ms_lookup/errors.py +24 -0
  135. package/scripts/ms-lookup/ms_lookup/output.py +49 -0
  136. package/scripts/ms-lookup/ms_lookup/tokens.py +56 -0
  137. package/scripts/ms-lookup/pyproject.toml +17 -0
  138. package/scripts/ms-lookup/uv.lock +207 -0
  139. package/scripts/ms-lookup-wrapper.sh +21 -0
@@ -0,0 +1,323 @@
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
+ **Include in USER-SETUP.md:**
308
+ - Environment variable names and where to find values
309
+ - Account creation URLs (if new service)
310
+ - Dashboard configuration steps
311
+ - Verification commands to confirm setup works
312
+ - Local development alternatives (e.g., `stripe listen`)
313
+
314
+ **Do NOT include:**
315
+ - Actual secret values (never)
316
+ - Steps Claude can automate (package installs, code changes, file creation)
317
+ - Generic instructions ("set up your environment")
318
+
319
+ **Naming:** `{phase}-USER-SETUP.md` matches the phase number pattern.
320
+
321
+ **Status tracking:** User marks checkboxes and updates status line when complete.
322
+
323
+ **Searchability:** `grep -r "USER-SETUP" .planning/` finds all phases with user requirements.
@@ -0,0 +1,322 @@
1
+ # Verification Report Template
2
+
3
+ Template for `.planning/phases/XX-name/{phase}-VERIFICATION.md` — phase goal verification results.
4
+
5
+ ---
6
+
7
+ ## File Template
8
+
9
+ ```markdown
10
+ ---
11
+ phase: XX-name
12
+ verified: YYYY-MM-DDTHH:MM:SSZ
13
+ status: passed | gaps_found | human_needed
14
+ score: N/M must-haves verified
15
+ ---
16
+
17
+ # Phase {X}: {Name} Verification Report
18
+
19
+ **Phase Goal:** {goal from ROADMAP.md}
20
+ **Verified:** {timestamp}
21
+ **Status:** {passed | gaps_found | human_needed}
22
+
23
+ ## Goal Achievement
24
+
25
+ ### Observable Truths
26
+
27
+ | # | Truth | Status | Evidence |
28
+ |---|-------|--------|----------|
29
+ | 1 | {truth from must_haves} | ✓ VERIFIED | {what confirmed it} |
30
+ | 2 | {truth from must_haves} | ✗ FAILED | {what's wrong} |
31
+ | 3 | {truth from must_haves} | ? UNCERTAIN | {why can't verify} |
32
+
33
+ **Score:** {N}/{M} truths verified
34
+
35
+ ### Required Artifacts
36
+
37
+ | Artifact | Expected | Status | Details |
38
+ |----------|----------|--------|---------|
39
+ | `src/components/Chat.tsx` | Message list component | ✓ EXISTS + SUBSTANTIVE | Exports ChatList, renders Message[], no stubs |
40
+ | `src/app/api/chat/route.ts` | Message CRUD | ✗ STUB | File exists but POST returns placeholder |
41
+ | `prisma/schema.prisma` | Message model | ✓ EXISTS + SUBSTANTIVE | Model defined with all fields |
42
+
43
+ **Artifacts:** {N}/{M} verified
44
+
45
+ ### Key Link Verification
46
+
47
+ | From | To | Via | Status | Details |
48
+ |------|----|----|--------|---------|
49
+ | Chat.tsx | /api/chat | fetch in useEffect | ✓ WIRED | Line 23: `fetch('/api/chat')` with response handling |
50
+ | ChatInput | /api/chat POST | onSubmit handler | ✗ NOT WIRED | onSubmit only calls console.log |
51
+ | /api/chat POST | database | prisma.message.create | ✗ NOT WIRED | Returns hardcoded response, no DB call |
52
+
53
+ **Wiring:** {N}/{M} connections verified
54
+
55
+ ## Requirements Coverage
56
+
57
+ | Requirement | Status | Blocking Issue |
58
+ |-------------|--------|----------------|
59
+ | {REQ-01}: {description} | ✓ SATISFIED | - |
60
+ | {REQ-02}: {description} | ✗ BLOCKED | API route is stub |
61
+ | {REQ-03}: {description} | ? NEEDS HUMAN | Can't verify WebSocket programmatically |
62
+
63
+ **Coverage:** {N}/{M} requirements satisfied
64
+
65
+ ## Anti-Patterns Found
66
+
67
+ | File | Line | Pattern | Severity | Impact |
68
+ |------|------|---------|----------|--------|
69
+ | src/app/api/chat/route.ts | 12 | `// TODO: implement` | âš ī¸ Warning | Indicates incomplete |
70
+ | src/components/Chat.tsx | 45 | `return <div>Placeholder</div>` | 🛑 Blocker | Renders no content |
71
+ | src/hooks/useChat.ts | - | File missing | 🛑 Blocker | Expected hook doesn't exist |
72
+
73
+ **Anti-patterns:** {N} found ({blockers} blockers, {warnings} warnings)
74
+
75
+ ## Human Verification Required
76
+
77
+ {If no human verification needed:}
78
+ None — all verifiable items checked programmatically.
79
+
80
+ {If human verification needed:}
81
+
82
+ ### 1. {Test Name}
83
+ **Test:** {What to do}
84
+ **Expected:** {What should happen}
85
+ **Why human:** {Why can't verify programmatically}
86
+
87
+ ### 2. {Test Name}
88
+ **Test:** {What to do}
89
+ **Expected:** {What should happen}
90
+ **Why human:** {Why can't verify programmatically}
91
+
92
+ ## Gaps Summary
93
+
94
+ {If no gaps:}
95
+ **No gaps found.** Phase goal achieved. Ready to proceed.
96
+
97
+ {If gaps found:}
98
+
99
+ ### Critical Gaps (Block Progress)
100
+
101
+ 1. **{Gap name}**
102
+ - Missing: {what's missing}
103
+ - Impact: {why this blocks the goal}
104
+ - Fix: {what needs to happen}
105
+
106
+ 2. **{Gap name}**
107
+ - Missing: {what's missing}
108
+ - Impact: {why this blocks the goal}
109
+ - Fix: {what needs to happen}
110
+
111
+ ### Non-Critical Gaps (Can Defer)
112
+
113
+ 1. **{Gap name}**
114
+ - Issue: {what's wrong}
115
+ - Impact: {limited impact because...}
116
+ - Recommendation: {fix now or defer}
117
+
118
+ ## Recommended Fix Plans
119
+
120
+ {If gaps found, generate fix plan recommendations:}
121
+
122
+ ### {phase}-{next}-PLAN.md: {Fix Name}
123
+
124
+ **Objective:** {What this fixes}
125
+
126
+ **Tasks:**
127
+ 1. {Task to fix gap 1}
128
+ 2. {Task to fix gap 2}
129
+ 3. {Verification task}
130
+
131
+ **Estimated scope:** {Small / Medium}
132
+
133
+ ---
134
+
135
+ ### {phase}-{next+1}-PLAN.md: {Fix Name}
136
+
137
+ **Objective:** {What this fixes}
138
+
139
+ **Tasks:**
140
+ 1. {Task}
141
+ 2. {Task}
142
+
143
+ **Estimated scope:** {Small / Medium}
144
+
145
+ ---
146
+
147
+ ## Verification Metadata
148
+
149
+ **Verification approach:** Goal-backward (derived from phase goal)
150
+ **Must-haves source:** {PLAN.md frontmatter | derived from ROADMAP.md goal}
151
+ **Automated checks:** {N} passed, {M} failed
152
+ **Human checks required:** {N}
153
+ **Total verification time:** {duration}
154
+
155
+ ---
156
+ *Verified: {timestamp}*
157
+ *Verifier: Claude (subagent)*
158
+ ```
159
+
160
+ ---
161
+
162
+ ## Guidelines
163
+
164
+ **Status values:**
165
+ - `passed` — All must-haves verified, no blockers
166
+ - `gaps_found` — One or more critical gaps found
167
+ - `human_needed` — Automated checks pass but human verification required
168
+
169
+ **Evidence types:**
170
+ - For EXISTS: "File at path, exports X"
171
+ - For SUBSTANTIVE: "N lines, has patterns X, Y, Z"
172
+ - For WIRED: "Line N: code that connects A to B"
173
+ - For FAILED: "Missing because X" or "Stub because Y"
174
+
175
+ **Severity levels:**
176
+ - 🛑 Blocker: Prevents goal achievement, must fix
177
+ - âš ī¸ Warning: Indicates incomplete but doesn't block
178
+ - â„šī¸ Info: Notable but not problematic
179
+
180
+ **Fix plan generation:**
181
+ - Only generate if gaps_found
182
+ - Group related fixes into single plans
183
+ - Keep to 2-3 tasks per plan
184
+ - Include verification task in each plan
185
+
186
+ ---
187
+
188
+ ## Example
189
+
190
+ ```markdown
191
+ ---
192
+ phase: 03-chat
193
+ verified: 2025-01-15T14:30:00Z
194
+ status: gaps_found
195
+ score: 2/5 must-haves verified
196
+ ---
197
+
198
+ # Phase 3: Chat Interface Verification Report
199
+
200
+ **Phase Goal:** Working chat interface where users can send and receive messages
201
+ **Verified:** 2025-01-15T14:30:00Z
202
+ **Status:** gaps_found
203
+
204
+ ## Goal Achievement
205
+
206
+ ### Observable Truths
207
+
208
+ | # | Truth | Status | Evidence |
209
+ |---|-------|--------|----------|
210
+ | 1 | User can see existing messages | ✗ FAILED | Component renders placeholder, not message data |
211
+ | 2 | User can type a message | ✓ VERIFIED | Input field exists with onChange handler |
212
+ | 3 | User can send a message | ✗ FAILED | onSubmit handler is console.log only |
213
+ | 4 | Sent message appears in list | ✗ FAILED | No state update after send |
214
+ | 5 | Messages persist across refresh | ? UNCERTAIN | Can't verify - send doesn't work |
215
+
216
+ **Score:** 1/5 truths verified
217
+
218
+ ### Required Artifacts
219
+
220
+ | Artifact | Expected | Status | Details |
221
+ |----------|----------|--------|---------|
222
+ | `src/components/Chat.tsx` | Message list component | ✗ STUB | Returns `<div>Chat will be here</div>` |
223
+ | `src/components/ChatInput.tsx` | Message input | ✓ EXISTS + SUBSTANTIVE | Form with input, submit button, handlers |
224
+ | `src/app/api/chat/route.ts` | Message CRUD | ✗ STUB | GET returns [], POST returns { ok: true } |
225
+ | `prisma/schema.prisma` | Message model | ✓ EXISTS + SUBSTANTIVE | Message model with id, content, userId, createdAt |
226
+
227
+ **Artifacts:** 2/4 verified
228
+
229
+ ### Key Link Verification
230
+
231
+ | From | To | Via | Status | Details |
232
+ |------|----|----|--------|---------|
233
+ | Chat.tsx | /api/chat GET | fetch | ✗ NOT WIRED | No fetch call in component |
234
+ | ChatInput | /api/chat POST | onSubmit | ✗ NOT WIRED | Handler only logs, doesn't fetch |
235
+ | /api/chat GET | database | prisma.message.findMany | ✗ NOT WIRED | Returns hardcoded [] |
236
+ | /api/chat POST | database | prisma.message.create | ✗ NOT WIRED | Returns { ok: true }, no DB call |
237
+
238
+ **Wiring:** 0/4 connections verified
239
+
240
+ ## Requirements Coverage
241
+
242
+ | Requirement | Status | Blocking Issue |
243
+ |-------------|--------|----------------|
244
+ | CHAT-01: User can send message | ✗ BLOCKED | API POST is stub |
245
+ | CHAT-02: User can view messages | ✗ BLOCKED | Component is placeholder |
246
+ | CHAT-03: Messages persist | ✗ BLOCKED | No database integration |
247
+
248
+ **Coverage:** 0/3 requirements satisfied
249
+
250
+ ## Anti-Patterns Found
251
+
252
+ | File | Line | Pattern | Severity | Impact |
253
+ |------|------|---------|----------|--------|
254
+ | src/components/Chat.tsx | 8 | `<div>Chat will be here</div>` | 🛑 Blocker | No actual content |
255
+ | src/app/api/chat/route.ts | 5 | `return Response.json([])` | 🛑 Blocker | Hardcoded empty |
256
+ | src/app/api/chat/route.ts | 12 | `// TODO: save to database` | âš ī¸ Warning | Incomplete |
257
+
258
+ **Anti-patterns:** 3 found (2 blockers, 1 warning)
259
+
260
+ ## Human Verification Required
261
+
262
+ None needed until automated gaps are fixed.
263
+
264
+ ## Gaps Summary
265
+
266
+ ### Critical Gaps (Block Progress)
267
+
268
+ 1. **Chat component is placeholder**
269
+ - Missing: Actual message list rendering
270
+ - Impact: Users see "Chat will be here" instead of messages
271
+ - Fix: Implement Chat.tsx to fetch and render messages
272
+
273
+ 2. **API routes are stubs**
274
+ - Missing: Database integration in GET and POST
275
+ - Impact: No data persistence, no real functionality
276
+ - Fix: Wire prisma calls in route handlers
277
+
278
+ 3. **No wiring between frontend and backend**
279
+ - Missing: fetch calls in components
280
+ - Impact: Even if API worked, UI wouldn't call it
281
+ - Fix: Add useEffect fetch in Chat, onSubmit fetch in ChatInput
282
+
283
+ ## Recommended Fix Plans
284
+
285
+ ### 03-04-PLAN.md: Implement Chat API
286
+
287
+ **Objective:** Wire API routes to database
288
+
289
+ **Tasks:**
290
+ 1. Implement GET /api/chat with prisma.message.findMany
291
+ 2. Implement POST /api/chat with prisma.message.create
292
+ 3. Verify: API returns real data, POST creates records
293
+
294
+ **Estimated scope:** Small
295
+
296
+ ---
297
+
298
+ ### 03-05-PLAN.md: Implement Chat UI
299
+
300
+ **Objective:** Wire Chat component to API
301
+
302
+ **Tasks:**
303
+ 1. Implement Chat.tsx with useEffect fetch and message rendering
304
+ 2. Wire ChatInput onSubmit to POST /api/chat
305
+ 3. Verify: Messages display, new messages appear after send
306
+
307
+ **Estimated scope:** Small
308
+
309
+ ---
310
+
311
+ ## Verification Metadata
312
+
313
+ **Verification approach:** Goal-backward (derived from phase goal)
314
+ **Must-haves source:** 03-01-PLAN.md frontmatter
315
+ **Automated checks:** 2 passed, 8 failed
316
+ **Human checks required:** 0 (blocked by automated failures)
317
+ **Total verification time:** 2 min
318
+
319
+ ---
320
+ *Verified: 2025-01-15T14:30:00Z*
321
+ *Verifier: Claude (subagent)*
322
+ ```