@opengsd/gsd-core 1.11.0 → 1.13.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 (498) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.opencode/plugins/gsd-core.js +12 -0
  4. package/agents/gsd-code-fixer.md +1 -1
  5. package/agents/gsd-debug-session-manager.md +1 -1
  6. package/agents/gsd-debugger.md +1 -1
  7. package/agents/gsd-dom-verifier.md +169 -0
  8. package/agents/gsd-eval-auditor.md +1 -1
  9. package/agents/gsd-executor.md +78 -42
  10. package/agents/gsd-framework-selector.md +1 -3
  11. package/agents/gsd-intel-updater.md +1 -1
  12. package/agents/gsd-mempalace-curator.md +0 -1
  13. package/agents/gsd-pattern-mapper.md +11 -0
  14. package/agents/gsd-phase-researcher.md +3 -1
  15. package/agents/gsd-plan-checker.md +91 -112
  16. package/agents/gsd-planner.md +20 -4
  17. package/agents/gsd-project-researcher.md +1 -1
  18. package/agents/gsd-research-synthesizer.md +2 -2
  19. package/agents/gsd-roadmapper.md +15 -11
  20. package/agents/gsd-ui-checker.md +82 -7
  21. package/agents/gsd-ui-researcher.md +70 -3
  22. package/agents/gsd-verifier.md +24 -2
  23. package/bin/install.js +847 -200
  24. package/commands/gsd/discuss-phase.md +1 -1
  25. package/commands/gsd/execute-phase.md +1 -1
  26. package/commands/gsd/import.md +1 -1
  27. package/commands/gsd/ns-workflow.md +2 -1
  28. package/commands/gsd/phase.md +1 -1
  29. package/commands/gsd/quick-batch.md +105 -0
  30. package/commands/gsd/quick.md +8 -4
  31. package/commands/gsd/surface.md +18 -8
  32. package/gsd-core/bin/gsd-tools.cjs +761 -100
  33. package/gsd-core/bin/lib/active-workstream-store.cjs +8 -0
  34. package/gsd-core/bin/lib/adr-parser.cjs +13 -7
  35. package/gsd-core/bin/lib/agent-install-check.cjs +162 -0
  36. package/gsd-core/bin/lib/api-coverage.cjs +30 -9
  37. package/gsd-core/bin/lib/artifacts.cjs +2 -0
  38. package/gsd-core/bin/lib/assumption-delta.cjs +30 -11
  39. package/gsd-core/bin/lib/audit.cjs +163 -41
  40. package/gsd-core/bin/lib/broken-windows.cjs +306 -28
  41. package/gsd-core/bin/lib/capability-activation.cjs +27 -0
  42. package/gsd-core/bin/lib/capability-lock.cjs +10 -4
  43. package/gsd-core/bin/lib/capability-registry.cjs +785 -144
  44. package/gsd-core/bin/lib/capability-state.cjs +25 -4
  45. package/gsd-core/bin/lib/capability-validator.cjs +321 -18
  46. package/gsd-core/bin/lib/capability-writer.cjs +14 -4
  47. package/gsd-core/bin/lib/check-command-router.cjs +229 -6
  48. package/gsd-core/bin/lib/claude-orchestration.cjs +10 -25
  49. package/gsd-core/bin/lib/cli-exit.cjs +496 -10
  50. package/gsd-core/bin/lib/clusters.cjs +1 -0
  51. package/gsd-core/bin/lib/code-review-depth.cjs +288 -0
  52. package/gsd-core/bin/lib/codex-agent-toml.cjs +410 -4
  53. package/gsd-core/bin/lib/command-aliases.cjs +16 -0
  54. package/gsd-core/bin/lib/command-arg-projection.cjs +144 -14
  55. package/gsd-core/bin/lib/command-routing-hub.cjs +31 -2
  56. package/gsd-core/bin/lib/commands.cjs +877 -54
  57. package/gsd-core/bin/lib/complexity-trigger.cjs +26 -6
  58. package/gsd-core/bin/lib/config-loader.cjs +121 -29
  59. package/gsd-core/bin/lib/config.cjs +92 -2
  60. package/gsd-core/bin/lib/configuration.cjs +129 -37
  61. package/gsd-core/bin/lib/core-utils.cjs +118 -14
  62. package/gsd-core/bin/lib/decisions.cjs +213 -1
  63. package/gsd-core/bin/lib/edge-probe.cjs +23 -2
  64. package/gsd-core/bin/lib/estimate-cli.cjs +55 -11
  65. package/gsd-core/bin/lib/exit-code-registry.cjs +98 -0
  66. package/gsd-core/bin/lib/file-overlap-partitioner.cjs +74 -0
  67. package/gsd-core/bin/lib/frontmatter.cjs +975 -326
  68. package/gsd-core/bin/lib/gap-checker.cjs +41 -8
  69. package/gsd-core/bin/lib/git-base-branch.cjs +182 -39
  70. package/gsd-core/bin/lib/health-diagnostic-rules/consistency.cjs +7 -3
  71. package/gsd-core/bin/lib/health-diagnostic-rules/phase-structure.cjs +8 -2
  72. package/gsd-core/bin/lib/health-diagnostic-rules/roadmap-disk-consistency.cjs +60 -14
  73. package/gsd-core/bin/lib/health-diagnostic-rules/state-consistency.cjs +75 -22
  74. package/gsd-core/bin/lib/health-diagnostic-rules/worktree-health.cjs +22 -8
  75. package/gsd-core/bin/lib/health-diagnostic.cjs +23 -3
  76. package/gsd-core/bin/lib/host-integration.cjs +96 -11
  77. package/gsd-core/bin/lib/init-command-router.cjs +132 -21
  78. package/gsd-core/bin/lib/init.cjs +252 -56
  79. package/gsd-core/bin/lib/install-engine.cjs +252 -15
  80. package/gsd-core/bin/lib/install-model-override-resolver.cjs +78 -1
  81. package/gsd-core/bin/lib/install-profiles.cjs +100 -18
  82. package/gsd-core/bin/lib/installer-migration-report.cjs +4 -0
  83. package/gsd-core/bin/lib/installer-migrations/010-antigravity-retire-confighome-artifacts.cjs +169 -0
  84. package/gsd-core/bin/lib/installer-migrations.cjs +10 -7
  85. package/gsd-core/bin/lib/intel.cjs +101 -26
  86. package/gsd-core/bin/lib/io.cjs +195 -15
  87. package/gsd-core/bin/lib/learnings.cjs +85 -14
  88. package/gsd-core/bin/lib/legacy-cleanup.cjs +8 -2
  89. package/gsd-core/bin/lib/loop-resolver.cjs +14 -8
  90. package/gsd-core/bin/lib/markdown-table.cjs +175 -4
  91. package/gsd-core/bin/lib/milestone.cjs +112 -7
  92. package/gsd-core/bin/lib/model-catalog.cjs +177 -19
  93. package/gsd-core/bin/lib/model-resolver.cjs +10 -28
  94. package/gsd-core/bin/lib/onboard-projection.cjs +5 -1
  95. package/gsd-core/bin/lib/phase-command-router.cjs +13 -6
  96. package/gsd-core/bin/lib/phase-estimation.cjs +17 -8
  97. package/gsd-core/bin/lib/phase-id.cjs +321 -13
  98. package/gsd-core/bin/lib/phase-lifecycle.cjs +24 -16
  99. package/gsd-core/bin/lib/phase-locator.cjs +138 -17
  100. package/gsd-core/bin/lib/phase.cjs +1175 -115
  101. package/gsd-core/bin/lib/plan-document.cjs +273 -0
  102. package/gsd-core/bin/lib/plan-scan.cjs +13 -2
  103. package/gsd-core/bin/lib/planning-command-router.cjs +61 -0
  104. package/gsd-core/bin/lib/planning-inspect.cjs +1168 -0
  105. package/gsd-core/bin/lib/planning-snapshot.cjs +165 -34
  106. package/gsd-core/bin/lib/planning-workspace.cjs +159 -28
  107. package/gsd-core/bin/lib/probe-core.cjs +4 -1
  108. package/gsd-core/bin/lib/profile-pipeline-command-router.cjs +50 -7
  109. package/gsd-core/bin/lib/profile-pipeline.cjs +6 -3
  110. package/gsd-core/bin/lib/quick-batch-command-router.cjs +285 -0
  111. package/gsd-core/bin/lib/quick-batch-dispatch.cjs +250 -0
  112. package/gsd-core/bin/lib/quick-batch.cjs +840 -0
  113. package/gsd-core/bin/lib/real-home-guard.cjs +419 -0
  114. package/gsd-core/bin/lib/refactor-trigger-command-router.cjs +71 -45
  115. package/gsd-core/bin/lib/review-lane-descriptor.cjs +62 -14
  116. package/gsd-core/bin/lib/review-lane-invocation.cjs +73 -1
  117. package/gsd-core/bin/lib/review-lane-runner.cjs +136 -10
  118. package/gsd-core/bin/lib/roadmap-command-router.cjs +45 -31
  119. package/gsd-core/bin/lib/roadmap-parser.cjs +577 -41
  120. package/gsd-core/bin/lib/roadmap.cjs +248 -64
  121. package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +329 -41
  122. package/gsd-core/bin/lib/runtime-artifact-install-plan.cjs +16 -17
  123. package/gsd-core/bin/lib/runtime-artifact-layout.cjs +320 -109
  124. package/gsd-core/bin/lib/runtime-hooks-surface.cjs +487 -83
  125. package/gsd-core/bin/lib/runtime-identity.cjs +234 -0
  126. package/gsd-core/bin/lib/runtime-slash.cjs +72 -2
  127. package/gsd-core/bin/lib/shell-command-projection.cjs +75 -8
  128. package/gsd-core/bin/lib/smart-entry.cjs +19 -31
  129. package/gsd-core/bin/lib/spec-section.cjs +12 -7
  130. package/gsd-core/bin/lib/state-command-router.cjs +47 -18
  131. package/gsd-core/bin/lib/state-contract.cjs +359 -0
  132. package/gsd-core/bin/lib/state-document.cjs +216 -5
  133. package/gsd-core/bin/lib/state-md-schema.cjs +231 -0
  134. package/gsd-core/bin/lib/state-transition.cjs +850 -145
  135. package/gsd-core/bin/lib/state.cjs +1629 -287
  136. package/gsd-core/bin/lib/surface.cjs +33 -10
  137. package/gsd-core/bin/lib/task-command-router.cjs +111 -1
  138. package/gsd-core/bin/lib/task-content-resolution.cjs +368 -0
  139. package/gsd-core/bin/lib/tdd-red-evidence.cjs +133 -0
  140. package/gsd-core/bin/lib/teams-status.cjs +4 -1
  141. package/gsd-core/bin/lib/uat-predicate.cjs +58 -20
  142. package/gsd-core/bin/lib/uat.cjs +2542 -387
  143. package/gsd-core/bin/lib/ui-consideration-probe.cjs +9 -1
  144. package/gsd-core/bin/lib/ui-safety-gate.cjs +37 -7
  145. package/gsd-core/bin/lib/unusable-input.cjs +13 -0
  146. package/gsd-core/bin/lib/update-context.cjs +6 -2
  147. package/gsd-core/bin/lib/validate-command-router.cjs +2 -2
  148. package/gsd-core/bin/lib/validate.cjs +230 -12
  149. package/gsd-core/bin/lib/vendor/README.md +43 -5
  150. package/gsd-core/bin/lib/vendor/js-yaml.cjs +3014 -0
  151. package/gsd-core/bin/lib/verification-command-router.cjs +2 -1
  152. package/gsd-core/bin/lib/verification.cjs +287 -13
  153. package/gsd-core/bin/lib/verify-command-grounding.cjs +846 -0
  154. package/gsd-core/bin/lib/verify-command-router.cjs +1 -0
  155. package/gsd-core/bin/lib/verify.cjs +441 -56
  156. package/gsd-core/bin/lib/workstream-inventory.cjs +20 -2
  157. package/gsd-core/bin/lib/workstream-name-policy.cjs +25 -4
  158. package/gsd-core/bin/lib/worktree-base-ref.cjs +66 -12
  159. package/gsd-core/bin/lib/worktree-safety.cjs +185 -21
  160. package/gsd-core/bin/shared/config-defaults.manifest.json +7 -1
  161. package/gsd-core/bin/shared/config-schema.manifest.json +13 -0
  162. package/gsd-core/bin/shared/exit-codes.json +8 -0
  163. package/gsd-core/bin/shared/exit-codes.sh +20 -0
  164. package/gsd-core/bin/shared/model-catalog.json +8 -1
  165. package/gsd-core/bin/verify-reapply-patches.cjs +70 -3
  166. package/gsd-core/references/agent-contracts.md +6 -5
  167. package/gsd-core/references/api-coverage.md +24 -2
  168. package/gsd-core/references/autonomous-smart-discuss.md +3 -3
  169. package/gsd-core/references/checkpoints.md +37 -19
  170. package/gsd-core/references/decimal-phase-calculation.md +5 -5
  171. package/gsd-core/references/edge-probe.md +17 -5
  172. package/gsd-core/references/execute-mvp-tdd.md +18 -18
  173. package/gsd-core/references/execute-phase-between-wave-reset.md +9 -12
  174. package/gsd-core/references/execute-phase-response-language.md +6 -0
  175. package/gsd-core/references/execute-phase-wave-guard.md +11 -9
  176. package/gsd-core/references/executor-examples.md +42 -0
  177. package/gsd-core/references/failing-direction.md +78 -0
  178. package/gsd-core/references/few-shot-examples/plan-checker.md +15 -15
  179. package/gsd-core/references/gate-prompts.md +1 -1
  180. package/gsd-core/references/git-integration.md +5 -5
  181. package/gsd-core/references/git-planning-commit.md +3 -3
  182. package/gsd-core/references/gsd-run-resolver.md +1 -1
  183. package/gsd-core/references/loop-hook-dispatch.md +22 -0
  184. package/gsd-core/references/model-profiles.md +1 -1
  185. package/gsd-core/references/mvp-concepts.md +2 -2
  186. package/gsd-core/references/nyquist-compliance.md +74 -0
  187. package/gsd-core/references/offer-next.md +3 -5
  188. package/gsd-core/references/phase-argument-parsing.md +3 -3
  189. package/gsd-core/references/plan-checker-examples.md +41 -0
  190. package/gsd-core/references/planner-antipatterns.md +25 -0
  191. package/gsd-core/references/planner-chunked.md +5 -1
  192. package/gsd-core/references/planner-coupling.md +42 -0
  193. package/gsd-core/references/planner-failing-direction.md +53 -0
  194. package/gsd-core/references/planner-human-verify-mode.md +15 -1
  195. package/gsd-core/references/planner-quick-batch.md +71 -0
  196. package/gsd-core/references/planner-reviews.md +47 -0
  197. package/gsd-core/references/planner-revision.md +76 -3
  198. package/gsd-core/references/planner-verify-command-grounding.md +17 -0
  199. package/gsd-core/references/planning-config.md +39 -9
  200. package/gsd-core/references/response-language-directive.md +9 -0
  201. package/gsd-core/references/reviewer-instances.md +31 -0
  202. package/gsd-core/references/revision-loop.md +118 -11
  203. package/gsd-core/references/runtime-aware-dispatch.md +1 -1
  204. package/gsd-core/references/tdd.md +15 -12
  205. package/gsd-core/references/ui-brand.md +65 -21
  206. package/gsd-core/references/ui-consideration-probe.md +1 -1
  207. package/gsd-core/references/universal-anti-patterns.md +2 -2
  208. package/gsd-core/references/verifier-evidence-gate.md +160 -0
  209. package/gsd-core/references/verify-command-path-resolvability.md +42 -0
  210. package/gsd-core/references/verify-mvp-mode.md +1 -1
  211. package/gsd-core/references/workstream-flag.md +11 -11
  212. package/gsd-core/templates/README.md +1 -1
  213. package/gsd-core/templates/SECURITY.md +3 -3
  214. package/gsd-core/templates/UI-SPEC.md +25 -3
  215. package/gsd-core/templates/VALIDATION.md +3 -3
  216. package/gsd-core/templates/phase-prompt.md +7 -0
  217. package/gsd-core/templates/state.md +7 -0
  218. package/gsd-core/templates/verification-report.md +5 -0
  219. package/gsd-core/workflows/_runtime-launcher.snippet.sh +1 -1
  220. package/gsd-core/workflows/add-backlog.md +3 -1
  221. package/gsd-core/workflows/add-phase.md +5 -3
  222. package/gsd-core/workflows/add-tests.md +4 -9
  223. package/gsd-core/workflows/add-todo.md +2 -2
  224. package/gsd-core/workflows/ai-integration-phase.md +5 -10
  225. package/gsd-core/workflows/analyze-dependencies.md +2 -0
  226. package/gsd-core/workflows/audit-fix.md +14 -3
  227. package/gsd-core/workflows/audit-milestone.md +11 -9
  228. package/gsd-core/workflows/audit-uat.md +19 -2
  229. package/gsd-core/workflows/autonomous/steps/converge-fail-fast.md +2 -2
  230. package/gsd-core/workflows/autonomous.md +12 -26
  231. package/gsd-core/workflows/check-todos.md +2 -2
  232. package/gsd-core/workflows/cleanup.md +3 -3
  233. package/gsd-core/workflows/code-review/steps/structural-pre-pass.md +16 -14
  234. package/gsd-core/workflows/code-review-fix.md +3 -1
  235. package/gsd-core/workflows/code-review.md +192 -69
  236. package/gsd-core/workflows/complete-milestone.md +28 -14
  237. package/gsd-core/workflows/debug.md +6 -4
  238. package/gsd-core/workflows/diagnose-issues.md +17 -7
  239. package/gsd-core/workflows/discuss-phase/modes/advisor.md +3 -1
  240. package/gsd-core/workflows/discuss-phase/modes/all.md +2 -0
  241. package/gsd-core/workflows/discuss-phase/modes/analyze.md +2 -0
  242. package/gsd-core/workflows/discuss-phase/modes/auto.md +2 -0
  243. package/gsd-core/workflows/discuss-phase/modes/batch.md +2 -0
  244. package/gsd-core/workflows/discuss-phase/modes/chain.md +5 -7
  245. package/gsd-core/workflows/discuss-phase/modes/default.md +2 -0
  246. package/gsd-core/workflows/discuss-phase/modes/power.md +2 -0
  247. package/gsd-core/workflows/discuss-phase/modes/text.md +3 -1
  248. package/gsd-core/workflows/discuss-phase/templates/context.md +2 -0
  249. package/gsd-core/workflows/discuss-phase/templates/discussion-log.md +2 -0
  250. package/gsd-core/workflows/discuss-phase-assumptions/steps/auto-advance-dispatch.md +1 -3
  251. package/gsd-core/workflows/discuss-phase-assumptions.md +3 -3
  252. package/gsd-core/workflows/discuss-phase-power.md +2 -0
  253. package/gsd-core/workflows/discuss-phase.md +2 -2
  254. package/gsd-core/workflows/do.md +46 -19
  255. package/gsd-core/workflows/docs-update.md +6 -5
  256. package/gsd-core/workflows/edit-phase.md +3 -1
  257. package/gsd-core/workflows/eval-review.md +5 -10
  258. package/gsd-core/workflows/execute-phase/steps/codebase-drift-gate.md +3 -1
  259. package/gsd-core/workflows/execute-phase/steps/executor-isolation-dispatch.md +129 -11
  260. package/gsd-core/workflows/execute-phase/steps/gap-closure-artifacts.md +1 -1
  261. package/gsd-core/workflows/execute-phase/steps/partial-wave.md +1 -1
  262. package/gsd-core/workflows/execute-phase/steps/per-plan-executor-routing.md +1 -1
  263. package/gsd-core/workflows/execute-phase/steps/per-plan-worktree-gate.md +29 -5
  264. package/gsd-core/workflows/execute-phase/steps/post-merge-gate.md +2 -2
  265. package/gsd-core/workflows/execute-phase/steps/protected-branch.md +21 -0
  266. package/gsd-core/workflows/execute-phase/steps/regression-gate-run.md +4 -2
  267. package/gsd-core/workflows/execute-phase/steps/tdd-applicability-resolution.md +25 -0
  268. package/gsd-core/workflows/execute-phase/steps/wave-post-gate-hooks.md +39 -0
  269. package/gsd-core/workflows/execute-phase/steps/worktree-recovery-policy.md +2 -0
  270. package/gsd-core/workflows/execute-phase.md +68 -66
  271. package/gsd-core/workflows/execute-plan.md +25 -20
  272. package/gsd-core/workflows/explore.md +3 -1
  273. package/gsd-core/workflows/extract-learnings.md +3 -1
  274. package/gsd-core/workflows/fast.md +8 -2
  275. package/gsd-core/workflows/forensics.md +3 -1
  276. package/gsd-core/workflows/graduation.md +6 -6
  277. package/gsd-core/workflows/health.md +4 -7
  278. package/gsd-core/workflows/help/modes/brief.md +2 -0
  279. package/gsd-core/workflows/help/modes/default.md +2 -0
  280. package/gsd-core/workflows/help/modes/full.md +12 -0
  281. package/gsd-core/workflows/help/modes/topic.md +2 -0
  282. package/gsd-core/workflows/help.md +2 -0
  283. package/gsd-core/workflows/import.md +17 -14
  284. package/gsd-core/workflows/inbox.md +5 -6
  285. package/gsd-core/workflows/ingest-docs.md +45 -12
  286. package/gsd-core/workflows/insert-phase.md +7 -5
  287. package/gsd-core/workflows/list-phase-assumptions.md +2 -0
  288. package/gsd-core/workflows/list-seeds.md +7 -3
  289. package/gsd-core/workflows/list-workspaces.md +3 -1
  290. package/gsd-core/workflows/manager.md +15 -26
  291. package/gsd-core/workflows/map-codebase.md +3 -1
  292. package/gsd-core/workflows/milestone-summary.md +3 -1
  293. package/gsd-core/workflows/mvp-phase.md +3 -3
  294. package/gsd-core/workflows/new-milestone.md +10 -22
  295. package/gsd-core/workflows/new-project/steps/auto-mode-config.md +1 -1
  296. package/gsd-core/workflows/new-project.md +17 -29
  297. package/gsd-core/workflows/new-workspace.md +2 -2
  298. package/gsd-core/workflows/next.md +4 -2
  299. package/gsd-core/workflows/node-repair.md +2 -0
  300. package/gsd-core/workflows/note.md +2 -0
  301. package/gsd-core/workflows/onboard.md +1 -1
  302. package/gsd-core/workflows/pause-work.md +20 -5
  303. package/gsd-core/workflows/plan-phase/steps/adr-ingest-express-path.md +1 -1
  304. package/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md +100 -18
  305. package/gsd-core/workflows/plan-phase/steps/prd-express-path.md +4 -4
  306. package/gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md +12 -3
  307. package/gsd-core/workflows/plan-phase.md +251 -54
  308. package/gsd-core/workflows/plan-review-convergence.md +148 -19
  309. package/gsd-core/workflows/plant-seed.md +3 -3
  310. package/gsd-core/workflows/pr-branch.md +195 -51
  311. package/gsd-core/workflows/profile-user.md +17 -15
  312. package/gsd-core/workflows/progress/steps/forensic-audit.md +1 -1
  313. package/gsd-core/workflows/progress.md +52 -15
  314. package/gsd-core/workflows/quick/steps/discussion-phase.md +1 -3
  315. package/gsd-core/workflows/quick/steps/plan-checker-loop.md +38 -5
  316. package/gsd-core/workflows/quick/steps/quick-verification.md +2 -4
  317. package/gsd-core/workflows/quick/steps/research-phase.md +5 -7
  318. package/gsd-core/workflows/quick/steps/worktree-pre-dispatch-commit.md +3 -3
  319. package/gsd-core/workflows/quick-batch/steps/batch-init.md +55 -0
  320. package/gsd-core/workflows/quick-batch/steps/completion.md +65 -0
  321. package/gsd-core/workflows/quick-batch/steps/merge-wave.md +100 -0
  322. package/gsd-core/workflows/quick-batch/steps/plan-checker-loop.md +147 -0
  323. package/gsd-core/workflows/quick-batch/steps/planner-wave.md +158 -0
  324. package/gsd-core/workflows/quick-batch/steps/research-phase.md +95 -0
  325. package/gsd-core/workflows/quick-batch/steps/resume-mode.md +49 -0
  326. package/gsd-core/workflows/quick-batch/steps/verification-wave.md +73 -0
  327. package/gsd-core/workflows/quick-batch/steps/worktree-dispatch.md +169 -0
  328. package/gsd-core/workflows/quick-batch.md +203 -0
  329. package/gsd-core/workflows/quick.md +33 -32
  330. package/gsd-core/workflows/reapply-patches.md +2 -0
  331. package/gsd-core/workflows/remove-phase.md +6 -4
  332. package/gsd-core/workflows/remove-workspace.md +3 -3
  333. package/gsd-core/workflows/resume-project.md +14 -14
  334. package/gsd-core/workflows/review.md +404 -21
  335. package/gsd-core/workflows/scan.md +3 -1
  336. package/gsd-core/workflows/section-manifest.json +12 -0
  337. package/gsd-core/workflows/secure-phase.md +3 -3
  338. package/gsd-core/workflows/session-report.md +2 -0
  339. package/gsd-core/workflows/settings-advanced.md +9 -9
  340. package/gsd-core/workflows/settings-integrations.md +66 -32
  341. package/gsd-core/workflows/settings.md +4 -6
  342. package/gsd-core/workflows/ship.md +22 -16
  343. package/gsd-core/workflows/sketch-wrap-up.md +13 -17
  344. package/gsd-core/workflows/sketch.md +13 -19
  345. package/gsd-core/workflows/smart-entry.md +4 -6
  346. package/gsd-core/workflows/spec-phase.md +31 -4
  347. package/gsd-core/workflows/spike-wrap-up.md +9 -11
  348. package/gsd-core/workflows/spike.md +21 -32
  349. package/gsd-core/workflows/stats.md +4 -2
  350. package/gsd-core/workflows/sync-skills.md +13 -5
  351. package/gsd-core/workflows/thread.md +13 -7
  352. package/gsd-core/workflows/transition.md +7 -5
  353. package/gsd-core/workflows/ui-phase.md +36 -21
  354. package/gsd-core/workflows/ui-review.md +7 -11
  355. package/gsd-core/workflows/ultraplan-phase.md +7 -13
  356. package/gsd-core/workflows/undo.md +9 -17
  357. package/gsd-core/workflows/update.md +47 -48
  358. package/gsd-core/workflows/validate-phase.md +3 -3
  359. package/gsd-core/workflows/verify-work/steps/automated-ui-verification.md +25 -1
  360. package/gsd-core/workflows/verify-work/steps/mvp-uat-framing.md +1 -1
  361. package/gsd-core/workflows/verify-work.md +106 -21
  362. package/hooks/dist/gsd-agent-isolation-guard.js +77 -38
  363. package/hooks/dist/gsd-check-update-worker.js +19 -2
  364. package/hooks/dist/gsd-config-reload.js +18 -12
  365. package/hooks/dist/gsd-context-monitor.js +302 -22
  366. package/hooks/dist/gsd-cursor-post-tool.js +3 -1
  367. package/hooks/dist/gsd-cursor-pre-tool.js +3 -1
  368. package/hooks/dist/gsd-cursor-session-start.js +2 -1
  369. package/hooks/dist/gsd-cursor-stop.js +2 -1
  370. package/hooks/dist/gsd-cursor-subagent-start.js +28 -23
  371. package/hooks/dist/gsd-cursor-subagent-stop.js +3 -1
  372. package/hooks/dist/gsd-ensure-canonical-path.js +2 -1
  373. package/hooks/dist/gsd-graphify-update.sh +22 -18
  374. package/hooks/dist/gsd-node-runner.sh +77 -0
  375. package/hooks/dist/gsd-phase-boundary.sh +1 -0
  376. package/hooks/dist/gsd-prompt-guard.js +46 -12
  377. package/hooks/dist/gsd-read-guard.js +18 -7
  378. package/hooks/dist/gsd-read-injection-scanner.js +22 -13
  379. package/hooks/dist/gsd-secret-read-guard.js +1079 -0
  380. package/hooks/dist/gsd-session-state.sh +1 -0
  381. package/hooks/dist/gsd-statusline.js +222 -29
  382. package/hooks/dist/gsd-validate-commit.sh +523 -12
  383. package/hooks/dist/gsd-windsurf-pre-command.js +16 -11
  384. package/hooks/dist/gsd-windsurf-pre-write.js +22 -13
  385. package/hooks/dist/gsd-workflow-guard.js +36 -17
  386. package/hooks/dist/gsd-worktree-path-guard.js +36 -21
  387. package/hooks/dist/gsd-write-guard.js +35 -25
  388. package/hooks/dist/lib/cli-exit.js +560 -0
  389. package/hooks/dist/lib/exit-code-registry.js +98 -0
  390. package/hooks/dist/lib/git-cmd.js +210 -1
  391. package/hooks/dist/lib/git-probe.js +84 -0
  392. package/hooks/dist/lib/hook-exit.js +81 -0
  393. package/hooks/dist/lib/injection-patterns.js +36 -6
  394. package/hooks/dist/managed-hooks-registry.cjs +4 -0
  395. package/hooks/gsd-agent-isolation-guard.js +77 -38
  396. package/hooks/gsd-check-update-worker.js +19 -2
  397. package/hooks/gsd-config-reload.js +18 -12
  398. package/hooks/gsd-context-monitor.js +302 -22
  399. package/hooks/gsd-cursor-post-tool.js +3 -1
  400. package/hooks/gsd-cursor-pre-tool.js +3 -1
  401. package/hooks/gsd-cursor-session-start.js +2 -1
  402. package/hooks/gsd-cursor-stop.js +2 -1
  403. package/hooks/gsd-cursor-subagent-start.js +28 -23
  404. package/hooks/gsd-cursor-subagent-stop.js +3 -1
  405. package/hooks/gsd-ensure-canonical-path.js +2 -1
  406. package/hooks/gsd-graphify-update.sh +22 -18
  407. package/hooks/gsd-node-runner.sh +77 -0
  408. package/hooks/gsd-phase-boundary.sh +1 -0
  409. package/hooks/gsd-prompt-guard.js +46 -12
  410. package/hooks/gsd-read-guard.js +18 -7
  411. package/hooks/gsd-read-injection-scanner.js +22 -13
  412. package/hooks/gsd-secret-read-guard.js +1079 -0
  413. package/hooks/gsd-session-state.sh +1 -0
  414. package/hooks/gsd-statusline.js +222 -29
  415. package/hooks/gsd-validate-commit.sh +523 -12
  416. package/hooks/gsd-windsurf-pre-command.js +16 -11
  417. package/hooks/gsd-windsurf-pre-write.js +22 -13
  418. package/hooks/gsd-workflow-guard.js +36 -17
  419. package/hooks/gsd-worktree-path-guard.js +36 -21
  420. package/hooks/gsd-write-guard.js +35 -25
  421. package/hooks/hooks.json +6 -0
  422. package/hooks/lib/cli-exit.js +560 -0
  423. package/hooks/lib/exit-code-registry.js +98 -0
  424. package/hooks/lib/git-cmd.js +210 -1
  425. package/hooks/lib/git-probe.js +84 -0
  426. package/hooks/lib/hook-exit.js +81 -0
  427. package/hooks/lib/injection-patterns.js +36 -6
  428. package/hooks/managed-hooks-registry.cjs +4 -0
  429. package/package.json +14 -9
  430. package/scripts/base64-scan.sh +74 -12
  431. package/scripts/build-hooks.js +12 -0
  432. package/scripts/check-glossary-refs.cjs +77 -15
  433. package/scripts/check-mutation-score-ratchet.cjs +156 -0
  434. package/scripts/ci-check-job-near-cap.cjs +49 -0
  435. package/scripts/ci-pr-mergeability.cjs +262 -0
  436. package/scripts/ci-test-scope.cjs +52 -12
  437. package/scripts/ci-timeout-report.cjs +230 -0
  438. package/scripts/docs-guard-registry.cjs +406 -0
  439. package/scripts/gen-capability-registry.cjs +8 -6
  440. package/scripts/gen-exit-code-docs.cjs +318 -0
  441. package/scripts/gen-exit-code-registry.cjs +891 -0
  442. package/scripts/gen-features.cjs +836 -0
  443. package/scripts/gen-hooks-cli-exit.cjs +239 -0
  444. package/scripts/gen-install-tree-fixtures.cjs +2 -2
  445. package/scripts/gen-loop-host-contract.cjs +189 -4
  446. package/scripts/gen-scripts-cli-exit.cjs +185 -0
  447. package/scripts/gen-state-md-docs.cjs +727 -0
  448. package/scripts/{test-failure-reasons.cjs → gsd-test-gate-reasons.cjs} +6 -0
  449. package/scripts/lib/ci-job-timing.cjs +72 -0
  450. package/scripts/lib/cli-exit.cjs +546 -44
  451. package/scripts/lib/drift-scan.cjs +32 -2
  452. package/scripts/lib/exit-code-registry.cjs +98 -0
  453. package/scripts/lib/ndjson-reporter.cjs +119 -0
  454. package/scripts/lib/shellcheck-fetch.cjs +247 -0
  455. package/scripts/lint-allow-test-rule-refs.allowlist.json +0 -6
  456. package/scripts/lint-allow-test-rule-refs.effective-ceiling.json +1 -1
  457. package/scripts/lint-allow-test-rule-refs.unverified-ceiling.json +1 -1
  458. package/scripts/lint-docs-guard-registration.cjs +495 -0
  459. package/scripts/lint-docs-guard-registration.exempt-baseline.cjs +198 -0
  460. package/scripts/lint-eslint-glob-coverage.allowlist.json +4 -0
  461. package/scripts/{lint-fix-has-regression-test.cjs → lint-fix-has-regression-tests.cjs} +12 -6
  462. package/scripts/lint-health-diagnostic-rule-table.cjs +65 -8
  463. package/scripts/lint-mutation-test-derivation-drift.cjs +86 -0
  464. package/scripts/lint-phase-enumeration-drift.cjs +45 -14
  465. package/scripts/lint-phase-id-drift.cjs +133 -8
  466. package/scripts/lint-planning-prompt-drift.cjs +38 -1
  467. package/scripts/lint-portable-grep.cjs +176 -0
  468. package/scripts/lint-removed-but-needed.cjs +184 -16
  469. package/scripts/lint-response-language-coverage.cjs +524 -0
  470. package/scripts/lint-seam-enforcement.cjs +182 -0
  471. package/scripts/lint-slug-derivation-drift.cjs +921 -0
  472. package/scripts/lint-source-test-name-collision.cjs +241 -0
  473. package/scripts/lint-state-write-path-drift.cjs +337 -432
  474. package/scripts/lint-test-file-count.allowlist.json +124 -4
  475. package/scripts/lint-test-file-count.cjs +25 -3
  476. package/scripts/lint-unreachable-guard-drift.cjs +51 -64
  477. package/scripts/lint-vendored-deps.cjs +208 -35
  478. package/scripts/lint-workflow-shellcheck-baseline.json +1027 -0
  479. package/scripts/lint-workflow-shellcheck.cjs +614 -0
  480. package/scripts/mutation-matrix.cjs +599 -50
  481. package/scripts/npm-audit-baseline.cjs +376 -0
  482. package/scripts/prompt-injection-scan.sh +83 -14
  483. package/scripts/require-issue-link-policy.cjs +16 -1
  484. package/scripts/secret-scan.sh +75 -13
  485. package/scripts/select-docs-guards.cjs +56 -0
  486. package/scripts/sync-runtime-launcher.cjs +22 -3
  487. package/skills/gsd-discuss-phase/SKILL.md +1 -1
  488. package/skills/gsd-execute-phase/SKILL.md +1 -1
  489. package/skills/gsd-import/SKILL.md +1 -1
  490. package/skills/gsd-ns-workflow/SKILL.md +1 -0
  491. package/skills/gsd-phase/SKILL.md +1 -1
  492. package/skills/gsd-quick/SKILL.md +8 -4
  493. package/skills/gsd-quick-batch/SKILL.md +105 -0
  494. package/skills/gsd-surface/SKILL.md +18 -8
  495. package/vscode/package.json +1 -1
  496. package/bin/lib/ui-safety-gate.cjs +0 -109
  497. package/scripts/lint-emitted-drift-ack.cjs +0 -344
  498. package/scripts/state-write-path-drift-baseline.json +0 -19
