gsd-codex-cli 1.20.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 (160) hide show
  1. package/.codex/prompts/gsd-add-phase.md +44 -0
  2. package/.codex/prompts/gsd-add-todo.md +43 -0
  3. package/.codex/prompts/gsd-audit-milestone.md +43 -0
  4. package/.codex/prompts/gsd-check-todos.md +43 -0
  5. package/.codex/prompts/gsd-complete-milestone.md +43 -0
  6. package/.codex/prompts/gsd-debug.md +46 -0
  7. package/.codex/prompts/gsd-discuss-phase.md +43 -0
  8. package/.codex/prompts/gsd-execute-phase.md +43 -0
  9. package/.codex/prompts/gsd-help.md +43 -0
  10. package/.codex/prompts/gsd-insert-phase.md +43 -0
  11. package/.codex/prompts/gsd-list-phase-assumptions.md +43 -0
  12. package/.codex/prompts/gsd-map-codebase.md +43 -0
  13. package/.codex/prompts/gsd-new-milestone.md +43 -0
  14. package/.codex/prompts/gsd-new-project.md +43 -0
  15. package/.codex/prompts/gsd-pause-work.md +43 -0
  16. package/.codex/prompts/gsd-plan-milestone-gaps.md +43 -0
  17. package/.codex/prompts/gsd-plan-phase.md +43 -0
  18. package/.codex/prompts/gsd-progress.md +43 -0
  19. package/.codex/prompts/gsd-quick.md +43 -0
  20. package/.codex/prompts/gsd-remove-phase.md +43 -0
  21. package/.codex/prompts/gsd-research-phase.md +43 -0
  22. package/.codex/prompts/gsd-resume-work.md +43 -0
  23. package/.codex/prompts/gsd-set-profile.md +43 -0
  24. package/.codex/prompts/gsd-settings.md +43 -0
  25. package/.codex/prompts/gsd-update.md +43 -0
  26. package/.codex/prompts/gsd-verify-work.md +43 -0
  27. package/.codex/skills/get-shit-done-codex/SKILL.md +65 -0
  28. package/.codex/skills/get-shit-done-codex/references/compat.md +32 -0
  29. package/.codex/skills/get-shit-done-codex/references/windows.md +23 -0
  30. package/CHANGELOG.md +1434 -0
  31. package/LICENSE +21 -0
  32. package/README.md +690 -0
  33. package/agents/gsd-codebase-mapper.md +761 -0
  34. package/agents/gsd-debugger.md +1198 -0
  35. package/agents/gsd-executor.md +419 -0
  36. package/agents/gsd-integration-checker.md +423 -0
  37. package/agents/gsd-phase-researcher.md +469 -0
  38. package/agents/gsd-plan-checker.md +622 -0
  39. package/agents/gsd-planner.md +1159 -0
  40. package/agents/gsd-project-researcher.md +618 -0
  41. package/agents/gsd-research-synthesizer.md +236 -0
  42. package/agents/gsd-roadmapper.md +639 -0
  43. package/agents/gsd-verifier.md +541 -0
  44. package/bin/install-codex.js +100 -0
  45. package/bin/install.js +1806 -0
  46. package/commands/gsd/add-phase.md +39 -0
  47. package/commands/gsd/add-todo.md +42 -0
  48. package/commands/gsd/audit-milestone.md +42 -0
  49. package/commands/gsd/check-todos.md +41 -0
  50. package/commands/gsd/cleanup.md +18 -0
  51. package/commands/gsd/complete-milestone.md +136 -0
  52. package/commands/gsd/debug.md +162 -0
  53. package/commands/gsd/discuss-phase.md +87 -0
  54. package/commands/gsd/execute-phase.md +42 -0
  55. package/commands/gsd/health.md +22 -0
  56. package/commands/gsd/help.md +22 -0
  57. package/commands/gsd/insert-phase.md +33 -0
  58. package/commands/gsd/join-discord.md +18 -0
  59. package/commands/gsd/list-phase-assumptions.md +50 -0
  60. package/commands/gsd/map-codebase.md +71 -0
  61. package/commands/gsd/new-milestone.md +51 -0
  62. package/commands/gsd/new-project.md +42 -0
  63. package/commands/gsd/pause-work.md +35 -0
  64. package/commands/gsd/plan-milestone-gaps.md +40 -0
  65. package/commands/gsd/plan-phase.md +44 -0
  66. package/commands/gsd/progress.md +24 -0
  67. package/commands/gsd/quick.md +40 -0
  68. package/commands/gsd/reapply-patches.md +110 -0
  69. package/commands/gsd/remove-phase.md +32 -0
  70. package/commands/gsd/research-phase.md +187 -0
  71. package/commands/gsd/resume-work.md +40 -0
  72. package/commands/gsd/set-profile.md +34 -0
  73. package/commands/gsd/settings.md +36 -0
  74. package/commands/gsd/update.md +37 -0
  75. package/commands/gsd/verify-work.md +39 -0
  76. package/get-shit-done/bin/gsd-tools.cjs +5243 -0
  77. package/get-shit-done/bin/gsd-tools.test.cjs +2273 -0
  78. package/get-shit-done/references/checkpoints.md +775 -0
  79. package/get-shit-done/references/continuation-format.md +249 -0
  80. package/get-shit-done/references/decimal-phase-calculation.md +65 -0
  81. package/get-shit-done/references/git-integration.md +248 -0
  82. package/get-shit-done/references/git-planning-commit.md +38 -0
  83. package/get-shit-done/references/model-profile-resolution.md +34 -0
  84. package/get-shit-done/references/model-profiles.md +92 -0
  85. package/get-shit-done/references/phase-argument-parsing.md +61 -0
  86. package/get-shit-done/references/planning-config.md +196 -0
  87. package/get-shit-done/references/questioning.md +145 -0
  88. package/get-shit-done/references/tdd.md +263 -0
  89. package/get-shit-done/references/ui-brand.md +160 -0
  90. package/get-shit-done/references/verification-patterns.md +612 -0
  91. package/get-shit-done/templates/DEBUG.md +159 -0
  92. package/get-shit-done/templates/UAT.md +247 -0
  93. package/get-shit-done/templates/codebase/architecture.md +255 -0
  94. package/get-shit-done/templates/codebase/concerns.md +310 -0
  95. package/get-shit-done/templates/codebase/conventions.md +307 -0
  96. package/get-shit-done/templates/codebase/integrations.md +280 -0
  97. package/get-shit-done/templates/codebase/stack.md +186 -0
  98. package/get-shit-done/templates/codebase/structure.md +285 -0
  99. package/get-shit-done/templates/codebase/testing.md +480 -0
  100. package/get-shit-done/templates/config.json +36 -0
  101. package/get-shit-done/templates/context.md +283 -0
  102. package/get-shit-done/templates/continue-here.md +78 -0
  103. package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  104. package/get-shit-done/templates/discovery.md +146 -0
  105. package/get-shit-done/templates/milestone-archive.md +123 -0
  106. package/get-shit-done/templates/milestone.md +115 -0
  107. package/get-shit-done/templates/phase-prompt.md +567 -0
  108. package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  109. package/get-shit-done/templates/project.md +184 -0
  110. package/get-shit-done/templates/requirements.md +231 -0
  111. package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  112. package/get-shit-done/templates/research-project/FEATURES.md +147 -0
  113. package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  114. package/get-shit-done/templates/research-project/STACK.md +120 -0
  115. package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  116. package/get-shit-done/templates/research.md +552 -0
  117. package/get-shit-done/templates/roadmap.md +202 -0
  118. package/get-shit-done/templates/state.md +176 -0
  119. package/get-shit-done/templates/summary-complex.md +59 -0
  120. package/get-shit-done/templates/summary-minimal.md +41 -0
  121. package/get-shit-done/templates/summary-standard.md +48 -0
  122. package/get-shit-done/templates/summary.md +246 -0
  123. package/get-shit-done/templates/user-setup.md +311 -0
  124. package/get-shit-done/templates/verification-report.md +322 -0
  125. package/get-shit-done/workflows/add-phase.md +111 -0
  126. package/get-shit-done/workflows/add-todo.md +157 -0
  127. package/get-shit-done/workflows/audit-milestone.md +242 -0
  128. package/get-shit-done/workflows/check-todos.md +176 -0
  129. package/get-shit-done/workflows/cleanup.md +152 -0
  130. package/get-shit-done/workflows/complete-milestone.md +674 -0
  131. package/get-shit-done/workflows/diagnose-issues.md +219 -0
  132. package/get-shit-done/workflows/discovery-phase.md +289 -0
  133. package/get-shit-done/workflows/discuss-phase.md +485 -0
  134. package/get-shit-done/workflows/execute-phase.md +408 -0
  135. package/get-shit-done/workflows/execute-plan.md +441 -0
  136. package/get-shit-done/workflows/health.md +156 -0
  137. package/get-shit-done/workflows/help.md +486 -0
  138. package/get-shit-done/workflows/insert-phase.md +129 -0
  139. package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  140. package/get-shit-done/workflows/map-codebase.md +327 -0
  141. package/get-shit-done/workflows/new-milestone.md +373 -0
  142. package/get-shit-done/workflows/new-project.md +1113 -0
  143. package/get-shit-done/workflows/pause-work.md +122 -0
  144. package/get-shit-done/workflows/plan-milestone-gaps.md +256 -0
  145. package/get-shit-done/workflows/plan-phase.md +448 -0
  146. package/get-shit-done/workflows/progress.md +393 -0
  147. package/get-shit-done/workflows/quick.md +444 -0
  148. package/get-shit-done/workflows/remove-phase.md +154 -0
  149. package/get-shit-done/workflows/research-phase.md +74 -0
  150. package/get-shit-done/workflows/resume-project.md +306 -0
  151. package/get-shit-done/workflows/set-profile.md +80 -0
  152. package/get-shit-done/workflows/settings.md +200 -0
  153. package/get-shit-done/workflows/transition.md +539 -0
  154. package/get-shit-done/workflows/update.md +214 -0
  155. package/get-shit-done/workflows/verify-phase.md +242 -0
  156. package/get-shit-done/workflows/verify-work.md +570 -0
  157. package/hooks/dist/gsd-check-update.js +62 -0
  158. package/hooks/dist/gsd-statusline.js +91 -0
  159. package/package.json +54 -0
  160. package/scripts/build-hooks.js +42 -0
