gsd-pi 2.68.0 → 2.68.1-dev.c1497ab

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 (179) hide show
  1. package/README.md +66 -70
  2. package/dist/resources/extensions/gsd/auto.js +8 -2
  3. package/dist/resources/extensions/gsd/bootstrap/write-gate.js +1 -5
  4. package/dist/resources/extensions/gsd/guided-flow.js +25 -70
  5. package/dist/resources/extensions/gsd/model-router.js +32 -2
  6. package/dist/resources/extensions/gsd/prompts/discuss.md +2 -0
  7. package/dist/resources/extensions/gsd/templates/context.md +34 -2
  8. package/dist/web/standalone/.next/BUILD_ID +1 -1
  9. package/dist/web/standalone/.next/app-path-routes-manifest.json +12 -12
  10. package/dist/web/standalone/.next/build-manifest.json +3 -3
  11. package/dist/web/standalone/.next/prerender-manifest.json +3 -3
  12. package/dist/web/standalone/.next/required-server-files.json +3 -3
  13. package/dist/web/standalone/.next/server/app/_global-error/page.js +3 -3
  14. package/dist/web/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  15. package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
  16. package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
  17. package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  18. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  19. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  20. package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  21. package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  22. package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  23. package/dist/web/standalone/.next/server/app/_not-found/page.js +2 -2
  24. package/dist/web/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  25. package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
  26. package/dist/web/standalone/.next/server/app/_not-found.rsc +3 -3
  27. package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  28. package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  29. package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  30. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  31. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  32. package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  33. package/dist/web/standalone/.next/server/app/api/boot/route.js +1 -1
  34. package/dist/web/standalone/.next/server/app/api/boot/route_client-reference-manifest.js +1 -1
  35. package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js +1 -1
  36. package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route_client-reference-manifest.js +1 -1
  37. package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js +1 -1
  38. package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route_client-reference-manifest.js +1 -1
  39. package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js +2 -2
  40. package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route_client-reference-manifest.js +1 -1
  41. package/dist/web/standalone/.next/server/app/api/browse-directories/route.js +1 -1
  42. package/dist/web/standalone/.next/server/app/api/browse-directories/route_client-reference-manifest.js +1 -1
  43. package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
  44. package/dist/web/standalone/.next/server/app/api/captures/route_client-reference-manifest.js +1 -1
  45. package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
  46. package/dist/web/standalone/.next/server/app/api/cleanup/route_client-reference-manifest.js +1 -1
  47. package/dist/web/standalone/.next/server/app/api/dev-mode/route.js +1 -1
  48. package/dist/web/standalone/.next/server/app/api/dev-mode/route_client-reference-manifest.js +1 -1
  49. package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
  50. package/dist/web/standalone/.next/server/app/api/doctor/route_client-reference-manifest.js +1 -1
  51. package/dist/web/standalone/.next/server/app/api/experimental/route.js +2 -2
  52. package/dist/web/standalone/.next/server/app/api/experimental/route_client-reference-manifest.js +1 -1
  53. package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
  54. package/dist/web/standalone/.next/server/app/api/export-data/route_client-reference-manifest.js +1 -1
  55. package/dist/web/standalone/.next/server/app/api/files/route.js +1 -1
  56. package/dist/web/standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
  57. package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
  58. package/dist/web/standalone/.next/server/app/api/forensics/route_client-reference-manifest.js +1 -1
  59. package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
  60. package/dist/web/standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
  61. package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
  62. package/dist/web/standalone/.next/server/app/api/history/route_client-reference-manifest.js +1 -1
  63. package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
  64. package/dist/web/standalone/.next/server/app/api/hooks/route_client-reference-manifest.js +1 -1
  65. package/dist/web/standalone/.next/server/app/api/inspect/route.js +1 -1
  66. package/dist/web/standalone/.next/server/app/api/inspect/route_client-reference-manifest.js +1 -1
  67. package/dist/web/standalone/.next/server/app/api/knowledge/route.js +1 -1
  68. package/dist/web/standalone/.next/server/app/api/knowledge/route_client-reference-manifest.js +1 -1
  69. package/dist/web/standalone/.next/server/app/api/live-state/route.js +1 -1
  70. package/dist/web/standalone/.next/server/app/api/live-state/route_client-reference-manifest.js +1 -1
  71. package/dist/web/standalone/.next/server/app/api/notifications/route.js +2 -2
  72. package/dist/web/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  73. package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
  74. package/dist/web/standalone/.next/server/app/api/onboarding/route_client-reference-manifest.js +1 -1
  75. package/dist/web/standalone/.next/server/app/api/preferences/route.js +1 -1
  76. package/dist/web/standalone/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
  77. package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
  78. package/dist/web/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  79. package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
  80. package/dist/web/standalone/.next/server/app/api/recovery/route_client-reference-manifest.js +1 -1
  81. package/dist/web/standalone/.next/server/app/api/remote-questions/route.js +2 -2
  82. package/dist/web/standalone/.next/server/app/api/remote-questions/route_client-reference-manifest.js +1 -1
  83. package/dist/web/standalone/.next/server/app/api/session/browser/route.js +1 -1
  84. package/dist/web/standalone/.next/server/app/api/session/browser/route_client-reference-manifest.js +1 -1
  85. package/dist/web/standalone/.next/server/app/api/session/command/route.js +1 -1
  86. package/dist/web/standalone/.next/server/app/api/session/command/route_client-reference-manifest.js +1 -1
  87. package/dist/web/standalone/.next/server/app/api/session/events/route.js +2 -2
  88. package/dist/web/standalone/.next/server/app/api/session/events/route_client-reference-manifest.js +1 -1
  89. package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
  90. package/dist/web/standalone/.next/server/app/api/session/manage/route_client-reference-manifest.js +1 -1
  91. package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
  92. package/dist/web/standalone/.next/server/app/api/settings-data/route_client-reference-manifest.js +1 -1
  93. package/dist/web/standalone/.next/server/app/api/shutdown/route.js +1 -1
  94. package/dist/web/standalone/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  95. package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
  96. package/dist/web/standalone/.next/server/app/api/skill-health/route_client-reference-manifest.js +1 -1
  97. package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
  98. package/dist/web/standalone/.next/server/app/api/steer/route_client-reference-manifest.js +1 -1
  99. package/dist/web/standalone/.next/server/app/api/switch-root/route.js +1 -1
  100. package/dist/web/standalone/.next/server/app/api/switch-root/route_client-reference-manifest.js +1 -1
  101. package/dist/web/standalone/.next/server/app/api/terminal/input/route.js +1 -1
  102. package/dist/web/standalone/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
  103. package/dist/web/standalone/.next/server/app/api/terminal/resize/route.js +2 -2
  104. package/dist/web/standalone/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
  105. package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +1 -1
  106. package/dist/web/standalone/.next/server/app/api/terminal/sessions/route_client-reference-manifest.js +1 -1
  107. package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +2 -2
  108. package/dist/web/standalone/.next/server/app/api/terminal/stream/route_client-reference-manifest.js +1 -1
  109. package/dist/web/standalone/.next/server/app/api/terminal/upload/route.js +1 -1
  110. package/dist/web/standalone/.next/server/app/api/terminal/upload/route_client-reference-manifest.js +1 -1
  111. package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
  112. package/dist/web/standalone/.next/server/app/api/undo/route_client-reference-manifest.js +1 -1
  113. package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
  114. package/dist/web/standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  115. package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
  116. package/dist/web/standalone/.next/server/app/api/visualizer/route_client-reference-manifest.js +1 -1
  117. package/dist/web/standalone/.next/server/app/index.html +1 -1
  118. package/dist/web/standalone/.next/server/app/index.rsc +4 -4
  119. package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  120. package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +4 -4
  121. package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  122. package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +3 -3
  123. package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  124. package/dist/web/standalone/.next/server/app/page.js +2 -2
  125. package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  126. package/dist/web/standalone/.next/server/app-paths-manifest.json +12 -12
  127. package/dist/web/standalone/.next/server/chunks/63.js +3 -3
  128. package/dist/web/standalone/.next/server/chunks/6897.js +1 -1
  129. package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
  130. package/dist/web/standalone/.next/server/middleware.js +2 -2
  131. package/dist/web/standalone/.next/server/next-font-manifest.js +1 -1
  132. package/dist/web/standalone/.next/server/next-font-manifest.json +1 -1
  133. package/dist/web/standalone/.next/server/pages/404.html +1 -1
  134. package/dist/web/standalone/.next/server/pages/500.html +1 -1
  135. package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
  136. package/dist/web/standalone/.next/static/chunks/app/_not-found/{page-2f24283c162b6ab3.js → page-f2a7482d42a5614b.js} +1 -1
  137. package/dist/web/standalone/.next/static/chunks/app/{layout-9ecfd95f343793f0.js → layout-a16c7a7ecdf0c2cf.js} +1 -1
  138. package/dist/web/standalone/.next/static/chunks/app/page-f1e30ab6bb269149.js +1 -0
  139. package/dist/web/standalone/.next/static/chunks/main-app-fdab67f7802d7832.js +1 -0
  140. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-459824ffb8c323dd.js +1 -0
  141. package/dist/web/standalone/node_modules/node-pty/build/Makefile +2 -2
  142. package/dist/web/standalone/node_modules/node-pty/build/Release/pty.node +0 -0
  143. package/dist/web/standalone/node_modules/node-pty/build/pty.target.mk +14 -14
  144. package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +14 -14
  145. package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +14 -14
  146. package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +14 -14
  147. package/dist/web/standalone/server.js +1 -1
  148. package/package.json +1 -1
  149. package/packages/pi-coding-agent/package.json +1 -1
  150. package/pkg/package.json +1 -1
  151. package/src/resources/extensions/gsd/auto-model-selection.ts +1 -3
  152. package/src/resources/extensions/gsd/auto.ts +8 -2
  153. package/src/resources/extensions/gsd/bootstrap/write-gate.ts +1 -5
  154. package/src/resources/extensions/gsd/guided-flow.ts +22 -84
  155. package/src/resources/extensions/gsd/model-router.ts +44 -10
  156. package/src/resources/extensions/gsd/preferences-types.ts +3 -1
  157. package/src/resources/extensions/gsd/prompts/discuss.md +2 -0
  158. package/src/resources/extensions/gsd/templates/context.md +34 -2
  159. package/src/resources/extensions/gsd/tests/capability-router.test.ts +31 -7
  160. package/src/resources/extensions/gsd/tests/discord-invite-links.test.ts +1 -1
  161. package/src/resources/extensions/gsd/tests/model-router.test.ts +2 -2
  162. package/src/resources/extensions/gsd/tests/resource-loader-import-path.test.ts +37 -0
  163. package/src/resources/extensions/gsd/tests/write-gate.test.ts +13 -16
  164. package/dist/resources/extensions/gsd/prompt-validation.js +0 -67
  165. package/dist/resources/extensions/gsd/prompts/discuss-prepared.md +0 -424
  166. package/dist/resources/extensions/gsd/templates/context-enhanced.md +0 -138
  167. package/dist/web/standalone/.next/static/chunks/app/page-7115e62689b5fd84.js +0 -1
  168. package/dist/web/standalone/.next/static/chunks/main-app-d3d4c336195465f9.js +0 -1
  169. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-ab5a8926e07ec673.js +0 -1
  170. package/src/resources/extensions/gsd/prompt-validation.ts +0 -88
  171. package/src/resources/extensions/gsd/prompts/discuss-prepared.md +0 -424
  172. package/src/resources/extensions/gsd/templates/context-enhanced.md +0 -138
  173. package/src/resources/extensions/gsd/tests/adversarial-review-fixes.test.ts +0 -223
  174. package/src/resources/extensions/gsd/tests/integration/test-isolation.ts +0 -53
  175. package/src/resources/extensions/gsd/tests/integration-prepared-discussion.test.ts +0 -525
  176. package/src/resources/extensions/gsd/tests/preparation.test.ts +0 -1211
  177. package/src/resources/extensions/gsd/tests/prompt-builder.test.ts +0 -669
  178. /package/dist/web/standalone/.next/static/{ka3ShQTakcliYL-EXRRb6 → 5D80IWYltFwlAJiCZ84MC}/_buildManifest.js +0 -0
  179. /package/dist/web/standalone/.next/static/{ka3ShQTakcliYL-EXRRb6 → 5D80IWYltFwlAJiCZ84MC}/_ssgManifest.js +0 -0
