@opengsd/gsd-pi 1.2.0-dev.fbdca60b → 1.3.0-dev.65546769

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 (835) hide show
  1. package/README.md +13 -7
  2. package/dist/cli.js +28 -1
  3. package/dist/headless-context.js +0 -1
  4. package/dist/headless-events.d.ts +16 -1
  5. package/dist/headless-events.js +19 -2
  6. package/dist/headless.js +8 -1
  7. package/dist/help-text.js +29 -0
  8. package/dist/hermes-integration-install.d.ts +17 -0
  9. package/dist/hermes-integration-install.js +199 -0
  10. package/dist/jiti-workspace-aliases.d.ts +11 -2
  11. package/dist/jiti-workspace-aliases.js +19 -3
  12. package/dist/onboarding.js +9 -4
  13. package/dist/provider-migrations.d.ts +23 -0
  14. package/dist/provider-migrations.js +41 -0
  15. package/dist/read-cli.d.ts +23 -0
  16. package/dist/read-cli.js +90 -0
  17. package/dist/resource-loader.d.ts +3 -3
  18. package/dist/resource-loader.js +4 -13
  19. package/dist/resources/.managed-resources-content-hash +1 -1
  20. package/dist/resources/GSD-WORKFLOW.md +22 -22
  21. package/dist/resources/extensions/claude-code-cli/index.js +7 -1
  22. package/dist/resources/extensions/claude-code-cli/stream-adapter.js +73 -20
  23. package/dist/resources/extensions/google-cli/stream-adapter.js +16 -1
  24. package/dist/resources/extensions/gsd/auto/dispatch-history.js +6 -1
  25. package/dist/resources/extensions/gsd/auto/loop.js +67 -2
  26. package/dist/resources/extensions/gsd/auto/orchestrator.js +50 -10
  27. package/dist/resources/extensions/gsd/auto/pre-dispatch.js +8 -0
  28. package/dist/resources/extensions/gsd/auto/workflow-kernel.js +15 -1
  29. package/dist/resources/extensions/gsd/auto-artifact-paths.js +81 -19
  30. package/dist/resources/extensions/gsd/auto-closeout-messaging.js +90 -0
  31. package/dist/resources/extensions/gsd/auto-dashboard.js +255 -431
  32. package/dist/resources/extensions/gsd/auto-direct-dispatch.js +15 -3
  33. package/dist/resources/extensions/gsd/auto-dispatch.js +47 -8
  34. package/dist/resources/extensions/gsd/auto-model-selection.js +14 -8
  35. package/dist/resources/extensions/gsd/auto-post-unit.js +39 -29
  36. package/dist/resources/extensions/gsd/auto-prompts.js +44 -30
  37. package/dist/resources/extensions/gsd/auto-recovery.js +118 -40
  38. package/dist/resources/extensions/gsd/auto-runtime-state.js +13 -0
  39. package/dist/resources/extensions/gsd/auto-start.js +58 -31
  40. package/dist/resources/extensions/gsd/auto-verification.js +5 -2
  41. package/dist/resources/extensions/gsd/auto-worktree.js +149 -91
  42. package/dist/resources/extensions/gsd/auto.js +97 -31
  43. package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +42 -54
  44. package/dist/resources/extensions/gsd/bootstrap/fallback-continuation.js +25 -0
  45. package/dist/resources/extensions/gsd/bootstrap/register-extension.js +24 -2
  46. package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +108 -9
  47. package/dist/resources/extensions/gsd/bootstrap/system-context.js +164 -44
  48. package/dist/resources/extensions/gsd/bootstrap/tool-search-shim.js +22 -3
  49. package/dist/resources/extensions/gsd/bootstrap/write-gate.js +113 -27
  50. package/dist/resources/extensions/gsd/closeout-consistency-gate.js +92 -4
  51. package/dist/resources/extensions/gsd/closeout-wizard.js +8 -3
  52. package/dist/resources/extensions/gsd/codebase-generator.js +5 -8
  53. package/dist/resources/extensions/gsd/commands/catalog.js +6 -0
  54. package/dist/resources/extensions/gsd/commands/dispatcher.js +3 -0
  55. package/dist/resources/extensions/gsd/commands/gsd-core-aliases-handler.js +39 -0
  56. package/dist/resources/extensions/gsd/commands/gsd-core-aliases.js +44 -0
  57. package/dist/resources/extensions/gsd/commands/handlers/core.js +52 -8
  58. package/dist/resources/extensions/gsd/commands/handlers/ops.js +227 -3
  59. package/dist/resources/extensions/gsd/commands-cmux.js +3 -1
  60. package/dist/resources/extensions/gsd/commands-gsd-core.js +868 -0
  61. package/dist/resources/extensions/gsd/commands-handlers.js +67 -1
  62. package/dist/resources/extensions/gsd/commands-maintenance.js +79 -2
  63. package/dist/resources/extensions/gsd/commands-prefs-wizard.js +14 -1
  64. package/dist/resources/extensions/gsd/commands-verdict.js +17 -11
  65. package/dist/resources/extensions/gsd/compat/compat-marker.js +172 -0
  66. package/dist/resources/extensions/gsd/compat/index.js +3 -0
  67. package/dist/resources/extensions/gsd/compat/planning-compat.js +142 -0
  68. package/dist/resources/extensions/gsd/config-overlay.js +11 -8
  69. package/dist/resources/extensions/gsd/consent-question.js +12 -0
  70. package/dist/resources/extensions/gsd/consent-verdict.js +10 -0
  71. package/dist/resources/extensions/gsd/dashboard-overlay.js +39 -3
  72. package/dist/resources/extensions/gsd/db/engine.js +27 -0
  73. package/dist/resources/extensions/gsd/db/queries.js +54 -0
  74. package/dist/resources/extensions/gsd/db/unit-dispatches.js +22 -1
  75. package/dist/resources/extensions/gsd/db/writers/reconcile.js +19 -1
  76. package/dist/resources/extensions/gsd/db-workspace.js +13 -1
  77. package/dist/resources/extensions/gsd/discussion-handoff.js +9 -5
  78. package/dist/resources/extensions/gsd/doctor-git-checks.js +30 -4
  79. package/dist/resources/extensions/gsd/doctor-providers.js +1 -1
  80. package/dist/resources/extensions/gsd/doctor-runtime-checks.js +13 -24
  81. package/dist/resources/extensions/gsd/doctor.js +28 -7
  82. package/dist/resources/extensions/gsd/error-classifier.js +13 -1
  83. package/dist/resources/extensions/gsd/escalation.js +11 -4
  84. package/dist/resources/extensions/gsd/export-html.js +10 -3
  85. package/dist/resources/extensions/gsd/export.js +73 -0
  86. package/dist/resources/extensions/gsd/file-lock.js +1 -1
  87. package/dist/resources/extensions/gsd/flat-phase-migration.js +176 -0
  88. package/dist/resources/extensions/gsd/forensics.js +2 -1
  89. package/dist/resources/extensions/gsd/git-service.js +7 -4
  90. package/dist/resources/extensions/gsd/gitignore.js +6 -2
  91. package/dist/resources/extensions/gsd/guidance.js +7 -7
  92. package/dist/resources/extensions/gsd/guided-flow.js +11 -6
  93. package/dist/resources/extensions/gsd/layout-policy.js +75 -0
  94. package/dist/resources/extensions/gsd/markdown-renderer.js +391 -116
  95. package/dist/resources/extensions/gsd/mcp-filter.js +44 -10
  96. package/dist/resources/extensions/gsd/md-importer.js +153 -51
  97. package/dist/resources/extensions/gsd/metrics.js +19 -11
  98. package/dist/resources/extensions/gsd/migrate/layout-detect.js +32 -0
  99. package/dist/resources/extensions/gsd/migrate/planning-writer.js +203 -0
  100. package/dist/resources/extensions/gsd/migrate-external.js +51 -6
  101. package/dist/resources/extensions/gsd/migration-auto-check.js +5 -14
  102. package/dist/resources/extensions/gsd/milestone-actions.js +5 -3
  103. package/dist/resources/extensions/gsd/milestone-closeout.js +12 -2
  104. package/dist/resources/extensions/gsd/milestone-ids.js +50 -19
  105. package/dist/resources/extensions/gsd/milestone-planning-persistence.js +8 -0
  106. package/dist/resources/extensions/gsd/milestone-validation-verdict.js +7 -4
  107. package/dist/resources/extensions/gsd/model-router.js +79 -20
  108. package/dist/resources/extensions/gsd/notification-store.js +22 -29
  109. package/dist/resources/extensions/gsd/notifications.js +36 -7
  110. package/dist/resources/extensions/gsd/observability-validator.js +12 -4
  111. package/dist/resources/extensions/gsd/parallel-monitor-overlay.js +133 -35
  112. package/dist/resources/extensions/gsd/parsers-legacy.js +40 -14
  113. package/dist/resources/extensions/gsd/paths.js +356 -44
  114. package/dist/resources/extensions/gsd/planning-depth.js +2 -1
  115. package/dist/resources/extensions/gsd/post-execution-checks.js +26 -3
  116. package/dist/resources/extensions/gsd/preferences-models.js +34 -14
  117. package/dist/resources/extensions/gsd/preferences.js +148 -13
  118. package/dist/resources/extensions/gsd/prompts/ai-integration-phase.md +28 -0
  119. package/dist/resources/extensions/gsd/prompts/audit-fix.md +39 -0
  120. package/dist/resources/extensions/gsd/prompts/audit-milestone.md +26 -0
  121. package/dist/resources/extensions/gsd/prompts/audit-uat.md +24 -0
  122. package/dist/resources/extensions/gsd/prompts/autonomous.md +31 -0
  123. package/dist/resources/extensions/gsd/prompts/code-review.md +37 -0
  124. package/dist/resources/extensions/gsd/prompts/complete-milestone.md +8 -2
  125. package/dist/resources/extensions/gsd/prompts/complete-slice.md +24 -15
  126. package/dist/resources/extensions/gsd/prompts/discuss-phase.md +31 -0
  127. package/dist/resources/extensions/gsd/prompts/docs-update.md +13 -0
  128. package/dist/resources/extensions/gsd/prompts/execute-phase.md +33 -0
  129. package/dist/resources/extensions/gsd/prompts/execute-task.md +5 -1
  130. package/dist/resources/extensions/gsd/prompts/explore.md +58 -0
  131. package/dist/resources/extensions/gsd/prompts/graphify.md +27 -0
  132. package/dist/resources/extensions/gsd/prompts/health.md +37 -0
  133. package/dist/resources/extensions/gsd/prompts/import.md +30 -0
  134. package/dist/resources/extensions/gsd/prompts/inbox.md +27 -0
  135. package/dist/resources/extensions/gsd/prompts/ingest-docs.md +30 -0
  136. package/dist/resources/extensions/gsd/prompts/manager.md +21 -0
  137. package/dist/resources/extensions/gsd/prompts/map-codebase.md +42 -0
  138. package/dist/resources/extensions/gsd/prompts/milestone-summary.md +27 -0
  139. package/dist/resources/extensions/gsd/prompts/mvp-phase.md +23 -0
  140. package/dist/resources/extensions/gsd/prompts/pause-work.md +24 -0
  141. package/dist/resources/extensions/gsd/prompts/phase.md +22 -0
  142. package/dist/resources/extensions/gsd/prompts/plan-phase.md +34 -0
  143. package/dist/resources/extensions/gsd/prompts/plan-review-convergence.md +34 -0
  144. package/dist/resources/extensions/gsd/prompts/profile-user.md +28 -0
  145. package/dist/resources/extensions/gsd/prompts/progress.md +30 -0
  146. package/dist/resources/extensions/gsd/prompts/quick-task.md +1 -1
  147. package/dist/resources/extensions/gsd/prompts/reactive-execute.md +2 -2
  148. package/dist/resources/extensions/gsd/prompts/resume-work.md +20 -0
  149. package/dist/resources/extensions/gsd/prompts/review-backlog.md +21 -0
  150. package/dist/resources/extensions/gsd/prompts/review.md +27 -0
  151. package/dist/resources/extensions/gsd/prompts/run-uat.md +5 -1
  152. package/dist/resources/extensions/gsd/prompts/secure-phase.md +24 -0
  153. package/dist/resources/extensions/gsd/prompts/settings.md +24 -0
  154. package/dist/resources/extensions/gsd/prompts/sketch.md +59 -0
  155. package/dist/resources/extensions/gsd/prompts/spec-phase.md +29 -0
  156. package/dist/resources/extensions/gsd/prompts/spike.md +59 -0
  157. package/dist/resources/extensions/gsd/prompts/stats.md +43 -0
  158. package/dist/resources/extensions/gsd/prompts/surface.md +25 -0
  159. package/dist/resources/extensions/gsd/prompts/thread.md +24 -0
  160. package/dist/resources/extensions/gsd/prompts/triage-captures.md +1 -1
  161. package/dist/resources/extensions/gsd/prompts/ui-phase.md +29 -0
  162. package/dist/resources/extensions/gsd/prompts/ui-review.md +29 -0
  163. package/dist/resources/extensions/gsd/prompts/ultraplan-phase.md +24 -0
  164. package/dist/resources/extensions/gsd/prompts/validate-phase.md +26 -0
  165. package/dist/resources/extensions/gsd/prompts/verify-work.md +24 -0
  166. package/dist/resources/extensions/gsd/prompts/workspace.md +22 -0
  167. package/dist/resources/extensions/gsd/prompts/workstreams.md +24 -0
  168. package/dist/resources/extensions/gsd/provider-error-guidance.js +24 -0
  169. package/dist/resources/extensions/gsd/queue-order.js +3 -2
  170. package/dist/resources/extensions/gsd/recovery-classification.js +8 -0
  171. package/dist/resources/extensions/gsd/roadmap-slices.js +1 -1
  172. package/dist/resources/extensions/gsd/safety/content-validator.js +2 -1
  173. package/dist/resources/extensions/gsd/safety/evidence-cross-ref.js +43 -1
  174. package/dist/resources/extensions/gsd/service-tier.js +2 -1
  175. package/dist/resources/extensions/gsd/session-lock.js +11 -9
  176. package/dist/resources/extensions/gsd/skills/gsd-headless/SKILL.md +3 -0
  177. package/dist/resources/extensions/gsd/skills/gsd-headless/references/commands.md +51 -0
  178. package/dist/resources/extensions/gsd/state-reconciliation/drift/artifact-db.js +51 -10
  179. package/dist/resources/extensions/gsd/state-reconciliation/drift/completion.js +24 -3
  180. package/dist/resources/extensions/gsd/state-reconciliation/drift/external-markdown-edit.js +82 -0
  181. package/dist/resources/extensions/gsd/state-reconciliation/drift/external-planning-edit.js +142 -0
  182. package/dist/resources/extensions/gsd/state-reconciliation/drift/project-md.js +19 -6
  183. package/dist/resources/extensions/gsd/state-reconciliation/drift/roadmap.js +2 -2
  184. package/dist/resources/extensions/gsd/state-reconciliation/drift/stale-render.js +95 -19
  185. package/dist/resources/extensions/gsd/state-reconciliation/index.js +36 -3
  186. package/dist/resources/extensions/gsd/state-reconciliation/registry.js +12 -0
  187. package/dist/resources/extensions/gsd/state.js +48 -17
  188. package/dist/resources/extensions/gsd/sync-lock.js +11 -18
  189. package/dist/resources/extensions/gsd/tool-surface-readiness.js +205 -16
  190. package/dist/resources/extensions/gsd/tools/complete-milestone.js +4 -2
  191. package/dist/resources/extensions/gsd/tools/complete-slice.js +12 -2
  192. package/dist/resources/extensions/gsd/tools/complete-task.js +15 -1
  193. package/dist/resources/extensions/gsd/tools/exec-tool.js +2 -109
  194. package/dist/resources/extensions/gsd/tools/plan-slice.js +1 -3
  195. package/dist/resources/extensions/gsd/tools/plan-task.js +16 -1
  196. package/dist/resources/extensions/gsd/tools/reassess-roadmap.js +9 -3
  197. package/dist/resources/extensions/gsd/tools/validate-milestone.js +8 -3
  198. package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +44 -5
  199. package/dist/resources/extensions/gsd/triage-resolution.js +14 -7
  200. package/dist/resources/extensions/gsd/tui/render-kit.js +38 -13
  201. package/dist/resources/extensions/gsd/undo.js +8 -9
  202. package/dist/resources/extensions/gsd/unit-registry.js +27 -3
  203. package/dist/resources/extensions/gsd/unmerged-milestone-guard.js +58 -2
  204. package/dist/resources/extensions/gsd/validation-block-guard.js +45 -0
  205. package/dist/resources/extensions/gsd/visualizer-data.js +35 -0
  206. package/dist/resources/extensions/gsd/visualizer-views.js +21 -2
  207. package/dist/resources/extensions/gsd/workflow-logger.js +4 -0
  208. package/dist/resources/extensions/gsd/workflow-mcp.js +9 -1
  209. package/dist/resources/extensions/gsd/workflow-projections.js +25 -4
  210. package/dist/resources/extensions/gsd/worktree-command.js +6 -6
  211. package/dist/resources/extensions/gsd/worktree-health.js +6 -3
  212. package/dist/resources/extensions/gsd/worktree-manager.js +109 -16
  213. package/dist/resources/extensions/gsd/worktree-safety.js +20 -11
  214. package/dist/resources/extensions/gsd/worktree-shell-guard.js +113 -0
  215. package/dist/resources/extensions/mcp-client/manager.js +3 -3
  216. package/dist/resources/extensions/search-the-web/index.js +41 -9
  217. package/dist/resources/extensions/search-the-web/native-search.js +18 -4
  218. package/dist/resources/extensions/shared/gsd-browser-cli.js +40 -2
  219. package/dist/resources/extensions/subagent/index.js +20 -15
  220. package/dist/resources/extensions/subagent/worktree-cwd.js +31 -0
  221. package/dist/tsconfig.extensions.tsbuildinfo +1 -1
  222. package/dist/update-check.js +15 -4
  223. package/dist/web/standalone/.next/BUILD_ID +1 -1
  224. package/dist/web/standalone/.next/app-path-routes-manifest.json +8 -8
  225. package/dist/web/standalone/.next/build-manifest.json +3 -3
  226. package/dist/web/standalone/.next/prerender-manifest.json +3 -3
  227. package/dist/web/standalone/.next/react-loadable-manifest.json +3 -3
  228. package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
  229. package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
  230. package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  231. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  232. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  233. package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  234. package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  235. package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  236. package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
  237. package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
  238. package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  239. package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  240. package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  241. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  242. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  243. package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  244. package/dist/web/standalone/.next/server/app/index.html +1 -1
  245. package/dist/web/standalone/.next/server/app/index.rsc +1 -1
  246. package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  247. package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
  248. package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  249. package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
  250. package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  251. package/dist/web/standalone/.next/server/app-paths-manifest.json +8 -8
  252. package/dist/web/standalone/.next/server/chunks/1128.js +1 -1
  253. package/dist/web/standalone/.next/server/chunks/5124.js +1 -1
  254. package/dist/web/standalone/.next/server/chunks/8357.js +1 -1
  255. package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
  256. package/dist/web/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
  257. package/dist/web/standalone/.next/server/pages/404.html +1 -1
  258. package/dist/web/standalone/.next/server/pages/500.html +1 -1
  259. package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
  260. package/dist/web/standalone/.next/static/chunks/{4283.e4873b058df143a1.js → 4283.8e446784528ed9dc.js} +2 -2
  261. package/dist/web/standalone/.next/static/chunks/8785.481aa5869991b760.js +1 -0
  262. package/dist/web/standalone/.next/static/chunks/{webpack-f0285ce91d4ec9ef.js → webpack-f46ea08200a0227e.js} +1 -1
  263. package/dist/web/standalone/node_modules/@gsd/native/package.json +1 -1
  264. package/dist/web/standalone/node_modules/node-pty/build/Makefile +2 -2
  265. package/dist/web/standalone/node_modules/node-pty/build/pty.target.mk +14 -14
  266. package/dist/web-mode.d.ts +3 -1
  267. package/dist/web-mode.js +7 -5
  268. package/integrations/hermes/README.md +48 -0
  269. package/integrations/hermes/docs/setup.md +272 -0
  270. package/integrations/hermes/docs/upstream-hermes-pr.md +40 -0
  271. package/integrations/hermes/open_gsd_hermes/__init__.py +105 -0
  272. package/integrations/hermes/open_gsd_hermes/binding.py +107 -0
  273. package/integrations/hermes/open_gsd_hermes/commands.py +186 -0
  274. package/integrations/hermes/open_gsd_hermes/config.py +59 -0
  275. package/integrations/hermes/open_gsd_hermes/credentials.py +51 -0
  276. package/integrations/hermes/open_gsd_hermes/cron.py +85 -0
  277. package/integrations/hermes/open_gsd_hermes/formatting.py +13 -0
  278. package/integrations/hermes/open_gsd_hermes/gsd_client.py +269 -0
  279. package/integrations/hermes/open_gsd_hermes/inject.py +31 -0
  280. package/integrations/hermes/open_gsd_hermes/memory.py +66 -0
  281. package/integrations/hermes/open_gsd_hermes/notifications.py +71 -0
  282. package/integrations/hermes/open_gsd_hermes/snapshot.py +42 -0
  283. package/integrations/hermes/open_gsd_hermes/supervisor.py +180 -0
  284. package/integrations/hermes/open_gsd_hermes/types.py +100 -0
  285. package/integrations/hermes/plugin.yaml +38 -0
  286. package/integrations/hermes/pyproject.toml +32 -0
  287. package/integrations/hermes/scripts/preflight.sh +92 -0
  288. package/integrations/hermes/tests/fixtures/minimal-project/.gsd/STATE.md +17 -0
  289. package/integrations/hermes/tests/golden/memory_prefetch.txt +5 -0
  290. package/integrations/hermes/tests/golden/snapshot.txt +8 -0
  291. package/integrations/hermes/tests/test_binding.py +103 -0
  292. package/integrations/hermes/tests/test_config.py +36 -0
  293. package/integrations/hermes/tests/test_cron.py +34 -0
  294. package/integrations/hermes/tests/test_gsd_client_cache.py +120 -0
  295. package/integrations/hermes/tests/test_memory.py +59 -0
  296. package/integrations/hermes/tests/test_read_cli_contract.py +50 -0
  297. package/integrations/hermes/tests/test_register.py +56 -0
  298. package/integrations/hermes/tests/test_snapshot.py +53 -0
  299. package/integrations/hermes/tests/test_supervisor_fsm.py +581 -0
  300. package/package.json +8 -7
  301. package/packages/cloud-mcp-gateway/dist/runtime-registry.d.ts +8 -0
  302. package/packages/cloud-mcp-gateway/dist/runtime-registry.d.ts.map +1 -1
  303. package/packages/cloud-mcp-gateway/dist/runtime-registry.js +19 -2
  304. package/packages/cloud-mcp-gateway/dist/runtime-registry.js.map +1 -1
  305. package/packages/cloud-mcp-gateway/dist/runtime-registry.test.js +71 -2
  306. package/packages/cloud-mcp-gateway/dist/runtime-registry.test.js.map +1 -1
  307. package/packages/cloud-mcp-gateway/package.json +2 -2
  308. package/packages/contracts/package.json +1 -1
  309. package/packages/daemon/package.json +4 -4
  310. package/packages/gsd-agent-core/dist/sdk.d.ts.map +1 -1
  311. package/packages/gsd-agent-core/dist/sdk.js +6 -2
  312. package/packages/gsd-agent-core/dist/sdk.js.map +1 -1
  313. package/packages/gsd-agent-core/package.json +5 -5
  314. package/packages/gsd-agent-modes/dist/modes/interactive/components/assistant-message.d.ts +5 -5
  315. package/packages/gsd-agent-modes/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  316. package/packages/gsd-agent-modes/dist/modes/interactive/components/assistant-message.js +12 -24
  317. package/packages/gsd-agent-modes/dist/modes/interactive/components/assistant-message.js.map +1 -1
  318. package/packages/gsd-agent-modes/dist/modes/interactive/components/bash-execution.js +5 -5
  319. package/packages/gsd-agent-modes/dist/modes/interactive/components/bash-execution.js.map +1 -1
  320. package/packages/gsd-agent-modes/dist/modes/interactive/components/branch-summary-message.d.ts +3 -3
  321. package/packages/gsd-agent-modes/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  322. package/packages/gsd-agent-modes/dist/modes/interactive/components/branch-summary-message.js +20 -11
  323. package/packages/gsd-agent-modes/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  324. package/packages/gsd-agent-modes/dist/modes/interactive/components/chat-turn-connect.d.ts +4 -3
  325. package/packages/gsd-agent-modes/dist/modes/interactive/components/chat-turn-connect.d.ts.map +1 -1
  326. package/packages/gsd-agent-modes/dist/modes/interactive/components/chat-turn-connect.js +5 -54
  327. package/packages/gsd-agent-modes/dist/modes/interactive/components/chat-turn-connect.js.map +1 -1
  328. package/packages/gsd-agent-modes/dist/modes/interactive/components/compaction-summary-message.d.ts +2 -4
  329. package/packages/gsd-agent-modes/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
  330. package/packages/gsd-agent-modes/dist/modes/interactive/components/compaction-summary-message.js +2 -4
  331. package/packages/gsd-agent-modes/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
  332. package/packages/gsd-agent-modes/dist/modes/interactive/components/custom-editor.d.ts +2 -0
  333. package/packages/gsd-agent-modes/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  334. package/packages/gsd-agent-modes/dist/modes/interactive/components/custom-editor.js +4 -0
  335. package/packages/gsd-agent-modes/dist/modes/interactive/components/custom-editor.js.map +1 -1
  336. package/packages/gsd-agent-modes/dist/modes/interactive/components/footer.d.ts +9 -12
  337. package/packages/gsd-agent-modes/dist/modes/interactive/components/footer.d.ts.map +1 -1
  338. package/packages/gsd-agent-modes/dist/modes/interactive/components/footer.js +100 -166
  339. package/packages/gsd-agent-modes/dist/modes/interactive/components/footer.js.map +1 -1
  340. package/packages/gsd-agent-modes/dist/modes/interactive/components/gsd-progress-state.d.ts +2 -0
  341. package/packages/gsd-agent-modes/dist/modes/interactive/components/gsd-progress-state.d.ts.map +1 -0
  342. package/packages/gsd-agent-modes/dist/modes/interactive/components/gsd-progress-state.js +4 -0
  343. package/packages/gsd-agent-modes/dist/modes/interactive/components/gsd-progress-state.js.map +1 -0
  344. package/packages/gsd-agent-modes/dist/modes/interactive/components/gsd-status-widget.d.ts +23 -0
  345. package/packages/gsd-agent-modes/dist/modes/interactive/components/gsd-status-widget.d.ts.map +1 -0
  346. package/packages/gsd-agent-modes/dist/modes/interactive/components/gsd-status-widget.js +178 -0
  347. package/packages/gsd-agent-modes/dist/modes/interactive/components/gsd-status-widget.js.map +1 -0
  348. package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.d.ts +8 -0
  349. package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  350. package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.js +21 -9
  351. package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.js.map +1 -1
  352. package/packages/gsd-agent-modes/dist/modes/interactive/components/skill-invocation-message.d.ts +2 -3
  353. package/packages/gsd-agent-modes/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  354. package/packages/gsd-agent-modes/dist/modes/interactive/components/skill-invocation-message.js +2 -3
  355. package/packages/gsd-agent-modes/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  356. package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.d.ts +3 -0
  357. package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  358. package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.js +37 -15
  359. package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.js.map +1 -1
  360. package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.d.ts +69 -3
  361. package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.d.ts.map +1 -1
  362. package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.js +223 -32
  363. package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.js.map +1 -1
  364. package/packages/gsd-agent-modes/dist/modes/interactive/components/user-message.d.ts +3 -3
  365. package/packages/gsd-agent-modes/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  366. package/packages/gsd-agent-modes/dist/modes/interactive/components/user-message.js +19 -19
  367. package/packages/gsd-agent-modes/dist/modes/interactive/components/user-message.js.map +1 -1
  368. package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.d.ts +3 -0
  369. package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
  370. package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.js +26 -10
  371. package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
  372. package/packages/gsd-agent-modes/dist/modes/interactive/controllers/extension-ui-controller.d.ts.map +1 -1
  373. package/packages/gsd-agent-modes/dist/modes/interactive/controllers/extension-ui-controller.js +12 -1
  374. package/packages/gsd-agent-modes/dist/modes/interactive/controllers/extension-ui-controller.js.map +1 -1
  375. package/packages/gsd-agent-modes/dist/modes/interactive/controllers/input-controller.d.ts.map +1 -1
  376. package/packages/gsd-agent-modes/dist/modes/interactive/controllers/input-controller.js +5 -0
  377. package/packages/gsd-agent-modes/dist/modes/interactive/controllers/input-controller.js.map +1 -1
  378. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-autocomplete.d.ts.map +1 -1
  379. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-autocomplete.js +3 -1
  380. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
  381. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-chat-render.d.ts.map +1 -1
  382. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-chat-render.js +3 -5
  383. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-chat-render.js.map +1 -1
  384. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-extension-dialogs.js +2 -2
  385. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-extension-dialogs.js.map +1 -1
  386. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-extension-widgets.d.ts +1 -0
  387. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-extension-widgets.d.ts.map +1 -1
  388. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-extension-widgets.js +25 -0
  389. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-extension-widgets.js.map +1 -1
  390. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-key-handlers.d.ts.map +1 -1
  391. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-key-handlers.js +1 -0
  392. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-key-handlers.js.map +1 -1
  393. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-init.d.ts +1 -0
  394. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-init.d.ts.map +1 -1
  395. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-init.js +20 -49
  396. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-init.js.map +1 -1
  397. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-state.d.ts +4 -0
  398. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-state.d.ts.map +1 -1
  399. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-state.js.map +1 -1
  400. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.d.ts +9 -2
  401. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  402. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.js +31 -6
  403. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.js.map +1 -1
  404. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-ui-messaging.d.ts.map +1 -1
  405. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-ui-messaging.js +0 -1
  406. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-ui-messaging.js.map +1 -1
  407. package/packages/gsd-agent-modes/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  408. package/packages/gsd-agent-modes/dist/modes/rpc/rpc-mode.js +3 -0
  409. package/packages/gsd-agent-modes/dist/modes/rpc/rpc-mode.js.map +1 -1
  410. package/packages/gsd-agent-modes/package.json +7 -7
  411. package/packages/mcp-server/README.md +10 -0
  412. package/packages/mcp-server/dist/cli-errors.d.ts +11 -0
  413. package/packages/mcp-server/dist/cli-errors.d.ts.map +1 -1
  414. package/packages/mcp-server/dist/cli-errors.js +12 -0
  415. package/packages/mcp-server/dist/cli-errors.js.map +1 -1
  416. package/packages/mcp-server/dist/cli-runner.d.ts.map +1 -1
  417. package/packages/mcp-server/dist/cli-runner.js +33 -0
  418. package/packages/mcp-server/dist/cli-runner.js.map +1 -1
  419. package/packages/mcp-server/dist/cli.d.ts +1 -0
  420. package/packages/mcp-server/dist/cli.d.ts.map +1 -1
  421. package/packages/mcp-server/dist/cli.js +1 -0
  422. package/packages/mcp-server/dist/cli.js.map +1 -1
  423. package/packages/mcp-server/dist/server.d.ts +29 -0
  424. package/packages/mcp-server/dist/server.d.ts.map +1 -1
  425. package/packages/mcp-server/dist/server.js +82 -3
  426. package/packages/mcp-server/dist/server.js.map +1 -1
  427. package/packages/mcp-server/package.json +21 -5
  428. package/packages/native/package.json +1 -1
  429. package/packages/pi-agent-core/dist/agent-loop.js +9 -0
  430. package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
  431. package/packages/pi-agent-core/package.json +1 -1
  432. package/packages/pi-ai/package.json +1 -1
  433. package/packages/pi-coding-agent/dist/core/extensions/extension-upstream-types.d.ts +28 -2
  434. package/packages/pi-coding-agent/dist/core/extensions/extension-upstream-types.d.ts.map +1 -1
  435. package/packages/pi-coding-agent/dist/core/extensions/extension-upstream-types.js.map +1 -1
  436. package/packages/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
  437. package/packages/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
  438. package/packages/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
  439. package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts +5 -1
  440. package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
  441. package/packages/pi-coding-agent/dist/core/extensions/runner.js +3 -1
  442. package/packages/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
  443. package/packages/pi-coding-agent/dist/index.d.ts +1 -1
  444. package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
  445. package/packages/pi-coding-agent/dist/index.js.map +1 -1
  446. package/packages/pi-coding-agent/package.json +8 -8
  447. package/packages/pi-tui/dist/autocomplete.d.ts.map +1 -1
  448. package/packages/pi-tui/dist/autocomplete.js +6 -1
  449. package/packages/pi-tui/dist/autocomplete.js.map +1 -1
  450. package/packages/pi-tui/dist/components/input.js +1 -1
  451. package/packages/pi-tui/dist/components/input.js.map +1 -1
  452. package/packages/pi-tui/dist/components/loader.d.ts.map +1 -1
  453. package/packages/pi-tui/dist/components/loader.js +1 -0
  454. package/packages/pi-tui/dist/components/loader.js.map +1 -1
  455. package/packages/pi-tui/dist/components/select-list.d.ts.map +1 -1
  456. package/packages/pi-tui/dist/components/select-list.js +8 -2
  457. package/packages/pi-tui/dist/components/select-list.js.map +1 -1
  458. package/packages/pi-tui/package.json +2 -2
  459. package/packages/rpc-client/package.json +2 -2
  460. package/pkg/package.json +1 -1
  461. package/src/resources/GSD-WORKFLOW.md +22 -22
  462. package/src/resources/extensions/browser-tools/tests/gsd-browser-launch-config.test.mjs +80 -0
  463. package/src/resources/extensions/claude-code-cli/index.ts +8 -1
  464. package/src/resources/extensions/claude-code-cli/stream-adapter.ts +83 -20
  465. package/src/resources/extensions/claude-code-cli/tests/index.test.ts +47 -0
  466. package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +182 -10
  467. package/src/resources/extensions/google-cli/stream-adapter.ts +22 -1
  468. package/src/resources/extensions/gsd/auto/dispatch-history.ts +19 -1
  469. package/src/resources/extensions/gsd/auto/loop.ts +69 -2
  470. package/src/resources/extensions/gsd/auto/orchestrator.ts +63 -10
  471. package/src/resources/extensions/gsd/auto/pre-dispatch.ts +13 -1
  472. package/src/resources/extensions/gsd/auto/workflow-kernel.ts +25 -3
  473. package/src/resources/extensions/gsd/auto-artifact-paths.ts +83 -20
  474. package/src/resources/extensions/gsd/auto-closeout-messaging.ts +90 -0
  475. package/src/resources/extensions/gsd/auto-dashboard.ts +310 -454
  476. package/src/resources/extensions/gsd/auto-direct-dispatch.ts +15 -2
  477. package/src/resources/extensions/gsd/auto-dispatch.ts +57 -12
  478. package/src/resources/extensions/gsd/auto-model-selection.ts +27 -5
  479. package/src/resources/extensions/gsd/auto-post-unit.ts +52 -31
  480. package/src/resources/extensions/gsd/auto-prompts.ts +45 -30
  481. package/src/resources/extensions/gsd/auto-recovery.ts +126 -37
  482. package/src/resources/extensions/gsd/auto-runtime-state.ts +13 -0
  483. package/src/resources/extensions/gsd/auto-start.ts +82 -36
  484. package/src/resources/extensions/gsd/auto-verification.ts +5 -7
  485. package/src/resources/extensions/gsd/auto-worktree.ts +83 -15
  486. package/src/resources/extensions/gsd/auto.ts +133 -32
  487. package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +45 -61
  488. package/src/resources/extensions/gsd/bootstrap/fallback-continuation.ts +31 -0
  489. package/src/resources/extensions/gsd/bootstrap/register-extension.ts +23 -2
  490. package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +123 -9
  491. package/src/resources/extensions/gsd/bootstrap/system-context.ts +185 -46
  492. package/src/resources/extensions/gsd/bootstrap/tool-search-shim.ts +21 -3
  493. package/src/resources/extensions/gsd/bootstrap/write-gate.ts +138 -29
  494. package/src/resources/extensions/gsd/closeout-consistency-gate.ts +107 -3
  495. package/src/resources/extensions/gsd/closeout-wizard.ts +11 -2
  496. package/src/resources/extensions/gsd/codebase-generator.ts +6 -9
  497. package/src/resources/extensions/gsd/commands/catalog.ts +6 -0
  498. package/src/resources/extensions/gsd/commands/dispatcher.ts +3 -0
  499. package/src/resources/extensions/gsd/commands/gsd-core-aliases-handler.ts +48 -0
  500. package/src/resources/extensions/gsd/commands/gsd-core-aliases.ts +63 -0
  501. package/src/resources/extensions/gsd/commands/handlers/core.ts +58 -8
  502. package/src/resources/extensions/gsd/commands/handlers/ops.ts +230 -3
  503. package/src/resources/extensions/gsd/commands-cmux.ts +3 -0
  504. package/src/resources/extensions/gsd/commands-gsd-core.ts +1142 -0
  505. package/src/resources/extensions/gsd/commands-handlers.ts +76 -1
  506. package/src/resources/extensions/gsd/commands-maintenance.ts +98 -2
  507. package/src/resources/extensions/gsd/commands-prefs-wizard.ts +13 -0
  508. package/src/resources/extensions/gsd/commands-verdict.ts +16 -15
  509. package/src/resources/extensions/gsd/compat/compat-marker.ts +210 -0
  510. package/src/resources/extensions/gsd/compat/index.ts +12 -0
  511. package/src/resources/extensions/gsd/compat/planning-compat.ts +168 -0
  512. package/src/resources/extensions/gsd/config-overlay.ts +24 -9
  513. package/src/resources/extensions/gsd/consent-question.ts +11 -1
  514. package/src/resources/extensions/gsd/consent-verdict.ts +30 -1
  515. package/src/resources/extensions/gsd/dashboard-overlay.ts +41 -4
  516. package/src/resources/extensions/gsd/db/engine.ts +26 -0
  517. package/src/resources/extensions/gsd/db/queries.ts +78 -0
  518. package/src/resources/extensions/gsd/db/unit-dispatches.ts +24 -0
  519. package/src/resources/extensions/gsd/db/writers/reconcile.ts +24 -1
  520. package/src/resources/extensions/gsd/db-workspace.ts +15 -0
  521. package/src/resources/extensions/gsd/discussion-handoff.ts +9 -5
  522. package/src/resources/extensions/gsd/doctor-git-checks.ts +28 -3
  523. package/src/resources/extensions/gsd/doctor-providers.ts +1 -1
  524. package/src/resources/extensions/gsd/doctor-runtime-checks.ts +12 -25
  525. package/src/resources/extensions/gsd/doctor-types.ts +1 -0
  526. package/src/resources/extensions/gsd/doctor.ts +30 -7
  527. package/src/resources/extensions/gsd/error-classifier.ts +14 -1
  528. package/src/resources/extensions/gsd/escalation.ts +9 -4
  529. package/src/resources/extensions/gsd/export-html.ts +11 -4
  530. package/src/resources/extensions/gsd/export.ts +88 -1
  531. package/src/resources/extensions/gsd/file-lock.ts +1 -1
  532. package/src/resources/extensions/gsd/flat-phase-migration.ts +205 -0
  533. package/src/resources/extensions/gsd/forensics.ts +2 -1
  534. package/src/resources/extensions/gsd/git-constants.ts +1 -1
  535. package/src/resources/extensions/gsd/git-service.ts +7 -2
  536. package/src/resources/extensions/gsd/gitignore.ts +7 -3
  537. package/src/resources/extensions/gsd/guidance.ts +7 -7
  538. package/src/resources/extensions/gsd/guided-flow.ts +11 -6
  539. package/src/resources/extensions/gsd/layout-policy.ts +85 -0
  540. package/src/resources/extensions/gsd/markdown-renderer.ts +404 -104
  541. package/src/resources/extensions/gsd/mcp-filter.ts +59 -10
  542. package/src/resources/extensions/gsd/md-importer.ts +215 -65
  543. package/src/resources/extensions/gsd/metrics.ts +23 -10
  544. package/src/resources/extensions/gsd/migrate/layout-detect.ts +38 -0
  545. package/src/resources/extensions/gsd/migrate/planning-writer.ts +259 -0
  546. package/src/resources/extensions/gsd/migrate-external.ts +49 -6
  547. package/src/resources/extensions/gsd/migration-auto-check.ts +4 -13
  548. package/src/resources/extensions/gsd/milestone-actions.ts +5 -2
  549. package/src/resources/extensions/gsd/milestone-closeout.ts +13 -2
  550. package/src/resources/extensions/gsd/milestone-ids.ts +49 -19
  551. package/src/resources/extensions/gsd/milestone-planning-persistence.ts +8 -0
  552. package/src/resources/extensions/gsd/milestone-validation-verdict.ts +7 -9
  553. package/src/resources/extensions/gsd/model-router.ts +98 -18
  554. package/src/resources/extensions/gsd/notification-store.ts +17 -28
  555. package/src/resources/extensions/gsd/notifications.ts +37 -6
  556. package/src/resources/extensions/gsd/observability-validator.ts +12 -4
  557. package/src/resources/extensions/gsd/parallel-monitor-overlay.ts +151 -31
  558. package/src/resources/extensions/gsd/parsers-legacy.ts +42 -15
  559. package/src/resources/extensions/gsd/paths.ts +348 -39
  560. package/src/resources/extensions/gsd/planning-depth.ts +2 -1
  561. package/src/resources/extensions/gsd/post-execution-checks.ts +43 -3
  562. package/src/resources/extensions/gsd/preferences-models.ts +47 -13
  563. package/src/resources/extensions/gsd/preferences.ts +188 -14
  564. package/src/resources/extensions/gsd/prompts/ai-integration-phase.md +28 -0
  565. package/src/resources/extensions/gsd/prompts/audit-fix.md +39 -0
  566. package/src/resources/extensions/gsd/prompts/audit-milestone.md +26 -0
  567. package/src/resources/extensions/gsd/prompts/audit-uat.md +24 -0
  568. package/src/resources/extensions/gsd/prompts/autonomous.md +31 -0
  569. package/src/resources/extensions/gsd/prompts/code-review.md +37 -0
  570. package/src/resources/extensions/gsd/prompts/complete-milestone.md +8 -2
  571. package/src/resources/extensions/gsd/prompts/complete-slice.md +24 -15
  572. package/src/resources/extensions/gsd/prompts/discuss-phase.md +31 -0
  573. package/src/resources/extensions/gsd/prompts/docs-update.md +13 -0
  574. package/src/resources/extensions/gsd/prompts/execute-phase.md +33 -0
  575. package/src/resources/extensions/gsd/prompts/execute-task.md +5 -1
  576. package/src/resources/extensions/gsd/prompts/explore.md +58 -0
  577. package/src/resources/extensions/gsd/prompts/graphify.md +27 -0
  578. package/src/resources/extensions/gsd/prompts/health.md +37 -0
  579. package/src/resources/extensions/gsd/prompts/import.md +30 -0
  580. package/src/resources/extensions/gsd/prompts/inbox.md +27 -0
  581. package/src/resources/extensions/gsd/prompts/ingest-docs.md +30 -0
  582. package/src/resources/extensions/gsd/prompts/manager.md +21 -0
  583. package/src/resources/extensions/gsd/prompts/map-codebase.md +42 -0
  584. package/src/resources/extensions/gsd/prompts/milestone-summary.md +27 -0
  585. package/src/resources/extensions/gsd/prompts/mvp-phase.md +23 -0
  586. package/src/resources/extensions/gsd/prompts/pause-work.md +24 -0
  587. package/src/resources/extensions/gsd/prompts/phase.md +22 -0
  588. package/src/resources/extensions/gsd/prompts/plan-phase.md +34 -0
  589. package/src/resources/extensions/gsd/prompts/plan-review-convergence.md +34 -0
  590. package/src/resources/extensions/gsd/prompts/profile-user.md +28 -0
  591. package/src/resources/extensions/gsd/prompts/progress.md +30 -0
  592. package/src/resources/extensions/gsd/prompts/quick-task.md +1 -1
  593. package/src/resources/extensions/gsd/prompts/reactive-execute.md +2 -2
  594. package/src/resources/extensions/gsd/prompts/resume-work.md +20 -0
  595. package/src/resources/extensions/gsd/prompts/review-backlog.md +21 -0
  596. package/src/resources/extensions/gsd/prompts/review.md +27 -0
  597. package/src/resources/extensions/gsd/prompts/run-uat.md +5 -1
  598. package/src/resources/extensions/gsd/prompts/secure-phase.md +24 -0
  599. package/src/resources/extensions/gsd/prompts/settings.md +24 -0
  600. package/src/resources/extensions/gsd/prompts/sketch.md +59 -0
  601. package/src/resources/extensions/gsd/prompts/spec-phase.md +29 -0
  602. package/src/resources/extensions/gsd/prompts/spike.md +59 -0
  603. package/src/resources/extensions/gsd/prompts/stats.md +43 -0
  604. package/src/resources/extensions/gsd/prompts/surface.md +25 -0
  605. package/src/resources/extensions/gsd/prompts/thread.md +24 -0
  606. package/src/resources/extensions/gsd/prompts/triage-captures.md +1 -1
  607. package/src/resources/extensions/gsd/prompts/ui-phase.md +29 -0
  608. package/src/resources/extensions/gsd/prompts/ui-review.md +29 -0
  609. package/src/resources/extensions/gsd/prompts/ultraplan-phase.md +24 -0
  610. package/src/resources/extensions/gsd/prompts/validate-phase.md +26 -0
  611. package/src/resources/extensions/gsd/prompts/verify-work.md +24 -0
  612. package/src/resources/extensions/gsd/prompts/workspace.md +22 -0
  613. package/src/resources/extensions/gsd/prompts/workstreams.md +24 -0
  614. package/src/resources/extensions/gsd/provider-error-guidance.ts +32 -0
  615. package/src/resources/extensions/gsd/queue-order.ts +3 -2
  616. package/src/resources/extensions/gsd/recovery-classification.ts +7 -0
  617. package/src/resources/extensions/gsd/roadmap-slices.ts +1 -1
  618. package/src/resources/extensions/gsd/safety/content-validator.ts +2 -1
  619. package/src/resources/extensions/gsd/safety/evidence-cross-ref.ts +45 -1
  620. package/src/resources/extensions/gsd/service-tier.ts +2 -0
  621. package/src/resources/extensions/gsd/session-lock.ts +15 -13
  622. package/src/resources/extensions/gsd/skills/gsd-headless/SKILL.md +3 -0
  623. package/src/resources/extensions/gsd/skills/gsd-headless/references/commands.md +51 -0
  624. package/src/resources/extensions/gsd/state-reconciliation/drift/artifact-db.ts +58 -14
  625. package/src/resources/extensions/gsd/state-reconciliation/drift/completion.ts +22 -2
  626. package/src/resources/extensions/gsd/state-reconciliation/drift/external-markdown-edit.ts +105 -0
  627. package/src/resources/extensions/gsd/state-reconciliation/drift/external-planning-edit.ts +180 -0
  628. package/src/resources/extensions/gsd/state-reconciliation/drift/project-md.ts +19 -6
  629. package/src/resources/extensions/gsd/state-reconciliation/drift/roadmap.ts +2 -2
  630. package/src/resources/extensions/gsd/state-reconciliation/drift/stale-render.ts +98 -26
  631. package/src/resources/extensions/gsd/state-reconciliation/index.ts +36 -3
  632. package/src/resources/extensions/gsd/state-reconciliation/registry.ts +12 -0
  633. package/src/resources/extensions/gsd/state-reconciliation/types.ts +19 -0
  634. package/src/resources/extensions/gsd/state.ts +57 -15
  635. package/src/resources/extensions/gsd/sync-lock.ts +11 -20
  636. package/src/resources/extensions/gsd/tests/__fixtures__/flat-phase/.gsd/phases/01-foundation/01-01-PLAN.md +13 -0
  637. package/src/resources/extensions/gsd/tests/__fixtures__/flat-phase/.gsd/phases/01-foundation/01-ROADMAP.md +8 -0
  638. package/src/resources/extensions/gsd/tests/__fixtures__/round-trip/m001-basic/.gsd/milestones/M001/M001-ROADMAP.md +13 -0
  639. package/src/resources/extensions/gsd/tests/__fixtures__/round-trip/m001-basic/.gsd/milestones/M001/slices/S01/S01-PLAN.md +5 -0
  640. package/src/resources/extensions/gsd/tests/__fixtures__/round-trip/planning-flat-phases/.planning/PROJECT.md +1 -0
  641. package/src/resources/extensions/gsd/tests/__fixtures__/round-trip/planning-flat-phases/.planning/ROADMAP.md +5 -0
  642. package/src/resources/extensions/gsd/tests/__fixtures__/round-trip/planning-flat-phases/.planning/STATE.md +10 -0
  643. package/src/resources/extensions/gsd/tests/__fixtures__/round-trip/planning-flat-phases/.planning/phases/01-foundation/01-01-PLAN.md +13 -0
  644. package/src/resources/extensions/gsd/tests/auto-artifact-paths.test.ts +322 -1
  645. package/src/resources/extensions/gsd/tests/auto-closeout-messaging.test.ts +71 -0
  646. package/src/resources/extensions/gsd/tests/auto-dashboard.test.ts +68 -116
  647. package/src/resources/extensions/gsd/tests/auto-direct-dispatch-parse.test.ts +33 -0
  648. package/src/resources/extensions/gsd/tests/auto-loop.test.ts +104 -0
  649. package/src/resources/extensions/gsd/tests/auto-migrating-recovery.test.ts +32 -1
  650. package/src/resources/extensions/gsd/tests/auto-model-selection-tool-poisoning.test.ts +7 -2
  651. package/src/resources/extensions/gsd/tests/auto-model-selection.test.ts +10 -0
  652. package/src/resources/extensions/gsd/tests/auto-orchestrator.test.ts +28 -22
  653. package/src/resources/extensions/gsd/tests/auto-paused-session-validation.test.ts +11 -2
  654. package/src/resources/extensions/gsd/tests/auto-paused-ui-cleanup.test.ts +19 -2
  655. package/src/resources/extensions/gsd/tests/auto-verification.test.ts +36 -0
  656. package/src/resources/extensions/gsd/tests/auto-worktree-auto-resolve.test.ts +17 -0
  657. package/src/resources/extensions/gsd/tests/blocker-placeholder-logs.test.ts +218 -0
  658. package/src/resources/extensions/gsd/tests/codebase-generator.test.ts +15 -11
  659. package/src/resources/extensions/gsd/tests/commands-dispatcher-unmerged-milestone.test.ts +89 -0
  660. package/src/resources/extensions/gsd/tests/commands-dispatcher-validation-block.test.ts +37 -1
  661. package/src/resources/extensions/gsd/tests/commands-eval-review.test.ts +31 -30
  662. package/src/resources/extensions/gsd/tests/commands-gsd-core.test.ts +862 -0
  663. package/src/resources/extensions/gsd/tests/commands-verdict.test.ts +1 -1
  664. package/src/resources/extensions/gsd/tests/compat-health-line.test.ts +102 -0
  665. package/src/resources/extensions/gsd/tests/compat-marker-invalidation.test.ts +51 -0
  666. package/src/resources/extensions/gsd/tests/compat-marker.test.ts +105 -0
  667. package/src/resources/extensions/gsd/tests/complete-milestone-prompt-rendering.test.ts +6 -2
  668. package/src/resources/extensions/gsd/tests/complete-slice-reopen-handoff.test.ts +82 -0
  669. package/src/resources/extensions/gsd/tests/complete-slice.test.ts +7 -7
  670. package/src/resources/extensions/gsd/tests/complete-task.test.ts +7 -7
  671. package/src/resources/extensions/gsd/tests/consent-question.test.ts +45 -0
  672. package/src/resources/extensions/gsd/tests/core-overlay-fallback.test.ts +1 -0
  673. package/src/resources/extensions/gsd/tests/dashboard-overlay.test.ts +37 -0
  674. package/src/resources/extensions/gsd/tests/db-authority-regression.test.ts +1 -1
  675. package/src/resources/extensions/gsd/tests/db-engine-logs.test.ts +207 -0
  676. package/src/resources/extensions/gsd/tests/derive-state-db.test.ts +63 -1
  677. package/src/resources/extensions/gsd/tests/derive-state-helpers.test.ts +49 -5
  678. package/src/resources/extensions/gsd/tests/discuss-cold-start-db-open.test.ts +10 -27
  679. package/src/resources/extensions/gsd/tests/dispatch-complete-milestone-guard.test.ts +20 -1
  680. package/src/resources/extensions/gsd/tests/dispatch-db-degradation-logs.test.ts +98 -0
  681. package/src/resources/extensions/gsd/tests/dispatch-history.test.ts +102 -0
  682. package/src/resources/extensions/gsd/tests/dispatch-logs.test.ts +103 -0
  683. package/src/resources/extensions/gsd/tests/dispatch-missing-task-plans.test.ts +38 -49
  684. package/src/resources/extensions/gsd/tests/dispatch-reactive-logs.test.ts +98 -0
  685. package/src/resources/extensions/gsd/tests/dist-redirect.mjs +7 -0
  686. package/src/resources/extensions/gsd/tests/doctor-git-checks-autoresolve.test.ts +149 -0
  687. package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +6 -4
  688. package/src/resources/extensions/gsd/tests/ensure-preconditions-guard-4996.test.ts +17 -10
  689. package/src/resources/extensions/gsd/tests/evidence-cross-ref.test.ts +95 -0
  690. package/src/resources/extensions/gsd/tests/export-html-enhancements.test.ts +25 -0
  691. package/src/resources/extensions/gsd/tests/export-memory.test.ts +179 -0
  692. package/src/resources/extensions/gsd/tests/extension-bootstrap-isolation.test.ts +53 -0
  693. package/src/resources/extensions/gsd/tests/external-markdown-edit.test.ts +137 -0
  694. package/src/resources/extensions/gsd/tests/external-planning-edit.test.ts +199 -0
  695. package/src/resources/extensions/gsd/tests/fallback-continuation.test.ts +36 -0
  696. package/src/resources/extensions/gsd/tests/file-lock.test.ts +43 -0
  697. package/src/resources/extensions/gsd/tests/flat-phase-migration.test.ts +114 -0
  698. package/src/resources/extensions/gsd/tests/flat-phase-renderer.test.ts +83 -0
  699. package/src/resources/extensions/gsd/tests/flat-phase-round-trip.test.ts +72 -0
  700. package/src/resources/extensions/gsd/tests/flat-phase-validation-integration.test.ts +120 -0
  701. package/src/resources/extensions/gsd/tests/flat-phase-validation-path.test.ts +74 -0
  702. package/src/resources/extensions/gsd/tests/flat-rate-routing-guard.test.ts +2 -1
  703. package/src/resources/extensions/gsd/tests/gsd-command-home.test.ts +40 -7
  704. package/src/resources/extensions/gsd/tests/gsd-core-parity-routing.test.ts +183 -0
  705. package/src/resources/extensions/gsd/tests/guidance.test.ts +25 -0
  706. package/src/resources/extensions/gsd/tests/integration/auto-recovery.test.ts +19 -11
  707. package/src/resources/extensions/gsd/tests/integration/auto-worktree-milestone-merge.test.ts +75 -0
  708. package/src/resources/extensions/gsd/tests/integration/commands-eval-review.integration.test.ts +6 -2
  709. package/src/resources/extensions/gsd/tests/integration/gitignore-tracked-gsd.test.ts +55 -0
  710. package/src/resources/extensions/gsd/tests/integration/idle-recovery.test.ts +4 -3
  711. package/src/resources/extensions/gsd/tests/integration/integration-proof.test.ts +11 -7
  712. package/src/resources/extensions/gsd/tests/interactive-routing-bypass.test.ts +1 -0
  713. package/src/resources/extensions/gsd/tests/knowledge-cold-start.test.ts +372 -0
  714. package/src/resources/extensions/gsd/tests/layout-policy.test.ts +59 -0
  715. package/src/resources/extensions/gsd/tests/loop.test.ts +60 -0
  716. package/src/resources/extensions/gsd/tests/markdown-renderer-parse-cache.test.ts +1 -1
  717. package/src/resources/extensions/gsd/tests/markdown-renderer.test.ts +214 -82
  718. package/src/resources/extensions/gsd/tests/mcp-filter.test.ts +74 -1
  719. package/src/resources/extensions/gsd/tests/metrics-ledger-cap.test.ts +239 -0
  720. package/src/resources/extensions/gsd/tests/milestone-closeout.test.ts +7 -2
  721. package/src/resources/extensions/gsd/tests/milestone-settlement.test.ts +6 -1
  722. package/src/resources/extensions/gsd/tests/model-router.test.ts +343 -7
  723. package/src/resources/extensions/gsd/tests/notification-store.test.ts +23 -0
  724. package/src/resources/extensions/gsd/tests/notifications.test.ts +33 -0
  725. package/src/resources/extensions/gsd/tests/oauth-api-model-routing.test.ts +13 -1
  726. package/src/resources/extensions/gsd/tests/observability-validator-boundary.test.ts +194 -0
  727. package/src/resources/extensions/gsd/tests/orchestrator-legacy-parity.test.ts +1 -1
  728. package/src/resources/extensions/gsd/tests/orchestrator-logs.test.ts +339 -0
  729. package/src/resources/extensions/gsd/tests/orphaned-worktree-audit.test.ts +52 -1
  730. package/src/resources/extensions/gsd/tests/parallel-monitor-overlay.test.ts +91 -0
  731. package/src/resources/extensions/gsd/tests/plan-milestone-boundary-map-preservation.test.ts +7 -2
  732. package/src/resources/extensions/gsd/tests/plan-milestone-sketch-render.test.ts +7 -2
  733. package/src/resources/extensions/gsd/tests/plan-milestone.test.ts +9 -6
  734. package/src/resources/extensions/gsd/tests/plan-slice.test.ts +58 -23
  735. package/src/resources/extensions/gsd/tests/plan-task.test.ts +4 -4
  736. package/src/resources/extensions/gsd/tests/planning-crossval.test.ts +19 -0
  737. package/src/resources/extensions/gsd/tests/planning-layout-detect.test.ts +84 -0
  738. package/src/resources/extensions/gsd/tests/planning-marker.test.ts +107 -0
  739. package/src/resources/extensions/gsd/tests/planning-projection-hook.test.ts +123 -0
  740. package/src/resources/extensions/gsd/tests/planning-round-trip-property.test.ts +164 -0
  741. package/src/resources/extensions/gsd/tests/planning-writer.test.ts +82 -0
  742. package/src/resources/extensions/gsd/tests/post-execution-checks.test.ts +48 -1
  743. package/src/resources/extensions/gsd/tests/preferences.test.ts +47 -1
  744. package/src/resources/extensions/gsd/tests/prefs-missing-models-crash.test.ts +35 -4
  745. package/src/resources/extensions/gsd/tests/progress-strip-test-helpers.ts +79 -0
  746. package/src/resources/extensions/gsd/tests/prompt-budget-enforcement.test.ts +2 -0
  747. package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +16 -0
  748. package/src/resources/extensions/gsd/tests/provider-error-guidance.test.ts +15 -0
  749. package/src/resources/extensions/gsd/tests/provider-errors.test.ts +107 -0
  750. package/src/resources/extensions/gsd/tests/ready-phrase-no-files-4573.test.ts +22 -13
  751. package/src/resources/extensions/gsd/tests/reassess-handler.test.ts +9 -8
  752. package/src/resources/extensions/gsd/tests/reconcile-logs.test.ts +244 -0
  753. package/src/resources/extensions/gsd/tests/recovery-finalize-logs.test.ts +119 -0
  754. package/src/resources/extensions/gsd/tests/recovery-verify-logs.test.ts +428 -0
  755. package/src/resources/extensions/gsd/tests/register-extension-guard.test.ts +25 -0
  756. package/src/resources/extensions/gsd/tests/register-hooks-depth-verification.test.ts +79 -4
  757. package/src/resources/extensions/gsd/tests/replan-handler.test.ts +4 -4
  758. package/src/resources/extensions/gsd/tests/resume-missing-worktree-warning.test.ts +5 -5
  759. package/src/resources/extensions/gsd/tests/round-trip-property.test.ts +137 -0
  760. package/src/resources/extensions/gsd/tests/session-lock-transient-read.test.ts +28 -2
  761. package/src/resources/extensions/gsd/tests/session-start-footer.test.ts +68 -0
  762. package/src/resources/extensions/gsd/tests/show-config-command.test.ts +3 -0
  763. package/src/resources/extensions/gsd/tests/single-writer-invariant.test.ts +1 -0
  764. package/src/resources/extensions/gsd/tests/stale-dirlistcache-4648.test.ts +7 -1
  765. package/src/resources/extensions/gsd/tests/state-reconciliation-drift.test.ts +155 -58
  766. package/src/resources/extensions/gsd/tests/stop-backtrack.test.ts +6 -2
  767. package/src/resources/extensions/gsd/tests/stuck-state-via-db.test.ts +85 -0
  768. package/src/resources/extensions/gsd/tests/sync-lock.test.ts +23 -0
  769. package/src/resources/extensions/gsd/tests/system-context-message-routing.test.ts +29 -1
  770. package/src/resources/extensions/gsd/tests/terminal-tool-surface-classification.test.ts +80 -0
  771. package/src/resources/extensions/gsd/tests/thinking-level-resolution.test.ts +1 -1
  772. package/src/resources/extensions/gsd/tests/tool-schema-model-fallback.test.ts +64 -0
  773. package/src/resources/extensions/gsd/tests/tool-search-shim.test.ts +71 -0
  774. package/src/resources/extensions/gsd/tests/tool-surface-readiness.test.ts +26 -7
  775. package/src/resources/extensions/gsd/tests/tool-unavailable-retry.test.ts +23 -0
  776. package/src/resources/extensions/gsd/tests/tui-header-lifecycle.test.ts +40 -86
  777. package/src/resources/extensions/gsd/tests/tui-render-kit.test.ts +44 -6
  778. package/src/resources/extensions/gsd/tests/undo.test.ts +39 -37
  779. package/src/resources/extensions/gsd/tests/unit-context-composer.test.ts +22 -0
  780. package/src/resources/extensions/gsd/tests/unmerged-milestone-guard.test.ts +62 -0
  781. package/src/resources/extensions/gsd/tests/uok-audit.test.ts +194 -0
  782. package/src/resources/extensions/gsd/tests/uok-gitops-turn-action.test.ts +72 -1
  783. package/src/resources/extensions/gsd/tests/validate-milestone-write-order.test.ts +9 -1
  784. package/src/resources/extensions/gsd/tests/validation-block-guard.test.ts +51 -0
  785. package/src/resources/extensions/gsd/tests/validation-gate-patterns.test.ts +34 -6
  786. package/src/resources/extensions/gsd/tests/verify-artifact-tightened.test.ts +90 -0
  787. package/src/resources/extensions/gsd/tests/visualizer-data.test.ts +87 -0
  788. package/src/resources/extensions/gsd/tests/visualizer-views.test.ts +27 -0
  789. package/src/resources/extensions/gsd/tests/workflow-kernel.test.ts +51 -0
  790. package/src/resources/extensions/gsd/tests/workflow-mcp-preflight.test.ts +133 -0
  791. package/src/resources/extensions/gsd/tests/workflow-mcp.test.ts +34 -8
  792. package/src/resources/extensions/gsd/tests/workflow-projections.test.ts +3 -4
  793. package/src/resources/extensions/gsd/tests/workflow-tool-executors.test.ts +64 -8
  794. package/src/resources/extensions/gsd/tests/worktree-health.test.ts +43 -3
  795. package/src/resources/extensions/gsd/tests/worktree-manager.test.ts +62 -0
  796. package/src/resources/extensions/gsd/tests/worktree-safety.test.ts +39 -18
  797. package/src/resources/extensions/gsd/tests/worktree-write-gate.test.ts +75 -3
  798. package/src/resources/extensions/gsd/tests/write-gate-planning-unit.test.ts +4 -1
  799. package/src/resources/extensions/gsd/tests/write-gate.test.ts +103 -0
  800. package/src/resources/extensions/gsd/tool-surface-readiness.ts +226 -16
  801. package/src/resources/extensions/gsd/tools/complete-milestone.ts +4 -7
  802. package/src/resources/extensions/gsd/tools/complete-slice.ts +12 -9
  803. package/src/resources/extensions/gsd/tools/complete-task.ts +15 -1
  804. package/src/resources/extensions/gsd/tools/exec-tool.ts +2 -118
  805. package/src/resources/extensions/gsd/tools/plan-slice.ts +1 -3
  806. package/src/resources/extensions/gsd/tools/plan-task.ts +17 -1
  807. package/src/resources/extensions/gsd/tools/reassess-roadmap.ts +9 -10
  808. package/src/resources/extensions/gsd/tools/validate-milestone.ts +8 -13
  809. package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +43 -4
  810. package/src/resources/extensions/gsd/triage-resolution.ts +14 -7
  811. package/src/resources/extensions/gsd/tui/render-kit.ts +56 -13
  812. package/src/resources/extensions/gsd/undo.ts +8 -9
  813. package/src/resources/extensions/gsd/unit-registry.ts +27 -3
  814. package/src/resources/extensions/gsd/unmerged-milestone-guard.ts +60 -1
  815. package/src/resources/extensions/gsd/validation-block-guard.ts +46 -0
  816. package/src/resources/extensions/gsd/visualizer-data.ts +55 -0
  817. package/src/resources/extensions/gsd/visualizer-views.ts +27 -2
  818. package/src/resources/extensions/gsd/workflow-logger.ts +5 -0
  819. package/src/resources/extensions/gsd/workflow-mcp.ts +12 -1
  820. package/src/resources/extensions/gsd/workflow-projections.ts +24 -4
  821. package/src/resources/extensions/gsd/worktree-command.ts +6 -6
  822. package/src/resources/extensions/gsd/worktree-health.ts +6 -3
  823. package/src/resources/extensions/gsd/worktree-manager.ts +122 -16
  824. package/src/resources/extensions/gsd/worktree-safety.ts +31 -11
  825. package/src/resources/extensions/gsd/worktree-shell-guard.ts +123 -0
  826. package/src/resources/extensions/mcp-client/manager.ts +3 -3
  827. package/src/resources/extensions/search-the-web/index.ts +45 -9
  828. package/src/resources/extensions/search-the-web/native-search.ts +16 -4
  829. package/src/resources/extensions/shared/gsd-browser-cli.ts +41 -2
  830. package/src/resources/extensions/subagent/index.ts +20 -15
  831. package/src/resources/extensions/subagent/tests/worktree-cwd.test.ts +57 -0
  832. package/src/resources/extensions/subagent/worktree-cwd.ts +35 -0
  833. package/dist/web/standalone/.next/static/chunks/8785.2e5a118797fb2dd2.js +0 -1
  834. /package/dist/web/standalone/.next/static/{2T9IOdiiM3o3gZ4UbPi8E → BTKtGFF1Y-hvVJEGhBRo9}/_buildManifest.js +0 -0
  835. /package/dist/web/standalone/.next/static/{2T9IOdiiM3o3gZ4UbPi8E → BTKtGFF1Y-hvVJEGhBRo9}/_ssgManifest.js +0 -0
