claude-code-pilot 2.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 (257) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +151 -0
  3. package/bin/install.js +431 -0
  4. package/docs/agent-guides/architecture.md +107 -0
  5. package/ecc/agents/architect.md +211 -0
  6. package/ecc/agents/code-reviewer.md +237 -0
  7. package/ecc/agents/doc-updater.md +107 -0
  8. package/ecc/agents/e2e-runner.md +107 -0
  9. package/ecc/agents/security-reviewer.md +108 -0
  10. package/ecc/agents/tdd-guide.md +91 -0
  11. package/ecc/commands/checkpoint.md +74 -0
  12. package/ecc/commands/evolve.md +178 -0
  13. package/ecc/commands/learn.md +70 -0
  14. package/ecc/commands/model-route.md +26 -0
  15. package/ecc/commands/quality-gate.md +29 -0
  16. package/ecc/commands/resume-session.md +155 -0
  17. package/ecc/commands/save-session.md +275 -0
  18. package/ecc/commands/sessions.md +305 -0
  19. package/ecc/commands/verify.md +59 -0
  20. package/ecc/contexts/dev.md +20 -0
  21. package/ecc/contexts/research.md +26 -0
  22. package/ecc/contexts/review.md +22 -0
  23. package/ecc/examples/CLAUDE.md +100 -0
  24. package/ecc/examples/django-api-CLAUDE.md +308 -0
  25. package/ecc/examples/go-microservice-CLAUDE.md +267 -0
  26. package/ecc/examples/rust-api-CLAUDE.md +285 -0
  27. package/ecc/examples/saas-nextjs-CLAUDE.md +166 -0
  28. package/ecc/examples/user-CLAUDE.md +109 -0
  29. package/ecc/rules/common/agents.md +49 -0
  30. package/ecc/rules/common/coding-style.md +48 -0
  31. package/ecc/rules/common/development-workflow.md +37 -0
  32. package/ecc/rules/common/git-workflow.md +24 -0
  33. package/ecc/rules/common/hooks.md +30 -0
  34. package/ecc/rules/common/patterns.md +31 -0
  35. package/ecc/rules/common/performance.md +55 -0
  36. package/ecc/rules/common/security.md +29 -0
  37. package/ecc/rules/common/testing.md +29 -0
  38. package/ecc/rules/golang/coding-style.md +32 -0
  39. package/ecc/rules/golang/hooks.md +17 -0
  40. package/ecc/rules/golang/patterns.md +45 -0
  41. package/ecc/rules/golang/security.md +34 -0
  42. package/ecc/rules/golang/testing.md +31 -0
  43. package/ecc/rules/kotlin/coding-style.md +86 -0
  44. package/ecc/rules/kotlin/patterns.md +146 -0
  45. package/ecc/rules/kotlin/security.md +82 -0
  46. package/ecc/rules/kotlin/testing.md +128 -0
  47. package/ecc/rules/perl/coding-style.md +46 -0
  48. package/ecc/rules/perl/hooks.md +22 -0
  49. package/ecc/rules/perl/patterns.md +76 -0
  50. package/ecc/rules/perl/security.md +69 -0
  51. package/ecc/rules/perl/testing.md +54 -0
  52. package/ecc/rules/php/coding-style.md +35 -0
  53. package/ecc/rules/php/hooks.md +24 -0
  54. package/ecc/rules/php/patterns.md +32 -0
  55. package/ecc/rules/php/security.md +33 -0
  56. package/ecc/rules/php/testing.md +34 -0
  57. package/ecc/rules/python/coding-style.md +42 -0
  58. package/ecc/rules/python/hooks.md +19 -0
  59. package/ecc/rules/python/patterns.md +39 -0
  60. package/ecc/rules/python/security.md +30 -0
  61. package/ecc/rules/python/testing.md +38 -0
  62. package/ecc/rules/swift/coding-style.md +47 -0
  63. package/ecc/rules/swift/hooks.md +20 -0
  64. package/ecc/rules/swift/patterns.md +66 -0
  65. package/ecc/rules/swift/security.md +33 -0
  66. package/ecc/rules/swift/testing.md +45 -0
  67. package/ecc/rules/typescript/coding-style.md +199 -0
  68. package/ecc/rules/typescript/hooks.md +22 -0
  69. package/ecc/rules/typescript/patterns.md +52 -0
  70. package/ecc/rules/typescript/security.md +28 -0
  71. package/ecc/rules/typescript/testing.md +18 -0
  72. package/ecc/scripts/hooks/check-hook-enabled.js +12 -0
  73. package/ecc/scripts/hooks/evaluate-session.js +100 -0
  74. package/ecc/scripts/hooks/pre-compact.js +48 -0
  75. package/ecc/scripts/hooks/run-with-flags-shell.sh +32 -0
  76. package/ecc/scripts/hooks/run-with-flags.js +120 -0
  77. package/ecc/scripts/hooks/session-end-marker.js +15 -0
  78. package/ecc/scripts/hooks/session-end.js +258 -0
  79. package/ecc/scripts/hooks/session-start.js +97 -0
  80. package/ecc/scripts/hooks/suggest-compact.js +80 -0
  81. package/ecc/scripts/lib/hook-flags.js +74 -0
  82. package/ecc/scripts/lib/package-manager.d.ts +119 -0
  83. package/ecc/scripts/lib/package-manager.js +431 -0
  84. package/ecc/scripts/lib/project-detect.js +428 -0
  85. package/ecc/scripts/lib/resolve-formatter.js +185 -0
  86. package/ecc/scripts/lib/session-aliases.d.ts +136 -0
  87. package/ecc/scripts/lib/session-aliases.js +481 -0
  88. package/ecc/scripts/lib/session-manager.d.ts +131 -0
  89. package/ecc/scripts/lib/session-manager.js +444 -0
  90. package/ecc/scripts/lib/shell-split.js +86 -0
  91. package/ecc/scripts/lib/utils.d.ts +183 -0
  92. package/ecc/scripts/lib/utils.js +543 -0
  93. package/ecc/skills/continuous-learning-v2/SKILL.md +365 -0
  94. package/ecc/skills/continuous-learning-v2/agents/observer-loop.sh +144 -0
  95. package/ecc/skills/continuous-learning-v2/agents/observer.md +198 -0
  96. package/ecc/skills/continuous-learning-v2/agents/start-observer.sh +194 -0
  97. package/ecc/skills/continuous-learning-v2/config.json +8 -0
  98. package/ecc/skills/continuous-learning-v2/hooks/observe.sh +246 -0
  99. package/ecc/skills/continuous-learning-v2/scripts/detect-project.sh +218 -0
  100. package/ecc/skills/continuous-learning-v2/scripts/instinct-cli.py +1148 -0
  101. package/ecc/skills/continuous-learning-v2/scripts/test_parse_instinct.py +984 -0
  102. package/ecc/skills/strategic-compact/SKILL.md +103 -0
  103. package/ecc/skills/strategic-compact/suggest-compact.sh +54 -0
  104. package/ecc/skills/verification-loop-SKILL.md +126 -0
  105. package/gsd/LICENSE +21 -0
  106. package/gsd/agents/gsd-codebase-mapper.md +772 -0
  107. package/gsd/agents/gsd-debugger.md +1257 -0
  108. package/gsd/agents/gsd-executor.md +489 -0
  109. package/gsd/agents/gsd-integration-checker.md +445 -0
  110. package/gsd/agents/gsd-nyquist-auditor.md +178 -0
  111. package/gsd/agents/gsd-phase-researcher.md +555 -0
  112. package/gsd/agents/gsd-plan-checker.md +708 -0
  113. package/gsd/agents/gsd-planner.md +1309 -0
  114. package/gsd/agents/gsd-project-researcher.md +631 -0
  115. package/gsd/agents/gsd-research-synthesizer.md +249 -0
  116. package/gsd/agents/gsd-roadmapper.md +652 -0
  117. package/gsd/agents/gsd-verifier.md +581 -0
  118. package/gsd/commands-gsd/add-phase.md +43 -0
  119. package/gsd/commands-gsd/add-tests.md +41 -0
  120. package/gsd/commands-gsd/add-todo.md +47 -0
  121. package/gsd/commands-gsd/audit-milestone.md +36 -0
  122. package/gsd/commands-gsd/check-todos.md +45 -0
  123. package/gsd/commands-gsd/cleanup.md +18 -0
  124. package/gsd/commands-gsd/complete-milestone.md +136 -0
  125. package/gsd/commands-gsd/debug.md +168 -0
  126. package/gsd/commands-gsd/discuss-phase.md +90 -0
  127. package/gsd/commands-gsd/execute-phase.md +41 -0
  128. package/gsd/commands-gsd/health.md +22 -0
  129. package/gsd/commands-gsd/help.md +22 -0
  130. package/gsd/commands-gsd/insert-phase.md +32 -0
  131. package/gsd/commands-gsd/join-discord.md +18 -0
  132. package/gsd/commands-gsd/list-phase-assumptions.md +46 -0
  133. package/gsd/commands-gsd/map-codebase.md +71 -0
  134. package/gsd/commands-gsd/new-milestone.md +44 -0
  135. package/gsd/commands-gsd/new-project.md +42 -0
  136. package/gsd/commands-gsd/pause-work.md +38 -0
  137. package/gsd/commands-gsd/plan-milestone-gaps.md +34 -0
  138. package/gsd/commands-gsd/plan-phase.md +45 -0
  139. package/gsd/commands-gsd/progress.md +24 -0
  140. package/gsd/commands-gsd/quick.md +45 -0
  141. package/gsd/commands-gsd/reapply-patches.md +123 -0
  142. package/gsd/commands-gsd/remove-phase.md +31 -0
  143. package/gsd/commands-gsd/research-phase.md +190 -0
  144. package/gsd/commands-gsd/resume-work.md +40 -0
  145. package/gsd/commands-gsd/set-profile.md +34 -0
  146. package/gsd/commands-gsd/settings.md +36 -0
  147. package/gsd/commands-gsd/update.md +37 -0
  148. package/gsd/commands-gsd/validate-phase.md +35 -0
  149. package/gsd/commands-gsd/verify-work.md +38 -0
  150. package/gsd/get-shit-done/bin/gsd-tools.cjs +592 -0
  151. package/gsd/get-shit-done/bin/lib/commands.cjs +548 -0
  152. package/gsd/get-shit-done/bin/lib/config.cjs +169 -0
  153. package/gsd/get-shit-done/bin/lib/core.cjs +492 -0
  154. package/gsd/get-shit-done/bin/lib/frontmatter.cjs +299 -0
  155. package/gsd/get-shit-done/bin/lib/init.cjs +710 -0
  156. package/gsd/get-shit-done/bin/lib/milestone.cjs +241 -0
  157. package/gsd/get-shit-done/bin/lib/phase.cjs +901 -0
  158. package/gsd/get-shit-done/bin/lib/roadmap.cjs +298 -0
  159. package/gsd/get-shit-done/bin/lib/state.cjs +721 -0
  160. package/gsd/get-shit-done/bin/lib/template.cjs +222 -0
  161. package/gsd/get-shit-done/bin/lib/verify.cjs +820 -0
  162. package/gsd/get-shit-done/references/checkpoints.md +776 -0
  163. package/gsd/get-shit-done/references/continuation-format.md +249 -0
  164. package/gsd/get-shit-done/references/decimal-phase-calculation.md +65 -0
  165. package/gsd/get-shit-done/references/git-integration.md +248 -0
  166. package/gsd/get-shit-done/references/git-planning-commit.md +38 -0
  167. package/gsd/get-shit-done/references/model-profile-resolution.md +34 -0
  168. package/gsd/get-shit-done/references/model-profiles.md +93 -0
  169. package/gsd/get-shit-done/references/phase-argument-parsing.md +61 -0
  170. package/gsd/get-shit-done/references/planning-config.md +200 -0
  171. package/gsd/get-shit-done/references/questioning.md +162 -0
  172. package/gsd/get-shit-done/references/tdd.md +263 -0
  173. package/gsd/get-shit-done/references/ui-brand.md +160 -0
  174. package/gsd/get-shit-done/references/verification-patterns.md +612 -0
  175. package/gsd/get-shit-done/templates/DEBUG.md +164 -0
  176. package/gsd/get-shit-done/templates/UAT.md +247 -0
  177. package/gsd/get-shit-done/templates/VALIDATION.md +76 -0
  178. package/gsd/get-shit-done/templates/codebase/architecture.md +255 -0
  179. package/gsd/get-shit-done/templates/codebase/concerns.md +310 -0
  180. package/gsd/get-shit-done/templates/codebase/conventions.md +307 -0
  181. package/gsd/get-shit-done/templates/codebase/integrations.md +280 -0
  182. package/gsd/get-shit-done/templates/codebase/stack.md +186 -0
  183. package/gsd/get-shit-done/templates/codebase/structure.md +285 -0
  184. package/gsd/get-shit-done/templates/codebase/testing.md +480 -0
  185. package/gsd/get-shit-done/templates/config.json +37 -0
  186. package/gsd/get-shit-done/templates/context.md +297 -0
  187. package/gsd/get-shit-done/templates/continue-here.md +78 -0
  188. package/gsd/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  189. package/gsd/get-shit-done/templates/discovery.md +146 -0
  190. package/gsd/get-shit-done/templates/milestone-archive.md +123 -0
  191. package/gsd/get-shit-done/templates/milestone.md +115 -0
  192. package/gsd/get-shit-done/templates/phase-prompt.md +569 -0
  193. package/gsd/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  194. package/gsd/get-shit-done/templates/project.md +184 -0
  195. package/gsd/get-shit-done/templates/requirements.md +231 -0
  196. package/gsd/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  197. package/gsd/get-shit-done/templates/research-project/FEATURES.md +147 -0
  198. package/gsd/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  199. package/gsd/get-shit-done/templates/research-project/STACK.md +120 -0
  200. package/gsd/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  201. package/gsd/get-shit-done/templates/research.md +552 -0
  202. package/gsd/get-shit-done/templates/retrospective.md +54 -0
  203. package/gsd/get-shit-done/templates/roadmap.md +202 -0
  204. package/gsd/get-shit-done/templates/state.md +176 -0
  205. package/gsd/get-shit-done/templates/summary-complex.md +59 -0
  206. package/gsd/get-shit-done/templates/summary-minimal.md +41 -0
  207. package/gsd/get-shit-done/templates/summary-standard.md +48 -0
  208. package/gsd/get-shit-done/templates/summary.md +248 -0
  209. package/gsd/get-shit-done/templates/user-setup.md +311 -0
  210. package/gsd/get-shit-done/templates/verification-report.md +322 -0
  211. package/gsd/get-shit-done/workflows/add-phase.md +112 -0
  212. package/gsd/get-shit-done/workflows/add-tests.md +351 -0
  213. package/gsd/get-shit-done/workflows/add-todo.md +158 -0
  214. package/gsd/get-shit-done/workflows/audit-milestone.md +332 -0
  215. package/gsd/get-shit-done/workflows/check-todos.md +177 -0
  216. package/gsd/get-shit-done/workflows/cleanup.md +152 -0
  217. package/gsd/get-shit-done/workflows/complete-milestone.md +764 -0
  218. package/gsd/get-shit-done/workflows/diagnose-issues.md +219 -0
  219. package/gsd/get-shit-done/workflows/discovery-phase.md +289 -0
  220. package/gsd/get-shit-done/workflows/discuss-phase.md +676 -0
  221. package/gsd/get-shit-done/workflows/execute-phase.md +459 -0
  222. package/gsd/get-shit-done/workflows/execute-plan.md +449 -0
  223. package/gsd/get-shit-done/workflows/health.md +159 -0
  224. package/gsd/get-shit-done/workflows/help.md +489 -0
  225. package/gsd/get-shit-done/workflows/insert-phase.md +130 -0
  226. package/gsd/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  227. package/gsd/get-shit-done/workflows/map-codebase.md +316 -0
  228. package/gsd/get-shit-done/workflows/new-milestone.md +384 -0
  229. package/gsd/get-shit-done/workflows/new-project.md +1111 -0
  230. package/gsd/get-shit-done/workflows/pause-work.md +122 -0
  231. package/gsd/get-shit-done/workflows/plan-milestone-gaps.md +274 -0
  232. package/gsd/get-shit-done/workflows/plan-phase.md +560 -0
  233. package/gsd/get-shit-done/workflows/progress.md +382 -0
  234. package/gsd/get-shit-done/workflows/quick.md +601 -0
  235. package/gsd/get-shit-done/workflows/remove-phase.md +155 -0
  236. package/gsd/get-shit-done/workflows/research-phase.md +74 -0
  237. package/gsd/get-shit-done/workflows/resume-project.md +307 -0
  238. package/gsd/get-shit-done/workflows/set-profile.md +81 -0
  239. package/gsd/get-shit-done/workflows/settings.md +214 -0
  240. package/gsd/get-shit-done/workflows/transition.md +544 -0
  241. package/gsd/get-shit-done/workflows/update.md +240 -0
  242. package/gsd/get-shit-done/workflows/validate-phase.md +167 -0
  243. package/gsd/get-shit-done/workflows/verify-phase.md +243 -0
  244. package/gsd/get-shit-done/workflows/verify-work.md +583 -0
  245. package/gsd/hooks/gsd-check-update.js +81 -0
  246. package/gsd/hooks/gsd-context-monitor.js +141 -0
  247. package/gsd/hooks/gsd-statusline.js +115 -0
  248. package/kit/CLAUDE.md +43 -0
  249. package/kit/commands/kit/update.md +46 -0
  250. package/kit/commands/setup-refresh.md +50 -0
  251. package/kit/commands/setup.md +579 -0
  252. package/kit/commands/tool-guide.md +44 -0
  253. package/kit/hooks/kit-check-update.js +54 -0
  254. package/kit/mcp.json +10 -0
  255. package/kit/rules/code-style.md +24 -0
  256. package/manifest.json +30 -0
  257. package/package.json +36 -0
