gsd-pi 2.58.0-dev.778d6ac → 2.58.0-dev.d63175c

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 (628) hide show
  1. package/README.md +1 -1
  2. package/dist/cli.js +35 -49
  3. package/dist/headless-ui.d.ts +0 -17
  4. package/dist/headless-ui.js +3 -97
  5. package/dist/headless.js +6 -67
  6. package/dist/help-text.js +0 -1
  7. package/dist/onboarding.js +0 -44
  8. package/dist/resource-loader.js +1 -16
  9. package/dist/resources/agents/researcher.md +1 -1
  10. package/dist/resources/extensions/ask-user-questions.js +3 -16
  11. package/dist/resources/extensions/async-jobs/extension-manifest.json +1 -1
  12. package/dist/resources/extensions/bg-shell/extension-manifest.json +1 -1
  13. package/dist/resources/extensions/browser-tools/extension-manifest.json +1 -1
  14. package/dist/resources/extensions/claude-code-cli/partial-builder.js +6 -14
  15. package/dist/resources/extensions/claude-code-cli/stream-adapter.js +36 -59
  16. package/dist/resources/extensions/context7/extension-manifest.json +1 -1
  17. package/dist/resources/extensions/get-secrets-from-user.js +5 -8
  18. package/dist/resources/extensions/google-search/extension-manifest.json +1 -1
  19. package/dist/resources/extensions/google-search/index.js +1 -2
  20. package/dist/resources/extensions/gsd/auto/phases.js +21 -25
  21. package/dist/resources/extensions/gsd/auto-artifact-paths.js +2 -2
  22. package/dist/resources/extensions/gsd/auto-dashboard.js +20 -37
  23. package/dist/resources/extensions/gsd/auto-dispatch.js +2 -17
  24. package/dist/resources/extensions/gsd/auto-model-selection.js +3 -26
  25. package/dist/resources/extensions/gsd/auto-post-unit.js +4 -16
  26. package/dist/resources/extensions/gsd/auto-prompts.js +1 -1
  27. package/dist/resources/extensions/gsd/auto-recovery.js +5 -13
  28. package/dist/resources/extensions/gsd/auto-start.js +22 -35
  29. package/dist/resources/extensions/gsd/auto-worktree.js +12 -196
  30. package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +0 -32
  31. package/dist/resources/extensions/gsd/bootstrap/db-tools.js +8 -80
  32. package/dist/resources/extensions/gsd/bootstrap/dynamic-tools.js +1 -32
  33. package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +18 -33
  34. package/dist/resources/extensions/gsd/bootstrap/system-context.js +11 -44
  35. package/dist/resources/extensions/gsd/bootstrap/write-gate.js +0 -67
  36. package/dist/resources/extensions/gsd/captures.js +4 -56
  37. package/dist/resources/extensions/gsd/db-writer.js +8 -116
  38. package/dist/resources/extensions/gsd/doctor-git-checks.js +0 -28
  39. package/dist/resources/extensions/gsd/doctor-providers.js +1 -2
  40. package/dist/resources/extensions/gsd/doctor-runtime-checks.js +4 -5
  41. package/dist/resources/extensions/gsd/doctor.js +1 -3
  42. package/dist/resources/extensions/gsd/error-classifier.js +10 -13
  43. package/dist/resources/extensions/gsd/extension-manifest.json +1 -16
  44. package/dist/resources/extensions/gsd/forensics.js +20 -123
  45. package/dist/resources/extensions/gsd/git-service.js +1 -23
  46. package/dist/resources/extensions/gsd/gitignore.js +0 -33
  47. package/dist/resources/extensions/gsd/gsd-db.js +9 -36
  48. package/dist/resources/extensions/gsd/guided-flow.js +44 -106
  49. package/dist/resources/extensions/gsd/health-widget-core.js +0 -31
  50. package/dist/resources/extensions/gsd/health-widget.js +0 -17
  51. package/dist/resources/extensions/gsd/index.js +1 -1
  52. package/dist/resources/extensions/gsd/memory-extractor.js +0 -7
  53. package/dist/resources/extensions/gsd/migrate-external.js +1 -8
  54. package/dist/resources/extensions/gsd/model-cost-table.js +0 -18
  55. package/dist/resources/extensions/gsd/model-router.js +1 -35
  56. package/dist/resources/extensions/gsd/native-git-bridge.js +0 -17
  57. package/dist/resources/extensions/gsd/notifications.js +1 -16
  58. package/dist/resources/extensions/gsd/parallel-eligibility.js +2 -13
  59. package/dist/resources/extensions/gsd/parallel-merge.js +5 -78
  60. package/dist/resources/extensions/gsd/parsers-legacy.js +3 -20
  61. package/dist/resources/extensions/gsd/paths.js +0 -43
  62. package/dist/resources/extensions/gsd/preferences-models.js +1 -14
  63. package/dist/resources/extensions/gsd/preferences-types.js +1 -2
  64. package/dist/resources/extensions/gsd/preferences.js +16 -13
  65. package/dist/resources/extensions/gsd/prompt-loader.js +1 -4
  66. package/dist/resources/extensions/gsd/prompts/complete-milestone.md +1 -1
  67. package/dist/resources/extensions/gsd/prompts/complete-slice.md +2 -4
  68. package/dist/resources/extensions/gsd/prompts/discuss-headless.md +1 -1
  69. package/dist/resources/extensions/gsd/prompts/discuss.md +1 -1
  70. package/dist/resources/extensions/gsd/prompts/execute-task.md +1 -3
  71. package/dist/resources/extensions/gsd/prompts/forensics.md +2 -2
  72. package/dist/resources/extensions/gsd/prompts/guided-discuss-milestone.md +1 -1
  73. package/dist/resources/extensions/gsd/prompts/guided-discuss-slice.md +1 -1
  74. package/dist/resources/extensions/gsd/prompts/plan-slice.md +0 -2
  75. package/dist/resources/extensions/gsd/prompts/rethink.md +1 -1
  76. package/dist/resources/extensions/gsd/prompts/triage-captures.md +0 -1
  77. package/dist/resources/extensions/gsd/repo-identity.js +11 -205
  78. package/dist/resources/extensions/gsd/rethink.js +0 -5
  79. package/dist/resources/extensions/gsd/roadmap-slices.js +4 -5
  80. package/dist/resources/extensions/gsd/state.js +27 -85
  81. package/dist/resources/extensions/gsd/tests/dist-redirect.mjs +1 -20
  82. package/dist/resources/extensions/gsd/tools/complete-task.js +71 -34
  83. package/dist/resources/extensions/gsd/tools/plan-milestone.js +2 -12
  84. package/dist/resources/extensions/gsd/tools/reassess-roadmap.js +1 -29
  85. package/dist/resources/extensions/gsd/tools/validate-milestone.js +3 -14
  86. package/dist/resources/extensions/gsd/triage-resolution.js +7 -22
  87. package/dist/resources/extensions/gsd/undo.js +2 -2
  88. package/dist/resources/extensions/gsd/unit-ownership.js +33 -164
  89. package/dist/resources/extensions/gsd/verdict-parser.js +8 -20
  90. package/dist/resources/extensions/gsd/workflow-manifest.js +5 -24
  91. package/dist/resources/extensions/gsd/workflow-projections.js +63 -95
  92. package/dist/resources/extensions/gsd/workflow-reconcile.js +5 -35
  93. package/dist/resources/extensions/gsd/workspace-index.js +0 -24
  94. package/dist/resources/extensions/gsd/worktree-manager.js +1 -105
  95. package/dist/resources/extensions/gsd/worktree-resolver.js +3 -20
  96. package/dist/resources/extensions/mcp-client/index.js +7 -11
  97. package/dist/resources/extensions/search-the-web/extension-manifest.json +1 -1
  98. package/dist/resources/extensions/shared/interview-ui.js +1 -11
  99. package/dist/resources/skills/create-gsd-extension/SKILL.md +3 -5
  100. package/dist/resources/skills/create-gsd-extension/references/key-rules-gotchas.md +4 -5
  101. package/dist/resources/skills/create-gsd-extension/workflows/add-capability.md +2 -2
  102. package/dist/resources/skills/create-gsd-extension/workflows/create-extension.md +4 -4
  103. package/dist/resources/skills/create-gsd-extension/workflows/debug-extension.md +3 -5
  104. package/dist/web/standalone/.next/BUILD_ID +1 -1
  105. package/dist/web/standalone/.next/app-path-routes-manifest.json +17 -17
  106. package/dist/web/standalone/.next/build-manifest.json +3 -3
  107. package/dist/web/standalone/.next/prerender-manifest.json +3 -3
  108. package/dist/web/standalone/.next/react-loadable-manifest.json +1 -1
  109. package/dist/web/standalone/.next/required-server-files.json +1 -1
  110. package/dist/web/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  111. package/dist/web/standalone/.next/server/app/_global-error.html +2 -2
  112. package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
  113. package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  114. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  115. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  116. package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  117. package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  118. package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  119. package/dist/web/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  120. package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
  121. package/dist/web/standalone/.next/server/app/_not-found.rsc +2 -2
  122. package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  123. package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  124. package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  125. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  126. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  127. package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  128. package/dist/web/standalone/.next/server/app/api/boot/route_client-reference-manifest.js +1 -1
  129. package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route_client-reference-manifest.js +1 -1
  130. package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route_client-reference-manifest.js +1 -1
  131. package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route_client-reference-manifest.js +1 -1
  132. package/dist/web/standalone/.next/server/app/api/browse-directories/route_client-reference-manifest.js +1 -1
  133. package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
  134. package/dist/web/standalone/.next/server/app/api/captures/route_client-reference-manifest.js +1 -1
  135. package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
  136. package/dist/web/standalone/.next/server/app/api/cleanup/route_client-reference-manifest.js +1 -1
  137. package/dist/web/standalone/.next/server/app/api/dev-mode/route_client-reference-manifest.js +1 -1
  138. package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
  139. package/dist/web/standalone/.next/server/app/api/doctor/route_client-reference-manifest.js +1 -1
  140. package/dist/web/standalone/.next/server/app/api/experimental/route_client-reference-manifest.js +1 -1
  141. package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
  142. package/dist/web/standalone/.next/server/app/api/export-data/route_client-reference-manifest.js +1 -1
  143. package/dist/web/standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
  144. package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
  145. package/dist/web/standalone/.next/server/app/api/forensics/route_client-reference-manifest.js +1 -1
  146. package/dist/web/standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
  147. package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
  148. package/dist/web/standalone/.next/server/app/api/history/route_client-reference-manifest.js +1 -1
  149. package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
  150. package/dist/web/standalone/.next/server/app/api/hooks/route_client-reference-manifest.js +1 -1
  151. package/dist/web/standalone/.next/server/app/api/inspect/route_client-reference-manifest.js +1 -1
  152. package/dist/web/standalone/.next/server/app/api/knowledge/route_client-reference-manifest.js +1 -1
  153. package/dist/web/standalone/.next/server/app/api/live-state/route_client-reference-manifest.js +1 -1
  154. package/dist/web/standalone/.next/server/app/api/onboarding/route_client-reference-manifest.js +1 -1
  155. package/dist/web/standalone/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
  156. package/dist/web/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  157. package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
  158. package/dist/web/standalone/.next/server/app/api/recovery/route_client-reference-manifest.js +1 -1
  159. package/dist/web/standalone/.next/server/app/api/remote-questions/route_client-reference-manifest.js +1 -1
  160. package/dist/web/standalone/.next/server/app/api/session/browser/route_client-reference-manifest.js +1 -1
  161. package/dist/web/standalone/.next/server/app/api/session/command/route_client-reference-manifest.js +1 -1
  162. package/dist/web/standalone/.next/server/app/api/session/events/route_client-reference-manifest.js +1 -1
  163. package/dist/web/standalone/.next/server/app/api/session/manage/route_client-reference-manifest.js +1 -1
  164. package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
  165. package/dist/web/standalone/.next/server/app/api/settings-data/route_client-reference-manifest.js +1 -1
  166. package/dist/web/standalone/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  167. package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
  168. package/dist/web/standalone/.next/server/app/api/skill-health/route_client-reference-manifest.js +1 -1
  169. package/dist/web/standalone/.next/server/app/api/steer/route_client-reference-manifest.js +1 -1
  170. package/dist/web/standalone/.next/server/app/api/switch-root/route_client-reference-manifest.js +1 -1
  171. package/dist/web/standalone/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
  172. package/dist/web/standalone/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
  173. package/dist/web/standalone/.next/server/app/api/terminal/sessions/route_client-reference-manifest.js +1 -1
  174. package/dist/web/standalone/.next/server/app/api/terminal/stream/route_client-reference-manifest.js +1 -1
  175. package/dist/web/standalone/.next/server/app/api/terminal/upload/route_client-reference-manifest.js +1 -1
  176. package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
  177. package/dist/web/standalone/.next/server/app/api/undo/route_client-reference-manifest.js +1 -1
  178. package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
  179. package/dist/web/standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  180. package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
  181. package/dist/web/standalone/.next/server/app/api/visualizer/route_client-reference-manifest.js +1 -1
  182. package/dist/web/standalone/.next/server/app/index.html +1 -1
  183. package/dist/web/standalone/.next/server/app/index.rsc +2 -2
  184. package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  185. package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +2 -2
  186. package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  187. package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
  188. package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  189. package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  190. package/dist/web/standalone/.next/server/app-paths-manifest.json +17 -17
  191. package/dist/web/standalone/.next/server/chunks/2229.js +2 -2
  192. package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
  193. package/dist/web/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
  194. package/dist/web/standalone/.next/server/pages/404.html +1 -1
  195. package/dist/web/standalone/.next/server/pages/500.html +2 -2
  196. package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
  197. package/dist/web/standalone/.next/static/chunks/6502.8b732f67a11b11b4.js +9 -0
  198. package/dist/web/standalone/.next/static/chunks/{webpack-a1c1e452c6b32d04.js → webpack-61d3afac6d0f0ce7.js} +1 -1
  199. package/dist/web/standalone/.next/static/css/a58ef8a151aa0493.css +1 -0
  200. package/dist/web/standalone/server.js +1 -1
  201. package/dist/web-mode.js +1 -2
  202. package/package.json +2 -2
  203. package/packages/native/dist/ast/index.js +5 -9
  204. package/packages/native/dist/ast/types.js +1 -2
  205. package/packages/native/dist/clipboard/index.js +7 -12
  206. package/packages/native/dist/clipboard/types.js +1 -2
  207. package/packages/native/dist/diff/index.js +7 -12
  208. package/packages/native/dist/diff/types.js +1 -2
  209. package/packages/native/dist/fd/index.js +3 -6
  210. package/packages/native/dist/fd/types.js +1 -2
  211. package/packages/native/dist/glob/index.js +5 -9
  212. package/packages/native/dist/glob/types.js +1 -2
  213. package/packages/native/dist/grep/index.js +5 -9
  214. package/packages/native/dist/grep/types.js +1 -2
  215. package/packages/native/dist/gsd-parser/index.js +11 -18
  216. package/packages/native/dist/gsd-parser/types.js +1 -2
  217. package/packages/native/dist/highlight/index.js +7 -12
  218. package/packages/native/dist/highlight/types.js +1 -2
  219. package/packages/native/dist/html/index.js +3 -6
  220. package/packages/native/dist/html/types.js +1 -2
  221. package/packages/native/dist/image/index.js +5 -10
  222. package/packages/native/dist/image/types.js +4 -7
  223. package/packages/native/dist/index.js +17 -70
  224. package/packages/native/dist/json-parse/index.js +8 -13
  225. package/packages/native/dist/native.js +10 -47
  226. package/packages/native/dist/ps/index.js +9 -15
  227. package/packages/native/dist/ps/types.js +1 -2
  228. package/packages/native/dist/stream-process/index.js +7 -12
  229. package/packages/native/dist/text/index.js +14 -24
  230. package/packages/native/dist/text/types.js +2 -5
  231. package/packages/native/dist/truncate/index.js +7 -12
  232. package/packages/native/dist/ttsr/index.js +7 -12
  233. package/packages/native/dist/ttsr/types.js +1 -2
  234. package/packages/native/dist/xxhash/index.js +5 -9
  235. package/packages/native/package.json +19 -19
  236. package/packages/native/src/native.ts +8 -9
  237. package/packages/pi-agent-core/dist/agent-loop.js +2 -3
  238. package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
  239. package/packages/pi-agent-core/dist/proxy.d.ts +1 -1
  240. package/packages/pi-agent-core/dist/proxy.d.ts.map +1 -1
  241. package/packages/pi-agent-core/dist/proxy.js.map +1 -1
  242. package/packages/pi-agent-core/src/agent-loop.ts +2 -3
  243. package/packages/pi-agent-core/src/proxy.ts +1 -1
  244. package/packages/pi-ai/dist/env-api-keys.js +0 -1
  245. package/packages/pi-ai/dist/env-api-keys.js.map +1 -1
  246. package/packages/pi-ai/dist/index.d.ts +0 -1
  247. package/packages/pi-ai/dist/index.d.ts.map +1 -1
  248. package/packages/pi-ai/dist/index.js +0 -1
  249. package/packages/pi-ai/dist/index.js.map +1 -1
  250. package/packages/pi-ai/dist/providers/anthropic-shared.d.ts.map +1 -1
  251. package/packages/pi-ai/dist/providers/anthropic-shared.js +2 -19
  252. package/packages/pi-ai/dist/providers/anthropic-shared.js.map +1 -1
  253. package/packages/pi-ai/dist/types.d.ts +3 -3
  254. package/packages/pi-ai/dist/types.d.ts.map +1 -1
  255. package/packages/pi-ai/dist/types.js.map +1 -1
  256. package/packages/pi-ai/dist/utils/json-parse.d.ts +0 -3
  257. package/packages/pi-ai/dist/utils/json-parse.d.ts.map +1 -1
  258. package/packages/pi-ai/dist/utils/json-parse.js +1 -24
  259. package/packages/pi-ai/dist/utils/json-parse.js.map +1 -1
  260. package/packages/pi-ai/src/env-api-keys.ts +0 -1
  261. package/packages/pi-ai/src/index.ts +0 -1
  262. package/packages/pi-ai/src/providers/anthropic-shared.ts +2 -17
  263. package/packages/pi-ai/src/types.ts +2 -3
  264. package/packages/pi-ai/src/utils/json-parse.ts +1 -28
  265. package/packages/pi-coding-agent/dist/core/agent-session.d.ts +0 -4
  266. package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
  267. package/packages/pi-coding-agent/dist/core/agent-session.js +0 -31
  268. package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
  269. package/packages/pi-coding-agent/dist/core/compaction/compaction.d.ts +1 -17
  270. package/packages/pi-coding-agent/dist/core/compaction/compaction.d.ts.map +1 -1
  271. package/packages/pi-coding-agent/dist/core/compaction/compaction.js +2 -62
  272. package/packages/pi-coding-agent/dist/core/compaction/compaction.js.map +1 -1
  273. package/packages/pi-coding-agent/dist/core/exec.d.ts.map +1 -1
  274. package/packages/pi-coding-agent/dist/core/exec.js +1 -3
  275. package/packages/pi-coding-agent/dist/core/exec.js.map +1 -1
  276. package/packages/pi-coding-agent/dist/core/extensions/index.d.ts +0 -4
  277. package/packages/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
  278. package/packages/pi-coding-agent/dist/core/extensions/index.js +0 -2
  279. package/packages/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
  280. package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts +0 -5
  281. package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
  282. package/packages/pi-coding-agent/dist/core/extensions/loader.js +0 -5
  283. package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
  284. package/packages/pi-coding-agent/dist/core/index.d.ts +1 -1
  285. package/packages/pi-coding-agent/dist/core/index.d.ts.map +1 -1
  286. package/packages/pi-coding-agent/dist/core/index.js +1 -1
  287. package/packages/pi-coding-agent/dist/core/index.js.map +1 -1
  288. package/packages/pi-coding-agent/dist/core/lsp/index.d.ts.map +1 -1
  289. package/packages/pi-coding-agent/dist/core/lsp/index.js +0 -3
  290. package/packages/pi-coding-agent/dist/core/lsp/index.js.map +1 -1
  291. package/packages/pi-coding-agent/dist/core/lsp/lspmux.d.ts.map +1 -1
  292. package/packages/pi-coding-agent/dist/core/lsp/lspmux.js +0 -3
  293. package/packages/pi-coding-agent/dist/core/lsp/lspmux.js.map +1 -1
  294. package/packages/pi-coding-agent/dist/core/messages.d.ts.map +1 -1
  295. package/packages/pi-coding-agent/dist/core/messages.js +2 -31
  296. package/packages/pi-coding-agent/dist/core/messages.js.map +1 -1
  297. package/packages/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
  298. package/packages/pi-coding-agent/dist/core/model-resolver.js +0 -1
  299. package/packages/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
  300. package/packages/pi-coding-agent/dist/core/resource-loader.d.ts +0 -10
  301. package/packages/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
  302. package/packages/pi-coding-agent/dist/core/resource-loader.js +1 -12
  303. package/packages/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
  304. package/packages/pi-coding-agent/dist/core/retry-handler.d.ts +0 -6
  305. package/packages/pi-coding-agent/dist/core/retry-handler.d.ts.map +1 -1
  306. package/packages/pi-coding-agent/dist/core/retry-handler.js +1 -48
  307. package/packages/pi-coding-agent/dist/core/retry-handler.js.map +1 -1
  308. package/packages/pi-coding-agent/dist/core/tools/hashline-read.d.ts.map +1 -1
  309. package/packages/pi-coding-agent/dist/core/tools/hashline-read.js +3 -10
  310. package/packages/pi-coding-agent/dist/core/tools/hashline-read.js.map +1 -1
  311. package/packages/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
  312. package/packages/pi-coding-agent/dist/core/tools/read.js +4 -13
  313. package/packages/pi-coding-agent/dist/core/tools/read.js.map +1 -1
  314. package/packages/pi-coding-agent/dist/index.d.ts +2 -2
  315. package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
  316. package/packages/pi-coding-agent/dist/index.js +1 -1
  317. package/packages/pi-coding-agent/dist/index.js.map +1 -1
  318. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
  319. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +0 -4
  320. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
  321. package/packages/pi-coding-agent/dist/modes/rpc/remote-terminal.d.ts +0 -1
  322. package/packages/pi-coding-agent/dist/modes/rpc/remote-terminal.d.ts.map +1 -1
  323. package/packages/pi-coding-agent/dist/modes/rpc/remote-terminal.js +0 -5
  324. package/packages/pi-coding-agent/dist/modes/rpc/remote-terminal.js.map +1 -1
  325. package/packages/pi-coding-agent/src/core/agent-session.ts +1 -38
  326. package/packages/pi-coding-agent/src/core/compaction/compaction.ts +1 -94
  327. package/packages/pi-coding-agent/src/core/exec.ts +1 -3
  328. package/packages/pi-coding-agent/src/core/extensions/index.ts +0 -4
  329. package/packages/pi-coding-agent/src/core/extensions/loader.ts +0 -5
  330. package/packages/pi-coding-agent/src/core/index.ts +0 -6
  331. package/packages/pi-coding-agent/src/core/lsp/index.ts +0 -3
  332. package/packages/pi-coding-agent/src/core/lsp/lspmux.ts +0 -3
  333. package/packages/pi-coding-agent/src/core/messages.ts +2 -29
  334. package/packages/pi-coding-agent/src/core/model-resolver.ts +0 -1
  335. package/packages/pi-coding-agent/src/core/resource-loader.ts +1 -20
  336. package/packages/pi-coding-agent/src/core/retry-handler.ts +1 -52
  337. package/packages/pi-coding-agent/src/core/tools/hashline-read.ts +3 -11
  338. package/packages/pi-coding-agent/src/core/tools/read.ts +4 -14
  339. package/packages/pi-coding-agent/src/index.ts +0 -6
  340. package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +0 -7
  341. package/packages/pi-coding-agent/src/modes/rpc/remote-terminal.ts +0 -6
  342. package/packages/pi-tui/dist/terminal.d.ts +0 -2
  343. package/packages/pi-tui/dist/terminal.d.ts.map +1 -1
  344. package/packages/pi-tui/dist/terminal.js +0 -9
  345. package/packages/pi-tui/dist/terminal.js.map +1 -1
  346. package/packages/pi-tui/dist/tui.d.ts.map +1 -1
  347. package/packages/pi-tui/dist/tui.js +0 -9
  348. package/packages/pi-tui/dist/tui.js.map +1 -1
  349. package/packages/pi-tui/src/terminal.ts +0 -14
  350. package/packages/pi-tui/src/tui.ts +0 -8
  351. package/scripts/ensure-workspace-builds.cjs +14 -45
  352. package/src/resources/agents/researcher.md +1 -1
  353. package/src/resources/extensions/ask-user-questions.ts +3 -21
  354. package/src/resources/extensions/async-jobs/extension-manifest.json +1 -1
  355. package/src/resources/extensions/bg-shell/extension-manifest.json +1 -1
  356. package/src/resources/extensions/browser-tools/extension-manifest.json +1 -1
  357. package/src/resources/extensions/claude-code-cli/partial-builder.ts +6 -13
  358. package/src/resources/extensions/claude-code-cli/stream-adapter.ts +35 -63
  359. package/src/resources/extensions/claude-code-cli/tests/partial-builder.test.ts +0 -28
  360. package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +1 -108
  361. package/src/resources/extensions/context7/extension-manifest.json +1 -1
  362. package/src/resources/extensions/get-secrets-from-user.ts +5 -8
  363. package/src/resources/extensions/google-search/extension-manifest.json +1 -1
  364. package/src/resources/extensions/google-search/index.ts +1 -2
  365. package/src/resources/extensions/gsd/auto/loop-deps.ts +0 -1
  366. package/src/resources/extensions/gsd/auto/phases.ts +34 -43
  367. package/src/resources/extensions/gsd/auto-artifact-paths.ts +2 -2
  368. package/src/resources/extensions/gsd/auto-dashboard.ts +19 -37
  369. package/src/resources/extensions/gsd/auto-dispatch.ts +2 -18
  370. package/src/resources/extensions/gsd/auto-model-selection.ts +5 -26
  371. package/src/resources/extensions/gsd/auto-post-unit.ts +4 -18
  372. package/src/resources/extensions/gsd/auto-prompts.ts +1 -1
  373. package/src/resources/extensions/gsd/auto-recovery.ts +5 -12
  374. package/src/resources/extensions/gsd/auto-start.ts +26 -35
  375. package/src/resources/extensions/gsd/auto-worktree.ts +9 -190
  376. package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +0 -31
  377. package/src/resources/extensions/gsd/bootstrap/db-tools.ts +8 -85
  378. package/src/resources/extensions/gsd/bootstrap/dynamic-tools.ts +1 -38
  379. package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +19 -31
  380. package/src/resources/extensions/gsd/bootstrap/system-context.ts +11 -50
  381. package/src/resources/extensions/gsd/bootstrap/write-gate.ts +0 -75
  382. package/src/resources/extensions/gsd/captures.ts +3 -63
  383. package/src/resources/extensions/gsd/db-writer.ts +7 -140
  384. package/src/resources/extensions/gsd/doctor-git-checks.ts +0 -26
  385. package/src/resources/extensions/gsd/doctor-providers.ts +1 -2
  386. package/src/resources/extensions/gsd/doctor-runtime-checks.ts +4 -5
  387. package/src/resources/extensions/gsd/doctor.ts +1 -3
  388. package/src/resources/extensions/gsd/error-classifier.ts +11 -14
  389. package/src/resources/extensions/gsd/extension-manifest.json +1 -16
  390. package/src/resources/extensions/gsd/forensics.ts +20 -144
  391. package/src/resources/extensions/gsd/git-service.ts +3 -26
  392. package/src/resources/extensions/gsd/gitignore.ts +0 -33
  393. package/src/resources/extensions/gsd/gsd-db.ts +7 -43
  394. package/src/resources/extensions/gsd/guided-flow.ts +45 -114
  395. package/src/resources/extensions/gsd/health-widget-core.ts +0 -34
  396. package/src/resources/extensions/gsd/health-widget.ts +0 -17
  397. package/src/resources/extensions/gsd/index.ts +0 -1
  398. package/src/resources/extensions/gsd/memory-extractor.ts +0 -8
  399. package/src/resources/extensions/gsd/migrate-external.ts +1 -9
  400. package/src/resources/extensions/gsd/model-cost-table.ts +0 -19
  401. package/src/resources/extensions/gsd/model-router.ts +1 -35
  402. package/src/resources/extensions/gsd/native-git-bridge.ts +0 -17
  403. package/src/resources/extensions/gsd/notifications.ts +0 -16
  404. package/src/resources/extensions/gsd/parallel-eligibility.ts +2 -15
  405. package/src/resources/extensions/gsd/parallel-merge.ts +4 -87
  406. package/src/resources/extensions/gsd/parsers-legacy.ts +3 -22
  407. package/src/resources/extensions/gsd/paths.ts +0 -42
  408. package/src/resources/extensions/gsd/preferences-models.ts +1 -14
  409. package/src/resources/extensions/gsd/preferences-types.ts +1 -2
  410. package/src/resources/extensions/gsd/preferences.ts +15 -13
  411. package/src/resources/extensions/gsd/prompt-loader.ts +1 -4
  412. package/src/resources/extensions/gsd/prompts/complete-milestone.md +1 -1
  413. package/src/resources/extensions/gsd/prompts/complete-slice.md +2 -4
  414. package/src/resources/extensions/gsd/prompts/discuss-headless.md +1 -1
  415. package/src/resources/extensions/gsd/prompts/discuss.md +1 -1
  416. package/src/resources/extensions/gsd/prompts/execute-task.md +1 -3
  417. package/src/resources/extensions/gsd/prompts/forensics.md +2 -2
  418. package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +1 -1
  419. package/src/resources/extensions/gsd/prompts/guided-discuss-slice.md +1 -1
  420. package/src/resources/extensions/gsd/prompts/plan-slice.md +0 -2
  421. package/src/resources/extensions/gsd/prompts/rethink.md +1 -1
  422. package/src/resources/extensions/gsd/prompts/triage-captures.md +0 -1
  423. package/src/resources/extensions/gsd/repo-identity.ts +11 -186
  424. package/src/resources/extensions/gsd/rethink.ts +0 -6
  425. package/src/resources/extensions/gsd/roadmap-slices.ts +4 -5
  426. package/src/resources/extensions/gsd/state.ts +32 -84
  427. package/src/resources/extensions/gsd/tests/auto-loop.test.ts +0 -29
  428. package/src/resources/extensions/gsd/tests/auto-model-selection.test.ts +1 -71
  429. package/src/resources/extensions/gsd/tests/captures.test.ts +0 -103
  430. package/src/resources/extensions/gsd/tests/complete-milestone.test.ts +0 -27
  431. package/src/resources/extensions/gsd/tests/complete-slice.test.ts +0 -21
  432. package/src/resources/extensions/gsd/tests/db-writer.test.ts +12 -7
  433. package/src/resources/extensions/gsd/tests/derive-state-db.test.ts +5 -78
  434. package/src/resources/extensions/gsd/tests/derive-state.test.ts +0 -29
  435. package/src/resources/extensions/gsd/tests/discuss-queued-milestones.test.ts +0 -40
  436. package/src/resources/extensions/gsd/tests/dist-redirect.mjs +1 -20
  437. package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +0 -117
  438. package/src/resources/extensions/gsd/tests/empty-db-reconciliation.test.ts +79 -0
  439. package/src/resources/extensions/gsd/tests/forensics-dedup.test.ts +0 -31
  440. package/src/resources/extensions/gsd/tests/gsd-tools.test.ts +12 -125
  441. package/src/resources/extensions/gsd/tests/health-widget.test.ts +0 -67
  442. package/src/resources/extensions/gsd/tests/integration/auto-recovery.test.ts +1 -111
  443. package/src/resources/extensions/gsd/tests/integration/auto-worktree-milestone-merge.test.ts +0 -101
  444. package/src/resources/extensions/gsd/tests/integration/auto-worktree.test.ts +0 -59
  445. package/src/resources/extensions/gsd/tests/integration/parallel-merge.test.ts +0 -110
  446. package/src/resources/extensions/gsd/tests/integration/run-uat.test.ts +1 -1
  447. package/src/resources/extensions/gsd/tests/memory-extractor.test.ts +2 -85
  448. package/src/resources/extensions/gsd/tests/model-cost-table.test.ts +0 -34
  449. package/src/resources/extensions/gsd/tests/model-router.test.ts +3 -68
  450. package/src/resources/extensions/gsd/tests/model-unittype-mapping.test.ts +0 -28
  451. package/src/resources/extensions/gsd/tests/notifications.test.ts +0 -45
  452. package/src/resources/extensions/gsd/tests/plan-milestone.test.ts +1 -33
  453. package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +0 -29
  454. package/src/resources/extensions/gsd/tests/provider-errors.test.ts +0 -38
  455. package/src/resources/extensions/gsd/tests/reassess-handler.test.ts +0 -117
  456. package/src/resources/extensions/gsd/tests/roadmap-slices.test.ts +0 -97
  457. package/src/resources/extensions/gsd/tests/secure-env-collect.test.ts +0 -134
  458. package/src/resources/extensions/gsd/tests/tool-naming.test.ts +1 -2
  459. package/src/resources/extensions/gsd/tests/triage-resolution.test.ts +0 -8
  460. package/src/resources/extensions/gsd/tests/unit-ownership.test.ts +17 -100
  461. package/src/resources/extensions/gsd/tests/validate-milestone-write-order.test.ts +1 -4
  462. package/src/resources/extensions/gsd/tests/workflow-logger.test.ts +0 -48
  463. package/src/resources/extensions/gsd/tests/workflow-manifest.test.ts +0 -92
  464. package/src/resources/extensions/gsd/tests/workflow-projections.test.ts +2 -4
  465. package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +1 -48
  466. package/src/resources/extensions/gsd/tests/worktree-sync-milestones.test.ts +5 -29
  467. package/src/resources/extensions/gsd/tools/complete-task.ts +74 -36
  468. package/src/resources/extensions/gsd/tools/plan-milestone.ts +1 -13
  469. package/src/resources/extensions/gsd/tools/reassess-roadmap.ts +0 -36
  470. package/src/resources/extensions/gsd/tools/validate-milestone.ts +2 -20
  471. package/src/resources/extensions/gsd/triage-resolution.ts +6 -23
  472. package/src/resources/extensions/gsd/types.ts +2 -4
  473. package/src/resources/extensions/gsd/undo.ts +2 -2
  474. package/src/resources/extensions/gsd/unit-ownership.ts +35 -206
  475. package/src/resources/extensions/gsd/verdict-parser.ts +6 -21
  476. package/src/resources/extensions/gsd/workflow-logger.ts +1 -3
  477. package/src/resources/extensions/gsd/workflow-manifest.ts +5 -22
  478. package/src/resources/extensions/gsd/workflow-projections.ts +64 -97
  479. package/src/resources/extensions/gsd/workflow-reconcile.ts +10 -39
  480. package/src/resources/extensions/gsd/workspace-index.ts +0 -30
  481. package/src/resources/extensions/gsd/worktree-manager.ts +1 -120
  482. package/src/resources/extensions/gsd/worktree-resolver.ts +3 -22
  483. package/src/resources/extensions/mcp-client/index.ts +7 -13
  484. package/src/resources/extensions/search-the-web/extension-manifest.json +1 -1
  485. package/src/resources/extensions/shared/interview-ui.ts +1 -12
  486. package/src/resources/skills/create-gsd-extension/SKILL.md +3 -5
  487. package/src/resources/skills/create-gsd-extension/references/key-rules-gotchas.md +4 -5
  488. package/src/resources/skills/create-gsd-extension/workflows/add-capability.md +2 -2
  489. package/src/resources/skills/create-gsd-extension/workflows/create-extension.md +4 -4
  490. package/src/resources/skills/create-gsd-extension/workflows/debug-extension.md +3 -5
  491. package/dist/resources/extensions/gsd/milestone-validation-gates.js +0 -45
  492. package/dist/resources/extensions/ollama/index.js +0 -112
  493. package/dist/resources/extensions/ollama/model-capabilities.js +0 -115
  494. package/dist/resources/extensions/ollama/ollama-client.js +0 -168
  495. package/dist/resources/extensions/ollama/ollama-commands.js +0 -194
  496. package/dist/resources/extensions/ollama/ollama-discovery.js +0 -69
  497. package/dist/resources/extensions/ollama/ollama-tool.js +0 -184
  498. package/dist/resources/extensions/ollama/types.js +0 -2
  499. package/dist/startup-model-validation.d.ts +0 -39
  500. package/dist/startup-model-validation.js +0 -50
  501. package/dist/web/standalone/.next/static/chunks/6502.7593d7797a4b3999.js +0 -9
  502. package/dist/web/standalone/.next/static/css/f6e8833d46e738d8.css +0 -1
  503. package/packages/native/src/__tests__/module-compat.test.mjs +0 -91
  504. package/packages/pi-agent-core/src/agent-loop.test.ts +0 -45
  505. package/packages/pi-ai/dist/providers/anthropic-shared.test.d.ts +0 -2
  506. package/packages/pi-ai/dist/providers/anthropic-shared.test.d.ts.map +0 -1
  507. package/packages/pi-ai/dist/providers/anthropic-shared.test.js +0 -25
  508. package/packages/pi-ai/dist/providers/anthropic-shared.test.js.map +0 -1
  509. package/packages/pi-ai/dist/utils/repair-tool-json.d.ts +0 -37
  510. package/packages/pi-ai/dist/utils/repair-tool-json.d.ts.map +0 -1
  511. package/packages/pi-ai/dist/utils/repair-tool-json.js +0 -75
  512. package/packages/pi-ai/dist/utils/repair-tool-json.js.map +0 -1
  513. package/packages/pi-ai/dist/utils/tests/repair-tool-json.test.d.ts +0 -2
  514. package/packages/pi-ai/dist/utils/tests/repair-tool-json.test.d.ts.map +0 -1
  515. package/packages/pi-ai/dist/utils/tests/repair-tool-json.test.js +0 -73
  516. package/packages/pi-ai/dist/utils/tests/repair-tool-json.test.js.map +0 -1
  517. package/packages/pi-ai/src/providers/anthropic-shared.test.ts +0 -29
  518. package/packages/pi-ai/src/utils/repair-tool-json.ts +0 -88
  519. package/packages/pi-ai/src/utils/tests/repair-tool-json.test.ts +0 -102
  520. package/packages/pi-coding-agent/dist/core/compaction/compaction.test.d.ts +0 -6
  521. package/packages/pi-coding-agent/dist/core/compaction/compaction.test.d.ts.map +0 -1
  522. package/packages/pi-coding-agent/dist/core/compaction/compaction.test.js +0 -176
  523. package/packages/pi-coding-agent/dist/core/compaction/compaction.test.js.map +0 -1
  524. package/packages/pi-coding-agent/dist/core/extensions/extension-manifest.d.ts +0 -28
  525. package/packages/pi-coding-agent/dist/core/extensions/extension-manifest.d.ts.map +0 -1
  526. package/packages/pi-coding-agent/dist/core/extensions/extension-manifest.js +0 -37
  527. package/packages/pi-coding-agent/dist/core/extensions/extension-manifest.js.map +0 -1
  528. package/packages/pi-coding-agent/dist/core/extensions/extension-manifest.test.d.ts +0 -2
  529. package/packages/pi-coding-agent/dist/core/extensions/extension-manifest.test.d.ts.map +0 -1
  530. package/packages/pi-coding-agent/dist/core/extensions/extension-manifest.test.js +0 -63
  531. package/packages/pi-coding-agent/dist/core/extensions/extension-manifest.test.js.map +0 -1
  532. package/packages/pi-coding-agent/dist/core/extensions/extension-sort.d.ts +0 -19
  533. package/packages/pi-coding-agent/dist/core/extensions/extension-sort.d.ts.map +0 -1
  534. package/packages/pi-coding-agent/dist/core/extensions/extension-sort.js +0 -115
  535. package/packages/pi-coding-agent/dist/core/extensions/extension-sort.js.map +0 -1
  536. package/packages/pi-coding-agent/dist/core/extensions/extension-sort.test.d.ts +0 -2
  537. package/packages/pi-coding-agent/dist/core/extensions/extension-sort.test.d.ts.map +0 -1
  538. package/packages/pi-coding-agent/dist/core/extensions/extension-sort.test.js +0 -109
  539. package/packages/pi-coding-agent/dist/core/extensions/extension-sort.test.js.map +0 -1
  540. package/packages/pi-coding-agent/dist/core/image-overflow-recovery.d.ts +0 -44
  541. package/packages/pi-coding-agent/dist/core/image-overflow-recovery.d.ts.map +0 -1
  542. package/packages/pi-coding-agent/dist/core/image-overflow-recovery.js +0 -97
  543. package/packages/pi-coding-agent/dist/core/image-overflow-recovery.js.map +0 -1
  544. package/packages/pi-coding-agent/dist/core/image-overflow-recovery.test.d.ts +0 -2
  545. package/packages/pi-coding-agent/dist/core/image-overflow-recovery.test.d.ts.map +0 -1
  546. package/packages/pi-coding-agent/dist/core/image-overflow-recovery.test.js +0 -181
  547. package/packages/pi-coding-agent/dist/core/image-overflow-recovery.test.js.map +0 -1
  548. package/packages/pi-coding-agent/dist/core/messages.test.d.ts +0 -9
  549. package/packages/pi-coding-agent/dist/core/messages.test.d.ts.map +0 -1
  550. package/packages/pi-coding-agent/dist/core/messages.test.js +0 -86
  551. package/packages/pi-coding-agent/dist/core/messages.test.js.map +0 -1
  552. package/packages/pi-coding-agent/dist/core/retry-handler.test.d.ts +0 -9
  553. package/packages/pi-coding-agent/dist/core/retry-handler.test.d.ts.map +0 -1
  554. package/packages/pi-coding-agent/dist/core/retry-handler.test.js +0 -193
  555. package/packages/pi-coding-agent/dist/core/retry-handler.test.js.map +0 -1
  556. package/packages/pi-coding-agent/dist/core/tools/spawn-shell-windows.test.d.ts +0 -16
  557. package/packages/pi-coding-agent/dist/core/tools/spawn-shell-windows.test.d.ts.map +0 -1
  558. package/packages/pi-coding-agent/dist/core/tools/spawn-shell-windows.test.js +0 -80
  559. package/packages/pi-coding-agent/dist/core/tools/spawn-shell-windows.test.js.map +0 -1
  560. package/packages/pi-coding-agent/src/core/compaction/compaction.test.ts +0 -236
  561. package/packages/pi-coding-agent/src/core/extensions/extension-manifest.test.ts +0 -77
  562. package/packages/pi-coding-agent/src/core/extensions/extension-manifest.ts +0 -62
  563. package/packages/pi-coding-agent/src/core/extensions/extension-sort.test.ts +0 -134
  564. package/packages/pi-coding-agent/src/core/extensions/extension-sort.ts +0 -137
  565. package/packages/pi-coding-agent/src/core/image-overflow-recovery.test.ts +0 -228
  566. package/packages/pi-coding-agent/src/core/image-overflow-recovery.ts +0 -118
  567. package/packages/pi-coding-agent/src/core/messages.test.ts +0 -114
  568. package/packages/pi-coding-agent/src/core/retry-handler.test.ts +0 -255
  569. package/packages/pi-coding-agent/src/core/tools/spawn-shell-windows.test.ts +0 -92
  570. package/src/resources/extensions/gsd/milestone-validation-gates.ts +0 -56
  571. package/src/resources/extensions/gsd/tests/auto-mode-interactive-guard.test.ts +0 -71
  572. package/src/resources/extensions/gsd/tests/cli-provider-rate-limit.test.ts +0 -47
  573. package/src/resources/extensions/gsd/tests/completion-hierarchy-guards.test.ts +0 -192
  574. package/src/resources/extensions/gsd/tests/db-path-worktree-symlink.test.ts +0 -131
  575. package/src/resources/extensions/gsd/tests/discord-invite-links.test.ts +0 -47
  576. package/src/resources/extensions/gsd/tests/discuss-empty-db-fallback.test.ts +0 -127
  577. package/src/resources/extensions/gsd/tests/dynamic-routing-default.test.ts +0 -20
  578. package/src/resources/extensions/gsd/tests/empty-content-abort-loop.test.ts +0 -74
  579. package/src/resources/extensions/gsd/tests/event-replay-idempotency.test.ts +0 -140
  580. package/src/resources/extensions/gsd/tests/forensics-context-persist.test.ts +0 -129
  581. package/src/resources/extensions/gsd/tests/forensics-db-completion.test.ts +0 -96
  582. package/src/resources/extensions/gsd/tests/gsdroot-worktree-detection.test.ts +0 -164
  583. package/src/resources/extensions/gsd/tests/guided-flow-dynamic-routing.test.ts +0 -135
  584. package/src/resources/extensions/gsd/tests/guided-flow-session-isolation.test.ts +0 -97
  585. package/src/resources/extensions/gsd/tests/hook-key-parsing.test.ts +0 -107
  586. package/src/resources/extensions/gsd/tests/integration/doctor-false-positives.test.ts +0 -243
  587. package/src/resources/extensions/gsd/tests/integration/gitignore-staging-2570.test.ts +0 -150
  588. package/src/resources/extensions/gsd/tests/integration/state-machine-live-validation.test.ts +0 -959
  589. package/src/resources/extensions/gsd/tests/migrate-external-worktree.test.ts +0 -105
  590. package/src/resources/extensions/gsd/tests/milestone-status-authoritative.test.ts +0 -116
  591. package/src/resources/extensions/gsd/tests/parallel-commit-scope.test.ts +0 -159
  592. package/src/resources/extensions/gsd/tests/parallel-eligibility-ghost.test.ts +0 -150
  593. package/src/resources/extensions/gsd/tests/plan-milestone-title.test.ts +0 -70
  594. package/src/resources/extensions/gsd/tests/project-relocation-recovery.test.ts +0 -297
  595. package/src/resources/extensions/gsd/tests/prompt-loader-replacement.test.ts +0 -178
  596. package/src/resources/extensions/gsd/tests/prompt-tool-names.test.ts +0 -69
  597. package/src/resources/extensions/gsd/tests/queue-execution-guard.test.ts +0 -157
  598. package/src/resources/extensions/gsd/tests/quick-turn-end-cleanup.test.ts +0 -90
  599. package/src/resources/extensions/gsd/tests/reconciliation-edge-cases.test.ts +0 -162
  600. package/src/resources/extensions/gsd/tests/slice-disk-reconcile.test.ts +0 -233
  601. package/src/resources/extensions/gsd/tests/stash-queued-context-files.test.ts +0 -305
  602. package/src/resources/extensions/gsd/tests/state-corruption-2945.test.ts +0 -405
  603. package/src/resources/extensions/gsd/tests/state-derivation-parity.test.ts +0 -257
  604. package/src/resources/extensions/gsd/tests/state-machine-full-walkthrough.test.ts +0 -1628
  605. package/src/resources/extensions/gsd/tests/stop-auto-race-null-unit.test.ts +0 -106
  606. package/src/resources/extensions/gsd/tests/stuck-detection-coverage.test.ts +0 -174
  607. package/src/resources/extensions/gsd/tests/summary-render-parity.test.ts +0 -221
  608. package/src/resources/extensions/gsd/tests/uat-stuck-loop-orphaned-worktree.test.ts +0 -289
  609. package/src/resources/extensions/gsd/tests/vacuum-recovery.test.ts +0 -154
  610. package/src/resources/extensions/gsd/tests/verdict-parser.test.ts +0 -156
  611. package/src/resources/extensions/gsd/tests/verification-operational-gate.test.ts +0 -82
  612. package/src/resources/extensions/gsd/tests/worktree-db-respawn-truncation.test.ts +0 -140
  613. package/src/resources/extensions/gsd/tests/worktree-nested-git-safety.test.ts +0 -101
  614. package/src/resources/extensions/gsd/tests/zombie-gsd-state.test.ts +0 -95
  615. package/src/resources/extensions/mcp-client/tests/server-name-spaces.test.ts +0 -55
  616. package/src/resources/extensions/ollama/index.ts +0 -130
  617. package/src/resources/extensions/ollama/model-capabilities.ts +0 -145
  618. package/src/resources/extensions/ollama/ollama-client.ts +0 -196
  619. package/src/resources/extensions/ollama/ollama-commands.ts +0 -248
  620. package/src/resources/extensions/ollama/ollama-discovery.ts +0 -106
  621. package/src/resources/extensions/ollama/ollama-tool.ts +0 -218
  622. package/src/resources/extensions/ollama/tests/model-capabilities.test.ts +0 -162
  623. package/src/resources/extensions/ollama/tests/ollama-client.test.ts +0 -38
  624. package/src/resources/extensions/ollama/tests/ollama-discovery.test.ts +0 -28
  625. package/src/resources/extensions/ollama/types.ts +0 -130
  626. package/src/resources/extensions/shared/tests/ask-user-freetext.test.ts +0 -156
  627. /package/dist/web/standalone/.next/static/{R0D4xaIPl5kg93edN7Oo0 → 5DLsjFHdSB6_a1EDQVjr7}/_buildManifest.js +0 -0
  628. /package/dist/web/standalone/.next/static/{R0D4xaIPl5kg93edN7Oo0 → 5DLsjFHdSB6_a1EDQVjr7}/_ssgManifest.js +0 -0
