gsd-pi 2.75.0 → 2.76.0-dev.4100bd590

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 (1034) hide show
  1. package/README.md +208 -151
  2. package/dist/claude-cli-check.d.ts +10 -0
  3. package/dist/claude-cli-check.js +13 -3
  4. package/dist/headless-events.d.ts +1 -1
  5. package/dist/headless-events.js +5 -2
  6. package/dist/headless.js +5 -6
  7. package/dist/loader.js +0 -0
  8. package/dist/onboarding.d.ts +20 -1
  9. package/dist/onboarding.js +99 -39
  10. package/dist/resources/agents/researcher.md +1 -1
  11. package/dist/resources/extensions/ask-user-questions.js +17 -5
  12. package/dist/resources/extensions/claude-code-cli/models.js +9 -0
  13. package/dist/resources/extensions/claude-code-cli/readiness.js +34 -2
  14. package/dist/resources/extensions/claude-code-cli/stream-adapter.js +76 -4
  15. package/dist/resources/extensions/gsd/auto/detect-stuck.js +9 -0
  16. package/dist/resources/extensions/gsd/auto/loop.js +67 -4
  17. package/dist/resources/extensions/gsd/auto/phases.js +118 -53
  18. package/dist/resources/extensions/gsd/auto/resolve.js +1 -1
  19. package/dist/resources/extensions/gsd/auto/run-unit.js +10 -1
  20. package/dist/resources/extensions/gsd/auto/session.js +5 -0
  21. package/dist/resources/extensions/gsd/auto-artifact-paths.js +20 -0
  22. package/dist/resources/extensions/gsd/auto-dashboard.js +37 -8
  23. package/dist/resources/extensions/gsd/auto-direct-dispatch.js +8 -2
  24. package/dist/resources/extensions/gsd/auto-dispatch.js +120 -14
  25. package/dist/resources/extensions/gsd/auto-loop.js +1 -1
  26. package/dist/resources/extensions/gsd/auto-model-selection.js +54 -18
  27. package/dist/resources/extensions/gsd/auto-post-unit.js +10 -8
  28. package/dist/resources/extensions/gsd/auto-prompts.js +190 -46
  29. package/dist/resources/extensions/gsd/auto-recovery.js +57 -0
  30. package/dist/resources/extensions/gsd/auto-start.js +5 -3
  31. package/dist/resources/extensions/gsd/auto-verification.js +36 -3
  32. package/dist/resources/extensions/gsd/auto-worktree.js +71 -2
  33. package/dist/resources/extensions/gsd/auto.js +57 -25
  34. package/dist/resources/extensions/gsd/blocked-models.js +68 -0
  35. package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +84 -21
  36. package/dist/resources/extensions/gsd/bootstrap/db-tools.js +45 -23
  37. package/dist/resources/extensions/gsd/bootstrap/memory-tools.js +131 -0
  38. package/dist/resources/extensions/gsd/bootstrap/query-tools.js +29 -0
  39. package/dist/resources/extensions/gsd/bootstrap/register-extension.js +12 -0
  40. package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +22 -0
  41. package/dist/resources/extensions/gsd/bootstrap/system-context.js +84 -10
  42. package/dist/resources/extensions/gsd/commands/catalog.js +81 -9
  43. package/dist/resources/extensions/gsd/commands/handlers/core.js +64 -24
  44. package/dist/resources/extensions/gsd/commands/handlers/escalate.js +171 -0
  45. package/dist/resources/extensions/gsd/commands/handlers/onboarding.js +159 -0
  46. package/dist/resources/extensions/gsd/commands/handlers/ops.js +21 -0
  47. package/dist/resources/extensions/gsd/commands/handlers/workflow.js +228 -29
  48. package/dist/resources/extensions/gsd/commands-cmux.js +5 -2
  49. package/dist/resources/extensions/gsd/commands-config.js +5 -0
  50. package/dist/resources/extensions/gsd/commands-debug.js +388 -0
  51. package/dist/resources/extensions/gsd/commands-do.js +1 -0
  52. package/dist/resources/extensions/gsd/commands-extract-learnings.js +200 -77
  53. package/dist/resources/extensions/gsd/commands-handlers.js +21 -2
  54. package/dist/resources/extensions/gsd/commands-memory.js +462 -0
  55. package/dist/resources/extensions/gsd/commands-prefs-wizard.js +40 -12
  56. package/dist/resources/extensions/gsd/commands-scan.js +94 -0
  57. package/dist/resources/extensions/gsd/commands-workflow-templates.js +101 -2
  58. package/dist/resources/extensions/gsd/custom-workflow-engine.js +74 -54
  59. package/dist/resources/extensions/gsd/db-writer.js +89 -16
  60. package/dist/resources/extensions/gsd/debug-session-store.js +238 -0
  61. package/dist/resources/extensions/gsd/definition-loader.js +7 -0
  62. package/dist/resources/extensions/gsd/docs/preferences-reference.md +9 -9
  63. package/dist/resources/extensions/gsd/doctor-environment.js +2 -1
  64. package/dist/resources/extensions/gsd/doctor-git-checks.js +50 -32
  65. package/dist/resources/extensions/gsd/doctor-proactive.js +4 -1
  66. package/dist/resources/extensions/gsd/doctor-providers.js +96 -22
  67. package/dist/resources/extensions/gsd/doctor-runtime-checks.js +22 -4
  68. package/dist/resources/extensions/gsd/doctor.js +7 -1
  69. package/dist/resources/extensions/gsd/ecosystem/gsd-extension-api.js +1 -0
  70. package/dist/resources/extensions/gsd/error-classifier.js +27 -3
  71. package/dist/resources/extensions/gsd/escalation.js +321 -0
  72. package/dist/resources/extensions/gsd/forensics.js +26 -29
  73. package/dist/resources/extensions/gsd/git-service.js +0 -1
  74. package/dist/resources/extensions/gsd/graph.js +26 -2
  75. package/dist/resources/extensions/gsd/gsd-db.js +517 -32
  76. package/dist/resources/extensions/gsd/health-widget-core.js +42 -14
  77. package/dist/resources/extensions/gsd/health-widget.js +7 -4
  78. package/dist/resources/extensions/gsd/hook-emitter.js +108 -0
  79. package/dist/resources/extensions/gsd/init-wizard.js +86 -45
  80. package/dist/resources/extensions/gsd/markdown-renderer.js +5 -5
  81. package/dist/resources/extensions/gsd/memory-backfill.js +126 -0
  82. package/dist/resources/extensions/gsd/memory-embeddings.js +219 -0
  83. package/dist/resources/extensions/gsd/memory-extractor.js +78 -27
  84. package/dist/resources/extensions/gsd/memory-ingest.js +218 -0
  85. package/dist/resources/extensions/gsd/memory-relations.js +189 -0
  86. package/dist/resources/extensions/gsd/memory-source-store.js +113 -0
  87. package/dist/resources/extensions/gsd/memory-store.js +318 -6
  88. package/dist/resources/extensions/gsd/metrics.js +1 -0
  89. package/dist/resources/extensions/gsd/model-cost-table.js +3 -1
  90. package/dist/resources/extensions/gsd/model-router.js +16 -6
  91. package/dist/resources/extensions/gsd/native-git-bridge.js +137 -5
  92. package/dist/resources/extensions/gsd/notification-overlay.js +7 -22
  93. package/dist/resources/extensions/gsd/notification-widget.js +24 -39
  94. package/dist/resources/extensions/gsd/notifications.js +4 -0
  95. package/dist/resources/extensions/gsd/onboarding-state.js +133 -0
  96. package/dist/resources/extensions/gsd/post-execution-checks.js +27 -11
  97. package/dist/resources/extensions/gsd/pre-execution-checks.js +105 -8
  98. package/dist/resources/extensions/gsd/preferences-models.js +1 -0
  99. package/dist/resources/extensions/gsd/preferences-types.js +2 -1
  100. package/dist/resources/extensions/gsd/preferences-validation.js +42 -8
  101. package/dist/resources/extensions/gsd/preferences.js +10 -10
  102. package/dist/resources/extensions/gsd/prompts/add-tests.md +1 -0
  103. package/dist/resources/extensions/gsd/prompts/complete-milestone.md +4 -1
  104. package/dist/resources/extensions/gsd/prompts/complete-slice.md +2 -2
  105. package/dist/resources/extensions/gsd/prompts/debug-diagnose.md +27 -0
  106. package/dist/resources/extensions/gsd/prompts/debug-session-manager.md +80 -0
  107. package/dist/resources/extensions/gsd/prompts/execute-task.md +16 -3
  108. package/dist/resources/extensions/gsd/prompts/plan-milestone.md +12 -0
  109. package/dist/resources/extensions/gsd/prompts/plan-slice.md +2 -0
  110. package/dist/resources/extensions/gsd/prompts/refine-slice.md +69 -0
  111. package/dist/resources/extensions/gsd/prompts/research-slice.md +1 -0
  112. package/dist/resources/extensions/gsd/prompts/scan.md +79 -0
  113. package/dist/resources/extensions/gsd/prompts/workflow-oneshot.md +26 -0
  114. package/dist/resources/extensions/gsd/python-resolver.js +70 -0
  115. package/dist/resources/extensions/gsd/run-manager.js +37 -17
  116. package/dist/resources/extensions/gsd/setup-catalog.js +75 -0
  117. package/dist/resources/extensions/gsd/state.js +90 -7
  118. package/dist/resources/extensions/gsd/templates/PREFERENCES.md +7 -7
  119. package/dist/resources/extensions/gsd/tools/complete-task.js +80 -0
  120. package/dist/resources/extensions/gsd/tools/memory-tools.js +331 -0
  121. package/dist/resources/extensions/gsd/tools/plan-milestone.js +37 -12
  122. package/dist/resources/extensions/gsd/tools/plan-slice.js +5 -2
  123. package/dist/resources/extensions/gsd/tools/skip-slice.js +78 -0
  124. package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +14 -0
  125. package/dist/resources/extensions/gsd/uok/flags.js +7 -7
  126. package/dist/resources/extensions/gsd/uok/kernel.js +8 -3
  127. package/dist/resources/extensions/gsd/verification-gate.js +2 -1
  128. package/dist/resources/extensions/gsd/workflow-dispatch.js +64 -0
  129. package/dist/resources/extensions/gsd/workflow-install.js +327 -0
  130. package/dist/resources/extensions/gsd/workflow-manifest.js +8 -0
  131. package/dist/resources/extensions/gsd/workflow-mcp.js +1 -6
  132. package/dist/resources/extensions/gsd/workflow-plugins.js +346 -0
  133. package/dist/resources/extensions/gsd/workflow-projections.js +17 -15
  134. package/dist/resources/extensions/gsd/workflow-templates/accessibility-audit.md +88 -0
  135. package/dist/resources/extensions/gsd/workflow-templates/api-breaking-change.md +117 -0
  136. package/dist/resources/extensions/gsd/workflow-templates/bugfix.md +1 -0
  137. package/dist/resources/extensions/gsd/workflow-templates/changelog-gen.md +82 -0
  138. package/dist/resources/extensions/gsd/workflow-templates/ci-bootstrap.md +144 -0
  139. package/dist/resources/extensions/gsd/workflow-templates/dead-code.md +81 -0
  140. package/dist/resources/extensions/gsd/workflow-templates/dep-upgrade.md +1 -0
  141. package/dist/resources/extensions/gsd/workflow-templates/docs-sync.yaml +76 -0
  142. package/dist/resources/extensions/gsd/workflow-templates/env-audit.yaml +88 -0
  143. package/dist/resources/extensions/gsd/workflow-templates/full-project.md +1 -0
  144. package/dist/resources/extensions/gsd/workflow-templates/hotfix.md +1 -0
  145. package/dist/resources/extensions/gsd/workflow-templates/issue-triage.md +84 -0
  146. package/dist/resources/extensions/gsd/workflow-templates/observability-setup.md +133 -0
  147. package/dist/resources/extensions/gsd/workflow-templates/onboarding-check.md +74 -0
  148. package/dist/resources/extensions/gsd/workflow-templates/performance-audit.md +125 -0
  149. package/dist/resources/extensions/gsd/workflow-templates/pr-review.md +67 -0
  150. package/dist/resources/extensions/gsd/workflow-templates/pr-triage.md +83 -0
  151. package/dist/resources/extensions/gsd/workflow-templates/refactor.md +1 -0
  152. package/dist/resources/extensions/gsd/workflow-templates/registry.json +184 -0
  153. package/dist/resources/extensions/gsd/workflow-templates/release.md +118 -0
  154. package/dist/resources/extensions/gsd/workflow-templates/rename-symbol.yaml +99 -0
  155. package/dist/resources/extensions/gsd/workflow-templates/security-audit.md +1 -0
  156. package/dist/resources/extensions/gsd/workflow-templates/small-feature.md +1 -0
  157. package/dist/resources/extensions/gsd/workflow-templates/spike.md +7 -0
  158. package/dist/resources/extensions/gsd/workflow-templates/test-backfill.yaml +73 -0
  159. package/dist/resources/extensions/gsd/worktree-resolver.js +42 -1
  160. package/dist/resources/extensions/remote-questions/commands.js +380 -0
  161. package/dist/resources/extensions/remote-questions/manager.js +39 -5
  162. package/dist/resources/extensions/remote-questions/telegram-adapter.js +79 -4
  163. package/dist/resources/extensions/search-the-web/command-search-provider.js +5 -1
  164. package/dist/resources/extensions/search-the-web/native-search.js +46 -3
  165. package/dist/resources/extensions/shared/interview-ui.js +189 -1
  166. package/dist/resources/extensions/shared/layout-utils.js +17 -0
  167. package/dist/resources/extensions/shared/rtk-shared.js +47 -0
  168. package/dist/resources/extensions/shared/rtk.js +3 -46
  169. package/dist/resources/skills/api-design/SKILL.md +190 -0
  170. package/dist/resources/skills/create-mcp-server/SKILL.md +121 -0
  171. package/dist/resources/skills/create-workflow/SKILL.md +33 -6
  172. package/dist/resources/skills/decompose-into-slices/SKILL.md +139 -0
  173. package/dist/resources/skills/dependency-upgrade/SKILL.md +158 -0
  174. package/dist/resources/skills/design-an-interface/SKILL.md +102 -0
  175. package/dist/resources/skills/forensics/SKILL.md +153 -0
  176. package/dist/resources/skills/grill-me/SKILL.md +93 -0
  177. package/dist/resources/skills/handoff/SKILL.md +121 -0
  178. package/dist/resources/skills/observability/SKILL.md +174 -0
  179. package/dist/resources/skills/security-review/SKILL.md +181 -0
  180. package/dist/resources/skills/spike-wrap-up/SKILL.md +138 -0
  181. package/dist/resources/skills/tdd/SKILL.md +112 -0
  182. package/dist/resources/skills/verify-before-complete/SKILL.md +97 -0
  183. package/dist/resources/skills/write-docs/SKILL.md +81 -0
  184. package/dist/resources/skills/write-milestone-brief/SKILL.md +135 -0
  185. package/dist/rtk-shared.d.ts +10 -0
  186. package/dist/rtk-shared.js +47 -0
  187. package/dist/rtk.d.ts +2 -6
  188. package/dist/rtk.js +3 -48
  189. package/dist/shared/workspace-types.d.ts +52 -0
  190. package/dist/shared/workspace-types.js +1 -0
  191. package/dist/tsconfig.extensions.tsbuildinfo +1 -1
  192. package/dist/update-check.d.ts +10 -0
  193. package/dist/update-check.js +24 -3
  194. package/dist/web/standalone/.next/BUILD_ID +1 -1
  195. package/dist/web/standalone/.next/app-path-routes-manifest.json +16 -16
  196. package/dist/web/standalone/.next/build-manifest.json +4 -4
  197. package/dist/web/standalone/.next/prerender-manifest.json +3 -3
  198. package/dist/web/standalone/.next/react-loadable-manifest.json +2 -2
  199. package/dist/web/standalone/.next/required-server-files.json +4 -4
  200. package/dist/web/standalone/.next/server/app/_global-error/page.js +3 -3
  201. package/dist/web/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  202. package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
  203. package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
  204. package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  205. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  206. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  207. package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  208. package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  209. package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  210. package/dist/web/standalone/.next/server/app/_not-found/page.js +2 -2
  211. package/dist/web/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  212. package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
  213. package/dist/web/standalone/.next/server/app/_not-found.rsc +4 -4
  214. package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
  215. package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  216. package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
  217. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  218. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  219. package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  220. package/dist/web/standalone/.next/server/app/api/boot/route.js +1 -1
  221. package/dist/web/standalone/.next/server/app/api/boot/route.js.nft.json +1 -1
  222. package/dist/web/standalone/.next/server/app/api/boot/route_client-reference-manifest.js +1 -1
  223. package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js +1 -1
  224. package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js.nft.json +1 -1
  225. package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route_client-reference-manifest.js +1 -1
  226. package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js +1 -1
  227. package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js.nft.json +1 -1
  228. package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route_client-reference-manifest.js +1 -1
  229. package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js +2 -2
  230. package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js.nft.json +1 -1
  231. package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route_client-reference-manifest.js +1 -1
  232. package/dist/web/standalone/.next/server/app/api/browse-directories/route.js +1 -1
  233. package/dist/web/standalone/.next/server/app/api/browse-directories/route_client-reference-manifest.js +1 -1
  234. package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
  235. package/dist/web/standalone/.next/server/app/api/captures/route.js.nft.json +1 -1
  236. package/dist/web/standalone/.next/server/app/api/captures/route_client-reference-manifest.js +1 -1
  237. package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
  238. package/dist/web/standalone/.next/server/app/api/cleanup/route.js.nft.json +1 -1
  239. package/dist/web/standalone/.next/server/app/api/cleanup/route_client-reference-manifest.js +1 -1
  240. package/dist/web/standalone/.next/server/app/api/dev-mode/route.js +1 -1
  241. package/dist/web/standalone/.next/server/app/api/dev-mode/route_client-reference-manifest.js +1 -1
  242. package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
  243. package/dist/web/standalone/.next/server/app/api/doctor/route.js.nft.json +1 -1
  244. package/dist/web/standalone/.next/server/app/api/doctor/route_client-reference-manifest.js +1 -1
  245. package/dist/web/standalone/.next/server/app/api/experimental/route.js +2 -2
  246. package/dist/web/standalone/.next/server/app/api/experimental/route_client-reference-manifest.js +1 -1
  247. package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
  248. package/dist/web/standalone/.next/server/app/api/export-data/route.js.nft.json +1 -1
  249. package/dist/web/standalone/.next/server/app/api/export-data/route_client-reference-manifest.js +1 -1
  250. package/dist/web/standalone/.next/server/app/api/files/route.js +1 -1
  251. package/dist/web/standalone/.next/server/app/api/files/route.js.nft.json +1 -1
  252. package/dist/web/standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
  253. package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
  254. package/dist/web/standalone/.next/server/app/api/forensics/route.js.nft.json +1 -1
  255. package/dist/web/standalone/.next/server/app/api/forensics/route_client-reference-manifest.js +1 -1
  256. package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
  257. package/dist/web/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  258. package/dist/web/standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
  259. package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
  260. package/dist/web/standalone/.next/server/app/api/history/route.js.nft.json +1 -1
  261. package/dist/web/standalone/.next/server/app/api/history/route_client-reference-manifest.js +1 -1
  262. package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
  263. package/dist/web/standalone/.next/server/app/api/hooks/route.js.nft.json +1 -1
  264. package/dist/web/standalone/.next/server/app/api/hooks/route_client-reference-manifest.js +1 -1
  265. package/dist/web/standalone/.next/server/app/api/inspect/route.js +1 -1
  266. package/dist/web/standalone/.next/server/app/api/inspect/route.js.nft.json +1 -1
  267. package/dist/web/standalone/.next/server/app/api/inspect/route_client-reference-manifest.js +1 -1
  268. package/dist/web/standalone/.next/server/app/api/knowledge/route.js +1 -1
  269. package/dist/web/standalone/.next/server/app/api/knowledge/route.js.nft.json +1 -1
  270. package/dist/web/standalone/.next/server/app/api/knowledge/route_client-reference-manifest.js +1 -1
  271. package/dist/web/standalone/.next/server/app/api/live-state/route.js +1 -1
  272. package/dist/web/standalone/.next/server/app/api/live-state/route.js.nft.json +1 -1
  273. package/dist/web/standalone/.next/server/app/api/live-state/route_client-reference-manifest.js +1 -1
  274. package/dist/web/standalone/.next/server/app/api/notifications/route.js +2 -2
  275. package/dist/web/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  276. package/dist/web/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
  277. package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
  278. package/dist/web/standalone/.next/server/app/api/onboarding/route.js.nft.json +1 -1
  279. package/dist/web/standalone/.next/server/app/api/onboarding/route_client-reference-manifest.js +1 -1
  280. package/dist/web/standalone/.next/server/app/api/preferences/route.js +1 -1
  281. package/dist/web/standalone/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
  282. package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
  283. package/dist/web/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
  284. package/dist/web/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  285. package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
  286. package/dist/web/standalone/.next/server/app/api/recovery/route.js.nft.json +1 -1
  287. package/dist/web/standalone/.next/server/app/api/recovery/route_client-reference-manifest.js +1 -1
  288. package/dist/web/standalone/.next/server/app/api/remote-questions/route.js +2 -2
  289. package/dist/web/standalone/.next/server/app/api/remote-questions/route_client-reference-manifest.js +1 -1
  290. package/dist/web/standalone/.next/server/app/api/session/browser/route.js +1 -1
  291. package/dist/web/standalone/.next/server/app/api/session/browser/route.js.nft.json +1 -1
  292. package/dist/web/standalone/.next/server/app/api/session/browser/route_client-reference-manifest.js +1 -1
  293. package/dist/web/standalone/.next/server/app/api/session/command/route.js +1 -1
  294. package/dist/web/standalone/.next/server/app/api/session/command/route.js.nft.json +1 -1
  295. package/dist/web/standalone/.next/server/app/api/session/command/route_client-reference-manifest.js +1 -1
  296. package/dist/web/standalone/.next/server/app/api/session/events/route.js +2 -2
  297. package/dist/web/standalone/.next/server/app/api/session/events/route.js.nft.json +1 -1
  298. package/dist/web/standalone/.next/server/app/api/session/events/route_client-reference-manifest.js +1 -1
  299. package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
  300. package/dist/web/standalone/.next/server/app/api/session/manage/route.js.nft.json +1 -1
  301. package/dist/web/standalone/.next/server/app/api/session/manage/route_client-reference-manifest.js +1 -1
  302. package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
  303. package/dist/web/standalone/.next/server/app/api/settings-data/route.js.nft.json +1 -1
  304. package/dist/web/standalone/.next/server/app/api/settings-data/route_client-reference-manifest.js +1 -1
  305. package/dist/web/standalone/.next/server/app/api/shutdown/route.js +1 -1
  306. package/dist/web/standalone/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  307. package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
  308. package/dist/web/standalone/.next/server/app/api/skill-health/route.js.nft.json +1 -1
  309. package/dist/web/standalone/.next/server/app/api/skill-health/route_client-reference-manifest.js +1 -1
  310. package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
  311. package/dist/web/standalone/.next/server/app/api/steer/route.js.nft.json +1 -1
  312. package/dist/web/standalone/.next/server/app/api/steer/route_client-reference-manifest.js +1 -1
  313. package/dist/web/standalone/.next/server/app/api/switch-root/route.js +1 -1
  314. package/dist/web/standalone/.next/server/app/api/switch-root/route.js.nft.json +1 -1
  315. package/dist/web/standalone/.next/server/app/api/switch-root/route_client-reference-manifest.js +1 -1
  316. package/dist/web/standalone/.next/server/app/api/terminal/input/route.js +2 -2
  317. package/dist/web/standalone/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
  318. package/dist/web/standalone/.next/server/app/api/terminal/resize/route.js +2 -2
  319. package/dist/web/standalone/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
  320. package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +2 -2
  321. package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js.nft.json +1 -1
  322. package/dist/web/standalone/.next/server/app/api/terminal/sessions/route_client-reference-manifest.js +1 -1
  323. package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +4 -4
  324. package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
  325. package/dist/web/standalone/.next/server/app/api/terminal/stream/route_client-reference-manifest.js +1 -1
  326. package/dist/web/standalone/.next/server/app/api/terminal/upload/route.js +1 -1
  327. package/dist/web/standalone/.next/server/app/api/terminal/upload/route_client-reference-manifest.js +1 -1
  328. package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
  329. package/dist/web/standalone/.next/server/app/api/undo/route.js.nft.json +1 -1
  330. package/dist/web/standalone/.next/server/app/api/undo/route_client-reference-manifest.js +1 -1
  331. package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
  332. package/dist/web/standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  333. package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
  334. package/dist/web/standalone/.next/server/app/api/visualizer/route.js.nft.json +1 -1
  335. package/dist/web/standalone/.next/server/app/api/visualizer/route_client-reference-manifest.js +1 -1
  336. package/dist/web/standalone/.next/server/app/index.html +1 -1
  337. package/dist/web/standalone/.next/server/app/index.rsc +5 -5
  338. package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  339. package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +5 -5
  340. package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  341. package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +4 -4
  342. package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  343. package/dist/web/standalone/.next/server/app/page.js +2 -2
  344. package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  345. package/dist/web/standalone/.next/server/app-paths-manifest.json +16 -16
  346. package/dist/web/standalone/.next/server/chunks/63.js +3 -3
  347. package/dist/web/standalone/.next/server/chunks/6897.js +3 -3
  348. package/dist/web/standalone/.next/server/chunks/7461.js +1 -0
  349. package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
  350. package/dist/web/standalone/.next/server/middleware-manifest.json +5 -5
  351. package/dist/web/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
  352. package/dist/web/standalone/.next/server/middleware.js +2 -2
  353. package/dist/web/standalone/.next/server/next-font-manifest.js +1 -1
  354. package/dist/web/standalone/.next/server/next-font-manifest.json +1 -1
  355. package/dist/web/standalone/.next/server/pages/404.html +1 -1
  356. package/dist/web/standalone/.next/server/pages/500.html +1 -1
  357. package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
  358. package/dist/web/standalone/.next/static/chunks/2826.e59e8578e2e28639.js +9 -0
  359. package/dist/web/standalone/.next/static/chunks/{2008.71ee9230ad78df21.js → 3621.fc7480022c972438.js} +2 -2
  360. package/dist/web/standalone/.next/static/chunks/app/_not-found/{page-2f24283c162b6ab3.js → page-f2a7482d42a5614b.js} +1 -1
  361. package/dist/web/standalone/.next/static/chunks/app/{layout-9ecfd95f343793f0.js → layout-a16c7a7ecdf0c2cf.js} +1 -1
  362. package/dist/web/standalone/.next/static/chunks/app/page-5b113fd32bc2a1c3.js +1 -0
  363. package/dist/web/standalone/.next/static/chunks/main-app-fdab67f7802d7832.js +1 -0
  364. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-459824ffb8c323dd.js +1 -0
  365. package/dist/web/standalone/.next/static/chunks/{webpack-b868033a5834586d.js → webpack-5fc74f13a25fa1bb.js} +1 -1
  366. package/dist/web/standalone/.next/static/css/632cd626b1731d88.css +1 -0
  367. package/dist/web/standalone/node_modules/node-pty/build/Makefile +2 -2
  368. package/dist/web/standalone/node_modules/node-pty/build/Release/pty.node +0 -0
  369. package/dist/web/standalone/node_modules/node-pty/build/pty.target.mk +14 -14
  370. package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +14 -14
  371. package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +14 -14
  372. package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +14 -14
  373. package/dist/web/standalone/server.js +1 -1
  374. package/dist/welcome-screen.js +48 -24
  375. package/dist/wizard.js +2 -2
  376. package/dist/worktree-cli.d.ts +6 -5
  377. package/dist/worktree-cli.js +23 -7
  378. package/package.json +3 -3
  379. package/packages/daemon/package.json +2 -2
  380. package/packages/mcp-server/dist/server.d.ts.map +1 -1
  381. package/packages/mcp-server/dist/server.js +12 -10
  382. package/packages/mcp-server/dist/server.js.map +1 -1
  383. package/packages/mcp-server/dist/session-manager.d.ts.map +1 -1
  384. package/packages/mcp-server/dist/session-manager.js +8 -1
  385. package/packages/mcp-server/dist/session-manager.js.map +1 -1
  386. package/packages/mcp-server/dist/workflow-tools.d.ts +2 -1
  387. package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
  388. package/packages/mcp-server/dist/workflow-tools.js +306 -71
  389. package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
  390. package/packages/mcp-server/package.json +2 -2
  391. package/packages/mcp-server/src/mcp-server.test.ts +40 -4
  392. package/packages/mcp-server/src/server.ts +12 -10
  393. package/packages/mcp-server/src/session-manager.ts +10 -3
  394. package/packages/mcp-server/src/workflow-tools.test.ts +346 -1
  395. package/packages/mcp-server/src/workflow-tools.ts +359 -75
  396. package/packages/mcp-server/tsconfig.tsbuildinfo +1 -1
  397. package/packages/native/package.json +1 -1
  398. package/packages/native/tsconfig.tsbuildinfo +1 -1
  399. package/packages/pi-agent-core/dist/agent-loop.js +12 -0
  400. package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
  401. package/packages/pi-agent-core/dist/types.d.ts +30 -0
  402. package/packages/pi-agent-core/dist/types.d.ts.map +1 -1
  403. package/packages/pi-agent-core/dist/types.js.map +1 -1
  404. package/packages/pi-agent-core/package.json +1 -1
  405. package/packages/pi-agent-core/src/agent-loop.ts +14 -0
  406. package/packages/pi-agent-core/src/types.ts +34 -0
  407. package/packages/pi-agent-core/tsconfig.tsbuildinfo +1 -1
  408. package/packages/pi-ai/dist/index.d.ts +1 -0
  409. package/packages/pi-ai/dist/index.d.ts.map +1 -1
  410. package/packages/pi-ai/dist/index.js +1 -0
  411. package/packages/pi-ai/dist/index.js.map +1 -1
  412. package/packages/pi-ai/dist/models/capability-patches.d.ts.map +1 -1
  413. package/packages/pi-ai/dist/models/capability-patches.js +3 -2
  414. package/packages/pi-ai/dist/models/capability-patches.js.map +1 -1
  415. package/packages/pi-ai/dist/models/generated/amazon-bedrock.d.ts +68 -0
  416. package/packages/pi-ai/dist/models/generated/amazon-bedrock.d.ts.map +1 -1
  417. package/packages/pi-ai/dist/models/generated/amazon-bedrock.js +68 -0
  418. package/packages/pi-ai/dist/models/generated/amazon-bedrock.js.map +1 -1
  419. package/packages/pi-ai/dist/models/generated/anthropic.d.ts +17 -0
  420. package/packages/pi-ai/dist/models/generated/anthropic.d.ts.map +1 -1
  421. package/packages/pi-ai/dist/models/generated/anthropic.js +17 -0
  422. package/packages/pi-ai/dist/models/generated/anthropic.js.map +1 -1
  423. package/packages/pi-ai/dist/models/generated/google-antigravity.d.ts +17 -0
  424. package/packages/pi-ai/dist/models/generated/google-antigravity.d.ts.map +1 -1
  425. package/packages/pi-ai/dist/models/generated/google-antigravity.js +17 -0
  426. package/packages/pi-ai/dist/models/generated/google-antigravity.js.map +1 -1
  427. package/packages/pi-ai/dist/models/generated/groq.d.ts +0 -153
  428. package/packages/pi-ai/dist/models/generated/groq.d.ts.map +1 -1
  429. package/packages/pi-ai/dist/models/generated/groq.js +0 -153
  430. package/packages/pi-ai/dist/models/generated/groq.js.map +1 -1
  431. package/packages/pi-ai/dist/models/generated/index.d.ts +136 -153
  432. package/packages/pi-ai/dist/models/generated/index.d.ts.map +1 -1
  433. package/packages/pi-ai/dist/models/generated/openai-codex.d.ts +17 -0
  434. package/packages/pi-ai/dist/models/generated/openai-codex.d.ts.map +1 -1
  435. package/packages/pi-ai/dist/models/generated/openai-codex.js +17 -0
  436. package/packages/pi-ai/dist/models/generated/openai-codex.js.map +1 -1
  437. package/packages/pi-ai/dist/models/generated/openrouter.d.ts +17 -0
  438. package/packages/pi-ai/dist/models/generated/openrouter.d.ts.map +1 -1
  439. package/packages/pi-ai/dist/models/generated/openrouter.js +17 -0
  440. package/packages/pi-ai/dist/models/generated/openrouter.js.map +1 -1
  441. package/packages/pi-ai/dist/models.generated.test.js +17 -0
  442. package/packages/pi-ai/dist/models.generated.test.js.map +1 -1
  443. package/packages/pi-ai/dist/providers/amazon-bedrock.d.ts +22 -1
  444. package/packages/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
  445. package/packages/pi-ai/dist/providers/amazon-bedrock.js +40 -6
  446. package/packages/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
  447. package/packages/pi-ai/dist/providers/amazon-bedrock.test.d.ts +2 -0
  448. package/packages/pi-ai/dist/providers/amazon-bedrock.test.d.ts.map +1 -0
  449. package/packages/pi-ai/dist/providers/amazon-bedrock.test.js +106 -0
  450. package/packages/pi-ai/dist/providers/amazon-bedrock.test.js.map +1 -0
  451. package/packages/pi-ai/dist/providers/anthropic-auth.test.js +42 -1
  452. package/packages/pi-ai/dist/providers/anthropic-auth.test.js.map +1 -1
  453. package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.d.ts +2 -0
  454. package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.d.ts.map +1 -0
  455. package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.js +13 -0
  456. package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.js.map +1 -0
  457. package/packages/pi-ai/dist/providers/anthropic-shared.d.ts +20 -1
  458. package/packages/pi-ai/dist/providers/anthropic-shared.d.ts.map +1 -1
  459. package/packages/pi-ai/dist/providers/anthropic-shared.js +32 -2
  460. package/packages/pi-ai/dist/providers/anthropic-shared.js.map +1 -1
  461. package/packages/pi-ai/dist/providers/anthropic-shared.test.js +12 -1
  462. package/packages/pi-ai/dist/providers/anthropic-shared.test.js.map +1 -1
  463. package/packages/pi-ai/dist/providers/anthropic.d.ts +11 -0
  464. package/packages/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
  465. package/packages/pi-ai/dist/providers/anthropic.js +23 -2
  466. package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
  467. package/packages/pi-ai/dist/providers/api-family.d.ts +27 -0
  468. package/packages/pi-ai/dist/providers/api-family.d.ts.map +1 -0
  469. package/packages/pi-ai/dist/providers/api-family.js +47 -0
  470. package/packages/pi-ai/dist/providers/api-family.js.map +1 -0
  471. package/packages/pi-ai/dist/providers/api-family.test.d.ts +2 -0
  472. package/packages/pi-ai/dist/providers/api-family.test.d.ts.map +1 -0
  473. package/packages/pi-ai/dist/providers/api-family.test.js +101 -0
  474. package/packages/pi-ai/dist/providers/api-family.test.js.map +1 -0
  475. package/packages/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
  476. package/packages/pi-ai/dist/utils/oauth/github-copilot.js +12 -2
  477. package/packages/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
  478. package/packages/pi-ai/dist/utils/oauth/github-copilot.test.js +164 -14
  479. package/packages/pi-ai/dist/utils/oauth/github-copilot.test.js.map +1 -1
  480. package/packages/pi-ai/dist/utils/oauth/google-antigravity.d.ts.map +1 -1
  481. package/packages/pi-ai/dist/utils/oauth/google-antigravity.js +15 -3
  482. package/packages/pi-ai/dist/utils/oauth/google-antigravity.js.map +1 -1
  483. package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.d.ts +2 -0
  484. package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.d.ts.map +1 -0
  485. package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.js +67 -0
  486. package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.js.map +1 -0
  487. package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.d.ts.map +1 -1
  488. package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.js +16 -3
  489. package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.js.map +1 -1
  490. package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.d.ts +2 -0
  491. package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.d.ts.map +1 -0
  492. package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.js +67 -0
  493. package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.js.map +1 -0
  494. package/packages/pi-ai/dist/utils/oauth/oauth-providers.test.d.ts +2 -0
  495. package/packages/pi-ai/dist/utils/oauth/oauth-providers.test.d.ts.map +1 -0
  496. package/packages/pi-ai/dist/utils/oauth/oauth-providers.test.js +289 -0
  497. package/packages/pi-ai/dist/utils/oauth/oauth-providers.test.js.map +1 -0
  498. package/packages/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
  499. package/packages/pi-ai/dist/utils/oauth/openai-codex.js +12 -0
  500. package/packages/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
  501. package/packages/pi-ai/package.json +2 -2
  502. package/packages/pi-ai/scripts/generate-models.ts +50 -0
  503. package/packages/pi-ai/src/index.ts +1 -0
  504. package/packages/pi-ai/src/models/capability-patches.ts +5 -2
  505. package/packages/pi-ai/src/models/generated/amazon-bedrock.ts +68 -0
  506. package/packages/pi-ai/src/models/generated/anthropic.ts +17 -0
  507. package/packages/pi-ai/src/models/generated/google-antigravity.ts +17 -0
  508. package/packages/pi-ai/src/models/generated/groq.ts +0 -153
  509. package/packages/pi-ai/src/models/generated/openai-codex.ts +17 -0
  510. package/packages/pi-ai/src/models/generated/openrouter.ts +17 -0
  511. package/packages/pi-ai/src/models.generated.test.ts +17 -0
  512. package/packages/pi-ai/src/providers/amazon-bedrock.test.ts +164 -0
  513. package/packages/pi-ai/src/providers/amazon-bedrock.ts +41 -7
  514. package/packages/pi-ai/src/providers/anthropic-auth.test.ts +47 -1
  515. package/packages/pi-ai/src/providers/anthropic-bearer-auth.test.ts +26 -0
  516. package/packages/pi-ai/src/providers/anthropic-shared.test.ts +15 -1
  517. package/packages/pi-ai/src/providers/anthropic-shared.ts +36 -3
  518. package/packages/pi-ai/src/providers/anthropic.ts +25 -2
  519. package/packages/pi-ai/src/providers/api-family.test.ts +129 -0
  520. package/packages/pi-ai/src/providers/api-family.ts +57 -0
  521. package/packages/pi-ai/src/utils/oauth/github-copilot.test.ts +200 -23
  522. package/packages/pi-ai/src/utils/oauth/github-copilot.ts +12 -2
  523. package/packages/pi-ai/src/utils/oauth/google-antigravity.test.ts +84 -0
  524. package/packages/pi-ai/src/utils/oauth/google-antigravity.ts +15 -5
  525. package/packages/pi-ai/src/utils/oauth/google-gemini-cli.test.ts +84 -0
  526. package/packages/pi-ai/src/utils/oauth/google-gemini-cli.ts +16 -5
  527. package/packages/pi-ai/src/utils/oauth/oauth-providers.test.ts +363 -0
  528. package/packages/pi-ai/src/utils/oauth/openai-codex.ts +15 -0
  529. package/packages/pi-ai/tsconfig.tsbuildinfo +1 -1
  530. package/packages/pi-coding-agent/dist/cli/args.d.ts +6 -0
  531. package/packages/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
  532. package/packages/pi-coding-agent/dist/cli/args.js +14 -4
  533. package/packages/pi-coding-agent/dist/cli/args.js.map +1 -1
  534. package/packages/pi-coding-agent/dist/cli/args.test.d.ts +2 -0
  535. package/packages/pi-coding-agent/dist/cli/args.test.d.ts.map +1 -0
  536. package/packages/pi-coding-agent/dist/cli/args.test.js +38 -0
  537. package/packages/pi-coding-agent/dist/cli/args.test.js.map +1 -0
  538. package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.d.ts +2 -0
  539. package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.d.ts.map +1 -0
  540. package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.js +38 -0
  541. package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.js.map +1 -0
  542. package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
  543. package/packages/pi-coding-agent/dist/core/agent-session.js +25 -2
  544. package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
  545. package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +14 -0
  546. package/packages/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
  547. package/packages/pi-coding-agent/dist/core/auth-storage.js +34 -0
  548. package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
  549. package/packages/pi-coding-agent/dist/core/auth-storage.test.js +74 -0
  550. package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
  551. package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js +4 -1
  552. package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js.map +1 -1
  553. package/packages/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
  554. package/packages/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
  555. package/packages/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
  556. package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
  557. package/packages/pi-coding-agent/dist/core/extensions/loader.js +4 -0
  558. package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
  559. package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts +34 -2
  560. package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
  561. package/packages/pi-coding-agent/dist/core/extensions/runner.js +233 -0
  562. package/packages/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
  563. package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +200 -3
  564. package/packages/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
  565. package/packages/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
  566. package/packages/pi-coding-agent/dist/core/hooks-runner.d.ts +53 -0
  567. package/packages/pi-coding-agent/dist/core/hooks-runner.d.ts.map +1 -0
  568. package/packages/pi-coding-agent/dist/core/hooks-runner.js +337 -0
  569. package/packages/pi-coding-agent/dist/core/hooks-runner.js.map +1 -0
  570. package/packages/pi-coding-agent/dist/core/hooks-runner.test.d.ts +2 -0
  571. package/packages/pi-coding-agent/dist/core/hooks-runner.test.d.ts.map +1 -0
  572. package/packages/pi-coding-agent/dist/core/hooks-runner.test.js +234 -0
  573. package/packages/pi-coding-agent/dist/core/hooks-runner.test.js.map +1 -0
  574. package/packages/pi-coding-agent/dist/core/index.d.ts +1 -0
  575. package/packages/pi-coding-agent/dist/core/index.d.ts.map +1 -1
  576. package/packages/pi-coding-agent/dist/core/index.js +1 -0
  577. package/packages/pi-coding-agent/dist/core/index.js.map +1 -1
  578. package/packages/pi-coding-agent/dist/core/model-registry-auth-header.test.d.ts +2 -0
  579. package/packages/pi-coding-agent/dist/core/model-registry-auth-header.test.d.ts.map +1 -0
  580. package/packages/pi-coding-agent/dist/core/model-registry-auth-header.test.js +40 -0
  581. package/packages/pi-coding-agent/dist/core/model-registry-auth-header.test.js.map +1 -0
  582. package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js +32 -0
  583. package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js.map +1 -1
  584. package/packages/pi-coding-agent/dist/core/retry-handler.d.ts.map +1 -1
  585. package/packages/pi-coding-agent/dist/core/retry-handler.js +4 -1
  586. package/packages/pi-coding-agent/dist/core/retry-handler.js.map +1 -1
  587. package/packages/pi-coding-agent/dist/core/sdk.d.ts +10 -0
  588. package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
  589. package/packages/pi-coding-agent/dist/core/sdk.js +39 -1
  590. package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
  591. package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +55 -0
  592. package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
  593. package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
  594. package/packages/pi-coding-agent/dist/core/skill-tool.test.js +2 -2
  595. package/packages/pi-coding-agent/dist/core/skill-tool.test.js.map +1 -1
  596. package/packages/pi-coding-agent/dist/index.d.ts +1 -1
  597. package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
  598. package/packages/pi-coding-agent/dist/index.js.map +1 -1
  599. package/packages/pi-coding-agent/dist/main.d.ts.map +1 -1
  600. package/packages/pi-coding-agent/dist/main.js +3 -0
  601. package/packages/pi-coding-agent/dist/main.js.map +1 -1
  602. package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.d.ts.map +1 -1
  603. package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.js +17 -7
  604. package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.js.map +1 -1
  605. package/packages/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
  606. package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js +48 -34
  607. package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
  608. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts +4 -0
  609. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
  610. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +83 -33
  611. package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
  612. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts +70 -0
  613. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
  614. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js +77 -0
  615. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js.map +1 -0
  616. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +1 -66
  617. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  618. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js +1 -75
  619. package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
  620. package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts +1 -1
  621. package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts.map +1 -1
  622. package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js +192 -24
  623. package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +1 -1
  624. package/packages/pi-coding-agent/package.json +1 -1
  625. package/packages/pi-coding-agent/src/cli/args.test.ts +44 -0
  626. package/packages/pi-coding-agent/src/cli/args.ts +21 -6
  627. package/packages/pi-coding-agent/src/core/agent-session-abort-order.test.ts +56 -0
  628. package/packages/pi-coding-agent/src/core/agent-session.ts +27 -2
  629. package/packages/pi-coding-agent/src/core/auth-storage.test.ts +83 -0
  630. package/packages/pi-coding-agent/src/core/auth-storage.ts +35 -0
  631. package/packages/pi-coding-agent/src/core/chat-controller-ordering.test.ts +4 -1
  632. package/packages/pi-coding-agent/src/core/extensions/index.ts +16 -0
  633. package/packages/pi-coding-agent/src/core/extensions/loader.ts +5 -0
  634. package/packages/pi-coding-agent/src/core/extensions/runner.ts +353 -1
  635. package/packages/pi-coding-agent/src/core/extensions/types.ts +253 -2
  636. package/packages/pi-coding-agent/src/core/hooks-runner.test.ts +269 -0
  637. package/packages/pi-coding-agent/src/core/hooks-runner.ts +460 -0
  638. package/packages/pi-coding-agent/src/core/index.ts +10 -0
  639. package/packages/pi-coding-agent/src/core/model-registry-auth-header.test.ts +44 -0
  640. package/packages/pi-coding-agent/src/core/model-registry-auth-mode.test.ts +37 -1
  641. package/packages/pi-coding-agent/src/core/retry-handler.ts +4 -1
  642. package/packages/pi-coding-agent/src/core/sdk.ts +58 -1
  643. package/packages/pi-coding-agent/src/core/settings-manager.ts +57 -0
  644. package/packages/pi-coding-agent/src/core/skill-tool.test.ts +2 -2
  645. package/packages/pi-coding-agent/src/index.ts +16 -0
  646. package/packages/pi-coding-agent/src/main.ts +4 -0
  647. package/packages/pi-coding-agent/src/modes/interactive/components/chat-frame.ts +19 -7
  648. package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +53 -31
  649. package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +88 -36
  650. package/packages/pi-coding-agent/src/modes/interactive/theme/theme-schema.ts +83 -0
  651. package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +2 -83
  652. package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +208 -27
  653. package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
  654. package/packages/pi-tui/package.json +1 -1
  655. package/packages/pi-tui/tsconfig.tsbuildinfo +1 -1
  656. package/packages/rpc-client/package.json +1 -1
  657. package/packages/rpc-client/tsconfig.tsbuildinfo +1 -1
  658. package/pkg/dist/modes/interactive/theme/theme-schema.d.ts +70 -0
  659. package/pkg/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
  660. package/pkg/dist/modes/interactive/theme/theme-schema.js +77 -0
  661. package/pkg/dist/modes/interactive/theme/theme-schema.js.map +1 -0
  662. package/pkg/dist/modes/interactive/theme/theme.d.ts +1 -66
  663. package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  664. package/pkg/dist/modes/interactive/theme/theme.js +1 -75
  665. package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
  666. package/pkg/dist/modes/interactive/theme/themes.d.ts +1 -1
  667. package/pkg/dist/modes/interactive/theme/themes.d.ts.map +1 -1
  668. package/pkg/dist/modes/interactive/theme/themes.js +192 -24
  669. package/pkg/dist/modes/interactive/theme/themes.js.map +1 -1
  670. package/pkg/package.json +1 -1
  671. package/src/resources/agents/researcher.md +1 -1
  672. package/src/resources/extensions/ask-user-questions.ts +24 -6
  673. package/src/resources/extensions/claude-code-cli/models.ts +9 -0
  674. package/src/resources/extensions/claude-code-cli/readiness.ts +36 -2
  675. package/src/resources/extensions/claude-code-cli/stream-adapter.ts +94 -4
  676. package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +84 -0
  677. package/src/resources/extensions/gsd/auto/detect-stuck.ts +10 -0
  678. package/src/resources/extensions/gsd/auto/loop-deps.ts +2 -9
  679. package/src/resources/extensions/gsd/auto/loop.ts +109 -3
  680. package/src/resources/extensions/gsd/auto/phases.ts +146 -66
  681. package/src/resources/extensions/gsd/auto/resolve.ts +1 -1
  682. package/src/resources/extensions/gsd/auto/run-unit.ts +11 -1
  683. package/src/resources/extensions/gsd/auto/session.ts +7 -0
  684. package/src/resources/extensions/gsd/auto-artifact-paths.ts +20 -0
  685. package/src/resources/extensions/gsd/auto-dashboard.ts +46 -5
  686. package/src/resources/extensions/gsd/auto-direct-dispatch.ts +15 -2
  687. package/src/resources/extensions/gsd/auto-dispatch.ts +141 -9
  688. package/src/resources/extensions/gsd/auto-loop.ts +1 -1
  689. package/src/resources/extensions/gsd/auto-model-selection.ts +72 -18
  690. package/src/resources/extensions/gsd/auto-post-unit.ts +10 -8
  691. package/src/resources/extensions/gsd/auto-prompts.ts +232 -47
  692. package/src/resources/extensions/gsd/auto-recovery.ts +63 -1
  693. package/src/resources/extensions/gsd/auto-start.ts +8 -6
  694. package/src/resources/extensions/gsd/auto-verification.ts +36 -3
  695. package/src/resources/extensions/gsd/auto-worktree.ts +81 -1
  696. package/src/resources/extensions/gsd/auto.ts +61 -28
  697. package/src/resources/extensions/gsd/blocked-models.ts +98 -0
  698. package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +105 -21
  699. package/src/resources/extensions/gsd/bootstrap/db-tools.ts +46 -24
  700. package/src/resources/extensions/gsd/bootstrap/memory-tools.ts +163 -0
  701. package/src/resources/extensions/gsd/bootstrap/query-tools.ts +31 -0
  702. package/src/resources/extensions/gsd/bootstrap/register-extension.ts +15 -0
  703. package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +22 -0
  704. package/src/resources/extensions/gsd/bootstrap/system-context.ts +89 -10
  705. package/src/resources/extensions/gsd/commands/catalog.ts +74 -9
  706. package/src/resources/extensions/gsd/commands/handlers/core.ts +69 -27
  707. package/src/resources/extensions/gsd/commands/handlers/escalate.ts +216 -0
  708. package/src/resources/extensions/gsd/commands/handlers/onboarding.ts +196 -0
  709. package/src/resources/extensions/gsd/commands/handlers/ops.ts +21 -0
  710. package/src/resources/extensions/gsd/commands/handlers/workflow.ts +279 -29
  711. package/src/resources/extensions/gsd/commands-cmux.ts +6 -2
  712. package/src/resources/extensions/gsd/commands-config.ts +10 -0
  713. package/src/resources/extensions/gsd/commands-debug.ts +484 -0
  714. package/src/resources/extensions/gsd/commands-do.ts +1 -0
  715. package/src/resources/extensions/gsd/commands-extract-learnings.ts +262 -78
  716. package/src/resources/extensions/gsd/commands-handlers.ts +19 -2
  717. package/src/resources/extensions/gsd/commands-memory.ts +551 -0
  718. package/src/resources/extensions/gsd/commands-prefs-wizard.ts +49 -12
  719. package/src/resources/extensions/gsd/commands-scan.ts +125 -0
  720. package/src/resources/extensions/gsd/commands-workflow-templates.ts +129 -2
  721. package/src/resources/extensions/gsd/custom-workflow-engine.ts +85 -60
  722. package/src/resources/extensions/gsd/db-writer.ts +91 -17
  723. package/src/resources/extensions/gsd/debug-session-store.ts +377 -0
  724. package/src/resources/extensions/gsd/definition-loader.ts +7 -0
  725. package/src/resources/extensions/gsd/docs/preferences-reference.md +9 -9
  726. package/src/resources/extensions/gsd/doctor-environment.ts +2 -1
  727. package/src/resources/extensions/gsd/doctor-git-checks.ts +51 -30
  728. package/src/resources/extensions/gsd/doctor-proactive.ts +4 -1
  729. package/src/resources/extensions/gsd/doctor-providers.ts +109 -26
  730. package/src/resources/extensions/gsd/doctor-runtime-checks.ts +23 -4
  731. package/src/resources/extensions/gsd/doctor-types.ts +1 -0
  732. package/src/resources/extensions/gsd/doctor.ts +7 -1
  733. package/src/resources/extensions/gsd/ecosystem/gsd-extension-api.ts +2 -0
  734. package/src/resources/extensions/gsd/error-classifier.ts +32 -3
  735. package/src/resources/extensions/gsd/escalation.ts +367 -0
  736. package/src/resources/extensions/gsd/forensics.ts +25 -29
  737. package/src/resources/extensions/gsd/git-service.ts +0 -1
  738. package/src/resources/extensions/gsd/graph.ts +33 -3
  739. package/src/resources/extensions/gsd/gsd-db.ts +617 -32
  740. package/src/resources/extensions/gsd/health-widget-core.ts +43 -14
  741. package/src/resources/extensions/gsd/health-widget.ts +7 -3
  742. package/src/resources/extensions/gsd/hook-emitter.ts +188 -0
  743. package/src/resources/extensions/gsd/init-wizard.ts +87 -54
  744. package/src/resources/extensions/gsd/markdown-renderer.ts +5 -5
  745. package/src/resources/extensions/gsd/memory-backfill.ts +140 -0
  746. package/src/resources/extensions/gsd/memory-embeddings.ts +235 -0
  747. package/src/resources/extensions/gsd/memory-extractor.ts +100 -34
  748. package/src/resources/extensions/gsd/memory-ingest.ts +286 -0
  749. package/src/resources/extensions/gsd/memory-relations.ts +240 -0
  750. package/src/resources/extensions/gsd/memory-source-store.ts +138 -0
  751. package/src/resources/extensions/gsd/memory-store.ts +377 -7
  752. package/src/resources/extensions/gsd/metrics.ts +1 -0
  753. package/src/resources/extensions/gsd/model-cost-table.ts +3 -1
  754. package/src/resources/extensions/gsd/model-router.ts +25 -6
  755. package/src/resources/extensions/gsd/native-git-bridge.ts +134 -6
  756. package/src/resources/extensions/gsd/notification-overlay.ts +9 -19
  757. package/src/resources/extensions/gsd/notification-widget.ts +25 -43
  758. package/src/resources/extensions/gsd/notifications.ts +6 -0
  759. package/src/resources/extensions/gsd/onboarding-state.ts +146 -0
  760. package/src/resources/extensions/gsd/post-execution-checks.ts +37 -14
  761. package/src/resources/extensions/gsd/pre-execution-checks.ts +106 -12
  762. package/src/resources/extensions/gsd/preferences-models.ts +1 -0
  763. package/src/resources/extensions/gsd/preferences-types.ts +10 -2
  764. package/src/resources/extensions/gsd/preferences-validation.ts +33 -7
  765. package/src/resources/extensions/gsd/preferences.ts +10 -10
  766. package/src/resources/extensions/gsd/prompts/add-tests.md +1 -0
  767. package/src/resources/extensions/gsd/prompts/complete-milestone.md +4 -1
  768. package/src/resources/extensions/gsd/prompts/complete-slice.md +2 -2
  769. package/src/resources/extensions/gsd/prompts/debug-diagnose.md +27 -0
  770. package/src/resources/extensions/gsd/prompts/debug-session-manager.md +80 -0
  771. package/src/resources/extensions/gsd/prompts/execute-task.md +16 -3
  772. package/src/resources/extensions/gsd/prompts/plan-milestone.md +12 -0
  773. package/src/resources/extensions/gsd/prompts/plan-slice.md +2 -0
  774. package/src/resources/extensions/gsd/prompts/refine-slice.md +69 -0
  775. package/src/resources/extensions/gsd/prompts/research-slice.md +1 -0
  776. package/src/resources/extensions/gsd/prompts/scan.md +79 -0
  777. package/src/resources/extensions/gsd/prompts/workflow-oneshot.md +26 -0
  778. package/src/resources/extensions/gsd/python-resolver.ts +76 -0
  779. package/src/resources/extensions/gsd/run-manager.ts +53 -19
  780. package/src/resources/extensions/gsd/setup-catalog.ts +105 -0
  781. package/src/resources/extensions/gsd/state.ts +95 -6
  782. package/src/resources/extensions/gsd/templates/PREFERENCES.md +7 -7
  783. package/src/resources/extensions/gsd/tests/agent-end-retry.test.ts +1 -34
  784. package/src/resources/extensions/gsd/tests/artifact-corruption-2630.test.ts +7 -0
  785. package/src/resources/extensions/gsd/tests/auto-dashboard.test.ts +49 -0
  786. package/src/resources/extensions/gsd/tests/auto-loop.test.ts +45 -31
  787. package/src/resources/extensions/gsd/tests/auto-migrating-recovery.test.ts +63 -0
  788. package/src/resources/extensions/gsd/tests/auto-model-selection.test.ts +95 -1
  789. package/src/resources/extensions/gsd/tests/auto-prompts-fallback.test.ts +35 -0
  790. package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +123 -1
  791. package/src/resources/extensions/gsd/tests/auto-wrapup-inflight-guard.test.ts +39 -0
  792. package/src/resources/extensions/gsd/tests/autocomplete-regressions-1675.test.ts +39 -0
  793. package/src/resources/extensions/gsd/tests/blocked-models.test.ts +98 -0
  794. package/src/resources/extensions/gsd/tests/bundled-skill-triggers.test.ts +54 -0
  795. package/src/resources/extensions/gsd/tests/commands-do.test.ts +48 -0
  796. package/src/resources/extensions/gsd/tests/commands-extract-learnings.test.ts +335 -21
  797. package/src/resources/extensions/gsd/tests/commands-scan.test.ts +351 -0
  798. package/src/resources/extensions/gsd/tests/commands-workflow-custom.test.ts +8 -6
  799. package/src/resources/extensions/gsd/tests/complete-slice.test.ts +6 -8
  800. package/src/resources/extensions/gsd/tests/complete-task.test.ts +2 -2
  801. package/src/resources/extensions/gsd/tests/custom-workflow-engine.test.ts +63 -0
  802. package/src/resources/extensions/gsd/tests/debug-command-handler.test.ts +905 -0
  803. package/src/resources/extensions/gsd/tests/debug-command-lifecycle.integration.test.ts +1229 -0
  804. package/src/resources/extensions/gsd/tests/debug-session-store.test.ts +565 -0
  805. package/src/resources/extensions/gsd/tests/derive-state-db.test.ts +42 -0
  806. package/src/resources/extensions/gsd/tests/derive-state-helpers.test.ts +8 -4
  807. package/src/resources/extensions/gsd/tests/discuss-milestone-structured-questions.test.ts +64 -0
  808. package/src/resources/extensions/gsd/tests/dispatch-complete-milestone-guard.test.ts +67 -0
  809. package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +175 -17
  810. package/src/resources/extensions/gsd/tests/enhanced-verification-integration.test.ts +5 -0
  811. package/src/resources/extensions/gsd/tests/ensure-db-open.test.ts +306 -1
  812. package/src/resources/extensions/gsd/tests/escalation.test.ts +818 -0
  813. package/src/resources/extensions/gsd/tests/finalize-timeout-guard.test.ts +29 -12
  814. package/src/resources/extensions/gsd/tests/flat-rate-routing-guard.test.ts +145 -8
  815. package/src/resources/extensions/gsd/tests/forensics-hook-key-parse.test.ts +74 -0
  816. package/src/resources/extensions/gsd/tests/freeform-decisions.test.ts +62 -0
  817. package/src/resources/extensions/gsd/tests/graph-operations.test.ts +0 -4
  818. package/src/resources/extensions/gsd/tests/gsd-db.test.ts +44 -1
  819. package/src/resources/extensions/gsd/tests/health-widget.test.ts +8 -2
  820. package/src/resources/extensions/gsd/tests/init-prefs-routing.test.ts +190 -0
  821. package/src/resources/extensions/gsd/tests/integration/doctor-git-symlink-cwd.test.ts +90 -0
  822. package/src/resources/extensions/gsd/tests/integration/doctor-git.test.ts +117 -0
  823. package/src/resources/extensions/gsd/tests/integration/doctor-proactive.test.ts +44 -0
  824. package/src/resources/extensions/gsd/tests/integration/doctor-runtime.test.ts +68 -1
  825. package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +109 -11
  826. package/src/resources/extensions/gsd/tests/integration/idle-recovery.test.ts +51 -0
  827. package/src/resources/extensions/gsd/tests/integration/integration-proof.test.ts +2 -2
  828. package/src/resources/extensions/gsd/tests/integration/test-isolation.ts +53 -0
  829. package/src/resources/extensions/gsd/tests/interactive-routing-bypass.test.ts +1 -1
  830. package/src/resources/extensions/gsd/tests/journal-integration.test.ts +206 -1
  831. package/src/resources/extensions/gsd/tests/load-memory-block.test.ts +36 -0
  832. package/src/resources/extensions/gsd/tests/md-importer.test.ts +1 -1
  833. package/src/resources/extensions/gsd/tests/memory-embeddings.test.ts +213 -0
  834. package/src/resources/extensions/gsd/tests/memory-ingest.test.ts +153 -0
  835. package/src/resources/extensions/gsd/tests/memory-maintenance.test.ts +107 -0
  836. package/src/resources/extensions/gsd/tests/memory-relations.test.ts +175 -0
  837. package/src/resources/extensions/gsd/tests/memory-store.test.ts +2 -2
  838. package/src/resources/extensions/gsd/tests/memory-tools.test.ts +295 -0
  839. package/src/resources/extensions/gsd/tests/milestone-status-tool.test.ts +3 -2
  840. package/src/resources/extensions/gsd/tests/model-cost-table.test.ts +2 -2
  841. package/src/resources/extensions/gsd/tests/model-router.test.ts +51 -1
  842. package/src/resources/extensions/gsd/tests/model-unittype-mapping.test.ts +59 -0
  843. package/src/resources/extensions/gsd/tests/notification-overlay.test.ts +56 -37
  844. package/src/resources/extensions/gsd/tests/notification-widget.test.ts +1 -1
  845. package/src/resources/extensions/gsd/tests/onboarding-state.test.ts +105 -0
  846. package/src/resources/extensions/gsd/tests/plan-milestone-boundary-map-preservation.test.ts +114 -0
  847. package/src/resources/extensions/gsd/tests/plan-milestone.test.ts +4 -5
  848. package/src/resources/extensions/gsd/tests/plan-slice.test.ts +17 -0
  849. package/src/resources/extensions/gsd/tests/post-execution-checks.test.ts +105 -1
  850. package/src/resources/extensions/gsd/tests/pre-execution-checks.test.ts +341 -6
  851. package/src/resources/extensions/gsd/tests/preferences.test.ts +69 -1
  852. package/src/resources/extensions/gsd/tests/progressive-planning.test.ts +539 -0
  853. package/src/resources/extensions/gsd/tests/projection-no-plan-overwrite.test.ts +11 -2
  854. package/src/resources/extensions/gsd/tests/projection-regression.test.ts +7 -0
  855. package/src/resources/extensions/gsd/tests/prompt-budget-enforcement.test.ts +159 -8
  856. package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +24 -0
  857. package/src/resources/extensions/gsd/tests/prompt-db.test.ts +1 -1
  858. package/src/resources/extensions/gsd/tests/prompts-no-gitignored-test-refs.test.ts +56 -0
  859. package/src/resources/extensions/gsd/tests/provider-errors.test.ts +88 -4
  860. package/src/resources/extensions/gsd/tests/python-resolver.test.ts +131 -0
  861. package/src/resources/extensions/gsd/tests/register-hooks-depth-verification.test.ts +67 -0
  862. package/src/resources/extensions/gsd/tests/remote-notification-from-desktop.test.ts +107 -0
  863. package/src/resources/extensions/gsd/tests/requirements.test.ts +9 -0
  864. package/src/resources/extensions/gsd/tests/session-start-footer.test.ts +153 -0
  865. package/src/resources/extensions/gsd/tests/skip-slice-cascades-tasks.test.ts +125 -0
  866. package/src/resources/extensions/gsd/tests/slice-context-injection.test.ts +16 -4
  867. package/src/resources/extensions/gsd/tests/stash-queued-context-files.test.ts +54 -0
  868. package/src/resources/extensions/gsd/tests/state-corruption-2945.test.ts +3 -0
  869. package/src/resources/extensions/gsd/tests/stuck-detection-coverage.test.ts +15 -0
  870. package/src/resources/extensions/gsd/tests/summary-render-parity.test.ts +5 -0
  871. package/src/resources/extensions/gsd/tests/uok-contracts.test.ts +2 -1
  872. package/src/resources/extensions/gsd/tests/uok-flags.test.ts +31 -1
  873. package/src/resources/extensions/gsd/tests/uok-kernel-path.test.ts +166 -0
  874. package/src/resources/extensions/gsd/tests/validate-milestone.test.ts +9 -3
  875. package/src/resources/extensions/gsd/tests/verification-gate.test.ts +35 -0
  876. package/src/resources/extensions/gsd/tests/workflow-install.test.ts +113 -0
  877. package/src/resources/extensions/gsd/tests/workflow-logger-wiring.test.ts +15 -6
  878. package/src/resources/extensions/gsd/tests/workflow-mcp.test.ts +2 -2
  879. package/src/resources/extensions/gsd/tests/workflow-plugins.test.ts +310 -0
  880. package/src/resources/extensions/gsd/tests/workflow-projections.test.ts +7 -0
  881. package/src/resources/extensions/gsd/tests/workflow-templates.test.ts +8 -2
  882. package/src/resources/extensions/gsd/tests/workflow-tool-executors.test.ts +97 -0
  883. package/src/resources/extensions/gsd/tests/worktree-journal-events.test.ts +2 -1
  884. package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +77 -2
  885. package/src/resources/extensions/gsd/tools/complete-task.ts +87 -0
  886. package/src/resources/extensions/gsd/tools/memory-tools.ts +410 -0
  887. package/src/resources/extensions/gsd/tools/plan-milestone.ts +42 -8
  888. package/src/resources/extensions/gsd/tools/plan-slice.ts +6 -1
  889. package/src/resources/extensions/gsd/tools/skip-slice.ts +133 -0
  890. package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +14 -0
  891. package/src/resources/extensions/gsd/types.ts +62 -0
  892. package/src/resources/extensions/gsd/unit-runtime.ts +1 -0
  893. package/src/resources/extensions/gsd/uok/contracts.ts +2 -1
  894. package/src/resources/extensions/gsd/uok/flags.ts +7 -7
  895. package/src/resources/extensions/gsd/uok/kernel.ts +16 -4
  896. package/src/resources/extensions/gsd/verification-gate.ts +2 -1
  897. package/src/resources/extensions/gsd/workflow-dispatch.ts +106 -0
  898. package/src/resources/extensions/gsd/workflow-install.ts +423 -0
  899. package/src/resources/extensions/gsd/workflow-logger.ts +4 -1
  900. package/src/resources/extensions/gsd/workflow-manifest.ts +8 -0
  901. package/src/resources/extensions/gsd/workflow-mcp.ts +1 -6
  902. package/src/resources/extensions/gsd/workflow-plugins.ts +403 -0
  903. package/src/resources/extensions/gsd/workflow-projections.ts +18 -16
  904. package/src/resources/extensions/gsd/workflow-templates/accessibility-audit.md +88 -0
  905. package/src/resources/extensions/gsd/workflow-templates/api-breaking-change.md +117 -0
  906. package/src/resources/extensions/gsd/workflow-templates/bugfix.md +1 -0
  907. package/src/resources/extensions/gsd/workflow-templates/changelog-gen.md +82 -0
  908. package/src/resources/extensions/gsd/workflow-templates/ci-bootstrap.md +144 -0
  909. package/src/resources/extensions/gsd/workflow-templates/dead-code.md +81 -0
  910. package/src/resources/extensions/gsd/workflow-templates/dep-upgrade.md +1 -0
  911. package/src/resources/extensions/gsd/workflow-templates/docs-sync.yaml +76 -0
  912. package/src/resources/extensions/gsd/workflow-templates/env-audit.yaml +88 -0
  913. package/src/resources/extensions/gsd/workflow-templates/full-project.md +1 -0
  914. package/src/resources/extensions/gsd/workflow-templates/hotfix.md +1 -0
  915. package/src/resources/extensions/gsd/workflow-templates/issue-triage.md +84 -0
  916. package/src/resources/extensions/gsd/workflow-templates/observability-setup.md +133 -0
  917. package/src/resources/extensions/gsd/workflow-templates/onboarding-check.md +74 -0
  918. package/src/resources/extensions/gsd/workflow-templates/performance-audit.md +125 -0
  919. package/src/resources/extensions/gsd/workflow-templates/pr-review.md +67 -0
  920. package/src/resources/extensions/gsd/workflow-templates/pr-triage.md +83 -0
  921. package/src/resources/extensions/gsd/workflow-templates/refactor.md +1 -0
  922. package/src/resources/extensions/gsd/workflow-templates/registry.json +184 -0
  923. package/src/resources/extensions/gsd/workflow-templates/release.md +118 -0
  924. package/src/resources/extensions/gsd/workflow-templates/rename-symbol.yaml +99 -0
  925. package/src/resources/extensions/gsd/workflow-templates/security-audit.md +1 -0
  926. package/src/resources/extensions/gsd/workflow-templates/small-feature.md +1 -0
  927. package/src/resources/extensions/gsd/workflow-templates/spike.md +7 -0
  928. package/src/resources/extensions/gsd/workflow-templates/test-backfill.yaml +73 -0
  929. package/src/resources/extensions/gsd/workflow-templates.ts +7 -0
  930. package/src/resources/extensions/gsd/workspace-index.ts +9 -4
  931. package/src/resources/extensions/gsd/worktree-resolver.ts +47 -1
  932. package/src/resources/extensions/remote-questions/commands.ts +480 -0
  933. package/src/resources/extensions/remote-questions/manager.ts +49 -4
  934. package/src/resources/extensions/remote-questions/telegram-adapter.ts +86 -4
  935. package/src/resources/extensions/remote-questions/tests/command-polling.test.ts +246 -0
  936. package/src/resources/extensions/remote-questions/tests/remote-answer-normalization.test.ts +92 -0
  937. package/src/resources/extensions/remote-questions/tests/telegram-commands.test.ts +267 -0
  938. package/src/resources/extensions/search-the-web/command-search-provider.ts +5 -1
  939. package/src/resources/extensions/search-the-web/native-search.ts +50 -4
  940. package/src/resources/extensions/shared/interview-ui.ts +195 -1
  941. package/src/resources/extensions/shared/layout-utils.ts +26 -0
  942. package/src/resources/extensions/shared/rtk-shared.ts +58 -0
  943. package/src/resources/extensions/shared/rtk.ts +12 -52
  944. package/src/resources/extensions/shared/tests/interview-preview.test.ts +177 -0
  945. package/src/resources/extensions/shared/tests/preview-layout.test.ts +120 -0
  946. package/src/resources/skills/api-design/SKILL.md +190 -0
  947. package/src/resources/skills/create-mcp-server/SKILL.md +121 -0
  948. package/src/resources/skills/create-workflow/SKILL.md +33 -6
  949. package/src/resources/skills/decompose-into-slices/SKILL.md +139 -0
  950. package/src/resources/skills/dependency-upgrade/SKILL.md +158 -0
  951. package/src/resources/skills/design-an-interface/SKILL.md +102 -0
  952. package/src/resources/skills/forensics/SKILL.md +153 -0
  953. package/src/resources/skills/grill-me/SKILL.md +93 -0
  954. package/src/resources/skills/handoff/SKILL.md +121 -0
  955. package/src/resources/skills/observability/SKILL.md +174 -0
  956. package/src/resources/skills/security-review/SKILL.md +181 -0
  957. package/src/resources/skills/spike-wrap-up/SKILL.md +138 -0
  958. package/src/resources/skills/tdd/SKILL.md +112 -0
  959. package/src/resources/skills/verify-before-complete/SKILL.md +97 -0
  960. package/src/resources/skills/write-docs/SKILL.md +81 -0
  961. package/src/resources/skills/write-milestone-brief/SKILL.md +135 -0
  962. package/dist/web/standalone/.next/static/chunks/2826.dd3dc8bbd3025fa5.js +0 -9
  963. package/dist/web/standalone/.next/static/chunks/app/page-7115e62689b5fd84.js +0 -1
  964. package/dist/web/standalone/.next/static/chunks/main-app-d3d4c336195465f9.js +0 -1
  965. package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-ab5a8926e07ec673.js +0 -1
  966. package/dist/web/standalone/.next/static/css/f6e8833d46e738d8.css +0 -1
  967. package/packages/native/dist/ps/types.d.ts +0 -5
  968. package/packages/native/dist/ps/types.js +0 -2
  969. package/packages/native/src/ps/types.ts +0 -5
  970. package/packages/pi-ai/node_modules/@smithy/node-http-handler/LICENSE +0 -201
  971. package/packages/pi-ai/node_modules/@smithy/node-http-handler/README.md +0 -9
  972. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-cjs/index.js +0 -762
  973. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +0 -19
  974. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/constants.js +0 -1
  975. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +0 -9
  976. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/index.js +0 -3
  977. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +0 -230
  978. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +0 -87
  979. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +0 -32
  980. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +0 -169
  981. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +0 -21
  982. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +0 -88
  983. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +0 -36
  984. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +0 -21
  985. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +0 -22
  986. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +0 -23
  987. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +0 -8
  988. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +0 -41
  989. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +0 -21
  990. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/timing.js +0 -4
  991. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +0 -63
  992. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +0 -10
  993. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +0 -5
  994. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +0 -4
  995. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +0 -3
  996. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +0 -46
  997. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +0 -24
  998. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +0 -12
  999. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +0 -63
  1000. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +0 -13
  1001. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts +0 -12
  1002. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +0 -2
  1003. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +0 -6
  1004. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +0 -6
  1005. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +0 -2
  1006. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +0 -5
  1007. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +0 -6
  1008. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +0 -13
  1009. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +0 -8
  1010. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +0 -10
  1011. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +0 -5
  1012. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +0 -4
  1013. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +0 -3
  1014. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +0 -46
  1015. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +0 -24
  1016. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +0 -12
  1017. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +0 -63
  1018. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +0 -13
  1019. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts +0 -12
  1020. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +0 -2
  1021. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +0 -6
  1022. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +0 -6
  1023. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +0 -2
  1024. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +0 -5
  1025. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/index.d.ts +0 -6
  1026. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +0 -13
  1027. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +0 -8
  1028. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +0 -12
  1029. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +0 -12
  1030. package/packages/pi-ai/node_modules/@smithy/node-http-handler/package.json +0 -68
  1031. package/packages/pi-ai/oauth.d.ts +0 -1
  1032. package/packages/pi-ai/oauth.js +0 -1
  1033. /package/dist/web/standalone/.next/static/{prkokVQFxWtUVIku57_0z → YnUwu2WWaT0_hyTLUF4nq}/_buildManifest.js +0 -0
  1034. /package/dist/web/standalone/.next/static/{prkokVQFxWtUVIku57_0z → YnUwu2WWaT0_hyTLUF4nq}/_ssgManifest.js +0 -0