@@ -16,6 +16,8 @@ This pattern applies whenever:
16
16
  ```
17
17
  prev_issue_count = Infinity
18
18
  iteration = 0
19
+ previous_conflict_property = null
20
+ conflict_return_count = 0
19
21
 
20
22
  LOOP:
21
23
  1. Run checker/validator on current output
@@ -23,15 +25,30 @@ LOOP:
23
25
  3. If PASSED or only INFO-level issues:
24
26
  -> Accept output, exit loop
25
27
  4. If BLOCKER or WARNING issues found:
26
- a. iteration += 1
27
- b. If iteration > 3:
28
+ a. If iteration + 1 > 3:
28
29
  -> Escalate to user (see "After 3 Iterations" below)
29
- c. Parse issue count from checker output
30
- d. If issue_count >= prev_issue_count:
30
+ b. Parse issue count from checker output
31
+ c. If issue_count >= prev_issue_count:
31
32
  -> Escalate to user: "Revision loop stalled (issue count not decreasing)"
32
- e. prev_issue_count = issue_count
33
- f. Re-spawn the producing agent with checker feedback appended
34
- g. After revision completes, go to LOOP
33
+ d. prev_issue_count = issue_count
34
+ e. Re-spawn the producing agent with checker feedback appended
35
+ f. If the agent returns REVISION_CONFLICT:
36
+ -> conflict_return_count += 1
37
+ -> If conflict_return_count >= 3:
38
+ escalate through the iteration-cap gate
39
+ -> If it names the same required_property as the previous conflict:
40
+ escalate as a stall (the resolution did not take)
41
+ Else: previous_conflict_property = current required_property
42
+ resolve it (see "Conflict Return" below) and go to step e.
43
+ Do NOT increment iteration -- the conflict was not a failed attempt.
44
+ Else: previous_conflict_property = null (a normal revision ends the conflict chain --
45
+ a LATER, unrelated conflict on the same property must not be misread as a repeat)
46
+ g. iteration += 1
47
+ h. After revision completes, go to LOOP
48
+
49
+ The increment is step g, AFTER the producing agent returns. An iteration counted at step a is
50
+ already spent by the time a REVISION_CONFLICT comes back, so it cannot then be withheld, and the
51
+ cap would punish the agent for correctly refusing to apply incompatible advice.
35
52
  ```
