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
@@ -1,238 +1,238 @@
1
- <purpose>
2
- Orchestrate parallel debug agents to investigate UAT gaps and find root causes.
3
-
4
- After UAT finds gaps, spawn one debug agent per gap. Each agent investigates autonomously with symptoms pre-filled from UAT. Collect root causes, update UAT.md gaps with diagnosis, then hand off to plan-phase --gaps with actual diagnoses.
5
-
6
- Orchestrator stays lean: parse gaps, spawn agents, collect results, update UAT.
7
- </purpose>
8
-
9
- <available_agent_types>
10
- Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
11
- - gsd-debugger — Diagnoses and fixes issues
12
- </available_agent_types>
13
-
14
- <paths>
15
- DEBUG_DIR=.planning/debug
16
-
17
- Debug files use the `.planning/debug/` path (hidden directory with leading dot).
18
- </paths>
19
-
20
- <core_principle>
21
- **Diagnose before planning fixes.**
22
-
23
- UAT tells us WHAT is broken (symptoms). Debug agents find WHY (root cause). plan-phase --gaps then creates targeted fixes based on actual causes, not guesses.
24
-
25
- Without diagnosis: "Comment doesn't refresh" → guess at fix → maybe wrong
26
- With diagnosis: "Comment doesn't refresh" → "useEffect missing dependency" → precise fix
27
- </core_principle>
28
-
29
- <process>
30
-
31
- <step name="parse_gaps">
32
- **Extract gaps from UAT.md:**
33
-
34
- Read the "Gaps" section (YAML format):
35
- ```yaml
36
- - truth: "Comment appears immediately after submission"
37
- status: failed
38
- reason: "User reported: works but doesn't show until I refresh the page"
39
- severity: major
40
- test: 2
41
- artifacts: []
42
- missing: []
43
- ```
44
-
45
- For each gap, also read the corresponding test from "Tests" section to get full context.
46
-
47
- Build gap list:
48
- ```
49
- gaps = [
50
- {truth: "Comment appears immediately...", severity: "major", test_num: 2, reason: "..."},
51
- {truth: "Reply button positioned correctly...", severity: "minor", test_num: 5, reason: "..."},
52
- ...
53
- ]
54
- ```
55
- </step>
56
-
57
- <step name="report_plan">
58
- **Read worktree config:**
59
-
60
- ```bash
61
- .agent/skills/gsd/bin/gsd-tools.cjs" config-get workflow.use_worktrees 2>/dev/null || echo "true")
62
- ```
63
-
64
- **Report diagnosis plan to user:**
65
-
66
- ```
67
- ## Diagnosing {N} Gaps
68
-
69
- Spawning parallel debug agents to investigate root causes:
70
-
71
- | Gap (Truth) | Severity |
72
- |-------------|----------|
73
- | Comment appears immediately after submission | major |
74
- | Reply button positioned correctly | minor |
75
- | Delete removes comment | blocker |
76
-
77
- Each agent will:
78
- 1. Create DEBUG-{slug}.md with symptoms pre-filled
79
- 2. Investigate autonomously (read code, form hypotheses, test)
80
- 3. Return root cause
81
-
82
- This runs in parallel - all gaps investigated simultaneously.
83
- ```
84
- </step>
85
-
86
- <step name="spawn_agents">
87
- **Load agent skills:**
88
-
89
- ```bash
90
- .agent/skills/gsd/bin/gsd-tools.cjs" agent-skills gsd-debugger 2>/dev/null)
91
- EXPECTED_BASE=$(git rev-parse HEAD)
92
- ```
93
-
94
- **Spawn debug agents in parallel:**
95
-
96
- For each gap, fill the debug-subagent-prompt template and spawn:
97
-
98
- ```
99
- Task(
100
- prompt=filled_debug_subagent_prompt + "\n\n<worktree_branch_check>\nFIRST ACTION: run git merge-base HEAD {EXPECTED_BASE} — if result differs from {EXPECTED_BASE}, run git reset --soft {EXPECTED_BASE} to correct the branch base (fixes Windows EnterWorktree creating branches from main).\n</worktree_branch_check>\n\n<files_to_read>\n- {phase_dir}/{phase_num}-UAT.md\n- .planning/STATE.md\n</files_to_read>\n${AGENT_SKILLS_DEBUGGER}",
101
- subagent_type="gsd-debugger",
102
- ${USE_WORKTREES !== "false" ? 'isolation="worktree",' : ''}
103
- description="Debug: {truth_short}"
104
- )
105
- ```
106
-
107
- **All agents spawn in single message** (parallel execution).
108
-
109
- Template placeholders:
110
- - `{truth}`: The expected behavior that failed
111
- - `{expected}`: From UAT test
112
- - `{actual}`: Verbatim user description from reason field
113
- - `{errors}`: Any error messages from UAT (or "None reported")
114
- - `{reproduction}`: "Test {test_num} in UAT"
115
- - `{timeline}`: "Discovered during UAT"
116
- - `{goal}`: `find_root_cause_only` (UAT flow - plan-phase --gaps handles fixes)
117
- - `{slug}`: Generated from truth
118
- </step>
119
-
120
- <step name="collect_results">
121
- **Collect root causes from agents:**
122
-
123
- Each agent returns with:
124
- ```
125
- ## ROOT CAUSE FOUND
126
-
127
- **Debug Session:** ${DEBUG_DIR}/{slug}.md
128
-
129
- **Root Cause:** {specific cause with evidence}
130
-
131
- **Evidence Summary:**
132
- - {key finding 1}
133
- - {key finding 2}
134
- - {key finding 3}
135
-
136
- **Files Involved:**
137
- - {file1}: {what's wrong}
138
- - {file2}: {related issue}
139
-
140
- **Suggested Fix Direction:** {brief hint for plan-phase --gaps}
141
- ```
142
-
143
- Parse each return to extract:
144
- - root_cause: The diagnosed cause
145
- - files: Files involved
146
- - debug_path: Path to debug session file
147
- - suggested_fix: Hint for gap closure plan
148
-
149
- If agent returns `## INVESTIGATION INCONCLUSIVE`:
150
- - root_cause: "Investigation inconclusive - manual review needed"
151
- - Note which issue needs manual attention
152
- - Include remaining possibilities from agent return
153
- </step>
154
-
155
- <step name="update_uat">
156
- **Update UAT.md gaps with diagnosis:**
157
-
158
- For each gap in the Gaps section, add artifacts and missing fields:
159
-
160
- ```yaml
161
- - truth: "Comment appears immediately after submission"
162
- status: failed
163
- reason: "User reported: works but doesn't show until I refresh the page"
164
- severity: major
165
- test: 2
166
- root_cause: "useEffect in CommentList.tsx missing commentCount dependency"
167
- artifacts:
168
- - path: "src/components/CommentList.tsx"
169
- issue: "useEffect missing dependency"
170
- missing:
171
- - "Add commentCount to useEffect dependency array"
172
- - "Trigger re-render when new comment added"
173
- debug_session: .planning/debug/comment-not-refreshing.md
174
- ```
175
-
176
- Update status in frontmatter to "diagnosed".
177
-
178
- Commit the updated UAT.md:
179
- ```bash
180
- .agent/skills/gsd/bin/gsd-tools.cjs" commit "docs({phase_num}): add root causes from diagnosis" --files ".planning/phases/XX-name/{phase_num}-UAT.md"
181
- ```
182
- </step>
183
-
184
- <step name="report_results">
185
- **Report diagnosis results and hand off:**
186
-
187
- Display:
188
- ```
189
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
190
- GSD ► DIAGNOSIS COMPLETE
191
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
192
-
193
- | Gap (Truth) | Root Cause | Files |
194
- |-------------|------------|-------|
195
- | Comment appears immediately | useEffect missing dependency | CommentList.tsx |
196
- | Reply button positioned correctly | CSS flex order incorrect | ReplyButton.tsx |
197
- | Delete removes comment | API missing auth header | api/comments.ts |
198
-
199
- Debug sessions: ${DEBUG_DIR}/
200
-
201
- Proceeding to plan fixes...
202
- ```
203
-
204
- Return to verify-work orchestrator for automatic planning.
205
- Do NOT offer manual next steps - verify-work handles the rest.
206
- </step>
207
-
208
- </process>
209
-
210
- <context_efficiency>
211
- Agents start with symptoms pre-filled from UAT (no symptom gathering).
212
- Agents only diagnose—plan-phase --gaps handles fixes (no fix application).
213
- </context_efficiency>
214
-
215
- <failure_handling>
216
- **Agent fails to find root cause:**
217
- - Mark gap as "needs manual review"
218
- - Continue with other gaps
219
- - Report incomplete diagnosis
220
-
221
- **Agent times out:**
222
- - Check DEBUG-{slug}.md for partial progress
223
- - Can resume with /gsd-debug
224
-
225
- **All agents fail:**
226
- - Something systemic (permissions, git, etc.)
227
- - Report for manual investigation
228
- - Fall back to plan-phase --gaps without root causes (less precise)
229
- </failure_handling>
230
-
231
- <success_criteria>
232
- - [ ] Gaps parsed from UAT.md
233
- - [ ] Debug agents spawned in parallel
234
- - [ ] Root causes collected from all agents
235
- - [ ] UAT.md gaps updated with artifacts and missing
236
- - [ ] Debug sessions saved to ${DEBUG_DIR}/
237
- - [ ] Hand off to verify-work for automatic planning
238
- </success_criteria>
1
+ <purpose>
2
+ Orchestrate parallel debug agents to investigate UAT gaps and find root causes.
3
+
4
+ After UAT finds gaps, spawn one debug agent per gap. Each agent investigates autonomously with symptoms pre-filled from UAT. Collect root causes, update UAT.md gaps with diagnosis, then hand off to plan-phase --gaps with actual diagnoses.
5
+
6
+ Orchestrator stays lean: parse gaps, spawn agents, collect results, update UAT.
7
+ </purpose>
8
+
9
+ <available_agent_types>
10
+ Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
11
+ - gsd-debugger — Diagnoses and fixes issues
12
+ </available_agent_types>
13
+
14
+ <paths>
15
+ DEBUG_DIR=.planning/debug
16
+
17
+ Debug files use the `.planning/debug/` path (hidden directory with leading dot).
18
+ </paths>
19
+
20
+ <core_principle>
21
+ **Diagnose before planning fixes.**
22
+
23
+ UAT tells us WHAT is broken (symptoms). Debug agents find WHY (root cause). plan-phase --gaps then creates targeted fixes based on actual causes, not guesses.
24
+
25
+ Without diagnosis: "Comment doesn't refresh" → guess at fix → maybe wrong
26
+ With diagnosis: "Comment doesn't refresh" → "useEffect missing dependency" → precise fix
27
+ </core_principle>
28
+
29
+ <process>
30
+
31
+ <step name="parse_gaps">
32
+ **Extract gaps from UAT.md:**
33
+
34
+ Read the "Gaps" section (YAML format):
35
+ ```yaml
36
+ - truth: "Comment appears immediately after submission"
37
+ status: failed
38
+ reason: "User reported: works but doesn't show until I refresh the page"
39
+ severity: major
40
+ test: 2
41
+ artifacts: []
42
+ missing: []
43
+ ```
44
+
45
+ For each gap, also read the corresponding test from "Tests" section to get full context.
46
+
47
+ Build gap list:
48
+ ```
49
+ gaps = [
50
+ {truth: "Comment appears immediately...", severity: "major", test_num: 2, reason: "..."},
51
+ {truth: "Reply button positioned correctly...", severity: "minor", test_num: 5, reason: "..."},
52
+ ...
53
+ ]
54
+ ```
55
+ </step>
56
+
57
+ <step name="report_plan">
58
+ **Read worktree config:**
59
+
60
+ ```bash
61
+ USE_WORKTREES=$(gsd-sdk query config-get workflow.use_worktrees 2>/dev/null || echo "true")
62
+ ```
63
+
64
+ **Report diagnosis plan to user:**
65
+
66
+ ```
67
+ ## Diagnosing {N} Gaps
68
+
69
+ Spawning parallel debug agents to investigate root causes:
70
+
71
+ | Gap (Truth) | Severity |
72
+ |-------------|----------|
73
+ | Comment appears immediately after submission | major |
74
+ | Reply button positioned correctly | minor |
75
+ | Delete removes comment | blocker |
76
+
77
+ Each agent will:
78
+ 1. Create DEBUG-{slug}.md with symptoms pre-filled
79
+ 2. Investigate autonomously (read code, form hypotheses, test)
80
+ 3. Return root cause
81
+
82
+ This runs in parallel - all gaps investigated simultaneously.
83
+ ```
84
+ </step>
85
+
86
+ <step name="spawn_agents">
87
+ **Load agent skills:**
88
+
89
+ ```bash
90
+ AGENT_SKILLS_DEBUGGER=$(gsd-sdk query agent-skills gsd-debugger 2>/dev/null)
91
+ EXPECTED_BASE=$(git rev-parse HEAD)
92
+ ```
93
+
94
+ **Spawn debug agents in parallel:**
95
+
96
+ For each gap, fill the debug-subagent-prompt template and spawn:
97
+
98
+ ```
99
+ Task(
100
+ prompt=filled_debug_subagent_prompt + "\n\n<worktree_branch_check>\nFIRST ACTION: run git merge-base HEAD {EXPECTED_BASE} — if result differs from {EXPECTED_BASE}, run git reset --hard {EXPECTED_BASE} to correct the branch base (safe runs before any agent work). Then verify: if [ \"$(git rev-parse HEAD)\" != \"{EXPECTED_BASE}\" ]; then echo \"ERROR: Could not correct worktree base\"; exit 1; fi. Fixes EnterWorktree creating branches from main on all platforms.\n</worktree_branch_check>\n\n<files_to_read>\n- {phase_dir}/{phase_num}-UAT.md\n- .planning/STATE.md\n</files_to_read>\n${AGENT_SKILLS_DEBUGGER}",
101
+ subagent_type="gsd-debugger",
102
+ ${USE_WORKTREES !== "false" ? 'isolation="worktree",' : ''}
103
+ description="Debug: {truth_short}"
104
+ )
105
+ ```
106
+
107
+ **All agents spawn in single message** (parallel execution).
108
+
109
+ Template placeholders:
110
+ - `{truth}`: The expected behavior that failed
111
+ - `{expected}`: From UAT test
112
+ - `{actual}`: Verbatim user description from reason field
113
+ - `{errors}`: Any error messages from UAT (or "None reported")
114
+ - `{reproduction}`: "Test {test_num} in UAT"
115
+ - `{timeline}`: "Discovered during UAT"
116
+ - `{goal}`: `find_root_cause_only` (UAT flow - plan-phase --gaps handles fixes)
117
+ - `{slug}`: Generated from truth
118
+ </step>
119
+
120
+ <step name="collect_results">
121
+ **Collect root causes from agents:**
122
+
123
+ Each agent returns with:
124
+ ```
125
+ ## ROOT CAUSE FOUND
126
+
127
+ **Debug Session:** ${DEBUG_DIR}/{slug}.md
128
+
129
+ **Root Cause:** {specific cause with evidence}
130
+
131
+ **Evidence Summary:**
132
+ - {key finding 1}
133
+ - {key finding 2}
134
+ - {key finding 3}
135
+
136
+ **Files Involved:**
137
+ - {file1}: {what's wrong}
138
+ - {file2}: {related issue}
139
+
140
+ **Suggested Fix Direction:** {brief hint for plan-phase --gaps}
141
+ ```
142
+
143
+ Parse each return to extract:
144
+ - root_cause: The diagnosed cause
145
+ - files: Files involved
146
+ - debug_path: Path to debug session file
147
+ - suggested_fix: Hint for gap closure plan
148
+
149
+ If agent returns `## INVESTIGATION INCONCLUSIVE`:
150
+ - root_cause: "Investigation inconclusive - manual review needed"
151
+ - Note which issue needs manual attention
152
+ - Include remaining possibilities from agent return
153
+ </step>
154
+
155
+ <step name="update_uat">
156
+ **Update UAT.md gaps with diagnosis:**
157
+
158
+ For each gap in the Gaps section, add artifacts and missing fields:
159
+
160
+ ```yaml
161
+ - truth: "Comment appears immediately after submission"
162
+ status: failed
163
+ reason: "User reported: works but doesn't show until I refresh the page"
164
+ severity: major
165
+ test: 2
166
+ root_cause: "useEffect in CommentList.tsx missing commentCount dependency"
167
+ artifacts:
168
+ - path: "src/components/CommentList.tsx"
169
+ issue: "useEffect missing dependency"
170
+ missing:
171
+ - "Add commentCount to useEffect dependency array"
172
+ - "Trigger re-render when new comment added"
173
+ debug_session: .planning/debug/comment-not-refreshing.md
174
+ ```
175
+
176
+ Update status in frontmatter to "diagnosed".
177
+
178
+ Commit the updated UAT.md:
179
+ ```bash
180
+ gsd-sdk query commit "docs({phase_num}): add root causes from diagnosis" ".planning/phases/XX-name/{phase_num}-UAT.md"
181
+ ```
182
+ </step>
183
+
184
+ <step name="report_results">
185
+ **Report diagnosis results and hand off:**
186
+
187
+ Display:
188
+ ```
189
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
190
+ GSD ► DIAGNOSIS COMPLETE
191
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
192
+
193
+ | Gap (Truth) | Root Cause | Files |
194
+ |-------------|------------|-------|
195
+ | Comment appears immediately | useEffect missing dependency | CommentList.tsx |
196
+ | Reply button positioned correctly | CSS flex order incorrect | ReplyButton.tsx |
197
+ | Delete removes comment | API missing auth header | api/comments.ts |
198
+
199
+ Debug sessions: ${DEBUG_DIR}/
200
+
201
+ Proceeding to plan fixes...
202
+ ```
203
+
204
+ Return to verify-work orchestrator for automatic planning.
205
+ Do NOT offer manual next steps - verify-work handles the rest.
206
+ </step>
207
+
208
+ </process>
209
+
210
+ <context_efficiency>
211
+ Agents start with symptoms pre-filled from UAT (no symptom gathering).
212
+ Agents only diagnose—plan-phase --gaps handles fixes (no fix application).
213
+ </context_efficiency>
214
+
215
+ <failure_handling>
216
+ **Agent fails to find root cause:**
217
+ - Mark gap as "needs manual review"
218
+ - Continue with other gaps
219
+ - Report incomplete diagnosis
220
+
221
+ **Agent times out:**
222
+ - Check DEBUG-{slug}.md for partial progress
223
+ - Can resume with /gsd-debug
224
+
225
+ **All agents fail:**
226
+ - Something systemic (permissions, git, etc.)
227
+ - Report for manual investigation
228
+ - Fall back to plan-phase --gaps without root causes (less precise)
229
+ </failure_handling>
230
+
231
+ <success_criteria>
232
+ - [ ] Gaps parsed from UAT.md
233
+ - [ ] Debug agents spawned in parallel
234
+ - [ ] Root causes collected from all agents
235
+ - [ ] UAT.md gaps updated with artifacts and missing
236
+ - [ ] Debug sessions saved to ${DEBUG_DIR}/
237
+ - [ ] Hand off to verify-work for automatic planning
238
+ </success_criteria>
@@ -214,6 +214,8 @@ Write `.planning/phases/XX-name/DISCOVERY.md`:
214
214
  After creating DISCOVERY.md, check confidence level.