@@ -0,0 +1,214 @@
1
+ <purpose>
2
+ Check for GSD updates via npm, display changelog for versions between installed and latest, obtain user confirmation, and execute clean installation with cache clearing.
3
+ </purpose>
4
+
5
+ <required_reading>
6
+ Read all files referenced by the invoking prompt's execution_context before starting.
7
+ </required_reading>
8
+
9
+ <process>
10
+
11
+ <step name="get_installed_version">
12
+ Detect whether GSD is installed locally or globally by checking both locations:
13
+
14
+ ```bash
15
+ # Check local first (takes priority)
16
+ # Paths templated at install time for runtime compatibility
17
+ if [ -f ./.claude/get-shit-done/VERSION ]; then
18
+ cat ./.claude/get-shit-done/VERSION
19
+ echo "LOCAL"
20
+ elif [ -f ~/.claude/get-shit-done/VERSION ]; then
21
+ cat ~/.claude/get-shit-done/VERSION
22
+ echo "GLOBAL"
23
+ else
24
+ echo "UNKNOWN"
25
+ fi
26
+ ```
27
+
28
+ Parse output:
29
+ - If last line is "LOCAL": installed version is first line, use `--local` flag for update
30
+ - If last line is "GLOBAL": installed version is first line, use `--global` flag for update
31
+ - If "UNKNOWN": proceed to install step (treat as version 0.0.0)
32
+
33
+ **If VERSION file missing:**
34
+ ```
35
+ ## GSD Update
36
+
37
+ **Installed version:** Unknown
38
+
39
+ Your installation doesn't include version tracking.
40
+
41
+ Running fresh install...
42
+ ```
43
+
44
+ Proceed to install step (treat as version 0.0.0 for comparison).
45
+ </step>
46
+
47
+ <step name="check_latest_version">
48
+ Check npm for latest version:
49
+
50
+ ```bash
51
+ npm view gsd-codex-cli version 2>/dev/null
52
+ ```
53
+
54
+ **If npm check fails:**
55
+ ```
56
+ Couldn't check for updates (offline or npm unavailable).
57
+
58
+ To update manually: `npx --yes --package=gsd-codex-cli@latest get-shit-done-cc --global`
59
+ ```
60
+
61
+ Exit.
62
+ </step>
63
+
64
+ <step name="compare_versions">
65
+ Compare installed vs latest:
66
+
67
+ **If installed == latest:**
68
+ ```
69
+ ## GSD Update
70
+
71
+ **Installed:** X.Y.Z
72
+ **Latest:** X.Y.Z
73
+
74
+ You're already on the latest version.
75
+ ```
76
+
77
+ Exit.
78
+
79
+ **If installed > latest:**
80
+ ```
81
+ ## GSD Update
82
+
83
+ **Installed:** X.Y.Z
84
+ **Latest:** A.B.C
85
+
86
+ You're ahead of the latest release (development version?).
87
+ ```
88
+
89
+ Exit.
90
+ </step>
91
+
92
+ <step name="show_changes_and_confirm">
93
+ **If update available**, fetch and show what's new BEFORE updating:
94
+
95
+ 1. Fetch changelog from GitHub raw URL
96
+ 2. Extract entries between installed and latest versions
97
+ 3. Display preview and ask for confirmation:
98
+
99
+ ```
100
+ ## GSD Update Available
101
+
102
+ **Installed:** 1.5.10
103
+ **Latest:** 1.5.15
104
+
105
+ ### What's New
106
+ ────────────────────────────────────────────────────────────
107
+
108
+ ## [1.5.15] - 2026-01-20
109
+
110
+ ### Added
111
+ - Feature X
112
+
113
+ ## [1.5.14] - 2026-01-18
114
+
115
+ ### Fixed
116
+ - Bug fix Y
117
+
118
+ ────────────────────────────────────────────────────────────
119
+
120
+ ⚠️ **Note:** The installer performs a clean install of GSD folders:
121
+ - `commands/gsd/` will be wiped and replaced
122
+ - `get-shit-done/` will be wiped and replaced
123
+ - `agents/gsd-*` files will be replaced
124
+
125
+ (Paths are relative to your install location: `~/.claude/` for global, `./.claude/` for local)
126
+
127
+ Your custom files in other locations are preserved:
128
+ - Custom commands not in `commands/gsd/` ✓
129
+ - Custom agents not prefixed with `gsd-` ✓
130
+ - Custom hooks ✓
131
+ - Your CLAUDE.md files ✓
132
+
133
+ If you've modified any GSD files directly, they'll be automatically backed up to `gsd-local-patches/` and can be reapplied with `/gsd:reapply-patches` after the update.
134
+ ```
135
+
136
+ Use AskUserQuestion:
137
+ - Question: "Proceed with update?"
138
+ - Options:
139
+ - "Yes, update now"
140
+ - "No, cancel"
141
+
142
+ **If user cancels:** Exit.
143
+ </step>
144
+
145
+ <step name="run_update">
146
+ Run the update using the install type detected in step 1:
147
+
148
+ **If LOCAL install:**
149
+ ```bash
150
+ npx --yes --package=gsd-codex-cli@latest get-shit-done-cc --local
151
+ ```
152
+
153
+ **If GLOBAL install (or unknown):**
154
+ ```bash
155
+ npx --yes --package=gsd-codex-cli@latest get-shit-done-cc --global
156
+ ```
157
+
158
+ Capture output. If install fails, show error and exit.
159
+
160
+ Clear the update cache so statusline indicator disappears:
161
+
162
+ **If LOCAL install:**
163
+ ```bash
164
+ rm -f ./.claude/cache/gsd-update-check.json
165
+ ```
166
+
167
+ **If GLOBAL install:**
168
+ ```bash
169
+ rm -f ~/.claude/cache/gsd-update-check.json
170
+ ```
171
+ (Paths are templated at install time for runtime compatibility)
172
+ </step>
173
+
174
+ <step name="display_result">
175
+ Format completion message (changelog was already shown in confirmation step):
176
+
177
+ ```
178
+ ╔═══════════════════════════════════════════════════════════╗
179
+ ║ GSD Updated: v1.5.10 → v1.5.15 ║
180
+ ╚═══════════════════════════════════════════════════════════╝
181
+
182
+ ⚠️ Restart Claude Code to pick up the new commands.
183
+
184
+ [View full changelog](https://github.com/glittercowboy/get-shit-done/blob/main/CHANGELOG.md)
185
+ ```
186
+ </step>
187
+
188
+
189
+ <step name="check_local_patches">
190
+ After update completes, check if the installer detected and backed up any locally modified files:
191
+
192
+ Check for gsd-local-patches/backup-meta.json in the config directory.
193
+
194
+ **If patches found:**
195
+
196
+ ```
197
+ Local patches were backed up before the update.
198
+ Run /gsd:reapply-patches to merge your modifications into the new version.
199
+ ```
200
+
201
+ **If no patches:** Continue normally.
202
+ </step>
203
+ </process>
204
+
205
+ <success_criteria>
206
+ - [ ] Installed version read correctly
207
+ - [ ] Latest version checked via npm
208
+ - [ ] Update skipped if already current
209
+ - [ ] Changelog fetched and displayed BEFORE update
210
+ - [ ] Clean install warning shown
211
+ - [ ] User confirmation obtained
212
+ - [ ] Update executed successfully
213
+ - [ ] Restart reminder shown
214
+ </success_criteria>
@@ -0,0 +1,242 @@
1
+ <purpose>
2
+ Verify phase goal achievement through goal-backward analysis. Check that the codebase delivers what the phase promised, not just that tasks completed.
3
+
4
+ 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 — but the goal "working chat interface" was not achieved.
11
+
12
+ Goal-backward verification:
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-shit-done/references/verification-patterns.md
22
+ @~/.claude/get-shit-done/templates/verification-report.md
23
+ </required_reading>
24
+
25
+ <process>
26
+
27
+ <step name="load_context" priority="first">
28
+ Load phase operation context:
29
+
30
+ ```bash
31
+ INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init phase-op "${PHASE_ARG}")
32
+ ```
33
+
34
+ Extract from init JSON: `phase_dir`, `phase_number`, `phase_name`, `has_plans`, `plan_count`.
35
+
36
+ Then load phase details and list plans/summaries:
37
+ ```bash
38
+ node ~/.claude/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "${phase_number}"
39
+ grep -E "^| ${phase_number}" .planning/REQUIREMENTS.md 2>/dev/null
40
+ ls "$phase_dir"/*-SUMMARY.md "$phase_dir"/*-PLAN.md 2>/dev/null
41
+ ```
42
+
43
+ Extract **phase goal** from ROADMAP.md (the outcome to verify, not tasks) and **requirements** from REQUIREMENTS.md if it exists.
44
+ </step>
45
+
46
+ <step name="establish_must_haves">
47
+ **Option A: Must-haves in PLAN frontmatter**
48
+
49
+ Use gsd-tools to extract must_haves from each PLAN:
50
+
51
+ ```bash
52
+ for plan in "$PHASE_DIR"/*-PLAN.md; do
53
+ MUST_HAVES=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs frontmatter get "$plan" --field must_haves)
54
+ echo "=== $plan ===" && echo "$MUST_HAVES"
55
+ done
56
+ ```
57
+
58
+ Returns JSON: `{ truths: [...], artifacts: [...], key_links: [...] }`
59
+
60
+ Aggregate all must_haves across plans for phase-level verification.
61
+
62
+ **Option B: Use Success Criteria from ROADMAP.md**
63
+
64
+ If no must_haves in frontmatter (MUST_HAVES returns error or empty), check for Success Criteria:
65
+
66
+ ```bash
67
+ PHASE_DATA=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "${phase_number}" --raw)
68
+ ```
69
+
70
+ Parse the `success_criteria` array from the JSON output. If non-empty:
71
+ 1. Use each Success Criterion directly as a **truth** (they are already written as observable, testable behaviors)
72
+ 2. Derive **artifacts** (concrete file paths for each truth)
73
+ 3. Derive **key links** (critical wiring where stubs hide)
74
+ 4. Document the must-haves before proceeding
75
+
76
+ Success Criteria from ROADMAP.md are the contract — they override PLAN-level must_haves when both exist.
77
+
78
+ **Option C: Derive from phase goal (fallback)**
79
+
80
+ If no must_haves in frontmatter AND no Success Criteria in ROADMAP:
81
+ 1. State the goal from ROADMAP.md
82
+ 2. Derive **truths** (3-7 observable behaviors, each testable)
83
+ 3. Derive **artifacts** (concrete file paths for each truth)
84
+ 4. Derive **key links** (critical wiring where stubs hide)
85
+ 5. Document derived must-haves before proceeding
86
+ </step>
87
+
88
+ <step name="verify_truths">
89
+ For each observable truth, determine if the codebase enables it.
90
+
91
+ **Status:** ✓ VERIFIED (all supporting artifacts pass) | ✗ FAILED (artifact missing/stub/unwired) | ? UNCERTAIN (needs human)
92
+
93
+ For each truth: identify supporting artifacts → check artifact status → check wiring → determine truth status.
94
+
95
+ **Example:** Truth "User can see existing messages" depends on Chat.tsx (renders), /api/chat GET (provides), Message model (schema). If Chat.tsx is a stub or API returns hardcoded [] → FAILED. If all exist, are substantive, and connected → VERIFIED.
96
+ </step>
97
+
98
+ <step name="verify_artifacts">
99
+ Use gsd-tools for artifact verification against must_haves in each PLAN:
100
+
101
+ ```bash
102
+ for plan in "$PHASE_DIR"/*-PLAN.md; do
103
+ ARTIFACT_RESULT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs verify artifacts "$plan")
104
+ echo "=== $plan ===" && echo "$ARTIFACT_RESULT"
105
+ done
106
+ ```
107
+
108
+ Parse JSON result: `{ all_passed, passed, total, artifacts: [{path, exists, issues, passed}] }`
109
+
110
+ **Artifact status from result:**
111
+ - `exists=false` → MISSING
112
+ - `issues` not empty → STUB (check issues for "Only N lines" or "Missing pattern")
113
+ - `passed=true` → VERIFIED (Levels 1-2 pass)
114
+
115
+ **Level 3 — Wired (manual check for artifacts that pass Levels 1-2):**
116
+ ```bash
117
+ grep -r "import.*$artifact_name" src/ --include="*.ts" --include="*.tsx" # IMPORTED
118
+ grep -r "$artifact_name" src/ --include="*.ts" --include="*.tsx" | grep -v "import" # USED
119
+ ```
120
+ WIRED = imported AND used. ORPHANED = exists but not imported/used.
121
+
122
+ | Exists | Substantive | Wired | Status |
123
+ |--------|-------------|-------|--------|
124
+ | ✓ | ✓ | ✓ | ✓ VERIFIED |
125
+ | ✓ | ✓ | ✗ | ⚠️ ORPHANED |
126
+ | ✓ | ✗ | - | ✗ STUB |
127
+ | ✗ | - | - | ✗ MISSING |
128
+ </step>
129
+
130
+ <step name="verify_wiring">
131
+ Use gsd-tools for key link verification against must_haves in each PLAN:
132
+
133
+ ```bash
134
+ for plan in "$PHASE_DIR"/*-PLAN.md; do
135
+ LINKS_RESULT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs verify key-links "$plan")
136
+ echo "=== $plan ===" && echo "$LINKS_RESULT"
137
+ done
138
+ ```
139
+
140
+ Parse JSON result: `{ all_verified, verified, total, links: [{from, to, via, verified, detail}] }`
141
+
142
+ **Link status from result:**
143
+ - `verified=true` → WIRED
144
+ - `verified=false` with "not found" → NOT_WIRED
145
+ - `verified=false` with "Pattern not found" → PARTIAL
146
+
147
+ **Fallback patterns (if key_links not in must_haves):**
148
+
149
+ | Pattern | Check | Status |
150
+ |---------|-------|--------|
151
+ | Component → API | fetch/axios call to API path, response used (await/.then/setState) | WIRED / PARTIAL (call but unused response) / NOT_WIRED |
152
+ | API → Database | Prisma/DB query on model, result returned via res.json() | WIRED / PARTIAL (query but not returned) / NOT_WIRED |
153
+ | Form → Handler | onSubmit with real implementation (fetch/axios/mutate/dispatch), not console.log/empty | WIRED / STUB (log-only/empty) / NOT_WIRED |
154
+ | State → Render | useState variable appears in JSX (`{stateVar}` or `{stateVar.property}`) | WIRED / NOT_WIRED |
155
+
156
+ Record status and evidence for each key link.
157
+ </step>
158
+
159
+ <step name="verify_requirements">
160
+ If REQUIREMENTS.md exists:
161
+ ```bash
162
+ grep -E "Phase ${PHASE_NUM}" .planning/REQUIREMENTS.md 2>/dev/null
163
+ ```
164
+
165
+ For each requirement: parse description → identify supporting truths/artifacts → status: ✓ SATISFIED / ✗ BLOCKED / ? NEEDS HUMAN.
166
+ </step>
167
+
168
+ <step name="scan_antipatterns">
169
+ Extract files modified in this phase from SUMMARY.md, scan each:
170
+
171
+ | Pattern | Search | Severity |
172
+ |---------|--------|----------|
173
+ | TODO/FIXME/XXX/HACK | `grep -n -E "TODO\|FIXME\|XXX\|HACK"` | ⚠️ Warning |
174
+ | Placeholder content | `grep -n -iE "placeholder\|coming soon\|will be here"` | 🛑 Blocker |
175
+ | Empty returns | `grep -n -E "return null\|return \{\}\|return \[\]\|=> \{\}"` | ⚠️ Warning |
176
+ | Log-only functions | Functions containing only console.log | ⚠️ Warning |
177
+
178
+ Categorize: 🛑 Blocker (prevents goal) | ⚠️ Warning (incomplete) | ℹ️ Info (notable).
179
+ </step>
180
+
181
+ <step name="identify_human_verification">
182
+ **Always needs human:** Visual appearance, user flow completion, real-time behavior (WebSocket/SSE), external service integration, performance feel, error message clarity.
183
+
184
+ **Needs human if uncertain:** Complex wiring grep can't trace, dynamic state-dependent behavior, edge cases.
185
+
186
+ Format each as: Test Name → What to do → Expected result → Why can't verify programmatically.
187
+ </step>
188
+
189
+ <step name="determine_status">
190
+ **passed:** All truths VERIFIED, all artifacts pass levels 1-3, all key links WIRED, no blocker anti-patterns.
191
+
192
+ **gaps_found:** Any truth FAILED, artifact MISSING/STUB, key link NOT_WIRED, or blocker found.
193
+
194
+ **human_needed:** All automated checks pass but human verification items remain.
195
+
196
+ **Score:** `verified_truths / total_truths`
197
+ </step>
198
+
199
+ <step name="generate_fix_plans">
200
+ If gaps_found:
201
+
202
+ 1. **Cluster related gaps:** API stub + component unwired → "Wire frontend to backend". Multiple missing → "Complete core implementation". Wiring only → "Connect existing components".
203
+
204
+ 2. **Generate plan per cluster:** Objective, 2-3 tasks (files/action/verify each), re-verify step. Keep focused: single concern per plan.
205
+
206
+ 3. **Order by dependency:** Fix missing → fix stubs → fix wiring → verify.
207
+ </step>
208
+
209
+ <step name="create_report">
210
+ ```bash
211
+ REPORT_PATH="$PHASE_DIR/${PHASE_NUM}-VERIFICATION.md"
212
+ ```
213
+
214
+ Fill template sections: frontmatter (phase/timestamp/status/score), goal achievement, artifact table, wiring table, requirements coverage, anti-patterns, human verification, gaps summary, fix plans (if gaps_found), metadata.
215
+
216
+ See ~/.claude/get-shit-done/templates/verification-report.md for complete template.
217
+ </step>
218
+
219
+ <step name="return_to_orchestrator">
220
+ Return status (`passed` | `gaps_found` | `human_needed`), score (N/M must-haves), report path.
221
+
222
+ If gaps_found: list gaps + recommended fix plan names.
223
+ If human_needed: list items requiring human testing.
224
+
225
+ Orchestrator routes: `passed` → update_roadmap | `gaps_found` → create/execute fixes, re-verify | `human_needed` → present to user.
226
+ </step>
227
+
228
+ </process>
229
+
230
+ <success_criteria>
231
+ - [ ] Must-haves established (from frontmatter or derived)
232
+ - [ ] All truths verified with status and evidence
233
+ - [ ] All artifacts checked at all three levels
234
+ - [ ] All key links verified
235
+ - [ ] Requirements coverage assessed (if applicable)
236
+ - [ ] Anti-patterns scanned and categorized
237
+ - [ ] Human verification items identified
238
+ - [ ] Overall status determined
239
+ - [ ] Fix plans generated (if gaps_found)
240
+ - [ ] VERIFICATION.md created with complete report
241
+ - [ ] Results returned to orchestrator
242
+ </success_criteria>