get-research-done 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +560 -0
  3. package/agents/grd-architect.md +789 -0
  4. package/agents/grd-codebase-mapper.md +738 -0
  5. package/agents/grd-critic.md +1065 -0
  6. package/agents/grd-debugger.md +1203 -0
  7. package/agents/grd-evaluator.md +948 -0
  8. package/agents/grd-executor.md +784 -0
  9. package/agents/grd-explorer.md +2063 -0
  10. package/agents/grd-graduator.md +484 -0
  11. package/agents/grd-integration-checker.md +423 -0
  12. package/agents/grd-phase-researcher.md +641 -0
  13. package/agents/grd-plan-checker.md +745 -0
  14. package/agents/grd-planner.md +1386 -0
  15. package/agents/grd-project-researcher.md +865 -0
  16. package/agents/grd-research-synthesizer.md +256 -0
  17. package/agents/grd-researcher.md +2361 -0
  18. package/agents/grd-roadmapper.md +605 -0
  19. package/agents/grd-verifier.md +778 -0
  20. package/bin/install.js +1294 -0
  21. package/commands/grd/add-phase.md +207 -0
  22. package/commands/grd/add-todo.md +193 -0
  23. package/commands/grd/architect.md +283 -0
  24. package/commands/grd/audit-milestone.md +277 -0
  25. package/commands/grd/check-todos.md +228 -0
  26. package/commands/grd/complete-milestone.md +136 -0
  27. package/commands/grd/debug.md +169 -0
  28. package/commands/grd/discuss-phase.md +86 -0
  29. package/commands/grd/evaluate.md +1095 -0
  30. package/commands/grd/execute-phase.md +339 -0
  31. package/commands/grd/explore.md +258 -0
  32. package/commands/grd/graduate.md +323 -0
  33. package/commands/grd/help.md +482 -0
  34. package/commands/grd/insert-phase.md +227 -0
  35. package/commands/grd/insights.md +231 -0
  36. package/commands/grd/join-discord.md +18 -0
  37. package/commands/grd/list-phase-assumptions.md +50 -0
  38. package/commands/grd/map-codebase.md +71 -0
  39. package/commands/grd/new-milestone.md +721 -0
  40. package/commands/grd/new-project.md +1008 -0
  41. package/commands/grd/pause-work.md +134 -0
  42. package/commands/grd/plan-milestone-gaps.md +295 -0
  43. package/commands/grd/plan-phase.md +525 -0
  44. package/commands/grd/progress.md +364 -0
  45. package/commands/grd/quick-explore.md +236 -0
  46. package/commands/grd/quick.md +309 -0
  47. package/commands/grd/remove-phase.md +349 -0
  48. package/commands/grd/research-phase.md +200 -0
  49. package/commands/grd/research.md +681 -0
  50. package/commands/grd/resume-work.md +40 -0
  51. package/commands/grd/set-profile.md +106 -0
  52. package/commands/grd/settings.md +136 -0
  53. package/commands/grd/update.md +172 -0
  54. package/commands/grd/verify-work.md +219 -0
  55. package/get-research-done/config/default.json +15 -0
  56. package/get-research-done/references/checkpoints.md +1078 -0
  57. package/get-research-done/references/continuation-format.md +249 -0
  58. package/get-research-done/references/git-integration.md +254 -0
  59. package/get-research-done/references/model-profiles.md +73 -0
  60. package/get-research-done/references/planning-config.md +94 -0
  61. package/get-research-done/references/questioning.md +141 -0
  62. package/get-research-done/references/tdd.md +263 -0
  63. package/get-research-done/references/ui-brand.md +160 -0
  64. package/get-research-done/references/verification-patterns.md +612 -0
  65. package/get-research-done/templates/DEBUG.md +159 -0
  66. package/get-research-done/templates/UAT.md +247 -0
  67. package/get-research-done/templates/archive-reason.md +195 -0
  68. package/get-research-done/templates/codebase/architecture.md +255 -0
  69. package/get-research-done/templates/codebase/concerns.md +310 -0
  70. package/get-research-done/templates/codebase/conventions.md +307 -0
  71. package/get-research-done/templates/codebase/integrations.md +280 -0
  72. package/get-research-done/templates/codebase/stack.md +186 -0
  73. package/get-research-done/templates/codebase/structure.md +285 -0
  74. package/get-research-done/templates/codebase/testing.md +480 -0
  75. package/get-research-done/templates/config.json +35 -0
  76. package/get-research-done/templates/context.md +283 -0
  77. package/get-research-done/templates/continue-here.md +78 -0
  78. package/get-research-done/templates/critic-log.md +288 -0
  79. package/get-research-done/templates/data-report.md +173 -0
  80. package/get-research-done/templates/debug-subagent-prompt.md +91 -0
  81. package/get-research-done/templates/decision-log.md +58 -0
  82. package/get-research-done/templates/decision.md +138 -0
  83. package/get-research-done/templates/discovery.md +146 -0
  84. package/get-research-done/templates/experiment-readme.md +104 -0
  85. package/get-research-done/templates/graduated-script.md +180 -0
  86. package/get-research-done/templates/iteration-summary.md +234 -0
  87. package/get-research-done/templates/milestone-archive.md +123 -0
  88. package/get-research-done/templates/milestone.md +115 -0
  89. package/get-research-done/templates/objective.md +271 -0
  90. package/get-research-done/templates/phase-prompt.md +567 -0
  91. package/get-research-done/templates/planner-subagent-prompt.md +117 -0
  92. package/get-research-done/templates/project.md +184 -0
  93. package/get-research-done/templates/requirements.md +231 -0
  94. package/get-research-done/templates/research-project/ARCHITECTURE.md +204 -0
  95. package/get-research-done/templates/research-project/FEATURES.md +147 -0
  96. package/get-research-done/templates/research-project/PITFALLS.md +200 -0
  97. package/get-research-done/templates/research-project/STACK.md +120 -0
  98. package/get-research-done/templates/research-project/SUMMARY.md +170 -0
  99. package/get-research-done/templates/research.md +529 -0
  100. package/get-research-done/templates/roadmap.md +202 -0
  101. package/get-research-done/templates/scorecard.json +113 -0
  102. package/get-research-done/templates/state.md +287 -0
  103. package/get-research-done/templates/summary.md +246 -0
  104. package/get-research-done/templates/user-setup.md +311 -0
  105. package/get-research-done/templates/verification-report.md +322 -0
  106. package/get-research-done/workflows/complete-milestone.md +756 -0
  107. package/get-research-done/workflows/diagnose-issues.md +231 -0
  108. package/get-research-done/workflows/discovery-phase.md +289 -0
  109. package/get-research-done/workflows/discuss-phase.md +433 -0
  110. package/get-research-done/workflows/execute-phase.md +657 -0
  111. package/get-research-done/workflows/execute-plan.md +1844 -0
  112. package/get-research-done/workflows/list-phase-assumptions.md +178 -0
  113. package/get-research-done/workflows/map-codebase.md +322 -0
  114. package/get-research-done/workflows/resume-project.md +307 -0
  115. package/get-research-done/workflows/transition.md +556 -0
  116. package/get-research-done/workflows/verify-phase.md +628 -0
  117. package/get-research-done/workflows/verify-work.md +596 -0
  118. package/hooks/dist/grd-check-update.js +61 -0
  119. package/hooks/dist/grd-statusline.js +84 -0
  120. package/package.json +47 -0
  121. package/scripts/audit-help-commands.sh +115 -0
  122. package/scripts/build-hooks.js +42 -0
  123. package/scripts/verify-all-commands.sh +246 -0
  124. package/scripts/verify-architect-warning.sh +35 -0
  125. package/scripts/verify-insights-mode.sh +40 -0
  126. package/scripts/verify-quick-mode.sh +20 -0
  127. package/scripts/verify-revise-data-routing.sh +139 -0
