gsd-antigravity-kit 2.0.0 → 2.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 (258) hide show
  1. package/.agent/skills/gsd/SKILL.md +26 -4
  2. package/.agent/skills/gsd/VERSION +1 -1
  3. package/.agent/skills/gsd/assets/templates/AI-SPEC.md +246 -0
  4. package/.agent/skills/gsd/assets/templates/DEBUG.md +7 -2
  5. package/.agent/skills/gsd/assets/templates/config.json +56 -48
  6. package/.agent/skills/gsd/assets/templates/research.md +40 -0
  7. package/.agent/skills/gsd/assets/templates/spec.md +307 -0
  8. package/.agent/skills/gsd/assets/templates/state.md +8 -0
  9. package/.agent/skills/gsd/bin/gsd-tools.cjs +212 -11
  10. package/.agent/skills/gsd/bin/help-manifest.json +8 -2
  11. package/.agent/skills/gsd/bin/hooks/gsd-check-update-worker.js +108 -0
  12. package/.agent/skills/gsd/bin/hooks/gsd-check-update.js +14 -89
  13. package/.agent/skills/gsd/bin/hooks/gsd-context-monitor.js +34 -5
  14. package/.agent/skills/gsd/bin/hooks/gsd-phase-boundary.sh +1 -0
  15. package/.agent/skills/gsd/bin/hooks/gsd-prompt-guard.js +1 -1
  16. package/.agent/skills/gsd/bin/hooks/gsd-read-guard.js +6 -1
  17. package/.agent/skills/gsd/bin/hooks/gsd-session-state.sh +1 -0
  18. package/.agent/skills/gsd/bin/hooks/gsd-statusline.js +150 -16
  19. package/.agent/skills/gsd/bin/hooks/gsd-validate-commit.sh +1 -0
  20. package/.agent/skills/gsd/bin/hooks/gsd-workflow-guard.js +1 -1
  21. package/.agent/skills/gsd/bin/lib/audit.cjs +757 -0
  22. package/.agent/skills/gsd/bin/lib/commands.cjs +17 -7
  23. package/.agent/skills/gsd/bin/lib/config.cjs +66 -20
  24. package/.agent/skills/gsd/bin/lib/core.cjs +212 -12
  25. package/.agent/skills/gsd/bin/lib/frontmatter.cjs +6 -8
  26. package/.agent/skills/gsd/bin/lib/graphify.cjs +494 -0
  27. package/.agent/skills/gsd/bin/lib/gsd2-import.cjs +511 -0
  28. package/.agent/skills/gsd/bin/lib/init.cjs +371 -18
  29. package/.agent/skills/gsd/bin/lib/intel.cjs +9 -30
  30. package/.agent/skills/gsd/bin/lib/milestone.cjs +18 -17
  31. package/.agent/skills/gsd/bin/lib/model-profiles.cjs +1 -0
  32. package/.agent/skills/gsd/bin/lib/phase.cjs +225 -98
  33. package/.agent/skills/gsd/bin/lib/profile-output.cjs +17 -5
  34. package/.agent/skills/gsd/bin/lib/roadmap.cjs +12 -5
  35. package/.agent/skills/gsd/bin/lib/state.cjs +394 -129
  36. package/.agent/skills/gsd/bin/lib/template.cjs +8 -4
  37. package/.agent/skills/gsd/bin/lib/uat.cjs +2 -1
  38. package/.agent/skills/gsd/bin/lib/verify.cjs +111 -42
  39. package/.agent/skills/gsd/migration_report.md +2 -2
  40. package/.agent/skills/gsd/references/agents/gsd-advisor-researcher.md +23 -0
  41. package/.agent/skills/gsd/references/agents/gsd-ai-researcher.md +133 -0
  42. package/.agent/skills/gsd/references/agents/gsd-code-fixer.md +11 -10
  43. package/.agent/skills/gsd/references/agents/gsd-code-reviewer.md +2 -2
  44. package/.agent/skills/gsd/references/agents/gsd-codebase-mapper.md +13 -2
  45. package/.agent/skills/gsd/references/agents/gsd-debug-session-manager.md +314 -0
  46. package/.agent/skills/gsd/references/agents/gsd-debugger.md +147 -76
  47. package/.agent/skills/gsd/references/agents/gsd-doc-verifier.md +1 -1
  48. package/.agent/skills/gsd/references/agents/gsd-doc-writer.md +615 -602
  49. package/.agent/skills/gsd/references/agents/gsd-domain-researcher.md +153 -0
  50. package/.agent/skills/gsd/references/agents/gsd-eval-auditor.md +175 -0
  51. package/.agent/skills/gsd/references/agents/gsd-eval-planner.md +154 -0
  52. package/.agent/skills/gsd/references/agents/gsd-executor.md +108 -38
  53. package/.agent/skills/gsd/references/agents/gsd-framework-selector.md +160 -0
  54. package/.agent/skills/gsd/references/agents/gsd-integration-checker.md +454 -443
  55. package/.agent/skills/gsd/references/agents/gsd-intel-updater.md +40 -20
  56. package/.agent/skills/gsd/references/agents/gsd-nyquist-auditor.md +187 -176
  57. package/.agent/skills/gsd/references/agents/gsd-pattern-mapper.md +335 -0
  58. package/.agent/skills/gsd/references/agents/gsd-phase-researcher.md +112 -13
  59. package/.agent/skills/gsd/references/agents/gsd-plan-checker.md +104 -10
  60. package/.agent/skills/gsd/references/agents/gsd-planner.md +125 -167
  61. package/.agent/skills/gsd/references/agents/gsd-project-researcher.md +25 -2
  62. package/.agent/skills/gsd/references/agents/gsd-research-synthesizer.md +3 -3
  63. package/.agent/skills/gsd/references/agents/gsd-roadmapper.md +12 -1
  64. package/.agent/skills/gsd/references/agents/gsd-security-auditor.md +139 -128
  65. package/.agent/skills/gsd/references/agents/gsd-ui-auditor.md +3 -3
  66. package/.agent/skills/gsd/references/agents/gsd-ui-checker.md +11 -2
  67. package/.agent/skills/gsd/references/agents/gsd-ui-researcher.md +27 -4
  68. package/.agent/skills/gsd/references/agents/gsd-verifier.md +13 -19
  69. package/.agent/skills/gsd/references/commands/atomic/add-todo.md +2 -2
  70. package/.agent/skills/gsd/references/commands/atomic/check-todos.md +2 -2
  71. package/.agent/skills/gsd/references/commands/atomic/cleanup.md +2 -2
  72. package/.agent/skills/gsd/references/commands/atomic/do.md +2 -2
  73. package/.agent/skills/gsd/references/commands/atomic/help.md +2 -2
  74. package/.agent/skills/gsd/references/commands/atomic/join-discord.md +2 -2
  75. package/.agent/skills/gsd/references/commands/atomic/note.md +2 -2
  76. package/.agent/skills/gsd/references/commands/atomic/session-report.md +2 -2
  77. package/.agent/skills/gsd/references/commands/atomic/ship.md +2 -2
  78. package/.agent/skills/gsd/references/commands/atomic/stats.md +2 -2
  79. package/.agent/skills/gsd/references/commands/atomic/thread.md +141 -41
  80. package/.agent/skills/gsd/references/commands/atomic/undo.md +2 -2
  81. package/.agent/skills/gsd/references/commands/milestone/add-backlog.md +15 -12
  82. package/.agent/skills/gsd/references/commands/milestone/audit-milestone.md +2 -2
  83. package/.agent/skills/gsd/references/commands/milestone/complete-milestone.md +2 -2
  84. package/.agent/skills/gsd/references/commands/milestone/milestone-summary.md +2 -2
  85. package/.agent/skills/gsd/references/commands/milestone/new-milestone.md +2 -2
  86. package/.agent/skills/gsd/references/commands/milestone/plan-milestone-gaps.md +2 -2
  87. package/.agent/skills/gsd/references/commands/milestone/plant-seed.md +2 -2
  88. package/.agent/skills/gsd/references/commands/milestone/review-backlog.md +4 -4
  89. package/.agent/skills/gsd/references/commands/misc/ai-integration-phase.md +38 -0
  90. package/.agent/skills/gsd/references/commands/misc/audit-fix.md +2 -2
  91. package/.agent/skills/gsd/references/commands/misc/audit-uat.md +2 -2
  92. package/.agent/skills/gsd/references/commands/misc/eval-review.md +34 -0
  93. package/.agent/skills/gsd/references/commands/misc/extract_learnings.md +24 -0
  94. package/.agent/skills/gsd/references/commands/misc/from-gsd2.md +49 -0
  95. package/.agent/skills/gsd/references/commands/misc/graphify.md +203 -0
  96. package/.agent/skills/gsd/references/commands/misc/inbox.md +40 -0
  97. package/.agent/skills/gsd/references/commands/misc/next.md +5 -3
  98. package/.agent/skills/gsd/references/commands/misc/progress.md +4 -3
  99. package/.agent/skills/gsd/references/commands/misc/sketch-wrap-up.md +33 -0
  100. package/.agent/skills/gsd/references/commands/misc/sketch.md +47 -0
  101. package/.agent/skills/gsd/references/commands/misc/spec-phase.md +64 -0
  102. package/.agent/skills/gsd/references/commands/misc/spike-wrap-up.md +33 -0
  103. package/.agent/skills/gsd/references/commands/misc/spike.md +43 -0
  104. package/.agent/skills/gsd/references/commands/misc/verify-work.md +2 -2
  105. package/.agent/skills/gsd/references/commands/phase/add-phase.md +2 -2
  106. package/.agent/skills/gsd/references/commands/phase/add-tests.md +2 -2
  107. package/.agent/skills/gsd/references/commands/phase/discuss-phase.md +5 -5
  108. package/.agent/skills/gsd/references/commands/phase/execute-phase.md +4 -4
  109. package/.agent/skills/gsd/references/commands/phase/insert-phase.md +2 -2
  110. package/.agent/skills/gsd/references/commands/phase/list-phase-assumptions.md +2 -2
  111. package/.agent/skills/gsd/references/commands/phase/plan-phase.md +3 -3
  112. package/.agent/skills/gsd/references/commands/phase/remove-phase.md +2 -2
  113. package/.agent/skills/gsd/references/commands/phase/research-phase.md +5 -5
  114. package/.agent/skills/gsd/references/commands/phase/secure-phase.md +2 -2
  115. package/.agent/skills/gsd/references/commands/phase/ui-phase.md +2 -2
  116. package/.agent/skills/gsd/references/commands/phase/ui-review.md +2 -2
  117. package/.agent/skills/gsd/references/commands/phase/validate-phase.md +2 -2
  118. package/.agent/skills/gsd/references/commands/phase/workstreams.md +9 -9
  119. package/.agent/skills/gsd/references/commands/project/analyze-dependencies.md +2 -2
  120. package/.agent/skills/gsd/references/commands/project/explore.md +2 -2
  121. package/.agent/skills/gsd/references/commands/project/import.md +2 -2
  122. package/.agent/skills/gsd/references/commands/project/intel.md +10 -10
  123. package/.agent/skills/gsd/references/commands/project/list-workspaces.md +2 -2
  124. package/.agent/skills/gsd/references/commands/project/map-codebase.md +2 -2
  125. package/.agent/skills/gsd/references/commands/project/new-project.md +2 -2
  126. package/.agent/skills/gsd/references/commands/project/new-workspace.md +2 -2
  127. package/.agent/skills/gsd/references/commands/project/remove-workspace.md +2 -2
  128. package/.agent/skills/gsd/references/commands/project/scan.md +2 -2
  129. package/.agent/skills/gsd/references/commands/system/autonomous.md +4 -3
  130. package/.agent/skills/gsd/references/commands/system/code-review-fix.md +3 -3
  131. package/.agent/skills/gsd/references/commands/system/code-review.md +3 -3
  132. package/.agent/skills/gsd/references/commands/system/debug.md +177 -100
  133. package/.agent/skills/gsd/references/commands/system/docs-update.md +2 -2
  134. package/.agent/skills/gsd/references/commands/system/fast.md +2 -2
  135. package/.agent/skills/gsd/references/commands/system/forensics.md +2 -2
  136. package/.agent/skills/gsd/references/commands/system/gsd-tools.md +153 -6
  137. package/.agent/skills/gsd/references/commands/system/health.md +2 -2
  138. package/.agent/skills/gsd/references/commands/system/manager.md +3 -3
  139. package/.agent/skills/gsd/references/commands/system/pause-work.md +2 -2
  140. package/.agent/skills/gsd/references/commands/system/pr-branch.md +2 -2
  141. package/.agent/skills/gsd/references/commands/system/profile-user.md +2 -2
  142. package/.agent/skills/gsd/references/commands/system/quick.md +127 -3
  143. package/.agent/skills/gsd/references/commands/system/reapply-patches.md +45 -6
  144. package/.agent/skills/gsd/references/commands/system/resume-work.md +2 -2
  145. package/.agent/skills/gsd/references/commands/system/review.md +6 -4
  146. package/.agent/skills/gsd/references/commands/system/set-profile.md +3 -3
  147. package/.agent/skills/gsd/references/commands/system/settings.md +2 -2
  148. package/.agent/skills/gsd/references/commands/system/update.md +2 -2
  149. package/.agent/skills/gsd/references/docs/ai-evals.md +156 -0
  150. package/.agent/skills/gsd/references/docs/ai-frameworks.md +186 -0
  151. package/.agent/skills/gsd/references/docs/artifact-types.md +18 -0
  152. package/.agent/skills/gsd/references/docs/autonomous-smart-discuss.md +277 -0
  153. package/.agent/skills/gsd/references/docs/checkpoints.md +30 -0
  154. package/.agent/skills/gsd/references/docs/common-bug-patterns.md +49 -49
  155. package/.agent/skills/gsd/references/docs/continuation-format.md +11 -7
  156. package/.agent/skills/gsd/references/docs/debugger-philosophy.md +76 -0
  157. package/.agent/skills/gsd/references/docs/decimal-phase-calculation.md +64 -64
  158. package/.agent/skills/gsd/references/docs/executor-examples.md +110 -0
  159. package/.agent/skills/gsd/references/docs/git-integration.md +4 -4
  160. package/.agent/skills/gsd/references/docs/git-planning-commit.md +40 -38
  161. package/.agent/skills/gsd/references/docs/ios-scaffold.md +123 -0
  162. package/.agent/skills/gsd/references/docs/mandatory-initial-read.md +2 -0
  163. package/.agent/skills/gsd/references/docs/phase-argument-parsing.md +61 -61
  164. package/.agent/skills/gsd/references/docs/planner-antipatterns.md +89 -0
  165. package/.agent/skills/gsd/references/docs/planner-revision.md +87 -87
  166. package/.agent/skills/gsd/references/docs/planner-source-audit.md +73 -0
  167. package/.agent/skills/gsd/references/docs/planning-config.md +33 -8
  168. package/.agent/skills/gsd/references/docs/project-skills-discovery.md +19 -0
  169. package/.agent/skills/gsd/references/docs/sketch-interactivity.md +41 -0
  170. package/.agent/skills/gsd/references/docs/sketch-theme-system.md +94 -0
  171. package/.agent/skills/gsd/references/docs/sketch-tooling.md +45 -0
  172. package/.agent/skills/gsd/references/docs/sketch-variant-patterns.md +81 -0
  173. package/.agent/skills/gsd/references/docs/tdd.md +67 -0
  174. package/.agent/skills/gsd/references/docs/universal-anti-patterns.md +5 -0
  175. package/.agent/skills/gsd/references/docs/workstream-flag.md +11 -11
  176. package/.agent/skills/gsd/references/mapping.md +1 -1
  177. package/.agent/skills/gsd/references/workflows/add-phase.md +112 -112
  178. package/.agent/skills/gsd/references/workflows/add-tests.md +6 -3
  179. package/.agent/skills/gsd/references/workflows/add-todo.md +5 -3
  180. package/.agent/skills/gsd/references/workflows/ai-integration-phase.md +284 -0
  181. package/.agent/skills/gsd/references/workflows/audit-fix.md +157 -157
  182. package/.agent/skills/gsd/references/workflows/audit-milestone.md +340 -340
  183. package/.agent/skills/gsd/references/workflows/audit-uat.md +109 -109
  184. package/.agent/skills/gsd/references/workflows/autonomous.md +20 -288
  185. package/.agent/skills/gsd/references/workflows/check-todos.md +4 -2
  186. package/.agent/skills/gsd/references/workflows/cleanup.md +3 -1
  187. package/.agent/skills/gsd/references/workflows/code-review-fix.md +497 -497
  188. package/.agent/skills/gsd/references/workflows/code-review.md +515 -515
  189. package/.agent/skills/gsd/references/workflows/complete-milestone.md +97 -24
  190. package/.agent/skills/gsd/references/workflows/diagnose-issues.md +238 -238
  191. package/.agent/skills/gsd/references/workflows/discovery-phase.md +2 -0
  192. package/.agent/skills/gsd/references/workflows/discuss-phase-assumptions.md +11 -11
  193. package/.agent/skills/gsd/references/workflows/discuss-phase.md +143 -19
  194. package/.agent/skills/gsd/references/workflows/do.md +8 -2
  195. package/.agent/skills/gsd/references/workflows/docs-update.md +5 -3
  196. package/.agent/skills/gsd/references/workflows/eval-review.md +155 -0
  197. package/.agent/skills/gsd/references/workflows/execute-phase.md +338 -54
  198. package/.agent/skills/gsd/references/workflows/execute-plan.md +80 -104
  199. package/.agent/skills/gsd/references/workflows/explore.md +3 -1
  200. package/.agent/skills/gsd/references/workflows/extract_learnings.md +232 -0
  201. package/.agent/skills/gsd/references/workflows/forensics.md +3 -3
  202. package/.agent/skills/gsd/references/workflows/health.md +2 -2
  203. package/.agent/skills/gsd/references/workflows/help.md +59 -1
  204. package/.agent/skills/gsd/references/workflows/import.md +3 -1
  205. package/.agent/skills/gsd/references/workflows/inbox.md +387 -384
  206. package/.agent/skills/gsd/references/workflows/insert-phase.md +130 -130
  207. package/.agent/skills/gsd/references/workflows/list-workspaces.md +56 -56
  208. package/.agent/skills/gsd/references/workflows/manager.md +5 -3
  209. package/.agent/skills/gsd/references/workflows/map-codebase.md +19 -5
  210. package/.agent/skills/gsd/references/workflows/milestone-summary.md +6 -6
  211. package/.agent/skills/gsd/references/workflows/new-milestone.md +63 -9
  212. package/.agent/skills/gsd/references/workflows/new-project.md +126 -22
  213. package/.agent/skills/gsd/references/workflows/new-workspace.md +6 -4
  214. package/.agent/skills/gsd/references/workflows/next.md +220 -153
  215. package/.agent/skills/gsd/references/workflows/note.md +2 -0
  216. package/.agent/skills/gsd/references/workflows/pause-work.md +11 -7
  217. package/.agent/skills/gsd/references/workflows/plan-milestone-gaps.md +273 -273
  218. package/.agent/skills/gsd/references/workflows/plan-phase.md +281 -62
  219. package/.agent/skills/gsd/references/workflows/plant-seed.md +4 -1
  220. package/.agent/skills/gsd/references/workflows/pr-branch.md +41 -13
  221. package/.agent/skills/gsd/references/workflows/profile-user.md +15 -13
  222. package/.agent/skills/gsd/references/workflows/progress.md +133 -21
  223. package/.agent/skills/gsd/references/workflows/quick.md +67 -27
  224. package/.agent/skills/gsd/references/workflows/remove-phase.md +155 -155
  225. package/.agent/skills/gsd/references/workflows/remove-workspace.md +4 -2
  226. package/.agent/skills/gsd/references/workflows/research-phase.md +3 -3
  227. package/.agent/skills/gsd/references/workflows/resume-project.md +3 -3
  228. package/.agent/skills/gsd/references/workflows/review.md +71 -8
  229. package/.agent/skills/gsd/references/workflows/scan.md +102 -102
  230. package/.agent/skills/gsd/references/workflows/secure-phase.md +7 -5
  231. package/.agent/skills/gsd/references/workflows/settings.md +24 -7
  232. package/.agent/skills/gsd/references/workflows/ship.md +71 -6
  233. package/.agent/skills/gsd/references/workflows/sketch-wrap-up.md +283 -0
  234. package/.agent/skills/gsd/references/workflows/sketch.md +263 -0
  235. package/.agent/skills/gsd/references/workflows/spec-phase.md +262 -0
  236. package/.agent/skills/gsd/references/workflows/spike-wrap-up.md +273 -0
  237. package/.agent/skills/gsd/references/workflows/spike.md +270 -0
  238. package/.agent/skills/gsd/references/workflows/stats.md +60 -60
  239. package/.agent/skills/gsd/references/workflows/transition.md +671 -671
  240. package/.agent/skills/gsd/references/workflows/ui-phase.md +33 -12
  241. package/.agent/skills/gsd/references/workflows/ui-review.md +6 -4
  242. package/.agent/skills/gsd/references/workflows/undo.md +3 -1
  243. package/.agent/skills/gsd/references/workflows/update.md +113 -2
  244. package/.agent/skills/gsd/references/workflows/validate-phase.md +7 -5
  245. package/.agent/skills/gsd/references/workflows/verify-phase.md +93 -10
  246. package/.agent/skills/gsd/references/workflows/verify-work.md +50 -10
  247. package/.agent/skills/gsd-converter/references/mapping.md +1 -1
  248. package/.agent/skills/gsd-converter/scripts/convert.py +36 -17
  249. package/.agent/skills/gsd-converter/scripts/regression_test.py +68 -33
  250. package/README.md +3 -2
  251. package/package.json +4 -2
  252. package/.agent/skills/release-manager/SKILL.md +0 -162
  253. package/.agent/skills/release-manager/bin/LICENSE +0 -21
  254. package/.agent/skills/release-manager/bin/gh.exe +0 -0
  255. package/.agent/skills/release-manager/references/update_kb_from_fixes.md +0 -29
  256. package/.agent/skills/release-manager/scripts/release.ps1 +0 -222
  257. package/.agent/skills/selectpaste-update/SKILL.md +0 -46
  258. package/.agent/skills/selectpaste-update/scripts/sync-commands.py +0 -317
