gsd-pi 2.79.0 → 2.80.0-dev.4ea7d80e7

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 (805) hide show
  1. package/README.md +94 -47
  2. package/dist/loader.js +0 -0
  3. package/dist/resources/.managed-resources-content-hash +1 -1
  4. package/dist/resources/extensions/github-sync/templates.js +90 -74
  5. package/dist/resources/extensions/gsd/auto/contracts.js +1 -0
  6. package/dist/resources/extensions/gsd/auto/custom-verify-retry-store.js +53 -0
  7. package/dist/resources/extensions/gsd/auto/loop.js +365 -522
  8. package/dist/resources/extensions/gsd/auto/orchestrator.js +146 -0
  9. package/dist/resources/extensions/gsd/auto/phases.js +61 -7
  10. package/dist/resources/extensions/gsd/auto/run-unit.js +19 -15
  11. package/dist/resources/extensions/gsd/auto/session.js +8 -0
  12. package/dist/resources/extensions/gsd/auto/workflow-custom-engine-dispatch-outcome.js +12 -0
  13. package/dist/resources/extensions/gsd/auto/workflow-custom-engine-iteration.js +24 -0
  14. package/dist/resources/extensions/gsd/auto/workflow-custom-engine-reconcile-outcome.js +33 -0
  15. package/dist/resources/extensions/gsd/auto/workflow-custom-engine-reconcile.js +26 -0
  16. package/dist/resources/extensions/gsd/auto/workflow-custom-engine-retry.js +49 -0
  17. package/dist/resources/extensions/gsd/auto/workflow-custom-engine-verify-outcome.js +25 -0
  18. package/dist/resources/extensions/gsd/auto/workflow-dispatch-claim.js +48 -0
  19. package/dist/resources/extensions/gsd/auto/workflow-dispatch-ledger.js +26 -0
  20. package/dist/resources/extensions/gsd/auto/workflow-iteration-completion.js +10 -0
  21. package/dist/resources/extensions/gsd/auto/workflow-journal-reporter.js +16 -0
  22. package/dist/resources/extensions/gsd/auto/workflow-kernel.js +263 -0
  23. package/dist/resources/extensions/gsd/auto/workflow-memory-pressure.js +36 -0
  24. package/dist/resources/extensions/gsd/auto/workflow-phase-reporter.js +9 -0
  25. package/dist/resources/extensions/gsd/auto/workflow-session-lock.js +35 -0
  26. package/dist/resources/extensions/gsd/auto/workflow-sidecar-iteration.js +24 -0
  27. package/dist/resources/extensions/gsd/auto/workflow-sidecar-queue.js +26 -0
  28. package/dist/resources/extensions/gsd/auto/workflow-turn-reporter.js +36 -0
  29. package/dist/resources/extensions/gsd/auto/workflow-unit-dispatch.js +44 -0
  30. package/dist/resources/extensions/gsd/auto/workflow-worker-heartbeat.js +15 -0
  31. package/dist/resources/extensions/gsd/auto-artifact-paths.js +2 -2
  32. package/dist/resources/extensions/gsd/auto-dashboard.js +54 -15
  33. package/dist/resources/extensions/gsd/auto-dispatch.js +12 -0
  34. package/dist/resources/extensions/gsd/auto-prompts.js +220 -32
  35. package/dist/resources/extensions/gsd/auto-recovery.js +216 -62
  36. package/dist/resources/extensions/gsd/auto-runtime-state.js +4 -0
  37. package/dist/resources/extensions/gsd/auto-start.js +4 -4
  38. package/dist/resources/extensions/gsd/auto-verification.js +2 -11
  39. package/dist/resources/extensions/gsd/auto-worktree.js +87 -38
  40. package/dist/resources/extensions/gsd/auto.js +168 -3
  41. package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +24 -2
  42. package/dist/resources/extensions/gsd/bootstrap/db-tools.js +10 -0
  43. package/dist/resources/extensions/gsd/bootstrap/exec-tools.js +2 -2
  44. package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +63 -51
  45. package/dist/resources/extensions/gsd/bootstrap/write-gate.js +137 -9
  46. package/dist/resources/extensions/gsd/commands/context.js +1 -1
  47. package/dist/resources/extensions/gsd/commands-extract-learnings.js +17 -12
  48. package/dist/resources/extensions/gsd/commands-ship.js +23 -46
  49. package/dist/resources/extensions/gsd/commands-workflow-templates.js +12 -7
  50. package/dist/resources/extensions/gsd/component-loader.js +5 -11
  51. package/dist/resources/extensions/gsd/custom-workflow-engine.js +25 -1
  52. package/dist/resources/extensions/gsd/db-adapter.js +47 -0
  53. package/dist/resources/extensions/gsd/db-base-schema.js +351 -0
  54. package/dist/resources/extensions/gsd/db-connection-cache.js +31 -0
  55. package/dist/resources/extensions/gsd/db-coordination-schema.js +104 -0
  56. package/dist/resources/extensions/gsd/db-decision-requirement-rows.js +71 -0
  57. package/dist/resources/extensions/gsd/db-gate-rows.js +16 -0
  58. package/dist/resources/extensions/gsd/db-lightweight-query-rows.js +29 -0
  59. package/dist/resources/extensions/gsd/db-memory-fts-schema.js +56 -0
  60. package/dist/resources/extensions/gsd/db-migration-backup.js +22 -0
  61. package/dist/resources/extensions/gsd/db-migration-steps.js +410 -0
  62. package/dist/resources/extensions/gsd/db-milestone-artifact-rows.js +35 -0
  63. package/dist/resources/extensions/gsd/db-open-state.js +32 -0
  64. package/dist/resources/extensions/gsd/db-provider.js +108 -0
  65. package/dist/resources/extensions/gsd/db-runtime-kv-schema.js +27 -0
  66. package/dist/resources/extensions/gsd/db-schema-metadata.js +23 -0
  67. package/dist/resources/extensions/gsd/db-task-slice-rows.js +86 -0
  68. package/dist/resources/extensions/gsd/db-transaction.js +63 -0
  69. package/dist/resources/extensions/gsd/db-verification-evidence-rows.js +3 -0
  70. package/dist/resources/extensions/gsd/db-verification-evidence-schema.js +19 -0
  71. package/dist/resources/extensions/gsd/escalation.js +2 -0
  72. package/dist/resources/extensions/gsd/graph.js +9 -3
  73. package/dist/resources/extensions/gsd/gsd-db.js +316 -1520
  74. package/dist/resources/extensions/gsd/guided-flow.js +42 -2
  75. package/dist/resources/extensions/gsd/legacy-telemetry.js +70 -0
  76. package/dist/resources/extensions/gsd/markdown-renderer.js +2 -0
  77. package/dist/resources/extensions/gsd/model-router.js +9 -6
  78. package/dist/resources/extensions/gsd/notification-widget.js +21 -3
  79. package/dist/resources/extensions/gsd/paths.js +5 -1
  80. package/dist/resources/extensions/gsd/post-execution-checks.js +27 -6
  81. package/dist/resources/extensions/gsd/pr-evidence.js +117 -0
  82. package/dist/resources/extensions/gsd/pre-execution-checks.js +2 -0
  83. package/dist/resources/extensions/gsd/preferences-types.js +20 -2
  84. package/dist/resources/extensions/gsd/preferences-validation.js +3 -3
  85. package/dist/resources/extensions/gsd/process-task-path.js +61 -0
  86. package/dist/resources/extensions/gsd/prompt-loader.js +9 -5
  87. package/dist/resources/extensions/gsd/prompts/complete-milestone.md +32 -30
  88. package/dist/resources/extensions/gsd/prompts/complete-slice.md +23 -34
  89. package/dist/resources/extensions/gsd/prompts/discuss-headless.md +50 -96
  90. package/dist/resources/extensions/gsd/prompts/discuss.md +81 -181
  91. package/dist/resources/extensions/gsd/prompts/execute-task.md +40 -67
  92. package/dist/resources/extensions/gsd/prompts/forensics.md +41 -84
  93. package/dist/resources/extensions/gsd/prompts/guided-discuss-milestone.md +29 -39
  94. package/dist/resources/extensions/gsd/prompts/guided-discuss-project.md +30 -65
  95. package/dist/resources/extensions/gsd/prompts/guided-discuss-requirements.md +25 -52
  96. package/dist/resources/extensions/gsd/prompts/guided-discuss-slice.md +36 -36
  97. package/dist/resources/extensions/gsd/prompts/guided-research-project.md +20 -38
  98. package/dist/resources/extensions/gsd/prompts/plan-milestone.md +45 -59
  99. package/dist/resources/extensions/gsd/prompts/plan-slice.md +25 -87
  100. package/dist/resources/extensions/gsd/prompts/queue.md +46 -53
  101. package/dist/resources/extensions/gsd/prompts/refine-slice.md +23 -23
  102. package/dist/resources/extensions/gsd/prompts/research-slice.md +23 -23
  103. package/dist/resources/extensions/gsd/prompts/rethink.md +10 -10
  104. package/dist/resources/extensions/gsd/prompts/system.md +65 -107
  105. package/dist/resources/extensions/gsd/prompts/triage-captures.md +15 -15
  106. package/dist/resources/extensions/gsd/prompts/validate-milestone.md +24 -24
  107. package/dist/resources/extensions/gsd/prompts/worktree-merge.md +35 -35
  108. package/dist/resources/extensions/gsd/state.js +4 -0
  109. package/dist/resources/extensions/gsd/tools/complete-milestone.js +14 -9
  110. package/dist/resources/extensions/gsd/tools/complete-task.js +2 -0
  111. package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +88 -3
  112. package/dist/resources/extensions/gsd/unit-context-composer.js +32 -0
  113. package/dist/resources/extensions/gsd/unit-context-manifest.js +21 -0
  114. package/dist/resources/extensions/gsd/uok/audit.js +23 -9
  115. package/dist/resources/extensions/gsd/uok/contracts.js +69 -1
  116. package/dist/resources/extensions/gsd/uok/dispatch-envelope.js +3 -0
  117. package/dist/resources/extensions/gsd/uok/kernel.js +8 -3
  118. package/dist/resources/extensions/gsd/uok/loop-adapter.js +48 -33
  119. package/dist/resources/extensions/gsd/uok/plan-v2.js +2 -0
  120. package/dist/resources/extensions/gsd/uok/timeline.js +125 -0
  121. package/dist/resources/extensions/gsd/workflow-logger.js +13 -13
  122. package/dist/resources/extensions/gsd/workflow-manifest.js +2 -0
  123. package/dist/resources/extensions/gsd/workflow-projections.js +2 -0
  124. package/dist/resources/extensions/gsd/workflow-templates.js +9 -0
  125. package/dist/resources/extensions/gsd/working-output-messages.js +64 -0
  126. package/dist/resources/extensions/shared/gsd-phase-state.js +45 -3
  127. package/dist/resources/extensions/shared/interview-ui.js +15 -4
  128. package/dist/tsconfig.extensions.tsbuildinfo +1 -1
  129. package/dist/web/standalone/.next/BUILD_ID +1 -1
  130. package/dist/web/standalone/.next/app-path-routes-manifest.json +10 -10
  131. package/dist/web/standalone/.next/build-manifest.json +4 -4
  132. package/dist/web/standalone/.next/prerender-manifest.json +3 -3
  133. package/dist/web/standalone/.next/react-loadable-manifest.json +1 -1
  134. package/dist/web/standalone/.next/required-server-files.json +4 -4
  135. package/dist/web/standalone/.next/server/app/_global-error/page.js +3 -3
  136. package/dist/web/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  137. package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
  138. package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
  139. package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  140. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  141. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  142. package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  143. package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  144. package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  145. package/dist/web/standalone/.next/server/app/_not-found/page.js +2 -2
  146. package/dist/web/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  147. package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
  148. package/dist/web/standalone/.next/server/app/_not-found.rsc +3 -3
  149. package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  150. package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  151. package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  152. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  153. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  154. package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  155. package/dist/web/standalone/.next/server/app/api/boot/route.js +1 -1
  156. package/dist/web/standalone/.next/server/app/api/boot/route.js.nft.json +1 -1
  157. package/dist/web/standalone/.next/server/app/api/boot/route_client-reference-manifest.js +1 -1
  158. package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js +1 -1
  159. package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js.nft.json +1 -1
  160. package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route_client-reference-manifest.js +1 -1
  161. package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js +1 -1
  162. package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js.nft.json +1 -1
  163. package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route_client-reference-manifest.js +1 -1
  164. package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js +2 -2
  165. package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js.nft.json +1 -1
  166. package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route_client-reference-manifest.js +1 -1
  167. package/dist/web/standalone/.next/server/app/api/browse-directories/route.js +1 -1
  168. package/dist/web/standalone/.next/server/app/api/browse-directories/route_client-reference-manifest.js +1 -1
  169. package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
  170. package/dist/web/standalone/.next/server/app/api/captures/route.js.nft.json +1 -1
  171. package/dist/web/standalone/.next/server/app/api/captures/route_client-reference-manifest.js +1 -1
  172. package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
  173. package/dist/web/standalone/.next/server/app/api/cleanup/route.js.nft.json +1 -1
  174. package/dist/web/standalone/.next/server/app/api/cleanup/route_client-reference-manifest.js +1 -1
  175. package/dist/web/standalone/.next/server/app/api/dev-mode/route.js +1 -1
  176. package/dist/web/standalone/.next/server/app/api/dev-mode/route_client-reference-manifest.js +1 -1
  177. package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
  178. package/dist/web/standalone/.next/server/app/api/doctor/route.js.nft.json +1 -1
  179. package/dist/web/standalone/.next/server/app/api/doctor/route_client-reference-manifest.js +1 -1
  180. package/dist/web/standalone/.next/server/app/api/experimental/route.js +2 -2
  181. package/dist/web/standalone/.next/server/app/api/experimental/route_client-reference-manifest.js +1 -1
  182. package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
  183. package/dist/web/standalone/.next/server/app/api/export-data/route.js.nft.json +1 -1
  184. package/dist/web/standalone/.next/server/app/api/export-data/route_client-reference-manifest.js +1 -1
  185. package/dist/web/standalone/.next/server/app/api/files/route.js +1 -1
  186. package/dist/web/standalone/.next/server/app/api/files/route.js.nft.json +1 -1
  187. package/dist/web/standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
  188. package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
  189. package/dist/web/standalone/.next/server/app/api/forensics/route.js.nft.json +1 -1
  190. package/dist/web/standalone/.next/server/app/api/forensics/route_client-reference-manifest.js +1 -1
  191. package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
  192. package/dist/web/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  193. package/dist/web/standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
  194. package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
  195. package/dist/web/standalone/.next/server/app/api/history/route.js.nft.json +1 -1
  196. package/dist/web/standalone/.next/server/app/api/history/route_client-reference-manifest.js +1 -1
  197. package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
  198. package/dist/web/standalone/.next/server/app/api/hooks/route.js.nft.json +1 -1
  199. package/dist/web/standalone/.next/server/app/api/hooks/route_client-reference-manifest.js +1 -1
  200. package/dist/web/standalone/.next/server/app/api/inspect/route.js +1 -1
  201. package/dist/web/standalone/.next/server/app/api/inspect/route.js.nft.json +1 -1
  202. package/dist/web/standalone/.next/server/app/api/inspect/route_client-reference-manifest.js +1 -1
  203. package/dist/web/standalone/.next/server/app/api/knowledge/route.js +1 -1
  204. package/dist/web/standalone/.next/server/app/api/knowledge/route.js.nft.json +1 -1
  205. package/dist/web/standalone/.next/server/app/api/knowledge/route_client-reference-manifest.js +1 -1
  206. package/dist/web/standalone/.next/server/app/api/live-state/route.js +1 -1
  207. package/dist/web/standalone/.next/server/app/api/live-state/route.js.nft.json +1 -1
  208. package/dist/web/standalone/.next/server/app/api/live-state/route_client-reference-manifest.js +1 -1
  209. package/dist/web/standalone/.next/server/app/api/notifications/route.js +2 -2
  210. package/dist/web/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  211. package/dist/web/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  212. package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
  213. package/dist/web/standalone/.next/server/app/api/onboarding/route.js.nft.json +1 -1
  214. package/dist/web/standalone/.next/server/app/api/onboarding/route_client-reference-manifest.js +1 -1
  215. package/dist/web/standalone/.next/server/app/api/preferences/route.js +1 -1
  216. package/dist/web/standalone/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
  217. package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
  218. package/dist/web/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
  219. package/dist/web/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  220. package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
  221. package/dist/web/standalone/.next/server/app/api/recovery/route.js.nft.json +1 -1
  222. package/dist/web/standalone/.next/server/app/api/recovery/route_client-reference-manifest.js +1 -1
  223. package/dist/web/standalone/.next/server/app/api/remote-questions/route.js +2 -2
  224. package/dist/web/standalone/.next/server/app/api/remote-questions/route_client-reference-manifest.js +1 -1
  225. package/dist/web/standalone/.next/server/app/api/session/browser/route.js +1 -1
  226. package/dist/web/standalone/.next/server/app/api/session/browser/route.js.nft.json +1 -1
  227. package/dist/web/standalone/.next/server/app/api/session/browser/route_client-reference-manifest.js +1 -1
  228. package/dist/web/standalone/.next/server/app/api/session/command/route.js +1 -1
  229. package/dist/web/standalone/.next/server/app/api/session/command/route.js.nft.json +1 -1
  230. package/dist/web/standalone/.next/server/app/api/session/command/route_client-reference-manifest.js +1 -1
  231. package/dist/web/standalone/.next/server/app/api/session/events/route.js +2 -2
  232. package/dist/web/standalone/.next/server/app/api/session/events/route.js.nft.json +1 -1
  233. package/dist/web/standalone/.next/server/app/api/session/events/route_client-reference-manifest.js +1 -1
  234. package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
  235. package/dist/web/standalone/.next/server/app/api/session/manage/route.js.nft.json +1 -1
  236. package/dist/web/standalone/.next/server/app/api/session/manage/route_client-reference-manifest.js +1 -1
  237. package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
  238. package/dist/web/standalone/.next/server/app/api/settings-data/route.js.nft.json +1 -1
  239. package/dist/web/standalone/.next/server/app/api/settings-data/route_client-reference-manifest.js +1 -1
  240. package/dist/web/standalone/.next/server/app/api/shutdown/route.js +1 -1
  241. package/dist/web/standalone/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  242. package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
  243. package/dist/web/standalone/.next/server/app/api/skill-health/route.js.nft.json +1 -1
  244. package/dist/web/standalone/.next/server/app/api/skill-health/route_client-reference-manifest.js +1 -1
  245. package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
  246. package/dist/web/standalone/.next/server/app/api/steer/route.js.nft.json +1 -1
  247. package/dist/web/standalone/.next/server/app/api/steer/route_client-reference-manifest.js +1 -1
  248. package/dist/web/standalone/.next/server/app/api/switch-root/route.js +1 -1
  249. package/dist/web/standalone/.next/server/app/api/switch-root/route.js.nft.json +1 -1
  250. package/dist/web/standalone/.next/server/app/api/switch-root/route_client-reference-manifest.js +1 -1
  251. package/dist/web/standalone/.next/server/app/api/terminal/input/route.js +1 -1
  252. package/dist/web/standalone/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
  253. package/dist/web/standalone/.next/server/app/api/terminal/resize/route.js +2 -2
  254. package/dist/web/standalone/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
  255. package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +1 -1
  256. package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js.nft.json +1 -1
  257. package/dist/web/standalone/.next/server/app/api/terminal/sessions/route_client-reference-manifest.js +1 -1
  258. package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +2 -2
  259. package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
  260. package/dist/web/standalone/.next/server/app/api/terminal/stream/route_client-reference-manifest.js +1 -1
  261. package/dist/web/standalone/.next/server/app/api/terminal/upload/route.js +1 -1
  262. package/dist/web/standalone/.next/server/app/api/terminal/upload/route_client-reference-manifest.js +1 -1
  263. package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
  264. package/dist/web/standalone/.next/server/app/api/undo/route.js.nft.json +1 -1
  265. package/dist/web/standalone/.next/server/app/api/undo/route_client-reference-manifest.js +1 -1
  266. package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
  267. package/dist/web/standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  268. package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
  269. package/dist/web/standalone/.next/server/app/api/visualizer/route.js.nft.json +1 -1
  270. package/dist/web/standalone/.next/server/app/api/visualizer/route_client-reference-manifest.js +1 -1
  271. package/dist/web/standalone/.next/server/app/index.html +1 -1
  272. package/dist/web/standalone/.next/server/app/index.rsc +4 -4
  273. package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  274. package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +4 -4
  275. package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  276. package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +3 -3
  277. package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  278. package/dist/web/standalone/.next/server/app/page.js +2 -2
  279. package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  280. package/dist/web/standalone/.next/server/app-paths-manifest.json +10 -10
  281. package/dist/web/standalone/.next/server/chunks/167.js +2 -0
  282. package/dist/web/standalone/.next/server/chunks/63.js +3 -3
  283. package/dist/web/standalone/.next/server/chunks/6897.js +3 -3
  284. package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
  285. package/dist/web/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
  286. package/dist/web/standalone/.next/server/middleware.js +2 -2
  287. package/dist/web/standalone/.next/server/next-font-manifest.js +1 -1
  288. package/dist/web/standalone/.next/server/next-font-manifest.json +1 -1
  289. package/dist/web/standalone/.next/server/pages/404.html +1 -1
  290. package/dist/web/standalone/.next/server/pages/500.html +1 -1
  291. package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
  292. package/dist/web/standalone/.next/static/chunks/{8336.6f6f30e410419aff.js → 8336.631939fb583761fa.js} +1 -1
  293. package/dist/web/standalone/.next/static/chunks/app/_not-found/{page-2f24283c162b6ab3.js → page-f2a7482d42a5614b.js} +1 -1
  294. package/dist/web/standalone/.next/static/chunks/app/{layout-9ecfd95f343793f0.js → layout-a16c7a7ecdf0c2cf.js} +1 -1
  295. package/dist/web/standalone/.next/static/chunks/app/page-fab3ebb85b006001.js +1 -0
  296. package/dist/web/standalone/.next/static/chunks/main-app-fdab67f7802d7832.js +1 -0
  297. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-459824ffb8c323dd.js +1 -0
  298. package/dist/web/standalone/.next/static/chunks/{webpack-d82dbee6356c1733.js → webpack-0481f1221120a7c6.js} +1 -1
  299. package/dist/web/standalone/node_modules/node-pty/build/Makefile +2 -2
  300. package/dist/web/standalone/node_modules/node-pty/build/Release/pty.node +0 -0
  301. package/dist/web/standalone/node_modules/node-pty/build/pty.target.mk +14 -14
  302. package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +14 -14
  303. package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +14 -14
  304. package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +14 -14
  305. package/dist/web/standalone/package.json +1 -0
  306. package/dist/web/standalone/server.js +1 -1
  307. package/package.json +18 -7
  308. package/packages/contracts/dist/index.d.ts +3 -0
  309. package/packages/contracts/dist/index.d.ts.map +1 -0
  310. package/packages/contracts/dist/index.js +5 -0
  311. package/packages/contracts/dist/index.js.map +1 -0
  312. package/packages/contracts/dist/rpc.d.ts +549 -0
  313. package/packages/contracts/dist/rpc.d.ts.map +1 -0
  314. package/packages/contracts/dist/rpc.js +53 -0
  315. package/packages/contracts/dist/rpc.js.map +1 -0
  316. package/packages/contracts/dist/rpc.test.d.ts +2 -0
  317. package/packages/contracts/dist/rpc.test.d.ts.map +1 -0
  318. package/packages/contracts/dist/rpc.test.js +47 -0
  319. package/packages/contracts/dist/rpc.test.js.map +1 -0
  320. package/packages/contracts/dist/workflow.d.ts +180 -0
  321. package/packages/contracts/dist/workflow.d.ts.map +1 -0
  322. package/packages/contracts/dist/workflow.js +201 -0
  323. package/packages/contracts/dist/workflow.js.map +1 -0
  324. package/packages/contracts/package.json +39 -0
  325. package/packages/contracts/src/index.ts +5 -0
  326. package/packages/contracts/src/rpc.test.ts +72 -0
  327. package/packages/contracts/src/rpc.ts +286 -0
  328. package/packages/contracts/src/workflow.ts +213 -0
  329. package/packages/contracts/tsconfig.json +25 -0
  330. package/packages/daemon/package.json +3 -2
  331. package/packages/daemon/src/event-bridge.test.ts +2 -1
  332. package/packages/daemon/src/event-bridge.ts +1 -1
  333. package/packages/daemon/src/event-formatter.test.ts +1 -2
  334. package/packages/daemon/src/event-formatter.ts +1 -2
  335. package/packages/daemon/src/session-manager.ts +2 -2
  336. package/packages/daemon/src/types.ts +3 -18
  337. package/packages/mcp-server/dist/server.d.ts +13 -0
  338. package/packages/mcp-server/dist/server.d.ts.map +1 -1
  339. package/packages/mcp-server/dist/server.js +77 -0
  340. package/packages/mcp-server/dist/server.js.map +1 -1
  341. package/packages/mcp-server/dist/session-manager.js +1 -1
  342. package/packages/mcp-server/dist/session-manager.js.map +1 -1
  343. package/packages/mcp-server/dist/types.d.ts +3 -11
  344. package/packages/mcp-server/dist/types.d.ts.map +1 -1
  345. package/packages/mcp-server/dist/types.js.map +1 -1
  346. package/packages/mcp-server/dist/workflow-tools.d.ts +1 -1
  347. package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
  348. package/packages/mcp-server/dist/workflow-tools.js +52 -37
  349. package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
  350. package/packages/mcp-server/package.json +3 -2
  351. package/packages/mcp-server/src/mcp-server.test.ts +138 -0
  352. package/packages/mcp-server/src/server.ts +99 -1
  353. package/packages/mcp-server/src/session-manager.ts +2 -2
  354. package/packages/mcp-server/src/types.ts +7 -18
  355. package/packages/mcp-server/src/workflow-tools.test.ts +129 -2
  356. package/packages/mcp-server/src/workflow-tools.ts +80 -37
  357. package/packages/mcp-server/tsconfig.tsbuildinfo +1 -1
  358. package/packages/native/package.json +1 -1
  359. package/packages/pi-agent-core/package.json +1 -1
  360. package/packages/pi-ai/dist/models/fake-model.d.ts +12 -0
  361. package/packages/pi-ai/dist/models/fake-model.d.ts.map +1 -0
  362. package/packages/pi-ai/dist/models/fake-model.js +27 -0
  363. package/packages/pi-ai/dist/models/fake-model.js.map +1 -0
  364. package/packages/pi-ai/dist/models/index.d.ts.map +1 -1
  365. package/packages/pi-ai/dist/models/index.js +8 -0
  366. package/packages/pi-ai/dist/models/index.js.map +1 -1
  367. package/packages/pi-ai/dist/providers/fake.d.ts +42 -0
  368. package/packages/pi-ai/dist/providers/fake.d.ts.map +1 -0
  369. package/packages/pi-ai/dist/providers/fake.js +319 -0
  370. package/packages/pi-ai/dist/providers/fake.js.map +1 -0
  371. package/packages/pi-ai/dist/providers/register-builtins.d.ts.map +1 -1
  372. package/packages/pi-ai/dist/providers/register-builtins.js +24 -0
  373. package/packages/pi-ai/dist/providers/register-builtins.js.map +1 -1
  374. package/packages/pi-ai/package.json +1 -1
  375. package/packages/pi-ai/src/models/fake-model.ts +30 -0
  376. package/packages/pi-ai/src/models/index.ts +9 -0
  377. package/packages/pi-ai/src/providers/fake.ts +376 -0
  378. package/packages/pi-ai/src/providers/register-builtins.ts +23 -0
  379. package/packages/pi-ai/tsconfig.tsbuildinfo +1 -1
  380. package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js +74 -0
  381. package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js.map +1 -1
  382. package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts +2 -0
  383. package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
  384. package/packages/pi-coding-agent/dist/core/extensions/runner.js +14 -1
  385. package/packages/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
  386. package/packages/pi-coding-agent/dist/core/extensions/runner.test.js +97 -0
  387. package/packages/pi-coding-agent/dist/core/extensions/runner.test.js.map +1 -1
  388. package/packages/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
  389. package/packages/pi-coding-agent/dist/core/model-registry.js +5 -0
  390. package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
  391. package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +4 -0
  392. package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
  393. package/packages/pi-coding-agent/dist/core/settings-manager.js +8 -0
  394. package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
  395. package/packages/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
  396. package/packages/pi-coding-agent/dist/core/slash-commands.js +1 -0
  397. package/packages/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
  398. package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/chat-frame-compaction-tone.test.js +6 -4
  399. package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/chat-frame-compaction-tone.test.js.map +1 -1
  400. package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.js +67 -14
  401. package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.js.map +1 -1
  402. package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.d.ts +26 -0
  403. package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.d.ts.map +1 -0
  404. package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.js +112 -0
  405. package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.js.map +1 -0
  406. package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.test.d.ts +2 -0
  407. package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.test.d.ts.map +1 -0
  408. package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.test.js +51 -0
  409. package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.test.js.map +1 -0
  410. package/packages/pi-coding-agent/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  411. package/packages/pi-coding-agent/dist/modes/interactive/components/assistant-message.js.map +1 -1
  412. package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.d.ts.map +1 -1
  413. package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.js +10 -9
  414. package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.js.map +1 -1
  415. package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +3 -0
  416. package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  417. package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +11 -0
  418. package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
  419. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.js +27 -6
  420. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.js.map +1 -1
  421. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +16 -0
  422. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  423. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +112 -18
  424. package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
  425. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
  426. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +60 -1
  427. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
  428. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.test.js +40 -1
  429. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.test.js.map +1 -1
  430. package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js +1 -0
  431. package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js.map +1 -1
  432. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-state.d.ts +1 -0
  433. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-state.d.ts.map +1 -1
  434. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-state.js.map +1 -1
  435. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +12 -1
  436. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  437. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +54 -10
  438. package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  439. package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.d.ts.map +1 -1
  440. package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js +20 -0
  441. package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js.map +1 -1
  442. package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.test.d.ts +2 -0
  443. package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.test.d.ts.map +1 -0
  444. package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.test.js +79 -0
  445. package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.test.js.map +1 -0
  446. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts +12 -0
  447. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -1
  448. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js +13 -0
  449. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js.map +1 -1
  450. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +1 -1
  451. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  452. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js +18 -1
  453. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
  454. package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts.map +1 -1
  455. package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js +36 -27
  456. package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +1 -1
  457. package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.d.ts +11 -0
  458. package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.d.ts.map +1 -0
  459. package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.js +18 -0
  460. package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.js.map +1 -0
  461. package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.test.d.ts +2 -0
  462. package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.test.d.ts.map +1 -0
  463. package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.test.js +48 -0
  464. package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.test.js.map +1 -0
  465. package/packages/pi-coding-agent/dist/modes/rpc/rpc-types.d.ts +1 -512
  466. package/packages/pi-coding-agent/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  467. package/packages/pi-coding-agent/dist/modes/rpc/rpc-types.js +3 -7
  468. package/packages/pi-coding-agent/dist/modes/rpc/rpc-types.js.map +1 -1
  469. package/packages/pi-coding-agent/package.json +2 -1
  470. package/packages/pi-coding-agent/src/core/chat-controller-ordering.test.ts +87 -0
  471. package/packages/pi-coding-agent/src/core/extensions/runner.test.ts +108 -0
  472. package/packages/pi-coding-agent/src/core/extensions/runner.ts +16 -1
  473. package/packages/pi-coding-agent/src/core/model-registry.ts +4 -0
  474. package/packages/pi-coding-agent/src/core/settings-manager.ts +12 -0
  475. package/packages/pi-coding-agent/src/core/slash-commands.ts +1 -0
  476. package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/chat-frame-compaction-tone.test.ts +7 -5
  477. package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/tool-execution.test.ts +100 -16
  478. package/packages/pi-coding-agent/src/modes/interactive/components/adaptive-layout.test.ts +59 -0
  479. package/packages/pi-coding-agent/src/modes/interactive/components/adaptive-layout.ts +160 -0
  480. package/packages/pi-coding-agent/src/modes/interactive/components/assistant-message.ts +1 -0
  481. package/packages/pi-coding-agent/src/modes/interactive/components/chat-frame.ts +10 -9
  482. package/packages/pi-coding-agent/src/modes/interactive/components/settings-selector.ts +15 -0
  483. package/packages/pi-coding-agent/src/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.ts +41 -9
  484. package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +124 -18
  485. package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.test.ts +43 -1
  486. package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +75 -1
  487. package/packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.test.ts +1 -0
  488. package/packages/pi-coding-agent/src/modes/interactive/interactive-mode-state.ts +1 -1
  489. package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +75 -9
  490. package/packages/pi-coding-agent/src/modes/interactive/slash-command-handlers.test.ts +95 -0
  491. package/packages/pi-coding-agent/src/modes/interactive/slash-command-handlers.ts +24 -1
  492. package/packages/pi-coding-agent/src/modes/interactive/theme/theme-schema.ts +13 -0
  493. package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +32 -2
  494. package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +36 -27
  495. package/packages/pi-coding-agent/src/modes/interactive/tui-mode.test.ts +65 -0
  496. package/packages/pi-coding-agent/src/modes/interactive/tui-mode.ts +29 -0
  497. package/packages/pi-coding-agent/src/modes/rpc/rpc-types.ts +3 -336
  498. package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
  499. package/packages/pi-tui/dist/__tests__/style.test.d.ts +2 -0
  500. package/packages/pi-tui/dist/__tests__/style.test.d.ts.map +1 -0
  501. package/packages/pi-tui/dist/__tests__/style.test.js +63 -0
  502. package/packages/pi-tui/dist/__tests__/style.test.js.map +1 -0
  503. package/packages/pi-tui/dist/__tests__/tui.test.js +24 -3
  504. package/packages/pi-tui/dist/__tests__/tui.test.js.map +1 -1
  505. package/packages/pi-tui/dist/index.d.ts +1 -0
  506. package/packages/pi-tui/dist/index.d.ts.map +1 -1
  507. package/packages/pi-tui/dist/index.js +2 -0
  508. package/packages/pi-tui/dist/index.js.map +1 -1
  509. package/packages/pi-tui/dist/style.d.ts +41 -0
  510. package/packages/pi-tui/dist/style.d.ts.map +1 -0
  511. package/packages/pi-tui/dist/style.js +158 -0
  512. package/packages/pi-tui/dist/style.js.map +1 -0
  513. package/packages/pi-tui/dist/tui.d.ts.map +1 -1
  514. package/packages/pi-tui/dist/tui.js +1 -0
  515. package/packages/pi-tui/dist/tui.js.map +1 -1
  516. package/packages/pi-tui/package.json +1 -1
  517. package/packages/pi-tui/src/__tests__/style.test.ts +76 -0
  518. package/packages/pi-tui/src/__tests__/tui.test.ts +29 -3
  519. package/packages/pi-tui/src/index.ts +9 -0
  520. package/packages/pi-tui/src/style.ts +225 -0
  521. package/packages/pi-tui/src/tui.ts +1 -0
  522. package/packages/pi-tui/tsconfig.tsbuildinfo +1 -1
  523. package/packages/rpc-client/README.md +3 -3
  524. package/packages/rpc-client/dist/index.d.ts +1 -1
  525. package/packages/rpc-client/dist/index.d.ts.map +1 -1
  526. package/packages/rpc-client/dist/index.js.map +1 -1
  527. package/packages/rpc-client/dist/rpc-client.d.ts +2 -6
  528. package/packages/rpc-client/dist/rpc-client.d.ts.map +1 -1
  529. package/packages/rpc-client/dist/rpc-client.js.map +1 -1
  530. package/packages/rpc-client/dist/rpc-types.d.ts +1 -565
  531. package/packages/rpc-client/dist/rpc-types.d.ts.map +1 -1
  532. package/packages/rpc-client/dist/rpc-types.js +3 -11
  533. package/packages/rpc-client/dist/rpc-types.js.map +1 -1
  534. package/packages/rpc-client/package.json +4 -1
  535. package/packages/rpc-client/src/index.ts +1 -1
  536. package/packages/rpc-client/src/rpc-client.ts +3 -6
  537. package/packages/rpc-client/src/rpc-types.ts +3 -398
  538. package/packages/rpc-client/tsconfig.tsbuildinfo +1 -1
  539. package/pkg/dist/modes/interactive/theme/theme-schema.d.ts +12 -0
  540. package/pkg/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -1
  541. package/pkg/dist/modes/interactive/theme/theme-schema.js +13 -0
  542. package/pkg/dist/modes/interactive/theme/theme-schema.js.map +1 -1
  543. package/pkg/dist/modes/interactive/theme/theme.d.ts +1 -1
  544. package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  545. package/pkg/dist/modes/interactive/theme/theme.js +18 -1
  546. package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
  547. package/pkg/dist/modes/interactive/theme/themes.d.ts.map +1 -1
  548. package/pkg/dist/modes/interactive/theme/themes.js +36 -27
  549. package/pkg/dist/modes/interactive/theme/themes.js.map +1 -1
  550. package/pkg/package.json +1 -1
  551. package/src/resources/extensions/github-sync/templates.ts +93 -88
  552. package/src/resources/extensions/github-sync/tests/inline-code.test.ts +66 -0
  553. package/src/resources/extensions/github-sync/tests/templates.test.ts +10 -2
  554. package/src/resources/extensions/gsd/auto/contracts.ts +87 -0
  555. package/src/resources/extensions/gsd/auto/custom-verify-retry-store.ts +72 -0
  556. package/src/resources/extensions/gsd/auto/loop-deps.ts +10 -3
  557. package/src/resources/extensions/gsd/auto/loop.ts +416 -596
  558. package/src/resources/extensions/gsd/auto/orchestrator.ts +161 -0
  559. package/src/resources/extensions/gsd/auto/phases.ts +88 -9
  560. package/src/resources/extensions/gsd/auto/run-unit.ts +24 -14
  561. package/src/resources/extensions/gsd/auto/session.ts +11 -0
  562. package/src/resources/extensions/gsd/auto/workflow-custom-engine-dispatch-outcome.ts +28 -0
  563. package/src/resources/extensions/gsd/auto/workflow-custom-engine-iteration.ts +52 -0
  564. package/src/resources/extensions/gsd/auto/workflow-custom-engine-reconcile-outcome.ts +58 -0
  565. package/src/resources/extensions/gsd/auto/workflow-custom-engine-reconcile.ts +71 -0
  566. package/src/resources/extensions/gsd/auto/workflow-custom-engine-retry.ts +90 -0
  567. package/src/resources/extensions/gsd/auto/workflow-custom-engine-verify-outcome.ts +50 -0
  568. package/src/resources/extensions/gsd/auto/workflow-dispatch-claim.ts +97 -0
  569. package/src/resources/extensions/gsd/auto/workflow-dispatch-ledger.ts +45 -0
  570. package/src/resources/extensions/gsd/auto/workflow-iteration-completion.ts +26 -0
  571. package/src/resources/extensions/gsd/auto/workflow-journal-reporter.ts +33 -0
  572. package/src/resources/extensions/gsd/auto/workflow-kernel.ts +520 -0
  573. package/src/resources/extensions/gsd/auto/workflow-memory-pressure.ts +58 -0
  574. package/src/resources/extensions/gsd/auto/workflow-phase-reporter.ts +22 -0
  575. package/src/resources/extensions/gsd/auto/workflow-session-lock.ts +68 -0
  576. package/src/resources/extensions/gsd/auto/workflow-sidecar-iteration.ts +46 -0
  577. package/src/resources/extensions/gsd/auto/workflow-sidecar-queue.ts +46 -0
  578. package/src/resources/extensions/gsd/auto/workflow-turn-reporter.ts +68 -0
  579. package/src/resources/extensions/gsd/auto/workflow-unit-dispatch.ts +89 -0
  580. package/src/resources/extensions/gsd/auto/workflow-worker-heartbeat.ts +38 -0
  581. package/src/resources/extensions/gsd/auto-artifact-paths.ts +2 -2
  582. package/src/resources/extensions/gsd/auto-dashboard.ts +61 -8
  583. package/src/resources/extensions/gsd/auto-dispatch.ts +18 -0
  584. package/src/resources/extensions/gsd/auto-prompts.ts +276 -31
  585. package/src/resources/extensions/gsd/auto-recovery.ts +211 -59
  586. package/src/resources/extensions/gsd/auto-runtime-state.ts +7 -0
  587. package/src/resources/extensions/gsd/auto-start.ts +9 -7
  588. package/src/resources/extensions/gsd/auto-verification.ts +5 -1
  589. package/src/resources/extensions/gsd/auto-worktree.ts +85 -36
  590. package/src/resources/extensions/gsd/auto.ts +179 -2
  591. package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +30 -2
  592. package/src/resources/extensions/gsd/bootstrap/db-tools.ts +11 -0
  593. package/src/resources/extensions/gsd/bootstrap/exec-tools.ts +2 -2
  594. package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +79 -52
  595. package/src/resources/extensions/gsd/bootstrap/tests/write-gate-shouldblock-basepath.test.ts +97 -0
  596. package/src/resources/extensions/gsd/bootstrap/write-gate.ts +143 -5
  597. package/src/resources/extensions/gsd/commands/context.ts +1 -1
  598. package/src/resources/extensions/gsd/commands-extract-learnings.ts +17 -12
  599. package/src/resources/extensions/gsd/commands-ship.ts +24 -51
  600. package/src/resources/extensions/gsd/commands-workflow-templates.ts +13 -0
  601. package/src/resources/extensions/gsd/component-loader.ts +5 -11
  602. package/src/resources/extensions/gsd/custom-workflow-engine.ts +29 -0
  603. package/src/resources/extensions/gsd/db-adapter.ts +75 -0
  604. package/src/resources/extensions/gsd/db-base-schema.ts +383 -0
  605. package/src/resources/extensions/gsd/db-connection-cache.ts +45 -0
  606. package/src/resources/extensions/gsd/db-coordination-schema.ts +109 -0
  607. package/src/resources/extensions/gsd/db-decision-requirement-rows.ts +77 -0
  608. package/src/resources/extensions/gsd/db-gate-rows.ts +19 -0
  609. package/src/resources/extensions/gsd/db-lightweight-query-rows.ts +50 -0
  610. package/src/resources/extensions/gsd/db-memory-fts-schema.ts +66 -0
  611. package/src/resources/extensions/gsd/db-migration-backup.ts +34 -0
  612. package/src/resources/extensions/gsd/db-migration-steps.ts +451 -0
  613. package/src/resources/extensions/gsd/db-milestone-artifact-rows.ts +70 -0
  614. package/src/resources/extensions/gsd/db-open-state.ts +47 -0
  615. package/src/resources/extensions/gsd/db-provider.ts +148 -0
  616. package/src/resources/extensions/gsd/db-runtime-kv-schema.ts +30 -0
  617. package/src/resources/extensions/gsd/db-schema-metadata.ts +33 -0
  618. package/src/resources/extensions/gsd/db-task-slice-rows.ts +146 -0
  619. package/src/resources/extensions/gsd/db-transaction.ts +76 -0
  620. package/src/resources/extensions/gsd/db-verification-evidence-rows.ts +14 -0
  621. package/src/resources/extensions/gsd/db-verification-evidence-schema.ts +22 -0
  622. package/src/resources/extensions/gsd/escalation.ts +3 -1
  623. package/src/resources/extensions/gsd/graph.ts +12 -5
  624. package/src/resources/extensions/gsd/gsd-db.ts +379 -1660
  625. package/src/resources/extensions/gsd/guided-flow.ts +49 -2
  626. package/src/resources/extensions/gsd/interrupted-session.ts +1 -0
  627. package/src/resources/extensions/gsd/legacy-telemetry.ts +99 -0
  628. package/src/resources/extensions/gsd/markdown-renderer.ts +4 -1
  629. package/src/resources/extensions/gsd/model-router.ts +10 -6
  630. package/src/resources/extensions/gsd/notification-widget.ts +25 -4
  631. package/src/resources/extensions/gsd/paths.ts +6 -1
  632. package/src/resources/extensions/gsd/post-execution-checks.ts +35 -7
  633. package/src/resources/extensions/gsd/pr-evidence.ts +182 -0
  634. package/src/resources/extensions/gsd/pre-execution-checks.ts +4 -1
  635. package/src/resources/extensions/gsd/preferences-types.ts +23 -4
  636. package/src/resources/extensions/gsd/preferences-validation.ts +3 -3
  637. package/src/resources/extensions/gsd/process-task-path.ts +81 -0
  638. package/src/resources/extensions/gsd/prompt-loader.ts +9 -5
  639. package/src/resources/extensions/gsd/prompts/complete-milestone.md +32 -30
  640. package/src/resources/extensions/gsd/prompts/complete-slice.md +23 -34
  641. package/src/resources/extensions/gsd/prompts/discuss-headless.md +50 -96
  642. package/src/resources/extensions/gsd/prompts/discuss.md +81 -181
  643. package/src/resources/extensions/gsd/prompts/execute-task.md +40 -67
  644. package/src/resources/extensions/gsd/prompts/forensics.md +41 -84
  645. package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +29 -39
  646. package/src/resources/extensions/gsd/prompts/guided-discuss-project.md +30 -65
  647. package/src/resources/extensions/gsd/prompts/guided-discuss-requirements.md +25 -52
  648. package/src/resources/extensions/gsd/prompts/guided-discuss-slice.md +36 -36
  649. package/src/resources/extensions/gsd/prompts/guided-research-project.md +20 -38
  650. package/src/resources/extensions/gsd/prompts/plan-milestone.md +45 -59
  651. package/src/resources/extensions/gsd/prompts/plan-slice.md +25 -87
  652. package/src/resources/extensions/gsd/prompts/queue.md +46 -53
  653. package/src/resources/extensions/gsd/prompts/refine-slice.md +23 -23
  654. package/src/resources/extensions/gsd/prompts/research-slice.md +23 -23
  655. package/src/resources/extensions/gsd/prompts/rethink.md +10 -10
  656. package/src/resources/extensions/gsd/prompts/system.md +65 -107
  657. package/src/resources/extensions/gsd/prompts/triage-captures.md +15 -15
  658. package/src/resources/extensions/gsd/prompts/validate-milestone.md +24 -24
  659. package/src/resources/extensions/gsd/prompts/worktree-merge.md +35 -35
  660. package/src/resources/extensions/gsd/state.ts +6 -3
  661. package/src/resources/extensions/gsd/tests/auto-abort-pause-regression.test.ts +38 -0
  662. package/src/resources/extensions/gsd/tests/auto-dashboard.test.ts +98 -0
  663. package/src/resources/extensions/gsd/tests/auto-loop.test.ts +117 -0
  664. package/src/resources/extensions/gsd/tests/auto-orchestrator.test.ts +353 -0
  665. package/src/resources/extensions/gsd/tests/auto-pr-bugs.test.ts +19 -0
  666. package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +277 -1
  667. package/src/resources/extensions/gsd/tests/auto-runtime-state.test.ts +39 -0
  668. package/src/resources/extensions/gsd/tests/auto-session-encapsulation.test.ts +3 -0
  669. package/src/resources/extensions/gsd/tests/bootstrap-derive-state-db-open.test.ts +2 -2
  670. package/src/resources/extensions/gsd/tests/check-auto-start-pending-gate.test.ts +203 -0
  671. package/src/resources/extensions/gsd/tests/check-auto-start-ready-guard.test.ts +148 -0
  672. package/src/resources/extensions/gsd/tests/commands-eval-review.test.ts +2 -2
  673. package/src/resources/extensions/gsd/tests/commands-extract-learnings.test.ts +9 -0
  674. package/src/resources/extensions/gsd/tests/commands-ship-eval-warn.test.ts +3 -2
  675. package/src/resources/extensions/gsd/tests/complete-milestone-prompt-rendering.test.ts +47 -0
  676. package/src/resources/extensions/gsd/tests/complete-milestone.test.ts +19 -5
  677. package/src/resources/extensions/gsd/tests/component-loader.test.ts +2 -9
  678. package/src/resources/extensions/gsd/tests/current-directory-root-homedir-fallback.test.ts +63 -0
  679. package/src/resources/extensions/gsd/tests/custom-engine-loop-integration.test.ts +144 -0
  680. package/src/resources/extensions/gsd/tests/custom-verify-retry-store.test.ts +139 -0
  681. package/src/resources/extensions/gsd/tests/custom-workflow-engine.test.ts +50 -0
  682. package/src/resources/extensions/gsd/tests/dashboard-custom-engine.test.ts +3 -3
  683. package/src/resources/extensions/gsd/tests/db-adapter.test.ts +82 -0
  684. package/src/resources/extensions/gsd/tests/db-base-schema.test.ts +62 -0
  685. package/src/resources/extensions/gsd/tests/db-connection-cache.test.ts +60 -0
  686. package/src/resources/extensions/gsd/tests/db-coordination-schema.test.ts +39 -0
  687. package/src/resources/extensions/gsd/tests/db-decision-requirement-rows.test.ts +135 -0
  688. package/src/resources/extensions/gsd/tests/db-gate-rows.test.ts +53 -0
  689. package/src/resources/extensions/gsd/tests/db-lightweight-query-rows.test.ts +45 -0
  690. package/src/resources/extensions/gsd/tests/db-memory-fts-schema.test.ts +86 -0
  691. package/src/resources/extensions/gsd/tests/db-migration-backup.test.ts +105 -0
  692. package/src/resources/extensions/gsd/tests/db-migration-steps.integration.test.ts +428 -0
  693. package/src/resources/extensions/gsd/tests/db-migration-steps.test.ts +159 -0
  694. package/src/resources/extensions/gsd/tests/db-milestone-artifact-rows.test.ts +53 -0
  695. package/src/resources/extensions/gsd/tests/db-open-state.test.ts +56 -0
  696. package/src/resources/extensions/gsd/tests/db-provider.test.ts +105 -0
  697. package/src/resources/extensions/gsd/tests/db-runtime-kv-schema.test.ts +37 -0
  698. package/src/resources/extensions/gsd/tests/db-schema-metadata.test.ts +115 -0
  699. package/src/resources/extensions/gsd/tests/db-task-slice-rows.test.ts +128 -0
  700. package/src/resources/extensions/gsd/tests/db-transaction.test.ts +110 -0
  701. package/src/resources/extensions/gsd/tests/db-verification-evidence-schema.test.ts +76 -0
  702. package/src/resources/extensions/gsd/tests/deep-planning-mode-dispatch.test.ts +42 -0
  703. package/src/resources/extensions/gsd/tests/deep-project-auto-loop.test.ts +63 -2
  704. package/src/resources/extensions/gsd/tests/discuss-headless-rendering.test.ts +37 -0
  705. package/src/resources/extensions/gsd/tests/execute-summary-save-empty-project.test.ts +109 -0
  706. package/src/resources/extensions/gsd/tests/execute-task-rendering.test.ts +59 -0
  707. package/src/resources/extensions/gsd/tests/fixtures/pr-body/commands-ship-basic.md +52 -0
  708. package/src/resources/extensions/gsd/tests/fixtures/pr-body/commands-ship-empty-optionals.md +42 -0
  709. package/src/resources/extensions/gsd/tests/fixtures/pr-body/swarm-lane-no-blockers.md +55 -0
  710. package/src/resources/extensions/gsd/tests/fixtures/pr-body/swarm-lane-with-blockers.md +60 -0
  711. package/src/resources/extensions/gsd/tests/forensics-prompt-rendering.test.ts +36 -0
  712. package/src/resources/extensions/gsd/tests/graph-operations.test.ts +10 -0
  713. package/src/resources/extensions/gsd/tests/gsd-db.test.ts +139 -0
  714. package/src/resources/extensions/gsd/tests/guided-discuss-milestone-prompt-rendering.test.ts +43 -0
  715. package/src/resources/extensions/gsd/tests/guided-discuss-project-prompt-rendering.test.ts +41 -0
  716. package/src/resources/extensions/gsd/tests/guided-discuss-requirements-prompt-rendering.test.ts +45 -0
  717. package/src/resources/extensions/gsd/tests/guided-flow-prompt-consolidation.test.ts +14 -0
  718. package/src/resources/extensions/gsd/tests/has-pending-deep-stage.test.ts +33 -1
  719. package/src/resources/extensions/gsd/tests/integration/auto-recovery.test.ts +79 -0
  720. package/src/resources/extensions/gsd/tests/integration/auto-worktree-milestone-merge.test.ts +37 -0
  721. package/src/resources/extensions/gsd/tests/integration/state-machine-live-validation.test.ts +5 -3
  722. package/src/resources/extensions/gsd/tests/journal-integration.test.ts +134 -0
  723. package/src/resources/extensions/gsd/tests/legacy-component-format-telemetry.test.ts +62 -0
  724. package/src/resources/extensions/gsd/tests/legacy-telemetry.test.ts +144 -0
  725. package/src/resources/extensions/gsd/tests/memory-pressure-stuck-state.test.ts +40 -16
  726. package/src/resources/extensions/gsd/tests/model-router.test.ts +33 -12
  727. package/src/resources/extensions/gsd/tests/notification-store.test.ts +8 -0
  728. package/src/resources/extensions/gsd/tests/notification-widget.test.ts +40 -1
  729. package/src/resources/extensions/gsd/tests/parallel-skill-prompt-integration.test.ts +8 -0
  730. package/src/resources/extensions/gsd/tests/paused-session-via-db.test.ts +2 -0
  731. package/src/resources/extensions/gsd/tests/plan-milestone-rendering.test.ts +45 -0
  732. package/src/resources/extensions/gsd/tests/plan-slice-prompt.test.ts +65 -16
  733. package/src/resources/extensions/gsd/tests/plan-slice.test.ts +27 -0
  734. package/src/resources/extensions/gsd/tests/post-execution-checks.test.ts +46 -0
  735. package/src/resources/extensions/gsd/tests/pr-evidence-equivalence.test.ts +102 -0
  736. package/src/resources/extensions/gsd/tests/pr-evidence-hardening.test.ts +165 -0
  737. package/src/resources/extensions/gsd/tests/pr-evidence.test.ts +79 -0
  738. package/src/resources/extensions/gsd/tests/pre-exec-gate-loop.test.ts +3 -0
  739. package/src/resources/extensions/gsd/tests/process-task-path.test.ts +51 -0
  740. package/src/resources/extensions/gsd/tests/prompt-step-ordering.test.ts +16 -1
  741. package/src/resources/extensions/gsd/tests/queue-prompt-rendering.test.ts +37 -0
  742. package/src/resources/extensions/gsd/tests/register-hooks-compaction-checkpoint.test.ts +85 -0
  743. package/src/resources/extensions/gsd/tests/run-uat-composer.test.ts +2 -0
  744. package/src/resources/extensions/gsd/tests/start-auto-detached.test.ts +46 -2
  745. package/src/resources/extensions/gsd/tests/subagent-model-dispatch.test.ts +59 -0
  746. package/src/resources/extensions/gsd/tests/tool-naming.test.ts +32 -9
  747. package/src/resources/extensions/gsd/tests/unit-context-composer.test.ts +42 -4
  748. package/src/resources/extensions/gsd/tests/unit-context-manifest.test.ts +32 -0
  749. package/src/resources/extensions/gsd/tests/uok-contracts.test.ts +109 -1
  750. package/src/resources/extensions/gsd/tests/uok-kernel-path.test.ts +12 -0
  751. package/src/resources/extensions/gsd/tests/uok-loop-adapter-writer.test.ts +98 -0
  752. package/src/resources/extensions/gsd/tests/uok-plan-v2-wiring.test.ts +1 -1
  753. package/src/resources/extensions/gsd/tests/workflow-custom-engine-dispatch-outcome.test.ts +55 -0
  754. package/src/resources/extensions/gsd/tests/workflow-custom-engine-iteration.test.ts +93 -0
  755. package/src/resources/extensions/gsd/tests/workflow-custom-engine-reconcile-outcome.test.ts +108 -0
  756. package/src/resources/extensions/gsd/tests/workflow-custom-engine-reconcile.test.ts +146 -0
  757. package/src/resources/extensions/gsd/tests/workflow-custom-engine-retry.test.ts +136 -0
  758. package/src/resources/extensions/gsd/tests/workflow-custom-engine-verify-outcome.test.ts +95 -0
  759. package/src/resources/extensions/gsd/tests/workflow-dispatch-claim.test.ts +158 -0
  760. package/src/resources/extensions/gsd/tests/workflow-dispatch-ledger.test.ts +82 -0
  761. package/src/resources/extensions/gsd/tests/workflow-iteration-completion.test.ts +44 -0
  762. package/src/resources/extensions/gsd/tests/workflow-journal-reporter.test.ts +49 -0
  763. package/src/resources/extensions/gsd/tests/workflow-kernel.test.ts +607 -0
  764. package/src/resources/extensions/gsd/tests/workflow-logger.test.ts +20 -4
  765. package/src/resources/extensions/gsd/tests/workflow-memory-pressure.test.ts +71 -0
  766. package/src/resources/extensions/gsd/tests/workflow-phase-reporter.test.ts +40 -0
  767. package/src/resources/extensions/gsd/tests/workflow-session-lock.test.ts +135 -0
  768. package/src/resources/extensions/gsd/tests/workflow-sidecar-iteration.test.ts +110 -0
  769. package/src/resources/extensions/gsd/tests/workflow-sidecar-queue.test.ts +116 -0
  770. package/src/resources/extensions/gsd/tests/workflow-templates.test.ts +21 -0
  771. package/src/resources/extensions/gsd/tests/workflow-tool-executors.test.ts +164 -3
  772. package/src/resources/extensions/gsd/tests/workflow-turn-reporter.test.ts +87 -0
  773. package/src/resources/extensions/gsd/tests/workflow-unit-dispatch.test.ts +160 -0
  774. package/src/resources/extensions/gsd/tests/workflow-worker-heartbeat.test.ts +123 -0
  775. package/src/resources/extensions/gsd/tests/working-output-messages.test.ts +93 -0
  776. package/src/resources/extensions/gsd/tests/worktree-path-injection.test.ts +3 -0
  777. package/src/resources/extensions/gsd/tests/worktree-submodule-safety.test.ts +17 -33
  778. package/src/resources/extensions/gsd/tests/worktree-write-gate.test.ts +179 -0
  779. package/src/resources/extensions/gsd/tools/complete-milestone.ts +15 -9
  780. package/src/resources/extensions/gsd/tools/complete-task.ts +4 -1
  781. package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +90 -2
  782. package/src/resources/extensions/gsd/unit-context-composer.ts +49 -0
  783. package/src/resources/extensions/gsd/unit-context-manifest.ts +34 -0
  784. package/src/resources/extensions/gsd/uok/audit.ts +25 -9
  785. package/src/resources/extensions/gsd/uok/contracts.ts +105 -0
  786. package/src/resources/extensions/gsd/uok/dispatch-envelope.ts +4 -0
  787. package/src/resources/extensions/gsd/uok/kernel.ts +10 -3
  788. package/src/resources/extensions/gsd/uok/loop-adapter.ts +60 -45
  789. package/src/resources/extensions/gsd/uok/plan-v2.ts +5 -1
  790. package/src/resources/extensions/gsd/uok/timeline.ts +158 -0
  791. package/src/resources/extensions/gsd/workflow-logger.ts +13 -13
  792. package/src/resources/extensions/gsd/workflow-manifest.ts +6 -15
  793. package/src/resources/extensions/gsd/workflow-projections.ts +5 -1
  794. package/src/resources/extensions/gsd/workflow-templates.ts +11 -0
  795. package/src/resources/extensions/gsd/working-output-messages.ts +120 -0
  796. package/src/resources/extensions/shared/gsd-phase-state.ts +56 -3
  797. package/src/resources/extensions/shared/interview-ui.ts +18 -5
  798. package/src/resources/extensions/shared/tests/gsd-phase-state.test.ts +43 -1
  799. package/src/resources/extensions/shared/tests/interview-notes-loop.test.ts +41 -0
  800. package/dist/web/standalone/.next/server/chunks/6336.js +0 -1
  801. package/dist/web/standalone/.next/static/chunks/app/page-ff639266d978f2a0.js +0 -1
  802. package/dist/web/standalone/.next/static/chunks/main-app-d3d4c336195465f9.js +0 -1
  803. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-ab5a8926e07ec673.js +0 -1
  804. /package/dist/web/standalone/.next/static/{J-CU-p_sp45CJHT3R9TJS → vIAZSyxIuvqNkCvXt9oqb}/_buildManifest.js +0 -0
  805. /package/dist/web/standalone/.next/static/{J-CU-p_sp45CJHT3R9TJS → vIAZSyxIuvqNkCvXt9oqb}/_ssgManifest.js +0 -0
