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,570 @@
1
+ <purpose>
2
+ Validate built features through conversational testing with persistent state. Creates UAT.md that tracks test progress, survives /clear, and feeds gaps into /gsd:plan-phase --gaps.
3
+
4
+ User tests, Claude records. One test at a time. Plain text responses.
5
+ </purpose>
6
+
7
+ <philosophy>
8
+ **Show expected, ask if reality matches.**
9
+
10
+ Claude presents what SHOULD happen. User confirms or describes what's different.
11
+ - "yes" / "y" / "next" / empty → pass
12
+ - Anything else → logged as issue, severity inferred
13
+
14
+ No Pass/Fail buttons. No severity questions. Just: "Here's what should happen. Does it?"
15
+ </philosophy>
16
+
17
+ <template>
18
+ @~/.claude/get-shit-done/templates/UAT.md
19
+ </template>
20
+
21
+ <process>
22
+
23
+ <step name="initialize" priority="first">
24
+ If $ARGUMENTS contains a phase number, load context:
25
+
26
+ ```bash
27
+ INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init verify-work "${PHASE_ARG}")
28
+ ```
29
+
30
+ Parse JSON for: `planner_model`, `checker_model`, `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `has_verification`.
31
+ </step>
32
+
33
+ <step name="check_active_session">
34
+ **First: Check for active UAT sessions**
35
+
36
+ ```bash
37
+ find .planning/phases -name "*-UAT.md" -type f 2>/dev/null | head -5
38
+ ```
39
+
40
+ **If active sessions exist AND no $ARGUMENTS provided:**
41
+
42
+ Read each file's frontmatter (status, phase) and Current Test section.
43
+
44
+ Display inline:
45
+
46
+ ```
47
+ ## Active UAT Sessions
48
+
49
+ | # | Phase | Status | Current Test | Progress |
50
+ |---|-------|--------|--------------|----------|
51
+ | 1 | 04-comments | testing | 3. Reply to Comment | 2/6 |
52
+ | 2 | 05-auth | testing | 1. Login Form | 0/4 |
53
+
54
+ Reply with a number to resume, or provide a phase number to start new.
55
+ ```
56
+
57
+ Wait for user response.
58
+
59
+ - If user replies with number (1, 2) → Load that file, go to `resume_from_file`
60
+ - If user replies with phase number → Treat as new session, go to `create_uat_file`
61
+
62
+ **If active sessions exist AND $ARGUMENTS provided:**
63
+
64
+ Check if session exists for that phase. If yes, offer to resume or restart.
65
+ If no, continue to `create_uat_file`.
66
+
67
+ **If no active sessions AND no $ARGUMENTS:**
68
+
69
+ ```
70
+ No active UAT sessions.
71
+
72
+ Provide a phase number to start testing (e.g., /gsd:verify-work 4)
73
+ ```
74
+
75
+ **If no active sessions AND $ARGUMENTS provided:**
76
+
77
+ Continue to `create_uat_file`.
78
+ </step>
79
+
80
+ <step name="find_summaries">
81
+ **Find what to test:**
82
+
83
+ Use `phase_dir` from init (or run init if not already done).
84
+
85
+ ```bash
86
+ ls "$phase_dir"/*-SUMMARY.md 2>/dev/null
87
+ ```
88
+
89
+ Read each SUMMARY.md to extract testable deliverables.
90
+ </step>
91
+
92
+ <step name="extract_tests">
93
+ **Extract testable deliverables from SUMMARY.md:**
94
+
95
+ Parse for:
96
+ 1. **Accomplishments** - Features/functionality added
97
+ 2. **User-facing changes** - UI, workflows, interactions
98
+
99
+ Focus on USER-OBSERVABLE outcomes, not implementation details.
100
+
101
+ For each deliverable, create a test:
102
+ - name: Brief test name
103
+ - expected: What the user should see/experience (specific, observable)
104
+
105
+ Examples:
106
+ - Accomplishment: "Added comment threading with infinite nesting"
107
+ → Test: "Reply to a Comment"
108
+ → Expected: "Clicking Reply opens inline composer below comment. Submitting shows reply nested under parent with visual indentation."
109
+
110
+ Skip internal/non-observable items (refactors, type changes, etc.).
111
+ </step>
112
+
113
+ <step name="create_uat_file">
114
+ **Create UAT file with all tests:**
115
+
116
+ ```bash
117
+ mkdir -p "$PHASE_DIR"
118
+ ```
119
+
120
+ Build test list from extracted deliverables.
121
+
122
+ Create file:
123
+
124
+ ```markdown
125
+ ---
126
+ status: testing
127
+ phase: XX-name
128
+ source: [list of SUMMARY.md files]
129
+ started: [ISO timestamp]
130
+ updated: [ISO timestamp]
131
+ ---
132
+
133
+ ## Current Test
134
+ <!-- OVERWRITE each test - shows where we are -->
135
+
136
+ number: 1
137
+ name: [first test name]
138
+ expected: |
139
+ [what user should observe]
140
+ awaiting: user response
141
+
142
+ ## Tests
143
+
144
+ ### 1. [Test Name]
145
+ expected: [observable behavior]
146
+ result: [pending]
147
+
148
+ ### 2. [Test Name]
149
+ expected: [observable behavior]
150
+ result: [pending]
151
+
152
+ ...
153
+
154
+ ## Summary
155
+
156
+ total: [N]
157
+ passed: 0
158
+ issues: 0
159
+ pending: [N]
160
+ skipped: 0
161
+
162
+ ## Gaps
163
+
164
+ [none yet]
165
+ ```
166
+
167
+ Write to `.planning/phases/XX-name/{phase_num}-UAT.md`
168
+
169
+ Proceed to `present_test`.
170
+ </step>
171
+
172
+ <step name="present_test">
173
+ **Present current test to user:**
174
+
175
+ Read Current Test section from UAT file.
176
+
177
+ Display using checkpoint box format:
178
+
179
+ ```
180
+ ╔══════════════════════════════════════════════════════════════╗
181
+ ║ CHECKPOINT: Verification Required ║
182
+ ╚══════════════════════════════════════════════════════════════╝
183
+
184
+ **Test {number}: {name}**
185
+
186
+ {expected}
187
+
188
+ ──────────────────────────────────────────────────────────────
189
+ → Type "pass" or describe what's wrong
190
+ ──────────────────────────────────────────────────────────────
191
+ ```
192
+
193
+ Wait for user response (plain text, no AskUserQuestion).
194
+ </step>
195
+
196
+ <step name="process_response">
197
+ **Process user response and update file:**
198
+
199
+ **If response indicates pass:**
200
+ - Empty response, "yes", "y", "ok", "pass", "next", "approved", "✓"
201
+
202
+ Update Tests section:
203
+ ```
204
+ ### {N}. {name}
205
+ expected: {expected}
206
+ result: pass
207
+ ```
208
+
209
+ **If response indicates skip:**
210
+ - "skip", "can't test", "n/a"
211
+
212
+ Update Tests section:
213
+ ```
214
+ ### {N}. {name}
215
+ expected: {expected}
216
+ result: skipped
217
+ reason: [user's reason if provided]
218
+ ```
219
+
220
+ **If response is anything else:**
221
+ - Treat as issue description
222
+
223
+ Infer severity from description:
224
+ - Contains: crash, error, exception, fails, broken, unusable → blocker
225
+ - Contains: doesn't work, wrong, missing, can't → major
226
+ - Contains: slow, weird, off, minor, small → minor
227
+ - Contains: color, font, spacing, alignment, visual → cosmetic
228
+ - Default if unclear: major
229
+
230
+ Update Tests section:
231
+ ```
232
+ ### {N}. {name}
233
+ expected: {expected}
234
+ result: issue
235
+ reported: "{verbatim user response}"
236
+ severity: {inferred}
237
+ ```
238
+
239
+ Append to Gaps section (structured YAML for plan-phase --gaps):
240
+ ```yaml
241
+ - truth: "{expected behavior from test}"
242
+ status: failed
243
+ reason: "User reported: {verbatim user response}"
244
+ severity: {inferred}
245
+ test: {N}
246
+ artifacts: [] # Filled by diagnosis
247
+ missing: [] # Filled by diagnosis
248
+ ```
249
+
250
+ **After any response:**
251
+
252
+ Update Summary counts.
253
+ Update frontmatter.updated timestamp.
254
+
255
+ If more tests remain → Update Current Test, go to `present_test`
256
+ If no more tests → Go to `complete_session`
257
+ </step>
258
+
259
+ <step name="resume_from_file">
260
+ **Resume testing from UAT file:**
261
+
262
+ Read the full UAT file.
263
+
264
+ Find first test with `result: [pending]`.
265
+
266
+ Announce:
267
+ ```
268
+ Resuming: Phase {phase} UAT
269
+ Progress: {passed + issues + skipped}/{total}
270
+ Issues found so far: {issues count}
271
+
272
+ Continuing from Test {N}...
273
+ ```
274
+
275
+ Update Current Test section with the pending test.
276
+ Proceed to `present_test`.
277
+ </step>
278
+
279
+ <step name="complete_session">
280
+ **Complete testing and commit:**
281
+
282
+ Update frontmatter:
283
+ - status: complete
284
+ - updated: [now]
285
+
286
+ Clear Current Test section:
287
+ ```
288
+ ## Current Test
289
+
290
+ [testing complete]
291
+ ```
292
+
293
+ Commit the UAT file:
294
+ ```bash
295
+ node ~/.claude/get-shit-done/bin/gsd-tools.cjs commit "test({phase_num}): complete UAT - {passed} passed, {issues} issues" --files ".planning/phases/XX-name/{phase_num}-UAT.md"
296
+ ```
297
+
298
+ Present summary:
299
+ ```
300
+ ## UAT Complete: Phase {phase}
301
+
302
+ | Result | Count |
303
+ |--------|-------|
304
+ | Passed | {N} |
305
+ | Issues | {N} |
306
+ | Skipped| {N} |
307
+
308
+ [If issues > 0:]
309
+ ### Issues Found
310
+
311
+ [List from Issues section]
312
+ ```
313
+
314
+ **If issues > 0:** Proceed to `diagnose_issues`
315
+
316
+ **If issues == 0:**
317
+ ```
318
+ All tests passed. Ready to continue.
319
+
320
+ - `/gsd:plan-phase {next}` — Plan next phase
321
+ - `/gsd:execute-phase {next}` — Execute next phase
322
+ ```
323
+ </step>
324
+
325
+ <step name="diagnose_issues">
326
+ **Diagnose root causes before planning fixes:**
327
+
328
+ ```
329
+ ---
330
+
331
+ {N} issues found. Diagnosing root causes...
332
+
333
+ Spawning parallel debug agents to investigate each issue.
334
+ ```
335
+
336
+ - Load diagnose-issues workflow
337
+ - Follow @~/.claude/get-shit-done/workflows/diagnose-issues.md
338
+ - Spawn parallel debug agents for each issue
339
+ - Collect root causes
340
+ - Update UAT.md with root causes
341
+ - Proceed to `plan_gap_closure`
342
+
343
+ Diagnosis runs automatically - no user prompt. Parallel agents investigate simultaneously, so overhead is minimal and fixes are more accurate.
344
+ </step>
345
+
346
+ <step name="plan_gap_closure">
347
+ **Auto-plan fixes from diagnosed gaps:**
348
+
349
+ Display:
350
+ ```
351
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
352
+ GSD ► PLANNING FIXES
353
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
354
+
355
+ ◆ Spawning planner for gap closure...
356
+ ```
357
+
358
+ Spawn gsd-planner in --gaps mode:
359
+
360
+ ```
361
+ Task(
362
+ prompt="""
363
+ <planning_context>
364
+
365
+ **Phase:** {phase_number}
366
+ **Mode:** gap_closure
367
+
368
+ **UAT with diagnoses:**
369
+ @.planning/phases/{phase_dir}/{phase_num}-UAT.md
370
+
371
+ **Project State:**
372
+ @.planning/STATE.md
373
+
374
+ **Roadmap:**
375
+ @.planning/ROADMAP.md
376
+
377
+ </planning_context>
378
+
379
+ <downstream_consumer>
380
+ Output consumed by /gsd:execute-phase
381
+ Plans must be executable prompts.
382
+ </downstream_consumer>
383
+ """,
384
+ subagent_type="gsd-planner",
385
+ model="{planner_model}",
386
+ description="Plan gap fixes for Phase {phase}"
387
+ )
388
+ ```
389
+
390
+ On return:
391
+ - **PLANNING COMPLETE:** Proceed to `verify_gap_plans`
392
+ - **PLANNING INCONCLUSIVE:** Report and offer manual intervention
393
+ </step>
394
+
395
+ <step name="verify_gap_plans">
396
+ **Verify fix plans with checker:**
397
+
398
+ Display:
399
+ ```
400
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
401
+ GSD ► VERIFYING FIX PLANS
402
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
403
+
404
+ ◆ Spawning plan checker...
405
+ ```
406
+
407
+ Initialize: `iteration_count = 1`
408
+
409
+ Spawn gsd-plan-checker:
410
+
411
+ ```
412
+ Task(
413
+ prompt="""
414
+ <verification_context>
415
+
416
+ **Phase:** {phase_number}
417
+ **Phase Goal:** Close diagnosed gaps from UAT
418
+
419
+ **Plans to verify:**
420
+ @.planning/phases/{phase_dir}/*-PLAN.md
421
+
422
+ </verification_context>
423
+
424
+ <expected_output>
425
+ Return one of:
426
+ - ## VERIFICATION PASSED — all checks pass
427
+ - ## ISSUES FOUND — structured issue list
428
+ </expected_output>
429
+ """,
430
+ subagent_type="gsd-plan-checker",
431
+ model="{checker_model}",
432
+ description="Verify Phase {phase} fix plans"
433
+ )
434
+ ```
435
+
436
+ On return:
437
+ - **VERIFICATION PASSED:** Proceed to `present_ready`
438
+ - **ISSUES FOUND:** Proceed to `revision_loop`
439
+ </step>
440
+
441
+ <step name="revision_loop">
442
+ **Iterate planner ↔ checker until plans pass (max 3):**
443
+
444
+ **If iteration_count < 3:**
445
+
446
+ Display: `Sending back to planner for revision... (iteration {N}/3)`
447
+
448
+ Spawn gsd-planner with revision context:
449
+
450
+ ```
451
+ Task(
452
+ prompt="""
453
+ <revision_context>
454
+
455
+ **Phase:** {phase_number}
456
+ **Mode:** revision
457
+
458
+ **Existing plans:**
459
+ @.planning/phases/{phase_dir}/*-PLAN.md
460
+
461
+ **Checker issues:**
462
+ {structured_issues_from_checker}
463
+
464
+ </revision_context>
465
+
466
+ <instructions>
467
+ Read existing PLAN.md files. Make targeted updates to address checker issues.
468
+ Do NOT replan from scratch unless issues are fundamental.
469
+ </instructions>
470
+ """,
471
+ subagent_type="gsd-planner",
472
+ model="{planner_model}",
473
+ description="Revise Phase {phase} plans"
474
+ )
475
+ ```
476
+
477
+ After planner returns → spawn checker again (verify_gap_plans logic)
478
+ Increment iteration_count
479
+
480
+ **If iteration_count >= 3:**
481
+
482
+ Display: `Max iterations reached. {N} issues remain.`
483
+
484
+ Offer options:
485
+ 1. Force proceed (execute despite issues)
486
+ 2. Provide guidance (user gives direction, retry)
487
+ 3. Abandon (exit, user runs /gsd:plan-phase manually)
488
+
489
+ Wait for user response.
490
+ </step>
491
+
492
+ <step name="present_ready">
493
+ **Present completion and next steps:**
494
+
495
+ ```
496
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
497
+ GSD ► FIXES READY ✓
498
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
499
+
500
+ **Phase {X}: {Name}** — {N} gap(s) diagnosed, {M} fix plan(s) created
501
+
502
+ | Gap | Root Cause | Fix Plan |
503
+ |-----|------------|----------|
504
+ | {truth 1} | {root_cause} | {phase}-04 |
505
+ | {truth 2} | {root_cause} | {phase}-04 |
506
+
507
+ Plans verified and ready for execution.
508
+
509
+ ───────────────────────────────────────────────────────────────
510
+
511
+ ## ▶ Next Up
512
+
513
+ **Execute fixes** — run fix plans
514
+
515
+ `/clear` then `/gsd:execute-phase {phase} --gaps-only`
516
+
517
+ ───────────────────────────────────────────────────────────────
518
+ ```
519
+ </step>
520
+
521
+ </process>
522
+
523
+ <update_rules>
524
+ **Batched writes for efficiency:**
525
+
526
+ Keep results in memory. Write to file only when:
527
+ 1. **Issue found** — Preserve the problem immediately
528
+ 2. **Session complete** — Final write before commit
529
+ 3. **Checkpoint** — Every 5 passed tests (safety net)
530
+
531
+ | Section | Rule | When Written |
532
+ |---------|------|--------------|
533
+ | Frontmatter.status | OVERWRITE | Start, complete |
534
+ | Frontmatter.updated | OVERWRITE | On any file write |
535
+ | Current Test | OVERWRITE | On any file write |
536
+ | Tests.{N}.result | OVERWRITE | On any file write |
537
+ | Summary | OVERWRITE | On any file write |
538
+ | Gaps | APPEND | When issue found |
539
+
540
+ On context reset: File shows last checkpoint. Resume from there.
541
+ </update_rules>
542
+
543
+ <severity_inference>
544
+ **Infer severity from user's natural language:**
545
+
546
+ | User says | Infer |
547
+ |-----------|-------|
548
+ | "crashes", "error", "exception", "fails completely" | blocker |
549
+ | "doesn't work", "nothing happens", "wrong behavior" | major |
550
+ | "works but...", "slow", "weird", "minor issue" | minor |
551
+ | "color", "spacing", "alignment", "looks off" | cosmetic |
552
+
553
+ Default to **major** if unclear. User can correct if needed.
554
+
555
+ **Never ask "how severe is this?"** - just infer and move on.
556
+ </severity_inference>
557
+
558
+ <success_criteria>
559
+ - [ ] UAT file created with all tests from SUMMARY.md
560
+ - [ ] Tests presented one at a time with expected behavior
561
+ - [ ] User responses processed as pass/issue/skip
562
+ - [ ] Severity inferred from description (never asked)
563
+ - [ ] Batched writes: on issue, every 5 passes, or completion
564
+ - [ ] Committed on completion
565
+ - [ ] If issues: parallel debug agents diagnose root causes
566
+ - [ ] If issues: gsd-planner creates fix plans (gap_closure mode)
567
+ - [ ] If issues: gsd-plan-checker verifies fix plans
568
+ - [ ] If issues: revision loop until plans pass (max 3 iterations)
569
+ - [ ] Ready for `/gsd:execute-phase --gaps-only` when complete
570
+ </success_criteria>
@@ -0,0 +1,62 @@
1
+ #!/usr/bin/env node
2
+ // Check for GSD updates in background, write result to cache
3
+ // Called by SessionStart hook - runs once per session
4
+
5
+ const fs = require('fs');
6
+ const path = require('path');
7
+ const os = require('os');
8
+ const { spawn } = require('child_process');
9
+
10
+ const homeDir = os.homedir();
11
+ const cwd = process.cwd();
12
+ const cacheDir = path.join(homeDir, '.claude', 'cache');
13
+ const cacheFile = path.join(cacheDir, 'gsd-update-check.json');
14
+
15
+ // VERSION file locations (check project first, then global)
16
+ const projectVersionFile = path.join(cwd, '.claude', 'get-shit-done', 'VERSION');
17
+ const globalVersionFile = path.join(homeDir, '.claude', 'get-shit-done', 'VERSION');
18
+
19
+ // Ensure cache directory exists
20
+ if (!fs.existsSync(cacheDir)) {
21
+ fs.mkdirSync(cacheDir, { recursive: true });
22
+ }
23
+
24
+ // Run check in background (spawn background process, windowsHide prevents console flash)
25
+ const child = spawn(process.execPath, ['-e', `
26
+ const fs = require('fs');
27
+ const { execSync } = require('child_process');
28
+
29
+ const cacheFile = ${JSON.stringify(cacheFile)};
30
+ const projectVersionFile = ${JSON.stringify(projectVersionFile)};
31
+ const globalVersionFile = ${JSON.stringify(globalVersionFile)};
32
+
33
+ // Check project directory first (local install), then global
34
+ let installed = '0.0.0';
35
+ try {
36
+ if (fs.existsSync(projectVersionFile)) {
37
+ installed = fs.readFileSync(projectVersionFile, 'utf8').trim();
38
+ } else if (fs.existsSync(globalVersionFile)) {
39
+ installed = fs.readFileSync(globalVersionFile, 'utf8').trim();
40
+ }
41
+ } catch (e) {}
42
+
43
+ let latest = null;
44
+ try {
45
+ latest = execSync('npm view get-shit-done-cc version', { encoding: 'utf8', timeout: 10000, windowsHide: true }).trim();
46
+ } catch (e) {}
47
+
48
+ const result = {
49
+ update_available: latest && installed !== latest,
50
+ installed,
51
+ latest: latest || 'unknown',
52
+ checked: Math.floor(Date.now() / 1000)
53
+ };
54
+
55
+ fs.writeFileSync(cacheFile, JSON.stringify(result));
56
+ `], {
57
+ stdio: 'ignore',
58
+ windowsHide: true,
59
+ detached: true // Required on Windows for proper process detachment
60
+ });
61
+
62
+ child.unref();