gsd-antigravity-kit 2.0.1 → 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 (251) 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 +1 -1
@@ -113,6 +113,15 @@ Phase: "API documentation"
113
113
 
114
114
  <answer_validation>
115
115
  **IMPORTANT: Answer validation** — After every AskUserQuestion call, check if the response is empty or whitespace-only. If so:
116
+
117
+ **Exception — "Other" with empty text:** If the user selected "Other" (or "Chat more") and the response body is empty or whitespace-only, this is NOT an empty answer — it is a signal that the user wants to type freeform input. In this case:
118
+ 1. Output a single plain-text line: "What would you like to discuss?"
119
+ 2. STOP generating. Do not call any tools. Do not output any further text.
120
+ 3. Wait for the user's next message.
121
+ 4. After receiving their message, reflect it back and continue.
122
+ Do NOT retry the AskUserQuestion or generate more questions when "Other" is selected with empty text.
123
+
124
+ **All other empty responses:** If the response is empty or whitespace-only (and the user did NOT select "Other"):
116
125
  1. Retry the question once with the same parameters
117
126
  2. If still empty, present the options as a plain-text numbered list and ask the user to type their choice number
118
127
  Never proceed with an empty answer.
@@ -125,7 +134,7 @@ cannot forward TUI menu selections back to the host.
125
134
 
126
135
  Enable text mode:
127
136
  - Per-session: pass `--text` flag to any command (e.g., `/gsd-discuss-phase --text`)
128
- - Per-project: `gsd-tools config-set workflow.text_mode true`
137
+ - Per-project: `gsd-sdk query config-set workflow.text_mode true`
129
138
 
130
139
  Text mode applies to ALL workflows in the session, not just discuss-phase.
131
140
  </answer_validation>
@@ -138,9 +147,9 @@ Text mode applies to ALL workflows in the session, not just discuss-phase.
138
147
  Phase number from argument (required).
139
148
 
140
149
  ```bash
141
- .agent/skills/gsd/bin/gsd-tools.cjs" init phase-op "${PHASE}")
150
+ INIT=$(gsd-sdk query init.phase-op "${PHASE}")
142
151
  if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
143
- .agent/skills/gsd/bin/gsd-tools.cjs" agent-skills gsd-advisor 2>/dev/null)
152
+ AGENT_SKILLS_ADVISOR=$(gsd-sdk query agent-skills gsd-advisor 2>/dev/null)
144
153
  ```
145
154
 