package/README.md CHANGED
@@ -21,58 +21,49 @@ One command. Walk away. Come back to a built project with clean git history.
21
21
 
22
22
  > GSD now provisions a managed [RTK](https://github.com/rtk-ai/rtk) binary on supported macOS, Linux, and Windows installs to compress shell-command output in `bash`, `async_bash`, `bg_shell`, and verification flows. GSD forces `RTK_TELEMETRY_DISABLED=1` for all managed invocations. Set `GSD_RTK_DISABLED=1` to disable the integration.
23
23
 
24
- > **📋 NOTICE: New to Node on Mac?** If you installed Node.js via Homebrew, you may be running a development release instead of LTS. **[Read this guide](./docs/node-lts-macos.md)** to pin Node 24 LTS and avoid compatibility issues.
24
+ > **📋 NOTICE: New to Node on Mac?** If you installed Node.js via Homebrew, you may be running a development release instead of LTS. **[Read this guide](./docs/user-docs/node-lts-macos.md)** to pin Node 24 LTS and avoid compatibility issues.
25
25
 
26
26
  </div>
27
27
 
28
28
  ---
29
29
 
30
- ## What's New in v2.67
30
+ ## What's New in v2.68
31
31
 
32
- ### Context Engineering
33
-
34
- - **Tiered Context Injection (M005)** — relevance-scoped context with 65%+ token reduction. Decision scope cascade derives context from slice metadata instead of blanket injection.
35
- - **Resilient transient error recovery** — defers to Core RetryHandler and fixes cmdCtx race conditions for more reliable auto-mode sessions.
36
-
37
- ### Provider & Model Improvements
38
-
39
- - **Anthropic subscription routing** — users with Anthropic subscriptions are automatically routed through Claude Code CLI provider with proper display names across all UI surfaces.
40
- - **Claude Code provider hardening** — native Windows claude lookup, fallback guards, and `out of extra usage` error matching.
41
- - **XML parameter recovery** — pi-ai recovers XML parameters trapped in JSON strings from providers.
42
-
43
- ### Safety & Data Integrity
32
+ ### MCP Workflow Tools
44
33
 
45
- - **LLM safety harness** — auto-mode damage control prevents the LLM from running destructive operations or querying `gsd.db` directly via bash.
46
- - **5-wave state machine hardening** — critical data integrity fixes across atomic writes, randomized tmp paths, event log reconciliation, session recovery, and consistency enforcement. 86+ regression tests added.
47
- - **Discussion gate enforcement** — mechanical enforcement for discussion question gates with fail-closed behavior.
48
- - **Enhanced verification** — pre-execution plan verification checks, post-execution cross-task consistency checks, blocking behavior and strict mode.
34
+ - **Full workflow over MCP** — slice replanning, milestone management, slice completion, task completion, and core planning tools are now exposed over MCP for external integrations.
35
+ - **Transport-gated MCP** — workflow tool availability adapts to provider transport capabilities automatically.
36
+ - **Write gate enforcement** — workflow MCP respects write gates, preventing unauthorized state mutations from external clients.
49
37
 
50
- ### Parallel Execution & Dispatch
38
+ ### Reliability & Recovery
51
39
 
52
- - **Slice-level parallelism** — dependency-aware parallel dispatch within a milestone, not just across milestones.
53
- - **Parallel research slices** — research and milestone validation run in parallel.
54
- - **Worker model override** — configure different models for parallel milestone workers.
40
+ - **False degraded-mode fix** — eliminates spurious degraded-mode warnings when the DB hasn't been initialized yet.
41
+ - **Stale session resume suppression** — prevents stale interrupted-session resume prompts from hijacking fresh sessions.
42
+ - **Merge conflict recovery** — `autoCommitDirtyState` guarded with cwd restore on `MergeConflictError`.
43
+ - **Auto-resume hardening** — `autoStartTime` restored on resume, managed resources resynced on auto resume.
55
44
 
56
- ### TUI & Notifications
45
+ ### TUI & Developer Experience
57
46
 
58
- - **Persistent notification panel** — TUI overlay, widget, and web API for real-time notifications.
59
- - **Remote questions race** — local TUI races against remote channel (Slack/Discord) instead of remote-only routing.
60
- - **OS-specific keyboard shortcuts** — shortcut hints now adapt to macOS/Linux/Windows.
61
- - **`/gsd show-config`** — inspect active configuration at a glance.
47
+ - **Contextual tips system** — TUI and web terminal now surface contextual tips based on workflow state.
48
+ - **Claude Code MCP streaming** — real-time streaming and tool output rendering for Claude Code MCP connections.
62
49
 
63
50
  ### Infrastructure
64
51
 
65
- - **Ollama native provider** — `/api/chat` provider with full option exposure, `apiKey` auth mode, and headless probe.
66
- - **MCP OAuth** — MCP client supports OAuth auth provider for HTTP transport.
67
- - **WAL-safe migration backup** — database migrations create WAL-safe backups with stronger regression tests.
68
- - **Xcode/xcodegen detection** — project detection now supports Xcode bundles and xcodegen.
69
- - **170+ bug fixes** — state machine resilience, worktree safety, prompt injection, session recovery, and more.
52
+ - **Weekly model registry refresh** — CI workflow auto-regenerates the model registry on a weekly schedule.
53
+ - **Codebase cache auto-refresh** — stale codebase cache is refreshed automatically without manual intervention.
70
54
 
71
55
  See the full [Changelog](./CHANGELOG.md) for details on every release.
72
56
 
73
57
  <details>
74
- <summary>Previous highlights (v2.63 and earlier)</summary>
75
-
58
+ <summary>Previous highlights (v2.67 and earlier)</summary>
59
+
60
+ - **Tiered Context Injection (M005)** — relevance-scoped context with 65%+ token reduction
61
+ - **Resilient transient error recovery** — defers to Core RetryHandler and fixes cmdCtx race conditions
62
+ - **Anthropic subscription routing** — auto-routed through Claude Code CLI provider with proper display names
63
+ - **5-wave state machine hardening** — critical data integrity fixes across atomic writes, event log reconciliation, session recovery
64
+ - **Discussion gate enforcement** — mechanical enforcement with fail-closed behavior
65
+ - **Slice-level parallelism** — dependency-aware parallel dispatch within a milestone
66
+ - **Persistent notification panel** — TUI overlay, widget, and web API for real-time notifications
76
67
  - **MCP server** — 6 read-only project state tools for external integrations, auto-wrapup guard, and question dedup
77
68
  - **Ollama extension** — first-class local LLM support via Ollama, with dynamic routing enabled by default
78
69
  - **Discord bot & daemon** — dedicated daemon package, Discord bot, and headless text mode with tool calls
@@ -95,30 +86,35 @@ See the full [Changelog](./CHANGELOG.md) for details on every release.
95
86
 
96
87
  ## Documentation
97
88
 
98
- Full documentation is available at **[gsd.build](https://gsd.build)** (powered by Mintlify) and in the [`docs/`](./docs/) directory:
99
-
100
- - **[Getting Started](./docs/getting-started.md)** — install, first run, basic usage
101
- - **[Auto Mode](./docs/auto-mode.md)** — autonomous execution deep-dive
102
- - **[Configuration](./docs/configuration.md)** — all preferences, models, git, and hooks
103
- - **[Custom Models](./docs/custom-models.md)** — add custom providers (Ollama, vLLM, LM Studio, proxies)
104
- - **[Token Optimization](./docs/token-optimization.md)** — profiles, context compression, complexity routing
105
- - **[Cost Management](./docs/cost-management.md)** — budgets, tracking, projections
106
- - **[Git Strategy](./docs/git-strategy.md)** — worktree isolation, branching, merge behavior
107
- - **[Parallel Orchestration](./docs/parallel-orchestration.md)** — run multiple milestones simultaneously
108
- - **[Working in Teams](./docs/working-in-teams.md)** — unique IDs, shared artifacts
109
- - **[Skills](./docs/skills.md)** — bundled skills, discovery, custom authoring
110
- - **[Commands Reference](./docs/commands.md)** — all commands and keyboard shortcuts
111
- - **[Architecture](./docs/architecture.md)** — system design and dispatch pipeline
112
- - **[Troubleshooting](./docs/troubleshooting.md)** — common issues, doctor, forensics, recovery
113
- - **[CI/CD Pipeline](./docs/ci-cd-pipeline.md)** — three-stage promotion pipeline (Dev → Test → Prod)
114
- - **[VS Code Extension](./vscode-extension/README.md)** — chat participant, sidebar dashboard, RPC integration
115
- - **[Visualizer](./docs/visualizer.md)** — workflow visualizer with stats and discussion status
116
- - **[Remote Questions](./docs/remote-questions.md)** — route decisions to Slack or Discord when human input is needed
117
- - **[Dynamic Model Routing](./docs/dynamic-model-routing.md)** — complexity-based model selection and budget pressure
118
- - **[Web Interface](./docs/web-interface.md)** — browser-based project management and real-time progress
119
- - **[Pipeline Simplification (ADR-003)](./docs/ADR-003-pipeline-simplification.md)** — merged research into planning, mechanical completion
89
+ Full documentation is in the [`docs/`](./docs/) directory:
90
+
91
+ ### User Guides
92
+
93
+ - **[Getting Started](./docs/user-docs/getting-started.md)** — install, first run, basic usage
94
+ - **[Auto Mode](./docs/user-docs/auto-mode.md)** — autonomous execution deep-dive
95
+ - **[Configuration](./docs/user-docs/configuration.md)** — all preferences, models, git, and hooks
96
+ - **[Custom Models](./docs/user-docs/custom-models.md)** — add custom providers (Ollama, vLLM, LM Studio, proxies)
97
+ - **[Token Optimization](./docs/user-docs/token-optimization.md)** — profiles, context compression, complexity routing
98
+ - **[Cost Management](./docs/user-docs/cost-management.md)** — budgets, tracking, projections
99
+ - **[Git Strategy](./docs/user-docs/git-strategy.md)** — worktree isolation, branching, merge behavior
100
+ - **[Parallel Orchestration](./docs/user-docs/parallel-orchestration.md)** — run multiple milestones simultaneously
101
+ - **[Working in Teams](./docs/user-docs/working-in-teams.md)** — unique IDs, shared artifacts
102
+ - **[Skills](./docs/user-docs/skills.md)** — bundled skills, discovery, custom authoring
103
+ - **[Commands Reference](./docs/user-docs/commands.md)** — all commands and keyboard shortcuts
104
+ - **[Troubleshooting](./docs/user-docs/troubleshooting.md)** — common issues, doctor, forensics, recovery
105
+ - **[Visualizer](./docs/user-docs/visualizer.md)** — workflow visualizer with stats and discussion status
106
+ - **[Remote Questions](./docs/user-docs/remote-questions.md)** — route decisions to Slack or Discord when human input is needed
107
+ - **[Dynamic Model Routing](./docs/user-docs/dynamic-model-routing.md)** — complexity-based model selection and budget pressure
108
+ - **[Web Interface](./docs/user-docs/web-interface.md)** — browser-based project management and real-time progress
109
+ - **[Migration from v1](./docs/user-docs/migration.md)** — `.planning` `.gsd` migration
120
110
  - **[Docker Sandbox](./docker/README.md)** — run GSD auto mode in an isolated Docker container
121
- - **[Migration from v1](./docs/migration.md)** — `.planning` → `.gsd` migration
111
+
112
+ ### Developer Docs
113
+
114
+ - **[Architecture](./docs/dev/architecture.md)** — system design and dispatch pipeline
115
+ - **[CI/CD Pipeline](./docs/dev/ci-cd-pipeline.md)** — three-stage promotion pipeline (Dev → Test → Prod)
116
+ - **[Pipeline Simplification (ADR-003)](./docs/dev/ADR-003-pipeline-simplification.md)** — merged research into planning, mechanical completion
117
+ - **[VS Code Extension](./vscode-extension/README.md)** — chat participant, sidebar dashboard, RPC integration
122
118
 
123
119
  ---
124
120
 
@@ -334,7 +330,7 @@ gsd headless query
334
330
  gsd headless dispatch plan
335
331
  ```
336
332
 
337
- Headless auto-responds to interactive prompts, detects completion, and exits with structured codes: `0` complete, `1` error/timeout, `2` blocked. Auto-restarts on crash with exponential backoff. Use `gsd headless query` for instant, machine-readable state inspection — returns phase, next dispatch preview, and parallel worker costs as a single JSON object without spawning an LLM session. Pair with [remote questions](./docs/remote-questions.md) to route decisions to Slack or Discord when human input is needed.
333
+ Headless auto-responds to interactive prompts, detects completion, and exits with structured codes: `0` complete, `1` error/timeout, `2` blocked. Auto-restarts on crash with exponential backoff. Use `gsd headless query` for instant, machine-readable state inspection — returns phase, next dispatch preview, and parallel worker costs as a single JSON object without spawning an LLM session. Pair with [remote questions](./docs/user-docs/remote-questions.md) to route decisions to Slack or Discord when human input is needed.
338
334
 
339
335
  **Multi-session orchestration** — headless mode supports file-based IPC in `.gsd/parallel/` for coordinating multiple GSD workers across milestones. Build orchestrators that spawn, monitor, and budget-cap a fleet of GSD workers.
340
336
 
@@ -507,9 +503,8 @@ auto_report: true
507
503
  | `verification_commands`| Array of shell commands to run after task execution (e.g., `["npm run lint", "npm run test"]`) |
508
504
  | `verification_auto_fix`| Auto-retry on verification failures (default: true) |
509
505
  | `verification_max_retries` | Max retries for verification failures (default: 2) |
510
- | `require_slice_discussion` | Pause auto-mode before each slice for human discussion review |
506
+ | `phases.require_slice_discussion` | Pause auto-mode before each slice for human discussion review |
511
507
  | `auto_report` | Auto-generate HTML reports after milestone completion (default: true) |
512
- | `searchExcludeDirs` | Directories to exclude from `@` file autocomplete (e.g., `["node_modules", ".git", "dist"]`) |
513
508
 
514
509
  ### Agent Instructions
515
510
 
@@ -539,7 +534,7 @@ token_profile: budget # or balanced (default), quality
539
534
 
540
535
  **Budget pressure** graduates model downgrading as you approach your budget ceiling — 50%, 75%, and 90% thresholds progressively shift work to cheaper tiers.
541
536
 
542
- See the full [Token Optimization Guide](./docs/token-optimization.md) for details.
537
+ See the full [Token Optimization Guide](./docs/user-docs/token-optimization.md) for details.
543
538
 
544
539
  ### Bundled Tools
545
540
 
@@ -574,13 +569,15 @@ GSD ships with 24 extensions, all loaded automatically:
574
569
 
575
570
  ### Bundled Agents
576
571
 
577
- Three specialized subagents for delegated work:
572
+ Five specialized subagents for delegated work:
578
573
 
579
- | Agent | Role |
580
- | -------------- | ------------------------------------------------------------ |
581
- | **Scout** | Fast codebase recon — returns compressed context for handoff |
582
- | **Researcher** | Web research — finds and synthesizes current information |
583
- | **Worker** | General-purpose execution in an isolated context window |
574
+ | Agent | Role |
575
+ | ------------------- | ------------------------------------------------------------ |
576
+ | **Scout** | Fast codebase recon — returns compressed context for handoff |
577
+ | **Researcher** | Web research — finds and synthesizes current information |
578
+ | **Worker** | General-purpose execution in an isolated context window |
579
+ | **JavaScript Pro** | JavaScript-specialized execution and debugging |
580
+ | **TypeScript Pro** | TypeScript-specialized execution and debugging |
584
581
 
585
582
  ---
586
583
 
@@ -655,9 +652,8 @@ gsd (CLI binary)
655
652
  ├─ resource-loader.ts Syncs bundled extensions + agents to ~/.gsd/agent/
656
653
  └─ src/resources/
657
654
  ├─ extensions/gsd/ Core GSD extension (auto, state, commands, ...)
658
- ├─ extensions/... 23 supporting extensions
659
- ├─ agents/ scout, researcher, worker
660
- ├─ AGENTS.md Agent routing instructions
655
+ ├─ extensions/... 21 supporting extensions
656
+ ├─ agents/ scout, researcher, worker, javascript-pro, typescript-pro
661
657
  └─ GSD-WORKFLOW.md Manual bootstrap protocol
662
658
  ```
663
659
 
@@ -37,8 +37,9 @@ import { getRtkSessionSavings } from "../shared/rtk-session-stats.js";
37
37
  import { initMetrics, resetMetrics, getLedger, getProjectTotals, formatCost, formatTokenCount, } from "./metrics.js";
38
38
  import { logWarning } from "./workflow-logger.js";
39
39
  import { homedir } from "node:os";
40
- import { join } from "node:path";
40
+ import { join, dirname } from "node:path";
41
41
  import { readFileSync, existsSync, mkdirSync, writeFileSync, unlinkSync } from "node:fs";
42
+ import { createRequire } from "node:module";
42
43
  import { atomicWriteSync } from "./atomic-write.js";
43
44
  import { autoCommitCurrentBranch, captureIntegrationBranch, detectWorktreeName, getCurrentBranch, getMainBranch, setActiveMilestoneId, } from "./worktree.js";
44
45
  import { GitServiceImpl } from "./git-service.js";
@@ -1021,7 +1022,12 @@ export async function startAuto(ctx, pi, base, verboseMode, options) {
1021
1022
  // Re-sync managed resources on resume so long-lived auto sessions pick up
1022
1023
  // bundled extension updates before resume-time verification/state logic runs.
1023
1024
  const agentDir = process.env.GSD_CODING_AGENT_DIR || join(process.env.GSD_HOME || homedir(), ".gsd", "agent");
1024
- const { initResources } = await import("../../../" + "resource-loader.js");
1025
+ // Resolve resource-loader from the gsd-pi package root — the relative
1026
+ // "../../../resource-loader.js" path only works from the source tree but
1027
+ // breaks when extensions are deployed to ~/.gsd/agent/extensions/gsd/.
1028
+ const _req = createRequire(import.meta.url);
1029
+ const pkgRoot = dirname(_req.resolve("gsd-pi/package.json"));
1030
+ const { initResources } = await import(join(pkgRoot, "dist", "resource-loader.js"));
1025
1031
  initResources(agentDir);
1026
1032
  // Open the project DB before rebuild/derive so resume uses DB-backed
1027
1033
  // state instead of falling back to stale markdown parsing (#2940).
@@ -40,13 +40,9 @@ let activeQueuePhase = false;
40
40
  let pendingGateId = null;
41
41
  /**
42
42
  * Recognized gate question ID patterns.
43
- * These appear in both discuss-prepared.md (4-layer) and discuss.md (depth/requirements/roadmap).
43
+ * These appear in discuss.md (depth/requirements/roadmap).
44
44
  */
45
45
  const GATE_QUESTION_PATTERNS = [
46
- "layer1_scope_gate",
47
- "layer2_architecture_gate",
48
- "layer3_error_gate",
49
- "layer4_quality_gate",
50
46
  "depth_verification",
51
47
  ];
52
48
  /**
@@ -36,19 +36,7 @@ import { parkMilestone, discardMilestone } from "./milestone-actions.js";
36
36
  import { selectAndApplyModel } from "./auto-model-selection.js";
37
37
  import { DISCUSS_TOOLS_ALLOWLIST } from "./constants.js";
38
38
  import { getWorkflowTransportSupportError, getRequiredWorkflowToolsForGuidedUnit, } from "./workflow-mcp.js";
39
- import { runPreparation, formatCodebaseBrief, formatPriorContextBrief, formatEcosystemBrief, } from "./preparation.js";
40
- // ─── Preparation result storage ─────────────────────────────────────────────
41
- // Stores the most recent preparation result for injection into discuss prompts.
42
- // S02 will consume this when building the prepared discussion prompt.
43
- let lastPreparationResult = null;
44
- /** Get the most recent preparation result (for S02 prompt building). */
45
- export function getLastPreparationResult() {
46
- return lastPreparationResult;
47
- }
48
- /** Clear the preparation result (called after discussion completes). */
49
- export function clearPreparationResult() {
50
- lastPreparationResult = null;
51
- }
39
+ import { runPreparation, formatCodebaseBrief, formatPriorContextBrief, } from "./preparation.js";
52
40
  // ─── Re-exports (preserve public API for existing importers) ────────────────
53
41
  export { MILESTONE_ID_RE, generateMilestoneSuffix, nextMilestoneId, extractMilestoneSeq, parseMilestoneId, milestoneIdSort, maxMilestoneNum, findMilestoneIds, reserveMilestoneId, claimReservedId, getReservedMilestoneIds, clearReservedMilestoneIds, } from "./milestone-ids.js";
54
42
  export { showQueue, handleQueueReorder, showQueueAdd, buildExistingMilestonesContext, } from "./guided-flow-queue.js";
@@ -335,7 +323,7 @@ function resolveAvailableModel(modelId, availableModels, currentProvider) {
335
323
  * Build the discuss-and-plan prompt for a new milestone.
336
324
  * Used by all three "new milestone" paths (first ever, no active, all complete).
337
325
  */
338
- function buildDiscussPrompt(nextId, preamble, _basePath) {
326
+ function buildDiscussPrompt(nextId, preamble, _basePath, preparationContext) {
339
327
  const milestoneRel = `.gsd/milestones/${nextId}`;
340
328
  const inlinedTemplates = [
341
329
  inlineTemplate("project", "Project"),
@@ -347,6 +335,7 @@ function buildDiscussPrompt(nextId, preamble, _basePath) {
347
335
  return loadPrompt("discuss", {
348
336
  milestoneId: nextId,
349
337
  preamble,
338
+ preparationContext: preparationContext ?? "",
350
339
  contextPath: `${milestoneRel}/${nextId}-CONTEXT.md`,
351
340
  roadmapPath: `${milestoneRel}/${nextId}-ROADMAP.md`,
352
341
  inlinedTemplates,
@@ -377,50 +366,12 @@ function buildHeadlessDiscussPrompt(nextId, seedContext, _basePath) {
377
366
  multiMilestoneCommitInstruction: buildDocsCommitInstruction("docs: project plan — N milestones"),
378
367
  });
379
368
  }
380
- /**
381
- * Build the prepared discuss prompt with brief injection.
382
- * Uses the discuss-prepared template which encodes the 4-layer discussion protocol.
383
- *
384
- * @param nextId - The milestone ID being discussed
385
- * @param preamble - Preamble text for the discuss prompt
386
- * @param _basePath - Root directory of the project (unused, kept for signature consistency)
387
- * @param prepResult - Preparation result containing briefs to inject
388
- * @returns The prepared discuss prompt string
389
- */
390
- function buildPreparedPrompt(nextId, preamble, _basePath, prepResult) {
391
- const milestoneRel = `.gsd/milestones/${nextId}`;
392
- // Use context-enhanced instead of context for prepared discussions
393
- const inlinedTemplates = [
394
- inlineTemplate("project", "Project"),
395
- inlineTemplate("requirements", "Requirements"),
396
- inlineTemplate("context-enhanced", "Context Enhanced"),
397
- inlineTemplate("roadmap", "Roadmap"),
398
- inlineTemplate("decisions", "Decisions"),
399
- ].join("\n\n---\n\n");
400
- // Format the briefs from the preparation result
401
- const codebaseBrief = prepResult.codebaseBrief || formatCodebaseBrief(prepResult.codebase);
402
- const priorContextBrief = prepResult.priorContextBrief || formatPriorContextBrief(prepResult.priorContext);
403
- const ecosystemBrief = prepResult.ecosystemBrief || formatEcosystemBrief(prepResult.ecosystem);
404
- return loadPrompt("discuss-prepared", {
405
- milestoneId: nextId,
406
- preamble,
407
- codebaseBrief,
408
- priorContextBrief,
409
- ecosystemBrief,
410
- contextPath: `${milestoneRel}/${nextId}-CONTEXT.md`,
411
- roadmapPath: `${milestoneRel}/${nextId}-ROADMAP.md`,
412
- inlinedTemplates,
413
- commitInstruction: buildDocsCommitInstruction(`docs(${nextId}): context, requirements, and roadmap`),
414
- multiMilestoneCommitInstruction: buildDocsCommitInstruction("docs: project plan — N milestones"),
415
- });
416
- }
417
369
  /**
418
370
  * Run preparation phase if enabled, then build the discuss prompt.
419
- * This is the main entry point for new milestone discussions with preparation.
420
- * Stores the preparation result for S02 to inject into the discuss prompt.
421
- *
422
- * When preparation succeeds, uses the discuss-prepared template with brief injection.
423
- * Falls back to the standard discuss template when preparation is disabled or fails.
371
+ * Preparation analyzes the codebase and prior context, injecting the results
372
+ * as supplementary context into the standard discuss template. The discuss
373
+ * template drives the conversation (asks "What's the vision?" first), while
374
+ * the preparation briefs give the agent grounding in the existing codebase.
424
375
  *
425
376
  * @param ctx - Extension command context with UI for progress notifications
426
377
  * @param nextId - The milestone ID being discussed
@@ -429,12 +380,12 @@ function buildPreparedPrompt(nextId, preamble, _basePath, prepResult) {
429
380
  * @returns The discuss prompt string
430
381
  */
431
382
  async function prepareAndBuildDiscussPrompt(ctx, nextId, preamble, basePath) {
432
- // Clear stale preparation result immediately to prevent cross-session/project
433
- // state leaks. This ensures data from a prior milestone/project never leaks
434
- // into subsequent discussions (adversarial review fix #3602).
435
- lastPreparationResult = null;
436
383
  const prefs = loadEffectiveGSDPreferences()?.preferences ?? {};
437
- // Run preparation if enabled (default: true)
384
+ // Run preparation if enabled (default: true) — results are injected as
385
+ // supplementary context into the standard discuss prompt, NOT as a
386
+ // replacement template. The discuss prompt always leads with "What's the
387
+ // vision?" so the user defines the scope, not the codebase analysis.
388
+ let preparationContext = "";
438
389
  if (prefs.discuss_preparation !== false) {
439
390
  try {
440
391
  const prepResult = await runPreparation(basePath, ctx.ui, {
@@ -442,20 +393,24 @@ async function prepareAndBuildDiscussPrompt(ctx, nextId, preamble, basePath) {
442
393
  discuss_web_research: prefs.discuss_web_research,
443
394
  discuss_depth: prefs.discuss_depth,
444
395
  });
445
- lastPreparationResult = prepResult;
446
- // Use prepared prompt if preparation was enabled and produced results
447
396
  if (prepResult.enabled) {
448
- return buildPreparedPrompt(nextId, preamble, basePath, prepResult);
397
+ const codebaseBrief = prepResult.codebaseBrief || formatCodebaseBrief(prepResult.codebase);
398
+ const priorContextBrief = prepResult.priorContextBrief || formatPriorContextBrief(prepResult.priorContext);
399
+ const parts = [];
400
+ if (codebaseBrief)
401
+ parts.push(`### Codebase Brief\n\n${codebaseBrief}`);
402
+ if (priorContextBrief)
403
+ parts.push(`### Prior Context Brief\n\n${priorContextBrief}`);
404
+ if (parts.length > 0) {
405
+ preparationContext = `\n\n## Preparation Context\n\nThe system analyzed the codebase before this discussion. Use these findings as background context — they describe what already exists, NOT what the user wants to build. Always ask the user what they want to build first.\n\n${parts.join("\n\n")}`;
406
+ }
449
407
  }
450
408
  }
451
- catch {
452
- // If preparation throws, ensure stale data doesn't persist
453
- lastPreparationResult = null;
409
+ catch (err) {
410
+ logWarning("guided", `preparation failed, proceeding without context: ${err.message}`);
454
411
  }
455
412
  }
456
- // Fall back to standard discuss prompt for backward compatibility
457
- // lastPreparationResult is already null (cleared at entry or on error)
458
- return buildDiscussPrompt(nextId, preamble, basePath);
413
+ return buildDiscussPrompt(nextId, preamble, basePath, preparationContext);
459
414
  }
460
415
  /**
461
416
  * Bootstrap a .gsd/ project from scratch for headless use.
@@ -5,7 +5,7 @@ import { tierOrdinal } from "./complexity-classifier.js";
5
5
  // ─── Known Model Tiers ───────────────────────────────────────────────────────
6
6
  // Maps known model IDs to their capability tier. Used when tier_models is not
7
7
  // explicitly configured to pick the best available model for each tier.
8
- const MODEL_CAPABILITY_TIER = {
8
+ export const MODEL_CAPABILITY_TIER = {
9
9
  // Light-tier models (cheapest)
10
10
  "claude-haiku-4-5": "light",
11
11
  "claude-3-5-haiku-latest": "light",
@@ -80,15 +80,45 @@ const MODEL_COST_PER_1K_INPUT = {
80
80
  // Per-model capability profiles (0–100 scale). Used for capability-aware
81
81
  // model selection within an eligible tier set.
82
82
  export const MODEL_CAPABILITY_PROFILES = {
83
+ // ── Anthropic ──────────────────────────────────────────────────────────────
83
84
  "claude-opus-4-6": { coding: 95, debugging: 90, research: 85, reasoning: 95, speed: 30, longContext: 80, instruction: 90 },
84
85
  "claude-sonnet-4-6": { coding: 85, debugging: 80, research: 75, reasoning: 80, speed: 60, longContext: 75, instruction: 85 },
86
+ "claude-sonnet-4-5-20250514": { coding: 85, debugging: 80, research: 75, reasoning: 80, speed: 60, longContext: 75, instruction: 85 },
87
+ "claude-3-5-sonnet-latest": { coding: 82, debugging: 78, research: 72, reasoning: 78, speed: 62, longContext: 70, instruction: 82 },
85
88
  "claude-haiku-4-5": { coding: 60, debugging: 50, research: 45, reasoning: 50, speed: 95, longContext: 50, instruction: 75 },
89
+ "claude-3-5-haiku-latest": { coding: 60, debugging: 50, research: 45, reasoning: 50, speed: 95, longContext: 50, instruction: 75 },
90
+ "claude-3-haiku-20240307": { coding: 50, debugging: 40, research: 35, reasoning: 40, speed: 95, longContext: 40, instruction: 65 },
91
+ "claude-3-opus-latest": { coding: 90, debugging: 85, research: 82, reasoning: 90, speed: 35, longContext: 75, instruction: 88 },
92
+ // ── OpenAI GPT ─────────────────────────────────────────────────────────────
86
93
  "gpt-4o": { coding: 80, debugging: 75, research: 70, reasoning: 75, speed: 65, longContext: 70, instruction: 80 },
87
94
  "gpt-4o-mini": { coding: 55, debugging: 45, research: 40, reasoning: 45, speed: 90, longContext: 45, instruction: 70 },
95
+ "gpt-4-turbo": { coding: 78, debugging: 72, research: 68, reasoning: 72, speed: 50, longContext: 65, instruction: 78 },
96
+ "gpt-4.1": { coding: 82, debugging: 78, research: 72, reasoning: 78, speed: 62, longContext: 72, instruction: 82 },
97
+ "gpt-4.1-mini": { coding: 58, debugging: 48, research: 42, reasoning: 48, speed: 88, longContext: 48, instruction: 72 },
98
+ "gpt-4.1-nano": { coding: 40, debugging: 30, research: 25, reasoning: 30, speed: 95, longContext: 30, instruction: 60 },
99
+ "gpt-5": { coding: 92, debugging: 88, research: 85, reasoning: 92, speed: 40, longContext: 85, instruction: 90 },
100
+ "gpt-5-mini": { coding: 62, debugging: 52, research: 48, reasoning: 52, speed: 88, longContext: 52, instruction: 74 },
101
+ "gpt-5-nano": { coding: 42, debugging: 32, research: 28, reasoning: 32, speed: 95, longContext: 32, instruction: 62 },
102
+ "gpt-5-pro": { coding: 94, debugging: 90, research: 88, reasoning: 94, speed: 35, longContext: 88, instruction: 92 },
103
+ "gpt-5.1": { coding: 93, debugging: 89, research: 86, reasoning: 93, speed: 42, longContext: 86, instruction: 91 },
104
+ "gpt-5.1-codex-max": { coding: 90, debugging: 85, research: 70, reasoning: 85, speed: 55, longContext: 75, instruction: 85 },
105
+ "gpt-5.1-codex-mini": { coding: 65, debugging: 55, research: 40, reasoning: 50, speed: 88, longContext: 48, instruction: 72 },
106
+ "gpt-5.2": { coding: 93, debugging: 90, research: 87, reasoning: 93, speed: 42, longContext: 87, instruction: 91 },
107
+ "gpt-5.2-codex": { coding: 93, debugging: 90, research: 72, reasoning: 88, speed: 50, longContext: 78, instruction: 88 },
108
+ "gpt-5.3-codex": { coding: 94, debugging: 91, research: 74, reasoning: 89, speed: 50, longContext: 80, instruction: 89 },
109
+ "gpt-5.3-codex-spark": { coding: 68, debugging: 58, research: 42, reasoning: 52, speed: 90, longContext: 50, instruction: 74 },
110
+ "gpt-5.4": { coding: 95, debugging: 92, research: 88, reasoning: 94, speed: 42, longContext: 88, instruction: 92 },
111
+ // ── OpenAI o-series (reasoning-first) ──────────────────────────────────────
112
+ "o1": { coding: 78, debugging: 82, research: 78, reasoning: 90, speed: 20, longContext: 65, instruction: 82 },
113
+ "o3": { coding: 80, debugging: 85, research: 80, reasoning: 92, speed: 25, longContext: 70, instruction: 85 },
114
+ "o4-mini": { coding: 75, debugging: 80, research: 72, reasoning: 88, speed: 60, longContext: 65, instruction: 80 },
115
+ "o4-mini-deep-research": { coding: 75, debugging: 80, research: 85, reasoning: 88, speed: 30, longContext: 80, instruction: 80 },
116
+ // ── Google ─────────────────────────────────────────────────────────────────
88
117
  "gemini-2.5-pro": { coding: 75, debugging: 70, research: 85, reasoning: 75, speed: 55, longContext: 90, instruction: 75 },
89
118
  "gemini-2.0-flash": { coding: 50, debugging: 40, research: 50, reasoning: 40, speed: 95, longContext: 60, instruction: 65 },
119
+ "gemini-flash-2.0": { coding: 50, debugging: 40, research: 50, reasoning: 40, speed: 95, longContext: 60, instruction: 65 },
120
+ // ── DeepSeek ───────────────────────────────────────────────────────────────
90
121
  "deepseek-chat": { coding: 75, debugging: 65, research: 55, reasoning: 70, speed: 70, longContext: 55, instruction: 65 },
91
- "o3": { coding: 80, debugging: 85, research: 80, reasoning: 92, speed: 25, longContext: 70, instruction: 85 },
92
122
  };
93
123
  // ─── Base Task Requirements Data Table ───────────────────────────────────────
94
124
  // Per-unit-type base requirement vectors. Weights indicate how important each
@@ -28,6 +28,8 @@ After reflection is confirmed, decide the approach based on the actual scope —
28
28
 
29
29
  **Anti-reduction rule:** If the user describes a big vision, plan the big vision. Do not ask "what's the minimum viable version?" or try to reduce scope unless the user explicitly asks for an MVP or minimal version. When something is complex or risky, phase it into a later milestone — do not cut it. The user's ambition is the target, and your job is to sequence it intelligently, not shrink it.
30
30
 
31
+ {{preparationContext}}
32
+
31
33
  ## Mandatory Investigation Before First Question Round
32
34
 
33
35
  Before asking your first question, do a mandatory investigation pass. This is not optional.
@@ -38,6 +38,28 @@ To call this milestone complete, we must prove:
38
38
  - {{one real end-to-end scenario}}
39
39
  - {{what cannot be simulated if this milestone is to be considered truly done}}
40
40
 
41
+ ## Architectural Decisions
42
+
43
+ ### {{decisionTitle}}
44
+
45
+ **Decision:** {{decisionStatement}}
46
+
47
+ **Rationale:** {{rationale}}
48
+
49
+ **Alternatives Considered:**
50
+ - {{alternative}} — {{whyNotChosen}}
51
+
52
+ ---
53
+
54
+ > Add additional decisions as separate `### Decision Title` blocks following the same structure above.
55
+ > See `.gsd/DECISIONS.md` for the full append-only register of all project decisions.
56
+
57
+ ## Error Handling Strategy
58
+
59
+ {{errorHandlingStrategy}}
60
+
61
+ > Describe the approach for handling failures, edge cases, and error propagation. Include retry policies, fallback behaviors, and user-facing error messages where relevant.
62
+
41
63
  ## Risks and Unknowns
42
64
 
43
65
  - {{riskOrUnknown}} — {{whyItMatters}}
@@ -47,8 +69,6 @@ To call this milestone complete, we must prove:
47
69
  - `{{fileOrModule}}` — {{howItRelates}}
48
70
  - `{{fileOrModule}}` — {{howItRelates}}
49
71
 
50
- > See `.gsd/DECISIONS.md` for all architectural and pattern decisions — it is an append-only register; read it during planning, append to it during execution.
51
-
52
72
  ## Relevant Requirements
53
73
 
54
74
  - {{requirementId}} — {{howThisMilestoneAdvancesIt}}
@@ -71,6 +91,18 @@ To call this milestone complete, we must prove:
71
91
 
72
92
  - {{systemOrService}} — {{howThisMilestoneInteractsWithIt}}
73
93
 
94
+ ## Testing Requirements
95
+
96
+ {{testingRequirements}}
97
+
98
+ > Specify test types (unit, integration, e2e), coverage expectations, and specific test scenarios that must pass.
99
+
100
+ ## Acceptance Criteria
101
+
102
+ {{acceptanceCriteria}}
103
+
104
+ > Per-slice acceptance criteria gathered during discussion. Each slice should have clear, testable criteria.
105
+
74
106
  ## Open Questions
75
107
 
76
108
  - {{question}} — {{currentThinking}}
@@ -1 +1 @@
1
- ka3ShQTakcliYL-EXRRb6
1
+ 5D80IWYltFwlAJiCZ84MC
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "/_not-found/page": "/_not-found",
3
3
  "/_global-error/page": "/_global-error",
4
- "/api/boot/route": "/api/boot",
5
4
  "/api/bridge-terminal/input/route": "/api/bridge-terminal/input",
6
5
  "/api/bridge-terminal/resize/route": "/api/bridge-terminal/resize",
6
+ "/api/boot/route": "/api/boot",
7
7
  "/api/bridge-terminal/stream/route": "/api/bridge-terminal/stream",
8
8
  "/api/dev-mode/route": "/api/dev-mode",
9
9
  "/api/cleanup/route": "/api/cleanup",
10
+ "/api/doctor/route": "/api/doctor",
10
11
  "/api/captures/route": "/api/captures",
11
12
  "/api/export-data/route": "/api/export-data",
12
- "/api/doctor/route": "/api/doctor",
13
13
  "/api/forensics/route": "/api/forensics",
14
- "/api/git/route": "/api/git",
15
14
  "/api/browse-directories/route": "/api/browse-directories",
16
- "/api/history/route": "/api/history",
15
+ "/api/git/route": "/api/git",
17
16
  "/api/hooks/route": "/api/hooks",
17
+ "/api/history/route": "/api/history",
18
18
  "/api/inspect/route": "/api/inspect",
19
19
  "/api/knowledge/route": "/api/knowledge",
20
- "/api/live-state/route": "/api/live-state",
21
20
  "/api/notifications/route": "/api/notifications",
21
+ "/api/live-state/route": "/api/live-state",
22
22
  "/api/experimental/route": "/api/experimental",
23
23
  "/api/preferences/route": "/api/preferences",
24
24
  "/api/recovery/route": "/api/recovery",
@@ -26,22 +26,22 @@
26
26
  "/api/onboarding/route": "/api/onboarding",
27
27
  "/api/session/browser/route": "/api/session/browser",
28
28
  "/api/session/command/route": "/api/session/command",
29
- "/api/files/route": "/api/files",
30
29
  "/api/session/events/route": "/api/session/events",
31
- "/api/settings-data/route": "/api/settings-data",
32
30
  "/api/session/manage/route": "/api/session/manage",
33
31
  "/api/shutdown/route": "/api/shutdown",
32
+ "/api/settings-data/route": "/api/settings-data",
34
33
  "/api/skill-health/route": "/api/skill-health",
35
34
  "/api/steer/route": "/api/steer",
35
+ "/api/files/route": "/api/files",
36
36
  "/api/terminal/input/route": "/api/terminal/input",
37
37
  "/api/switch-root/route": "/api/switch-root",
38
38
  "/api/terminal/resize/route": "/api/terminal/resize",
39
- "/api/terminal/sessions/route": "/api/terminal/sessions",
40
- "/api/undo/route": "/api/undo",
41
39
  "/api/terminal/stream/route": "/api/terminal/stream",
42
- "/api/update/route": "/api/update",
43
40
  "/api/terminal/upload/route": "/api/terminal/upload",
41
+ "/api/undo/route": "/api/undo",
42
+ "/api/terminal/sessions/route": "/api/terminal/sessions",
44
43
  "/api/visualizer/route": "/api/visualizer",
45
- "/page": "/",
46
- "/api/remote-questions/route": "/api/remote-questions"
44
+ "/api/update/route": "/api/update",
45
+ "/api/remote-questions/route": "/api/remote-questions",
46
+ "/page": "/"
47
47
  }
@@ -4,14 +4,14 @@
4
4
  ],
5
5
  "devFiles": [],
6
6
  "lowPriorityFiles": [
7
- "static/ka3ShQTakcliYL-EXRRb6/_buildManifest.js",
8
- "static/ka3ShQTakcliYL-EXRRb6/_ssgManifest.js"
7
+ "static/5D80IWYltFwlAJiCZ84MC/_buildManifest.js",
8
+ "static/5D80IWYltFwlAJiCZ84MC/_ssgManifest.js"
9
9
  ],
10
10
  "rootMainFiles": [
11
11
  "static/chunks/webpack-6e4d7e9a4f57bed4.js",
12
12
  "static/chunks/4bd1b696-e356ca5ba0218e27.js",
13
13
  "static/chunks/3794-42fdce068d44fa4f.js",
14
- "static/chunks/main-app-d3d4c336195465f9.js"
14
+ "static/chunks/main-app-fdab67f7802d7832.js"
15
15
  ],
16
16
  "rootMainFilesTree": {},
17
17
  "pages": {