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,595 @@
1
+ # Verification Patterns
2
+
3
+ How to verify different types of artifacts are real implementations, not stubs or placeholders.
4
+
5
+ <core_principle>
6
+ **Existence ≠ Implementation**
7
+
8
+ A file existing does not mean the feature works. Verification must check:
9
+ 1. **Exists** - File is present at expected path
10
+ 2. **Substantive** - Content is real implementation, not placeholder
11
+ 3. **Wired** - Connected to the rest of the system
12
+ 4. **Functional** - Actually works when invoked
13
+
14
+ Levels 1-3 can be checked programmatically. Level 4 often requires human verification.
15
+ </core_principle>
16
+
17
+ <stub_detection>
18
+
19
+ ## Universal Stub Patterns
20
+
21
+ These patterns indicate placeholder code regardless of file type:
22
+
23
+ **Comment-based stubs:**
24
+ ```bash
25
+ # Grep patterns for stub comments
26
+ grep -E "(TODO|FIXME|XXX|HACK|PLACEHOLDER)" "$file"
27
+ grep -E "implement|add later|coming soon|will be" "$file" -i
28
+ grep -E "// \.\.\.|/\* \.\.\. \*/|# \.\.\." "$file"
29
+ ```
30
+
31
+ **Placeholder text in output:**
32
+ ```bash
33
+ # UI placeholder patterns
34
+ grep -E "placeholder|lorem ipsum|coming soon|under construction" "$file" -i
35
+ grep -E "sample|example|test data|dummy" "$file" -i
36
+ grep -E "\[.*\]|<.*>|\{.*\}" "$file" # Template brackets left in
37
+ ```
38
+
39
+ **Empty or trivial implementations:**
40
+ ```bash
41
+ # Functions that do nothing
42
+ grep -E "return null|return undefined|return \{\}|return \[\]" "$file"
43
+ grep -E "pass$|\.\.\.|\bnothing\b" "$file"
44
+ grep -E "console\.(log|warn|error).*only" "$file" # Log-only functions
45
+ ```
46
+
47
+ **Hardcoded values where dynamic expected:**
48
+ ```bash
49
+ # Hardcoded IDs, counts, or content
50
+ grep -E "id.*=.*['\"].*['\"]" "$file" # Hardcoded string IDs
51
+ grep -E "count.*=.*\d+|length.*=.*\d+" "$file" # Hardcoded counts
52
+ grep -E "\\\$\d+\.\d{2}|\d+ items" "$file" # Hardcoded display values
53
+ ```
54
+
55
+ </stub_detection>
56
+
57
+ <react_components>
58
+
59
+ ## React/Next.js Components
60
+
61
+ **Existence check:**
62
+ ```bash
63
+ # File exists and exports component
64
+ [ -f "$component_path" ] && grep -E "export (default |)function|export const.*=.*\(" "$component_path"
65
+ ```
66
+
67
+ **Substantive check:**
68
+ ```bash
69
+ # Returns actual JSX, not placeholder
70
+ grep -E "return.*<" "$component_path" | grep -v "return.*null" | grep -v "placeholder" -i
71
+
72
+ # Has meaningful content (not just wrapper div)
73
+ grep -E "<[A-Z][a-zA-Z]+|className=|onClick=|onChange=" "$component_path"
74
+
75
+ # Uses props or state (not static)
76
+ grep -E "props\.|useState|useEffect|useContext|\{.*\}" "$component_path"
77
+ ```
78
+
79
+ **Stub patterns specific to React:**
80
+ ```javascript
81
+ // RED FLAGS - These are stubs:
82
+ return <div>Component</div>
83
+ return <div>Placeholder</div>
84
+ return <div>{/* TODO */}</div>
85
+ return <p>Coming soon</p>
86
+ return null
87
+ return <></>
88
+
89
+ // Also stubs - empty handlers:
90
+ onClick={() => {}}
91
+ onChange={() => console.log('clicked')}
92
+ onSubmit={(e) => e.preventDefault()} // Only prevents default, does nothing
93
+ ```
94
+
95
+ **Wiring check:**
96
+ ```bash
97
+ # Component imports what it needs
98
+ grep -E "^import.*from" "$component_path"
99
+
100
+ # Props are actually used (not just received)
101
+ # Look for destructuring or props.X usage
102
+ grep -E "\{ .* \}.*props|\bprops\.[a-zA-Z]+" "$component_path"
103
+
104
+ # API calls exist (for data-fetching components)
105
+ grep -E "fetch\(|axios\.|useSWR|useQuery|getServerSideProps|getStaticProps" "$component_path"
106
+ ```
107
+
108
+ **Functional verification (human required):**
109
+ - Does the component render visible content?
110
+ - Do interactive elements respond to clicks?
111
+ - Does data load and display?
112
+ - Do error states show appropriately?
113
+
114
+ </react_components>
115
+
116
+ <api_routes>
117
+
118
+ ## API Routes (Next.js App Router / Express / etc.)
119
+
120
+ **Existence check:**
121
+ ```bash
122
+ # Route file exists
123
+ [ -f "$route_path" ]
124
+
125
+ # Exports HTTP method handlers (Next.js App Router)
126
+ grep -E "export (async )?(function|const) (GET|POST|PUT|PATCH|DELETE)" "$route_path"
127
+
128
+ # Or Express-style handlers
129
+ grep -E "\.(get|post|put|patch|delete)\(" "$route_path"
130
+ ```
131
+
132
+ **Substantive check:**
133
+ ```bash
134
+ # Has actual logic, not just return statement
135
+ wc -l "$route_path" # More than 10-15 lines suggests real implementation
136
+
137
+ # Interacts with data source
138
+ grep -E "prisma\.|db\.|mongoose\.|sql|query|find|create|update|delete" "$route_path" -i
139
+
140
+ # Has error handling
141
+ grep -E "try|catch|throw|error|Error" "$route_path"
142
+
143
+ # Returns meaningful response
144
+ grep -E "Response\.json|res\.json|res\.send|return.*\{" "$route_path" | grep -v "message.*not implemented" -i
145
+ ```
146
+
147
+ **Stub patterns specific to API routes:**
148
+ ```typescript
149
+ // RED FLAGS - These are stubs:
150
+ export async function POST() {
151
+ return Response.json({ message: "Not implemented" })
152
+ }
153
+
154
+ export async function GET() {
155
+ return Response.json([]) // Empty array with no DB query
156
+ }
157
+
158
+ export async function PUT() {
159
+ return new Response() // Empty response
160
+ }
161
+
162
+ // Console log only:
163
+ export async function POST(req) {
164
+ console.log(await req.json())
165
+ return Response.json({ ok: true })
166
+ }
167
+ ```
168
+
169
+ **Wiring check:**
170
+ ```bash
171
+ # Imports database/service clients
172
+ grep -E "^import.*prisma|^import.*db|^import.*client" "$route_path"
173
+
174
+ # Actually uses request body (for POST/PUT)
175
+ grep -E "req\.json\(\)|req\.body|request\.json\(\)" "$route_path"
176
+
177
+ # Validates input (not just trusting request)
178
+ grep -E "schema\.parse|validate|zod|yup|joi" "$route_path"
179
+ ```
180
+
181
+ **Functional verification (human or automated):**
182
+ - Does GET return real data from database?
183
+ - Does POST actually create a record?
184
+ - Does error response have correct status code?
185
+ - Are auth checks actually enforced?
186
+
187
+ </api_routes>
188
+
189
+ <database_schema>
190
+
191
+ ## Database Schema (Prisma / Drizzle / SQL)
192
+
193
+ **Existence check:**
194
+ ```bash
195
+ # Schema file exists
196
+ [ -f "prisma/schema.prisma" ] || [ -f "drizzle/schema.ts" ] || [ -f "src/db/schema.sql" ]
197
+
198
+ # Model/table is defined
199
+ grep -E "^model $model_name|CREATE TABLE $table_name|export const $table_name" "$schema_path"
200
+ ```
201
+
202
+ **Substantive check:**
203
+ ```bash
204
+ # Has expected fields (not just id)
205
+ grep -A 20 "model $model_name" "$schema_path" | grep -E "^\s+\w+\s+\w+"
206
+
207
+ # Has relationships if expected
208
+ grep -E "@relation|REFERENCES|FOREIGN KEY" "$schema_path"
209
+
210
+ # Has appropriate field types (not all String)
211
+ grep -A 20 "model $model_name" "$schema_path" | grep -E "Int|DateTime|Boolean|Float|Decimal|Json"
212
+ ```
213
+
214
+ **Stub patterns specific to schemas:**
215
+ ```prisma
216
+ // RED FLAGS - These are stubs:
217
+ model User {
218
+ id String @id
219
+ // TODO: add fields
220
+ }
221
+
222
+ model Message {
223
+ id String @id
224
+ content String // Only one real field
225
+ }
226
+
227
+ // Missing critical fields:
228
+ model Order {
229
+ id String @id
230
+ // No: userId, items, total, status, createdAt
231
+ }
232
+ ```
233
+
234
+ **Wiring check:**
235
+ ```bash
236
+ # Migrations exist and are applied
237
+ ls prisma/migrations/ 2>/dev/null | wc -l # Should be > 0
238
+ npx prisma migrate status 2>/dev/null | grep -v "pending"
239
+
240
+ # Client is generated
241
+ [ -d "node_modules/.prisma/client" ]
242
+ ```
243
+
244
+ **Functional verification:**
245
+ ```bash
246
+ # Can query the table (automated)
247
+ npx prisma db execute --stdin <<< "SELECT COUNT(*) FROM $table_name"
248
+ ```
249
+
250
+ </database_schema>
251
+
252
+ <hooks_utilities>
253
+
254
+ ## Custom Hooks and Utilities
255
+
256
+ **Existence check:**
257
+ ```bash
258
+ # File exists and exports function
259
+ [ -f "$hook_path" ] && grep -E "export (default )?(function|const)" "$hook_path"
260
+ ```
261
+
262
+ **Substantive check:**
263
+ ```bash
264
+ # Hook uses React hooks (for custom hooks)
265
+ grep -E "useState|useEffect|useCallback|useMemo|useRef|useContext" "$hook_path"
266
+
267
+ # Has meaningful return value
268
+ grep -E "return \{|return \[" "$hook_path"
269
+
270
+ # More than trivial length
271
+ [ $(wc -l < "$hook_path") -gt 10 ]
272
+ ```
273
+
274
+ **Stub patterns specific to hooks:**
275
+ ```typescript
276
+ // RED FLAGS - These are stubs:
277
+ export function useAuth() {
278
+ return { user: null, login: () => {}, logout: () => {} }
279
+ }
280
+
281
+ export function useCart() {
282
+ const [items, setItems] = useState([])
283
+ return { items, addItem: () => console.log('add'), removeItem: () => {} }
284
+ }
285
+
286
+ // Hardcoded return:
287
+ export function useUser() {
288
+ return { name: "Test User", email: "test@example.com" }
289
+ }
290
+ ```
291
+
292
+ **Wiring check:**
293
+ ```bash
294
+ # Hook is actually imported somewhere
295
+ grep -r "import.*$hook_name" src/ --include="*.tsx" --include="*.ts" | grep -v "$hook_path"
296
+
297
+ # Hook is actually called
298
+ grep -r "$hook_name()" src/ --include="*.tsx" --include="*.ts" | grep -v "$hook_path"
299
+ ```
300
+
301
+ </hooks_utilities>
302
+
303
+ <environment_config>
304
+
305
+ ## Environment Variables and Configuration
306
+
307
+ **Existence check:**
308
+ ```bash
309
+ # .env file exists
310
+ [ -f ".env" ] || [ -f ".env.local" ]
311
+
312
+ # Required variable is defined
313
+ grep -E "^$VAR_NAME=" .env .env.local 2>/dev/null
314
+ ```
315
+
316
+ **Substantive check:**
317
+ ```bash
318
+ # Variable has actual value (not placeholder)
319
+ grep -E "^$VAR_NAME=.+" .env .env.local 2>/dev/null | grep -v "your-.*-here|xxx|placeholder|TODO" -i
320
+
321
+ # Value looks valid for type:
322
+ # - URLs should start with http
323
+ # - Keys should be long enough
324
+ # - Booleans should be true/false
325
+ ```
326
+
327
+ **Stub patterns specific to env:**
328
+ ```bash
329
+ # RED FLAGS - These are stubs:
330
+ DATABASE_URL=your-database-url-here
331
+ STRIPE_SECRET_KEY=sk_test_xxx
332
+ API_KEY=placeholder
333
+ NEXT_PUBLIC_API_URL=http://localhost:3000 # Still pointing to localhost in prod
334
+ ```
335
+
336
+ **Wiring check:**
337
+ ```bash
338
+ # Variable is actually used in code
339
+ grep -r "process\.env\.$VAR_NAME|env\.$VAR_NAME" src/ --include="*.ts" --include="*.tsx"
340
+
341
+ # Variable is in validation schema (if using zod/etc for env)
342
+ grep -E "$VAR_NAME" src/env.ts src/env.mjs 2>/dev/null
343
+ ```
344
+
345
+ </environment_config>
346
+
347
+ <wiring_verification>
348
+
349
+ ## Wiring Verification Patterns
350
+
351
+ Wiring verification checks that components actually communicate. This is where most stubs hide.
352
+
353
+ ### Pattern: Component → API
354
+
355
+ **Check:** Does the component actually call the API?
356
+
357
+ ```bash
358
+ # Find the fetch/axios call
359
+ grep -E "fetch\(['\"].*$api_path|axios\.(get|post).*$api_path" "$component_path"
360
+
361
+ # Verify it's not commented out
362
+ grep -E "fetch\(|axios\." "$component_path" | grep -v "^.*//.*fetch"
363
+
364
+ # Check the response is used
365
+ grep -E "await.*fetch|\.then\(|setData|setState" "$component_path"
366
+ ```
367
+
368
+ **Red flags:**
369
+ ```typescript
370
+ // Fetch exists but response ignored:
371
+ fetch('/api/messages') // No await, no .then, no assignment
372
+
373
+ // Fetch in comment:
374
+ // fetch('/api/messages').then(r => r.json()).then(setMessages)
375
+
376
+ // Fetch to wrong endpoint:
377
+ fetch('/api/message') // Typo - should be /api/messages
378
+ ```
379
+
380
+ ### Pattern: API → Database
381
+
382
+ **Check:** Does the API route actually query the database?
383
+
384
+ ```bash
385
+ # Find the database call
386
+ grep -E "prisma\.$model|db\.query|Model\.find" "$route_path"
387
+
388
+ # Verify it's awaited
389
+ grep -E "await.*prisma|await.*db\." "$route_path"
390
+
391
+ # Check result is returned
392
+ grep -E "return.*json.*data|res\.json.*result" "$route_path"
393
+ ```
394
+
395
+ **Red flags:**
396
+ ```typescript
397
+ // Query exists but result not returned:
398
+ await prisma.message.findMany()
399
+ return Response.json({ ok: true }) // Returns static, not query result
400
+
401
+ // Query not awaited:
402
+ const messages = prisma.message.findMany() // Missing await
403
+ return Response.json(messages) // Returns Promise, not data
404
+ ```
405
+
406
+ ### Pattern: Form → Handler
407
+
408
+ **Check:** Does the form submission actually do something?
409
+
410
+ ```bash
411
+ # Find onSubmit handler
412
+ grep -E "onSubmit=\{|handleSubmit" "$component_path"
413
+
414
+ # Check handler has content
415
+ grep -A 10 "onSubmit.*=" "$component_path" | grep -E "fetch|axios|mutate|dispatch"
416
+
417
+ # Verify not just preventDefault
418
+ grep -A 5 "onSubmit" "$component_path" | grep -v "only.*preventDefault" -i
419
+ ```
420
+
421
+ **Red flags:**
422
+ ```typescript
423
+ // Handler only prevents default:
424
+ onSubmit={(e) => e.preventDefault()}
425
+
426
+ // Handler only logs:
427
+ const handleSubmit = (data) => {
428
+ console.log(data)
429
+ }
430
+
431
+ // Handler is empty:
432
+ onSubmit={() => {}}
433
+ ```
434
+
435
+ ### Pattern: State → Render
436
+
437
+ **Check:** Does the component render state, not hardcoded content?
438
+
439
+ ```bash
440
+ # Find state usage in JSX
441
+ grep -E "\{.*messages.*\}|\{.*data.*\}|\{.*items.*\}" "$component_path"
442
+
443
+ # Check map/render of state
444
+ grep -E "\.map\(|\.filter\(|\.reduce\(" "$component_path"
445
+
446
+ # Verify dynamic content
447
+ grep -E "\{[a-zA-Z_]+\." "$component_path" # Variable interpolation
448
+ ```
449
+
450
+ **Red flags:**
451
+ ```tsx
452
+ // Hardcoded instead of state:
453
+ return <div>
454
+ <p>Message 1</p>
455
+ <p>Message 2</p>
456
+ </div>
457
+
458
+ // State exists but not rendered:
459
+ const [messages, setMessages] = useState([])
460
+ return <div>No messages</div> // Always shows "no messages"
461
+
462
+ // Wrong state rendered:
463
+ const [messages, setMessages] = useState([])
464
+ return <div>{otherData.map(...)}</div> // Uses different data
465
+ ```
466
+
467
+ </wiring_verification>
468
+
469
+ <verification_checklist>
470
+
471
+ ## Quick Verification Checklist
472
+
473
+ For each artifact type, run through this checklist:
474
+
475
+ ### Component Checklist
476
+ - [ ] File exists at expected path
477
+ - [ ] Exports a function/const component
478
+ - [ ] Returns JSX (not null/empty)
479
+ - [ ] No placeholder text in render
480
+ - [ ] Uses props or state (not static)
481
+ - [ ] Event handlers have real implementations
482
+ - [ ] Imports resolve correctly
483
+ - [ ] Used somewhere in the app
484
+
485
+ ### API Route Checklist
486
+ - [ ] File exists at expected path
487
+ - [ ] Exports HTTP method handlers
488
+ - [ ] Handlers have more than 5 lines
489
+ - [ ] Queries database or service
490
+ - [ ] Returns meaningful response (not empty/placeholder)
491
+ - [ ] Has error handling
492
+ - [ ] Validates input
493
+ - [ ] Called from frontend
494
+
495
+ ### Schema Checklist
496
+ - [ ] Model/table defined
497
+ - [ ] Has all expected fields
498
+ - [ ] Fields have appropriate types
499
+ - [ ] Relationships defined if needed
500
+ - [ ] Migrations exist and applied
501
+ - [ ] Client generated
502
+
503
+ ### Hook/Utility Checklist
504
+ - [ ] File exists at expected path
505
+ - [ ] Exports function
506
+ - [ ] Has meaningful implementation (not empty returns)
507
+ - [ ] Used somewhere in the app
508
+ - [ ] Return values consumed
509
+
510
+ ### Wiring Checklist
511
+ - [ ] Component → API: fetch/axios call exists and uses response
512
+ - [ ] API → Database: query exists and result returned
513
+ - [ ] Form → Handler: onSubmit calls API/mutation
514
+ - [ ] State → Render: state variables appear in JSX
515
+
516
+ </verification_checklist>
517
+
518
+ <automated_verification_script>
519
+
520
+ ## Automated Verification Approach
521
+
522
+ For the verification subagent, use this pattern:
523
+
524
+ ```bash
525
+ # 1. Check existence
526
+ check_exists() {
527
+ [ -f "$1" ] && echo "EXISTS: $1" || echo "MISSING: $1"
528
+ }
529
+
530
+ # 2. Check for stub patterns
531
+ check_stubs() {
532
+ local file="$1"
533
+ local stubs=$(grep -c -E "TODO|FIXME|placeholder|not implemented" "$file" 2>/dev/null || echo 0)
534
+ [ "$stubs" -gt 0 ] && echo "STUB_PATTERNS: $stubs in $file"
535
+ }
536
+
537
+ # 3. Check wiring (component calls API)
538
+ check_wiring() {
539
+ local component="$1"
540
+ local api_path="$2"
541
+ grep -q "$api_path" "$component" && echo "WIRED: $component → $api_path" || echo "NOT_WIRED: $component → $api_path"
542
+ }
543
+
544
+ # 4. Check substantive (more than N lines, has expected patterns)
545
+ check_substantive() {
546
+ local file="$1"
547
+ local min_lines="$2"
548
+ local pattern="$3"
549
+ local lines=$(wc -l < "$file" 2>/dev/null || echo 0)
550
+ local has_pattern=$(grep -c -E "$pattern" "$file" 2>/dev/null || echo 0)
551
+ [ "$lines" -ge "$min_lines" ] && [ "$has_pattern" -gt 0 ] && echo "SUBSTANTIVE: $file" || echo "THIN: $file ($lines lines, $has_pattern matches)"
552
+ }
553
+ ```
554
+
555
+ Run these checks against each must-have artifact. Aggregate results into VERIFICATION.md.
556
+
557
+ </automated_verification_script>
558
+
559
+ <human_verification_triggers>
560
+
561
+ ## When to Require Human Verification
562
+
563
+ Some things can't be verified programmatically. Flag these for human testing:
564
+
565
+ **Always human:**
566
+ - Visual appearance (does it look right?)
567
+ - User flow completion (can you actually do the thing?)
568
+ - Real-time behavior (WebSocket, SSE)
569
+ - External service integration (Stripe, email sending)
570
+ - Error message clarity (is the message helpful?)
571
+ - Performance feel (does it feel fast?)
572
+
573
+ **Human if uncertain:**
574
+ - Complex wiring that grep can't trace
575
+ - Dynamic behavior depending on state
576
+ - Edge cases and error states
577
+ - Mobile responsiveness
578
+ - Accessibility
579
+
580
+ **Format for human verification request:**
581
+ ```markdown
582
+ ## Human Verification Required
583
+
584
+ ### 1. Chat message sending
585
+ **Test:** Type a message and click Send
586
+ **Expected:** Message appears in list, input clears
587
+ **Check:** Does message persist after refresh?
588
+
589
+ ### 2. Error handling
590
+ **Test:** Disconnect network, try to send
591
+ **Expected:** Error message appears, message not lost
592
+ **Check:** Can retry after reconnect?
593
+ ```
594
+
595
+ </human_verification_triggers>