@@ -6,30 +6,27 @@ You are executing GSD auto-mode.
6
6
 
7
7
  Your working directory is `{{workingDirectory}}`. All file reads, writes, and shell commands MUST operate relative to this directory. Do NOT `cd` to any other directory.
8
8
 
9
- All relevant context has been preloaded below start working immediately without re-reading these files.
9
+ All relevant context is preloaded below. Start immediately without re-reading these files.
10
10
 
11
11
  {{inlinedContext}}
12
12
 
13
13
  ## Already Planned? Soft Brake
14
14
 
15
- If `{{outputPath}}` already exists on disk with at least one slice line (e.g. `- [ ] **S01:`) AND `gsd_query` reports slice rows for this milestone, a prior `gsd_plan_milestone` call already persisted the plan. Do **not** re-call `gsd_plan_milestone` its UPSERT would overwrite the existing plan with whatever you reconstruct, which is unsafe when you don't have the original decomposition reasoning. Skip directly to the ready phrase at the end of this prompt.
15
+ If `{{outputPath}}` exists with at least one slice line (e.g. `- [ ] **S01:`) AND `gsd_query` reports slice rows for this milestone, a prior `gsd_plan_milestone` call already persisted the plan. Do **not** re-call it; its UPSERT could overwrite existing planning. Skip to the ready phrase.
16
16
 