@@ -72,6 +72,24 @@ reads is inert — the consumption mechanism is what gives an artifact meaning.
72
72
  - **Location**: `.planning/spikes/SPIKE-NNN/`
73
73
  - **Consumed by**: Planner when spike is referenced; `pause-work` for spike context handoff
74
74
 
75
+ ### Spike README.md / MANIFEST.md (per-spike, via /gsd-spike)
76
+ - **Shape**: YAML frontmatter (spike, name, validates, verdict, related, tags) + run instructions + results
77
+ - **Lifecycle**: Created by `/gsd-spike` → Verified → Wrapped up by `/gsd-spike-wrap-up`
78
+ - **Location**: `.planning/spikes/NNN-name/README.md`, `.planning/spikes/MANIFEST.md`
79
+ - **Consumed by**: `/gsd-spike-wrap-up` for curation; `pause-work` for spike context handoff
80
+
81
+ ### Sketch README.md / MANIFEST.md / index.html (per-sketch)
82
+ - **Shape**: YAML frontmatter (sketch, name, question, winner, tags) + variants as tabbed HTML
83
+ - **Lifecycle**: Created by `/gsd-sketch` → Evaluated → Wrapped up by `/gsd-sketch-wrap-up`
84
+ - **Location**: `.planning/sketches/NNN-name/README.md`, `.planning/sketches/NNN-name/index.html`, `.planning/sketches/MANIFEST.md`
85
+ - **Consumed by**: `/gsd-sketch-wrap-up` for curation; `pause-work` for sketch context handoff
86
+
87
+ ### WRAP-UP-SUMMARY.md (per wrap-up session)
88
+ - **Shape**: Curation results, included/excluded items, feature/design area groupings
89
+ - **Lifecycle**: Created by `/gsd-spike-wrap-up` or `/gsd-sketch-wrap-up`
90
+ - **Location**: `.planning/spikes/WRAP-UP-SUMMARY.md` or `.planning/sketches/WRAP-UP-SUMMARY.md`
91
+ - **Consumed by**: Project history; not read by automated workflows
92
+
75
93
  ---