215
215
 
216
216
  If confidence is LOW:
217
+
218
+ **Text mode (`workflow.text_mode: true` in config or `--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS` OR `text_mode` from init JSON is `true`. When TEXT_MODE is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for non-Antigravity runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
217
219
  Use AskUserQuestion:
218
220
 
219
221
  - header: "Low Conf."
@@ -64,9 +64,9 @@ plain-text numbered list and ask the user to type their choice number.
64
64
  Phase number from argument (required).
65
65
 
66
66
  ```bash
67
- .agent/skills/gsd/bin/gsd-tools.cjs" init phase-op "${PHASE}")
67
+ INIT=$(gsd-sdk query init.phase-op "${PHASE}")
68
68
  if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
69
- .agent/skills/gsd/bin/gsd-tools.cjs" agent-skills gsd-assumptions-analyzer 2>/dev/null)
69
+ AGENT_SKILLS_ANALYZER=$(gsd-sdk query agent-skills gsd-assumptions-analyzer 2>/dev/null)
70
70
  ```
71
71
 
72
72
  Parse JSON for: `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`,
@@ -171,7 +171,7 @@ Structure the extracted information for use in assumption generation.
171
171
  Check if any pending todos are relevant to this phase's scope.
172
172
 
173
173
  ```bash
174
- .agent/skills/gsd/bin/gsd-tools.cjs" todo match-phase "${PHASE_NUMBER}")
174
+ TODO_MATCHES=$(gsd-sdk query todo.match-phase "${PHASE_NUMBER}")
175
175
  ```
176
176
 
177
177
  Parse JSON for: `todo_count`, `matches[]`.
@@ -548,7 +548,7 @@ Write file.
548
548
  Commit phase context and discussion log:
549
549
 
550
550
  ```bash
551
- .agent/skills/gsd/bin/gsd-tools.cjs" commit "docs(${padded_phase}): capture phase context (assumptions mode)" --files "${phase_dir}/${padded_phase}-CONTEXT.md" "${phase_dir}/${padded_phase}-DISCUSSION-LOG.md"
551
+ gsd-sdk query commit "docs(${padded_phase}): capture phase context (assumptions mode)" "${phase_dir}/${padded_phase}-CONTEXT.md" "${phase_dir}/${padded_phase}-DISCUSSION-LOG.md"
552
552
  ```
553
553
 
554
554
  Confirm: "Committed: docs(${padded_phase}): capture phase context (assumptions mode)"
@@ -558,7 +558,7 @@ Confirm: "Committed: docs(${padded_phase}): capture phase context (assumptions m
558
558
  Update STATE.md with session info:
559
559
 
560
560
  ```bash
561
- .agent/skills/gsd/bin/gsd-tools.cjs" state record-session \
561
+ gsd-sdk query state.record-session \
562
562
  --stopped-at "Phase ${PHASE} context gathered (assumptions mode)" \
563
563
  --resume-file "${phase_dir}/${padded_phase}-CONTEXT.md"
564
564
  ```
@@ -566,7 +566,7 @@ Update STATE.md with session info:
566
566
  Commit STATE.md:
567
567
 
568
568
  ```bash
569
- .agent/skills/gsd/bin/gsd-tools.cjs" commit "docs(state): record phase ${PHASE} context session" --files .planning/STATE.md
569
+ gsd-sdk query commit "docs(state): record phase ${PHASE} context session" .planning/STATE.md
570
570
  ```
571
571
  </step>
572
572
 
@@ -593,7 +593,7 @@ Created: .planning/phases/${PADDED_PHASE}-${SLUG}/${PADDED_PHASE}-CONTEXT.md
593
593
 
594
594
  ---
595
595
 
596
- ## ▶ Next Up
596
+ ## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}
597
597
 
598
598
  **Phase ${PHASE}: {phase_name}** — {Goal from ROADMAP.md}
599
599
 
@@ -619,18 +619,18 @@ Check for auto-advance trigger:
619
619
  2. Sync chain flag:
620
620
  ```bash
621
621
  if [[ ! "$ARGUMENTS" =~ --auto ]]; then
622
- .agent/skills/gsd/bin/gsd-tools.cjs" config-set workflow._auto_chain_active false 2>/dev/null
622
+ gsd-sdk query config-set workflow._auto_chain_active false 2>/dev/null
623
623
  fi
624
624
  ```
625
625
  3. Read chain flag and user preference:
626
626
  ```bash
627
- .agent/skills/gsd/bin/gsd-tools.cjs" config-get workflow._auto_chain_active 2>/dev/null || echo "false")
628
- .agent/skills/gsd/bin/gsd-tools.cjs" config-get workflow.auto_advance 2>/dev/null || echo "false")
627
+ AUTO_CHAIN=$(gsd-sdk query config-get workflow._auto_chain_active 2>/dev/null || echo "false")
628
+ AUTO_CFG=$(gsd-sdk query config-get workflow.auto_advance 2>/dev/null || echo "false")
629
629
  ```
630
630
 
631
631
  **If `--auto` flag present AND `AUTO_CHAIN` is not true:**
632
632
  ```bash
633
- .agent/skills/gsd/bin/gsd-tools.cjs" config-set workflow._auto_chain_active true
633
+ gsd-sdk query config-set workflow._auto_chain_active true
634
634
  ```
635
635
 
636
636
  **If `--auto` flag present OR `AUTO_CHAIN` is true OR `AUTO_CFG` is true:**