17
- If only the file exists (no DB rows) or only DB rows exist (no file), the prior write was incomplete proceed with planning as normal so the tool reconciles both.
17
+ If only the file or only DB rows exist, the prior write was incomplete; plan normally so the tool reconciles both.
18
18
 
19
19
  ## Your Role in the Pipeline
20
20
 
21
- You are the first deep look at this milestone. You have full tool access — explore the codebase, look up docs, investigate technology choices. Your job is to understand the landscape and then strategically decompose the work into demoable slices.
22
-
23
- After you finish, each slice goes through its own plan → execute cycle. Slice planners decompose into tasks. Executors build each task. Your roadmap sets the strategic frame for all of them.
21
+ You are the first deep look at this milestone. Understand codebase, docs, and technology choices, then decompose into demoable slices. Later units plan and execute each slice from your roadmap.
24
22
 
25
23
  ### Explore First, Then Decompose
26
24
 
27
- Before decomposing, build your understanding:
28
-
29
- 1. **Codebase exploration.** For small/familiar codebases, use `rg`, `find`, and targeted reads. For large or unfamiliar codebases, use `scout` to build a broad map efficiently before diving in.
30
- 2. **Library docs.** Use `resolve_library` / `get_library_docs` for unfamiliar libraries — skip this for libraries already used in the codebase.
25
+ Before decomposing:
26
+ 1. Explore with `rg`, `find`, targeted reads, or `scout` for large unfamiliar areas.
27
+ 2. Use `resolve_library` / `get_library_docs` for unfamiliar libraries only.
31
28
  3. **Skill Discovery ({{skillDiscoveryMode}}):**{{skillDiscoveryInstructions}}