@@ -0,0 +1,138 @@
1
+ ---
2
+ name: spike-wrap-up
3
+ description: Package findings from a completed spike into a durable, project-local skill that auto-loads on future similar work. Reads the most recent `.gsd/workflows/spikes/` directory, interviews the user briefly on what's reusable, then writes `.claude/skills/<name>/SKILL.md`. Use when asked to "wrap up the spike", "package this as a skill", "make this reusable", "turn findings into a skill", or at the end of the synthesize phase of `/gsd start spike`. Closes the parity gap with GSD v1's `/gsd-spike-wrap-up`.
4
+ ---
5
+
6
+ <objective>
7
+ Convert the output of a research spike (`SCOPE.md`, `research/*.md`, `RECOMMENDATION.md`) into a project-local skill under `.claude/skills/` so that the next time a similar task comes up, the agent loads the skill automatically. This is how throwaway spikes become durable capital.
8
+ </objective>
9
+
10
+ <context>
11
+ GSD's spike workflow (`src/resources/extensions/gsd/workflow-templates/spike.md`) produces documents in `.gsd/workflows/spikes/<slug>/`. Those documents are useful once and then forgotten unless something packages them for reuse.
12
+
13
+ GSD already watches `.claude/skills/` (and `.agents/skills/`) at both user and project levels — see `src/resources/extensions/gsd/skill-discovery.ts`. Any skill written there is picked up on the next session without further wiring. This skill is the bridge from "spike done" to "skill available."
14
+
15
+ Invocation points:
16
+ - End of Phase 3 (synthesize) in `/gsd start spike` — prompt suggests running this skill
17
+ - User has a spike directory and wants to harvest it
18
+ - Pre-existing `RECOMMENDATION.md` that deserves a permanent home
19
+ </context>
20
+
21
+ <core_principle>
22
+ **NOT EVERY SPIKE DESERVES A SKILL.** If the recommendation was "don't do X," there may be no reusable guidance. Ask the user first; exit without writing if the answer is no.
23
+
24
+ **PROJECT-LOCAL, NOT USER-GLOBAL.** Write to `.claude/skills/` in the repo, not `~/.claude/skills/`. The skill encodes project-specific choices that should not leak into unrelated projects.
25
+
26
+ **DESCRIPTION IS THE DISCOVERABILITY SIGNAL.** The `description` field in frontmatter is the primary signal the agent uses to judge relevance and decide whether to load the skill — it is a heuristic, not a deterministic trigger. Write it as keywords the future agent will plausibly encounter, not a summary.
27
+ </core_principle>
28
+
29
+ <process>
30
+
31
+ ## Step 1: Find the spike
32
+
33
+ 1. List directories under `.gsd/workflows/spikes/` — sort by mtime, newest first.
34
+ 2. If multiple exist, ask the user which to wrap up. Default: the most recent.
35
+ 3. If none exist, tell the user and stop. This skill requires a completed spike.
36
+
37
+ Read the core files:
38
+ - `<spike>/SCOPE.md` — the question that was asked
39
+ - `<spike>/research/*.md` — the angles investigated
40
+ - `<spike>/RECOMMENDATION.md` — the conclusion
41
+
42
+ ## Step 2: Decide if it deserves a skill
43
+
44
+ Ask the user — one round:
45
+
46
+ 1. **Is the conclusion reusable on future work, or was it specific to one decision?**
47
+ Recommendation: packaging is worth it if the findings include repeatable guidance (how to evaluate X, a pattern to follow, a library's gotchas). If the spike ended in "we chose library Y, end of story," it probably belongs in `.gsd/DECISIONS.md` instead.
48
+
49
+ 2. **What is the trigger?** When should a future agent load this skill? Give concrete keywords — "adding a new webhook handler", "writing a SQL migration", etc.
50
+
51
+ If the user says it's not worth packaging, offer instead to append a summary to `.gsd/DECISIONS.md` and stop.
52
+
53
+ ## Step 3: Design the skill
54
+
55
+ Before writing, sketch in the conversation:
56
+
57
+ - **Name:** kebab-case, short, unambiguous. Prefix with the project's domain when helpful (`auth-webhook-setup`, not `webhook`).
58
+ - **Description (frontmatter):** one sentence, 120–1024 chars, keyword-rich. Must state when the agent should load it. Rewrite at least twice before settling.
59
+ - **Objective:** one paragraph — what the skill does and what artifact it produces.
60
+ - **Process:** numbered steps. Reference the spike's findings as the source, but the skill itself should be executable without reading the spike.
61
+ - **Anti-patterns:** gotchas the spike surfaced — things that looked right but didn't work.
62
+ - **Success criteria:** checklist the skill's user can confirm against.
63
+
64
+ Show this sketch to the user. One round of feedback. Iterate.
65
+
66
+ ## Step 4: Write the skill
67
+
68
+ Write to `.claude/skills/<name>/SKILL.md` (create the directory). Match the frontmatter + XML-tag structure used by other bundled skills — see `src/resources/skills/review/SKILL.md` for the canonical shape.
69
+
70
+ Minimum structure:
71
+
72
+ ```markdown
73
+ ---
74
+ name: <skill-name>
75
+ description: <one sentence with trigger keywords>
76
+ ---
77
+
78
+ <objective>
79
+ <one paragraph — what this skill does>
80
+ </objective>
81
+
82
+ <context>
83
+ <when to invoke, what produced it (cite the spike), assumptions>
84
+ </context>
85
+
86
+ <process>
87
+ ## Step 1: <action>
88
+ <instructions>
89
+
90
+ ## Step 2: <action>
91
+ <instructions>
92
+ </process>
93
+
94
+ <anti_patterns>
95
+ - <gotcha from the spike>
96
+ - <another gotcha>
97
+ </anti_patterns>
98
+
99
+ <success_criteria>
100
+ - [ ] <observable confirmation>
101
+ - [ ] <observable confirmation>
102
+ </success_criteria>
103
+ ```
104
+
105
+ If the spike produced a reusable template (a config file, a starter script), copy it into `.claude/skills/<name>/templates/` or `.claude/skills/<name>/references/` and reference it from the skill body.
106
+
107
+ ## Step 5: Archive the spike, link from the skill
108
+
109
+ 1. In the new SKILL.md, reference the originating spike: "Derived from `.gsd/workflows/spikes/<slug>/RECOMMENDATION.md` (dated YYYY-MM-DD)."
110
+ 2. Do NOT delete the spike directory — spikes are research artifacts and retain value for forensics.
111
+ 3. Append one line to `.gsd/DECISIONS.md`: `- YYYY-MM-DD [spike]: packaged "<slug>" findings as skill <name>`.
112
+
113
+ ## Step 6: Confirm pickup
114
+
115
+ Tell the user the skill will be surfaced on the next session via `skill-discovery.ts`. If they want to use it immediately, they can `Read .claude/skills/<name>/SKILL.md` now.
116
+
117
+ </process>
118
+
119
+ <anti_patterns>
120
+
121
+ - **Writing to `~/.claude/skills/`.** That's user-global. Project spikes produce project skills — keep them scoped.
122
+ - **Verbose frontmatter description.** The description is an index entry, not a tutorial. Keywords over prose.
123
+ - **Packaging every spike.** If the outcome was "we decided X once," append to DECISIONS.md and move on.
124
+ - **Copy-pasting the spike verbatim into the skill.** The spike is research; the skill is executable guidance. Re-author.
125
+ - **Deleting the source spike.** Research artifacts should persist.
126
+
127
+ </anti_patterns>
128
+
129
+ <success_criteria>
130
+
131
+ - [ ] A new `.claude/skills/<name>/SKILL.md` exists with well-formed frontmatter.
132
+ - [ ] The `description` field uses keywords that will plausibly match future agent work.
133
+ - [ ] The skill body is executable on its own without re-reading the originating spike.
134
+ - [ ] The originating spike is referenced from the skill.
135
+ - [ ] `.gsd/DECISIONS.md` has a one-line entry recording the packaging.
136
+ - [ ] The spike directory itself is untouched.
137
+
138
+ </success_criteria>
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: tdd
3
+ description: Test-driven development with red-green-refactor loops built around vertical slices (tracer bullets), not horizontal layers. Use when asked to "use TDD", "write test-first", "red-green-refactor", "build this with tests", or whenever a feature has a clear observable contract and would benefit from tests that outlive refactors. Complements the bundled test and add-tests skills — use this for the discipline, use those for the mechanics.
4
+ ---
5
+
6
+ <objective>
7
+ Drive feature implementation through one red-green-refactor cycle per vertical slice. Each cycle produces a single failing test that pins one observable behavior, then the minimal code that makes it pass, then refactoring while GREEN. Never refactor while RED. Never write all tests up front.
8
+ </objective>
9
+
10
+ <context>
11
+ GSD already organizes work into slices (S##) and tasks (T##). This skill operates at the task level — inside a single T##-PLAN.md, it structures the execution as a sequence of tiny red-green-refactor cycles rather than write-all-then-test or write-all-without-tests.
12
+
13
+ Invocation points:
14
+ - Task plan calls out behavior with a clear external contract (pure function, API endpoint, module boundary)
15
+ - Bug fix — write the failing repro test first, then fix
16
+ - Refactor into a new module — write the tests against the new interface first
17
+
18
+ Do not use this skill for:
19
+ - Exploratory spikes (use `/gsd start spike` — no production code ships)
20
+ - Pure UI polish where visual verification beats unit tests
21
+ - Scripts that run once and are deleted
22
+ </context>
23
+
24
+ <core_principle>
25
+ **TESTS VERIFY BEHAVIOR THROUGH PUBLIC INTERFACES, NOT IMPLEMENTATION DETAILS.** A good test reads like a specification and survives refactors. A test that mocks internals or asserts private state fails every time you clean up the code — that is a bad test pretending to be a good one.
26
+
27
+ **VERTICAL SLICES, NOT HORIZONTAL LAYERS.** Writing all tests upfront ("horizontal slicing") produces tests for behavior you imagined, not behavior the code actually exhibits. One tracer bullet at a time: write one test, make it pass, learn, write the next.
28
+
29
+ **NEVER REFACTOR WHILE RED.** Refactoring without a passing test means you are guessing whether you broke something. Get to green first. Then clean up. Then go red again for the next slice.
30
+ </core_principle>
31
+
32
+ <process>
33
+
34
+ ## Step 1: Confirm the interface
35
+
36
+ Before writing anything:
37
+
38
+ 1. What is the public interface? (function signature, HTTP route, module exports)
39
+ 2. Which behaviors matter most? List them in order of how badly you'd want to know if they broke.
40
+ 3. What does a "caller" look like? Write one example call in prose.
41
+
42
+ If the user has not supplied these, ask — one round, 1–3 questions.
43
+
44
+ ## Step 2: Tracer bullet
45
+
46
+ Pick the first behavior — usually the happy path for the most common input. Write one test that exercises it end-to-end through the public interface. Run it. It must fail (RED). If it passes, the test is not testing what you think it is — fix the test before writing any code.
47
+
48
+ Then write the minimum code to make it pass. "Minimum" means: if hard-coding `return 42` makes the test pass, hard-code `return 42`. You will generalize on the next cycle. Run the test. It must pass (GREEN).
49
+
50
+ This proves the end-to-end path works — test harness, imports, wiring, build. Everything from Step 3 onward is incremental.
51
+
52
+ ## Step 3: Red-green loop
53
+
54
+ Pick the next behavior. Write one test that pins it. Run — RED. Write the minimum code that makes it pass without breaking prior tests. Run — GREEN.
55
+
56
+ Guidelines for picking the next behavior:
57
+
58
+ - Alternate happy-path-variant and edge-case tests — don't do all happy paths then all edges.
59
+ - Stop adding happy paths when they stop revealing new code. Move to errors.
60
+ - If the next test would require no new code, you have hit the end of this slice — skip to Step 4.
61
+
62
+ Guidelines for writing the test:
63
+
64
+ - One assertion per concept (multiple `expect` calls that describe one behavior are fine).
65
+ - No mocking of internals. Mock external I/O (network, filesystem, clock) only when necessary.
66
+ - The test name reads as a sentence: "rejects requests missing an auth header".
67
+
68
+ Guidelines for writing the code:
69
+
70
+ - Minimum to pass. If there are three cases and two are untested, write only the one that's under test.
71
+ - Copy-paste is fine on the first and second occurrence. Extract on the third.
72
+
73
+ ## Step 4: Refactor while GREEN
74
+
75
+ Now that the behavior is pinned, clean up. Extract duplicated logic. Rename unclear variables. Deepen the module — move responsibilities behind the interface until the internals stop leaking into the test.
76
+
77
+ Rules:
78
+
79
+ - Every refactor keeps every test GREEN. Run tests after each small change.
80
+ - If a refactor would require changing a test, the test was coupled to implementation — either the test is wrong, or the interface you thought you were pinning is actually different. Fix the test first, then refactor.
81
+ - Don't refactor speculatively. Extract around real duplication and real seams, not imagined ones.
82
+
83
+ ## Step 5: Close the slice
84
+
85
+ When the behavior the task plan specified is fully under test and the code is clean:
86
+
87
+ 1. Run the full test suite — not just the tests you wrote. Verify no regressions.
88
+ 2. Append a one-line summary of what is now pinned to `.gsd/KNOWLEDGE.md` if the behavior is non-obvious or the test surfaced a trap future agents should know about.
89
+ 3. Use `gsd_*` tools to mark the task complete — do not edit checkboxes by hand.
90
+
91
+ </process>
92
+
93
+ <anti_patterns>
94
+
95
+ - **Writing all tests first.** Horizontal slicing. Produces imagined-behavior tests that decouple from reality.
96
+ - **Mocking internals.** `jest.mock("./internal-helper")` tells you the wiring matches your mental model, not that the behavior is correct.
97
+ - **Refactoring while RED.** You have no signal. Any change could be right or wrong.
98
+ - **"Just one more test" after GREEN without refactoring.** You accumulate duplication and the code rots in place.
99
+ - **Testing implementation detail.** "It calls `fetchUser` three times." Who cares? Test the observable result.
100
+ - **Skipping the failing run.** If you never saw RED, you don't know the test would have caught the bug.
101
+
102
+ </anti_patterns>
103
+
104
+ <success_criteria>
105
+
106
+ - [ ] Every behavior the task plan called out has a test that pins it through the public interface.
107
+ - [ ] Every test went RED before it went GREEN. No test was born passing.
108
+ - [ ] All refactoring happened on GREEN. The final code is not the first draft.
109
+ - [ ] Full test suite runs clean — no regressions.
110
+ - [ ] No test mocks an internal helper or asserts a private field.
111
+
112
+ </success_criteria>
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: verify-before-complete
3
+ description: Block completion claims until verification evidence has been produced in the current message. Use before marking a task/slice/milestone complete, before creating a commit or PR, before saying "it works" or "tests pass", and any time you are about to claim work is done. The rule is: evidence before claims, always — running the verification must happen now, not "earlier in the session". Fresh output or no claim.
4
+ ---
5
+
6
+ <objective>
7
+ Enforce the GSD "work is not done when code compiles; work is done when verification passes" contract. A completion claim without verification output generated in the current message is a broken claim. This skill is the gate.
8
+ </objective>
9
+
10
+ <context>
11
+ GSD's system prompt sets the expectation; `guided-complete-slice.md` and `auto-verification.ts` enforce it at the slice boundary. But between slice boundaries — mid-task, mid-debug, mid-review — an agent can drift into "I think it works" mode and ship broken work. This skill is the ritual to break that pattern at any completion point.
12
+
13
+ Invocation points:
14
+ - About to toggle a checkbox from `[ ]` to `[x]` via a `gsd_*` tool
15
+ - About to commit, push, or open a PR
16
+ - About to summarize a task or slice as complete
17
+ - About to say "tests pass", "build works", "lint clean", "fixed", "done"
18
+ - Replying to a user question with "yes it works" or similar
19
+ </context>
20
+
21
+ <core_principle>
22
+ **EVIDENCE BEFORE CLAIMS, ALWAYS.** "I ran it earlier" is not evidence. A log from three tool calls ago is not evidence if code has changed since. The verification must have happened *after* the last code change, in this message, with fresh output.
23
+
24
+ **VIOLATING THE LETTER IS VIOLATING THE SPIRIT.** If the principle feels inconvenient, that is the signal it is load-bearing. Find the verification command. Run it. Read the output.
25
+ </core_principle>
26
+
27
+ <process>
28
+
29
+ ## Step 1: Identify the claim
30
+
31
+ What are you about to claim? Name it precisely:
32
+
33
+ - "Tests pass" → which tests?
34
+ - "Build works" → for which target?
35
+ - "Bug is fixed" → which reproduction?
36
+ - "Task complete" → which acceptance criteria?
37
+
38
+ ## Step 2: Identify the verification command
39
+
40
+ Match claim → command:
41
+
42
+ | Claim | Verification |
43
+ |---|---|
44
+ | Tests pass | The specific test command the project uses (`npm test`, `cargo test`, `pytest`, etc.) — scoped to changed code if large suite. |
45
+ | Build works | The project's build command, for real — not `tsc --noEmit` if the project needs a bundle. |
46
+ | Lint clean | `lsp diagnostics` on edited files, plus the project's linter if CI runs one. |
47
+ | Bug fixed | The reproduction steps from the bug report or test, freshly run. |
48
+ | UI works | Browser verification via `browser_snapshot_refs` + `browser_assert` in a running app — not "it looks right in the diff". |
49
+ | Slice complete | Every acceptance criterion in `S##-PLAN.md`, re-checked against live behavior. |
50
+
51
+ If no verification command exists, the task has not produced a falsifiable claim — it is not complete. Write the verification first (see the `tdd` or `test` skill).
52
+
53
+ ## Step 3: Run it now
54
+
55
+ Use `async_bash` for one-shot commands, `bg_shell` for long-running servers/watchers. Wait for it to exit. Read the output. Not skim — read.
56
+
57
+ **If output indicates failure:** you do not have a completion claim. Loop back: inspect the error, fix, re-run until it passes or a real blocker requires user input. Do not partially claim ("tests mostly pass") — either pass or report failure honestly.
58
+
59
+ **If output indicates success:** quote the relevant line in your reply. "42 tests passing" or "Exit code 0" or "LSP reports 0 errors on the 3 edited files."
60
+
61
+ ## Step 4: Check for staleness
62
+
63
+ If you ran the verification early in this message, then made further code changes, the output is stale. Re-run. Cancel in-flight `async_bash` jobs that predated the edit (see system prompt: "stale job hygiene").
64
+
65
+ ## Step 5: Now claim
66
+
67
+ Only now, after fresh output, can you:
68
+
69
+ - Mark a task/slice/milestone complete via `gsd_*`
70
+ - Commit / push / open PR
71
+ - State "done", "fixed", "passes", "works"
72
+
73
+ Include the evidence in the claim: "Slice complete — `npm test` passed (84/84), `npm run build` exit 0, acceptance criterion 3 verified against live UI at /dashboard."
74
+
75
+ </process>
76
+
77
+ <anti_patterns>
78
+
79
+ - **"It should work"** — not verification. Run the command.
80
+ - **"Tests passed earlier"** — stale. Run them now.
81
+ - **"The code looks right"** — code review is not verification.
82
+ - **`tsc --noEmit` as the build check** when the project bundles — test what the user experiences.
83
+ - **Silent failures** — "the test was killed by a timeout so I assume it's fine." No.
84
+ - **Partial passes** — 80/84 is not "tests pass." Report the 4 failures.
85
+ - **Skipping because "I know why this works"** — your mental model is not evidence.
86
+
87
+ </anti_patterns>
88
+
89
+ <success_criteria>
90
+
91
+ - [ ] The claim is precise — not "it works" but "`npm test` passed with 84/84 tests."
92
+ - [ ] The verification command ran *after* the last code change, in this message.
93
+ - [ ] Output was read, not skimmed.
94
+ - [ ] Failures would have been caught — the verification actually tests what the claim asserts.
95
+ - [ ] Relevant evidence is quoted in the claim reply.
96
+
97
+ </success_criteria>
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: write-docs
3
+ description: Collaborative document authoring workflow for proposals, technical specs, decision docs, README sections, ADRs, and long-form prose that must work for fresh readers. Use when asked to "write the docs", "draft a proposal", "write a spec", "write an RFC", "write the README", or when a document needs to be understandable by someone without this session's context. Three stages: gather context, iterate on structure, reader-test for a stranger.
4
+ ---
5
+
6
+ <objective>
7
+ Produce documentation that works for a reader landing cold. Not a summary of what was built, not a dump of the conversation, but a document that transfers intent to someone who wasn't here. Run it through three stages — Context → Refine → Reader-Test — and don't ship until a hypothetical reader could act on it.
8
+ </objective>
9
+
10
+ <context>
11
+ GSD already produces durable artifacts (`M###-CONTEXT.md`, `S##-SUMMARY.md`, `DECISIONS.md`, `KNOWLEDGE.md`), but those are scaffolded by templates. This skill is for free-form documentation: README changes, public docs, architectural proposals, RFCs, PR descriptions, runbooks, and anything that lives under `docs/`, `mintlify-docs/`, or `gitbook/` in this repo.
12
+
13
+ Invocation points:
14
+ - User asks to write or rewrite a piece of documentation
15
+ - Before shipping a feature that adds user-facing behavior — docs need updates
16
+ - After `write-milestone-brief` when the brief needs a public-facing summary for non-GSD consumers
17
+ - PR description for a meaningful change
18
+ </context>
19
+
20
+ <core_principle>
21
+ **WRITE FOR THE FRESH READER.** The test is not "does the maintainer understand it" — you are the maintainer. The test is "can someone who has never seen this code act correctly after reading this?"
22
+
23
+ **ITERATE STRUCTURE BEFORE PROSE.** An outline that's wrong will not be saved by good sentences. Agree on the sections, what each is for, and in what order before drafting the body.
24
+
25
+ **NO FILE PATHS IN TRUNK DOCS.** Paths rot. Describe modules, behaviors, and invariants. A README that cites `src/foo.ts:42` is a future broken link.
26
+ </core_principle>
27
+
28
+ <process>
29
+
30
+ ## Stage 1: Context gathering
31
+
32
+ 1. **Who is the reader?** Internal engineer, open-source contributor, end user, future you at 3am. The answer changes everything.
33
+ 2. **What should they be able to do after reading?** Name the single post-read action. "Understand the auth flow" is not an action — "implement a new auth provider using the documented extension points" is.
34
+ 3. **What do they already know?** Assume they have docs for the language and framework, not for your codebase. Don't re-explain React; do explain your project's conventions.
35
+ 4. **What context from this conversation/codebase belongs in the doc?** Ask the user to dump any missing material. Do not invent examples.
36
+
37
+ One round of clarifying questions. Then proceed.
38
+
39
+ ## Stage 2: Refine structure
40
+
41
+ 1. **Draft an outline, not prose.** Numbered sections, one-line purpose for each. Show it to the user.
42
+ 2. **Iterate the outline.** Remove sections the reader doesn't need. Reorder so the must-knows come first. Flag sections that can't be written without more input.
43
+ 3. **Only then, fill sections.** Write the body of each section in order. Keep sentences short. Prefer concrete examples over abstractions. Show small diffs or code snippets where they clarify; skip them where they'd rot.
44
+ 4. **Draft in place.** Write directly to the target file — `docs/<name>.md`, `README.md`, `mintlify-docs/…`. Do not keep a scratch draft in the conversation.
45
+
46
+ ## Stage 3: Reader-test
47
+
48
+ 1. **Cold-read it.** Read the doc top to bottom as if you hadn't written it. Stop at every moment you thought "they already know X" — that's a gap.
49
+ 2. **Can the named post-read action be taken?** Walk through it. If yes, the doc works. If no, identify the missing piece and add it.
50
+ 3. **Cut aggressively.** Anything that isn't serving the post-read action comes out. Documentation bloat kills docs.
51
+ 4. **Offer to the user:** "Here's the draft. Want me to run a fresh sub-agent (`Agent(subagent_type=Explore)`) as a cold reader to stress-test it?"
52
+
53
+ ## Stage 4: Wire it in
54
+
55
+ 1. Link to the new doc from relevant entry points (README.md index, docs/ sidebar, mintlify-docs config, etc.).
56
+ 2. If it documents a decision, also append a one-line entry to `.gsd/DECISIONS.md` pointing at the doc.
57
+ 3. If it's a public-facing change, flag for the next release notes / CHANGELOG update.
58
+
59
+ </process>
60
+
61
+ <anti_patterns>
62
+
63
+ - **"Writing a summary of what we did"** — the reader doesn't care about the journey. Document the destination.
64
+ - **Paths and line numbers in long-lived docs.** They rot. Use module names.
65
+ - **Re-explaining general concepts.** If the reader needs to know what HTTP is, the doc is aimed at the wrong audience.
66
+ - **Starting with prose.** Outline first, always.
67
+ - **Not cold-reading.** Every doc gets one pass as if you've never seen it.
68
+ - **Claiming "done" without the reader-test.** Docs that haven't been cold-read are notes, not docs.
69
+
70
+ </anti_patterns>
71
+
72
+ <success_criteria>
73
+
74
+ - [ ] The reader and their post-read action are named explicitly.
75
+ - [ ] The outline was agreed before prose was written.
76
+ - [ ] A cold-read pass happened; gaps were closed.
77
+ - [ ] No file paths or line numbers in the trunk doc (decision-scoped ADRs may include them).
78
+ - [ ] Doc is linked from a relevant entry point — it is discoverable, not orphaned.
79
+ - [ ] The named action is actually executable after reading.
80
+
81
+ </success_criteria>
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: write-milestone-brief
3
+ description: Synthesize the current conversation into a milestone brief (PRD). Writes to `M###-CONTEXT.md` by default, or files a GitHub issue only with explicit user confirmation. Use when asked to "turn this into a PRD", "draft a milestone brief", "capture this context", "write it up", or when enough has been discussed to commit the plan to paper. Does not interview — it synthesizes what is already known.
4
+ ---
5
+
6
+ <objective>
7
+ Take everything established in the current conversation (plus repo reality) and produce a milestone brief that a future agent can execute from with zero additional context. The output is a populated `M###-CONTEXT.md`, matching the template at `src/resources/extensions/gsd/templates/context.md`. Optionally, with explicit confirmation, also a GitHub issue.
8
+ </objective>
9
+
10
+ <context>
11
+ This skill runs at the end of a discussion phase, after enough grilling/design has happened that the plan has stabilized. It does NOT interview — use the `grill-me` skill for that. This skill collapses what is already on the page into a durable artifact.
12
+
13
+ Typical invocation points:
14
+ - User says "capture this" or "write it up" after a planning discussion
15
+ - End of a `discuss` phase before moving to `plan`
16
+ - User wants to hand the work off to another agent or a human teammate
17
+ </context>
18
+
19
+ <core_principle>
20
+ **SYNTHESIZE, DO NOT RE-INTERVIEW.** Use what is already in this conversation. If a decision is genuinely missing, note it in `Open Questions` — do not relitigate.
21
+
22
+ **REAL OUTCOMES, NOT TASKS.** `M###-CONTEXT.md` describes what the user can do when the milestone ships, what scenarios must pass for "done," and what architectural decisions were made. It does NOT list tasks or implementation steps — those belong in `M###-ROADMAP.md` and `S##-PLAN.md`.
23
+
24
+ **NO FILE PATHS OR LINE NUMBERS IN THE BRIEF.** Those go stale. Describe modules, interfaces, and behaviors. The roadmap and plans can cite code locations; the brief should outlive refactors.
25
+ </core_principle>
26
+
27
+ <process>
28
+
29
+ ## Step 1: Locate the target
30
+
31
+ Find the active milestone:
32
+
33
+ 1. Read `.gsd/STATE.md` — it names the active milestone.
34
+ 2. If no milestone is active, ask the user whether this is a new milestone (create directory + files) or appending to an existing one.
35
+ 3. For a new milestone, use `gsd_milestone_new` or the `/gsd new-milestone` flow — do not create directories by hand.
36
+
37
+ ## Step 2: Read the template
38
+
39
+ Read `src/resources/extensions/gsd/templates/context.md` (the full path is shown in the `templatesDir` system-prompt field). Match its structure exactly — parsers and downstream prompts depend on the headings.
40
+
41
+ ## Step 3: Sketch the modules
42
+
43
+ Before filling the template, sketch the major modules the milestone will build or modify. Actively look for opportunities to extract **deep modules** — ones that encapsulate a lot of functionality in a simple, testable interface that rarely changes. A deep module is more testable, more AI-navigable, and survives refactors.
44
+
45
+ If the modules are non-obvious, offer the user a brief check-in: "The milestone touches modules A, B, and C. A can be extracted as a deep module that hides X. Does that match your thinking?" One round. Then proceed.
46
+
47
+ ## Step 4: Fill the template
48
+
49
+ Populate `M###-CONTEXT.md` using the template. Key sections:
50
+
51
+ - **Project Description** — one paragraph, plain English, what this milestone is.
52
+ - **Why This Milestone** — the problem it solves and why now, from the user's perspective.
53
+ - **User-Visible Outcome** — literal user actions in the real environment. "User can complete the import flow end-to-end" not "Adds import API."
54
+ - **Completion Class** — contract / integration / operational. Be honest about what level of proof is required.
55
+ - **Final Integrated Acceptance** — the real end-to-end scenarios that must pass. Name things that cannot be simulated.
56
+ - **Architectural Decisions** — one `### Decision Title` block per decision, with rationale and alternatives considered. If there were no architectural decisions, write "None — straightforward execution" and skip the subsections.
57
+ - **Error Handling Strategy** — approach for failures, edge cases, and error propagation. Include retry policies, fallback behaviors, and user-facing error messages where relevant.
58
+ - **Risks and Unknowns** — only real ones. Do not invent risks.
59
+ - **Existing Codebase / Prior Art** — module names, not line numbers. Brief description of how each relates.
60
+ - **Relevant Requirements** — requirement IDs this milestone advances and how.
61
+ - **Scope** — In Scope / Out of Scope / Non-Goals. Be specific about tempting adjacent work that is out.
62
+ - **Technical Constraints** — binding constraints (runtime, platform, dependencies, performance budgets).
63
+ - **Integration Points** — external systems/services this milestone touches and how.
64
+ - **Testing Requirements** — test types (unit, integration, e2e), coverage expectations, and specific scenarios that must pass.
65
+ - **Acceptance Criteria** — per-slice, testable criteria gathered during discussion.
66
+ - **Open Questions** — anything material that is genuinely unresolved. Note current thinking so future agents have a starting point.
67
+
68
+ > The template headings above are mandatory — do not omit, rename, or reorder them. The exact required order matches `src/resources/extensions/gsd/templates/context.md`: Project Description → Why This Milestone → User-Visible Outcome → Completion Class → Final Integrated Acceptance → Architectural Decisions → Error Handling Strategy → Risks and Unknowns → Existing Codebase / Prior Art → Relevant Requirements → Scope → Technical Constraints → Integration Points → Testing Requirements → Acceptance Criteria → Open Questions.
69
+
70
+ ## Step 5: Write it
71
+
72
+ Use the `write` tool to create or overwrite `.gsd/milestones/<MID>/<MID>-CONTEXT.md`. Do not ask for approval of the file contents before writing — the user will see the rendered file and can edit directly.
73
+
74
+ Then append a one-line summary to `.gsd/DECISIONS.md` for any genuinely hard-to-reverse architectural decision: `- YYYY-MM-DD [MID]: <decision> — <one-line rationale>`.
75
+
76
+ ## Step 6: Offer next steps
77
+
78
+ After writing, offer the user (do not auto-execute):
79
+
80
+ 1. **Proceed to planning** — run `/gsd dispatch plan` to generate `M###-ROADMAP.md` from this brief.
81
+ 2. **File as GitHub issue** — use `mcp__github__issue_write` to create a tracking issue. Requires explicit "yes" per the outward-action rule. Use the PRD template below for the body.
82
+ 3. **Iterate on the brief** — if something feels wrong, run `grill-me` to stress-test before moving on.
83
+
84
+ ### GitHub issue body template (only if user chooses option 2)
85
+
86
+ ```markdown
87
+ ## Problem Statement
88
+ <user-perspective problem — one paragraph>
89
+
90
+ ## Solution
91
+ <user-perspective solution — one paragraph>
92
+
93
+ ## User Stories
94
+ 1. As a <actor>, I want <feature>, so that <benefit>.
95
+ 2. ...
96
+ <cover all aspects; be exhaustive>
97
+
98
+ ## Architectural Decisions
99
+ <list of decisions with rationale — copy from M###-CONTEXT.md>
100
+
101
+ ## Testing Strategy
102
+ <what a good test looks like here: external behavior only, which modules get tested, prior art>
103
+
104
+ ## Out of Scope
105
+ <things explicitly not covered>
106
+
107
+ ## Further Notes
108
+ <any extra context>
109
+
110
+ ---
111
+ See `.gsd/milestones/<MID>/<MID>-CONTEXT.md` for the full brief.
112
+ ```
113
+
114
+ </process>
115
+
116
+ <anti_patterns>
117
+
118
+ - **Re-interviewing the user.** Use context, not fresh questions. If something is missing, put it in Open Questions.
119
+ - **Listing implementation tasks.** The brief describes outcomes and decisions — the roadmap and plans describe tasks.
120
+ - **Citing specific line numbers.** They rot. Cite modules or interfaces.
121
+ - **Inventing risks or decisions.** If the discussion didn't surface a real architectural choice, the Architectural Decisions section is short — that's fine.
122
+ - **Auto-filing the GitHub issue.** Any outward-facing action needs explicit confirmation.
123
+
124
+ </anti_patterns>
125
+
126
+ <success_criteria>
127
+
128
+ - [ ] `M###-CONTEXT.md` exists and follows the template structure.
129
+ - [ ] User-Visible Outcome section names literal user actions, not internal tasks.
130
+ - [ ] Completion Class is honest — no "just unit tests" when the milestone demands live integration.
131
+ - [ ] Every architectural decision has a rationale and named alternatives.
132
+ - [ ] Open Questions captures genuinely unresolved items — not decisions the user already made.
133
+ - [ ] `.gsd/DECISIONS.md` has a dated one-liner for any hard-to-reverse decision.
134
+
135
+ </success_criteria>
@@ -0,0 +1,10 @@
1
+ export declare const GSD_RTK_DISABLED_ENV = "GSD_RTK_DISABLED";
2
+ export declare const GSD_RTK_PATH_ENV = "GSD_RTK_PATH";
3
+ export declare const RTK_TELEMETRY_DISABLED_ENV = "RTK_TELEMETRY_DISABLED";
4
+ export declare function isTruthy(value: string | undefined): boolean;
5
+ export declare function isRtkEnabled(env?: NodeJS.ProcessEnv): boolean;
6
+ export declare function getManagedRtkDir(env?: NodeJS.ProcessEnv): string;
7
+ export declare function getRtkBinaryName(platform?: NodeJS.Platform): string;
8
+ export declare function getPathValue(env: NodeJS.ProcessEnv): string | undefined;
9
+ export declare function resolvePathCandidates(pathValue: string | undefined): string[];
10
+ export declare function resolveSystemRtkPath(pathValue: string | undefined, platform?: NodeJS.Platform): string | null;
@@ -0,0 +1,47 @@
1
+ import { existsSync } from "node:fs";
2
+ import { homedir as osHomedir } from "node:os";
3
+ import { delimiter, join } from "node:path";
4
+ export const GSD_RTK_DISABLED_ENV = "GSD_RTK_DISABLED";
5
+ export const GSD_RTK_PATH_ENV = "GSD_RTK_PATH";
6
+ export const RTK_TELEMETRY_DISABLED_ENV = "RTK_TELEMETRY_DISABLED";
7
+ export function isTruthy(value) {
8
+ if (!value)
9
+ return false;
10
+ const normalized = value.trim().toLowerCase();
11
+ return normalized === "1" || normalized === "true" || normalized === "yes";
12
+ }
13
+ export function isRtkEnabled(env = process.env) {
14
+ return !isTruthy(env[GSD_RTK_DISABLED_ENV]);
15
+ }
16
+ export function getManagedRtkDir(env = process.env) {
17
+ return join(env.GSD_HOME || join(osHomedir(), ".gsd"), "agent", "bin");
18
+ }
19
+ export function getRtkBinaryName(platform = process.platform) {
20
+ return platform === "win32" ? "rtk.exe" : "rtk";
21
+ }
22
+ export function getPathValue(env) {
23
+ const pathKey = Object.keys(env).find((key) => key.toLowerCase() === "path");
24
+ return pathKey ? env[pathKey] : env.PATH;
25
+ }
26
+ export function resolvePathCandidates(pathValue) {
27
+ if (!pathValue)
28
+ return [];
29
+ return pathValue
30
+ .split(delimiter)
31
+ .map((part) => part.trim())
32
+ .filter(Boolean);
33
+ }
34
+ export function resolveSystemRtkPath(pathValue, platform = process.platform) {
35
+ const candidates = platform === "win32"
36
+ ? ["rtk.exe", "rtk.cmd", "rtk.bat", "rtk"]
37
+ : ["rtk"];
38
+ for (const dir of resolvePathCandidates(pathValue)) {
39
+ for (const candidate of candidates) {
40
+ const fullPath = join(dir, candidate);
41
+ if (existsSync(fullPath)) {
42
+ return fullPath;
43
+ }
44
+ }
45
+ }
46
+ return null;
47
+ }
package/dist/rtk.d.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  import { spawnSync } from "node:child_process";
2
+ import { GSD_RTK_DISABLED_ENV, GSD_RTK_PATH_ENV, RTK_TELEMETRY_DISABLED_ENV, getManagedRtkDir, getRtkBinaryName, isRtkEnabled } from "./rtk-shared.js";
2
3
  export declare const RTK_VERSION = "0.33.1";
3
- export declare const GSD_RTK_DISABLED_ENV = "GSD_RTK_DISABLED";
4
4
  export declare const GSD_SKIP_RTK_INSTALL_ENV = "GSD_SKIP_RTK_INSTALL";
5
- export declare const GSD_RTK_PATH_ENV = "GSD_RTK_PATH";
6
- export declare const RTK_TELEMETRY_DISABLED_ENV = "RTK_TELEMETRY_DISABLED";
5
+ export { GSD_RTK_DISABLED_ENV, GSD_RTK_PATH_ENV, RTK_TELEMETRY_DISABLED_ENV, getManagedRtkDir, getRtkBinaryName, isRtkEnabled, };
7
6
  export interface EnsureRtkOptions {
8
7
  targetDir?: string;
9
8
  allowDownload?: boolean;
@@ -20,9 +19,6 @@ export interface EnsureRtkResult {
20
19
  binaryPath?: string;
21
20
  reason?: string;
22
21
  }
23
- export declare function isRtkEnabled(env?: NodeJS.ProcessEnv): boolean;
24
- export declare function getManagedRtkDir(env?: NodeJS.ProcessEnv): string;
25
- export declare function getRtkBinaryName(platform?: NodeJS.Platform): string;
26
22
  export declare function getManagedRtkPath(platform?: NodeJS.Platform, targetDir?: string): string;
27
23
  export declare function prependPathEntry(env: NodeJS.ProcessEnv, entry: string): NodeJS.ProcessEnv;
28
24
  export declare function applyRtkProcessEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;