36
53
 
37
54
  ### Issue Count Tracking
@@ -45,19 +62,38 @@ Display iteration progress before each revision spawn:
45
62
 
46
63
  When re-spawning the producing agent for revision, pass the checker's YAML-formatted issues. The checker's output contains a `## Issues` heading followed by a YAML block. Parse this block and pass it verbatim to the revision agent.
47
64
 
65
+ The field names are the plan-checker's schema (`agents/gsd-plan-checker.md` → `<issue_structure>`):
66
+ `plan`, `dimension`, `severity`, `required_property`, `description`, `task`, `fix_hint`. There is no
67
+ `suggested_fix` field and no `finding` or `affected_field` field — those names were drift, and every
68
+ producer now emits the schema above.
69
+
48
70
  ```
49
71
  <checker_issues>
50
- The issues below are in YAML format. Each has: dimension, severity, finding,
51
- affected_field, suggested_fix. Address ALL BLOCKER issues. Address WARNING
52
- issues where feasible.
72
+ The issues below are in YAML format. Each has: dimension, severity,
73
+ required_property, description, fix_hint.
74
+
75
+ BINDING: required_property (the invariant that must hold), description (the
76
+ evidence it does not), severity. NON-BINDING: fix_hint -- ONE example route to
77
+ the property, never an instruction.
78
+
79
+ Satisfy the required_property of ALL BLOCKER issues. Satisfy WARNING issues
80
+ where feasible.
53
81
 
54
82
  {YAML issues block from checker output -- passed verbatim}
55
83
  </checker_issues>
56
84
 
57
85
  <revision_instructions>
58
86
  Address ALL BLOCKER and WARNING issues identified above.
59
- - For each BLOCKER: make the required change
87
+ - For each BLOCKER: make required_property true. Its fix_hint is one example
88
+ route; a smaller or different mechanism that makes the same property true
89
+ addresses the issue in full -- report which mechanism you used.
60
90
  - For each WARNING: address or explain why it's acceptable
91
+ - Before editing, re-check locked decisions, active capability guidance, and
92
+ constraints the existing output already encodes. If a fix_hint would
93
+ contradict one of those, or the property is unreachable without breaking one,
94
+ do NOT apply it and do NOT work around it: return REVISION_CONFLICT naming
95
+ the conflict and the alternatives considered, having addressed every
96
+ non-conflicting issue.
61
97
  - Do NOT introduce new issues while fixing existing ones
62
98
  - Preserve all content not flagged by the checker
63
99
  This is revision iteration {N} of max 3. Previous iteration had {prev_count}
@@ -65,6 +101,75 @@ issues. You must reduce the count or the loop will terminate.
65
101
  </revision_instructions>
66
102
  ```