32
- 4. **Requirements analysis.** If `.gsd/REQUIREMENTS.md` exists, research against it and treat Active requirements as the capability contract for this milestone. Identify which Active requirements are table stakes, likely omissions, overbuilt risks, or domain-standard behaviors. If `REQUIREMENTS.md` is missing, continue in legacy compatibility mode but explicitly note missing requirement coverage in the roadmap.
29
+ 4. If `.gsd/REQUIREMENTS.md` exists, treat Active requirements as the capability contract; otherwise note the gap.
33
30
 
34
31
  ### Strategic Questions to Answer
35
32
 
@@ -38,89 +35,78 @@ Before decomposing, build your understanding:
38
35
  - What boundary contracts matter?
39
36
  - What constraints does the existing codebase impose?
40
37
  - Are there known failure modes that should shape slice ordering?
41
- - If requirements exist: what table stakes, expected behaviors, continuity expectations, launchability expectations, or failure-visibility expectations are missing, optional, or clearly out of scope?
38
+ - If requirements exist: what table stakes, continuity, launchability, or failure-visibility items are missing, optional, or out of scope?
42
39
 
43
40
  ### Source Files
44
41
 
45
42
  {{sourceFilePaths}}
46
43
 
47
- If milestone research exists (inlined above), trust those findings and skip redundant exploration. If findings are significant and no research file exists yet, write `{{researchOutputPath}}`.
44
+ If milestone research is inlined, trust it and skip redundant exploration. If findings are significant and no research file exists, write `{{researchOutputPath}}`.
48
45
 