146
155
  Parse JSON for: `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `has_research`, `has_context`, `has_plans`, `has_verification`, `plan_count`, `roadmap_exists`, `planning_exists`, `response_language`.
@@ -162,6 +171,13 @@ Exit workflow.
162
171
  - Read and execute @references/workflows/discuss-phase-power.md end-to-end
163
172
  - Do not continue with the steps below
164
173
 
174
+ **All mode** — If `--all` is present in ARGUMENTS:
175
+ - In `present_gray_areas`: auto-select ALL gray areas without asking the user (skips the AskUserQuestion selection step)
176
+ - Discussion for each area proceeds fully interactively (user drives the conversation for every area)
177
+ - Does NOT auto-advance to plan-phase afterward — use `--chain` or `--auto` if you want auto-advance
178
+ - Log: `[--all] Auto-selected all gray areas: [list area names].`
179
+ - This is the "discuss everything" shortcut: skip the selection friction, keep full interactive control
180
+
165
181
  **Auto mode** — If `--auto` is present in ARGUMENTS:
166
182
  - In `check_existing`: auto-select "Skip" (if context exists) or continue without prompting (if no context/plans)
167
183
  - In `present_gray_areas`: auto-select ALL gray areas without asking the user
@@ -196,7 +212,30 @@ This step cannot be skipped. Before proceeding to `check_existing` or any other
196
212
 
197
213
  Write these answers inline before continuing. If a blocking anti-pattern cannot be answered from the context in `.continue-here.md`, stop and ask the user for clarification.
198
214
 
199
- **If no `.continue-here.md` exists, or no `blocking` rows are found:** Proceed directly to `check_existing`.
215
+ **If no `.continue-here.md` exists, or no `blocking` rows are found:** Proceed directly to `check_spec`.
216
+ </step>
217
+
218
+ <step name="check_spec">
219
+ Check if a SPEC.md (from `/gsd-spec-phase`) exists for this phase. SPEC.md locks requirements before implementation decisions — if present, this discussion focuses on HOW to implement, not WHAT to build.
220
+
221
+ ```bash
222
+ ls ${phase_dir}/*-SPEC.md 2>/dev/null | grep -v AI-SPEC | head -1 || true
223
+ ```
224
+
225
+ **If SPEC.md is found:**
226
+ 1. Read the SPEC.md file.
227
+ 2. Count the number of requirements (numbered items in the `## Requirements` section).
228
+ 3. Display:
229
+ ```
230
+ Found SPEC.md — {N} requirements locked. Focusing on implementation decisions.
231
+ ```
232
+ 4. Set internal flag `spec_loaded = true`.
233
+ 5. Store the requirements, boundaries, and acceptance criteria from SPEC.md as `<locked_requirements>` — these flow directly into CONTEXT.md without re-asking.
234
+ 6. Continue to `check_existing`.
235
+
236
+ **If no SPEC.md is found:** Continue to `check_existing` with `spec_loaded = false` (default behavior unchanged).
237
+
238
+ **Note:** SPEC.md files named `AI-SPEC.md` (from `/gsd-ai-integration-phase`) are excluded — those serve a different purpose.
200
239
  </step>
201
240
 
202
241
  <step name="check_existing">
@@ -309,9 +348,40 @@ Structure the extracted information:
309
348
  </prior_decisions>
310
349
  ```
311
350
 
351
+ **Step 4: Load spike/sketch findings (if they exist)**
352
+ ```bash
353
+ # Check for spike/sketch findings skills (project-local)
354
+ SPIKE_FINDINGS=$(ls ./.antigravity/skills/spike-findings-*/SKILL.md 2>/dev/null | head -1)
355
+ SKETCH_FINDINGS=$(ls ./.antigravity/skills/sketch-findings-*/SKILL.md 2>/dev/null | head -1)
356
+
357
+ # Also check for raw spikes/sketches not yet wrapped up
358
+ RAW_SPIKES=$(ls .planning/spikes/MANIFEST.md 2>/dev/null)
359
+ RAW_SKETCHES=$(ls .planning/sketches/MANIFEST.md 2>/dev/null)
360
+ ```
361
+
362
+ If spike/sketch findings skills exist, read their SKILL.md and reference files. Extract:
363
+ - **Validated patterns** — what was proven to work (use these, don't re-explore)
364
+ - **Landmines** — what was proven NOT to work (avoid these)
365
+ - **Constraints** — hard limits discovered (rate limits, API gaps, library limitations)
366
+ - **Design decisions** — winning visual directions, CSS patterns, layout choices
367
+
368
+ Add to `<prior_decisions>`:
369
+ ```
370
+ ## From Spike Experiments
371
+ - [Validated pattern or constraint from spike findings]
372
+
373
+ ## From Design Sketches
374
+ - [Design decision or visual direction from sketch findings]
375
+ ```
376
+
377
+ If raw spikes/sketches exist but no findings skill, note in output:
378
+ ```
379
+ ⚠ Unpackaged spikes/sketches detected — run `/gsd-spike-wrap-up` or `/gsd-sketch-wrap-up` to make findings available to planning agents.
380
+ ```
381
+
312
382
  **Usage in subsequent steps:**
313
- - `analyze_phase`: Skip gray areas already decided in prior phases
314
- - `present_gray_areas`: Annotate options with prior decisions ("You chose X in Phase 5")
383
+ - `analyze_phase`: Skip gray areas already decided in prior phases or validated by spikes/sketches
384
+ - `present_gray_areas`: Annotate options with prior decisions ("You chose X in Phase 5") and spike/sketch findings ("Spike 002 validated this approach")
315
385
  - `discuss_areas`: Pre-fill answers or flag conflicts ("This contradicts Phase 3 — same here or different?")
316
386
 
317
387
  **If no prior context exists:** Continue without — this is expected for early phases.
@@ -322,7 +392,7 @@ Check if any pending todos are relevant to this phase's scope. Surfaces backlog
322
392
 
323
393
  **Load and match todos:**
324
394
  ```bash