67
103
 
104
+ ### Conflict Return (REVISION_CONFLICT)
105
+
106
+ A revision agent that returns `REVISION_CONFLICT` has not failed and has not stalled. Handle it
107
+ BEFORE the iteration counter and the stall check — a conflict is not resolvable by re-running the
108
+ same loop, so spending retry budget on it only exhausts the cap:
109
+
110
+ **This protocol is shared.** Every revision-bearing workflow follows it — `plan-phase`, `quick`,
111
+ `ui-phase`, and `verify-work`'s gap-plan loop. `plan-phase` @-imports this reference and states
112
+ only its own bindings (counter name, artifact path, next step). The other three do not import it,
113
+ so they restate the operative rules inline; this section is the authority they must agree with.
114
+
115
+ 1. **Do not spend budget.** Do NOT increment the iteration counter and do NOT update
116
+ `prev_issue_count`. Do NOT re-spawn the checker yet — the conflict is not a revised output.
117
+ 2. **Record**, where the host has a channel an arbitration loop reads. `review.md` emits one
118
+ fixed writer-owned slot immediately after the artifact title, between
119
+ `<!-- gsd:plan-revision-conflicts:begin -->` and
120
+ `<!-- gsd:plan-revision-conflicts:end -->`. When `workflow.plan_review_convergence` is enabled
121
+ and the phase `*-REVIEWS.md` already exists, `plan-phase` appends one line per conflict under
122
+ `## Plan-Revision Conflicts` inside that slot:
123
+
124
+ ```markdown
125
+ - [ ] REVISION_CONFLICT {dimension}/{plan} — required_property: {property} | conflicts with: {locked decision D-nn / CLAUDE.md rule / plan constraint} | alternatives: {the agent's alternatives}
126
+ ```
127
+
128
+ A checkbox, not a table row: `- [ ] REVISION_CONFLICT` is open and `- [x] REVISION_CONFLICT`
129
+ is resolved. The reader counts matching open lines only inside the first fixed slot after the
130
+ artifact title; an identical marker in reviewer output is not state. An open line in the owned
131
+ slot blocks convergence even if this run is abandoned.
132
+ A workflow with no such channel (`quick` has no phase and no REVIEWS.md) skips this step.
133
+
134
+ Before appending, reuse the existing open line instead of appending a duplicate when its
135
+ sanitized fields identify the same conflict. This makes persisted conflict state idempotent.
136
+
137
+ **Sanitize before writing — the conflict text is agent-authored.** Every field comes from the
138
+ producing agent. Before appending, for EACH field: collapse every newline and tab to a single
139
+ space, and strip any leading `#`, `-`, `|` or backtick-fence run. Otherwise an embedded
140
+ newline can forge an extra conflict-shaped record inside the owned slot. One conflict is exactly
141
+ one line beginning `- [ ]`. Never append agent text verbatim, and never append a fenced block.
142
+ 3. **Resolve** — present the conflict and its alternatives to the user and ask which to take
143
+ (pattern: `gsd-core/references/gate-prompts.md`): adopt a named alternative / override the
144
+ named constraint and apply the hint / amend the constraint itself. Each option resolves the
145
+ conflict. Accepting the output with the blocker still open is NOT offered here — the blocking
146
+ `required_property` still fails, and that choice belongs to the cap escalation.
147
+ 4. **Close** — the workflow that wrote the line owns flipping it to `- [x]` once the resolution
148
+ has been applied, appending ` | resolved: {chosen resolution}`. Readers only read. A line left
149
+ open is a live blocker, never a stale artifact.
150
+ 5. **Re-spawn** with the chosen resolution, then re-evaluate the return from the top of this
151
+ handler — never fall through to the checker spawn. A second conflict is still a conflict, not
152
+ a revised output, and handing it to the checker would check the conflict message.
153
+
154
+ **Bounded — two ways, because one is evadable.** Not incrementing must not make this path
155
+ unbounded:
156
+
157
+ - **Repeat.** A conflict naming the SAME `required_property` twice in a row means the chosen
158
+ resolution did not take. Stop re-spawning; escalate as a stall.
159
+ - **Total.** Count every conflict return in this revision loop, whatever property each names. On
160
+ the THIRD, stop and escalate — an agent that alternates property names never trips the repeat
161
+ rule, so the repeat rule alone leaves the loop unbounded. This total is what actually bounds the
162
+ path; the repeat rule just catches the common case sooner.
163
+
164
+ Both escalate through the same gate the iteration cap uses. A conflict still never consumes a
165
+ revision iteration — the cap on conflicts is separate from, and additional to, the cap on
166
+ revisions.
167
+
168
+ **No workflow hands a conflict to a loop and returns.** Asking the user is the route everywhere;
169
+ recording is in addition to asking, never instead of it. `plan-phase` in particular never invokes
170
+ `/gsd:plan-review-convergence` — it runs *inside* that loop, so invoking it would be a cycle, and
171
+ "was I invoked by convergence?" is not a question the orchestrator can answer at runtime.
172
+
68
173
  ### After 3 Iterations