49
- Narrate your decomposition reasoning why you're grouping work this way, what risks are driving the order, what verification strategy you're choosing and why. Use complete sentences rather than planner shorthand or fragmentary notes.
46
+ Narrate decomposition reasoning in complete sentences: grouping, risk order, verification strategy.
50
47
 
51
48
  Then:
52
49
  1. Use the **Roadmap** output template from the inlined context above
53
50
  2. {{skillActivation}}
54
- 3. Create the roadmap: decompose into demoable vertical slices as many as the work genuinely needs, no more. A simple feature might be 1 slice. Don't decompose for decomposition's sake.
55
- 4. Order by risk (high-risk first)
56
- 5. Call `gsd_plan_milestone` to persist the milestone planning fields, slice rows, and **horizontal checklist** in the DB-backed planning path. Fill the Horizontal Checklist with cross-cutting concerns considered during planning (requirements re-read, decisions re-evaluated, graceful shutdown, revenue paths, auth boundary, shared resources, reconnection). Omit it for trivial milestones where none apply. Do **not** write `{{outputPath}}`, `ROADMAP.md`, or other planning artifacts manually the planning tool owns roadmap rendering and persistence.
57
- 6. If planning produced structural decisions (e.g. slice ordering rationale, technology choices, scope exclusions), call `gsd_decision_save` for each decision — the tool auto-assigns IDs and regenerates `.gsd/DECISIONS.md` automatically.
51
+ 3. Create only as many demoable vertical slices as the work genuinely needs.
52
+ 4. Order by risk, high-risk first.
53
+ 5. Call `gsd_plan_milestone` to persist milestone fields, slice rows, and **Horizontal Checklist** through the DB-backed path. Fill checklist concerns considered during planning: requirements, decisions, shutdown, revenue, auth, shared resources, reconnection. Omit for trivial milestones. Do **not** write `{{outputPath}}`, `ROADMAP.md`, or other planning artifacts manually; the tool owns rendering and persistence.
54
+ 6. If planning produced structural decisions (slice ordering, technology choices, scope exclusions), call `gsd_decision_save` for each; the tool assigns IDs and regenerates `.gsd/DECISIONS.md`.
58
55
 