325
- .agent/skills/gsd/bin/gsd-tools.cjs" todo match-phase "${PHASE_NUMBER}")
395
+ TODO_MATCHES=$(gsd-sdk query todo.match-phase "${PHASE_NUMBER}")
326
396
  ```
327
397
 
328
398
  Parse JSON for: `todo_count`, `matches[]` (each with `file`, `title`, `area`, `score`, `reasons`).
@@ -421,6 +491,12 @@ Analyze the phase to identify gray areas worth discussing. **Use both `prior_dec
421
491
  - These are **pre-answered** — don't re-ask unless this phase has conflicting needs
422
492
  - Note applicable prior decisions for use in presentation
423
493
 
494
+ 2b. **SPEC.md awareness** — If `spec_loaded = true` (SPEC.md was found in `check_spec`):
495
+ - The `<locked_requirements>` from SPEC.md are pre-answered: Goal, Boundaries, Constraints, Acceptance Criteria.
496
+ - Do NOT generate gray areas about WHAT to build or WHY — those are locked.
497
+ - Only generate gray areas about HOW to implement: technical approach, library choices, UX/UI patterns, interaction details, error handling style.
498
+ - When presenting gray areas, include a note: "Requirements are locked by SPEC.md — discussing implementation decisions only."
499
+
424
500
  3. **Gray areas by category** — For each relevant category (UI, UX, Behavior, Empty States, Content), identify 1-2 specific ambiguities that would change implementation. **Annotate with code context where relevant** (e.g., "You already have a Card component" or "No existing pattern for this").
425
501
 
426
502
  4. **Skip assessment** — If no meaningful gray areas exist (pure infrastructure, clear-cut implementation, or all already decided in prior phases), the phase may not need discussion.
@@ -447,11 +523,39 @@ Check if advisor mode should activate:
447
523
 
448
524
  3. Resolve model for advisor agents:
449
525
  ```bash
450
- .agent/skills/gsd/bin/gsd-tools.cjs" resolve-model gsd-advisor-researcher --raw)
526
+ ADVISOR_MODEL=$(gsd-sdk query resolve-model gsd-advisor-researcher --raw)
451
527
  ```
452
528
 
453
529
  If ADVISOR_MODE is false, skip all advisor-specific steps — workflow proceeds with existing conversational flow unchanged.
454
530
 
531
+ **User Profile Language Detection:**
532
+
533
+ Check USER-PROFILE.md for communication preferences that indicate a non-technical product owner:
534
+
535
+ ```bash
536
+ PROFILE_CONTENT=$(cat "C:/projects/GSD-Antigravity/.antigravity/get-shit-done/USER-PROFILE.md" 2>/dev/null || true)
537
+ ```
538
+
539
+ Set NON_TECHNICAL_OWNER = true if ANY of the following are present in USER-PROFILE.md:
540
+ - `learning_style: guided`
541
+ - The word `jargon` appears in a `frustration_triggers` section
542
+ - `explanation_depth: practical-detailed` (without a technical modifier)
543
+ - `explanation_depth: high-level`
544
+
545
+ NON_TECHNICAL_OWNER = false if USER-PROFILE.md does not exist or none of the above signals are present.
546
+
547
+ When NON_TECHNICAL_OWNER is true, reframe gray area labels and descriptions in product-outcome language before presenting them to the user. Preserve the same underlying decision — only change the framing:
548
+ - Technical implementation term → outcome the user will experience
549
+ - "Token architecture" → "Color system: which approach prevents the dark theme from flashing white on open"
550
+ - "CSS variable strategy" → "Theme colors: how your brand colors stay consistent in both light and dark mode"
551
+ - "Component API surface area" → "How the building blocks connect: how tightly coupled should these parts be"
552
+ - "Caching strategy: SWR vs React Query" → "Loading speed: should screens show saved data right away or wait for fresh data"
553
+ - All decisions stay the same. Only the question language adapts.
554
+
555
+ This reframing applies to:
556
+ 1. Gray area labels and descriptions in `present_gray_areas`
557
+ 2. Advisor research rationale rewrites in `advisor_research` synthesis
558
+
455
559
  **Output your analysis internally, then present to user.**
456
560
 