@@ -11,12 +11,6 @@ const MODEL_CAPABILITY_TIER = {
11
11
  "claude-3-5-haiku-latest": "light",
12
12
  "claude-3-haiku-20240307": "light",
13
13
  "gpt-4o-mini": "light",
14
- "gpt-4.1-mini": "light",
15
- "gpt-4.1-nano": "light",
16
- "gpt-5-mini": "light",
17
- "gpt-5-nano": "light",
18
- "gpt-5.1-codex-mini": "light",
19
- "gpt-5.3-codex-spark": "light",
20
14
  "gemini-2.0-flash": "light",
21
15
  "gemini-flash-2.0": "light",
22
16
  // Standard-tier models
@@ -24,25 +18,14 @@ const MODEL_CAPABILITY_TIER = {
24
18
  "claude-sonnet-4-5-20250514": "standard",
25
19
  "claude-3-5-sonnet-latest": "standard",
26
20
  "gpt-4o": "standard",
27
- "gpt-4.1": "standard",
28
- "gpt-5.1-codex-max": "standard",
29
21
  "gemini-2.5-pro": "standard",
30
22
  "deepseek-chat": "standard",
31
23
  // Heavy-tier models (most capable)
32
24
  "claude-opus-4-6": "heavy",
33
25
  "claude-3-opus-latest": "heavy",
34
26
  "gpt-4-turbo": "heavy",
35
- "gpt-5": "heavy",
36
- "gpt-5-pro": "heavy",
37
- "gpt-5.1": "heavy",
38
- "gpt-5.2": "heavy",
39
- "gpt-5.2-codex": "heavy",
40
- "gpt-5.3-codex": "heavy",
41
- "gpt-5.4": "heavy",
42
27
  "o1": "heavy",
43
28
  "o3": "heavy",
44
- "o4-mini": "heavy",
45
- "o4-mini-deep-research": "heavy",
46
29
  };
47
30
  // ─── Cost Table (per 1K input tokens, approximate USD) ───────────────────────
48
31
  // Used for cross-provider cost comparison when multiple providers offer
@@ -55,23 +38,6 @@ const MODEL_COST_PER_1K_INPUT = {
55
38
  "claude-opus-4-6": 0.015,
56
39
  "gpt-4o-mini": 0.00015,
57
40
  "gpt-4o": 0.0025,
58
- "gpt-4.1": 0.002,
59
- "gpt-4.1-mini": 0.0004,
60
- "gpt-4.1-nano": 0.0001,
61
- "gpt-5": 0.01,
62
- "gpt-5-mini": 0.0003,
63
- "gpt-5-nano": 0.0001,
64
- "gpt-5-pro": 0.015,
65
- "gpt-5.1": 0.005,
66
- "gpt-5.1-codex-max": 0.003,
67
- "gpt-5.1-codex-mini": 0.0003,
68
- "gpt-5.2": 0.005,
69
- "gpt-5.2-codex": 0.005,
70
- "gpt-5.3-codex": 0.005,
71
- "gpt-5.3-codex-spark": 0.0003,
72
- "gpt-5.4": 0.005,
73
- "o4-mini": 0.005,
74
- "o4-mini-deep-research": 0.005,
75
41
  "gemini-2.0-flash": 0.0001,
76
42
  "gemini-2.5-pro": 0.00125,
77
43
  "deepseek-chat": 0.00014,
@@ -167,7 +133,7 @@ export function escalateTier(currentTier) {
167
133
  */
168
134
  export function defaultRoutingConfig() {
169
135
  return {
170
- enabled: true,
136
+ enabled: false,
171
137
  escalate_on_failure: true,
172
138
  budget_pressure: true,
173
139
  cross_provider: true,
@@ -758,23 +758,6 @@ export function nativeResetHard(basePath) {
758
758
  }
759
759
  execSync("git reset --hard HEAD", { cwd: basePath, stdio: "pipe" });
760
760
  }
761
- /**
762
- * Get the subject line of a commit (git log -1 --format=%s <ref>).
763
- * Returns empty string if the ref doesn't exist.
764
- */
765
- export function nativeCommitSubject(basePath, ref) {
766
- try {
767
- return execFileSync("git", ["log", "-1", "--format=%s", ref], {
768
- cwd: basePath,
769
- stdio: ["ignore", "pipe", "pipe"],
770
- encoding: "utf-8",
771
- env: GIT_NO_PROMPT_ENV,
772
- }).trim();
773
- }
774
- catch {
775
- return "";
776
- }
777
- }
778
761
  /**
779
762
  * Delete a branch.
780
763
  * Native: libgit2 branch delete.
@@ -7,12 +7,7 @@ import { CmuxClient, emitOsc777Notification, resolveCmuxConfig } from "../cmux/i
7
7
  * Send a native desktop notification. Non-blocking, non-fatal.
8
8
  * macOS: osascript, Linux: notify-send, Windows: skipped.
9
9
  */
10
- export function sendDesktopNotification(title, message, level = "info", kind = "complete", projectName) {
11
- // When a projectName is provided and the title is the default "GSD",
12
- // replace it with a project-qualified title for multi-project clarity.
13
- if (projectName && title === "GSD") {
14
- title = formatNotificationTitle(projectName);
15
- }
10
+ export function sendDesktopNotification(title, message, level = "info", kind = "complete") {
16
11
  const loaded = loadEffectiveGSDPreferences()?.preferences;
17
12
  if (!shouldSendDesktopNotification(kind, loaded?.notifications))
18
13
  return;
@@ -50,16 +45,6 @@ export function shouldSendDesktopNotification(kind, preferences = loadEffectiveG
50
45
  return preferences?.on_complete ?? true;
51
46
  }
52
47
  }
53
- /**
54
- * Format a notification title that includes the project name for context.
55
- * Returns "GSD — projectName" when a project name is available, otherwise "GSD".
56
- */
57
- export function formatNotificationTitle(projectName) {
58
- const trimmed = projectName?.trim();
59
- if (trimmed)
60
- return `GSD — ${trimmed}`;
61
- return "GSD";
62
- }
63
48
  export function buildDesktopNotificationCommand(platform, title, message, level = "info") {
64
49
  const normalizedTitle = normalizeNotificationText(title);
65
50
  const normalizedMessage = normalizeNotificationText(message);
@@ -74,18 +74,7 @@ export async function analyzeParallelEligibility(basePath) {
74
74
  for (const mid of milestoneIds) {
75
75
  const entry = registryMap.get(mid);
76
76
  const title = entry?.title ?? mid;
77
- // Rule 0: milestones with no registry entry (ghost directories, unknown
78
- // state) are ineligible — we cannot determine their status or deps (#2501)
79
- if (!entry) {
80
- ineligible.push({
81
- milestoneId: mid,
82
- title,
83
- eligible: false,
84
- reason: "Milestone has no planning data — cannot determine eligibility.",
85
- });
86
- continue;
87
- }
88
- const status = entry.status;
77
+ const status = entry?.status ?? "pending";
89
78
  // Rule 1: skip complete and parked milestones
90
79
  if (status === "complete" || status === "parked") {
91
80
  ineligible.push({
@@ -97,7 +86,7 @@ export async function analyzeParallelEligibility(basePath) {
97
86
  continue;
98
87
  }
99
88
  // Rule 2: check dependency satisfaction
100
- const deps = entry.dependsOn ?? [];
89
+ const deps = entry?.dependsOn ?? [];
101
90
  const unsatisfied = deps.filter(dep => {
102
91
  const depEntry = registryMap.get(dep);
103
92
  return !depEntry || depEntry.status !== "complete";
@@ -4,9 +4,6 @@
4
4
  * Handles merging completed milestone worktrees back to main branch
5
5
  * with safety checks for parallel execution context.
6
6
  */
7
- import { existsSync, readdirSync } from "node:fs";
8
- import { join } from "node:path";
9
- import { spawnSync } from "node:child_process";
10
7
  import { loadFile } from "./files.js";
11
8
  import { resolveMilestoneFile } from "./paths.js";
12
9
  import { mergeMilestoneToMain } from "./auto-worktree.js";
@@ -14,89 +11,19 @@ import { MergeConflictError } from "./git-service.js";
14
11
  import { removeSessionStatus } from "./session-status-io.js";
15
12
  import { getErrorMessage } from "./error-utils.js";
16
13
  // ─── Merge Queue ───────────────────────────────────────────────────────────
17
- /**
18
- * Check whether a milestone is complete by querying its worktree SQLite DB.
19
- * Uses a subprocess to avoid disrupting the global DB singleton.
20
- * Returns true when milestones.status = 'complete' in the worktree's gsd.db.
21
- */
22
- export function isMilestoneCompleteInWorktreeDb(basePath, mid) {
23
- const dbPath = join(basePath, ".gsd", "worktrees", mid, ".gsd", "gsd.db");
24
- if (!existsSync(dbPath))
25
- return false;
26
- try {
27
- const result = spawnSync("sqlite3", [dbPath, `SELECT status FROM milestones WHERE id='${mid}' LIMIT 1`], { timeout: 3000, encoding: "utf-8" });
28
- return (result.stdout || "").trim() === "complete";
29
- }
30
- catch {
31
- return false;
32
- }
33
- }
34
- /**
35
- * Discover milestone IDs with status='complete' in their worktree DB,
36
- * scanning .gsd/worktrees/<MID>/.gsd/gsd.db for each worktree directory.
37
- */
38
- function discoverDbCompletedMilestones(basePath) {
39
- const completed = new Set();
40
- const worktreeDir = join(basePath, ".gsd", "worktrees");
41
- try {
42
- for (const entry of readdirSync(worktreeDir)) {
43
- if (entry.startsWith("M") && isMilestoneCompleteInWorktreeDb(basePath, entry)) {
44
- completed.add(entry);
45
- }
46
- }
47
- }
48
- catch {
49
- // worktrees dir may not exist
50
- }
51
- return completed;
52
- }
53
14
  /**
54
15
  * Determine safe merge order for completed milestones.
55
16
  * Sequential: merge in milestone ID order (M001 before M002).
56
17
  * By-completion: merge in the order milestones finished.
57
- *
58
- * When basePath is provided, also checks worktree SQLite DBs as the
59
- * source of truth — workers with stale orchestrator state (e.g. "error")
60
- * are included if their worktree DB shows status='complete'.
61
- * See: https://github.com/gsd-build/gsd-2/issues/2812
62
18
  */
63
- export function determineMergeOrder(workers, order = "sequential", basePath) {
64
- // Start with workers the orchestrator already knows are stopped
65
- const stoppedIds = new Set(workers.filter(w => w.state === "stopped").map(w => w.milestoneId));
66
- // When basePath is available, also check worktree DBs for milestones
67
- // whose orchestrator state is stale but are actually complete (#2812)
68
- const dbCompleted = basePath ? discoverDbCompletedMilestones(basePath) : new Set();
69
- // Union: milestone is mergeable if stopped OR DB-complete
70
- const mergeableIds = new Set([...stoppedIds, ...dbCompleted]);
71
- // Build the list from tracked workers + any DB-discovered milestones
72
- // not tracked by the orchestrator at all
73
- const workerMap = new Map(workers.map(w => [w.milestoneId, w]));
74
- const allMergeable = [];
75
- for (const mid of mergeableIds) {
76
- const w = workerMap.get(mid);
77
- if (w) {
78
- allMergeable.push(w);
79
- }
80
- else {
81
- // Milestone discovered from worktree DB but not in workers list
82
- allMergeable.push({
83
- milestoneId: mid,
84
- title: mid,
85
- pid: 0,
86
- process: null,
87
- worktreePath: basePath ? join(basePath, ".gsd", "worktrees", mid) : "",
88
- startedAt: 0,
89
- state: "stopped",
90
- cost: 0,
91
- });
92
- }
93
- }
19
+ export function determineMergeOrder(workers, order = "sequential") {
20
+ const completed = workers.filter(w => w.state === "stopped");
94
21
  if (order === "by-completion") {
95
- return allMergeable
22
+ return completed
96
23
  .sort((a, b) => a.startedAt - b.startedAt) // earliest first
97
24
  .map(w => w.milestoneId);
98
25
  }
99
- return allMergeable
26
+ return completed
100
27
  .sort((a, b) => a.milestoneId.localeCompare(b.milestoneId))
101
28
  .map(w => w.milestoneId);
102
29
  }
@@ -155,7 +82,7 @@ export async function mergeCompletedMilestone(basePath, milestoneId) {
155
82
  * Stops on first conflict and returns results so far.
156
83
  */
157
84
  export async function mergeAllCompleted(basePath, workers, order = "sequential") {
158
- const mergeOrder = determineMergeOrder(workers, order, basePath);
85
+ const mergeOrder = determineMergeOrder(workers, order);
159
86
  const results = [];
160
87
  for (const mid of mergeOrder) {
161
88
  const result = await mergeCompletedMilestone(basePath, mid);
@@ -165,26 +165,16 @@ function _parsePlanImpl(content) {
165
165
  const demo = extractBoldField(body, 'Demo') || '';
166
166
  const mhSection = extractSection(body, 'Must-Haves');
167
167
  const mustHaves = mhSection ? parseBullets(mhSection) : [];
168
- // Parse tasks from ## Tasks section first, then scan the full body for any
169
- // task checkboxes that were missed. Multi-task plans can interleave T01 detail
170
- // headings (## Steps, ## Must-Haves) before T02's checkbox, which causes
171
- // extractSection("Tasks") to stop at the first ## heading and miss T02+ (#3105).
172
168
  const tasksSection = extractSection(body, 'Tasks');
173
169
  const tasks = [];
174
- // Parse task entries from a set of lines, appending to `tasks`.
175
- const parseTaskLines = (lines, knownIds) => {
170
+ if (tasksSection) {
171
+ const taskLines = tasksSection.split('\n');
176
172
  let currentTask = null;
177
- for (const line of lines) {
173
+ for (const line of taskLines) {
178
174
  const cbMatch = line.match(/^-\s+\[([ xX])\]\s+\*\*([\w.]+):\s+(.+?)\*\*\s*(.*)/);
179
175
  // Heading-style: ### T01 -- Title, ### T01: Title, ### T01 — Title
180
176
  const hdMatch = !cbMatch ? line.match(/^#{2,4}\s+([\w.]+)\s*(?:--|—|:)\s*(.+)/) : null;
181
177
  if (cbMatch || hdMatch) {
182
- const taskId = cbMatch ? cbMatch[2] : hdMatch[1];
183
- // Skip tasks already found in the Tasks section
184
- if (knownIds.has(taskId)) {
185
- currentTask = null;
186
- continue;
187
- }
188
178
  if (currentTask)
189
179
  tasks.push(currentTask);
190
180
  if (cbMatch) {
@@ -239,14 +229,7 @@ function _parsePlanImpl(content) {
239
229
  }
240
230
  if (currentTask)
241
231
  tasks.push(currentTask);
242
- };
243
- if (tasksSection) {
244
- parseTaskLines(tasksSection.split('\n'), new Set());
245
232
  }
246
- // Second pass: scan the full body for task checkboxes outside ## Tasks.
247
- // This handles interleaved plans where T02+ appear after T01's detail headings.
248
- const foundIds = new Set(tasks.map(t => t.id));
249
- parseTaskLines(body.split('\n'), foundIds);
250
233
  const filesSection = extractSection(body, 'Files Likely Touched');
251
234
  const filesLikelyTouched = filesSection ? parseBullets(filesSection) : [];
252
235
  const result = { id, title, goal, demo, mustHaves, tasks, filesLikelyTouched };
@@ -289,51 +289,11 @@ export function gsdRoot(basePath) {
289
289
  gsdRootCache.set(basePath, result);
290
290
  return result;
291
291
  }
292
- /**
293
- * Detect if a path is inside a .gsd/worktrees/<name>/ structure.
294
- *
295
- * GSD auto-worktrees live at <project>/.gsd/worktrees/<milestoneId>/.
296
- * When gsdRoot() is called with such a path, we must NOT walk up to the
297
- * project root's .gsd — each worktree manages its own .gsd state (#2594).
298
- *
299
- * Matches both forward-slash and platform-native separators to handle
300
- * Windows paths (path.sep = '\\') and normalized Unix paths.
301
- */
302
- function isInsideGsdWorktree(p) {
303
- // Match /.gsd/worktrees/<name> where <name> is the final segment or
304
- // followed by a separator. The <name> segment must be non-empty.
305
- const sepFwd = "/";
306
- const sepNative = "\\";
307
- const markers = [
308
- `${sepFwd}.gsd${sepFwd}worktrees${sepFwd}`,
309
- `${sepNative}.gsd${sepNative}worktrees${sepNative}`,
310
- ];
311
- for (const marker of markers) {
312
- const idx = p.indexOf(marker);
313
- if (idx === -1)
314
- continue;
315
- // Verify there's a non-empty worktree name after the marker
316
- const afterMarker = p.slice(idx + marker.length);
317
- // The name is everything up to the next separator (or end of string)
318
- const nameEnd = afterMarker.search(/[/\\]/);
319
- const name = nameEnd === -1 ? afterMarker : afterMarker.slice(0, nameEnd);
320
- if (name.length > 0)
321
- return true;
322
- }
323
- return false;
324
- }
325
292
  function probeGsdRoot(rawBasePath) {
326
293
  // 1. Fast path — check the input path directly
327
294
  const local = join(rawBasePath, ".gsd");
328
295
  if (existsSync(local))
329
296
  return local;
330
- // 1b. Worktree guard (#2594) — if basePath is inside a .gsd/worktrees/<name>/
331
- // structure, return the worktree-local .gsd path immediately. Without this,
332
- // the git-root probe (step 2) or walk-up (step 3) escapes to the project
333
- // root's .gsd, causing ensurePreconditions() and deriveState() to read/write
334
- // state in the wrong location.
335
- if (isInsideGsdWorktree(rawBasePath))
336
- return local;
337
297
  // Resolve symlinks so path comparisons work correctly across platforms
338
298
  // (e.g. macOS /var → /private/var). Use rawBasePath as fallback if not resolvable.
339
299
  let basePath;
@@ -343,9 +303,6 @@ function probeGsdRoot(rawBasePath) {
343
303
  catch {
344
304
  basePath = rawBasePath;
345
305
  }
346
- // Also check the resolved path for the worktree pattern (macOS /tmp → /private/tmp)
347
- if (basePath !== rawBasePath && isInsideGsdWorktree(basePath))
348
- return local;
349
306
  // 2. Git root anchor — used as both probe target and walk-up boundary
350
307
  // Only walk if we're inside a git project — prevents escaping into
351
308
  // unrelated filesystem territory when running outside any repo.
@@ -53,7 +53,6 @@ export function resolveModelWithFallbacksForUnit(unitType) {
53
53
  break;
54
54
  case "complete-slice":
55
55
  case "complete-milestone":
56
- case "worktree-merge":
57
56
  case "run-uat":
58
57
  phaseConfig = m.completion;
59
58
  break;
@@ -111,18 +110,6 @@ export function getNextFallbackModel(currentModelId, modelConfig) {
111
110
  return modelsToTry[0];
112
111
  }
113
112
  }
114
- /**
115
- * Detect whether an error message indicates a transient network error
116
- * (worth retrying the same model) vs a permanent provider error
117
- * (auth failure, quota exceeded, etc. -- should fall back immediately).
118
- */
119
- export function isTransientNetworkError(errorMsg) {
120
- if (!errorMsg)
121
- return false;
122
- const hasNetworkSignal = /network|ECONNRESET|ETIMEDOUT|ECONNREFUSED|socket hang up|fetch failed|connection.*reset|dns/i.test(errorMsg);
123
- const hasPermanentSignal = /auth|unauthorized|forbidden|invalid.*key|quota|billing/i.test(errorMsg);
124
- return hasNetworkSignal && !hasPermanentSignal;
125
- }
126
113
  /**
127
114
  * Validate a model ID string.
128
115
  * Returns true if the ID looks like a valid model identifier.
@@ -286,7 +273,7 @@ export function resolveContextSelection() {
286
273
  return profile === "budget" ? "smart" : "full";
287
274
  }
288
275
  /**
289
- * Resolve the search provider preference from preferences.md.
276
+ * Resolve the search provider preference from PREFERENCES.md.
290
277
  * Returns undefined if not configured (caller falls back to existing behavior).
291
278
  */
292
279
  export function resolveSearchProviderFromPreferences() {
@@ -76,7 +76,6 @@ export const KNOWN_PREFERENCE_KEYS = new Set([
76
76
  export const KNOWN_UNIT_TYPES = [
77
77
  "research-milestone", "plan-milestone", "research-slice", "plan-slice",
78
78
  "execute-task", "reactive-execute", "gate-evaluate", "complete-slice", "replan-slice", "reassess-roadmap",
79
- "run-uat", "complete-milestone", "validate-milestone", "rewrite-docs",
80
- "discuss-milestone", "discuss-slice", "worktree-merge",
79
+ "run-uat", "complete-milestone",
81
80
  ];
82
81
  export const SKILL_ACTIONS = new Set(["use", "prefer", "avoid"]);
@@ -24,27 +24,27 @@ export { validatePreferences } from "./preferences-validation.js";
24
24
  // ─── Re-exports: skills ─────────────────────────────────────────────────────
25
25
  export { resolveAllSkillReferences, resolveSkillDiscoveryMode, resolveSkillStalenessDays, } from "./preferences-skills.js";
26
26
  // ─── Re-exports: models ─────────────────────────────────────────────────────
27
- export { resolveModelForUnit, resolveModelWithFallbacksForUnit, getNextFallbackModel, isTransientNetworkError, validateModelId, updatePreferencesModels, resolveDynamicRoutingConfig, resolveAutoSupervisorConfig, resolveProfileDefaults, resolveEffectiveProfile, resolveInlineLevel, resolveContextSelection, resolveSearchProviderFromPreferences, } from "./preferences-models.js";
27
+ export { resolveModelForUnit, resolveModelWithFallbacksForUnit, getNextFallbackModel, validateModelId, updatePreferencesModels, resolveDynamicRoutingConfig, resolveAutoSupervisorConfig, resolveProfileDefaults, resolveEffectiveProfile, resolveInlineLevel, resolveContextSelection, resolveSearchProviderFromPreferences, } from "./preferences-models.js";
28
28
  // ─── Path Constants & Getters ───────────────────────────────────────────────
29
29
  function gsdHome() {
30
30
  return process.env.GSD_HOME || join(homedir(), ".gsd");
31
31
  }
32
32
  function globalPreferencesPath() {
33
- return join(gsdHome(), "preferences.md");
33
+ return join(gsdHome(), "PREFERENCES.md");
34
34
  }
35
35
  function legacyGlobalPreferencesPath() {
36
36
  return join(homedir(), ".pi", "agent", "gsd-preferences.md");
37
37
  }
38
38
  function projectPreferencesPath() {
39
- return join(gsdRoot(process.cwd()), "preferences.md");
39
+ return join(gsdRoot(process.cwd()), "PREFERENCES.md");
40
40
  }
41
- // Bootstrap in gitignore.ts historically created PREFERENCES.md (uppercase) by mistake.
42
- // Check uppercase as a fallback so those files aren't silently ignored.
43
- function globalPreferencesPathUppercase() {
44
- return join(gsdHome(), "PREFERENCES.md");
41
+ // Legacy: older versions used lowercase preferences.md.
42
+ // Check lowercase as a fallback so those files aren't silently ignored.
43
+ function globalPreferencesPathLegacy() {
44
+ return join(gsdHome(), "preferences.md");
45
45
  }
46
- function projectPreferencesPathUppercase() {
47
- return join(gsdRoot(process.cwd()), "PREFERENCES.md");
46
+ function projectPreferencesPathLegacy() {
47
+ return join(gsdRoot(process.cwd()), "preferences.md");
48
48
  }
49
49
  export function getGlobalGSDPreferencesPath() {
50
50
  return globalPreferencesPath();
@@ -58,12 +58,12 @@ export function getProjectGSDPreferencesPath() {
58
58
  // ─── Loading ────────────────────────────────────────────────────────────────
59
59
  export function loadGlobalGSDPreferences() {
60
60
  return loadPreferencesFile(globalPreferencesPath(), "global")
61
- ?? loadPreferencesFile(globalPreferencesPathUppercase(), "global")
61
+ ?? loadPreferencesFile(globalPreferencesPathLegacy(), "global")
62
62
  ?? loadPreferencesFile(legacyGlobalPreferencesPath(), "global");
63
63
  }
64
64
  export function loadProjectGSDPreferences() {
65
65
  return loadPreferencesFile(projectPreferencesPath(), "project")
66
- ?? loadPreferencesFile(projectPreferencesPathUppercase(), "project");
66
+ ?? loadPreferencesFile(projectPreferencesPathLegacy(), "project");
67
67
  }
68
68
  export function loadEffectiveGSDPreferences() {
69
69
  const globalPreferences = loadGlobalGSDPreferences();
@@ -149,7 +149,7 @@ export function parsePreferencesMarkdown(content) {
149
149
  }
150
150
  if (!_warnedUnrecognizedFormat) {
151
151
  _warnedUnrecognizedFormat = true;
152
- console.warn("[parsePreferencesMarkdown] preferences.md exists but uses an unrecognized format — skipping.");
152
+ console.warn("[parsePreferencesMarkdown] PREFERENCES.md exists but uses an unrecognized format — skipping.");
153
153
  }
154
154
  return null;
155
155
  }
@@ -289,6 +289,9 @@ function mergePreferences(base, override) {
289
289
  service_tier: override.service_tier ?? base.service_tier,
290
290
  forensics_dedup: override.forensics_dedup ?? base.forensics_dedup,
291
291
  show_token_cost: override.show_token_cost ?? base.show_token_cost,
292
+ experimental: (base.experimental || override.experimental)
293
+ ? { ...(base.experimental ?? {}), ...(override.experimental ?? {}) }
294
+ : undefined,
292
295
  };
293
296
  }
294
297
  function mergeStringLists(base, override) {
@@ -409,7 +412,7 @@ export function resolvePreDispatchHooks() {
409
412
  * Resolve the effective git isolation mode from preferences.
410
413
  * Returns "none" (default), "worktree", or "branch".
411
414
  *
412
- * Default is "none" so GSD works out of the box without preferences.md.
415
+ * Default is "none" so GSD works out of the box without PREFERENCES.md.
413
416
  * Worktree isolation requires explicit opt-in because it depends on git
414
417
  * branch infrastructure that must be set up before use.
415
418
  */
@@ -124,10 +124,7 @@ export function loadPrompt(name, vars = {}) {
124
124
  }
125
125
  }
126
126
  for (const [key, value] of Object.entries(effectiveVars)) {
127
- // Use split/join instead of replaceAll to avoid JavaScript's special
128
- // replacement patterns ($', $`, $&) being interpreted in the value.
129
- // See: https://github.com/gsd-build/gsd-2/issues/2968
130
- content = content.split(`{{${key}}}`).join(value);
127
+ content = content.replaceAll(`{{${key}}}`, value);
131
128
  }
132
129
  return content.trim();
133
130
  }
@@ -56,7 +56,7 @@ Then:
56
56
  - `followUps` (string) — Follow-up items for future milestones
57
57
  - `deviations` (string) — Deviations from the original plan
58
58
  10. For each requirement whose status changed in step 8, call `gsd_requirement_update` with the requirement ID and updated `status` and `validation` fields — the tool regenerates `.gsd/REQUIREMENTS.md` automatically.
59
- 11. Update `.gsd/PROJECT.md`: use the `write` tool with `path: ".gsd/PROJECT.md"` and `content` containing the full updated document reflecting milestone completion and current project state. Do NOT use the `edit` tool for this — PROJECT.md is a full-document refresh.
59
+ 11. Update `.gsd/PROJECT.md` to reflect milestone completion and current project state.
60
60
  12. Review all slice summaries for cross-cutting lessons, patterns, or gotchas that emerged during this milestone. Append any non-obvious, reusable insights to `.gsd/KNOWLEDGE.md`.
61
61
  13. Do not commit manually — the system auto-commits your changes after this unit completes.
62
62
  - Say: "Milestone {{milestoneId}} complete."
@@ -29,11 +29,9 @@ Then:
29
29
  8. Write `{{sliceUatPath}}` — a concrete UAT script with real test cases derived from the slice plan and task summaries. Include preconditions, numbered steps with expected outcomes, and edge cases. This must NOT be a placeholder or generic template — tailor every test case to what this slice actually built.
30
30
  9. Review task summaries for `key_decisions`. Append any significant decisions to `.gsd/DECISIONS.md` if missing.
31
31
  10. Review task summaries for patterns, gotchas, or non-obvious lessons learned. If any would save future agents from repeating investigation or hitting the same issues, append them to `.gsd/KNOWLEDGE.md`. Only add entries that are genuinely useful — don't pad with obvious observations.
32
- 11. Call `gsd_complete_slice` with milestoneId, sliceId, the slice summary, and the UAT result. Do NOT manually mark the roadmap checkbox — the tool writes to the DB and renders the ROADMAP.md projection automatically.
32
+ 11. Call `gsd_complete_slice` with milestone_id, slice_id, the slice summary, and the UAT result. Do NOT manually mark the roadmap checkbox — the tool writes to the DB and renders the ROADMAP.md projection automatically.
33
33
  12. Do not run git commands — the system commits your changes and handles any merge after this unit succeeds.
34
- 13. Update `.gsd/PROJECT.md` if it exists — refresh current state if needed: use the `write` tool with `path: ".gsd/PROJECT.md"` and `content` containing the full updated document reflecting current project state. Do NOT use the `edit` tool for this — PROJECT.md is a full-document refresh.
35
-
36
- **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 slice summary. If a decision genuinely requires human input, note it in the summary and proceed with the best available option.
34
+ 13. Update `.gsd/PROJECT.md` if it exists — refresh current state if needed.
37
35
 
38
36
  **You MUST call `gsd_complete_slice` with the slice summary and UAT content before finishing. The tool persists to both DB and disk and renders `{{sliceSummaryPath}}` and `{{sliceUatPath}}` automatically.**
39
37
 
@@ -38,7 +38,7 @@ Do a mandatory investigation pass before making any decisions. This is not optio
38
38
  3. **Web search** — `search-the-web` if the domain is unfamiliar, if you need current best practices, or if the spec references external services/APIs you need facts about. Use `fetch_page` for full content when snippets aren't enough.
39
39
 
40
40
  **Web search budget:** Budget carefully across investigation + focused research:
41
- - Prefer `resolve_library` / `get_library_docs` over `search-the-web` for library documentation.
41
+ - Prefer `resolve_library` / `get_library_docs` over `web_search` for library documentation.
42
42
  - Prefer `search_and_read` for one-shot topic research.
43
43
  - Target 2-3 web searches in this investigation pass. Save remaining budget for focused research.
44
44
  - Do NOT repeat the same or similar queries.
@@ -37,7 +37,7 @@ Before asking your first question, do a mandatory investigation pass. This is no
37
37
  3. **Web search** — `search-the-web` if the domain is unfamiliar, if you need current best practices, or if the user referenced external services/APIs you need facts about. Use `fetch_page` for full content when snippets aren't enough.
38
38
 
39
39
  **Web search budget:** You have a limited number of web searches per turn (typically 3-5). The discuss phase spans many turns (investigation, question rounds, focused research, requirements), so budget carefully:
40
- - Prefer `resolve_library` / `get_library_docs` over `search-the-web` for library documentation — they don't consume the web search budget.
40
+ - Prefer `resolve_library` / `get_library_docs` over `web_search` for library documentation — they don't consume the web search budget.
41
41
  - Prefer `search_and_read` for one-shot topic research — it combines search + page fetch in a single call.
42
42
  - Target 2-3 web searches in the investigation pass. Save remaining budget for the focused research pass before roadmap creation.
43
43
  - Do NOT repeat the same or similar queries. If a search didn't find what you need, rephrase once or move on.
@@ -68,13 +68,11 @@ Then:
68
68
  17. If you discover a non-obvious rule, recurring gotcha, or useful pattern during execution, append it to `.gsd/KNOWLEDGE.md`. Only add entries that would save future agents from repeating your investigation. Don't add obvious things.
69
69
  18. Read the template at `~/.gsd/agent/extensions/gsd/templates/task-summary.md`
70
70
  19. Write `{{taskSummaryPath}}`
71
- 20. Call `gsd_complete_task` with milestoneId, sliceId, taskId, and a summary of what was accomplished. This is your final required step — do NOT manually edit PLAN.md checkboxes. The tool marks the task complete, updates the DB, and renders PLAN.md automatically.
71
+ 20. Call `gsd_complete_task` with milestone_id, slice_id, task_id, and a summary of what was accomplished. This is your final required step — do NOT manually edit PLAN.md checkboxes. The tool marks the task complete, updates the DB, and renders PLAN.md automatically.
72
72
  21. Do not run git commands — the system reads your task summary after completion and creates a meaningful commit from it (type inferred from title, message from your one-liner, key files from frontmatter). Write a clear, specific one-liner in the summary — it becomes the commit message.
73
73
 
74
74
  All work stays in your working directory: `{{workingDirectory}}`.
75
75
 
76
- **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 task summary. If a decision genuinely requires human input, note it in the summary and proceed with the best available option.
77
-
78
76
  **You MUST call `gsd_complete_task` AND write `{{taskSummaryPath}}` before finishing.**
79
77
 
80
78
  When done, say: "Task {{taskId}} complete."
@@ -102,8 +102,6 @@ A stale lock (PID is dead) means the previous auto-mode session crashed mid-unit
102
102
 
103
103
  A unit dispatched more than once (`type/id` appears multiple times) indicates a stuck loop — the unit completed but artifact verification failed.
104
104
 
105
- {{dedupSection}}
106
-
107
105
  ## Investigation Protocol
108
106
 
109
107
  1. **Start with the pre-parsed forensic report** above. The anomaly section contains automated findings — treat these as leads, not conclusions.
@@ -135,6 +133,8 @@ Explain your findings:
135
133
  - **Code snippet** — the problematic code and what it should do instead
136
134
  - **Recovery** — what the user can do right now to get unstuck
137
135
 
136
+ {{dedupSection}}
137
+
138
138
  Then **offer GitHub issue creation**: "Would you like me to create a GitHub issue for this on gsd-build/gsd-2?"
139
139
 
140
140
  **CRITICAL: The `github_issues` tool ONLY targets the current user's repository — it has no `repo` parameter. You MUST use `gh issue create --repo gsd-build/gsd-2` via the `bash` tool to file on the correct repo. Do NOT use the `github_issues` tool for this.**
@@ -13,7 +13,7 @@ Discuss milestone {{milestoneId}} ("{{milestoneTitle}}"). Identify gray areas, a
13
13
  Do a lightweight targeted investigation so your questions are grounded in reality:
14
14
  - Scout the codebase (`rg`, `find`, or `scout`) to understand what already exists that this milestone touches or builds on
15
15
  - Check the roadmap context above (if present) to understand what surrounds this milestone
16
- - Use `resolve_library` / `get_library_docs` for unfamiliar libraries — prefer this over `search-the-web` for library documentation
16
+ - Use `resolve_library` / `get_library_docs` for unfamiliar libraries — prefer this over `web_search` for library documentation
17
17
  - Identify the 3–5 biggest behavioural and architectural unknowns: things where the user's answer will materially change what gets built
18
18
 
19
19
  **Web search 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 — they are more budget-efficient. Target 2-3 web searches in the investigation pass. Distribute remaining searches across subsequent question rounds rather than clustering them.
@@ -13,7 +13,7 @@ Your goal is **not** to center the discussion on tech stack trivia, naming conve
13
13
  Do a lightweight targeted investigation so your questions are grounded in reality:
14
14
  - Scout the codebase (`rg`, `find`, or `scout` for broad unfamiliar areas) to understand what already exists that this slice touches or builds on
15
15
  - Check the roadmap context above to understand what surrounds this slice — what comes before, what depends on it
16
- - Use `resolve_library` / `get_library_docs` for unfamiliar libraries — prefer this over `search-the-web` for library documentation
16
+ - Use `resolve_library` / `get_library_docs` for unfamiliar libraries — prefer this over `web_search` for library documentation
17
17
  - Identify the 3–5 biggest behavioural unknowns: things where the user's answer will materially change what gets built
18
18
 
19
19
  **Web search 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 — they are more budget-efficient. Target 2-3 web searches in the investigation pass. Distribute remaining searches across subsequent question rounds rather than clustering them.
@@ -82,8 +82,6 @@ Then:
82
82
 
83
83
  The slice directory and tasks/ subdirectory already exist. Do NOT mkdir. All work stays in your working directory: `{{workingDirectory}}`.
84
84
 
85
- **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.
86
-
87
85
  **You MUST call `gsd_plan_slice` to persist the planning state before finishing.**
88
86
 
89
87
  When done, say: "Slice {{sliceId}} planned."
@@ -80,4 +80,4 @@ If a proposed order would violate constraints, explain the issue and suggest alt
80
80
  - Do NOT park completed milestones — it would corrupt dependency satisfaction
81
81
  - Park is preferred over discard when a milestone has any completed work
82
82
  - Always persist queue order changes to `.gsd/QUEUE-ORDER.json`
83
- - {{commitInstruction}}
83
+ - After changes, run `git add .gsd/ && git commit -m "docs(gsd): rethink milestone plan"` to persist (rethink runs interactively outside auto-mode, so no system auto-commit)