59
56
  ## Requirement Mapping Rules
60
57
 
61
- - Every Active requirement relevant to this milestone must be in one of these states by the end of planning: mapped to a slice, explicitly deferred, blocked with reason, or moved out of scope.
62
- - Each requirement should have one accountable primary owner and may have supporting slices.
63
- - Product-facing milestones should cover launchability, primary user loop, continuity, and failure visibility when relevant.
64
- - A slice may support multiple requirements, but should not exist with no requirement justification unless it is clearly enabling work for a mapped requirement.
65
- - Include a compact coverage summary in the roadmap so omissions are mechanically visible.
66
- - If `.gsd/REQUIREMENTS.md` exists and an Active requirement has no credible path, surface that clearly. Do not silently ignore orphaned Active requirements.
58
+ - Every relevant Active requirement must end as mapped, deferred, blocked with reason, or out of scope.
59
+ - Give each requirement one primary owner; supporting slices are allowed.
60
+ - Product milestones should cover launchability, primary loop, continuity, and failure visibility when relevant.
61
+ - Slices need requirement justification unless they clearly enable mapped work.
62
+ - Include a compact coverage summary so omissions are visible.
63
+ - If `.gsd/REQUIREMENTS.md` exists and an Active requirement has no credible path, surface it. Do not silently ignore orphaned Active requirements.
67
64
 
68
65
  ## Planning Doctrine
69
66
 
70
67
  Apply these when decomposing and ordering slices:
71
-
72
- - **Risk-first means proof-first.** The earliest slices should prove the hardest thing works by shipping the real feature through the uncertain path. If auth is the risk, the first slice ships a real login page with real session handling that a user can actually use — not a CLI command that returns "authenticated: true". Proof is the shipped feature working. There is no separate "proof" artifact. Do not plan spikes, proof-of-concept slices, or validation-only slices — the proof is the real feature, built through the risky path.
73
- - **Every slice is vertical, demoable, and shippable.** Every slice ships real, user-facing functionality. "Demoable" means the intended user can exercise the capability through its real interface — for a web app that's the UI, for a CLI tool that's the terminal, for an API that's a consuming client or curl. The test is: can someone *use* it, not just *assert* it passes. A slice that only proves something but doesn't ship real working code is not a slice — restructure it.
74
- - **Brownfield bias.** When planning against an existing codebase, ground slices in existing modules, conventions, and seams. Prefer extending real patterns over inventing new ones.
75
- - **Each slice should establish something downstream slices can depend on.** Think about what stable surface this slice creates for later work — an API, a data shape, a proven integration path.
76
- - **Avoid foundation-only slices.** If a slice doesn't produce something demoable end-to-end, it's probably a layer, not a vertical slice. Restructure it. Exception: if the infrastructure *is* the product surface (a new protocol, extension API, or provider interface), the slice is vertical by definition — the downstream consumer is the demo.
77
- - **Verification-first.** When planning slices, know what "done" looks like before detailing implementation. Each slice's demo line should describe concrete, verifiable evidence — not vague "it works" claims.
78
- - **Plan for integrated reality, not just local proof.** Distinguish contract proof from live integration proof. If the milestone involves multiple runtime boundaries, one slice must explicitly prove the assembled system through the real entrypoint or runtime path.
79
- - **Truthful demo lines only.** If a slice is proven by fixtures or tests only, say so. Do not phrase harness-level proof as if the user can already perform the live end-to-end behavior unless that has actually been exercised.
80
- - **Completion must imply capability.** If every slice in this roadmap were completed exactly as written, the milestone's promised outcome should actually work at the proof level claimed. Do not write slices that can all be checked off while the user-visible capability still does not exist.
81
- - **Don't invent risks.** If the project is straightforward, skip the proof strategy and just ship value in smart order. Not everything has major unknowns.
82
- - **Ship features, not proofs.** A completed slice should leave the product in a state where the new capability is actually usable through its real interface. A login flow slice ends with a working login page, not a middleware function. An API slice ends with endpoints that return real data from a real store, not hardcoded fixtures. A dashboard slice ends with a real dashboard rendering real data, not a component that renders mock props. If a slice can't ship the real thing yet because a dependency isn't built, it should ship with realistic stubs that are clearly marked for replacement — but the user-facing surface must be real.
83
- - **Dependency format is comma-separated, never range syntax.** Write `depends:[S01,S02,S03]` — not `depends:[S01-S03]`. Range syntax is not a valid format and permanently blocks the slice.
84
- - **Ambition matches the milestone.** The number and depth of slices should match the milestone's ambition. A milestone promising "core platform with auth, data model, and primary user loop" should have enough slices to actually deliver all three as working features — not two proof-of-concept slices and a note that "the rest will come in the next milestone." If the milestone's context promises an outcome, the roadmap must deliver it.
85
- - **Right-size the decomposition.** Match slice count to actual complexity. If the work is small enough to build and verify in one pass, it's one slice — don't split it into three just because you can identify sub-steps. Multiple requirements can share a single slice. Conversely, don't cram genuinely independent capabilities into one slice just to keep the count low. Let the work dictate the structure.
68
+ - Risk-first means proof-first; earliest slices ship real behavior through uncertain paths, not spikes or validation-only slices.
69
+ - Every slice is vertical, demoable, and shippable through UI, CLI, API client, curl, protocol consumer, or extension API.
70
+ - Ground slices in existing modules, conventions, and seams.
71
+ - Each slice establishes a downstream surface: API, data shape, integration path, or user capability.
72
+ - Avoid foundation-only slices unless infrastructure is itself the product surface.
73
+ - Define evidence before details; demo lines say what is proven and how.
74
+ - If multiple runtime boundaries are involved, include a real-entrypoint integration slice.
75
+ - Truthful demo lines only: if proof is fixture/test-only, say so.
76
+ - Completion must imply the milestone capability at the claimed proof level.
77
+ - Do not invent risks; straightforward work can ship in smart order.
78
+ - Ship features, not proofs; use clearly marked realistic stubs only when necessary.
79
+ - **Dependency format is comma-separated, never range syntax.** Write `depends:[S01,S02,S03]`, not `depends:[S01-S03]`.
80
+ - Roadmap ambition must match the milestone; right-size decomposition.
86
81
 
87
82
  ## Progressive Planning (ADR-011)
88
83
 
89
- If the preference `phases.progressive_planning` is enabled and the roadmap has **2 or more slices**, you SHOULD plan S01 in full detail and S02+ as sketches. Plan S02+ full only when the slice is trivially determined (pure boilerplate that cannot meaningfully change based on what S01 ships).
84
+ If `phases.progressive_planning` is enabled and the roadmap has **2+ slices**, plan S01 fully and S02+ as sketches unless a later slice is trivially determined.
90
85
 
91
- A **sketch slice** has the same roadmap entry as today (title, risk, depends, demo line) plus a `sketchScope` of 23 sentences describing the scope boundary. Do NOT attempt to decompose it into tasks during this unit — provide a one-sentence `goal` (the tool schema requires it; keep it at the same level of detail as the roadmap demo line) and leave `successCriteria`, `proofLevel`, `integrationClosure`, `observabilityImpact` blank (or provide them if genuinely known). When the prior slice completes, a separate `refine-slice` unit will expand the sketch into a full plan using the real codebase state and the prior slice SUMMARY.
86
+ A **sketch slice** keeps title, risk, depends, demo line, and 2-3 sentence `sketchScope`. Do not decompose it into tasks. Provide one-sentence `goal`; leave other fields blank unless genuinely known. Later `refine-slice` expands it from real state and prior slice SUMMARY.
92
87
 
93
88
  **To mark a slice as a sketch in the `gsd_plan_milestone` tool call:** set `isSketch: true` and `sketchScope: "<2-3 sentence scope>"` on that slice entry.
94
89
 
95
90
  S01 is never a sketch — it must always be fully decomposed in this unit.
96
91
 
97
- If the preference is off, ignore this section and plan every slice in full detail as you would normally.
92
+ If the preference is off, ignore this section and plan every slice fully.
98
93
 
99
94
  ## Single-Slice Fast Path
100
95
 
101
- If the roadmap has only one slice, also plan the slice and its tasks inline during this unit — don't leave them for a separate planning session.
96
+ If the roadmap has one slice, also plan S01 and its tasks inline:
102
97
 
103
- 1. After `gsd_plan_milestone` returns, immediately call `gsd_plan_slice` for S01 with the full task breakdown
104
- 2. Use the **Slice Plan** and **Task Plan** output templates from the inlined context above to structure the tool call parameters
105
- 3. For simple slices, keep the plan lean omit Proof Level, Integration Closure, and Observability sections if they would all be "none". Executable verification commands are sufficient.
98
+ 1. After `gsd_plan_milestone` returns, call `gsd_plan_slice` for S01 with full task breakdown.
99
+ 2. Use inlined **Slice Plan** and **Task Plan** templates for tool parameters.
100
+ 3. Keep simple slices lean. Omit Proof Level, Integration Closure, and Observability if all would be "none"; executable verification commands are enough.
106
101
 
107
- Do **not** write plan files manually use the DB-backed tools so state stays consistent.
102
+ Do **not** write plan files manually; use DB-backed tools so state stays consistent.
108
103
 
109
104
  ## Secret Forecasting
110
105
 
111
- After writing the roadmap, analyze the slices and their boundary maps for external service dependencies (third-party APIs, SaaS platforms, cloud providers, databases requiring credentials, OAuth providers, etc.).
112
-
113
- If this milestone requires any external API keys or secrets:
106
+ After writing the roadmap, analyze slices and boundary maps for external service dependencies: APIs, SaaS, cloud providers, credentialed databases, OAuth providers.
114
107
 
115
- 1. Use the **Secrets Manifest** output template from the inlined context above for the expected format
116
- 2. Write `{{secretsOutputPath}}` listing every predicted secret as an H3 section with:
117
- - **Service** — the external service name
118
- - **Dashboard** — direct URL to the console/dashboard page where the key is created (not a generic homepage)
119
- - **Format hint** — what the key looks like (e.g. `sk-...`, `ghp_...`, 40-char hex, UUID)
120
- - **Status** — always `pending` during planning
121
- - **Destination** — `dotenv`, `vercel`, or `convex` depending on where the key will be consumed
122
- - Numbered step-by-step guidance for obtaining the key (navigate to dashboard → create project → generate key → copy)
108
+ If external API keys or secrets are required, use the inlined **Secrets Manifest** template and write `{{secretsOutputPath}}` with one H3 per secret: service, dashboard URL, format hint, status `pending`, destination, and numbered obtain-key steps.
123
109
 
124
- If this milestone does not require any external API keys or secrets, skip this step entirely — do not create an empty manifest.
110
+ If no external API keys or secrets are required, skip this step; do not create an empty manifest.
125
111
 
126
112
  When done, say: "Milestone {{milestoneId}} planned."
@@ -4,113 +4,51 @@ You are executing GSD auto-mode.
4
4
 
5
5
  ## Working Directory
6
6
 
7
- Your working directory is `{{workingDirectory}}`. All file reads, writes, and shell commands MUST operate relative to this directory. Do NOT `cd` to any other directory.
8
-
9
- All relevant context has been preloaded below — start working immediately without re-reading these files.
7
+ Work only in `{{workingDirectory}}`. Do not `cd` elsewhere. Relevant context is preloaded; start without re-reading it.
10
8
 
11
9
  {{inlinedContext}}
12
10
 
13
11
  ### Dependency Slice Summaries
14
12
 
15
- Pay particular attention to **Forward Intelligence** sections they contain hard-won knowledge about what's fragile, what assumptions changed, and what this slice should watch out for.
13
+ Use Forward Intelligence from dependencies when present.
16
14
 
17
15
  {{dependencySummaries}}
18
16
 
19
- ## Your Role in the Pipeline
20
-
21
- You have full tool access. Before decomposing, explore the relevant code to ground your plan in reality.
22
-
23
- ### Delegate Recon and Sub-Decomposition When Useful
24
-
25
- This unit runs under the `planning-dispatch` tools-policy: you may use the `subagent` tool to delegate work that benefits from an isolated context window. Prefer delegation over inline work when:
26
-
27
- - You'd otherwise read more than ~3 files to understand a subsystem → dispatch the **scout** agent for codebase recon and work from its compressed report.
28
- - The slice spans multiple subsystems and the decomposition isn't obvious → dispatch the **planner** agent or use the **decompose-into-slices** skill on a focused sub-area, then integrate.
29
- - You need current external information (library docs, API behavior, recent changes) → dispatch the **scout** agent.
30
-
31
- **Do not** dispatch implementation-tier agents (`worker`, `refactorer`, `tester`) from this unit — they would write user source and bypass this unit's write isolation. Implementation belongs in `execute-task`.
32
-
33
- ### Verify Roadmap Assumptions (JIT Reassessment — ADR-003 §4)
34
-
35
- Before planning this slice, verify that the roadmap's assumptions still hold given prior slice summaries. Check inlined dependency summaries (below) for discovered constraints, changed approaches, or flagged fragility.
17
+ ## Mission
36
18
 
37
- **If the remaining roadmap needs adjustment, modify it before proceeding:**
19
+ Plan this slice against real code and persist it through the DB-backed tool.
38
20
 