457
561
  Example analysis for "Post Feed" phase (with code and prior context):
@@ -485,7 +589,7 @@ We'll clarify HOW to implement this.
485
589
  - [Decision from Phase M that applies here]
486
590
  ```
487
591
 
488
- **If `--auto`:** Auto-select ALL gray areas. Log: `[auto] Selected all gray areas: [list area names].` Skip the AskUserQuestion below and continue directly to discuss_areas with all areas selected.
592
+ **If `--auto` or `--all`:** Auto-select ALL gray areas. Log: `[--auto/--all] Selected all gray areas: [list area names].` Skip the AskUserQuestion below and continue directly to discuss_areas with all areas selected.
489
593
 
490
594
  **Otherwise, use AskUserQuestion (multiSelect: true):**
491
595
  - header: "Discuss"
@@ -581,6 +685,7 @@ After user selects gray areas in present_gray_areas, spawn parallel research age
581
685
  If agent returned too many, trim least viable. If too few, accept as-is.
582
686
  d. Rewrite rationale paragraph to weave in project context and ongoing discussion context that the agent did not have access to
583
687
  e. If agent returned only 1 option, convert from table format to direct recommendation: "Standard approach for {area}: {option}. {rationale}"
688
+ f. **If NON_TECHNICAL_OWNER is true:** After completing steps a–e, apply a plain language rewrite to the rationale paragraph. Replace implementation-level terms with outcome descriptions the user can reason about without technical context. The table option names may also be rewritten in plain language if they are implementation terms — the Recommendation column value and the table structure remain intact. Do not remove detail; translate it. Example: "SWR uses stale-while-revalidate to serve cached responses immediately" → "This approach shows you something right away, then quietly updates in the background — users see data instantly."
584
689
 
585
690
  4. Store synthesized tables for use in discuss_areas.
586
691
 
@@ -721,7 +826,7 @@ In `--auto` mode, the discuss step MUST complete in a **single pass**. After wri
721
826
 
722
827
  Check the pass cap from config:
723
828
  ```bash
724
- .agent/skills/gsd/bin/gsd-tools.cjs" config-get workflow.max_discuss_passes 2>/dev/null || echo "3")
829
+ MAX_PASSES=$(gsd-sdk query config-get workflow.max_discuss_passes 2>/dev/null || echo "3")
725
830
  ```
726
831
 
727
832
  If you have already written and committed CONTEXT.md, the discuss step is complete. Move on.
@@ -870,6 +975,12 @@ mkdir -p ".planning/phases/${padded_phase}-${phase_slug}"
870
975
 
871
976
  **File location:** `${phase_dir}/${padded_phase}-CONTEXT.md`
872
977
 
978
+ **SPEC.md integration** — If `spec_loaded = true`:
979
+ - Add a `<spec_lock>` section immediately after `<domain>` (see template below).
980
+ - Add the SPEC.md file to `<canonical_refs>` with note "Locked requirements — MUST read before planning".
981
+ - Do NOT duplicate requirements text from SPEC.md into `<decisions>` — agents read SPEC.md directly.
982
+ - The `<decisions>` section contains only implementation decisions from this discussion.
983
+
873
984
  **Structure the content by what was discussed:**
874
985
 
875
986
  ```markdown
@@ -885,6 +996,19 @@ mkdir -p ".planning/phases/${padded_phase}-${phase_slug}"
885
996
 
886
997
  </domain>
887
998
 
999
+ [If spec_loaded = true, insert this section:]
1000
+ <spec_lock>
1001
+ ## Requirements (locked via SPEC.md)
1002
+
1003
+ **{N} requirements are locked.** See `{padded_phase}-SPEC.md` for full requirements, boundaries, and acceptance criteria.
1004
+
1005
+ Downstream agents MUST read `{padded_phase}-SPEC.md` before planning or implementing. Requirements are not duplicated here.
1006
+
1007
+ **In scope (from SPEC.md):** [copy the "In scope" bullet list from SPEC.md Boundaries]
1008
+ **Out of scope (from SPEC.md):** [copy the "Out of scope" bullet list from SPEC.md Boundaries]
1009
+
1010
+ </spec_lock>
1011
+
888
1012
  <decisions>