@@ -0,0 +1,20 @@
1
+ You are running the GSD **resume-work** workflow — resume work from a previous session with full context restoration.
2
+
3
+ ## Process
4
+
5
+ 1. **Reconcile state.** Read the canonical gsd-pi state (DB + markdown projections) and run reconciliation so any drift between disk and DB is repaired before resuming. Do not resume on top of drift.
6
+
7
+ 2. **Load the handoff.** Read any `HANDOFF.md` or pause notes in `.gsd/` to recover the intended next step, open threads, and in-flight work the prior session left.
8
+
9
+ 3. **Reconstruct context.** Combine: the active milestone/slice/task, the last completed unit, the open threads, and a bounded codebase snapshot of what was being edited. This is the resume context — present a concise summary.
10
+
11
+ 4. **Resume the work.** Pick up at the explicit resume instruction. If the handoff named a specific next action, do that. If state has moved on (e.g. the task was completed by another worker), detect it and re-derive the next step from canonical state rather than blindly following a stale handoff.
12
+
13
+ 5. **Re-enter the lifecycle.** Hand control to the appropriate gsd-pi command (`/gsd next`, `/gsd auto`, or a specific dispatch) to continue.
14
+
15
+ ## Success criteria
16
+
17
+ - State is reconciled before resuming (no resuming on drift).
18
+ - The handoff is honored unless canonical state contradicts it.
19
+ - The resume summary is concise and grounded in state.
20
+ - Control returns to the gsd-pi lifecycle rather than ad-hoc work.
@@ -0,0 +1,21 @@
1
+ You are running the GSD **review-backlog** workflow — review backlog items and promote ready ones to active milestones.
2
+
3
+ ## Process
4
+
5
+ 1. **Load the backlog.** Read all backlog items with their metadata (added date, trigger conditions, notes, priority hints).
6
+
7
+ 2. **Triage each item** into one of:
8
+ - **promote**: ready to become an active milestone now (clear scope, dependency met, value justifies it).
9
+ - **keep**: not yet ready (blocked, low value now, trigger not met) — record why.
10
+ - **discard**: no longer relevant (superseded, done elsewhere, obsolete) — archive with a reason.
11
+
12
+ 3. **Present the triage** grouped by recommendation, with the reasoning for each. Let the developer confirm promotions and discards.
13
+
14
+ 4. **Act on confirmation**: promote selected items via `/gsd backlog promote` (then `/gsd new-milestone` to scope them), and archive discards. Do not promote or discard without explicit confirmation.
15
+
16
+ ## Success criteria
17
+
18
+ - Every backlog item gets a triage recommendation with reasoning.
19
+ - Promotions and discards require explicit confirmation.
20
+ - Trigger conditions are checked before recommending promotion.
21
+ - Actions route through gsd-pi's backlog commands.
@@ -0,0 +1,27 @@
1
+ You are running the GSD **review** workflow — peer review of recent work, optionally across multiple AI reviewers.
2
+
3
+ ## Target
4
+
5
+ {{target}}
6
+
7
+ ## Reviewers
8
+
9
+ {{reviewers}}
10
+
11
+ ## Process
12
+
13
+ 1. **Identify what to review.** Use the explicit milestone/slice target if given; otherwise review the active slice's plan and recent execution. Gather the plan, the SUMMARY/ASSESSMENT, and the diff against the base branch.
14
+
15
+ 2. **Run the review.** For each requested reviewer perspective, produce an independent review covering: correctness vs. intent, missed requirements, risk/regression, and verification gaps. When a reviewer is an external AI CLI not available in this runtime, perform that reviewer's perspective yourself using its documented focus, and label it as "simulated".
16
+
17
+ 3. **Collect concerns.** Merge the per-reviewer concerns into a single deduplicated list, each tagged with which reviewer(s) raised it and a severity.
18
+
19
+ 4. **Route.** Recommend the next action: if concerns are minor, proceed to `/gsd dispatch validate`; if concerns need rework, recommend `/gsd dispatch replan` or `/gsd next`; if a concern is a blocker, surface it clearly.
20
+
21
+ Do not block on unavailable external reviewers — simulate their perspective and continue.
22
+
23
+ ## Success criteria
24
+
25
+ - Each concern is tied to a reviewer and grounded in the plan/diff.
26
+ - Unavailable external reviewers are simulated, not silently skipped.
27
+ - The recommended next action matches the severity of the concerns.
@@ -102,4 +102,8 @@ checks: [{
102
102
 
103
103
  **You MUST call `gsd_uat_result_save` before finishing. Do not write the assessment file directly, and do not call `gsd_summary_save` as a substitute.**
104
104
 
105
- When done, say: "UAT {{sliceId}} complete." Say this exactly once — if you already said it in a prior message, do not repeat it.
105
+ ### Closeout messaging (auto-mode)
106
+
107
+ You submit UAT results; **GSD auto-mode** decides when UAT is actually **done**. Never say "UAT {{sliceId}} complete" in this unit — not even after `gsd_uat_result_save` succeeds. GSD announces completion only after post-unit verification passes.
108
+
109
+ When done, say: "UAT {{sliceId}} results submitted." Do not say UAT is complete. Say this exactly once — if you already said it in a prior message, do not repeat it.
@@ -0,0 +1,24 @@
1
+ You are running the GSD **secure-phase** workflow — retroactively verify threat mitigations for completed work.
2
+
3
+ ## Target
4
+
5
+ {{target}}
6
+
7
+ ## Process
8
+
9
+ 1. **Load the threat context.** Read any security/threat notes for the target (milestone plan, CONTEXT, KNOWLEDGE security rules). If none exist, derive threats from the work itself: auth, authorization, input validation, secrets handling, data exposure, dependency risk.
10
+
11
+ 2. **For each identified threat, confirm its mitigation.** Trace the threat to where the code mitigates it. Classify each: `mitigated` (evidence in code), `partial` (mitigation incomplete), `unmitigated` (no evidence), or `not-applicable`.
12
+
13
+ 3. **Verify the mitigations hold.** Where a mitigation is a test, confirm the test exists and covers the threat. Where it's a code pattern, confirm it's applied consistently (not just in the happy path).
14
+
15
+ 4. **Update the security record.** Write/append `.gsd/SECURITY.md` (or the project's security doc) with the threat-mitigation table and any new findings. Record durable security rules via `/gsd knowledge rule`.
16
+
17
+ 5. **Report.** Summarize: mitigated count, partial/unmitigated findings (critical first), and recommended remediation.
18
+
19
+ ## Success criteria
20
+
21
+ - Every threat is traced to a mitigation (or flagged unmitigated) with code evidence.
22
+ - Mitigations are verified for consistency, not just presence.
23
+ - The security record is updated, not just printed.
24
+ - Partial/unmitigated findings are prioritized and actionable.
@@ -0,0 +1,24 @@
1
+ You are running the GSD **settings** workflow — configure GSD workflow toggles and the model profile.
2
+
3
+ ## Process
4
+
5
+ This is the settings flow: present the current effective configuration and let the developer change it.
6
+
7
+ 1. **Show effective settings.** Display the current configuration: active provider/model, model profile, auto-mode toggles, commit granularity, review depth, isolation mode, language, and any feature flags. Pull these from gsd-pi's config overlay, not memory.
8
+
9
+ 2. **Offer changes**, grouped:
10
+ - **LLM**: provider, model, default tier — `/gsd setup llm` / `/gsd model`.
11
+ - **Workflow**: auto-mode behavior, isolation mode, commit granularity — `/gsd prefs`.
12
+ - **Keys**: API keys — `/gsd keys`.
13
+ - **Integrations**: remote, search, cmux — `/gsd setup remote|search`, `/gsd cmux`.
14
+ - **Onboarding**: re-run the wizard — `/gsd onboarding`.
15
+
16
+ 3. **Apply the selection** by routing to the matching gsd-pi command. Confirm before changing anything destructive (e.g. switching provider, wiping keys).
17
+
18
+ 4. **Re-show** the effective settings after changes.
19
+
20
+ ## Success criteria
21
+
22
+ - The displayed settings reflect the real config overlay.
23
+ - Every change routes to the real gsd-pi command, keeping state canonical.
24
+ - Destructive changes are confirmed.
@@ -0,0 +1,59 @@
1
+ You are running the GSD **sketch** workflow — explore UI/design ideas with throwaway HTML mockups that let the developer feel a design before committing to implementation.
2
+
3
+ ## Design Idea
4
+
5
+ {{input}}
6
+
7
+ ## Flags
8
+
9
+ - `--quick` — {{quickFlag}} (when true, skip decomposition and jump straight to a single mockup)
10
+ - `--text` — {{textFlag}} (when true, use plain-text numbered lists instead of interactive prompts)
11
+ - Frontier mode — {{frontierFlag}} (when true, analyze existing sketches and propose what to sketch next instead of a new one)
12
+
13
+ ## Process
14
+
15
+ ### 1. Route the input
16
+
17
+ - If frontier mode is active (no idea given, or the word "frontier"): go to **Frontier mode**.
18
+ - Otherwise: continue to **Setup**.
19
+
20
+ ### 2. Setup
21
+
22
+ Create `.gsd/sketches/` if it does not exist and determine the next sketch number by listing existing `.gsd/sketches/[0-9][0-9][0-9]-*` directories.
23
+
24
+ ### 3. Decompose the design (skip if `--quick`)
25
+
26
+ If the design idea has multiple surfaces (e.g. landing page, dashboard, empty state), break it into focused mockups. Each should explore one surface or one interaction. Order by the most uncertain design direction first.
27
+
28
+ ### 4. Align on direction
29
+
30
+ Briefly confirm scope and any constraints (brand, target device, accessibility). Keep this short — sketches are cheap and disposable.
31
+
32
+ ### 5. Build
33
+
34
+ Create `.gsd/sketches/{{sketchId}}/` and build each mockup as a self-contained `index.html` (inline CSS/JS, no build step). Open it in the browser via the project's tooling so the developer can see and react to it.
35
+
36
+ ### 6. Observe and refine
37
+
38
+ Let the developer react to each mockup. Iterate quickly on the throwaway HTML. Capture the design decisions that emerge (layout, color, motion, copy).
39
+
40
+ ### 7. Document
41
+
42
+ Write `.gsd/sketches/{{sketchId}}/README.md` with:
43
+ - The design idea and the surfaces explored
44
+ - The mockup files and what each demonstrates
45
+ - Design decisions captured and their rationale
46
+ - Recommendations for the real implementation
47
+
48
+ Append a one-line summary to `.gsd/CAPTURES.md` linking the README.
49
+
50
+ ### 8. Frontier mode (only when frontier flag is active)
51
+
52
+ Load the sketch landscape: read `.gsd/sketches/*/README.md`. Analyze for **integration sketches** (sketches that touch the same flow) and **frontier sketches** (unexplored surfaces, alternative directions, empty/loading/error states). Present concrete candidates and let the developer choose which to run.
53
+
54
+ ## Success criteria
55
+
56
+ - Each mockup is a self-contained `index.html` with no build step.
57
+ - Artifacts live under `.gsd/sketches/{{sketchId}}/`.
58
+ - The README captures design decisions usable by the real implementation.
59
+ - Iteration is fast and the sketches stay disposable.
@@ -0,0 +1,29 @@
1
+ You are running the GSD **spec-phase** workflow — clarify WHAT a milestone/slice delivers, with ambiguity scoring, before discussion or planning.
2
+
3
+ ## Target
4
+
5
+ {{target}}
6
+
7
+ ## Flags
8
+
9
+ - `--auto` — {{autoFlag}}
10
+ - `--text` — {{textFlag}}
11
+
12
+ ## Process
13
+
14
+ 1. **Load intent.** Read the milestone/slice's stated goal, requirements, and any discuss/research context.
15
+
16
+ 2. **Draft the SPEC.** State, in plain language: what this delivers, for whom, the inputs/outputs, the success criteria, and explicit non-goals.
17
+
18
+ 3. **Score ambiguity.** For each part of the spec, score ambiguity (low/medium/high) and identify the specific phrase causing it. High-ambiguity items become discussion questions.
19
+
20
+ 4. **Resolve ambiguity.** For each high-ambiguity item: in `--auto`, infer and flag; otherwise ask one targeted question at a time to resolve it. Update the spec with the resolved language.
21
+
22
+ 5. **Write the SPEC** to the milestone/slice artifact in `.gsd/`. Recommend `/gsd discuss-phase` (deeper discussion) or `/gsd plan-phase` (the spec is clear enough to plan).
23
+
24
+ ## Success criteria
25
+
26
+ - The spec states WHAT, not HOW.
27
+ - Every high-ambiguity item is resolved or explicitly deferred with a reason.
28
+ - Non-goals are explicit.
29
+ - The recommended next step reflects remaining ambiguity.
@@ -0,0 +1,59 @@
1
+ You are running the GSD **spike** workflow — experiential exploration that builds focused experiments to validate feasibility and produce verified knowledge for the real build.
2
+
3
+ ## Spike Input
4
+
5
+ {{input}}
6
+
7
+ ## Flags
8
+
9
+ - `--quick` — {{quickFlag}} (when true, skip decomposition/alignment and jump straight to building)
10
+ - `--text` — {{textFlag}} (when true, use plain-text numbered lists instead of interactive prompts)
11
+ - Frontier mode — {{frontierFlag}} (when true, analyze existing spikes and propose integration/frontier spikes instead of a new one)
12
+
13
+ ## Process
14
+
15
+ ### 1. Route the input
16
+
17
+ - If frontier mode is active (no idea given, or the word "frontier"): go to **Frontier mode**.
18
+ - Otherwise: continue to **Setup**.
19
+
20
+ ### 2. Setup
21
+
22
+ Create `.gsd/spikes/` if it does not exist and determine the next spike number by listing existing `.gsd/spikes/[0-9][0-9][0-9]-*` directories. Use the project's detected stack (check `package.json` / `pyproject.toml` / `Cargo.toml` / `go.mod`) to choose technology. Avoid heavy tooling — pick whatever reaches a runnable result fastest.
23
+
24
+ ### 3. Decompose the idea (skip if `--quick`)
25
+
26
+ Break the idea into 1–3 focused experiments. Each experiment should validate one specific risk or assumption with a clear **Given/When/Then** validation question. Order by highest risk first.
27
+
28
+ ### 4. Research (brief)
29
+
30
+ For each experiment, do the minimum research needed to start building — library docs, API shape, known gotchas. Use `resolve_library`/docs lookups. Do not over-research.
31
+
32
+ ### 5. Build
33
+
34
+ Create `.gsd/spikes/{{spikeId}}/` and build each experiment as a small, self-contained, runnable artifact. Prefer throwaway code that proves the point. Hardcode configuration — do not build config systems.
35
+
36
+ ### 6. Verify
37
+
38
+ For each experiment, run the validation question and record a verdict: `VALIDATED`, `PARTIAL`, or `INVALIDATED`, with the evidence (command output, observed behavior).
39
+
40
+ ### 7. Document
41
+
42
+ Write `.gsd/spikes/{{spikeId}}/README.md` with:
43
+ - The original idea and the experiments run
44
+ - Per-experiment verdict + evidence
45
+ - Conclusions and recommendations for the real build
46
+ - Any conventions discovered worth recording (stack, patterns)
47
+
48
+ Append a one-line summary to `.gsd/CAPTURES.md` linking the README so the spike is discoverable.
49
+
50
+ ### 8. Frontier mode (only when frontier flag is active)
51
+
52
+ Load the spike landscape: read `.gsd/spikes/*/README.md` and any `CONVENTIONS.md`. Analyze for **integration spikes** (validated spikes that share resources, hand off data, or contend) and **frontier spikes** (gaps, discovered dependencies, alternative approaches). Present concrete candidates with Given/When/Then questions and let the developer choose which to run.
53
+
54
+ ## Success criteria
55
+
56
+ - Each experiment has a clear validation question and a recorded verdict with evidence.
57
+ - Artifacts live under `.gsd/spikes/{{spikeId}}/`.
58
+ - The README captures conclusions usable by the real build.
59
+ - No heavy infrastructure, build systems, or config layers unless the spike specifically requires them.
@@ -0,0 +1,43 @@
1
+ You are running the GSD **stats** workflow — display comprehensive project statistics.
2
+
3
+ ## Process
4
+
5
+ Read the canonical gsd-pi state and present a statistics summary. Use gsd-pi's own tooling to gather the data — do not hand-parse files when a command or query exists.
6
+
7
+ Gather:
8
+ - Active milestone id/title and overall milestone progress (completed/total).
9
+ - Slice and task progress for the active milestone (completed/total per slice where available).
10
+ - Requirements coverage if tracked.
11
+ - Git metrics: total commits, first commit date, last activity date, current branch.
12
+ - Project age in days.
13
+
14
+ Present the summary in this shape:
15
+
16
+ ```
17
+ # 📊 Project Statistics — {milestone} {title}
18
+
19
+ ## Progress
20
+ [████████░░] X/Y milestones (Z%)
21
+
22
+ ## Slices (active milestone)
23
+ | Slice | Tasks | Completed | Status |
24
+
25
+ ## Requirements
26
+ ✅ X/Y requirements complete
27
+
28
+ ## Git
29
+ - Commits: N
30
+ - Started: YYYY-MM-DD
31
+ - Last activity: YYYY-MM-DD
32
+
33
+ ## Timeline
34
+ - Project age: N days
35
+ ```
36
+
37
+ If no `.gsd/` project exists, say so and suggest `/gsd init`.
38
+
39
+ ## Success criteria
40
+
41
+ - Numbers come from canonical gsd-pi state, not estimates.
42
+ - The summary is readable in a terminal (ASCII progress bar, tables).
43
+ - Missing sections are omitted rather than printed with zeroes.
@@ -0,0 +1,25 @@
1
+ You are running the GSD **surface** workflow — manage which skills/extensions are surfaced in the active session.
2
+
3
+ ## Action
4
+
5
+ {{action}}
6
+
7
+ ## Process
8
+
9
+ Parse the action:
10
+
11
+ - **list / status** (default): Show every installed skill/extension with its current surfaced state (enabled/disabled) and source (bundled, project, global). Group by cluster where applicable.
12
+ - **profile <name>**: Apply a named surfacing profile — enable a curated cluster of skills and disable the rest. Confirm the change set before applying.
13
+ - **disable <cluster>**: Disable a cluster of skills so they stop loading into context. Record the change so it persists.
14
+ - **enable <cluster>**: Re-enable a previously disabled cluster.
15
+ - **reset**: Restore the default surfacing state.
16
+
17
+ Use gsd-pi's own extension/skill management (`/gsd extensions`, `/gsd skill-health`) as the backing store for these changes — do not invent a separate state file.
18
+
19
+ If the action names an unknown cluster or profile, list the valid options rather than failing silently.
20
+
21
+ ## Success criteria
22
+
23
+ - The current surfaced state is reported accurately from the backing store.
24
+ - Changes persist via gsd-pi's extension/skill management, not a parallel mechanism.
25
+ - Unknown names produce a helpful list of valid options.
@@ -0,0 +1,24 @@
1
+ You are running the GSD **thread** workflow — manage persistent context threads for cross-session work, backed by the memory store so threads survive across sessions.
2
+
3
+ ## Action
4
+
5
+ {{action}}
6
+
7
+ ## Process
8
+
9
+ A thread is a named, resumable context line: a topic, the open question, decisions so far, and the next step. Threads live in the gsd-pi memory store so they persist and are queryable.
10
+
11
+ Parse the action:
12
+
13
+ - **list [--open|--resolved]** (default): list threads filtered by state. Each entry: slug, status, last-updated, one-line topic.
14
+ - **close <slug>**: mark a thread resolved (record the resolution as a knowledge lesson if durable).
15
+ - **status <slug>**: show a thread's full context (topic, decisions, open question, next step).
16
+ - **<name> / <description>** (bare text): create or update a thread with the given name/description, stamping the current state and next step.
17
+
18
+ Use `/gsd memory` as the backing store for thread persistence. When closing a thread whose resolution is a reusable lesson, also record it via `/gsd knowledge lesson`.
19
+
20
+ ## Success criteria
21
+
22
+ - Threads persist in the memory store, not in a throwaway file.
23
+ - Listing honors the open/resolved filter.
24
+ - Resolved threads with durable lessons feed the knowledge store.
@@ -65,4 +65,4 @@ Classify each capture as one of:
65
65
 
66
66
  **Important:** Do NOT execute any resolutions. Only classify and update CAPTURES.md. Resolution execution happens separately (in auto-mode dispatch or manually by the user).
67
67
 
68
- When done, say: "Triage complete." Say this exactly once — if you already said it in a prior message, do not repeat it.
68
+ When done, say: "Triage closeout submitted." Do not say triage is complete — GSD announces completion only after post-unit verification passes. Say this exactly once — if you already said it in a prior message, do not repeat it.
@@ -0,0 +1,29 @@
1
+ You are running the GSD **ui-phase** workflow — produce a UI design contract (UI-SPEC) for a frontend milestone/slice before implementation.
2
+
3
+ ## Target
4
+
5
+ {{target}}
6
+
7
+ ## Process
8
+
9
+ 1. **Load intent.** Read the milestone/slice goal, requirements, and any existing brand/design references.
10
+
11
+ 2. **Inventory the surfaces.** List every screen/state/component the milestone touches: pages, key states (empty, loading, error, success), and shared components.
12
+
13
+ 3. **Define the design contract per surface:**
14
+ - Layout (structure, responsive behavior)
15
+ - Key interactions and their feedback states
16
+ - Content/copy essentials
17
+ - Accessibility requirements
18
+ - Entry/exit points to other surfaces
19
+
20
+ 4. **Align on constraints.** Brand, type scale, color tokens, spacing system, component library — use existing design tokens where they exist; flag gaps.
21
+
22
+ 5. **Write the UI-SPEC** to the milestone/slice artifact in `.gsd/`. Recommend `/gsd sketch` to prototype high-uncertainty surfaces, or `/gsd plan-phase` to plan implementation.
23
+
24
+ ## Success criteria
25
+
26
+ - Every surface the milestone touches is inventoried.
27
+ - Each surface's contract is concrete enough to implement against.
28
+ - Existing design tokens are reused; gaps are flagged.
29
+ - The recommended next step reflects design readiness.
@@ -0,0 +1,29 @@
1
+ You are running the GSD **ui-review** workflow — retroactive visual audit of implemented frontend code against design intent.
2
+
3
+ ## Target
4
+
5
+ {{target}}
6
+
7
+ ## Process
8
+
9
+ Audit the implemented UI across these pillars, grounding each finding in actual code (component files, styles, markup) with file paths:
10
+
11
+ 1. **Layout & spacing** — alignment, grid/flex correctness, responsive behavior, spacing rhythm.
12
+ 2. **Color & contrast** — palette consistency, accessible contrast ratios, dark/light coherence.
13
+ 3. **Typography** — type scale, hierarchy, line-height, legibility.
14
+ 4. **Interaction & feedback** — hover/focus/active states, loading/empty/error states, motion.
15
+ 5. **Consistency** — shared components reused, design tokens applied, no one-off magic numbers.
16
+ 6. **Accessibility** — semantic markup, keyboard navigation, ARIA correctness, focus management.
17
+
18
+ For each pillar, give a score (0–5) with bullet findings (location + issue + suggested fix).
19
+
20
+ ## Output
21
+
22
+ Write `.gsd/reviews/{{reviewId}}-UI-REVIEW.md` with the per-pillar scores, findings, and a prioritized fix list (critical first). Print the overall score and the critical findings.
23
+
24
+ ## Success criteria
25
+
26
+ - Every finding cites a component/file path.
27
+ - Each pillar has an explicit score, not just prose.
28
+ - Critical findings are surfaced first and are actionable.
29
+ - The review lives under `.gsd/reviews/`.
@@ -0,0 +1,24 @@
1
+ You are running the GSD **ultraplan-phase** workflow — offload heavy planning of a milestone/slice to an extended-reasoning plan pass, review the result, and import it back. This uses a local extended-reasoning pass (an external cloud service is not available in this runtime).
2
+
3
+ ## Target
4
+
5
+ {{target}}
6
+
7
+ ## Process
8
+
9
+ 1. **Assemble the planning brief.** Gather the milestone/slice goal, CONTEXT, RESEARCH, decisions, requirements, and a codebase snapshot into a single self-contained brief.
10
+
11
+ 2. **Run the extended-reasoning plan pass.** Produce a thorough plan from the brief using high reasoning effort: full task decomposition, dependency graph, verification per task, risks. This is the "ultraplan" — more exhaustive than a standard plan pass.
12
+
13
+ 3. **Review in the open.** Present the plan for review (the human reviews it before it's imported). Flag anything uncertain, risky, or that diverges from the stated goal.
14
+
15
+ 4. **Import.** On approval, write the plan to the milestone/slice plan artifact in `.gsd/` and record durable decisions. Note that this replaces the cloud review-and-import with a local review.
16
+
17
+ 5. **Route.** Recommend `/gsd dispatch execute` or `/gsd plan-review-convergence` for a convergence pass.
18
+
19
+ ## Success criteria
20
+
21
+ - The plan is more exhaustive than a standard pass (that's the point of the offload).
22
+ - The human reviews before import (no silent overwrite of an existing plan).
23
+ - The brief is self-contained so the reasoning isn't context-starved.
24
+ - Durable decisions are persisted on import.
@@ -0,0 +1,26 @@
1
+ You are running the GSD **validate-phase** workflow — retroactively audit and fill validation coverage gaps for completed work, using Nyquist-style coverage sampling.
2
+
3
+ ## Target
4
+
5
+ {{target}}
6
+
7
+ ## Process
8
+
9
+ 1. **Map the verification surface.** For the target's tasks, list what behaviors/outputs each claims to verify, and the test (or manual check) that verifies it.
10
+
11
+ 2. **Find coverage gaps.** Identify: behaviors with no test, error/edge paths untested, boundaries between slices untested, and claims verified only by happy-path tests. Apply a Nyquist lens — sample at the rate needed to catch the behavior changing, not just once.
12
+
13
+ 3. **Generate the missing tests.** For each gap that is safe to fill deterministically, write the test (matching the project's test framework and conventions). Run the test suite after adding tests. For gaps that need a human (UI, exploratory), record them as UAT items instead of auto-generating.
14
+
15
+ 4. **Update the validation record.** Write/append the slice's VALIDATION note (or `.gsd/` equivalent) with the coverage map before/after, the tests added, and the remaining human-UAT items.
16
+
17
+ 5. **Report.** Summarize: gaps found, tests added (passing), and remaining human-UAT items.
18
+
19
+ Prefer delegating test generation to `/gsd add-tests` where it fits, rather than hand-writing every test.
20
+
21
+ ## Success criteria
22
+
23
+ - Every claimed behavior is mapped to a test (or flagged as needing human UAT).
24
+ - Generated tests pass and match the project's conventions.
25
+ - The validation record reflects the new coverage honestly.
26
+ - Human-only gaps are recorded as UAT items, not silently skipped.
@@ -0,0 +1,24 @@
1
+ You are running the GSD **verify-work** workflow — validate built features through conversational UAT.
2
+
3
+ ## Target
4
+
5
+ {{target}}
6
+
7
+ ## Process
8
+
9
+ 1. **Load what was built.** Read the target slice/milestone plan and SUMMARY to understand what features were delivered and what their acceptance criteria are.
10
+
11
+ 2. **Draft a UAT script.** Turn each acceptance criterion into a concrete, observable test step the human can perform (or that you can perform via tooling where possible). Group by feature; order so earlier steps set up later ones.
12
+
13
+ 3. **Walk through the script conversationally.** Present one step (or a small group) at a time. For each, record the outcome: `pass`, `fail` (with what happened), `blocked` (with the blocker), or `skipped` (intentionally). Do not advance past a fail without acknowledging it.
14
+
15
+ 4. **Where you can self-verify** (deterministic checks: type checks, tests, lint, schema), run them and include the result alongside the human step.
16
+
17
+ 5. **Produce the verdict.** After all steps: `pass` (all criteria met), `needs-attention` (some steps failed but none blocking), or `needs-remediation` (a blocking failure). Record the UAT outcome against the slice via the appropriate gsd-pi mechanism.
18
+
19
+ ## Success criteria
20
+
21
+ - Every acceptance criterion becomes a concrete, observable step.
22
+ - Outcomes are recorded honestly — fails are not hidden.
23
+ - Deterministic checks are run where possible, not just asked about.
24
+ - The final verdict maps to a canonical gsd-pi outcome.
@@ -0,0 +1,22 @@
1
+ You are running the GSD **workspace** workflow — manage isolated workspace environments for parallel or experimental work.
2
+
3
+ ## Action
4
+
5
+ {{action}}
6
+
7
+ ## Process
8
+
9
+ A workspace is an isolated environment backed by a git worktree. Map workspace actions onto worktrees:
10
+
11
+ - **--list / list** (default): show all worktrees with state (current, merged, clean, dirty) — `/gsd worktree list`.
12
+ - **--remove <name>**: remove a worktree — `/gsd worktree remove`.
13
+ - **--merge <name>**: merge a worktree — `/gsd worktree merge`.
14
+ - **--clean / clean**: clean stale worktree records — `/gsd worktree clean`.
15
+
16
+ Route every structural action to `/gsd worktree` rather than hand-managing git worktrees.
17
+
18
+ ## Success criteria
19
+
20
+ - Listing reflects canonical worktree state.
21
+ - Structural actions route to `/gsd worktree`, keeping state canonical.
22
+ - Removing a dirty worktree is guarded (confirm first).
@@ -0,0 +1,24 @@
1
+ You are running the GSD **workstreams** workflow — manage parallel workstreams that run multiple milestones concurrently with isolation.
2
+
3
+ ## Action
4
+
5
+ {{action}}
6
+
7
+ ## Process
8
+
9
+ A workstream is a parallel worker running its own milestone in its own branch/worktree. Map workstream actions onto parallel workers:
10
+
11
+ - **list / status** (default): show all parallel workers — milestone, branch/worktree, progress, state (running/paused/done/failed).
12
+ - **create / start**: start parallel workers for all eligible milestones (`/gsd parallel start`). Does not accept a milestone target; use `/gsd parallel start` directly to start all eligible milestones.
13
+ - **switch**: focus the dashboard on the most active worker (`/gsd parallel watch`). Does not accept a milestone target; use `/gsd parallel watch` directly to monitor workers.
14
+ - **progress**: show all workers' progress (`/gsd parallel status`). Does not accept a milestone target; use `/gsd parallel status` directly for worker status.
15
+ - **pause / resume <milestone>**: pause or resume a worker (`/gsd parallel pause|resume`).
16
+ - **complete <milestone>**: complete and merge a worker's milestone (`/gsd parallel merge`).
17
+
18
+ Route every structural action to `/gsd parallel <subcommand>` rather than reimplementing worktree/merge logic.
19
+
20
+ ## Success criteria
21
+
22
+ - Status reflects canonical parallel-worker state.
23
+ - Structural actions route to `/gsd parallel`, not duplicates.
24
+ - Unknown milestones list the valid options rather than failing silently.
@@ -44,11 +44,35 @@ function defaultAlternateModel(provider, modelId) {
44
44
  }
45
45
  return undefined;
46
46
  }
47
+ function isGeminiCliDeprecatedError(errorMsg) {
48
+ return (/IneligibleTierError/i.test(errorMsg)
49
+ || /UNSUPPORTED_CLIENT/i.test(errorMsg)
50
+ || /no longer supported for Gemini Code Assist for individuals/i.test(errorMsg)
51
+ || /migrate to the Antigravity suite/i.test(errorMsg));
52
+ }
53
+ function resolveGeminiCliDeprecationGuidance(input) {
54
+ const { provider, modelId, unitType } = input;
55
+ const modelLabel = provider && modelId ? `${provider}/${modelId}` : modelId ?? provider ?? "google-gemini-cli";
56
+ const unitSuffix = unitType ? ` during ${unitType}` : "";
57
+ return {
58
+ summary: `Provider error on ${modelLabel}${unitSuffix}. ` +
59
+ "Google no longer supports Gemini CLI for individual-tier users — migrate to Antigravity CLI.",
60
+ steps: [
61
+ "Install Antigravity CLI: curl -fsSL https://antigravity.google/cli/install.sh | bash",
62
+ "Run `agy` in a terminal and complete authentication.",
63
+ "In GSD, run `/login` and select Antigravity, or restart GSD to auto-migrate when `agy` is on PATH.",
64
+ "Run /gsd next to resume the paused unit.",
65
+ ],
66
+ };
67
+ }
47
68
  /**
48
69
  * Build concrete next steps for a provider/model rejection pause.
49
70
  */
50
71
  export function resolveProviderErrorGuidance(input) {
51
72
  const { errorMsg, provider, modelId, unitType, preferencesPath, hasConfiguredFallbacks, } = input;
73
+ if (isGeminiCliDeprecatedError(errorMsg)) {
74
+ return resolveGeminiCliDeprecationGuidance(input);
75
+ }
52
76
  const modelLabel = provider && modelId ? `${provider}/${modelId}` : modelId ?? provider ?? "current model";
53
77
  const phaseKey = unitTypeToPrefsPhaseKey(unitType);
54
78
  const prefsFile = preferencesPath ?? ".gsd/PREFERENCES.md";
@@ -31,8 +31,9 @@ export function loadQueueOrder(basePath) {
31
31
  return data?.order ?? null;
32
32
  }
33
33
  /**
34
- * Save a custom queue order. The DB sequence is canonical when a DB
35
- * connection is open; QUEUE-ORDER.json remains a compatibility projection.
34
+ * Save a custom queue order. When the DB connection is open, mirror the order
35
+ * into milestone sequence; QUEUE-ORDER.json remains the durable file contract
36
+ * for prompt-driven flows such as /gsd rethink.
36
37
  */
37
38
  export function saveQueueOrder(basePath, order) {
38
39
  if (isDbAvailable()) {