@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,31 @@
1
+ You are running the GSD **discuss-phase** workflow — gather context for upcoming work through adaptive questioning before planning.
2
+
3
+ ## Target
4
+
5
+ {{target}}
6
+
7
+ ## Flags
8
+
9
+ - `--auto` — {{autoFlag}} (when ON, infer answers from existing artifacts without asking)
10
+ - `--text` — {{textFlag}} (when ON, use plain-text questions instead of interactive prompts)
11
+
12
+ ## Process
13
+
14
+ 1. **Load context.** Read the target milestone's ROADMAP entry, CONTEXT, RESEARCH, prior SUMMARYs, and the Decisions Register. This preloaded context is authoritative — do not re-read these files; reference them.
15
+
16
+ 2. **Take a codebase snapshot.** A bounded sample of current code reality (≤5 source files, ≤8KB each) to ground questions. Read a specific file only when a question's answer hinges on it.
17
+
18
+ 3. **Ask grounded questions, one at a time.** Questions must be grounded in the preloaded context + snapshot — never an open-ended survey of the codebase before the first round. Probe: scope boundaries, success criteria, risks, unknowns, integration points.
19
+
20
+ 4. **`--auto` mode:** infer answers from the artifacts rather than asking, and record the inferences as assumptions to be confirmed later.
21
+
22
+ 5. **Record outcomes.** When the discussion settles, capture: decisions (to the Decisions Register via `/gsd knowledge rule` where durable), refined scope (to the milestone CONTEXT), open questions (to RESEARCH or `/gsd dispatch research`), and assumptions. Mark the milestone/slice as "Discussion Complete, Planning Pending".
23
+
24
+ 6. **Route.** Recommend the next step: `/gsd dispatch plan` to plan the milestone/slice, or `/gsd dispatch research` if open questions dominate.
25
+
26
+ ## Success criteria
27
+
28
+ - Questions are grounded and asked one at a time — no upfront survey.
29
+ - The preloaded context is treated as authoritative (not re-read).
30
+ - Outcomes land in the right gsd-pi artifacts.
31
+ - The recommended next step matches where the milestone now sits.
@@ -0,0 +1,13 @@
1
+ You are running the GSD **docs-update** workflow — generate, update, and verify project documentation against the live codebase.
2
+
3
+ ## Mode
4
+
5
+ {{mode}}
6
+
7
+ ## Process
8
+
9
+ {{process}}
10
+
11
+ ## Success criteria
12
+
13
+ {{successCriteria}}
@@ -0,0 +1,33 @@
1
+ You are running the GSD **execute-phase** workflow — execute all tasks in a milestone/slice with wave-based parallelization.
2
+
3
+ ## Target
4
+
5
+ {{target}}
6
+
7
+ ## Flags
8
+
9
+ - `--wave N` — {{waveFlag}} (max parallel tasks per wave)
10
+ - `--gaps-only` — {{gapsOnlyFlag}} (only execute tasks whose verification is incomplete)
11
+ - `--interactive` — {{interactiveFlag}} (confirm each wave)
12
+ - `--tdd` — {{tddFlag}}
13
+
14
+ ## Process
15
+
16
+ 1. **Load the plan.** Read the milestone/slice plan and task list. Determine task dependencies and group independent tasks into waves.
17
+
18
+ 2. **Execute wave-by-wave.** Within a wave, independent tasks can run in parallel (bounded by `--wave`). Each task: implement → run its verification → record outcome. `--gaps-only` restricts to tasks with incomplete verification.
19
+
20
+ 3. **Per-task guarantees.** Each completed task gets an atomic commit and an updated SUMMARY. Failing verification blocks that task's completion (do not mark it done).
21
+
22
+ 4. **Between waves**, confirm if `--interactive`, then proceed to the next wave respecting dependencies.
23
+
24
+ 5. **Honor closeout boundaries.** Stop after the first task/slice/milestone closeout boundary and leave the final closeout surface visible — do not barrel through multiple closeouts.
25
+
26
+ Prefer delegating single-task execution to gsd-pi's execute machinery (`/gsd next`, `/gsd dispatch execute`) where it fits.
27
+
28
+ ## Success criteria
29
+
30
+ - Every task attempted is either completed (verified + committed) or left blocked with a clear reason.
31
+ - Wave parallelism respects task dependencies.
32
+ - Closeout boundaries are honored (stop, don't barrel).
33
+ - Atomic commits per task; SUMMARY updated per task.
@@ -63,6 +63,10 @@ Keep about **{{verificationBudget}}** for verification and summary. If context i
63
63
 
64
64
  ## Completion Contract
65
65
 
66
+ ### Closeout messaging (auto-mode)
67
+
68
+ You write task closeout artifacts; **GSD auto-mode** decides when the task is actually **done**. Never say "Task {{taskId}} complete" in this unit — not even after `gsd_task_complete` succeeds. GSD announces completion only after post-unit verification passes.
69
+
66
70
  - If the plan is fundamentally invalid, set `blocker_discovered: true` in the summary and explain.
67
71
  - For downstream-impacting ambiguity that cannot be resolved from code, plans, or decisions, include an `escalation` object with question, options, recommendation, rationale, and `continueWithDefault`.
68
72
  - Capture meaningful architecture/pattern/observability decisions with `gsd_capture_thought` (or MCP-scoped `mcp__...__gsd_capture_thought`) when workflow MCP tools are presented; capture non-obvious gotchas or conventions only when they save future investigation.
@@ -77,4 +81,4 @@ Keep about **{{verificationBudget}}** for verification and summary. If context i
77
81
 
78
82
  **You MUST call `gsd_task_complete` before finishing, including when the stale-path safety rule stops execution.**
79
83
 
80
- When done, say: "Task {{taskId}} complete." Say this exactly once — if you already said it in a prior message, do not repeat it.
84
+ When done, say: "Task {{taskId}} closeout submitted." Do not say the task is complete. Say this exactly once — if you already said it in a prior message, do not repeat it.
@@ -0,0 +1,58 @@
1
+ You are running the GSD **explore** workflow — Socratic ideation that helps the developer think an idea through before committing to plans or milestones.
2
+
3
+ ## Idea
4
+
5
+ {{topic}}
6
+
7
+ ## Process
8
+
9
+ ### Step 1 — Open the conversation
10
+
11
+ If a topic was provided, acknowledge it and begin exploring. If not, ask what's on their mind (a feature idea, an architectural question, a problem, or something they're unsure about).
12
+
13
+ ### Step 2 — Socratic conversation (2–5 exchanges)
14
+
15
+ - Ask **one question at a time** — never a list.
16
+ - Probe: constraints, tradeoffs, users, scope, dependencies, risks.
17
+ - Listen for "or" / "versus" / "tradeoff" signals — competing priorities worth exploring.
18
+ - Reflect back what you hear to confirm understanding before moving on.
19
+ - Follow the developer's energy — go deeper where they're engaged. Natural, not formulaic.
20
+
21
+ ### Step 3 — Mid-conversation research offer (after 2–3 exchanges)
22
+
23
+ If the conversation surfaces factual questions, technology comparisons, or unknowns that research could resolve, offer a quick research pass. If the developer accepts, dispatch the project's research tooling. Skip entirely if the topic doesn't warrant it — never force it.
24
+
25
+ ### Step 4 — Crystallize outputs (after 3–6 exchanges)
26
+
27
+ When the conversation reaches natural conclusions (or the developer signals readiness), analyze what was discussed and propose **up to 4 outputs** from:
28
+
29
+ | Type | Destination (gsd-pi) | When to suggest |
30
+ |------|----------------------|-----------------|
31
+ | Capture | `.gsd/CAPTURES.md` (append) | Observations, context, decisions worth remembering |
32
+ | Backlog item | `/gsd backlog add` | Forward-looking ideas not ready for a milestone |
33
+ | Knowledge | `/gsd knowledge lesson` | A lesson learned worth persisting |
34
+ | Research | `/gsd dispatch research` | Open questions needing deeper investigation |
35
+ | Requirement | `.gsd/CONTEXT.md` (append under "Domain glossary") | Clear requirements that emerged |
36
+ | New milestone | `/gsd new-milestone` | Scope large enough to warrant its own milestone |
37
+ | Spike | `/gsd spike` | Feasibility uncertainty surfaced ("will this API work?") |
38
+ | Sketch | `/gsd brief diagram` | Design direction unclear ("what should this look like?") |
39
+
40
+ Present the suggestions and ask the developer to pick, modify, or skip.
41
+
42
+ **Never write artifacts without explicit user selection.**
43
+
44
+ ### Step 5 — Write selected outputs
45
+
46
+ For each selected output, use the matching gsd-pi command or write to the destination listed above. Prefer invoking the gsd-pi command (e.g. `/gsd backlog add`, `/gsd knowledge lesson`) so state stays canonical.
47
+
48
+ ### Step 6 — Close
49
+
50
+ Summarize the topic, list the artifacts created, and suggest next steps (`/gsd explore` again, or `/gsd status` to see where to apply the work).
51
+
52
+ ## Success criteria
53
+
54
+ - Questions asked one at a time, not in batches.
55
+ - Research offered contextually, not forced.
56
+ - Up to 4 outputs proposed, grounded in the actual conversation.
57
+ - User explicitly selects which outputs to create before anything is written.
58
+ - Artifacts go to the gsd-pi destinations above.
@@ -0,0 +1,27 @@
1
+ You are running the GSD **graphify** workflow — build, query, and inspect a lightweight project knowledge graph. The graph lives in `.gsd/knowledge/` and is grounded in CODEBASE.md and project memories.
2
+
3
+ ## Action
4
+
5
+ {{action}}
6
+
7
+ ## Process
8
+
9
+ The knowledge graph is a set of Markdown + a JSON edge index under `.gsd/knowledge/`:
10
+ - `nodes.md` — entities discovered in the codebase (modules, services, data models, external integrations), each with a stable id, type, file path, and one-line description.
11
+ - `edges.json` — relationships between nodes (`depends-on`, `calls`, `implements`, `produces`, `consumes`).
12
+
13
+ Parse the action:
14
+
15
+ - **build** (default when no action): Re-scan the codebase and CODEBASE.md, extract nodes and edges, and write/refresh `nodes.md` and `edges.json`. Preserve human-added annotations where possible. Stamp the build with the current HEAD commit.
16
+ - **query <term>**: Look up nodes matching the term and print their direct relationships (one hop). Show the evidence (file path) for each edge.
17
+ - **status**: Print graph stats — node count by type, edge count by relationship, last build commit. Say if the graph is stale (HEAD moved since last build).
18
+ - **diff**: Compare the current codebase HEAD against the last build commit and report added/removed/changed nodes — a drift report.
19
+
20
+ Ground extraction in real code. Do not invent nodes. When the codebase has no CODEBASE.md, suggest running `/gsd codebase generate` first.
21
+
22
+ ## Success criteria
23
+
24
+ - Nodes and edges are backed by real file evidence.
25
+ - The graph lives under `.gsd/knowledge/`.
26
+ - Query/status/diff give accurate, evidence-backed answers.
27
+ - Stale graphs are detected and reported.
@@ -0,0 +1,37 @@
1
+ You are running the GSD **health** workflow — validate `.gsd/` directory integrity and report actionable issues, optionally repairing auto-fixable ones.
2
+
3
+ ## Flags
4
+
5
+ - `--repair` — {{repairFlag}} (when ON, auto-fix detected issues)
6
+ - `--context` — {{contextFlag}} (when ON, report context-window utilization instead of directory health)
7
+
8
+ ## Process
9
+
10
+ ### Directory integrity (default; skip if `--context`)
11
+
12
+ Check the canonical `.gsd/` state for:
13
+
14
+ - **Missing or malformed artifacts:** ROADMAP, milestone/slice markdown projections, CONTEXT, CAPTURES.
15
+ - **DB/disk drift:** rows in the canonical DB that don't match the markdown projections (and vice-versa).
16
+ - **Orphaned artifacts:** slices/tasks referenced nowhere, or projections whose DB rows are gone.
17
+ - **Incomplete/inconsistent state:** an active milestone that's actually complete, a locked milestone with no lease, stale crash locks.
18
+ - **Unmerged completed milestones:** milestones marked complete but never merged/published.
19
+
20
+ For each issue, classify it: **auto-fixable** (drift repair, projection rebuild) or **needs-human** (data loss, ambiguous state). When `--repair` is ON, apply the auto-fixable fixes (preferring gsd-pi's repair tooling: `/gsd doctor fix`, `/gsd rebuild markdown`). Report exactly what changed.
21
+
22
+ Prefer delegating the heavy lifting to gsd-pi's existing repair commands rather than hand-editing state.
23
+
24
+ ### Context utilization (only when `--context`)
25
+
26
+ Report the session's approximate tokens used vs. the active model's context window, and what is consuming it (skills, injections, history). Suggest compaction or pruning if utilization is high.
27
+
28
+ ## Output
29
+
30
+ Present issues grouped by severity (needs-human first, then auto-fixable). For `--repair`, also list each fix applied with a one-line before/after. If everything is healthy, say so plainly.
31
+
32
+ ## Success criteria
33
+
34
+ - Every reported issue is concrete and actionable (file/row + what's wrong + how to fix).
35
+ - Repairs use gsd-pi repair tooling where it exists.
36
+ - No silent destructive changes — auto-fixable means reversible/projection-level only.
37
+ - Context mode and directory mode are orthogonal and never mixed.
@@ -0,0 +1,30 @@
1
+ You are running the GSD **import** workflow — ingest an external plan with conflict detection against existing project decisions before writing anything.
2
+
3
+ ## Flags
4
+
5
+ - `--resolve auto|interactive` — {{resolveFlag}}
6
+
7
+ ## Source
8
+
9
+ {{source}}
10
+
11
+ ## Process
12
+
13
+ 1. **Read the source plan.** From the given filepath (or `--from-gsd2` to migrate a legacy `.planning/` directory laid out as ordered phases). Parse its phases, requirements, decisions, and tasks.
14
+
15
+ 2. **Conflict detection (before writing).** Compare the source's decisions and requirements against the project's existing CONTEXT, Decisions Register, KNOWLEDGE rules, and current milestones. Flag: contradictory decisions, duplicate requirements, scope that overlaps an existing milestone, and terminology mismatches.
16
+
17
+ 3. **Present the conflict report.** List conflicts by severity (blocking / warning / info). Do not write anything yet.
18
+
19
+ 4. **Resolve.** For each conflict, propose a resolution (adopt source, keep ours, merge). In `--resolve auto`, apply the safe merges and flag the rest; in `--resolve interactive`, confirm each resolution with the user.
20
+
21
+ 5. **Import.** On approval, translate the source into gsd-pi artifacts: phases → milestones, requirements → CONTEXT/requirements, decisions → Decisions Register (`/gsd knowledge rule`), tasks → slice tasks. Prefer `/gsd migrate` machinery for whole `.planning/` imports.
22
+
23
+ Nothing is written until conflicts are resolved.
24
+
25
+ ## Success criteria
26
+
27
+ - Conflicts are detected and reported before any write.
28
+ - No destructive overwrite of existing decisions without explicit resolution.
29
+ - Phase-based source content is translated to gsd-pi's milestone/slice model.
30
+ - Whole-`.planning/` imports route through `/gsd migrate`.
@@ -0,0 +1,27 @@
1
+ You are running the GSD **inbox** workflow — triage and review open GitHub issues and PRs against the project's conventions, using the GitHub Issues tracker referenced in AGENTS.md.
2
+
3
+ ## Flags
4
+
5
+ - `--issues` / `--prs` — {{focusFlag}} (which to review; default both)
6
+ - `--label <name>` — {{labelFlag}}
7
+ - `--close-incomplete` — {{closeIncompleteFlag}} (close items that don't meet contribution requirements)
8
+ - `--repo <owner/repo>` — {{repo}}
9
+
10
+ ## Process
11
+
12
+ 1. **Fetch open items.** Use the `gh` CLI (or the project's GitHub integration) to list open issues and/or PRs, applying the label and repo filters.
13
+
14
+ 2. **Triage each item** against the project's contribution guide and templates:
15
+ - **Issues**: is it actionable? Does it have reproduction, labels, expected/actual? Route: promote to backlog (`/gsd backlog add`), request info, or close incomplete.
16
+ - **PRs**: does it meet the PR checklist (tests, docs, conventional commits, scope)? Route: request changes, request review, or merge-ready.
17
+
18
+ 3. **Present the triage** with the recommended action per item. When `--close-incomplete` is ON, also act on the clear-close items (with a comment explaining why).
19
+
20
+ 4. **Act on confirmation** for non-close actions: add to backlog, request changes, etc. Never merge or close-without-comment automatically.
21
+
22
+ ## Success criteria
23
+
24
+ - Triage is grounded in the actual issue/PR content, not assumptions.
25
+ - Each item gets a concrete recommended action.
26
+ - Destructive actions (close, merge) require confirmation or an explicit flag.
27
+ - Actionable issues feed the backlog so they aren't lost.
@@ -0,0 +1,30 @@
1
+ You are running the GSD **ingest-docs** workflow — bootstrap or merge a `.gsd/` setup from existing ADRs, PRDs, SPECs, and docs in the repo.
2
+
3
+ ## Flags
4
+
5
+ - `--mode new|merge` — {{modeFlag}} (new = fresh .gsd/; merge = fold into existing)
6
+ - `--manifest <file>` — {{manifestFlag}} (a manifest listing which docs to ingest)
7
+ - `--resolve auto|interactive` — {{resolveFlag}}
8
+
9
+ ## Source path
10
+
11
+ {{path}}
12
+
13
+ ## Process
14
+
15
+ 1. **Discover source docs.** Scan the given path (default: repo root) for decision records (ADRs, MADR, Nygard), PRDs, SPECs, RFCs, and READMEs that carry project knowledge. Apply the manifest filter if given.
16
+
17
+ 2. **Classify each doc**: decision (→ Decisions Register), requirement/spec (→ CONTEXT/requirements), context/narrative (→ CONTEXT), architecture (→ CODEBASE or RESEARCH).
18
+
19
+ 3. **Conflict detection.** When `--mode merge`, detect where ingested decisions contradict the existing Decisions Register and flag them.
20
+
21
+ 4. **Resolve.** In `--resolve auto`, apply safe ingests and flag conflicts; otherwise confirm each.
22
+
23
+ 5. **Bootstrap/merge.** For `--mode new`, run `/gsd init` then write the ingested artifacts. For `--mode merge`, append into the existing `.gsd/` artifacts. Record ingested decisions durably via `/gsd knowledge rule`.
24
+
25
+ ## Success criteria
26
+
27
+ - Source docs are discovered and classified, not blindly copied.
28
+ - Merge conflicts are detected before writing.
29
+ - Decisions land in the Decisions Register; requirements in CONTEXT — not dumped as raw files.
30
+ - Bootstrap and merge both route through gsd-pi init/knowledge commands.
@@ -0,0 +1,21 @@
1
+ You are running the GSD **manager** workflow — an interactive command center for managing multiple milestones from one terminal.
2
+
3
+ ## Flags
4
+
5
+ - `--analyze-deps` — {{analyzeDepsFlag}} (when ON, also analyze cross-milestone dependencies)
6
+
7
+ ## Process
8
+
9
+ 1. **Load the milestone queue.** Read all milestones with their state (active, queued, parked, complete), progress (slices/tasks done/total), and last activity.
10
+
11
+ 2. **Present the dashboard.** Show milestones grouped by state with a compact progress indicator each. Highlight the active milestone and any blockers.
12
+
13
+ {{managerActions}}
14
+
15
+ 4. **`--analyze-deps`:** scan for cross-milestone dependencies (shared files, shared APIs, sequencing) and surface them so the developer can order milestones to avoid integration conflicts.
16
+
17
+ {{managerSelectionStep}}
18
+
19
+ ## Success criteria
20
+
21
+ {{managerSuccessCriteria}}
@@ -0,0 +1,42 @@
1
+ You are running the GSD **map-codebase** workflow — analyze the codebase and produce structured reference documents that planning and execution can rely on. Output goes to `.gsd/codebase/`.
2
+
3
+ ## Scope
4
+
5
+ {{scope}}
6
+
7
+ ## Output directory
8
+
9
+ `{{outputDir}}`
10
+
11
+ ## Philosophy
12
+
13
+ - **Practical detail over arbitrary brevity.** Include enough to be useful as reference, with real code patterns.
14
+ - **Always include file paths** formatted with backticks (e.g. `src/services/user.ts`). These documents are reference material for planning and execution.
15
+ - Prefer reading the code directly over guessing.
16
+
17
+ ## Documents to produce
18
+
19
+ Write a well-structured Markdown file in `{{outputDir}}/` for each relevant document:
20
+
21
+ - **STACK.md** — languages, runtimes, versions; key frameworks/libraries; build tools; package manager.
22
+ - **INTEGRATIONS.md** — third-party APIs/services; databases; auth providers; infra/deploy; comms services.
23
+ - **ARCHITECTURE.md** — architecture style; core data flow; key design patterns; module/package boundaries.
24
+ - **STRUCTURE.md** — directory layout with purpose of each top-level dir; entry points; where tests live.
25
+ - **CONVENTIONS.md** — coding conventions, naming, error handling, logging patterns.
26
+ - **TESTING.md** — test framework(s), how to run tests, test structure, coverage approach.
27
+ - **CONCERNS.md** — technical debt, risk areas, TODO/FIXME clusters, fragile areas.
28
+
29
+ Only produce documents relevant to this project (skip ones with nothing to say). Stamp each document's YAML frontmatter with `last_mapped_commit: <current HEAD sha>` so drift can be detected later.
30
+
31
+ ## Process
32
+
33
+ 1. Detect the project's stack and structure (read manifests, top-level dirs, entry points).
34
+ 2. Read representative source files to ground each document in real evidence.
35
+ 3. Write each document with concrete examples and file paths.
36
+ 4. Print a short summary of which documents were created/updated and their line counts.
37
+
38
+ ## Success criteria
39
+
40
+ - Every produced document is grounded in real code with file paths.
41
+ - Documents live under `.gsd/codebase/`.
42
+ - Each document has a `last_mapped_commit` frontmatter stamp.
@@ -0,0 +1,27 @@
1
+ You are running the GSD **milestone-summary** workflow — generate a comprehensive project summary from milestone artifacts for onboarding and review.
2
+
3
+ ## Target
4
+
5
+ {{target}}
6
+
7
+ ## Process
8
+
9
+ 1. **Gather artifacts.** Read the target milestone's ROADMAP entry, CONTEXT, RESEARCH, per-slice SUMMARY/ASSESSMENT, the Decisions Register, and any UAT/validation outcomes. If no target, summarize the whole project across milestones.
10
+
11
+ 2. **Synthesize the summary** covering:
12
+ - What the milestone/project set out to do (intent + requirements).
13
+ - What was delivered (slices, key changes, by area).
14
+ - Key decisions made and why (from the Decisions Register).
15
+ - Verification outcomes (tests, UAT, audits).
16
+ - Known gaps, deferred work, and tech debt.
17
+ - Onboarding notes: how to run, where things live, gotchas.
18
+
19
+ 3. **Write the summary** to `.gsd/summaries/` and print it. For a milestone, name it after the milestone id; for a project, name it with the date.
20
+
21
+ 4. **Recommend next steps** based on the summary (next milestone, remediation, archive).
22
+
23
+ ## Success criteria
24
+
25
+ - The summary is grounded in artifacts, not memory.
26
+ - Decisions and gaps are included, not just the happy-path deliverables.
27
+ - Onboarding notes are concrete (commands, paths) not vague.
@@ -0,0 +1,23 @@
1
+ You are running the GSD **mvp-phase** workflow — plan a milestone as a vertical MVP slice: a single user story, split into the thinnest end-to-end path, then planned (SPIDR splitting).
2
+
3
+ ## Target
4
+
5
+ {{target}}
6
+
7
+ ## Process
8
+
9
+ 1. **Capture the user story.** One concrete story: "A user can …" that exercises the full stack end-to-end.
10
+
11
+ 2. **Split into the thinnest vertical slice** that proves the story. Identify the happy path that touches every layer (UI → API → data → back) with the minimum viable behavior. Defer everything else to later milestones.
12
+
13
+ 3. **SPIDR-split if the slice is still too large** — split by Story, Process, Interface, Data, Rules — and pick the single sub-slice that delivers the story.
14
+
15
+ 4. **Define the demo.** The observable behavior that proves the MVP works (a concrete demo step).
16
+
17
+ 5. **Hand off to planning.** Record the MVP scope (story, slice, demo, deferred items) on the milestone and recommend `/gsd plan-phase` to plan the slice, or `/gsd new-milestone` if this should be its own milestone.
18
+
19
+ ## Success criteria
20
+
21
+ - The slice is genuinely vertical (touches every layer) and genuinely minimal (nothing that isn't needed to prove the story).
22
+ - The demo is concrete and observable.
23
+ - Deferred work is listed, not lost.
@@ -0,0 +1,24 @@
1
+ You are running the GSD **pause-work** workflow — create a context handoff when pausing work mid-stream, so the next session can resume cleanly.
2
+
3
+ ## Flags
4
+
5
+ - `--report` — {{reportFlag}} (also produce a human-readable pause report)
6
+
7
+ ## Process
8
+
9
+ 1. **Snapshot current state.** Capture the active milestone/slice/task, what was just done, what is in-flight (partially edited files, uncommitted work), and the intended next step. Pull this from canonical gsd-pi state, not memory.
10
+
11
+ 2. **Capture open threads.** Unresolved questions, decisions pending, blockers, and TODOs that the next session must pick up.
12
+
13
+ 3. **Write the handoff.** Persist a `HANDOFF.md` (or append to the slice's running notes) in `.gsd/` with: state snapshot, in-flight work, open threads, and the explicit resume instruction ("next: resume <slice/task>, do <X>").
14
+
15
+ 4. **Pause cleanly.** Commit any safe-to-commit work; leave a clear note on anything intentionally left dirty. Trigger the gsd-pi pause (`/gsd pause`) so auto-mode stops.
16
+
17
+ 5. **`--report`:** also print a concise pause report to the terminal.
18
+
19
+ ## Success criteria
20
+
21
+ - The handoff is grounded in canonical state, not memory.
22
+ - The resume instruction is explicit and actionable.
23
+ - Auto-mode is actually paused, not just documented.
24
+ - In-flight/dirty state is called out honestly.
@@ -0,0 +1,22 @@
1
+ You are running the GSD **phase** workflow — CRUD for milestone ordering.
2
+
3
+ ## Action
4
+
5
+ {{action}}
6
+
7
+ ## Process
8
+
9
+ Work is modeled as an ordered milestone queue. Map the requested action onto the queue:
10
+
11
+ - **add / insert <name>**: add a new milestone to the queue (or insert it at a position). Use `/gsd new-milestone` semantics then `/gsd queue` to position it.
12
+ - **remove <id>**: remove a milestone from the queue (park it rather than hard-delete, to preserve history — confirm with the developer).
13
+ - **edit <id>**: edit a milestone's title/scope in the ROADMAP/CONTEXT.
14
+ - **list** (default): show the ordered milestone queue with state and progress.
15
+
16
+ Confirm any destructive action (remove) before applying. Route structural changes through gsd-pi's queue/new-milestone/park commands rather than hand-editing state.
17
+
18
+ ## Success criteria
19
+
20
+ - The action maps to the milestone queue, not a phase file.
21
+ - Destructive actions are confirmed and prefer park-over-delete.
22
+ - Structural changes go through gsd-pi commands, keeping state canonical.
@@ -0,0 +1,34 @@
1
+ You are running the GSD **plan-phase** workflow — create a detailed plan for a milestone/slice with a verification loop.
2
+
3
+ ## Target
4
+
5
+ {{target}}
6
+
7
+ ## Flags
8
+
9
+ - `--auto` — {{autoFlag}}
10
+ - `--research` / `--skip-research` — {{researchFlag}}
11
+ - `--tdd` — {{tddFlag}} (plan test-first)
12
+
13
+ ## Process
14
+
15
+ 1. **Load authoritative context.** Read the milestone ROADMAP entry, CONTEXT, RESEARCH, the Decisions Register, and the discuss outcomes. Take a bounded codebase snapshot to ground the plan in current code reality.
16
+
17
+ 2. **Research (unless skipped).** If open questions remain and `--skip-research` is off, run a bounded research pass (grounded in the snapshot, not an open-ended survey). Fold findings into RESEARCH.
18
+
19
+ 3. **Decompose into slices/tasks.** Break the milestone into ordered, independently-verifiable slices; break each slice into concrete tasks. Each task has a clear definition of done and a verification method.
20
+
21
+ 4. **Plan test-first** (when `--tdd`): for each task, specify the test that proves it before specifying the implementation.
22
+
23
+ 5. **Verification loop.** Self-review the plan for gaps: missing tasks, unclear acceptance, orphaned requirements, unrealistic ordering. Revise until the plan is internally consistent.
24
+
25
+ 6. **Write the plan** to the milestone/slice's plan artifact in `.gsd/`. Record durable decisions via `/gsd knowledge rule`.
26
+
27
+ 7. **Route.** Recommend `/gsd dispatch execute` (or `/gsd next`).
28
+
29
+ ## Success criteria
30
+
31
+ - Every requirement maps to at least one task.
32
+ - Each task has a definition of done and a verification method.
33
+ - The plan is grounded in current code (snapshot), not assumptions.
34
+ - Durable decisions are persisted, not lost in the plan body.
@@ -0,0 +1,34 @@
1
+ You are running the GSD **plan-review-convergence** workflow — iterate a plan through review cycles until reviewer concerns are resolved or escalate.
2
+
3
+ ## Target
4
+
5
+ {{target}}
6
+
7
+ ## Reviewers
8
+
9
+ {{reviewers}}
10
+
11
+ ## Max cycles
12
+
13
+ {{maxCycles}}
14
+
15
+ ## Process
16
+
17
+ 1. **Load the plan.** Read the target milestone/slice plan (and its requirements/CONTEXT). If no plan exists yet, suggest `/gsd dispatch plan` first.
18
+
19
+ 2. **Cycle loop** (bounded by max cycles):
20
+ a. **Review.** For each requested reviewer perspective, produce an independent review of the current plan. When an external AI CLI is unavailable in this runtime, simulate that reviewer's perspective using its documented focus and label it "simulated".
21
+ b. **Collect open concerns.** Merge and dedupe the concerns still outstanding after this cycle.
22
+ c. **Convergence check.** If there are no open concerns, stop — converged. If the same concerns recur across cycles without progress, stop — escalate rather than loop forever.
23
+ d. **Replan.** Revise the plan to address the open concerns, recording what changed and why. Re-run the review against the revised plan.
24
+
25
+ 3. **Outcome.** Report one of: `CONVERGED` (concerns resolved within the budget), `PARTIAL` (some concerns resolved, residual non-blocking ones listed), or `BLOCKED` (recurring concerns that need a human). Recommend the gsd-pi next step: `/gsd dispatch execute` if converged, or `/gsd dispatch replan` / human review if blocked.
26
+
27
+ Never exceed the max cycles, and never claim convergence while open concerns remain.
28
+
29
+ ## Success criteria
30
+
31
+ - Each cycle produces a fresh, independent review — not a rubber-stamp of the prior plan.
32
+ - Unavailable external reviewers are simulated, not silently dropped.
33
+ - The loop stops at convergence, at the cycle budget, or on a recurring-concern stall.
34
+ - The reported outcome honestly reflects residual concerns.
@@ -0,0 +1,28 @@
1
+ You are running the GSD **profile-user** workflow — generate a developer behavioral profile to personalize GSD's defaults, and persist it so future sessions use it.
2
+
3
+ ## Flags
4
+
5
+ - `--questionnaire` — {{questionnaireFlag}} (run the full questionnaire instead of inferring)
6
+ - `--refresh` — {{refreshFlag}} (re-profile even if a profile exists)
7
+
8
+ ## Process
9
+
10
+ 1. **Check for an existing profile.** If one exists and `--refresh` is off, show it and ask whether to refresh.
11
+
12
+ 2. **Gather the profile.** Either run the structured questionnaire (`--questionnaire`) or infer from the session + recent activity. Capture:
13
+ - Preferred verbosity (concise vs. thorough).
14
+ - Risk appetite (prefer safe/verified vs. fast/experimental).
15
+ - Commit style and granularity.
16
+ - Testing preference (TDD-first vs. test-after).
17
+ - Review preference (self-review only vs. convergence/multi-reviewer).
18
+ - Preferred tools/runtimes and any to avoid.
19
+
20
+ 3. **Map the profile to gsd-pi preferences.** Translate each preference to the matching gsd-pi setting (auto-mode behavior, commit granularity, review depth, model tier hints) via `/gsd prefs`.
21
+
22
+ 4. **Persist.** Write the profile into gsd-pi preferences so future sessions apply it. Print a summary of what was set.
23
+
24
+ ## Success criteria
25
+
26
+ - The profile captures concrete preferences, not vague adjectives.
27
+ - Each preference maps to an actual gsd-pi setting (no orphan preferences).
28
+ - The profile persists in preferences, not a throwaway file.
@@ -0,0 +1,30 @@
1
+ You are running the GSD **progress** workflow — give situational awareness: where the project is, what was just done, and what's next.
2
+
3
+ ## Mode
4
+
5
+ {{mode}}
6
+
7
+ ## Process
8
+
9
+ 1. **Load state.** Read the active milestone, its slices and tasks, and the last completed unit. Determine what is queued or in-flight.
10
+
11
+ 2. **Summarize recent work.** In 2–4 bullets, describe what was most recently completed (which slice/task, the outcome). Ground this in the canonical state, not memory.
12
+
13
+ 3. **Show what's next.** Identify the next unit to run. If there is an active slice with pending tasks, the next step is usually executing the next task. If the active slice is complete, the next step is completing the slice. If the milestone is complete, the next step is validation.
14
+
15
+ 4. **Route.** Based on `{{mode}}`:
16
+ - Default: present the summary and recommend the next command (e.g. `/gsd next`, `/gsd auto`, `/gsd dispatch validate`).
17
+ - `--next`: after summarizing, dispatch the single next unit (equivalent to `/gsd next`).
18
+ - `--forensic`: include the recent execution history and any drift/blockers.
19
+ - `--do "<task>"`: route the freeform task via `/gsd do`.
20
+
21
+ Never auto-advance past a closeout boundary without confirmation.
22
+
23
+ If no `.gsd/` project exists, say so and suggest `/gsd init`.
24
+
25
+ ## Success criteria
26
+
27
+ - Recent-work summary is grounded in canonical state.
28
+ - The recommended next step matches the milestone/slice lifecycle position.
29
+ - Forensic mode surfaces drift/blockers when present.
30
+ - Closeout boundaries are respected (stop and confirm, don't barrel through).
@@ -37,4 +37,4 @@ You are executing a GSD quick task — a lightweight, focused unit of work outsi
37
37
  - <what was tested/verified>
38
38
  ```
39
39
 
40
- When done, say: "Quick task {{taskNum}} complete." Say this exactly once — if you already said it in a prior message, do not repeat it.
40
+ When done, say: "Quick task {{taskNum}} closeout submitted." Do not say the task is complete. Say this exactly once — if you already said it in a prior message, do not repeat it.
@@ -10,7 +10,7 @@ You are executing **multiple tasks in parallel** for this slice. The task graph
10
10
 
11
11
  **Critical rule:** Use the `subagent` tool in **parallel mode** to dispatch all ready tasks simultaneously. Each subagent gets a task-specific execution packet (task plan + dependency carry-forward + completion contract) and is responsible for its own implementation, verification, task summary, and completion tool calls. The parent batch agent orchestrates, verifies, and records failures only when a dispatched task failed before it could leave its own summary behind.
12
12
 
13
- **Tool call format:** Call `subagent` with `tasks: [...]` as a **native JSON array** — one object per ready task. Do NOT JSON.stringify the array into a string; the tool validates that `tasks` is an array, and a serialized string will be rejected with "must be array".
13
+ **Tool call format:** Call `subagent` with `tasks: [...]` as a **native JSON array** — one object per ready task. Each task object MUST include `cwd: "{{workingDirectory}}"` so child agents inherit the milestone worktree, not the project root. Do NOT JSON.stringify the array into a string; the tool validates that `tasks` is an array, and a serialized string will be rejected with "must be array".
14
14
 
15
15
  ## Task Dependency Graph
16
16
 
@@ -24,7 +24,7 @@ You are executing **multiple tasks in parallel** for this slice. The task graph
24
24
 
25
25
  ## Execution Protocol
26
26
 
27
- 1. **Dispatch all ready tasks** using `subagent` in parallel mode. Call `subagent` with `tasks: [{ agent: "worker", task: "<prompt>" }, ...]` — one object per ready task. Each subagent prompt is provided below.
27
+ 1. **Dispatch all ready tasks** using `subagent` in parallel mode. Call `subagent` with `tasks: [{ agent: "worker", cwd: "{{workingDirectory}}", task: "<prompt>" }, ...]` — one object per ready task. Each subagent prompt is provided below.
28
28
  2. **Wait for all subagents** to complete.
29
29
  3. **Verify each dispatched task's outputs** — check that expected files were created/modified, that verification commands pass where applicable, and that each task wrote its own `T##-SUMMARY.md`.
30
30
  4. **Do not rewrite successful task summaries or duplicate completion tool calls.** Treat a subagent-written summary as authoritative for that task.