889
1013
  ## Implementation Decisions
890
1014
 
@@ -993,7 +1117,7 @@ Created: .planning/phases/${PADDED_PHASE}-${SLUG}/${PADDED_PHASE}-CONTEXT.md
993
1117
 
994
1118
  ---
995
1119
 
996
- ## ▶ Next Up
1120
+ ## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}
997
1121
 
998
1122
  **Phase ${PHASE}: [Name]** — [Goal from ROADMAP.md]
999
1123
 
@@ -1067,7 +1191,7 @@ rm -f "${phase_dir}/${padded_phase}-DISCUSS-CHECKPOINT.json"
1067
1191
  Commit phase context and discussion log:
1068
1192
 
1069
1193
  ```bash
1070
- .agent/skills/gsd/bin/gsd-tools.cjs" commit "docs(${padded_phase}): capture phase context" --files "${phase_dir}/${padded_phase}-CONTEXT.md" "${phase_dir}/${padded_phase}-DISCUSSION-LOG.md"
1194
+ gsd-sdk query commit "docs(${padded_phase}): capture phase context" "${phase_dir}/${padded_phase}-CONTEXT.md" "${phase_dir}/${padded_phase}-DISCUSSION-LOG.md"
1071
1195
  ```
1072
1196
 
1073
1197
  Confirm: "Committed: docs(${padded_phase}): capture phase context"
@@ -1077,7 +1201,7 @@ Confirm: "Committed: docs(${padded_phase}): capture phase context"
1077
1201
  Update STATE.md with session info:
1078
1202
 
1079
1203
  ```bash
1080
- .agent/skills/gsd/bin/gsd-tools.cjs" state record-session \
1204
+ gsd-sdk query state.record-session \
1081
1205
  --stopped-at "Phase ${PHASE} context gathered" \
1082
1206
  --resume-file "${phase_dir}/${padded_phase}-CONTEXT.md"
1083
1207
  ```
@@ -1085,29 +1209,29 @@ Update STATE.md with session info:
1085
1209
  Commit STATE.md:
1086
1210
 
1087
1211
  ```bash
1088
- .agent/skills/gsd/bin/gsd-tools.cjs" commit "docs(state): record phase ${PHASE} context session" --files .planning/STATE.md
1212
+ gsd-sdk query commit "docs(state): record phase ${PHASE} context session" .planning/STATE.md
1089
1213
  ```
1090
1214
  </step>
1091
1215
 
1092
1216
  <step name="auto_advance">
1093
1217
  Check for auto-advance trigger:
1094
1218
 