@@ -0,0 +1,583 @@
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 "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" init verify-work "${PHASE_ARG}")
28
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
29
+ ```
30
+
31
+ Parse JSON for: `planner_model`, `checker_model`, `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `has_verification`.
32
+ </step>
33
+
34
+ <step name="check_active_session">
35
+ **First: Check for active UAT sessions**
36
+
37
+ ```bash
38
+ find .planning/phases -name "*-UAT.md" -type f 2>/dev/null | head -5
39
+ ```
40
+
41
+ **If active sessions exist AND no $ARGUMENTS provided:**
42
+
43
+ Read each file's frontmatter (status, phase) and Current Test section.
44
+
45
+ Display inline:
46
+
47
+ ```
48
+ ## Active UAT Sessions
49
+
50
+ | # | Phase | Status | Current Test | Progress |
51
+ |---|-------|--------|--------------|----------|
52
+ | 1 | 04-comments | testing | 3. Reply to Comment | 2/6 |
53
+ | 2 | 05-auth | testing | 1. Login Form | 0/4 |
54
+
55
+ Reply with a number to resume, or provide a phase number to start new.
56
+ ```
57
+
58
+ Wait for user response.
59
+
60
+ - If user replies with number (1, 2) → Load that file, go to `resume_from_file`
61
+ - If user replies with phase number → Treat as new session, go to `create_uat_file`
62
+
63
+ **If active sessions exist AND $ARGUMENTS provided:**
64
+
65
+ Check if session exists for that phase. If yes, offer to resume or restart.
66
+ If no, continue to `create_uat_file`.
67
+
68
+ **If no active sessions AND no $ARGUMENTS:**
69
+
70
+ ```
71
+ No active UAT sessions.
72
+
73
+ Provide a phase number to start testing (e.g., /gsd:verify-work 4)
74
+ ```
75
+
76
+ **If no active sessions AND $ARGUMENTS provided:**
77
+
78
+ Continue to `create_uat_file`.
79
+ </step>
80
+
81
+ <step name="find_summaries">
82
+ **Find what to test:**
83
+
84
+ Use `phase_dir` from init (or run init if not already done).
85
+
86
+ ```bash
87
+ ls "$phase_dir"/*-SUMMARY.md 2>/dev/null
88
+ ```
89
+
90
+ Read each SUMMARY.md to extract testable deliverables.
91
+ </step>
92
+
93
+ <step name="extract_tests">
94
+ **Extract testable deliverables from SUMMARY.md:**
95
+
96
+ Parse for:
97
+ 1. **Accomplishments** - Features/functionality added
98
+ 2. **User-facing changes** - UI, workflows, interactions
99
+
100
+ Focus on USER-OBSERVABLE outcomes, not implementation details.
101
+
102
+ For each deliverable, create a test:
103
+ - name: Brief test name
104
+ - expected: What the user should see/experience (specific, observable)
105
+
106
+ Examples:
107
+ - Accomplishment: "Added comment threading with infinite nesting"
108
+ → Test: "Reply to a Comment"
109
+ → Expected: "Clicking Reply opens inline composer below comment. Submitting shows reply nested under parent with visual indentation."
110
+
111
+ Skip internal/non-observable items (refactors, type changes, etc.).
112
+
113
+ **Cold-start smoke test injection:**
114
+
115
+ After extracting tests from SUMMARYs, scan the SUMMARY files for modified/created file paths. If ANY path matches these patterns:
116
+
117
+ `server.ts`, `server.js`, `app.ts`, `app.js`, `index.ts`, `index.js`, `main.ts`, `main.js`, `database/*`, `db/*`, `seed/*`, `seeds/*`, `migrations/*`, `startup*`, `docker-compose*`, `Dockerfile*`
118
+
119
+ Then **prepend** this test to the test list:
120
+
121
+ - name: "Cold Start Smoke Test"
122
+ - expected: "Kill any running server/service. Clear ephemeral state (temp DBs, caches, lock files). Start the application from scratch. Server boots without errors, any seed/migration completes, and a primary query (health check, homepage load, or basic API call) returns live data."
123
+
124
+ This catches bugs that only manifest on fresh start — race conditions in startup sequences, silent seed failures, missing environment setup — which pass against warm state but break in production.
125
+ </step>
126
+
127
+ <step name="create_uat_file">
128
+ **Create UAT file with all tests:**
129
+
130
+ ```bash
131
+ mkdir -p "$PHASE_DIR"
132
+ ```
133
+
134
+ Build test list from extracted deliverables.
135
+
136
+ Create file:
137
+
138
+ ```markdown
139
+ ---
140
+ status: testing
141
+ phase: XX-name
142
+ source: [list of SUMMARY.md files]
143
+ started: [ISO timestamp]
144
+ updated: [ISO timestamp]
145
+ ---
146
+
147
+ ## Current Test
148
+ <!-- OVERWRITE each test - shows where we are -->
149
+
150
+ number: 1
151
+ name: [first test name]
152
+ expected: |
153
+ [what user should observe]
154
+ awaiting: user response
155
+
156
+ ## Tests
157
+
158
+ ### 1. [Test Name]
159
+ expected: [observable behavior]
160
+ result: [pending]
161
+
162
+ ### 2. [Test Name]
163
+ expected: [observable behavior]
164
+ result: [pending]
165
+
166
+ ...
167
+
168
+ ## Summary
169
+
170
+ total: [N]
171
+ passed: 0
172
+ issues: 0
173
+ pending: [N]
174
+ skipped: 0
175
+
176
+ ## Gaps
177
+
178
+ [none yet]
179
+ ```
180
+
181
+ Write to `.planning/phases/XX-name/{phase_num}-UAT.md`
182
+
183
+ Proceed to `present_test`.
184
+ </step>
185
+
186
+ <step name="present_test">
187
+ **Present current test to user:**
188
+
189
+ Read Current Test section from UAT file.
190
+
191
+ Display using checkpoint box format:
192
+
193
+ ```
194
+ ╔══════════════════════════════════════════════════════════════╗
195
+ ║ CHECKPOINT: Verification Required ║
196
+ ╚══════════════════════════════════════════════════════════════╝
197
+
198
+ **Test {number}: {name}**
199
+
200
+ {expected}
201
+
202
+ ──────────────────────────────────────────────────────────────
203
+ → Type "pass" or describe what's wrong
204
+ ──────────────────────────────────────────────────────────────
205
+ ```
206
+
207
+ Wait for user response (plain text, no AskUserQuestion).
208
+ </step>
209
+
210
+ <step name="process_response">
211
+ **Process user response and update file:**
212
+
213
+ **If response indicates pass:**
214
+ - Empty response, "yes", "y", "ok", "pass", "next", "approved", "✓"
215
+
216
+ Update Tests section:
217
+ ```
218
+ ### {N}. {name}
219
+ expected: {expected}
220
+ result: pass
221
+ ```
222
+
223
+ **If response indicates skip:**
224
+ - "skip", "can't test", "n/a"
225
+
226
+ Update Tests section:
227
+ ```
228
+ ### {N}. {name}
229
+ expected: {expected}
230
+ result: skipped
231
+ reason: [user's reason if provided]
232
+ ```
233
+
234
+ **If response is anything else:**
235
+ - Treat as issue description
236
+
237
+ Infer severity from description:
238
+ - Contains: crash, error, exception, fails, broken, unusable → blocker
239
+ - Contains: doesn't work, wrong, missing, can't → major
240
+ - Contains: slow, weird, off, minor, small → minor
241
+ - Contains: color, font, spacing, alignment, visual → cosmetic
242
+ - Default if unclear: major
243
+
244
+ Update Tests section:
245
+ ```
246
+ ### {N}. {name}
247
+ expected: {expected}
248
+ result: issue
249
+ reported: "{verbatim user response}"
250
+ severity: {inferred}
251
+ ```
252
+
253
+ Append to Gaps section (structured YAML for plan-phase --gaps):
254
+ ```yaml
255
+ - truth: "{expected behavior from test}"
256
+ status: failed
257
+ reason: "User reported: {verbatim user response}"
258
+ severity: {inferred}
259
+ test: {N}
260
+ artifacts: [] # Filled by diagnosis
261
+ missing: [] # Filled by diagnosis
262
+ ```
263
+
264
+ **After any response:**
265
+
266
+ Update Summary counts.
267
+ Update frontmatter.updated timestamp.
268
+
269
+ If more tests remain → Update Current Test, go to `present_test`
270
+ If no more tests → Go to `complete_session`
271
+ </step>
272
+
273
+ <step name="resume_from_file">
274
+ **Resume testing from UAT file:**
275
+
276
+ Read the full UAT file.
277
+
278
+ Find first test with `result: [pending]`.
279
+
280
+ Announce:
281
+ ```
282
+ Resuming: Phase {phase} UAT
283
+ Progress: {passed + issues + skipped}/{total}
284
+ Issues found so far: {issues count}
285
+
286
+ Continuing from Test {N}...
287
+ ```
288
+
289
+ Update Current Test section with the pending test.
290
+ Proceed to `present_test`.
291
+ </step>
292
+
293
+ <step name="complete_session">
294
+ **Complete testing and commit:**
295
+
296
+ Update frontmatter:
297
+ - status: complete
298
+ - updated: [now]
299
+
300
+ Clear Current Test section:
301
+ ```
302
+ ## Current Test
303
+
304
+ [testing complete]
305
+ ```
306
+
307
+ Commit the UAT file:
308
+ ```bash
309
+ node "$HOME/.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"
310
+ ```
311
+
312
+ Present summary:
313
+ ```
314
+ ## UAT Complete: Phase {phase}
315
+
316
+ | Result | Count |
317
+ |--------|-------|
318
+ | Passed | {N} |
319
+ | Issues | {N} |
320
+ | Skipped| {N} |
321
+
322
+ [If issues > 0:]
323
+ ### Issues Found
324
+
325
+ [List from Issues section]
326
+ ```
327
+
328
+ **If issues > 0:** Proceed to `diagnose_issues`
329
+
330
+ **If issues == 0:**
331
+ ```
332
+ All tests passed. Ready to continue.
333
+
334
+ - `/gsd:plan-phase {next}` — Plan next phase
335
+ - `/gsd:execute-phase {next}` — Execute next phase
336
+ ```
337
+ </step>
338
+
339
+ <step name="diagnose_issues">
340
+ **Diagnose root causes before planning fixes:**
341
+
342
+ ```
343
+ ---
344
+
345
+ {N} issues found. Diagnosing root causes...
346
+
347
+ Spawning parallel debug agents to investigate each issue.
348
+ ```
349
+
350
+ - Load diagnose-issues workflow
351
+ - Follow @~/.claude/get-shit-done/workflows/diagnose-issues.md
352
+ - Spawn parallel debug agents for each issue
353
+ - Collect root causes
354
+ - Update UAT.md with root causes
355
+ - Proceed to `plan_gap_closure`
356
+
357
+ Diagnosis runs automatically - no user prompt. Parallel agents investigate simultaneously, so overhead is minimal and fixes are more accurate.
358
+ </step>
359
+
360
+ <step name="plan_gap_closure">
361
+ **Auto-plan fixes from diagnosed gaps:**
362
+
363
+ Display:
364
+ ```
365
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
366
+ GSD ► PLANNING FIXES
367
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
368
+
369
+ ◆ Spawning planner for gap closure...
370
+ ```
371
+
372
+ Spawn gsd-planner in --gaps mode:
373
+
374
+ ```
375
+ Task(
376
+ prompt="""
377
+ <planning_context>
378
+
379
+ **Phase:** {phase_number}
380
+ **Mode:** gap_closure
381
+
382
+ <files_to_read>
383
+ - {phase_dir}/{phase_num}-UAT.md (UAT with diagnoses)
384
+ - .planning/STATE.md (Project State)
385
+ - .planning/ROADMAP.md (Roadmap)
386
+ </files_to_read>
387
+
388
+ </planning_context>
389
+
390
+ <downstream_consumer>
391
+ Output consumed by /gsd:execute-phase
392
+ Plans must be executable prompts.
393
+ </downstream_consumer>
394
+ """,
395
+ subagent_type="gsd-planner",
396
+ model="{planner_model}",
397
+ description="Plan gap fixes for Phase {phase}"
398
+ )
399
+ ```
400
+
401
+ On return:
402
+ - **PLANNING COMPLETE:** Proceed to `verify_gap_plans`
403
+ - **PLANNING INCONCLUSIVE:** Report and offer manual intervention
404
+ </step>
405
+
406
+ <step name="verify_gap_plans">
407
+ **Verify fix plans with checker:**
408
+
409
+ Display:
410
+ ```
411
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
412
+ GSD ► VERIFYING FIX PLANS
413
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
414
+
415
+ ◆ Spawning plan checker...
416
+ ```
417
+
418
+ Initialize: `iteration_count = 1`
419
+
420
+ Spawn gsd-plan-checker:
421
+
422
+ ```
423
+ Task(
424
+ prompt="""
425
+ <verification_context>
426
+
427
+ **Phase:** {phase_number}
428
+ **Phase Goal:** Close diagnosed gaps from UAT
429
+
430
+ <files_to_read>
431
+ - {phase_dir}/*-PLAN.md (Plans to verify)
432
+ </files_to_read>
433
+
434
+ </verification_context>
435
+
436
+ <expected_output>
437
+ Return one of:
438
+ - ## VERIFICATION PASSED — all checks pass
439
+ - ## ISSUES FOUND — structured issue list
440
+ </expected_output>
441
+ """,
442
+ subagent_type="gsd-plan-checker",
443
+ model="{checker_model}",
444
+ description="Verify Phase {phase} fix plans"
445
+ )
446
+ ```
447
+
448
+ On return:
449
+ - **VERIFICATION PASSED:** Proceed to `present_ready`
450
+ - **ISSUES FOUND:** Proceed to `revision_loop`
451
+ </step>
452
+
453
+ <step name="revision_loop">
454
+ **Iterate planner ↔ checker until plans pass (max 3):**
455
+
456
+ **If iteration_count < 3:**
457
+
458
+ Display: `Sending back to planner for revision... (iteration {N}/3)`
459
+
460
+ Spawn gsd-planner with revision context:
461
+
462
+ ```
463
+ Task(
464
+ prompt="""
465
+ <revision_context>
466
+
467
+ **Phase:** {phase_number}
468
+ **Mode:** revision
469
+
470
+ <files_to_read>
471
+ - {phase_dir}/*-PLAN.md (Existing plans)
472
+ </files_to_read>
473
+
474
+ **Checker issues:**
475
+ {structured_issues_from_checker}
476
+
477
+ </revision_context>
478
+
479
+ <instructions>
480
+ Read existing PLAN.md files. Make targeted updates to address checker issues.
481
+ Do NOT replan from scratch unless issues are fundamental.
482
+ </instructions>
483
+ """,
484
+ subagent_type="gsd-planner",
485
+ model="{planner_model}",
486
+ description="Revise Phase {phase} plans"
487
+ )
488
+ ```
489
+
490
+ After planner returns → spawn checker again (verify_gap_plans logic)
491
+ Increment iteration_count
492
+
493
+ **If iteration_count >= 3:**
494
+
495
+ Display: `Max iterations reached. {N} issues remain.`
496
+
497
+ Offer options:
498
+ 1. Force proceed (execute despite issues)
499
+ 2. Provide guidance (user gives direction, retry)
500
+ 3. Abandon (exit, user runs /gsd:plan-phase manually)
501
+
502
+ Wait for user response.
503
+ </step>
504
+
505
+ <step name="present_ready">
506
+ **Present completion and next steps:**
507
+
508
+ ```
509
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
510
+ GSD ► FIXES READY ✓
511
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
512
+
513
+ **Phase {X}: {Name}** — {N} gap(s) diagnosed, {M} fix plan(s) created
514
+
515
+ | Gap | Root Cause | Fix Plan |
516
+ |-----|------------|----------|
517
+ | {truth 1} | {root_cause} | {phase}-04 |
518
+ | {truth 2} | {root_cause} | {phase}-04 |
519
+
520
+ Plans verified and ready for execution.
521
+
522
+ ───────────────────────────────────────────────────────────────
523
+
524
+ ## ▶ Next Up
525
+
526
+ **Execute fixes** — run fix plans
527
+
528
+ `/clear` then `/gsd:execute-phase {phase} --gaps-only`
529
+
530
+ ───────────────────────────────────────────────────────────────
531
+ ```
532
+ </step>
533
+
534
+ </process>
535
+
536
+ <update_rules>
537
+ **Batched writes for efficiency:**
538
+
539
+ Keep results in memory. Write to file only when:
540
+ 1. **Issue found** — Preserve the problem immediately
541
+ 2. **Session complete** — Final write before commit
542
+ 3. **Checkpoint** — Every 5 passed tests (safety net)
543
+
544
+ | Section | Rule | When Written |
545
+ |---------|------|--------------|
546
+ | Frontmatter.status | OVERWRITE | Start, complete |
547
+ | Frontmatter.updated | OVERWRITE | On any file write |
548
+ | Current Test | OVERWRITE | On any file write |
549
+ | Tests.{N}.result | OVERWRITE | On any file write |
550
+ | Summary | OVERWRITE | On any file write |
551
+ | Gaps | APPEND | When issue found |
552
+
553
+ On context reset: File shows last checkpoint. Resume from there.
554
+ </update_rules>
555
+
556
+ <severity_inference>
557
+ **Infer severity from user's natural language:**
558
+
559
+ | User says | Infer |
560
+ |-----------|-------|
561
+ | "crashes", "error", "exception", "fails completely" | blocker |
562
+ | "doesn't work", "nothing happens", "wrong behavior" | major |
563
+ | "works but...", "slow", "weird", "minor issue" | minor |
564
+ | "color", "spacing", "alignment", "looks off" | cosmetic |
565
+
566
+ Default to **major** if unclear. User can correct if needed.
567
+
568
+ **Never ask "how severe is this?"** - just infer and move on.
569
+ </severity_inference>
570
+
571
+ <success_criteria>
572
+ - [ ] UAT file created with all tests from SUMMARY.md
573
+ - [ ] Tests presented one at a time with expected behavior
574
+ - [ ] User responses processed as pass/issue/skip
575
+ - [ ] Severity inferred from description (never asked)
576
+ - [ ] Batched writes: on issue, every 5 passes, or completion
577
+ - [ ] Committed on completion
578
+ - [ ] If issues: parallel debug agents diagnose root causes
579
+ - [ ] If issues: gsd-planner creates fix plans (gap_closure mode)
580
+ - [ ] If issues: gsd-plan-checker verifies fix plans
581
+ - [ ] If issues: revision loop until plans pass (max 3 iterations)
582
+ - [ ] Ready for `/gsd:execute-phase --gaps-only` when complete
583
+ </success_criteria>
@@ -0,0 +1,81 @@
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
+
13
+ // Detect runtime config directory (supports Claude, OpenCode, Gemini)
14
+ // Respects CLAUDE_CONFIG_DIR for custom config directory setups
15
+ function detectConfigDir(baseDir) {
16
+ // Check env override first (supports multi-account setups)
17
+ const envDir = process.env.CLAUDE_CONFIG_DIR;
18
+ if (envDir && fs.existsSync(path.join(envDir, 'get-shit-done', 'VERSION'))) {
19
+ return envDir;
20
+ }
21
+ for (const dir of ['.config/opencode', '.opencode', '.gemini', '.claude']) {
22
+ if (fs.existsSync(path.join(baseDir, dir, 'get-shit-done', 'VERSION'))) {
23
+ return path.join(baseDir, dir);
24
+ }
25
+ }
26
+ return envDir || path.join(baseDir, '.claude');
27
+ }
28
+
29
+ const globalConfigDir = detectConfigDir(homeDir);
30
+ const projectConfigDir = detectConfigDir(cwd);
31
+ const cacheDir = path.join(globalConfigDir, 'cache');
32
+ const cacheFile = path.join(cacheDir, 'gsd-update-check.json');
33
+
34
+ // VERSION file locations (check project first, then global)
35
+ const projectVersionFile = path.join(projectConfigDir, 'get-shit-done', 'VERSION');
36
+ const globalVersionFile = path.join(globalConfigDir, 'get-shit-done', 'VERSION');
37
+
38
+ // Ensure cache directory exists
39
+ if (!fs.existsSync(cacheDir)) {
40
+ fs.mkdirSync(cacheDir, { recursive: true });
41
+ }
42
+
43
+ // Run check in background (spawn background process, windowsHide prevents console flash)
44
+ const child = spawn(process.execPath, ['-e', `
45
+ const fs = require('fs');
46
+ const { execSync } = require('child_process');
47
+
48
+ const cacheFile = ${JSON.stringify(cacheFile)};
49
+ const projectVersionFile = ${JSON.stringify(projectVersionFile)};
50
+ const globalVersionFile = ${JSON.stringify(globalVersionFile)};
51
+
52
+ // Check project directory first (local install), then global
53
+ let installed = '0.0.0';
54
+ try {
55
+ if (fs.existsSync(projectVersionFile)) {
56
+ installed = fs.readFileSync(projectVersionFile, 'utf8').trim();
57
+ } else if (fs.existsSync(globalVersionFile)) {
58
+ installed = fs.readFileSync(globalVersionFile, 'utf8').trim();
59
+ }
60
+ } catch (e) {}
61
+
62
+ let latest = null;
63
+ try {
64
+ latest = execSync('npm view get-shit-done-cc version', { encoding: 'utf8', timeout: 10000, windowsHide: true }).trim();
65
+ } catch (e) {}
66
+
67
+ const result = {
68
+ update_available: latest && installed !== latest,
69
+ installed,
70
+ latest: latest || 'unknown',
71
+ checked: Math.floor(Date.now() / 1000)
72
+ };
73
+
74
+ fs.writeFileSync(cacheFile, JSON.stringify(result));
75
+ `], {
76
+ stdio: 'ignore',
77
+ windowsHide: true,
78
+ detached: true // Required on Windows for proper process detachment
79
+ });
80
+
81
+ child.unref();