69
174
 
70
175
  If issues persist after 3 revision cycles:
@@ -95,3 +200,5 @@ If issues persist after 3 revision cycles:
95
200
  - **Each iteration gets a fresh agent spawn** -- don't try to continue in the same context
96
201
  - **Checker feedback must be inlined** -- the revision agent needs to see exactly what failed
97
202
  - **Don't silently swallow issues** -- always present the final state to the user after exiting the loop
203
+ - **A remediation hint is an example, not an order** -- an issue satisfied through a smaller valid
204
+ mechanism is addressed, and counts as resolved for the issue-count and stall checks
@@ -19,7 +19,7 @@ preserves named-dispatch behavior on older GSD installs that lack the query.
19
19
 
20
20
  The persona rides `${AGENT_SKILLS_<ROLE>}` (Phase 3 / #2510) regardless of the
21
21
  resolved type — on non-Claude runtimes with no `agent_skills` config,
22
- `gsd-tools query agent-skills <role>` returns the installed agent prompt as
22
+ `gsd_run query agent-skills <role>` returns the installed agent prompt as
23
23
  the block. So a coder dispatch with the planner persona injected gives kimi-code
24
24
  the planner's behavior in the coder built-in's process.
25
25
 
@@ -94,9 +94,10 @@ After completion, create SUMMARY.md with:
94
94
  **RED - Write failing test:**
95
95
  1. Create test file following project conventions
96
96
  2. Write test describing expected behavior (from `<behavior>` element)
97
- 3. Run test - it MUST fail
98
- 4. If test passes: feature exists or test is wrong. Investigate.
99
- 5. Commit: `test({phase}-{plan}): add failing test for [feature]`
97
+ 3. Run test - it MUST fail **intentionally** (#3770): the TARGET test you named must be the test that fails, on an assertion for the planned behavior. A nonzero exit alone is NOT RED — syntax errors, zero-test discovery, fixture crashes, parser errors, and unrelated assertions are INVALID_RED and must not authorize GREEN.
98
+ 4. Persist the RED evidence record (command, exit code, failing test, expected result, actual result) and verify it: `gsd_run check tdd-red-evidence <record.json>`. Only verdict `RED_EVIDENCE_OK` satisfies the RED gate; `INVALID_RED` blocks GREEN until the RED phase is fixed.
99
+ 5. If test passes: feature exists or test is wrong. Investigate.
100
+ 6. Commit: `test({phase}-{plan}): add failing test for [feature]`
100
101
 
101
102
  **GREEN - Implement to pass:**
102
103
  1. Write minimal code to make test pass
@@ -256,26 +257,30 @@ When `workflow.tdd_mode` is enabled in config, the RED/GREEN/REFACTOR gate seque
256
257
 
257
258
  | Gate | Required | Commit Pattern | Validation |
258
259
  |------|----------|---------------|------------|
259
- | RED | Yes | `test({phase}-{plan}): ...` | Test exists AND fails before implementation |
260
+ | RED | Yes | `test({phase}-{plan}): ...` | Test exists AND fails before implementation — intentionally: `check tdd-red-evidence` returns `RED_EVIDENCE_OK` (target test failed on an assertion for the behavior; anything else is INVALID_RED) |
260
261
  | GREEN | Yes | `feat({phase}-{plan}): ...` | Test passes after implementation |
261
262
  | REFACTOR | No | `refactor({phase}-{plan}): ...` | Tests still pass after cleanup |
262
263
 
263
264
  ### Fail-Fast Rules
264
265
 
265
266
  1. **Unexpected GREEN in RED phase:** If the test passes before any implementation code is written, STOP. The feature may already exist or the test is wrong. Investigate before proceeding.
266
- 2. **Missing RED commit:** If no `test(...)` commit precedes the `feat(...)` commit, the TDD discipline was violated. Flag in SUMMARY.md.
267
- 3. **REFACTOR breaks tests:** Undo the refactor immediately. Commit was premature — refactor in smaller steps.
267
+ 2. **INVALID_RED in RED phase (#3770):** A nonzero exit is not RED by itself. Zero-test discovery, fixture/load crashes, nonzero exits with no failing test, unrelated failing tests, and unexpected greens all classify as INVALID_RED (`gsd_run check tdd-red-evidence`). STOP and fix the RED phase — do NOT proceed to GREEN.
268
+ 3. **Missing RED commit:** If no `test(...)` commit precedes the `feat(...)` commit, the TDD discipline was violated. Flag in SUMMARY.md.
269
+ 4. **REFACTOR breaks tests:** Undo the refactor immediately. Commit was premature — refactor in smaller steps.
268
270
 
269
271
  ### Executor Gate Validation
270
272
 
271
273
  After completing a `type: tdd` plan, the executor validates the git log:
272
274
  ```bash
275
+ # The commit protocol promises no zero-padding for ${PHASE}/${PLAN} — strip both and
276
+ # match the commit-scope position anchored (#4003).
277
+ PHASE_N=$((10#${PHASE})); PLAN_N=$((10#${PLAN}))
273
278
  # Check for RED gate commit
274
- git log --oneline --grep="^test(${PHASE}-${PLAN})" | head -1
279
+ git log --oneline -E --grep="^test\((0*${PHASE_N})-(0*${PLAN_N})\):" | head -1
275
280
  # Check for GREEN gate commit
276
- git log --oneline --grep="^feat(${PHASE}-${PLAN})" | head -1
281
+ git log --oneline -E --grep="^feat\((0*${PHASE_N})-(0*${PLAN_N})\):" | head -1
277
282
  # Check for optional REFACTOR gate commit
278
- git log --oneline --grep="^refactor(${PHASE}-${PLAN})" | head -1
283
+ git log --oneline -E --grep="^refactor\((0*${PHASE_N})-(0*${PLAN_N})\):" | head -1
279
284
  ```
280
285
 
281
286
  If RED or GREEN gate commits are missing, add a `## TDD Gate Compliance` section to SUMMARY.md with the violation details.
@@ -289,9 +294,7 @@ When `workflow.tdd_mode` is enabled, the execute-phase orchestrator inserts a co
289
294
  ### Review Checkpoint Format
290
295
 
291
296
  ```
292
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
293
- TDD REVIEW — Phase {X}
294
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
297
+ ### TDD REVIEW — Phase {X}
295
298
 
296
299
  TDD Plans: {count} | Gate violations: {count}
297
300
 
@@ -2,14 +2,51 @@
2
2
 
3
3
  Visual patterns for user-facing GSD output. Orchestrators @-reference this file.
4
4
 
5
+ ## Separators and Banners
6
+
7
+ **Never emit a fixed-width run of box-drawing characters.** A run of `━`, `─` or
8
+ `═` is ordinary text to the host that renders your output. In a narrower pane it
9
+ wraps, leaving orphan glyphs on a second line and coming apart from the heading it
10
+ was meant to frame. Markdown adapts to the available width; a 53-character rule
11
+ does not.
12
+
13
+ Three forms, and nothing else:
14
+
15
+ | Need | Emit |
16
+ |---|---|
17
+ | A titled section — stage, phase, checkpoint, completion, error | `### {TITLE}` (ATX heading) |
18
+ | A break between two sections | `---` on its own line, **with a blank line above it** |
19
+ | A framed panel of rows | `### {TITLE}` followed by the rows as plain lines |
20
+
21
+ **The blank line above `---` is load-bearing, not cosmetic.** A `---` placed
22
+ directly under a line of text is parsed as a setext heading underline for that
23
+ line, not as a thematic break — the rule silently swallows the line above it. A
24
+ blank line is what makes it a thematic break. (A blank line *after* `---` is
25
+ optional: a thematic break is a leaf block, so whatever follows starts a new
26
+ block either way. Add one where it reads better.)
27
+
28
+ **A stage banner is a heading alone — do not put a `---` above it.** An ATX
29
+ heading already separates, and it cannot be misparsed the way a bare `---` can.
30
+
31
+ ### Why this is unconditional, not per-runtime
32
+
33
+ The alternative considered was a `rendersMarkdown` capability key, keeping
34
+ line-art for terminal-oriented runtimes and Markdown for Markdown hosts. It was
35
+ rejected: it needs a new descriptor key across every runtime plus the resolver,
36
+ and it leaves two output conventions to keep in sync forever — the divergence
37
+ class this repo already has a defect entry for. A heading and a thematic break
38
+ carry the same structure in a plain terminal that a rule pair did, without
39
+ committing to a width, so the second convention buys nothing. If a runtime ever
40
+ turns up that genuinely needs line-art, add the key then, against that evidence.
41
+
42
+ ---
43
+
5
44
  ## Stage Banners
6
45
 
7
46
  Use for major workflow transitions.
8
47
 
9
48
  ```
10
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
11
- GSD ► {STAGE NAME}
12
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
49
+ ### GSD ► {STAGE NAME}
13
50
  ```
14
51
 
15
52
  **Stage names (uppercase):**
@@ -25,20 +62,18 @@ Use for major workflow transitions.
25
62
 
26
63
  ---
27
64
 
28
- ## Checkpoint Boxes
65
+ ## Checkpoint Panels
29
66
 
30
- User action required. 62-character width.
67
+ User action required.
31
68
 
32
69
  ```
33
- ╔══════════════════════════════════════════════════════════════╗
34
- ║ CHECKPOINT: {Type} ║
35
- ╚══════════════════════════════════════════════════════════════╝
70
+ ### CHECKPOINT: {Type}
36
71
 
37
72
  {Content}
38
73
 
39
- ──────────────────────────────────────────────────────────────
40
- → {ACTION PROMPT}
41
- ──────────────────────────────────────────────────────────────
74
+ ---
75
+
76
+ **→ {ACTION PROMPT}**
42
77
  ```
43
78
 
44
79
  **Types:**
@@ -60,6 +95,9 @@ User action required. 62-character width.
60
95
  🎉 Milestone complete (only in banner)
61
96
  ```
62
97
 
98
+ Status symbols are single characters, not runs — they do not wrap and are
99
+ unaffected by the separator rule above.
100
+
63
101
  ---
64
102
 
65
103
  ## Progress Display
@@ -79,6 +117,9 @@ Tasks: 2/4 complete
79
117
  Plans: 3/5 complete
80
118
  ```
81
119
 
120
+ The bar itself is a fixed 10-cell gauge, not a separator; it is intentionally
121
+ fixed-width and stays as it is.
122
+
82
123
  ---
83
124
 
84
125
  ## Spawning Indicators
@@ -104,7 +145,7 @@ Plans: 3/5 complete
104
145
  Always at end of major completions.
105
146
 
106
147
  ```
107
- ───────────────────────────────────────────────────────────────
148
+ ---
108
149
 
109
150
  ## ▶ Next Up
110
151
 
@@ -114,23 +155,19 @@ Always at end of major completions.
114
155
 
115
156
  `{copy-paste command}`
116
157
 
117
- ───────────────────────────────────────────────────────────────
158
+ ---
118
159
 
119
160
  **Also available:**
120
161
  - `/gsd-alternative-1` — description
121
162
  - `/gsd-alternative-2` — description
122
-
123
- ───────────────────────────────────────────────────────────────
124
163
  ```
125
164
 
126
165
  ---
127
166
 
128
- ## Error Box
167
+ ## Error Panel
129
168
 
130
169
  ```
131
- ╔══════════════════════════════════════════════════════════════╗
132
- ║ ERROR ║
133
- ╚══════════════════════════════════════════════════════════════╝
170
+ ### ERROR
134
171
 
135
172
  {Error description}
136
173
 
@@ -149,14 +186,21 @@ Always at end of major completions.
149
186
  | 3 | ○ | 0/2 | 0% |
150
187
  ```
151
188
 
189
+ Table rules use ASCII `-`, never box-drawing characters.
190
+
152
191
  ---
153
192
 
154
193
  ## Anti-Patterns
155
194
 
156
- - Varying box/banner widths
157
- - Mixing banner styles (`===`, `---`, `***`)
195
+ - Fixed-width runs of `━`, `─` or `═` as separators — they wrap in a narrow pane
196
+ - Box panels drawn with double-line box characters (U+2554, U+2557, U+255A, U+255D, U+2551, U+2560, U+2563) — the borders wrap independently of their contents. They are named here by code point rather than shown, because the guard below rejects the characters themselves anywhere in shipped content.
197
+ - A `---` directly under a line of text with no blank line between — that is a setext heading underline, not a break, and it swallows the line above
198
+ - Boxing a heading between two rules — the heading is the separator
199
+ - Mixing banner styles (`===`, `***`)
158
200
  - Skipping `GSD ►` prefix in banners
159
201
  - Random emoji (`🚀`, `✨`, `💫`)
160
202
  - Missing Next Up block after completions
161
203
 
204
+ Enforced by `tests/responsive-separators.test.cjs`.
205
+
162
206
  </ui_patterns>
@@ -69,5 +69,5 @@ closed). The **open subset is prose-owned in [domain-probes.md](./domain-probes.
69
69
  real-time/offline/optimistic-UI, deep accessibility (WCAG breadth), i18n / RTL depth, and
70
70
  emerging interaction paradigms (gesture/voice/reduced-motion/print) are open-ended and
71
71
  cue-triggered — they do not belong in this closed taxonomy. This probe **complements** the
72
- `gsd-ui-checker` six quality dimensions (it adds a state-coverage axis); it does not change the
72
+ `gsd-ui-checker` seven quality dimensions (it adds a state-coverage axis); it does not change the
73
73
  BLOCK/FLAG/PASS enum or the dimensions themselves.
@@ -34,7 +34,7 @@ Reference: `gsd-core/references/questioning.md` for the full anti-pattern list.
34
34
 
35
35
  ## State Management Anti-Patterns
36
36
 
37
- 15. **No direct Write/Edit to STATE.md or ROADMAP.md for mutations.** Always use `gsd-tools query` for registered state/roadmap handlers (e.g. `state.update`, `state.advance-plan`, `roadmap.update-plan-progress`), or legacy `node …/gsd-tools.cjs` for CLI-only commands. Direct Write tool usage bypasses safe update logic and is unsafe in multi-session environments. Exception: first-time creation of STATE.md from template is allowed.
37
+ 15. **No direct Write/Edit to STATE.md or ROADMAP.md for mutations.** Always use `gsd_run query` for registered state/roadmap handlers (e.g. `state.update`, `state.advance-plan`, `roadmap.update-plan-progress`), or legacy `node …/gsd-tools.cjs` for CLI-only commands. Direct Write tool usage bypasses safe update logic and is unsafe in multi-session environments. Exception: first-time creation of STATE.md from template is allowed.
38
38
 
39
39
  ## Behavioral Rules
40
40
 
@@ -53,7 +53,7 @@ Reference: `gsd-core/references/questioning.md` for the full anti-pattern list.
53
53
  ## GSD-Specific Rules
54
54
 
55
55
  24. **Do not** check for `mode === 'auto'` or `mode === 'autonomous'` -- GSD uses `yolo` config flag. Check `yolo: true` for autonomous mode, absence or `false` for interactive mode.
56
- 25. **Prefer `gsd-tools query`** for orchestration when a handler exists; when shelling out to the legacy CLI, use **`gsd-tools.cjs`** (not `gsd-tools.js` or any other filename) — GSD ships the programmatic API as CommonJS for Node.js CLI compatibility.
56
+ 25. **Prefer `gsd_run query`** for orchestration when a handler exists; when shelling out to the legacy CLI, go through the same `gsd_run` launcher rather than naming the shim file. The shim is not on PATH under any name ending in `.cjs`, and an agent that meets the bare filename falls back to searching the filesystem for it — on Git Bash for Windows that is a full-drive `find.exe` traversal (#3809). `gsd_run` resolves the CommonJS shim itself across every runtime home.
57
57
  26. **Plan files MUST follow `{padded_phase}-{NN}-PLAN.md` pattern** (e.g., `01-01-PLAN.md`). Never use `PLAN-01.md`, `plan-01.md`, or any other variation -- gsd-tools detection depends on this exact pattern.
58
58
  27. **Do not start executing the next plan before writing the SUMMARY.md for the current plan** -- downstream plans may reference it via `@` includes.
59
59
 
@@ -0,0 +1,160 @@
1
+ # Convergence Evidence Gate (#3304)
2
+
3
+ Bounds Step 7's anti-pattern scan so an approved gap-closure contract can
4
+ actually close. Applies **only** when `is_re_verification = true` (Step 0) —
5
+ a first pass has no prior contract to be out-of-contract from, so this gate
6
+ is a pure no-op there.
7
+
8
+ ## The problem this closes
9
+
10
+ Steps 4-7c re-verify at full, unbounded scope on every re-verification pass —
11
+ that is documented, intended design, not the bug. The bug is narrower: Step
12
+ 7's `Categorize:` line lets the verifier's own free-form judgment label
13
+ *anything* it believes "prevents goal" a 🛑 Blocker, and Step 9 Rule 1
14
+ promotes any 🛑 Blocker straight into `status: gaps_found` — with no
15
+ distinction between a blocker tied to what the gap-closure round was actually
16
+ supposed to fix and a blocker that is simply a new opinion formed on this
17
+ pass. Reported real-world instance: a re-verification cycle promoted four
18
+ "architectural and security observations" to blockers, none backed by a
19
+ failing test, none traceable to a requirement/decision/prior gap, reverting a
20
+ completed, all-green gap-closure round and recommending another `--gaps`
21
+ cycle — with no bound on how many times that could repeat.
22
+
23
+ Truths, artifacts, and key links (Steps 3-6) can **never** produce this
24
+ failure mode: Step 0 re-verification mode reuses the must-haves extracted in
25
+ Step 2 verbatim ("Skip to Step 3") rather than re-establishing them, so
26
+ whatever a truth/artifact/link *is* was fixed before this re-verification
27
+ round started. Only Step 7's blanket per-file scan is unbounded by that
28
+ must-haves contract — which is exactly the mechanism the issue's diagnosis
29
+ names. This gate therefore touches Step 7 only.
30
+
31
+ ## Definitions
32
+
33
+ **Self-evidencing blocker (unaffected by this gate).** The debt-marker gate
34
+ (`TBD`/`FIXME`/`XXX` with no `issue #123`/`PR #123`/`#123`/`DEF-*` reference
35
+ on the same line) is the *only* Step 7 category with zero judgment
36
+ component — a regex match plus the absence of a follow-up reference, nothing
37
+ inferred. Its own textual presence in the file is the deterministic evidence.
38
+ It keeps blocking unconditionally, exactly as before. Do **not** extend this
39
+ carve-out to any other Step 7 category (stub classification, hollow props,
40
+ empty implementations, console-log-only): every one of those already
41
+ requires judgment per Step 7's own "Stub classification" paragraph ("a grep
42
+ match is a STUB only when the value flows to rendering... and no other code
43
+ path populates it with real data") — that judgment is exactly what this gate
44
+ exists to check.
45
+
46
+ **New-scope finding.** Any Step 7 🛑 Blocker other than a self-evidencing one
47
+ (above) is a new-scope finding **unless** either of the following holds, in
48
+ which case it is in-contract and blocks unconditionally, evidence or not:
49
+
50
+ 1. **Carried-forward gap** — it matches an item in the previous
51
+ VERIFICATION.md's `gaps:` list, using the same 80%-token-overlap matching
52
+ algorithm Step 3b already uses for override matching (normalize to
53
+ lowercase, strip punctuation, collapse whitespace, tokenize, intersect).
54
+ 2. **Regression** — the flagged file was modified since the previous
55
+ VERIFICATION.md's `verified:` timestamp. Check file-level, not
56
+ line-level — an LLM agent re-deriving precise line provenance mid-pass is
57
+ unreliable; file-level modification is a single, robust command:
58
+
59
+ ```bash
60
+ git log --since="$PREV_VERIFIED_TS" --oneline -- "$file"
61
+ ```
62
+
63
+ A non-empty result means the file changed since the prior pass — the
64
+ gap-closure round could plausibly have introduced this finding, so it's
65
+ self-evidencing as a regression and blocks. **Fail closed**: if git
66
+ history is unavailable, ambiguous, or the timestamp can't be parsed,
67
+ treat the file as modified (blocks). The imprecision this trades away
68
+ (a big file with one unrelated hunk touched treats every pattern in it as
69
+ "new") only ever makes *more* things block, never fewer — consistent with
70
+ `<adversarial_stance>`.
71
+
72
+ A finding that is neither a carried-forward gap nor on a file modified since
73
+ the prior pass predates the gap-closure round entirely and was never flagged
74
+ as a gap then — this is the literal "some findings predated the gap
75
+ implementation and had previously been explicitly treated as non-blocking"
76
+ case from the issue.
77
+
78
+ **Deterministic evidence** — required for a new-scope finding to stay
79
+ blocking. One of:
80
+
81
+ - A **named test that FAILS when actually run** (red). Run exactly one test,
82
+ the same discipline Step 7b already uses for behavioral spot-checks —
83
+ never the full suite. Record the exact command and the failing output.
84
+ - **Another concrete, reproducible artifact** — a command + output that
85
+ demonstrates the defect (a crash, a probe failure, a reproducible bad
86
+ response). An assertion, opinion, or architectural preference with no test
87
+ and no reproducible command output is not evidence, however well-reasoned.
88
+
89
+ ## The gate
90
+
91
+ - New-scope finding **with** deterministic evidence → 🛑 Blocker, unchanged.
92
+ This includes evidenced security findings — they are preserved and still
93
+ block.
94
+ - New-scope finding **without** deterministic evidence → downgrade out of
95
+ the blocker set. Record it in the `advisory:` frontmatter list (parallel to
96
+ the existing Step 9b `deferred:` list) with its reasoning intact. It does
97
+ **not** count toward Step 9 Rule 1's `gaps_found` trigger and does **not**
98
+ revert a completed must-have or, on its own, justify another
99
+ `/gsd:plan-phase --gaps` cycle.
100
+
101
+ This changes nothing else: a carried-forward gap or a regression still
102
+ blocks with or without a pre-existing requirement to point at, and every
103
+ non-Step-7 trigger (FAILED truth, MISSING/STUB artifact, NOT_WIRED link) is
104
+ untouched, since those can never be new-scope in the first place.
105
+
106
+ ## What this deliberately does NOT implement
107
+
108
+ The issue as filed proposed a broader rule: a finding is advisory whenever
109
+ it is untraceable to a requirement/decision/prior-gap (conditions A and B),
110
+ regardless of evidence. The maintainer approved **condition C only** —
111
+ evidence, not contract-traceability, is the bar. A finding with no
112
+ pre-existing requirement to point at but with a real failing test still
113
+ blocks. Do not implement A/B: that would demote a genuine, reproducible
114
+ defect to advisory purely for being newly discovered, which is exactly the
115
+ deferral this project's no-defer rule forbids. This gate narrows *when a
116
+ blocker needs proof*, not *what counts as in scope*.
117
+
118
+ ## Advisory frontmatter
119
+
120
+ ```yaml
121
+ advisory: # Only if new-scope findings lack deterministic evidence (Step 7)
122
+ - finding: "Short description of the new-scope concern"
123
+ category: architectural | security | other
124
+ reason: "Why this was raised; what would resolve it"
125
+ evidence_status: "none provided" # or cite what was attempted but inconclusive
126
+ ```
127
+
128
+ ## Report section
129
+
130
+ ```markdown
131
+ ### Advisory (New Scope, Unevidenced)
132
+
133
+ New-scope findings from Step 7 with no deterministic evidence — reported,
134
+ not blocking, do not revert a completed must-have.
135
+
136
+ | # | Finding | Category | Why Advisory |
137
+ |---|---------|----------|--------------|
138
+ | 1 | {finding} | {category} | new-scope, no deterministic evidence |
139
+ ```
140
+
141
+ Include this section (even if empty, stating "None") whenever
142
+ `is_re_verification = true` ran — an omitted section reads as "not
143
+ checked," not "checked and clean."
144
+
145
+ ## Worked example (from the issue's reported incident)
146
+
147
+ Prior pass: `gaps_found`, 4 items — all closed by approved gap-closure plans,
148
+ re-verification begins.
149
+
150
+ - Finding: "the retry loop's backoff strategy is architecturally fragile
151
+ under sustained load." Not in the prior `gaps:` list. The flagged file was
152
+ last modified 3 weeks before this verification pass (before the
153
+ gap-closure plans even started) — not a regression. No test run, no
154
+ reproducible command demonstrating a failure. → **advisory**, does not
155
+ block, does not revert the 4 closed gaps.
156
+ - Finding: `TBD: handle the timeout case` left in a file the gap-closure plan
157
+ edited this pass. → self-evidencing debt marker, unaffected by this gate,
158
+ blocks exactly as it always has.
159
+ - Finding: a previously-closed gap's file now fails the SAME named test that
160
+ originally proved it broken. → carried-forward gap, blocks.
@@ -0,0 +1,42 @@
1
+ # Verify Command Path Resolvability (#2401)
2
+
3
+ > Reference file for gsd-plan-checker agent. Loaded on-demand via `@` reference.
4
+
5
+ **Question:** Does each `<automated>` command's target directory actually resolve from the
6
+ executor's cwd (the project root)? Format sanity above asks whether the *pattern* can match;
7
+ this asks whether the command can *run at all*.
8
+
9
+ **Do not hand-reason the filesystem.** #2401 is precisely the failure of doing so: this
10
+ checker flagged a bad `cd ../../frontend` (correct), then prescribed two successively-wrong
11
+ replacement paths — the second citing a `package.json` that did not exist. Consume the
12
+ deterministic probe result, never re-derive it yourself.
13
+
14
+ `gsd-core/workflows/plan-phase.md` already runs the probe **before** spawning this checker and
15
+ interpolates the result into the verification prompt as `{VERIFY_PATHS}`, inside a
16
+ `<verify_command_path_probe>` block. This dimension reads that already-supplied JSON — it never
17
+ invokes `gsd_run check verify-command-paths` itself. If `{VERIFY_PATHS}` is absent from the
18
+ prompt, treat this dimension as silent (nothing to check) rather than trying to run the probe.
19
+
20
+ The probe never executes command text (PLAN.md is untrusted, LLM-authored). It recognizes two
21
+ grounded forms — a leading `cd <literal>` chain and `npm --prefix <literal>` — and refuses to
22
+ guess at anything else.
23
+
24
+ **Process:** for each row in `.commands`, act on `severity` only:
25
+
26
+ | `severity` | `reason` | Action |
27
+ |---|---|---|
28
+ | `blocker` | `missing_dir` / `no_manifest` | **BLOCKER** — quote `rawTarget` and `target` verbatim |
29
+ | `warning` | `dynamic_path` / `outside_root` / `script_missing` / `manifest_unreadable` | **WARNING** |
30
+ | `none` | — | silent |
31
+
32
+ Rules:
33
+ - **Report, never prescribe.** State the target that failed to resolve and what was missing.
34
+ Choosing the replacement is the planner's job — it now receives the prior phase's proven
35
+ commands (see `prior_verify_commands` in the planning context).
36
+ - `status: pending_creation` means an earlier task in this phase creates that directory. **Not
37
+ a finding.** Say nothing.
38
+ - `unresolvable` means the probe could not ground the path (a variable, glob, substitution, or
39
+ `~`). That is a WARNING, never a BLOCKER — and never a licence to guess the literal path.
40
+ - A non-empty `readError` means the probe **could not look**. Report that as a WARNING in its
41
+ own words; it is not a clean bill of health.
42
+ - `MISSING …` sentinels are Dimension 8's business — this dimension stays silent on them.
@@ -14,7 +14,7 @@ The user-flow form mirrors what a real user does: open, fill, click, see. No HTT
14
14
  ## When this framing applies
15
15
 
16
16
  The framing fires when:
17
- - The phase under verification has `**Mode:** mvp` in ROADMAP.md (parsed via `gsd-tools query roadmap.get-phase --pick mode`).
17
+ - The phase under verification has `**Mode:** mvp` in ROADMAP.md (parsed via `gsd_run query roadmap.get-phase --pick mode`).
18
18
  - AND the phase has a user-story-formatted goal (set by `/gsd mvp-phase` per Phase 2): "As a [user role], I want to [capability], so that [outcome]."
19
19
 
20
20
  If the phase has `mode: mvp` but the goal is NOT in user-story format, the verifier surfaces this as a discrepancy and asks the user to run `/gsd mvp-phase` to reformat the goal — same pattern as the planner agent under MVP_MODE (per `gsd-core/references/planner-mvp-mode.md`).