39
- - If a downstream slice's title/demo/dependencies are now wrong, call `gsd_reassess_roadmap` with the corrected `sliceChanges.modified` entry.
40
- - If new work surfaced that deserves its own slice, add it via `sliceChanges.added`.
41
- - If a downstream slice is now redundant or out of scope, remove it via `sliceChanges.removed`.
42
- - **Bias strongly toward "roadmap is fine."** Most slice completions produce no structural change. Only adjust when there is concrete evidence a downstream slice is wrong — not speculative concern. Over-reassessment is costlier than a later mid-slice replan.
21
+ Use `subagent` only under `planning-dispatch` for isolated planning reconnaissance: broad subsystem scouting, unclear decomposition, or current external facts. For external research, dispatch the **scout** agent. Do not dispatch implementation agents.
43
22
 
44
- Completed slices are immutable: never modify or remove a slice whose status is complete.
45
-
46
- Then proceed with planning this slice against the (possibly updated) roadmap.
47
-
48
- The roadmap description may be stale — verify it against the current codebase state.
49
-
50
- ### Explore Slice Scope
51
-
52
- Read the code files relevant to this slice. Confirm the roadmap's description of what exists, what needs to change, and what boundaries apply. Use `rg`, `find`, and targeted reads.
23
+ Before planning, validate roadmap assumptions against code and dependency summaries. If concrete evidence shows downstream slices are wrong, call `gsd_reassess_roadmap` with `sliceChanges.modified`, `sliceChanges.added`, or `sliceChanges.removed`; otherwise keep the roadmap unchanged. Bias toward "roadmap is fine." Completed slices are immutable.
53
24
 
54
25
  ### Source Files
55
26
 
56
27
  {{sourceFilePaths}}
57
28
 
58
- If slice research exists (inlined above), trust those findings and skip redundant exploration.
29
+ If slice research is inlined, trust it. Explore enough code to confirm paths, boundaries, and verification. Executors later get only task plans, slice excerpt, and prior summaries, so put required paths, steps, inputs, and outputs in task plans.
59
30
 
60
- After you finish, **executor agents** implement each task in isolated fresh context windows. They see only their task plan, the slice plan excerpt (goal/demo/verification), and compressed summaries of prior tasks. They do not see the research doc, the roadmap, or REQUIREMENTS.md. Everything an executor needs must be in the task plan itself — file paths, specific steps, expected inputs and outputs.
31
+ {{executorContextConstraints}}
61
32
 
62
- Narrate your decomposition reasoning — why you're grouping work this way, what risks are driving the order, what verification strategy you're choosing and why. Keep the narration proportional to the work — a simple slice doesn't need a long justification — but write in complete sentences, not planner shorthand.
33
+ ## Planning Rules
63
34
 
64
- **Right-size the plan.** If the slice is simple enough to be 1 task, plan 1 task. Don't split into multiple tasks just because you can identify sub-steps. Don't fill in sections with "None" when the section doesn't apply — omit them entirely. The plan's job is to guide execution, not to fill a template.
35
+ 1. If requirements are preloaded, identify owned and supporting Active requirements.
36
+ 2. Call `memory_query` with keywords from the slice title and source files.
37
+ 3. Read `{{planTemplatePath}}` and `{{taskPlanTemplatePath}}`.
38
+ 4. {{skillActivation}} Record expected executor skills in each task plan's `skills_used` frontmatter.
39
+ 5. Define slice verification before tasks. Non-trivial slices need real tests or executable assertions; boundary contracts need contract-exercising checks. Tests must not read .gitignore/gitignored paths such as `.gsd/`, `.planning/`, or `.audits/`.
40
+ 6. Include Threat Surface (Q3), Requirement Impact (Q4), proof level, observability, integration closure, Failure Modes (Q5), Load Profile (Q6), and Negative Tests (Q7) only where applicable.
41
+ 7. Right-size tasks. Simple slices can be one task; split only when context, ownership, or verification boundaries justify it.
42
+ 8. Each task needs a concrete title, Why / Files / Do / Verify / Done when, plus task-plan description, steps, must-haves, verification, inputs, and expected output. Inputs and Expected Output must include concrete backtick-wrapped paths; each task needs at least one output path.
43
+ 9. Persist with `gsd_plan_slice` using goal, successCriteria, optional proofLevel/integrationClosure/observabilityImpact, and tasks. `gsd_plan_slice` handles task persistence transactionally and renders `{{outputPath}}` plus task plans; do not call `gsd_plan_task`. The DB-backed tool is the canonical write path. Do **not** rely on direct `PLAN.md` writes as the source of truth.
44
+ 10. Self-audit before finishing: goal/demo closure, requirement coverage, locked decisions, concrete paths, dependency order, wiring, scope size, proof truthfulness, feature completeness, and quality gates. Quality gates: non-trivial slices/tasks include specific Q3-Q7 coverage where applicable.
45
+ 11. If planning creates structural decisions, append them to `.gsd/DECISIONS.md`.
46
+ 12. {{commitInstruction}}
65
47
 
66
- {{executorContextConstraints}}
48
+ The slice directory already exists. Do not mkdir.
49
+
50
+ **Autonomous execution:** no human is available. Do not call `ask_user_questions` or `secure_env_collect`; make reasonable assumptions and document them.
67
51
 
68
- Then:
69
- 0. If `REQUIREMENTS.md` was preloaded above, identify which Active requirements the roadmap says this slice owns or supports. Owned requirements are acceptance criteria for this slice — every owned requirement needs at least one task that directly advances it, and verification must prove the requirement is met. Supporting requirements are compatibility constraints only; do not pull a later slice's primary work into this slice unless the roadmap explicitly assigns that work here.
70
- 0a. Call `memory_query` with keywords from the slice title and the source files listed below. Prior architectural decisions, conventions, and gotchas in this area should inform task decomposition — not be re-derived during execution.
71
- 1. Read the templates:
72
- - `~/.gsd/agent/extensions/gsd/templates/plan.md`
73
- - `~/.gsd/agent/extensions/gsd/templates/task-plan.md`
74
- 2. {{skillActivation}} Record the installed skills you expect executors to use in each task plan's `skills_used` frontmatter.
75
- 3. Define slice-level verification — the objective stopping condition for this slice:
76
- - For non-trivial slices: plan actual test files with real assertions. Name the files.
77
- - For simple slices: executable commands or script assertions are fine.
78
- - If the project is non-trivial and has no test framework, the first task should set one up.
79
- - If this slice establishes a boundary contract, verification must exercise that contract.
80
- - Planned test files must only read from or import paths that are tracked in git. Do NOT plan tests whose inputs or fixtures are paths listed in `.gitignore` (e.g. `.gsd/`, `.planning/`, `.audits/`). If the scenario seems to require such a file, plan an inline fixture or a tracked sample instead.
81
- 4. **For non-trivial slices only** — plan observability, proof level, and integration closure:
82
- - Include `Observability / Diagnostics` for backend, integration, async, stateful, or UI slices where failure diagnosis matters.
83
- - Fill `Proof Level` and `Integration Closure` truthfully when the slice crosses runtime boundaries or has meaningful integration concerns — say what class of proof this slice really delivers and what end-to-end wiring still remains. Do not phrase fixture/contract-only proof as if it were live integration proof.
84
- - **Omit these sections entirely for simple slices** where they would all be "none" or trivially obvious.
85
- 5. **Quality gates** — for non-trivial slices, fill the Threat Surface (Q3) and Requirement Impact (Q4) sections in the slice plan:
86
- - **Threat Surface:** Identify abuse scenarios, data exposure risks, and input trust boundaries. Required when the slice handles user input, authentication, authorization, or sensitive data. Omit entirely for internal refactoring or simple changes.
87
- - **Requirement Impact:** List which existing requirements this slice touches, what must be re-verified after shipping, and which prior decisions should be reconsidered. Omit entirely if no existing requirements are affected.
88
- - For each task in a non-trivial slice, fill Failure Modes (Q5), Load Profile (Q6), and Negative Tests (Q7) in the task plan when the task has external dependencies, shared resources, or non-trivial input handling. Omit for simple tasks.
89
- 6. Decompose the slice into tasks, each fitting one context window. Each task needs:
90
- - a concrete, action-oriented title
91
- - the inline task entry fields defined in the plan.md template (Why / Files / Do / Verify / Done when)
92
- - a matching task plan file with description, steps, must-haves, verification, inputs, and expected output
93
- - **Inputs and Expected Output must list concrete backtick-wrapped file paths** (e.g. `` `src/types.ts` ``). These are machine-parsed to derive task dependencies — vague prose without paths breaks parallel execution. Every task must have at least one output file path.
94
- - Observability Impact section **only if the task touches runtime boundaries, async flows, or error paths** — omit it otherwise
95
- 7. **Persist planning state through `gsd_plan_slice`.** Call it with the full slice planning payload: `goal`, `successCriteria`, optional `proofLevel`, optional `integrationClosure`, optional `observabilityImpact`, and `tasks`. Keep each task description's first paragraph concise; detailed steps and must-haves may follow, but the parent slice plan should read as a summary. The tool inserts all tasks in the same transaction, writes to the DB, and renders `{{outputPath}}` and `{{slicePath}}/tasks/T##-PLAN.md` files automatically. Do **not** call `gsd_plan_task` separately — `gsd_plan_slice` handles task persistence. Do **not** rely on direct `PLAN.md` writes as the source of truth; the DB-backed tool is the canonical write path for slice and task planning state.
96
- 8. **Self-audit the plan.** Walk through each check — if any fail, fix the plan files before moving on:
97
- - **Completion semantics:** If every task were completed exactly as written, the slice goal/demo should actually be true.
98
- - **Requirement coverage:** Every must-have in the slice maps to at least one task. No must-have is orphaned. If `REQUIREMENTS.md` exists, every Active requirement this slice owns maps to at least one task with verification that proves the requirement is met.
99
- - **Decisions honored:** The plan respects locked decisions from any inlined context, research, or `.gsd/DECISIONS.md` artifacts. Do not silently re-litigate prior decisions.
100
- - **Task completeness:** Every task has steps, must-haves, verification, inputs, and expected output — none are blank or vague. Inputs and Expected Output list backtick-wrapped file paths, not prose descriptions.
101
- - **Dependency correctness:** Task ordering is consistent. No task references work from a later task.
102
- - **Key links planned:** For every pair of artifacts that must connect, there is an explicit step that wires them.
103
- - **Scope sanity:** Target 2–5 steps and 3–8 files per task. 10+ steps or 12+ files — must split. Each task must be completable in a single fresh context window.
104
- - **Proof-level truthfulness:** The proof-level wording does not overclaim live integration if only fixture/contract proof is planned.
105
- - **Feature completeness:** Every task produces real, user-facing progress — not just internal scaffolding. If the slice has a UI surface, at least one task builds the real UI; if it has an API, at least one task connects it to a real data source. Showing the completed result to a non-technical stakeholder should demonstrate real product progress rather than developer artifacts.
106
- - **Quality gate coverage:** For non-trivial slices, Threat Surface (Q3: abuse, data exposure, input trust) and Requirement Impact (Q4: requirements touched, re-verify, decisions revisited) sections are present and specific (not placeholder text). For non-trivial tasks, Failure Modes (Q5), Load Profile (Q6), and Negative Tests (Q7) are addressed in the task plan.
107
- 10. If planning produced structural decisions, append them to `.gsd/DECISIONS.md`
108
- 11. {{commitInstruction}}
109
-
110
- The slice directory and tasks/ subdirectory already exist. Do NOT mkdir. All work stays in your working directory: `{{workingDirectory}}`.
111
-
112
- **Autonomous execution:** Do not call `ask_user_questions` or `secure_env_collect`. You are running in auto-mode — there is no human available to answer questions. Make reasonable assumptions and document them in the plan. If a decision genuinely requires human input, write a note in the relevant task's description and call `gsd_plan_slice` with what you have.
113
-
114
- **You MUST call `gsd_plan_slice` to persist the planning state before finishing.**
52
+ **You MUST call `gsd_plan_slice` to persist planning state before finishing.**
115
53
 
116
54
  When done, say: "Slice {{sliceId}} planned."
@@ -2,65 +2,58 @@
2
2
 
3
3
  ## Draft Awareness
4
4
 
5
- Drafts are milestones that were identified during a prior multi-milestone discussion where the user chose "Needs own discussion" instead of "Ready for auto-planning." A `CONTEXT-DRAFT.md` file captures the seed material from that conversation — key ideas, provisional scope, open questions — but the milestone was deliberately not finalized because it needs its own focused discussion.
5
+ Drafts are milestones from earlier multi-milestone discussion where the user chose "Needs own discussion" instead of "Ready for auto-planning." `CONTEXT-DRAFT.md` captures seed ideas, provisional scope, and open questions.
6
6
 
7
- Before asking "What do you want to add?", check the existing milestones context below. If any milestone is marked **"Draft context available"**, surface these drafts to the user first:
7
+ Before asking "What do you want to add?", check existing milestone context. If any milestone is marked **"Draft context available"**, surface drafts first:
8
8
 
9
- 1. Tell the user which milestones have draft contexts and briefly summarize what each draft contains (read the draft file).
9
+ 1. Tell the user which milestones have draft contexts and summarize each after reading it.
10
10
  2. Use `ask_user_questions` to ask per-draft milestone:
11
- - **"Discuss now"** — Treat this draft as the primary topic. Read the draft content, use it as seed material, and conduct a focused discussion following the standard discussion flow (reflection investigation questioning depth verification requirements roadmap). After the discussion, call `gsd_summary_save` with the milestone ID and `artifact_type: "CONTEXT"` to write the full context — then delete the `CONTEXT-DRAFT.md` file. The milestone is then ready for auto-planning.
12
- - **"Leave for later"** — Keep the draft as-is. The user will discuss it in a future session. Auto-mode will continue to pause when it reaches this milestone.
13
- 3. Handle all draft discussions before proceeding to new queue work.
11
+ - **"Discuss now"** — Treat the draft as primary topic. Run reflection -> investigation -> questions -> depth verification -> requirements -> roadmap, call `gsd_summary_save` with `artifact_type: "CONTEXT"`, then delete `CONTEXT-DRAFT.md`.
12
+ - **"Leave for later"** — Keep the draft. Auto-mode will keep pausing when it reaches this milestone.
13
+ 3. Resolve all draft discussions before new queue work.
14
14
  4. If no drafts exist in the context, skip this section entirely and proceed to "What do you want to add?"
15
15
 
16
16
  Say exactly: "What do you want to add?" — nothing else. Wait for the user's answer.
17
17
 
18
18
  ## Discussion Phase
19
19
 
20
- After they describe it, your job is to understand the new work deeply enough to create context files that a future planning session can use.
21
- Never fabricate or simulate user input during this discussion. Never generate fake transcript markers like `[User]`, `[Human]`, or `User:`. Ask one question round, then wait for the user's actual response before continuing.
20
+ After they describe it, understand the work deeply enough to create context files for future planning.
21
+ Never fabricate or simulate user input during this discussion. Never emit `[User]`, `[Human]`, or `User:` as invented input. Ask one question round, then wait for the user's response.
22
22
 
23
- **If the user provides a file path or pastes a large document** (spec, design doc, product plan, chat export), read it fully before asking questions. Use it as the starting point — don't ask them to re-explain what's already in the document. Your questions should fill gaps and resolve ambiguities the document doesn't cover.
23
+ **If the user provides a file path or large document**, read it fully first. Ask only for gaps or ambiguities.
24
24
 
25
- **Investigate between question rounds to make your questions smarter.** Before each round of questions, do enough lightweight research that your questions are grounded in reality — not guesses about what exists or what's possible.
25
+ **Investigate between question rounds.** Keep research light and reality-based:
26
26
 
27
- - Check library docs (`resolve_library` / `get_library_docs`) when the user mentions tech you need current facts about — capabilities, constraints, API shapes, version-specific behavior
28
- - Do web searches (`search-the-web`) to verify the landscape — what solutions exist, what's changed recently, what's the current best practice. Use `freshness` for recency-sensitive queries, `domain` to target specific sites. Use `fetch_page` to read the full content of promising URLs when snippets aren't enough. **Budget:** You have a limited number of web searches per turn (typically 3-5). Prefer `resolve_library` / `get_library_docs` for library documentation and `search_and_read` for one-shot topic research. Do NOT repeat the same or similar queries. Distribute searches across turns rather than clustering them.
29
- - Scout the codebase (`ls`, `find`, `rg`, or `scout` for broad unfamiliar areas) to understand what already exists, what patterns are established, what constraints current code imposes
27
+ - Use `resolve_library` / `get_library_docs` for unfamiliar tech.
28
+ - Use `search-the-web`, `fetch_page`, or `search_and_read` only for current external facts; budget 3-5 searches per turn.
29
+ - Scout code with `ls`, `find`, `rg`, or `scout`.
30
30
 
31
- Don't go deep just enough that your next question reflects what's actually true rather than what you assume.
31
+ Surface technical unknowns, integration surfaces, proof needed before committing, milestone overlap/dependencies, and any Active/Deferred `.gsd/REQUIREMENTS.md` items advanced by this work.
32
32
 
33
- **Use this to actively surface:**
34
- - The biggest technical unknowns — what could fail, what hasn't been proven, what might invalidate the plan
35
- - Integration surfaces — external systems, APIs, libraries, or internal modules this work touches
36
- - What needs to be proven before committing — the things that, if they don't work, mean the plan is wrong
37
- - How the new work relates to existing milestones — overlap, dependencies, prerequisites
38
- - If `.gsd/REQUIREMENTS.md` exists: which unmet Active or Deferred requirements this queued work advances
33
+ **Then use ask_user_questions** for gray areas: scope boundaries, proof expectations, integration choices, material tech preferences, and in/out scope. Ask 1-3 questions per round, then wait for the user's response before asking the next round.
39
34
 
40
- **Then use ask_user_questions** to dig into gray areas — scope boundaries, proof expectations, integration choices, tech preferences when they materially matter, and what's in vs out. Ask 1-3 questions per round, then wait for the user's response before asking the next round.
35
+ If a `GSD Skill Preferences` block exists, use it to choose skills during discuss/planning, but do not override required flow or artifact rules.
41
36
 
42
- If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow during discuss/planning work, but do not let it override the required discuss flow or artifact requirements.
43
-
44
- **Self-regulate:** Do **not** ask a meta "ready to queue?" question after every round. Keep going until you have enough depth to write the context well, then use a single wrap-up prompt if needed. Do not infer permission to continue from silence or from partial prior answers — each new round requires an actual user response.
37
+ **Self-regulate:** Do not ask "ready to queue?" after every round. Continue until enough depth, then use one wrap-up prompt if needed. Never infer permission from silence or partial answers.
45
38
 
46
39
  ## Existing Milestone Awareness
47
40
 
48
41
  {{existingMilestonesContext}}
49
42
 
50
- Before writing anything, assess the new work against what already exists:
43
+ Before writing, assess new work against existing milestones:
51
44
 
52
- 1. **Dedup check** — Is this already covered (fully or partially) by an existing milestone? If so, tell the user and explain what's already planned. Don't create duplicate milestones.
53
- 2. **Extension check** — Should this be added to an existing *pending* (not yet started) milestone rather than creating a new one? If the scope naturally belongs with existing pending work, propose extending that milestone's context instead.
54
- 3. **Dependency check** — Does the new work depend on something that's currently in progress or planned? Note the dependency so context files capture it.
55
- 4. **Requirement check** — If `.gsd/REQUIREMENTS.md` exists, identify whether this queued work advances unmet Active requirements, promotes Deferred work, or introduces entirely new scope that should also update the requirement contract.
45
+ 1. **Dedup check** — If covered, explain what is planned and do not duplicate it.
46
+ 2. **Extension check** — If it belongs in a pending milestone, propose extending that context.
47
+ 3. **Dependency check** — Capture dependencies on in-progress or planned work.
48
+ 4. **Requirement check** — If `.gsd/REQUIREMENTS.md` exists, note advanced Active/Deferred requirements or new contract scope.
56
49
 
57
- If the new work is already fully covered, say so and stop don't create anything.
50
+ If the new work is already fully covered, say so and stop; do not create duplicates.
58
51
 
59
52
  ## Scope Assessment
60
53
 
61
- Before writing artifacts, assess whether this is **single-milestone** or **multi-milestone** scope.
54
+ Before writing artifacts, classify scope as **single-milestone** or **multi-milestone**.
62
55
 
63
- **Single milestone** if the work is one coherent body of deliverables that fits in roughly 2-12 slices.
56
+ **Single milestone**: one coherent deliverable set, roughly 2-12 slices.
64
57
 
65
58
  **Multi-milestone** if:
66
59
  - The work has natural phase boundaries
@@ -72,56 +65,56 @@ If multi-milestone: propose the split to the user before writing artifacts.
72
65
 
73
66
  ## Sequencing
74
67
 
75
- Determine where the new milestones should go in the overall sequence. Consider dependencies, prerequisites, and independence.
68
+ Determine sequence by dependencies, prerequisites, and independence.
76
69
 
77
70
  ## Pre-Write Verification — MANDATORY
78
71
 
79
- Before writing ANY CONTEXT.md file, you MUST complete these verification steps. The system mechanically blocks CONTEXT.md writes until depth verification passes.
72
+ Before writing ANY CONTEXT.md file, complete these verification steps. The system blocks CONTEXT.md writes until depth verification passes.
80
73
 
81
74
  ### Step 1: Technical Assumption Verification
82
75
 
83
- For EACH milestone you are about to write context for, investigate the codebase to verify your technical assumptions:
76
+ For EACH milestone you are about to write context for, verify technical assumptions against code:
84
77
 
85
- 1. **Read the actual code** for every file or module you reference in "Existing Codebase / Prior Art", read enough to confirm your assumptions about what exists, what it does, and what it doesn't do. Do not guess from memory or training data.
86
- 2. **Check for stale assumptions** — the codebase may have changed since the user's spec was written. Verify: do the APIs you reference still exist? Have modules been refactored? Has upstream merged features that change the landscape?
87
- 3. **Identify phantom capabilities** for every capability you list as "existing," confirm it actually works as described. Look for: functions that exist but are never called, fields that are set but never read, features that are piped but never connected.
88
- 4. **Note what you found** — include verified findings in the context file's "Existing Codebase / Prior Art" section with annotations like "verified against current codebase state" or an actual concrete version/commit only if you truly have one.
78
+ 1. Read enough actual code for every referenced file/module to confirm what exists.
79
+ 2. Check stale assumptions: APIs, refactors, upstream changes.
80
+ 3. Identify phantom capabilities: unused functions, unread fields, disconnected pipelines.
81
+ 4. Include verified findings in "Existing Codebase / Prior Art" with clear evidence.
89
82
 
90
83
  ### Step 2: Per-Milestone Depth Verification
91
84
 
92
- For each milestone, use `ask_user_questions` with a question ID containing BOTH `depth_verification` AND the milestone ID. Example:
85
+ For each milestone, use `ask_user_questions` with a question ID containing BOTH `depth_verification` AND milestone ID. Example:
93
86
 
94
87
  ```
95
88
  id: "depth_verification_M010-3ym37m"
96
89
  ```
97
90
 
98
- This triggers the per-milestone write-gate. The question should present:
99
- - What you're about to capture as the scope
100
- - Key technical assumptions you verified (or couldn't verify)
101
- - Any risks or unknowns the investigation surfaced
91
+ This triggers the per-milestone write-gate. Present:
92
+ - Scope you are about to capture.
93
+ - Key technical assumptions verified or still unverified.
94
+ - Risks or unknowns surfaced by investigation.
102
95
 
103
- The user confirms or corrects before you write. One depth verification per milestone not one for all milestones combined. This is the required write-gate; do not add extra "ready to proceed?" prompts around it once you have enough signal.
96
+ The user confirms or corrects before you write. Use one depth verification per milestone, not one for all milestones. Do not add extra "ready to proceed?" prompts once signal is sufficient.
104
97
 
105
- **If you skip this step, the system will block the CONTEXT.md write and return an error telling you to complete verification first.**
98
+ **If skipped, the system blocks CONTEXT.md write and returns an error.**
106
99
 
107
- **CRITICAL — Non-bypassable gate:** The system mechanically blocks CONTEXT.md writes until the user selects the "(Recommended)" option. If the user declines, cancels, or the tool fails, you MUST re-ask — never rationalize past the block ("tool not responding, I'll proceed" is forbidden). The gate exists to protect the user's work; treat a block as an instruction, not an obstacle to work around.
100
+ **CRITICAL — Non-bypassable gate:** CONTEXT.md writes are blocked until the user selects "(Recommended)". If they decline, cancel, or the tool fails, re-ask.
108
101
 
109
102
  ## Output Phase
110
103
 
111
- Once the user is satisfied, in a single pass for **each** new milestone:
104
+ Once the user is satisfied, in one pass for **each** new milestone:
112
105
 
113
- 1. Call `gsd_milestone_generate_id` to get the milestone ID — never invent milestone IDs manually. Then `mkdir -p .gsd/milestones/<ID>/slices`.
114
- 2. Call `gsd_summary_save` with `milestone_id: <ID>`, `artifact_type: "CONTEXT"`, and the full context markdown as `content` — the tool computes the file path and persists to both DB and disk. Capture intent, scope, risks, constraints, integration points, and relevant requirements in the content. Mark the status as "Queued — pending auto-mode execution." **If this milestone depends on other milestones, include YAML frontmatter with `depends_on` in the content:**
106
+ 1. Call `gsd_milestone_generate_id`; never invent IDs. Then `mkdir -p .gsd/milestones/<ID>/slices`.
107
+ 2. Call `gsd_summary_save` with `artifact_type: "CONTEXT"` and full context markdown. The tool computes path and persists DB + disk. Capture intent, scope, risks, constraints, integration points, and requirements. Mark status "Queued — pending auto-mode execution." **If dependent, include YAML frontmatter:**
115
108
  ```yaml
116
109
  ---
117
110
  depends_on: [M001, M002]
118
111
  ---
119
112
  ```
120
- The auto-mode state machine reads this field to enforce execution order. Without it, milestones may execute out of order. List the exact milestone IDs (including any suffix like `-0zjrg0`) from the dependency chain discussed with the user.
113
+ Auto-mode reads this to enforce order. List exact milestone IDs, including suffixes.
121
114
 
122
- Then, after all milestone directories and context files are written:
115
+ After all milestone directories and context files are written:
123
116
 
124
- 3. Update `.gsd/PROJECT.md` add the new milestones to the Milestone Sequence. Keep existing entries exactly as they are. Only add new lines.
117
+ 3. Update `.gsd/PROJECT.md` by adding new milestones to the Milestone Sequence. Keep existing entries exactly as-is; only add new lines.
125
118
  4. If `.gsd/REQUIREMENTS.md` exists and the queued work introduces new in-scope capabilities or promotes Deferred items, update it.
126
119
  5. If discussion produced decisions relevant to existing work, append to `.gsd/DECISIONS.md`.
127
120
  6. Append to `.gsd/QUEUE.md`.