76
94
 
77
95
  ## Standing Reference Artifacts
@@ -0,0 +1,277 @@
1
+ # Smart Discuss — Autonomous Mode
2
+
3
+ Smart discuss is the autonomous-optimized variant of `gsd-discuss-phase`. It proposes grey area answers in batch tables — the user accepts or overrides per area — then writes an identical CONTEXT.md to what discuss-phase produces.
4
+
5
+ **Inputs:** `PHASE_NUM` from execute_phase. Run init to get phase paths:
6
+
7
+ ```bash
8
+ PHASE_STATE=$(gsd-sdk query init.phase-op ${PHASE_NUM})
9
+ ```
10
+
11
+ Parse from JSON: `phase_dir`, `phase_slug`, `padded_phase`, `phase_name`.
12
+
13
+ ---
14
+
15
+ ## Sub-step 1: Load prior context
16
+
17
+ Read project-level and prior phase context to avoid re-asking decided questions.
18
+
19
+ **Read project files:**
20
+
21
+ ```bash
22
+ cat .planning/PROJECT.md 2>/dev/null || true
23
+ cat .planning/REQUIREMENTS.md 2>/dev/null || true
24
+ cat .planning/STATE.md 2>/dev/null || true
25
+ ```
26
+
27
+ Extract from these:
28
+ - **PROJECT.md** — Vision, principles, non-negotiables, user preferences
29
+ - **REQUIREMENTS.md** — Acceptance criteria, constraints, must-haves vs nice-to-haves
30
+ - **STATE.md** — Current progress, decisions logged so far
31
+
32
+ **Read all prior CONTEXT.md files:**
33
+
34
+ ```bash
35
+ (find .planning/phases -name "*-CONTEXT.md" 2>/dev/null || true) | sort
36
+ ```
37
+
38
+ For each CONTEXT.md where phase number < current phase:
39
+ - Read the `<decisions>` section — these are locked preferences
40
+ - Read `<specifics>` — particular references or "I want it like X" moments
41
+ - Note patterns (e.g., "user consistently prefers minimal UI", "user rejected verbose output")
42
+
43
+ **Build internal prior_decisions context** (do not write to file):
44
+
45
+ ```
46
+ <prior_decisions>
47
+ ## Project-Level
48
+ - [Key principle or constraint from PROJECT.md]
49
+ - [Requirement affecting this phase from REQUIREMENTS.md]
50
+
51
+ ## From Prior Phases
52
+ ### Phase N: [Name]
53
+ - [Decision relevant to current phase]
54
+ - [Preference that establishes a pattern]
55
+ </prior_decisions>
56
+ ```
57
+
58
+ If no prior context exists, continue without — expected for early phases.
59
+
60
+ ---
61
+
62
+ ## Sub-step 2: Scout Codebase
63
+
64
+ Lightweight codebase scan to inform grey area identification and proposals. Keep under ~5% context.
65
+
66
+ **Check for existing codebase maps:**
67
+
68
+ ```bash
69
+ ls .planning/codebase/*.md 2>/dev/null || true
70
+ ```
71
+
72
+ **If codebase maps exist:** Read the most relevant ones (CONVENTIONS.md, STRUCTURE.md, STACK.md based on phase type). Extract reusable components, established patterns, integration points. Skip to building context below.
73
+
74
+ **If no codebase maps, do targeted grep:**
75
+
76
+ Extract key terms from the phase goal. Search for related files:
77
+
78
+ ```bash
79
+ grep -rl "{term1}\|{term2}" src/ app/ --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" 2>/dev/null | head -10 || true
80
+ ls src/components/ src/hooks/ src/lib/ src/utils/ 2>/dev/null || true
81
+ ```
82
+
83
+ Read the 3-5 most relevant files to understand existing patterns.
84
+
85
+ **Build internal codebase_context** (do not write to file):
86
+ - **Reusable assets** — existing components, hooks, utilities usable in this phase
87
+ - **Established patterns** — how the codebase does state management, styling, data fetching
88
+ - **Integration points** — where new code connects (routes, nav, providers)
89
+
90
+ ---
91
+
92
+ ## Sub-step 3: Analyze Phase and Generate Proposals
93
+
94
+ **Get phase details:**
95
+
96
+ ```bash
97
+ DETAIL=$(gsd-sdk query roadmap.get-phase ${PHASE_NUM})
98
+ ```
99
+
100
+ Extract `goal`, `requirements`, `success_criteria` from the JSON response.
101
+
102
+ **Infrastructure detection — check FIRST before generating grey areas:**
103
+
104
+ A phase is pure infrastructure when ALL of these are true:
105
+ 1. Goal keywords match: "scaffolding", "plumbing", "setup", "configuration", "migration", "refactor", "rename", "restructure", "upgrade", "infrastructure"
106
+ 2. AND success criteria are all technical: "file exists", "test passes", "config valid", "command runs"
107
+ 3. AND no user-facing behavior is described (no "users can", "displays", "shows", "presents")
108
+
109
+ **If infrastructure-only:** Skip Sub-step 4. Jump directly to Sub-step 5 with minimal CONTEXT.md. Display:
110
+
111
+ ```
112
+ Phase ${PHASE_NUM}: Infrastructure phase — skipping discuss, writing minimal context.
113
+ ```
114
+
115
+ Use these defaults for the CONTEXT.md:
116
+ - `<domain>`: Phase boundary from ROADMAP goal
117
+ - `<decisions>`: Single "### Antigravity's Discretion" subsection — "All implementation choices are at Antigravity's discretion — pure infrastructure phase"
118
+ - `<code_context>`: Whatever the codebase scout found
119
+ - `<specifics>`: "No specific requirements — infrastructure phase"
120
+ - `<deferred>`: "None"
121
+
122
+ **If NOT infrastructure — generate grey area proposals:**
123
+
124
+ Determine domain type from the phase goal:
125
+ - Something users **SEE** → visual: layout, interactions, states, density
126
+ - Something users **CALL** → interface: contracts, responses, errors, auth
127
+ - Something users **RUN** → execution: invocation, output, behavior modes, flags
128
+ - Something users **READ** → content: structure, tone, depth, flow
129
+ - Something being **ORGANIZED** → organization: criteria, grouping, exceptions, naming
130
+
131
+ Check prior_decisions — skip grey areas already decided in prior phases.
132
+
133
+ Generate **3-4 grey areas** with **~4 questions each**. For each question:
134
+ - **Pre-select a recommended answer** based on: prior decisions (consistency), codebase patterns (reuse), domain conventions (standard approaches), ROADMAP success criteria
135
+ - Generate **1-2 alternatives** per question
136
+ - **Annotate** with prior decision context ("You decided X in Phase N") and code context ("Component Y exists with Z variants") where relevant
137
+
138
+ ---
139
+
140
+ ## Sub-step 4: Present Proposals Per Area
141
+
142
+ Present grey areas **one at a time**. For each area (M of N):
143
+
144
+ Display a table:
145
+
146
+ ```
147
+ ### Grey Area {M}/{N}: {Area Name}
148
+
149
+ | # | Question | ✅ Recommended | Alternative(s) |
150
+ |---|----------|---------------|-----------------|
151
+ | 1 | {question} | {answer} — {rationale} | {alt1}; {alt2} |
152
+ | 2 | {question} | {answer} — {rationale} | {alt1} |
153
+ | 3 | {question} | {answer} — {rationale} | {alt1}; {alt2} |
154
+ | 4 | {question} | {answer} — {rationale} | {alt1} |
155
+ ```
156
+
157
+ Then prompt the user via **AskUserQuestion**:
158
+ - **header:** "Area {M}/{N}"
159
+ - **question:** "Accept these answers for {Area Name}?"
160
+ - **options:** Build dynamically — always "Accept all" first, then "Change Q1" through "Change QN" for each question (up to 4), then "Discuss deeper" last. Cap at 6 explicit options max (AskUserQuestion adds "Other" automatically).
161
+
162
+ **On "Accept all":** Record all recommended answers for this area. Move to next area.
163
+
164
+ **On "Change QN":** Use AskUserQuestion with the alternatives for that specific question:
165
+ - **header:** "{Area Name}"
166
+ - **question:** "Q{N}: {question text}"
167
+ - **options:** List the 1-2 alternatives plus "You decide" (maps to Antigravity's Discretion)
168
+
169
+ Record the user's choice. Re-display the updated table with the change reflected. Re-present the full acceptance prompt so the user can make additional changes or accept.
170
+
171
+ **On "Discuss deeper":** Switch to interactive mode for this area only — ask questions one at a time using AskUserQuestion with 2-3 concrete options per question plus "You decide". After 4 questions, prompt:
172
+ - **header:** "{Area Name}"
173
+ - **question:** "More questions about {area name}, or move to next?"
174
+ - **options:** "More questions" / "Next area"
175
+
176
+ If "More questions", ask 4 more. If "Next area", display final summary table of captured answers for this area and move on.
177
+
178
+ **On "Other" (free text):** Interpret as either a specific change request or general feedback. Incorporate into the area's decisions, re-display updated table, re-present acceptance prompt.
179
+
180
+ **Scope creep handling:** If user mentions something outside the phase domain:
181
+
182
+ ```
183
+ "{Feature} sounds like a new capability — that belongs in its own phase.
184
+ I'll note it as a deferred idea.
185
+
186
+ Back to {current area}: {return to current question}"
187
+ ```
188
+
189
+ Track deferred ideas internally for inclusion in CONTEXT.md.
190
+
191
+ ---
192
+
193
+ ## Sub-step 5: Write CONTEXT.md
194
+
195
+ After all areas are resolved (or infrastructure skip), write the CONTEXT.md file.
196
+
197
+ **File path:** `${phase_dir}/${padded_phase}-CONTEXT.md`
198
+
199
+ Use **exactly** this structure (identical to discuss-phase output):
200
+
201
+ ```markdown
202
+ # Phase {PHASE_NUM}: {Phase Name} - Context
203
+
204
+ **Gathered:** {date}
205
+ **Status:** Ready for planning
206
+
207
+ <domain>
208
+ ## Phase Boundary
209
+
210
+ {Domain boundary statement from analysis — what this phase delivers}
211
+
212
+ </domain>
213
+
214
+ <decisions>
215
+ ## Implementation Decisions
216
+
217
+ ### {Area 1 Name}
218
+ - {Accepted/chosen answer for Q1}
219
+ - {Accepted/chosen answer for Q2}
220
+ - {Accepted/chosen answer for Q3}
221
+ - {Accepted/chosen answer for Q4}
222
+
223
+ ### {Area 2 Name}
224
+ - {Accepted/chosen answer for Q1}
225
+ - {Accepted/chosen answer for Q2}
226
+ ...
227
+
228
+ ### Antigravity's Discretion
229
+ {Any "You decide" answers collected — note Antigravity has flexibility here}
230
+
231
+ </decisions>
232
+
233
+ <code_context>
234
+ ## Existing Code Insights
235
+
236
+ ### Reusable Assets
237
+ - {From codebase scout — components, hooks, utilities}
238
+
239
+ ### Established Patterns
240
+ - {From codebase scout — state management, styling, data fetching}
241
+
242
+ ### Integration Points
243
+ - {From codebase scout — where new code connects}
244
+
245
+ </code_context>
246
+
247
+ <specifics>
248
+ ## Specific Ideas
249
+
250
+ {Any specific references or "I want it like X" from discussion}
251
+ {If none: "No specific requirements — open to standard approaches"}
252
+
253
+ </specifics>
254
+
255
+ <deferred>
256
+ ## Deferred Ideas
257
+
258
+ {Ideas captured but out of scope for this phase}
259
+ {If none: "None — discussion stayed within phase scope"}
260
+
261
+ </deferred>
262
+ ```
263
+
264
+ Write the file.
265
+
266
+ **Commit:**
267
+
268
+ ```bash
269
+ gsd-sdk query commit "docs(${PADDED_PHASE}): smart discuss context" "${phase_dir}/${padded_phase}-CONTEXT.md"
270
+ ```
271
+
272
+ Display confirmation:
273
+
274
+ ```
275
+ Created: {path}
276
+ Decisions captured: {count} across {area_count} areas
277
+ ```
@@ -759,6 +759,36 @@ timeout 30 bash -c 'until node -e "fetch(\"http://localhost:3000\").then(r=>{pro
759
759
 
760
760
  </anti_patterns>
761
761
 
762
+ <type name="tdd-review">
763
+ ## checkpoint:tdd-review (TDD Mode Only)
764
+
765
+ **When:** All waves in a phase complete and `workflow.tdd_mode` is enabled. Inserted by the execute-phase orchestrator after `aggregate_results`.
766
+
767
+ **Purpose:** Collaborative review of TDD gate compliance across all `type: tdd` plans in the phase. Advisory — does not block execution.
768
+
769
+ **Use for:**
770
+ - Verifying RED/GREEN/REFACTOR commit sequence for each TDD plan
771
+ - Surfacing gate violations (missing RED or GREEN commits)
772
+ - Reviewing test quality (tests fail for the right reason)
773
+ - Confirming minimal GREEN implementations
774
+
775
+ **Structure:**
776
+ ```xml
777
+ <task type="checkpoint:tdd-review" gate="advisory">
778
+ <what-checked>TDD gate compliance for {count} plans in Phase {X}</what-checked>
779
+ <gate-results>
780
+ | Plan | RED | GREEN | REFACTOR | Status |
781
+ |------|-----|-------|----------|--------|
782
+ | {id} | ✓ | ✓ | ✓ | Pass |
783
+ </gate-results>
784
+ <violations>[List of gate violations, or "None"]</violations>
785
+ <resume-signal>Review complete — proceed to phase verification</resume-signal>
786
+ </task>
787
+ ```
788
+
789
+ **Auto-mode behavior:** When `workflow._auto_chain_active` or `workflow.auto_advance` is true, the TDD review checkpoint auto-approves (advisory gate — never blocks).
790
+ </type>
791
+
762
792
  <summary>
763
793
 
764
794
  Checkpoints formalize human-in-the-loop points for verification and decisions, not manual work.
@@ -6,85 +6,85 @@ Checklist of frequent bug patterns to scan before forming hypotheses. Ordered by
6
6
 
7
7
  ## Null / Undefined Access
8
8
 
9
- - [ ] Accessing property on `null` or `undefined` missing null check or optional chaining
10
- - [ ] Function returns `undefined` instead of expected value missing `return` statement or wrong branch
11
- - [ ] Array/object destructuring on `null`/`undefined` API returned error shape instead of data
12
- - [ ] Optional parameter used without default caller omitted argument
9
+ - **Null property access** — accessing property on `null` or `undefined`, missing null check or optional chaining
10
+ - **Missing return value** — function returns `undefined` instead of expected value, missing `return` statement or wrong branch
11
+ - **Destructuring null** — array/object destructuring on `null`/`undefined`, API returned error shape instead of data
12
+ - **Undefaulted optional** optional parameter used without default, caller omitted argument
13
13
 
14
14
  ## Off-by-One / Boundary
15
15
 
16
- - [ ] Loop starts at 1 instead of 0, or ends at `length` instead of `length - 1`
17
- - [ ] Fence-post error — "N items need N-1 separators" miscounted
18
- - [ ] Inclusive vs exclusive range boundary `<` vs `<=`, slice/substring end index
19
- - [ ] Empty collection not handled — `.length === 0` falls through to logic assuming items exist
16
+ - **Wrong loop bound** — loop starts at 1 instead of 0, or ends at `length` instead of `length - 1`
17
+ - **Fence-post error** — "N items need N-1 separators" miscounted
18
+ - **Inclusive vs exclusive** range boundary `<` vs `<=`, slice/substring end index
19
+ - **Empty collection** — `.length === 0` falls through to logic assuming items exist
20
20
 
21
21
  ## Async / Timing
22
22
 
23
- - [ ] Missing `await` on async function gets Promise object instead of resolved value
24
- - [ ] Race condition — two async operations read/write same state without coordination
25
- - [ ] Stale closure — callback captures old variable value, not current one
26
- - [ ] Event handler fires before setup complete — initialization order dependency
27
- - [ ] Timeout/interval not cleaned up fires after component/context destroyed
23
+ - **Missing await** async function called without `await`, gets Promise object instead of resolved value
24
+ - **Race condition** — two async operations read/write same state without coordination
25
+ - **Stale closure** — callback captures old variable value, not current one
26
+ - **Initialization order** event handler fires before setup complete
27
+ - **Leaked timer** — timeout/interval not cleaned up, fires after component/context destroyed
28
28
 
29
29
  ## State Management
30
30
 
31
- - [ ] Mutating shared state — object/array modified in place affects other consumers
32
- - [ ] State updated but UI not re-rendered missing reactive trigger or wrong reference
33
- - [ ] Stale state in event handler — closure captures state at bind time, not current value
34
- - [ ] Multiple sources of truth — same data stored in two places, one gets out of sync
35
- - [ ] State machine allows invalid transition missing guard condition
31
+ - **Shared mutation** — object/array modified in place affects other consumers
32
+ - **Stale render** state updated but UI not re-rendered, missing reactive trigger or wrong reference
33
+ - **Stale handler state** — closure captures state at bind time, not current value
34
+ - **Dual source of truth** — same data stored in two places, one gets out of sync
35
+ - **Invalid transition** state machine allows transition missing guard condition
36
36
 
37
37
  ## Import / Module
38
38
 
39
- - [ ] Circular dependency — module A imports B, B imports A, one gets `undefined`
40
- - [ ] Default vs named export mismatch — `import X` vs `import { X }`
41
- - [ ] Wrong file extension — `.js` vs `.cjs` vs `.mjs`, `.ts` vs `.tsx`
42
- - [ ] Path case sensitivity — works on Windows/macOS, fails on Linux
43
- - [ ] Missing file extension in import — ESM requires explicit extensions
39
+ - **Circular dependency** — module A imports B, B imports A, one gets `undefined`
40
+ - **Export mismatch** default vs named export, `import X` vs `import { X }`
41
+ - **Wrong extension** — `.js` vs `.cjs` vs `.mjs`, `.ts` vs `.tsx`
42
+ - **Path case sensitivity** — works on Windows/macOS, fails on Linux
43
+ - **Missing extension** — ESM requires explicit file extensions in imports
44
44
 
45
45
  ## Type / Coercion
46
46
 
47
- - [ ] String vs number comparison — `"5" > "10"` is `true` (lexicographic), `5 > 10` is `false`
48
- - [ ] Implicit type coercion — `==` instead of `===`, truthy/falsy surprises (`0`, `""`, `[]`)
49
- - [ ] Integer overflow or floating point — `0.1 + 0.2 !== 0.3`, large numbers lose precision
50
- - [ ] Boolean vs truthy check — value is `0` or `""` which is valid but falsy
47
+ - **String vs number compare** — `"5" > "10"` is `true` (lexicographic), `5 > 10` is `false`
48
+ - **Implicit coercion** — `==` instead of `===`, truthy/falsy surprises (`0`, `""`, `[]`)
49
+ - **Numeric precision** — `0.1 + 0.2 !== 0.3`, large integers lose precision
50
+ - **Falsy valid value** — value is `0` or `""` which is valid but falsy
51
51
 
52
52
  ## Environment / Config
53
53
 
54
- - [ ] Environment variable missing or wrong — different value in dev vs prod vs CI
55
- - [ ] Hardcoded path or URL — works on one machine, fails on another
56
- - [ ] Port already in use previous process still running
57
- - [ ] File permission denied — different user/group in deployment
58
- - [ ] Missing dependency — not in package.json or not installed
54
+ - **Missing env var** — environment variable missing or wrong value in dev vs prod vs CI
55
+ - **Hardcoded path** — works on one machine, fails on another
56
+ - **Port conflict** port already in use, previous process still running
57
+ - **Permission denied** — different user/group in deployment
58
+ - **Missing dependency** — not in package.json or not installed
59
59
 
60
60
  ## Data Shape / API Contract
61
61
 
62
- - [ ] API response shape changed — backend updated, frontend expects old format
63
- - [ ] Array where object expected (or vice versa) `data` vs `data.results` vs `data[0]`
64
- - [ ] Missing field in payload — required field omitted, backend returns validation error
65
- - [ ] Date/time format mismatch — ISO string vs timestamp vs locale string
66
- - [ ] Encoding mismatch — UTF-8 vs Latin-1, URL encoding, HTML entities
62
+ - **Changed response shape** — backend updated, frontend expects old format
63
+ - **Wrong container type** — array where object expected or vice versa, `data` vs `data.results` vs `data[0]`
64
+ - **Missing required field** — required field omitted in payload, backend returns validation error
65
+ - **Date format mismatch** — ISO string vs timestamp vs locale string
66
+ - **Encoding mismatch** — UTF-8 vs Latin-1, URL encoding, HTML entities
67
67
 
68
68
  ## Regex / String
69
69
 
70
- - [ ] Regex `g` flag with `.test()` then `.exec()` `lastIndex` not reset between calls
71
- - [ ] Missing escape — `.` matches any char, `$` is special, backslash needs doubling
72
- - [ ] Greedy match captures too much — `.*` eats through delimiters, need `.*?`
73
- - [ ] String interpolation in wrong quote type template literals need backticks
70
+ - **Sticky lastIndex** regex `g` flag with `.test()` then `.exec()`, `lastIndex` not reset between calls
71
+ - **Missing escape** — `.` matches any char, `$` is special, backslash needs doubling
72
+ - **Greedy overmatch** — `.*` eats through delimiters, need `.*?`
73
+ - **Wrong quote type** string interpolation needs backticks for template literals
74
74
 
75
75
  ## Error Handling
76
76
 
77
- - [ ] Catch block swallows error — empty `catch {}` or logs but doesn't rethrow/handle
78
- - [ ] Wrong error type caught — catches base `Error` when specific type needed
79
- - [ ] Error in error handler — cleanup code throws, masking original error
80
- - [ ] Promise rejection unhandled — missing `.catch()` or try/catch around `await`
77
+ - **Swallowed error** — empty `catch {}` or logs but doesn't rethrow/handle
78
+ - **Wrong error type** — catches base `Error` when specific type needed
79
+ - **Error in handler** — cleanup code throws, masking original error
80
+ - **Unhandled rejection** — missing `.catch()` or try/catch around `await`
81
81
 
82
82
  ## Scope / Closure
83
83
 
84
- - [ ] Variable shadowing — inner scope declares same name, hides outer variable
85
- - [ ] Loop variable capture — all closures share same `var i`, use `let` or bind
86
- - [ ] `this` binding lost — callback loses context, need `.bind()` or arrow function
87
- - [ ] Block scope vs function scope — `var` hoisted to function, `let`/`const` block-scoped
84
+ - **Variable shadowing** — inner scope declares same name, hides outer variable
85
+ - **Loop variable capture** — all closures share same `var i`, use `let` or bind
86
+ - **Lost this binding** — callback loses context, need `.bind()` or arrow function
87
+ - **Scope confusion** — `var` hoisted to function, `let`/`const` block-scoped
88
88
 
89
89
  </patterns>
90
90
 
@@ -7,7 +7,7 @@ Standard format for presenting next steps after completing a command or workflow
7
7
  ```
8
8
  ---
9
9
 
10
- ## ▶ Next Up
10
+ ## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}
11
11
 
12
12
  **{identifier}: {name}** — {one-line description}
13
13
 
@@ -24,6 +24,9 @@ Standard format for presenting next steps after completing a command or workflow
24
24
  ---
25
25
  ```
26
26
 
27
+ > If `project_code` is not set in the init context, omit the project identity suffix:
28
+ > `## ▶ Next Up` (no ` — [CODE] Title`).
29
+
27
30
  ## Format Rules
28
31
 
29
32
  1. **Always show what it is** — name + description, never just a command path
@@ -32,6 +35,7 @@ Standard format for presenting next steps after completing a command or workflow
32
35
  4. **`/clear` first** — always show `/clear` before the command so users run it in the correct order
33
36
  5. **"Also available" not "Other options"** — sounds more app-like
34
37
  6. **Visual separators** — `---` above and below to make it stand out
38
+ 7. **Project identity in heading** — include `[PROJECT_CODE] PROJECT_TITLE` from init context so handoffs are self-identifying across sessions. If `project_code` is not set, omit the suffix entirely (just `## ▶ Next Up`)
35
39
 
36
40
  ## Variants
37
41
 
@@ -40,7 +44,7 @@ Standard format for presenting next steps after completing a command or workflow
40
44
  ```
41
45
  ---
42
46
 
43
- ## ▶ Next Up
47
+ ## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}
44
48
 
45
49
  **02-03: Refresh Token Rotation** — Add /api/auth/refresh with sliding expiry
46
50
 
@@ -64,7 +68,7 @@ Add note that this is the last plan and what comes after:
64
68
  ```
65
69
  ---
66
70
 
67
- ## ▶ Next Up
71
+ ## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}
68
72
 
69
73
  **02-03: Refresh Token Rotation** — Add /api/auth/refresh with sliding expiry
70
74
  <sub>Final plan in Phase 2</sub>
@@ -87,7 +91,7 @@ Add note that this is the last plan and what comes after:
87
91
  ```
88
92
  ---
89
93
 
90
- ## ▶ Next Up
94
+ ## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}
91
95
 
92
96
  **Phase 2: Authentication** — JWT login flow with refresh tokens
93
97
 
@@ -116,7 +120,7 @@ Show completion status before next action:
116
120
 
117
121
  3/3 plans executed
118
122
 
119
- ## ▶ Next Up
123
+ ## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}
120
124
 
121
125
  **Phase 3: Core Features** — User dashboard, settings, and data export
122
126
 
@@ -141,7 +145,7 @@ When there's no clear primary action:
141
145
  ```
142
146
  ---
143
147
 
144
- ## ▶ Next Up
148
+ ## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}
145
149
 
146
150
  **Phase 3: Core Features** — User dashboard, settings, and data export
147
151
 
@@ -165,7 +169,7 @@ When there's no clear primary action:
165
169
 
166
170
  All 4 phases shipped
167
171
 
168
- ## ▶ Next Up
172
+ ## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}
169
173
 
170
174
  **Start v1.1** — questioning → research → requirements → roadmap
171
175
 
@@ -0,0 +1,76 @@
1
+ # Debugger Philosophy
2
+
3
+ Evergreen debugging disciplines — applies across every bug, every language, every system. Loaded by `gsd-debugger` via `@file` include.
4
+
5
+ ## User = Reporter, Antigravity = Investigator
6
+
7
+ The user knows:
8
+ - What they expected to happen
9
+ - What actually happened
10
+ - Error messages they saw
11
+ - When it started / if it ever worked
12
+
13
+ The user does NOT know (don't ask):
14
+ - What's causing the bug
15
+ - Which file has the problem
16
+ - What the fix should be
17
+
18
+ Ask about experience. Investigate the cause yourself.
19
+
20
+ ## Meta-Debugging: Your Own Code
21
+
22
+ When debugging code you wrote, you're fighting your own mental model.
23
+
24
+ **Why this is harder:**
25
+ - You made the design decisions - they feel obviously correct
26
+ - You remember intent, not what you actually implemented
27
+ - Familiarity breeds blindness to bugs
28
+
29
+ **The discipline:**
30
+ 1. **Treat your code as foreign** - Read it as if someone else wrote it
31
+ 2. **Question your design decisions** - Your implementation decisions are hypotheses, not facts
32
+ 3. **Admit your mental model might be wrong** - The code's behavior is truth; your model is a guess
33
+ 4. **Prioritize code you touched** - If you modified 100 lines and something breaks, those are prime suspects
34
+
35
+ **The hardest admission:** "I implemented this wrong." Not "requirements were unclear" - YOU made an error.
36
+
37
+ ## Foundation Principles
38
+
39
+ When debugging, return to foundational truths:
40
+
41
+ - **What do you know for certain?** Observable facts, not assumptions
42
+ - **What are you assuming?** "This library should work this way" - have you verified?
43
+ - **Strip away everything you think you know.** Build understanding from observable facts.
44
+
45
+ ## Cognitive Biases to Avoid
46
+
47
+ | Bias | Trap | Antidote |
48
+ |------|------|----------|
49
+ | **Confirmation** | Only look for evidence supporting your hypothesis | Actively seek disconfirming evidence. "What would prove me wrong?" |
50
+ | **Anchoring** | First explanation becomes your anchor | Generate 3+ independent hypotheses before investigating any |
51
+ | **Availability** | Recent bugs → assume similar cause | Treat each bug as novel until evidence suggests otherwise |
52
+ | **Sunk Cost** | Spent 2 hours on one path, keep going despite evidence | Every 30 min: "If I started fresh, is this still the path I'd take?" |
53
+
54
+ ## Systematic Investigation Disciplines
55
+
56
+ **Change one variable:** Make one change, test, observe, document, repeat. Multiple changes = no idea what mattered.
57
+
58
+ **Complete reading:** Read entire functions, not just "relevant" lines. Read imports, config, tests. Skimming misses crucial details.
59
+
60
+ **Embrace not knowing:** "I don't know why this fails" = good (now you can investigate). "It must be X" = dangerous (you've stopped thinking).
61
+
62
+ ## When to Restart
63
+
64
+ Consider starting over when:
65
+ 1. **2+ hours with no progress** - You're likely tunnel-visioned
66
+ 2. **3+ "fixes" that didn't work** - Your mental model is wrong
67
+ 3. **You can't explain the current behavior** - Don't add changes on top of confusion
68
+ 4. **You're debugging the debugger** - Something fundamental is wrong
69
+ 5. **The fix works but you don't know why** - This isn't fixed, this is luck
70
+
71
+ **Restart protocol:**
72
+ 1. Close all files and terminals
73
+ 2. Write down what you know for certain
74
+ 3. Write down what you've ruled out
75
+ 4. List new hypotheses (different from before)
76
+ 5. Begin again from Phase 1: Evidence Gathering