@@ -0,0 +1,628 @@
1
+ <purpose>
2
+ Verify phase goal achievement through goal-backward analysis. Check that the codebase actually delivers what the phase promised, not just that tasks were completed.
3
+
4
+ This workflow is executed by a verification subagent spawned from execute-phase.md.
5
+ </purpose>
6
+
7
+ <core_principle>
8
+ **Task completion ≠ Goal achievement**
9
+
10
+ A task "create chat component" can be marked complete when the component is a placeholder. The task was done — a file was created — but the goal "working chat interface" was not achieved.
11
+
12
+ Goal-backward verification starts from the outcome and works backwards:
13
+ 1. What must be TRUE for the goal to be achieved?
14
+ 2. What must EXIST for those truths to hold?
15
+ 3. What must be WIRED for those artifacts to function?
16
+
17
+ Then verify each level against the actual codebase.
18
+ </core_principle>
19
+
20
+ <required_reading>
21
+ @~/.claude/get-research-done/references/verification-patterns.md
22
+ @~/.claude/get-research-done/templates/verification-report.md
23
+ </required_reading>
24
+
25
+ <process>
26
+
27
+ <step name="load_context" priority="first">
28
+ **Gather all verification context:**
29
+
30
+ ```bash
31
+ # Phase directory (match both zero-padded and unpadded)
32
+ PADDED_PHASE=$(printf "%02d" ${PHASE_ARG} 2>/dev/null || echo "${PHASE_ARG}")
33
+ PHASE_DIR=$(ls -d .planning/phases/${PADDED_PHASE}-* .planning/phases/${PHASE_ARG}-* 2>/dev/null | head -1)
34
+
35
+ # Phase goal from ROADMAP
36
+ grep -A 5 "Phase ${PHASE_NUM}" .planning/ROADMAP.md
37
+
38
+ # Requirements mapped to this phase
39
+ grep -E "^| ${PHASE_NUM}" .planning/REQUIREMENTS.md 2>/dev/null
40
+
41
+ # All SUMMARY files (claims to verify)
42
+ ls "$PHASE_DIR"/*-SUMMARY.md 2>/dev/null
43
+
44
+ # All PLAN files (for must_haves in frontmatter)
45
+ ls "$PHASE_DIR"/*-PLAN.md 2>/dev/null
46
+ ```
47
+
48
+ **Extract phase goal:** Parse ROADMAP.md for this phase's goal/description. This is the outcome to verify, not the tasks.
49
+
50
+ **Extract requirements:** If REQUIREMENTS.md exists, find requirements mapped to this phase. These become additional verification targets.
51
+ </step>
52
+
53
+ <step name="establish_must_haves">
54
+ **Determine what must be verified.**
55
+
56
+ **Option A: Must-haves in PLAN frontmatter**
57
+
58
+ Check if any PLAN.md has `must_haves` in frontmatter:
59
+
60
+ ```bash
61
+ grep -l "must_haves:" "$PHASE_DIR"/*-PLAN.md 2>/dev/null
62
+ ```
63
+
64
+ If found, extract and use:
65
+ ```yaml
66
+ must_haves:
67
+ truths:
68
+ - "User can see existing messages"
69
+ - "User can send a message"
70
+ artifacts:
71
+ - path: "src/components/Chat.tsx"
72
+ provides: "Message list rendering"
73
+ key_links:
74
+ - from: "Chat.tsx"
75
+ to: "api/chat"
76
+ via: "fetch in useEffect"
77
+ ```
78
+
79
+ **Option B: Derive from phase goal**
80
+
81
+ If no must_haves in frontmatter, derive using goal-backward process:
82
+
83
+ 1. **State the goal:** Take phase goal from ROADMAP.md
84
+
85
+ 2. **Derive truths:** Ask "What must be TRUE for this goal to be achieved?"
86
+ - List 3-7 observable behaviors from user perspective
87
+ - Each truth should be testable by a human using the app
88
+
89
+ 3. **Derive artifacts:** For each truth, ask "What must EXIST?"
90
+ - Map truths to concrete files (components, routes, schemas)
91
+ - Be specific: `src/components/Chat.tsx`, not "chat component"
92
+
93
+ 4. **Derive key links:** For each artifact, ask "What must be CONNECTED?"
94
+ - Identify critical wiring (component calls API, API queries DB)
95
+ - These are where stubs hide
96
+
97
+ 5. **Document derived must-haves** before proceeding to verification.
98
+
99
+ <!-- Goal-backward derivation expertise is baked into the grd-verifier agent -->
100
+ </step>
101
+
102
+ <step name="verify_truths">
103
+ **For each observable truth, determine if codebase enables it.**
104
+
105
+ A truth is achievable if the supporting artifacts exist, are substantive, and are wired correctly.
106
+
107
+ **Verification status:**
108
+ - ✓ VERIFIED: All supporting artifacts pass all checks
109
+ - ✗ FAILED: One or more supporting artifacts missing, stub, or unwired
110
+ - ? UNCERTAIN: Can't verify programmatically (needs human)
111
+
112
+ **For each truth:**
113
+
114
+ 1. Identify supporting artifacts (which files make this truth possible?)
115
+ 2. Check artifact status (see verify_artifacts step)
116
+ 3. Check wiring status (see verify_wiring step)
117
+ 4. Determine truth status based on supporting infrastructure
118
+
119
+ **Example:**
120
+
121
+ Truth: "User can see existing messages"
122
+
123
+ Supporting artifacts:
124
+ - Chat.tsx (renders messages)
125
+ - /api/chat GET (provides messages)
126
+ - Message model (defines schema)
127
+
128
+ If Chat.tsx is a stub → Truth FAILED
129
+ If /api/chat GET returns hardcoded [] → Truth FAILED
130
+ If Chat.tsx exists, is substantive, calls API, renders response → Truth VERIFIED
131
+ </step>
132
+
133
+ <step name="verify_artifacts">
134
+ **For each required artifact, verify three levels:**
135
+
136
+ ### Level 1: Existence
137
+
138
+ ```bash
139
+ check_exists() {
140
+ local path="$1"
141
+ if [ -f "$path" ]; then
142
+ echo "EXISTS"
143
+ elif [ -d "$path" ]; then
144
+ echo "EXISTS (directory)"
145
+ else
146
+ echo "MISSING"
147
+ fi
148
+ }
149
+ ```
150
+
151
+ If MISSING → artifact fails, record and continue to next artifact.
152
+
153
+ ### Level 2: Substantive
154
+
155
+ Check that the file has real implementation, not a stub.
156
+
157
+ **Line count check:**
158
+ ```bash
159
+ check_length() {
160
+ local path="$1"
161
+ local min_lines="$2"
162
+ local lines=$(wc -l < "$path" 2>/dev/null || echo 0)
163
+ [ "$lines" -ge "$min_lines" ] && echo "SUBSTANTIVE ($lines lines)" || echo "THIN ($lines lines)"
164
+ }
165
+ ```
166
+
167
+ Minimum lines by type:
168
+ - Component: 15+ lines
169
+ - API route: 10+ lines
170
+ - Hook/util: 10+ lines
171
+ - Schema model: 5+ lines
172
+
173
+ **Stub pattern check:**
174
+ ```bash
175
+ check_stubs() {
176
+ local path="$1"
177
+
178
+ # Universal stub patterns
179
+ local stubs=$(grep -c -E "TODO|FIXME|placeholder|not implemented|coming soon" "$path" 2>/dev/null || echo 0)
180
+
181
+ # Empty returns
182
+ local empty=$(grep -c -E "return null|return undefined|return \{\}|return \[\]" "$path" 2>/dev/null || echo 0)
183
+
184
+ # Placeholder content
185
+ local placeholder=$(grep -c -E "will be here|placeholder|lorem ipsum" "$path" 2>/dev/null || echo 0)
186
+
187
+ local total=$((stubs + empty + placeholder))
188
+ [ "$total" -gt 0 ] && echo "STUB_PATTERNS ($total found)" || echo "NO_STUBS"
189
+ }
190
+ ```
191
+
192
+ **Export check (for components/hooks):**
193
+ ```bash
194
+ check_exports() {
195
+ local path="$1"
196
+ grep -E "^export (default )?(function|const|class)" "$path" && echo "HAS_EXPORTS" || echo "NO_EXPORTS"
197
+ }
198
+ ```
199
+
200
+ **Combine level 2 results:**
201
+ - SUBSTANTIVE: Adequate length + no stubs + has exports
202
+ - STUB: Too short OR has stub patterns OR no exports
203
+ - PARTIAL: Mixed signals (length OK but has some stubs)
204
+
205
+ ### Level 3: Wired
206
+
207
+ Check that the artifact is connected to the system.
208
+
209
+ **Import check (is it used?):**
210
+ ```bash
211
+ check_imported() {
212
+ local artifact_name="$1"
213
+ local search_path="${2:-src/}"
214
+
215
+ # Find imports of this artifact
216
+ local imports=$(grep -r "import.*$artifact_name" "$search_path" --include="*.ts" --include="*.tsx" 2>/dev/null | wc -l)
217
+
218
+ [ "$imports" -gt 0 ] && echo "IMPORTED ($imports times)" || echo "NOT_IMPORTED"
219
+ }
220
+ ```
221
+
222
+ **Usage check (is it called?):**
223
+ ```bash
224
+ check_used() {
225
+ local artifact_name="$1"
226
+ local search_path="${2:-src/}"
227
+
228
+ # Find usages (function calls, component renders, etc.)
229
+ local uses=$(grep -r "$artifact_name" "$search_path" --include="*.ts" --include="*.tsx" 2>/dev/null | grep -v "import" | wc -l)
230
+
231
+ [ "$uses" -gt 0 ] && echo "USED ($uses times)" || echo "NOT_USED"
232
+ }
233
+ ```
234
+
235
+ **Combine level 3 results:**
236
+ - WIRED: Imported AND used
237
+ - ORPHANED: Exists but not imported/used
238
+ - PARTIAL: Imported but not used (or vice versa)
239
+
240
+ ### Final artifact status
241
+
242
+ | Exists | Substantive | Wired | Status |
243
+ |--------|-------------|-------|--------|
244
+ | ✓ | ✓ | ✓ | ✓ VERIFIED |
245
+ | ✓ | ✓ | ✗ | ⚠️ ORPHANED |
246
+ | ✓ | ✗ | - | ✗ STUB |
247
+ | ✗ | - | - | ✗ MISSING |
248
+
249
+ Record status and evidence for each artifact.
250
+ </step>
251
+
252
+ <step name="verify_wiring">
253
+ **Verify key links between artifacts.**
254
+
255
+ Key links are critical connections. If broken, the goal fails even with all artifacts present.
256
+
257
+ ### Pattern: Component → API
258
+
259
+ Check if component actually calls the API:
260
+
261
+ ```bash
262
+ verify_component_api_link() {
263
+ local component="$1"
264
+ local api_path="$2"
265
+
266
+ # Check for fetch/axios call to the API
267
+ local has_call=$(grep -E "fetch\(['\"].*$api_path|axios\.(get|post).*$api_path" "$component" 2>/dev/null)
268
+
269
+ if [ -n "$has_call" ]; then
270
+ # Check if response is used
271
+ local uses_response=$(grep -A 5 "fetch\|axios" "$component" | grep -E "await|\.then|setData|setState" 2>/dev/null)
272
+
273
+ if [ -n "$uses_response" ]; then
274
+ echo "WIRED: $component → $api_path (call + response handling)"
275
+ else
276
+ echo "PARTIAL: $component → $api_path (call exists but response not used)"
277
+ fi
278
+ else
279
+ echo "NOT_WIRED: $component → $api_path (no call found)"
280
+ fi
281
+ }
282
+ ```
283
+
284
+ ### Pattern: API → Database
285
+
286
+ Check if API route queries database:
287
+
288
+ ```bash
289
+ verify_api_db_link() {
290
+ local route="$1"
291
+ local model="$2"
292
+
293
+ # Check for Prisma/DB call
294
+ local has_query=$(grep -E "prisma\.$model|db\.$model|$model\.(find|create|update|delete)" "$route" 2>/dev/null)
295
+
296
+ if [ -n "$has_query" ]; then
297
+ # Check if result is returned
298
+ local returns_result=$(grep -E "return.*json.*\w+|res\.json\(\w+" "$route" 2>/dev/null)
299
+
300
+ if [ -n "$returns_result" ]; then
301
+ echo "WIRED: $route → database ($model)"
302
+ else
303
+ echo "PARTIAL: $route → database (query exists but result not returned)"
304
+ fi
305
+ else
306
+ echo "NOT_WIRED: $route → database (no query for $model)"
307
+ fi
308
+ }
309
+ ```
310
+
311
+ ### Pattern: Form → Handler
312
+
313
+ Check if form submission does something:
314
+
315
+ ```bash
316
+ verify_form_handler_link() {
317
+ local component="$1"
318
+
319
+ # Find onSubmit handler
320
+ local has_handler=$(grep -E "onSubmit=\{|handleSubmit" "$component" 2>/dev/null)
321
+
322
+ if [ -n "$has_handler" ]; then
323
+ # Check if handler has real implementation
324
+ local handler_content=$(grep -A 10 "onSubmit.*=" "$component" | grep -E "fetch|axios|mutate|dispatch" 2>/dev/null)
325
+
326
+ if [ -n "$handler_content" ]; then
327
+ echo "WIRED: form → handler (has API call)"
328
+ else
329
+ # Check for stub patterns
330
+ local is_stub=$(grep -A 5 "onSubmit" "$component" | grep -E "console\.log|preventDefault\(\)$|\{\}" 2>/dev/null)
331
+ if [ -n "$is_stub" ]; then
332
+ echo "STUB: form → handler (only logs or empty)"
333
+ else
334
+ echo "PARTIAL: form → handler (exists but unclear implementation)"
335
+ fi
336
+ fi
337
+ else
338
+ echo "NOT_WIRED: form → handler (no onSubmit found)"
339
+ fi
340
+ }
341
+ ```
342
+
343
+ ### Pattern: State → Render
344
+
345
+ Check if state is actually rendered:
346
+
347
+ ```bash
348
+ verify_state_render_link() {
349
+ local component="$1"
350
+ local state_var="$2"
351
+
352
+ # Check if state variable exists
353
+ local has_state=$(grep -E "useState.*$state_var|\[$state_var," "$component" 2>/dev/null)
354
+
355
+ if [ -n "$has_state" ]; then
356
+ # Check if state is used in JSX
357
+ local renders_state=$(grep -E "\{.*$state_var.*\}|\{$state_var\." "$component" 2>/dev/null)
358
+
359
+ if [ -n "$renders_state" ]; then
360
+ echo "WIRED: state → render ($state_var displayed)"
361
+ else
362
+ echo "NOT_WIRED: state → render ($state_var exists but not displayed)"
363
+ fi
364
+ else
365
+ echo "N/A: state → render (no state var $state_var)"
366
+ fi
367
+ }
368
+ ```
369
+
370
+ ### Aggregate key link results
371
+
372
+ For each key link in must_haves:
373
+ - Run appropriate verification function
374
+ - Record status and evidence
375
+ - WIRED / PARTIAL / STUB / NOT_WIRED
376
+ </step>
377
+
378
+ <step name="verify_requirements">
379
+ **Check requirements coverage if REQUIREMENTS.md exists.**
380
+
381
+ ```bash
382
+ # Find requirements mapped to this phase
383
+ grep -E "Phase ${PHASE_NUM}" .planning/REQUIREMENTS.md 2>/dev/null
384
+ ```
385
+
386
+ For each requirement:
387
+ 1. Parse requirement description
388
+ 2. Identify which truths/artifacts support it
389
+ 3. Determine status based on supporting infrastructure
390
+
391
+ **Requirement status:**
392
+ - ✓ SATISFIED: All supporting truths verified
393
+ - ✗ BLOCKED: One or more supporting truths failed
394
+ - ? NEEDS HUMAN: Can't verify requirement programmatically
395
+ </step>
396
+
397
+ <step name="scan_antipatterns">
398
+ **Scan for anti-patterns across phase files.**
399
+
400
+ Identify files modified in this phase:
401
+ ```bash
402
+ # Extract files from SUMMARY.md
403
+ grep -E "^\- \`" "$PHASE_DIR"/*-SUMMARY.md | sed 's/.*`\([^`]*\)`.*/\1/' | sort -u
404
+ ```
405
+
406
+ Run anti-pattern detection:
407
+ ```bash
408
+ scan_antipatterns() {
409
+ local files="$@"
410
+
411
+ echo "## Anti-Patterns Found"
412
+ echo ""
413
+
414
+ for file in $files; do
415
+ [ -f "$file" ] || continue
416
+
417
+ # TODO/FIXME comments
418
+ grep -n -E "TODO|FIXME|XXX|HACK" "$file" 2>/dev/null | while read line; do
419
+ echo "| $file | $(echo $line | cut -d: -f1) | TODO/FIXME | ⚠️ Warning |"
420
+ done
421
+
422
+ # Placeholder content
423
+ grep -n -E "placeholder|coming soon|will be here" "$file" -i 2>/dev/null | while read line; do
424
+ echo "| $file | $(echo $line | cut -d: -f1) | Placeholder | 🛑 Blocker |"
425
+ done
426
+
427
+ # Empty implementations
428
+ grep -n -E "return null|return \{\}|return \[\]|=> \{\}" "$file" 2>/dev/null | while read line; do
429
+ echo "| $file | $(echo $line | cut -d: -f1) | Empty return | ⚠️ Warning |"
430
+ done
431
+
432
+ # Console.log only implementations
433
+ grep -n -B 2 -A 2 "console\.log" "$file" 2>/dev/null | grep -E "^\s*(const|function|=>)" | while read line; do
434
+ echo "| $file | - | Log-only function | ⚠️ Warning |"
435
+ done
436
+ done
437
+ }
438
+ ```
439
+
440
+ Categorize findings:
441
+ - 🛑 Blocker: Prevents goal achievement (placeholder renders, empty handlers)
442
+ - ⚠️ Warning: Indicates incomplete (TODO comments, console.log)
443
+ - ℹ️ Info: Notable but not problematic
444
+ </step>
445
+
446
+ <step name="identify_human_verification">
447
+ **Flag items that need human verification.**
448
+
449
+ Some things can't be verified programmatically:
450
+
451
+ **Always needs human:**
452
+ - Visual appearance (does it look right?)
453
+ - User flow completion (can you do the full task?)
454
+ - Real-time behavior (WebSocket, SSE updates)
455
+ - External service integration (payments, email)
456
+ - Performance feel (does it feel fast?)
457
+ - Error message clarity
458
+
459
+ **Needs human if uncertain:**
460
+ - Complex wiring that grep can't trace
461
+ - Dynamic behavior depending on state
462
+ - Edge cases and error states
463
+
464
+ **Format for human verification:**
465
+ ```markdown
466
+ ## Human Verification Required
467
+
468
+ ### 1. {Test Name}
469
+ **Test:** {What to do}
470
+ **Expected:** {What should happen}
471
+ **Why human:** {Why can't verify programmatically}
472
+ ```
473
+ </step>
474
+
475
+ <step name="determine_status">
476
+ **Calculate overall verification status.**
477
+
478
+ **Status: passed**
479
+ - All truths VERIFIED
480
+ - All artifacts pass level 1-3
481
+ - All key links WIRED
482
+ - No blocker anti-patterns
483
+ - (Human verification items are OK — will be prompted)
484
+
485
+ **Status: gaps_found**
486
+ - One or more truths FAILED
487
+ - OR one or more artifacts MISSING/STUB
488
+ - OR one or more key links NOT_WIRED
489
+ - OR blocker anti-patterns found
490
+
491
+ **Status: human_needed**
492
+ - All automated checks pass
493
+ - BUT items flagged for human verification
494
+ - Can't determine goal achievement without human
495
+
496
+ **Calculate score:**
497
+ ```
498
+ score = (verified_truths / total_truths)
499
+ ```
500
+ </step>
501
+
502
+ <step name="generate_fix_plans">
503
+ **If gaps_found, recommend fix plans.**
504
+
505
+ Group related gaps into fix plans:
506
+
507
+ 1. **Identify gap clusters:**
508
+ - API stub + component not wired → "Wire frontend to backend"
509
+ - Multiple artifacts missing → "Complete core implementation"
510
+ - Wiring issues only → "Connect existing components"
511
+
512
+ 2. **Generate plan recommendations:**
513
+
514
+ ```markdown
515
+ ### {phase}-{next}-PLAN.md: {Fix Name}
516
+
517
+ **Objective:** {What this fixes}
518
+
519
+ **Tasks:**
520
+ 1. {Task to fix gap 1}
521
+ - Files: {files to modify}
522
+ - Action: {specific fix}
523
+ - Verify: {how to confirm fix}
524
+
525
+ 2. {Task to fix gap 2}
526
+ - Files: {files to modify}
527
+ - Action: {specific fix}
528
+ - Verify: {how to confirm fix}
529
+
530
+ 3. Re-verify phase goal
531
+ - Run verification again
532
+ - Confirm all must-haves pass
533
+
534
+ **Estimated scope:** {Small / Medium}
535
+ ```
536
+
537
+ 3. **Keep plans focused:**
538
+ - 2-3 tasks per plan
539
+ - Single concern per plan
540
+ - Include verification task
541
+
542
+ 4. **Order by dependency:**
543
+ - Fix missing artifacts before wiring
544
+ - Fix stubs before integration
545
+ - Verify after all fixes
546
+ </step>
547
+
548
+ <step name="create_report">
549
+ **Generate VERIFICATION.md using template.**
550
+
551
+ ```bash
552
+ REPORT_PATH="$PHASE_DIR/${PHASE_NUM}-VERIFICATION.md"
553
+ ```
554
+
555
+ Fill template sections:
556
+ 1. **Frontmatter:** phase, verified timestamp, status, score
557
+ 2. **Goal Achievement:** Truth verification table
558
+ 3. **Required Artifacts:** Artifact verification table
559
+ 4. **Key Link Verification:** Wiring verification table
560
+ 5. **Requirements Coverage:** If REQUIREMENTS.md exists
561
+ 6. **Anti-Patterns Found:** Scan results table
562
+ 7. **Human Verification Required:** Items needing human
563
+ 8. **Gaps Summary:** Critical and non-critical gaps
564
+ 9. **Recommended Fix Plans:** If gaps_found
565
+ 10. **Verification Metadata:** Approach, timing, counts
566
+
567
+ See ~/.claude/get-research-done/templates/verification-report.md for complete template.
568
+ </step>
569
+
570
+ <step name="return_to_orchestrator">
571
+ **Return results to execute-phase orchestrator.**
572
+
573
+ **Return format:**
574
+
575
+ ```markdown
576
+ ## Verification Complete
577
+
578
+ **Status:** {passed | gaps_found | human_needed}
579
+ **Score:** {N}/{M} must-haves verified
580
+ **Report:** .planning/phases/{phase_dir}/{phase}-VERIFICATION.md
581
+
582
+ {If passed:}
583
+ All must-haves verified. Phase goal achieved. Ready to proceed.
584
+
585
+ {If gaps_found:}
586
+ ### Gaps Found
587
+
588
+ {N} critical gaps blocking goal achievement:
589
+ 1. {Gap 1 summary}
590
+ 2. {Gap 2 summary}
591
+
592
+ ### Recommended Fixes
593
+
594
+ {N} fix plans recommended:
595
+ 1. {phase}-{next}-PLAN.md: {name}
596
+ 2. {phase}-{next+1}-PLAN.md: {name}
597
+
598
+ {If human_needed:}
599
+ ### Human Verification Required
600
+
601
+ {N} items need human testing:
602
+ 1. {Item 1}
603
+ 2. {Item 2}
604
+
605
+ Automated checks passed. Awaiting human verification.
606
+ ```
607
+
608
+ The orchestrator will:
609
+ - If `passed`: Continue to update_roadmap
610
+ - If `gaps_found`: Create and execute fix plans, then re-verify
611
+ - If `human_needed`: Present items to user, collect responses
612
+ </step>
613
+
614
+ </process>
615
+
616
+ <success_criteria>
617
+ - [ ] Must-haves established (from frontmatter or derived)
618
+ - [ ] All truths verified with status and evidence
619
+ - [ ] All artifacts checked at all three levels
620
+ - [ ] All key links verified
621
+ - [ ] Requirements coverage assessed (if applicable)
622
+ - [ ] Anti-patterns scanned and categorized
623
+ - [ ] Human verification items identified
624
+ - [ ] Overall status determined
625
+ - [ ] Fix plans generated (if gaps_found)
626
+ - [ ] VERIFICATION.md created with complete report
627
+ - [ ] Results returned to orchestrator
628
+ </success_criteria>