1095
- 1. Parse `--auto` and `--chain` flags from $ARGUMENTS
1219
+ 1. Parse `--auto` and `--chain` flags from $ARGUMENTS. Note: --all is NOT an auto-advance trigger — it only affects area selection. A session with `--all` but without `--auto` or `--chain` returns to manual next-steps after discussion completes.
1096
1220
  2. **Sync chain flag with intent** — if user invoked manually (no `--auto` and no `--chain`), clear the ephemeral chain flag from any previous interrupted `--auto` chain. This does NOT touch `workflow.auto_advance` (the user's persistent settings preference):
1097
1221
  ```bash
1098
1222
  if [[ ! "$ARGUMENTS" =~ --auto ]] && [[ ! "$ARGUMENTS" =~ --chain ]]; then
1099
- .agent/skills/gsd/bin/gsd-tools.cjs" config-set workflow._auto_chain_active false 2>/dev/null
1223
+ gsd-sdk query config-set workflow._auto_chain_active false 2>/dev/null
1100
1224
  fi
1101
1225
  ```
1102
1226
  3. Read both the chain flag and user preference:
1103
1227
  ```bash
1104
- .agent/skills/gsd/bin/gsd-tools.cjs" config-get workflow._auto_chain_active 2>/dev/null || echo "false")
1105
- .agent/skills/gsd/bin/gsd-tools.cjs" config-get workflow.auto_advance 2>/dev/null || echo "false")
1228
+ AUTO_CHAIN=$(gsd-sdk query config-get workflow._auto_chain_active 2>/dev/null || echo "false")
1229
+ AUTO_CFG=$(gsd-sdk query config-get workflow.auto_advance 2>/dev/null || echo "false")
1106
1230
  ```
1107
1231
 
1108
1232
  **If `--auto` or `--chain` flag present AND `AUTO_CHAIN` is not true:** Persist chain flag to config (handles direct usage without new-project):
1109
1233
  ```bash
1110
- .agent/skills/gsd/bin/gsd-tools.cjs" config-set workflow._auto_chain_active true
1234
+ gsd-sdk query config-set workflow._auto_chain_active true
1111
1235
  ```
1112
1236
 
1113
1237
  **If `--auto` flag present OR `--chain` flag present OR `AUTO_CHAIN` is true OR `AUTO_CFG` is true:**
@@ -11,6 +11,8 @@ Read all files referenced by the invoking prompt's execution_context before star
11
11
  <step name="validate">
12
12
  **Check for input.**
13
13
 
14
+
15
+ **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.
14
16
  If `$ARGUMENTS` is empty, ask via AskUserQuestion:
15
17
 
16
18
  ```
@@ -24,7 +26,7 @@ Wait for response before continuing.
24
26
  **Check if project exists.**
25
27
 
26
28
  ```bash
27
- .agent/skills/gsd/bin/gsd-tools.cjs" state load 2>/dev/null)
29
+ INIT=$(gsd-sdk query state.load 2>/dev/null)
28
30
  ```
29
31
 
30
32
  Track whether `.planning/` exists — some routes require it, others don't.
@@ -40,6 +42,10 @@ Evaluate `$ARGUMENTS` against these routing rules. Apply the **first matching**
40
42
  | Starting a new project, "set up", "initialize" | `/gsd-new-project` | Needs full project initialization |
41
43
  | Mapping or analyzing an existing codebase | `/gsd-map-codebase` | Codebase discovery |
42
44
  | A bug, error, crash, failure, or something broken | `/gsd-debug` | Needs systematic investigation |
45
+ | Spiking, "test if", "will this work", "experiment", "prove this out", validate feasibility | `/gsd-spike` | Throwaway experiment to validate feasibility |
46
+ | Sketching, "mockup", "what would this look like", "prototype the UI", "design this", explore visual direction | `/gsd-sketch` | Throwaway HTML mockups to explore design |
47
+ | Wrapping up spikes, "package the spikes", "consolidate spike findings" | `/gsd-spike-wrap-up` | Package spike findings into reusable skill |
48
+ | Wrapping up sketches, "package the designs", "consolidate sketch findings" | `/gsd-sketch-wrap-up` | Package sketch findings into reusable skill |
43
49
  | Exploring, researching, comparing, or "how does X work" | `/gsd-research-phase` | Domain research before planning |
44
50
  | Discussing vision, "how should X look", brainstorming | `/gsd-discuss-phase` | Needs context gathering |
45
51
  | A complex task: refactoring, migration, multi-file architecture, system redesign | `/gsd-add-phase` | Needs a full phase with plan/build cycle |
@@ -54,7 +60,7 @@ Evaluate `$ARGUMENTS` against these routing rules. Apply the **first matching**
54
60
  | Completing a milestone, shipping, releasing | `/gsd-complete-milestone` | Milestone lifecycle |
55
61
  | A specific, actionable, small task (add feature, fix typo, update config) | `/gsd-quick` | Self-contained, single executor |
56
62
 
57
- **Requires `.planning/` directory:** All routes except `/gsd-new-project`, `/gsd-map-codebase`, `/gsd-help`, and `/gsd-join-discord`. If the project doesn't exist and the route requires it, suggest `/gsd-new-project` first.
63
+ **Requires `.planning/` directory:** All routes except `/gsd-new-project`, `/gsd-map-codebase`, `/gsd-spike`, `/gsd-sketch`, `/gsd-help`, and `/gsd-join-discord`. If the project doesn't exist and the route requires it, suggest `/gsd-new-project` first.
58
64
 
59
65
  **Ambiguity handling:** If the text could reasonably match multiple routes, ask the user via AskUserQuestion with the top 2-3 options. For example:
60
66
 
@@ -14,9 +14,9 @@ Valid GSD subagent types (use exact names — do not fall back to 'general-purpo
14
14
  Load docs-update context:
15
15
 
16
16
  ```bash
17
- .agent/skills/gsd/bin/gsd-tools.cjs" docs-init)
17
+ INIT=$(gsd-sdk query docs-init)
18
18
  if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
19
- .agent/skills/gsd/bin/gsd-tools.cjs" agent-skills gsd-doc-writer 2>/dev/null)
19
+ AGENT_SKILLS=$(gsd-sdk query agent-skills gsd-doc-writer 2>/dev/null)
20
20
  ```
21
21
 
22
22
  Extract from init JSON:
@@ -84,6 +84,8 @@ Assemble the complete doc queue from always-on docs plus conditional docs from c
84
84
  If CONTRIBUTING.md is in the conditional queue AND does NOT appear in the `existing_docs` array from init JSON:
85
85
 
86
86
  1. If `--force` is present in `$ARGUMENTS`: skip this check, include CONTRIBUTING.md in the queue.
87
+
88
+ **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.
87
89
  2. Otherwise, use AskUserQuestion to confirm:
88
90
 
89
91
  ```
@@ -1052,7 +1054,7 @@ Only run this step if `commit_docs` is `true` from the init JSON. If `commit_doc
1052
1054
  Assemble the list of files that were actually generated (do not include files that failed or were skipped):
1053
1055
 
1054
1056
  ```bash
1055
- .agent/skills/gsd/bin/gsd-tools.cjs" commit "docs: generate project documentation" \
1057
+ gsd-sdk query commit "docs: generate project documentation" \
1056
1058
  --files README.md docs/ARCHITECTURE.md docs/CONFIGURATION.md docs/GETTING-STARTED.md docs/DEVELOPMENT.md docs/TESTING.md
1057
1059
  # Append any conditional docs that were generated:
1058
1060
  # --files ... docs/API.md docs/DEPLOYMENT.md CONTRIBUTING.md
@@ -0,0 +1,155 @@
1
+ <purpose>
2
+ Retroactive audit of an implemented AI phase's evaluation coverage. Standalone command that works on any GSD-managed AI phase. Produces a scored EVAL-REVIEW.md with gap analysis and remediation plan.
3
+
4
+ Use after /gsd-execute-phase to verify that the evaluation strategy from AI-SPEC.md was actually implemented. Mirrors the pattern of /gsd-ui-review and /gsd-validate-phase.
5
+ </purpose>
6
+
7
+ <required_reading>
8
+ @references/docs/ai-evals.md
9
+ </required_reading>
10
+
11
+ <process>
12
+
13
+ ## 0. Initialize
14
+
15
+ ```bash
16
+ INIT=$(gsd-sdk query init.phase-op "${PHASE_ARG}")
17
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
18
+ ```
19
+
20
+ Parse: `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `commit_docs`.
21
+
22
+ ```bash
23
+ AUDITOR_MODEL=$(gsd-sdk query resolve-model gsd-eval-auditor 2>/dev/null | jq -r '.model' 2>/dev/null || true)
24
+ ```
25
+
26
+ Display banner:
27
+ ```
28
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
29
+ GSD ► EVAL AUDIT — PHASE {N}: {name}
30
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
31
+ ```
32
+
33
+ ## 1. Detect Input State
34
+
35
+ ```bash
36
+ SUMMARY_FILES=$(ls "${PHASE_DIR}"/*-SUMMARY.md 2>/dev/null)
37
+ AI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-AI-SPEC.md 2>/dev/null | head -1)
38
+ EVAL_REVIEW_FILE=$(ls "${PHASE_DIR}"/*-EVAL-REVIEW.md 2>/dev/null | head -1)
39
+ ```
40
+
41
+ **State A** — AI-SPEC.md + SUMMARY.md exist: Full audit against spec
42
+ **State B** — SUMMARY.md exists, no AI-SPEC.md: Audit against general best practices
43
+ **State C** — No SUMMARY.md: Exit — "Phase {N} not executed. Run /gsd-execute-phase {N} first."
44
+
45
+
46
+ **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.
47
+ **If `EVAL_REVIEW_FILE` non-empty:** Use AskUserQuestion:
48
+ - header: "Existing Eval Review"
49
+ - question: "EVAL-REVIEW.md already exists for Phase {N}."
50
+ - options:
51
+ - "Re-audit — run fresh audit"
52
+ - "View — display current review and exit"
53
+
54
+ If "View": display file, exit.
55
+ If "Re-audit": continue.
56
+
57
+ **If State B (no AI-SPEC.md):** Warn:
58
+ ```
59
+ No AI-SPEC.md found for Phase {N}.
60
+ Audit will evaluate against general AI eval best practices rather than a phase-specific plan.
61
+ Consider running /gsd-ai-integration-phase {N} before implementation next time.
62
+ ```
63
+ Continue (non-blocking).
64
+
65
+ ## 2. Gather Context Paths
66
+
67
+ Build file list for auditor:
68
+ - AI-SPEC.md (if exists — the planned eval strategy)
69
+ - All SUMMARY.md files in phase dir
70
+ - All PLAN.md files in phase dir
71
+
72
+ ## 3. Spawn gsd-eval-auditor
73
+
74
+ ```
75
+ ◆ Spawning eval auditor...
76
+ ```
77
+
78
+ Build prompt:
79
+
80
+ ```markdown
81
+ references/agents/gsd-eval-auditor.md for instructions.
82
+
83
+ <objective>
84
+ Conduct evaluation coverage audit of Phase {phase_number}: {phase_name}
85
+ {If AI-SPEC exists: "Audit against AI-SPEC.md evaluation plan."}
86
+ {If no AI-SPEC: "Audit against general AI eval best practices."}
87
+ </objective>
88
+
89
+ <files_to_read>
90
+ - {summary_paths}
91
+ - {plan_paths}
92
+ - {ai_spec_path if exists}
93
+ </files_to_read>
94
+
95
+ <input>
96
+ ai_spec_path: {ai_spec_path or "none"}
97
+ phase_dir: {phase_dir}
98
+ phase_number: {phase_number}
99
+ phase_name: {phase_name}
100
+ padded_phase: {padded_phase}
101
+ state: {A or B}
102
+ </input>
103
+ ```
104
+
105
+ Spawn as Task with model `AUDITOR_MODEL`.
106
+
107
+ ## 4. Parse Auditor Result
108
+
109
+ Read the written EVAL-REVIEW.md. Extract:
110
+ - `overall_score`
111
+ - `verdict` (PRODUCTION READY | NEEDS WORK | SIGNIFICANT GAPS | NOT IMPLEMENTED)
112
+ - `critical_gap_count`
113
+
114
+ ## 5. Display Summary
115
+
116
+ ```
117
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
118
+ GSD ► EVAL AUDIT COMPLETE — PHASE {N}: {name}
119
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
120
+
121
+ ◆ Score: {overall_score}/100
122
+ ◆ Verdict: {verdict}
123
+ ◆ Critical Gaps: {critical_gap_count}
124
+ ◆ Output: {eval_review_path}
125
+
126
+ {If PRODUCTION READY:}
127
+ Next step: /gsd-plan-phase (next phase) or deploy
128
+
129
+ {If NEEDS WORK:}
130
+ Address critical gaps in EVAL-REVIEW.md, then re-run /gsd-eval-review {N}
131
+
132
+ {If SIGNIFICANT GAPS or NOT IMPLEMENTED:}
133
+ Review AI-SPEC.md evaluation plan. Critical eval dimensions are not implemented.
134
+ Do not deploy until gaps are addressed.
135
+ ```
136
+
137
+ ## 6. Commit
138
+
139
+ **If `commit_docs` is true:**
140
+ ```bash
141
+ git add "${EVAL_REVIEW_FILE}"
142
+ git commit -m "docs({phase_slug}): add EVAL-REVIEW.md — score {overall_score}/100 ({verdict})"
143
+ ```
144
+
145
+ </process>
146
+
147
+ <success_criteria>
148
+ - [ ] Phase execution state detected correctly
149
+ - [ ] AI-SPEC.md presence handled (with or without)
150
+ - [ ] gsd-eval-auditor spawned with correct context
151
+ - [ ] EVAL-REVIEW.md written (by auditor)
152
+ - [ ] Score and verdict displayed to user
153
+ - [ ] Appropriate next steps surfaced based on verdict
154
+ - [ ] Committed if commit_docs enabled
155
+ </success_criteria>