@opengsd/gsd-pi 1.0.2-dev.e9a1b49 → 1.0.2-dev.fb7ddf1

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 (490) hide show
  1. package/README.md +63 -12
  2. package/dist/headless-answers.js +2 -1
  3. package/dist/headless-events.d.ts +1 -0
  4. package/dist/headless-events.js +8 -1
  5. package/dist/onboarding.js +22 -3
  6. package/dist/resource-loader.d.ts +7 -0
  7. package/dist/resource-loader.js +44 -9
  8. package/dist/resources/.managed-resources-content-hash +1 -1
  9. package/dist/resources/extensions/claude-code-cli/stream-adapter.js +34 -11
  10. package/dist/resources/extensions/context7/index.js +12 -2
  11. package/dist/resources/extensions/get-secrets-from-user.js +16 -16
  12. package/dist/resources/extensions/google-cli/index.js +30 -0
  13. package/dist/resources/extensions/google-cli/models.js +55 -0
  14. package/dist/resources/extensions/google-cli/package.json +11 -0
  15. package/dist/resources/extensions/google-cli/readiness.js +12 -0
  16. package/dist/resources/extensions/google-cli/stream-adapter.js +191 -0
  17. package/dist/resources/extensions/gsd/auto/loop.js +81 -1
  18. package/dist/resources/extensions/gsd/auto/orchestrator.js +4 -2
  19. package/dist/resources/extensions/gsd/auto/phases.js +38 -1
  20. package/dist/resources/extensions/gsd/auto/run-unit.js +8 -0
  21. package/dist/resources/extensions/gsd/auto/session.js +3 -0
  22. package/dist/resources/extensions/gsd/auto-dispatch.js +17 -7
  23. package/dist/resources/extensions/gsd/auto-post-unit.js +65 -16
  24. package/dist/resources/extensions/gsd/auto-prompts.js +5 -236
  25. package/dist/resources/extensions/gsd/auto-recovery.js +10 -5
  26. package/dist/resources/extensions/gsd/auto-start.js +232 -49
  27. package/dist/resources/extensions/gsd/auto-tool-tracking.js +2 -1
  28. package/dist/resources/extensions/gsd/auto-verification.js +14 -2
  29. package/dist/resources/extensions/gsd/auto-worktree.js +36 -55
  30. package/dist/resources/extensions/gsd/auto.js +40 -2
  31. package/dist/resources/extensions/gsd/bootstrap/db-tools.js +4 -3
  32. package/dist/resources/extensions/gsd/bootstrap/exec-tools.js +7 -2
  33. package/dist/resources/extensions/gsd/bootstrap/register-extension.js +39 -5
  34. package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +107 -27
  35. package/dist/resources/extensions/gsd/bootstrap/system-context.js +3 -27
  36. package/dist/resources/extensions/gsd/bootstrap/tool-search-shim.js +4 -4
  37. package/dist/resources/extensions/gsd/bootstrap/write-gate.js +1 -1
  38. package/dist/resources/extensions/gsd/closeout-recovery.js +7 -1
  39. package/dist/resources/extensions/gsd/commands/handlers/auto.js +9 -1
  40. package/dist/resources/extensions/gsd/commands-handlers.js +3 -0
  41. package/dist/resources/extensions/gsd/commands-usage.js +105 -1
  42. package/dist/resources/extensions/gsd/config-overlay.js +20 -14
  43. package/dist/resources/extensions/gsd/context-overlay.js +22 -16
  44. package/dist/resources/extensions/gsd/dashboard-overlay.js +10 -23
  45. package/dist/resources/extensions/gsd/doctor-engine-checks.js +87 -0
  46. package/dist/resources/extensions/gsd/doctor-git-checks.js +70 -5
  47. package/dist/resources/extensions/gsd/doctor-providers.js +54 -24
  48. package/dist/resources/extensions/gsd/doctor.js +7 -2
  49. package/dist/resources/extensions/gsd/git-conflict-state.js +26 -1
  50. package/dist/resources/extensions/gsd/guided-flow.js +5 -6
  51. package/dist/resources/extensions/gsd/key-manager.js +45 -13
  52. package/dist/resources/extensions/gsd/mcp-filter.js +57 -18
  53. package/dist/resources/extensions/gsd/mcp-project-config.js +15 -9
  54. package/dist/resources/extensions/gsd/migration-auto-check.js +5 -1
  55. package/dist/resources/extensions/gsd/milestone-actions.js +3 -0
  56. package/dist/resources/extensions/gsd/milestone-reopen-events.js +28 -0
  57. package/dist/resources/extensions/gsd/notification-overlay.js +8 -9
  58. package/dist/resources/extensions/gsd/parallel-merge.js +6 -4
  59. package/dist/resources/extensions/gsd/parallel-monitor-overlay.js +15 -13
  60. package/dist/resources/extensions/gsd/post-execution-checks.js +5 -4
  61. package/dist/resources/extensions/gsd/preferences-skills.js +11 -4
  62. package/dist/resources/extensions/gsd/preferences.js +14 -2
  63. package/dist/resources/extensions/gsd/prompt-loader.js +2 -0
  64. package/dist/resources/extensions/gsd/prompts/discuss.md +4 -2
  65. package/dist/resources/extensions/gsd/prompts/gate-evaluate.md +1 -1
  66. package/dist/resources/extensions/gsd/prompts/guided-discuss-milestone.md +2 -0
  67. package/dist/resources/extensions/gsd/prompts/system.md +3 -20
  68. package/dist/resources/extensions/gsd/queue-reorder-ui.js +28 -18
  69. package/dist/resources/extensions/gsd/repo-identity.js +36 -6
  70. package/dist/resources/extensions/gsd/repository-registry.js +3 -1
  71. package/dist/resources/extensions/gsd/safety/evidence-collector.js +13 -6
  72. package/dist/resources/extensions/gsd/skill-activation.js +233 -0
  73. package/dist/resources/extensions/gsd/skill-catalog.data.js +820 -0
  74. package/dist/resources/extensions/gsd/skill-catalog.install.js +179 -0
  75. package/dist/resources/extensions/gsd/skill-catalog.js +5 -1028
  76. package/dist/resources/extensions/gsd/skill-discovery.js +121 -79
  77. package/dist/resources/extensions/gsd/skill-scope.js +52 -0
  78. package/dist/resources/extensions/gsd/skill-telemetry.js +6 -39
  79. package/dist/resources/extensions/gsd/skills/gsd-headless/SKILL.md +1 -1
  80. package/dist/resources/extensions/gsd/skills.js +60 -0
  81. package/dist/resources/extensions/gsd/state-reconciliation/drift/artifact-db.js +351 -0
  82. package/dist/resources/extensions/gsd/state-reconciliation/index.js +41 -0
  83. package/dist/resources/extensions/gsd/state-reconciliation/registry.js +4 -0
  84. package/dist/resources/extensions/gsd/tools/complete-task.js +9 -0
  85. package/dist/resources/extensions/gsd/tools/exec-tool.js +42 -8
  86. package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +63 -2
  87. package/dist/resources/extensions/gsd/tui/render-kit.js +51 -0
  88. package/dist/resources/extensions/gsd/unit-context-manifest.js +35 -26
  89. package/dist/resources/extensions/gsd/user-input-boundary.js +1 -1
  90. package/dist/resources/extensions/gsd/vision-ask.js +22 -0
  91. package/dist/resources/extensions/gsd/visualizer-overlay.js +8 -36
  92. package/dist/resources/extensions/gsd/worktree-lifecycle.js +24 -3
  93. package/dist/resources/extensions/gsd/worktree-post-create-hook.js +117 -0
  94. package/dist/resources/extensions/gsd/worktree-state-projection.js +29 -0
  95. package/dist/resources/extensions/search-the-web/native-search.js +57 -8
  96. package/dist/resources/extensions/shared/confirm-ui.js +9 -6
  97. package/dist/resources/extensions/shared/dialog-frame.js +42 -0
  98. package/dist/resources/extensions/shared/interview-ui.js +42 -30
  99. package/dist/resources/extensions/shared/next-action-ui.js +6 -6
  100. package/dist/resources/extensions/subagent/index.js +8 -15
  101. package/dist/resources/shared/package-manager-detection.js +36 -0
  102. package/dist/resources/skills/agent-browser/SKILL.md +1 -1
  103. package/dist/resources/skills/api-design/SKILL.md +1 -1
  104. package/dist/resources/skills/code-optimizer/SKILL.md +6 -11
  105. package/dist/resources/skills/create-gsd-extension/SKILL.md +1 -1
  106. package/dist/resources/skills/create-mcp-server/SKILL.md +1 -1
  107. package/dist/resources/skills/create-skill/references/gsd-skill-ecosystem.md +1 -1
  108. package/dist/resources/skills/create-skill/workflows/verify-skill.md +2 -10
  109. package/dist/resources/skills/debug-like-expert/references/when-to-research.md +1 -5
  110. package/dist/resources/skills/decompose-into-slices/SKILL.md +3 -3
  111. package/dist/resources/skills/dependency-upgrade/SKILL.md +1 -1
  112. package/dist/resources/skills/forensics/SKILL.md +2 -2
  113. package/dist/resources/skills/grill-me/SKILL.md +1 -1
  114. package/dist/resources/skills/handoff/SKILL.md +1 -1
  115. package/dist/resources/skills/make-interfaces-feel-better/SKILL.md +1 -1
  116. package/dist/resources/skills/observability/SKILL.md +1 -1
  117. package/dist/resources/skills/security-review/SKILL.md +1 -1
  118. package/dist/resources/skills/spike-wrap-up/SKILL.md +1 -1
  119. package/dist/resources/skills/tdd/SKILL.md +1 -1
  120. package/dist/resources/skills/write-docs/SKILL.md +1 -1
  121. package/dist/resources/skills/write-milestone-brief/SKILL.md +1 -1
  122. package/dist/update-check.d.ts +6 -2
  123. package/dist/update-check.js +7 -3
  124. package/dist/web/standalone/.next/BUILD_ID +1 -1
  125. package/dist/web/standalone/.next/app-path-routes-manifest.json +8 -8
  126. package/dist/web/standalone/.next/build-manifest.json +2 -2
  127. package/dist/web/standalone/.next/prerender-manifest.json +3 -3
  128. package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
  129. package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
  130. package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  131. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  132. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  133. package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  134. package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  135. package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  136. package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
  137. package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
  138. package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  139. package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  140. package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  141. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  142. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  143. package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  144. package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
  145. package/dist/web/standalone/.next/server/app/index.html +1 -1
  146. package/dist/web/standalone/.next/server/app/index.rsc +1 -1
  147. package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  148. package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
  149. package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  150. package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
  151. package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  152. package/dist/web/standalone/.next/server/app-paths-manifest.json +8 -8
  153. package/dist/web/standalone/.next/server/chunks/1834.js +2 -2
  154. package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
  155. package/dist/web/standalone/.next/server/pages/404.html +1 -1
  156. package/dist/web/standalone/.next/server/pages/500.html +1 -1
  157. package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
  158. package/dist/web/standalone/node_modules/node-pty/build/Makefile +1 -1
  159. package/dist/worktree-cli.d.ts +0 -2
  160. package/dist/worktree-cli.js +21 -9
  161. package/package.json +5 -2
  162. package/packages/cloud-mcp-gateway/bin/gsd-cloud-mcp-gateway.js +14 -0
  163. package/packages/cloud-mcp-gateway/package.json +4 -3
  164. package/packages/contracts/dist/rpc.test.js +5 -0
  165. package/packages/contracts/dist/rpc.test.js.map +1 -1
  166. package/packages/contracts/dist/workflow.d.ts +15 -0
  167. package/packages/contracts/dist/workflow.d.ts.map +1 -1
  168. package/packages/contracts/dist/workflow.js +16 -0
  169. package/packages/contracts/dist/workflow.js.map +1 -1
  170. package/packages/contracts/dist/workflow.test.js +1 -0
  171. package/packages/contracts/dist/workflow.test.js.map +1 -1
  172. package/packages/contracts/package.json +1 -1
  173. package/packages/daemon/package.json +4 -4
  174. package/packages/gsd-agent-core/dist/session/agent-session-extensions.d.ts +1 -0
  175. package/packages/gsd-agent-core/dist/session/agent-session-extensions.d.ts.map +1 -1
  176. package/packages/gsd-agent-core/dist/session/agent-session-extensions.js +22 -8
  177. package/packages/gsd-agent-core/dist/session/agent-session-extensions.js.map +1 -1
  178. package/packages/gsd-agent-core/package.json +5 -5
  179. package/packages/gsd-agent-modes/dist/modes/interactive/components/dialog-container.d.ts +12 -0
  180. package/packages/gsd-agent-modes/dist/modes/interactive/components/dialog-container.d.ts.map +1 -0
  181. package/packages/gsd-agent-modes/dist/modes/interactive/components/dialog-container.js +45 -0
  182. package/packages/gsd-agent-modes/dist/modes/interactive/components/dialog-container.js.map +1 -0
  183. package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-editor.d.ts +3 -2
  184. package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
  185. package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-editor.js +11 -11
  186. package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-editor.js.map +1 -1
  187. package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-input.d.ts +3 -3
  188. package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
  189. package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-input.js +13 -11
  190. package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-input.js.map +1 -1
  191. package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-selector.d.ts +3 -3
  192. package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
  193. package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-selector.js +12 -10
  194. package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-selector.js.map +1 -1
  195. package/packages/gsd-agent-modes/dist/modes/interactive/components/index.d.ts +1 -0
  196. package/packages/gsd-agent-modes/dist/modes/interactive/components/index.d.ts.map +1 -1
  197. package/packages/gsd-agent-modes/dist/modes/interactive/components/index.js +1 -0
  198. package/packages/gsd-agent-modes/dist/modes/interactive/components/index.js.map +1 -1
  199. package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.d.ts +1 -1
  200. package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  201. package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.js +2 -2
  202. package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.js.map +1 -1
  203. package/packages/gsd-agent-modes/dist/modes/interactive/components/oauth-selector.d.ts +6 -1
  204. package/packages/gsd-agent-modes/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  205. package/packages/gsd-agent-modes/dist/modes/interactive/components/oauth-selector.js +9 -6
  206. package/packages/gsd-agent-modes/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  207. package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  208. package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.js +3 -1
  209. package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.js.map +1 -1
  210. package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.d.ts.map +1 -1
  211. package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.js +0 -2
  212. package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.js.map +1 -1
  213. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-class-constants.d.ts +1 -0
  214. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-class-constants.d.ts.map +1 -1
  215. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-class-constants.js +1 -0
  216. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-class-constants.js.map +1 -1
  217. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  218. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.js +2 -1
  219. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.js.map +1 -1
  220. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-auth.d.ts +3 -0
  221. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-auth.d.ts.map +1 -1
  222. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-auth.js +144 -2
  223. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-auth.js.map +1 -1
  224. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-session.d.ts.map +1 -1
  225. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-session.js +2 -14
  226. package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-session.js.map +1 -1
  227. package/packages/gsd-agent-modes/package.json +7 -7
  228. package/packages/mcp-server/bin/gsd-mcp-server.js +14 -0
  229. package/packages/mcp-server/dist/server.d.ts.map +1 -1
  230. package/packages/mcp-server/dist/server.js +7 -1
  231. package/packages/mcp-server/dist/server.js.map +1 -1
  232. package/packages/mcp-server/dist/workflow-tools.d.ts +13 -1
  233. package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
  234. package/packages/mcp-server/dist/workflow-tools.js +47 -8
  235. package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
  236. package/packages/mcp-server/package.json +5 -4
  237. package/packages/native/package.json +1 -1
  238. package/packages/pi-agent-core/dist/agent-loop.js +16 -14
  239. package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
  240. package/packages/pi-agent-core/dist/harness/skills.d.ts.map +1 -1
  241. package/packages/pi-agent-core/dist/harness/skills.js +6 -0
  242. package/packages/pi-agent-core/dist/harness/skills.js.map +1 -1
  243. package/packages/pi-agent-core/dist/harness/system-prompt.d.ts +7 -0
  244. package/packages/pi-agent-core/dist/harness/system-prompt.d.ts.map +1 -1
  245. package/packages/pi-agent-core/dist/harness/system-prompt.js +7 -0
  246. package/packages/pi-agent-core/dist/harness/system-prompt.js.map +1 -1
  247. package/packages/pi-agent-core/package.json +1 -1
  248. package/packages/pi-ai/bin/pi-ai.js +14 -0
  249. package/packages/pi-ai/dist/models.generated.d.ts +48 -206
  250. package/packages/pi-ai/dist/models.generated.d.ts.map +1 -1
  251. package/packages/pi-ai/dist/models.generated.js +73 -226
  252. package/packages/pi-ai/dist/models.generated.js.map +1 -1
  253. package/packages/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
  254. package/packages/pi-ai/dist/providers/anthropic.js +50 -0
  255. package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
  256. package/packages/pi-ai/dist/providers/openai-responses-shared.d.ts.map +1 -1
  257. package/packages/pi-ai/dist/providers/openai-responses-shared.js +28 -4
  258. package/packages/pi-ai/dist/providers/openai-responses-shared.js.map +1 -1
  259. package/packages/pi-ai/dist/types.d.ts +2 -0
  260. package/packages/pi-ai/dist/types.d.ts.map +1 -1
  261. package/packages/pi-ai/dist/types.js.map +1 -1
  262. package/packages/pi-ai/dist/utils/tests/tool-search-shim.test.js +29 -1
  263. package/packages/pi-ai/dist/utils/tests/tool-search-shim.test.js.map +1 -1
  264. package/packages/pi-ai/dist/utils/tool-search-shim.d.ts +4 -1
  265. package/packages/pi-ai/dist/utils/tool-search-shim.d.ts.map +1 -1
  266. package/packages/pi-ai/dist/utils/tool-search-shim.js +58 -10
  267. package/packages/pi-ai/dist/utils/tool-search-shim.js.map +1 -1
  268. package/packages/pi-ai/dist/utils/tool-shims.d.ts +1 -1
  269. package/packages/pi-ai/dist/utils/tool-shims.d.ts.map +1 -1
  270. package/packages/pi-ai/dist/utils/tool-shims.js.map +1 -1
  271. package/packages/pi-ai/package.json +3 -2
  272. package/packages/pi-coding-agent/README.md +1 -1
  273. package/packages/pi-coding-agent/dist/core/extensions/extension-upstream-types.d.ts +2 -2
  274. package/packages/pi-coding-agent/dist/core/extensions/extension-upstream-types.d.ts.map +1 -1
  275. package/packages/pi-coding-agent/dist/core/extensions/extension-upstream-types.js.map +1 -1
  276. package/packages/pi-coding-agent/dist/core/extensions/loader.js +1 -1
  277. package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
  278. package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
  279. package/packages/pi-coding-agent/dist/core/extensions/runner.js +8 -2
  280. package/packages/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
  281. package/packages/pi-coding-agent/dist/core/skills.d.ts +3 -0
  282. package/packages/pi-coding-agent/dist/core/skills.d.ts.map +1 -1
  283. package/packages/pi-coding-agent/dist/core/skills.js +3 -0
  284. package/packages/pi-coding-agent/dist/core/skills.js.map +1 -1
  285. package/packages/pi-coding-agent/dist/core/tools/edit.d.ts.map +1 -1
  286. package/packages/pi-coding-agent/dist/core/tools/edit.js +5 -7
  287. package/packages/pi-coding-agent/dist/core/tools/edit.js.map +1 -1
  288. package/packages/pi-coding-agent/dist/core/tools/read.d.ts +2 -2
  289. package/packages/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
  290. package/packages/pi-coding-agent/dist/core/tools/read.js +5 -4
  291. package/packages/pi-coding-agent/dist/core/tools/read.js.map +1 -1
  292. package/packages/pi-coding-agent/dist/core/tools/write.d.ts.map +1 -1
  293. package/packages/pi-coding-agent/dist/core/tools/write.js +0 -1
  294. package/packages/pi-coding-agent/dist/core/tools/write.js.map +1 -1
  295. package/packages/pi-coding-agent/package.json +8 -8
  296. package/packages/pi-tui/package.json +1 -1
  297. package/packages/rpc-client/package.json +2 -2
  298. package/pkg/package.json +1 -1
  299. package/scripts/install/deps.js +10 -0
  300. package/scripts/install/detect-existing.js +17 -3
  301. package/scripts/install/npm-global.js +103 -33
  302. package/scripts/install.js +1 -0
  303. package/src/resources/extensions/claude-code-cli/stream-adapter.ts +36 -11
  304. package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +86 -19
  305. package/src/resources/extensions/context7/index.ts +15 -2
  306. package/src/resources/extensions/get-secrets-from-user.ts +17 -16
  307. package/src/resources/extensions/google-cli/index.ts +34 -0
  308. package/src/resources/extensions/google-cli/models.ts +57 -0
  309. package/src/resources/extensions/google-cli/package.json +11 -0
  310. package/src/resources/extensions/google-cli/readiness.ts +15 -0
  311. package/src/resources/extensions/google-cli/stream-adapter.ts +245 -0
  312. package/src/resources/extensions/gsd/auto/loop.ts +96 -1
  313. package/src/resources/extensions/gsd/auto/orchestrator.ts +4 -2
  314. package/src/resources/extensions/gsd/auto/phases.ts +47 -1
  315. package/src/resources/extensions/gsd/auto/run-unit.ts +10 -0
  316. package/src/resources/extensions/gsd/auto/session.ts +3 -0
  317. package/src/resources/extensions/gsd/auto-dispatch.ts +31 -11
  318. package/src/resources/extensions/gsd/auto-post-unit.ts +101 -18
  319. package/src/resources/extensions/gsd/auto-prompts.ts +4 -284
  320. package/src/resources/extensions/gsd/auto-recovery.ts +10 -7
  321. package/src/resources/extensions/gsd/auto-start.ts +307 -56
  322. package/src/resources/extensions/gsd/auto-tool-tracking.ts +3 -1
  323. package/src/resources/extensions/gsd/auto-verification.ts +18 -2
  324. package/src/resources/extensions/gsd/auto-worktree.ts +47 -57
  325. package/src/resources/extensions/gsd/auto.ts +50 -2
  326. package/src/resources/extensions/gsd/bootstrap/db-tools.ts +4 -3
  327. package/src/resources/extensions/gsd/bootstrap/exec-tools.ts +9 -4
  328. package/src/resources/extensions/gsd/bootstrap/register-extension.ts +42 -5
  329. package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +124 -25
  330. package/src/resources/extensions/gsd/bootstrap/system-context.ts +3 -28
  331. package/src/resources/extensions/gsd/bootstrap/tool-search-shim.ts +4 -4
  332. package/src/resources/extensions/gsd/bootstrap/write-gate.ts +1 -1
  333. package/src/resources/extensions/gsd/closeout-recovery.ts +6 -1
  334. package/src/resources/extensions/gsd/commands/handlers/auto.ts +9 -1
  335. package/src/resources/extensions/gsd/commands-handlers.ts +2 -0
  336. package/src/resources/extensions/gsd/commands-usage.ts +110 -5
  337. package/src/resources/extensions/gsd/config-overlay.ts +19 -16
  338. package/src/resources/extensions/gsd/context-overlay.ts +24 -19
  339. package/src/resources/extensions/gsd/dashboard-overlay.ts +14 -27
  340. package/src/resources/extensions/gsd/doctor-engine-checks.ts +99 -0
  341. package/src/resources/extensions/gsd/doctor-git-checks.ts +72 -5
  342. package/src/resources/extensions/gsd/doctor-providers.ts +55 -27
  343. package/src/resources/extensions/gsd/doctor-types.ts +2 -0
  344. package/src/resources/extensions/gsd/doctor.ts +7 -2
  345. package/src/resources/extensions/gsd/git-conflict-state.ts +25 -1
  346. package/src/resources/extensions/gsd/guided-flow.ts +5 -6
  347. package/src/resources/extensions/gsd/key-manager.ts +57 -14
  348. package/src/resources/extensions/gsd/mcp-filter.ts +64 -17
  349. package/src/resources/extensions/gsd/mcp-project-config.ts +24 -9
  350. package/src/resources/extensions/gsd/migration-auto-check.ts +6 -0
  351. package/src/resources/extensions/gsd/milestone-actions.ts +2 -0
  352. package/src/resources/extensions/gsd/milestone-reopen-events.ts +28 -0
  353. package/src/resources/extensions/gsd/notification-overlay.ts +12 -11
  354. package/src/resources/extensions/gsd/parallel-merge.ts +6 -4
  355. package/src/resources/extensions/gsd/parallel-monitor-overlay.ts +16 -12
  356. package/src/resources/extensions/gsd/post-execution-checks.ts +7 -4
  357. package/src/resources/extensions/gsd/preferences-skills.ts +11 -4
  358. package/src/resources/extensions/gsd/preferences.ts +17 -2
  359. package/src/resources/extensions/gsd/prompt-loader.ts +2 -0
  360. package/src/resources/extensions/gsd/prompts/discuss.md +4 -2
  361. package/src/resources/extensions/gsd/prompts/gate-evaluate.md +1 -1
  362. package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +2 -0
  363. package/src/resources/extensions/gsd/prompts/system.md +3 -20
  364. package/src/resources/extensions/gsd/queue-reorder-ui.ts +29 -20
  365. package/src/resources/extensions/gsd/repo-identity.ts +35 -7
  366. package/src/resources/extensions/gsd/repository-registry.ts +3 -1
  367. package/src/resources/extensions/gsd/safety/evidence-collector.ts +13 -6
  368. package/src/resources/extensions/gsd/skill-activation.ts +292 -0
  369. package/src/resources/extensions/gsd/skill-catalog.data.ts +858 -0
  370. package/src/resources/extensions/gsd/skill-catalog.install.ts +205 -0
  371. package/src/resources/extensions/gsd/skill-catalog.ts +16 -1087
  372. package/src/resources/extensions/gsd/skill-discovery.ts +134 -78
  373. package/src/resources/extensions/gsd/skill-scope.ts +63 -0
  374. package/src/resources/extensions/gsd/skill-telemetry.ts +6 -40
  375. package/src/resources/extensions/gsd/skills/gsd-headless/SKILL.md +1 -1
  376. package/src/resources/extensions/gsd/skills.ts +75 -0
  377. package/src/resources/extensions/gsd/state-reconciliation/drift/artifact-db.ts +499 -0
  378. package/src/resources/extensions/gsd/state-reconciliation/index.ts +40 -0
  379. package/src/resources/extensions/gsd/state-reconciliation/registry.ts +8 -0
  380. package/src/resources/extensions/gsd/state-reconciliation/types.ts +30 -0
  381. package/src/resources/extensions/gsd/tests/auto-loop.test.ts +328 -2
  382. package/src/resources/extensions/gsd/tests/auto-orchestrator.test.ts +75 -0
  383. package/src/resources/extensions/gsd/tests/auto-post-unit-artifact-diagnostic.test.ts +28 -2
  384. package/src/resources/extensions/gsd/tests/auto-post-unit-evidence-crossref-4909.test.ts +30 -0
  385. package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +41 -0
  386. package/src/resources/extensions/gsd/tests/auto-retry-mcp-churn-fixes.test.ts +24 -0
  387. package/src/resources/extensions/gsd/tests/auto-start-orphan-bootstrap.test.ts +436 -0
  388. package/src/resources/extensions/gsd/tests/auto-worktree-untracked-content.test.ts +53 -0
  389. package/src/resources/extensions/gsd/tests/closeout-recovery.test.ts +15 -0
  390. package/src/resources/extensions/gsd/tests/collect-from-manifest.test.ts +31 -0
  391. package/src/resources/extensions/gsd/tests/commands-context.test.ts +5 -3
  392. package/src/resources/extensions/gsd/tests/commands-dispatcher-workspace-git.test.ts +15 -2
  393. package/src/resources/extensions/gsd/tests/commands-usage.test.ts +97 -0
  394. package/src/resources/extensions/gsd/tests/complete-slice-reopen-handoff.test.ts +40 -3
  395. package/src/resources/extensions/gsd/tests/context-chart.test.ts +9 -0
  396. package/src/resources/extensions/gsd/tests/custom-engine-loop-integration.test.ts +64 -0
  397. package/src/resources/extensions/gsd/tests/dashboard-overlay.test.ts +25 -0
  398. package/src/resources/extensions/gsd/tests/discord-invite-links.test.ts +1 -0
  399. package/src/resources/extensions/gsd/tests/discuss-prompt.test.ts +4 -2
  400. package/src/resources/extensions/gsd/tests/discuss-tool-scoping.test.ts +1 -1
  401. package/src/resources/extensions/gsd/tests/doctor-empty-worktree.test.ts +71 -1
  402. package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +105 -0
  403. package/src/resources/extensions/gsd/tests/doctor-scope-db-unavailable.test.ts +101 -1
  404. package/src/resources/extensions/gsd/tests/exec-sandbox.test.ts +30 -0
  405. package/src/resources/extensions/gsd/tests/guided-discuss-milestone-prompt-rendering.test.ts +6 -0
  406. package/src/resources/extensions/gsd/tests/headless-answers.test.ts +22 -3
  407. package/src/resources/extensions/gsd/tests/integration/parallel-merge.test.ts +43 -0
  408. package/src/resources/extensions/gsd/tests/interactive-tool-idle-exemption.test.ts +8 -0
  409. package/src/resources/extensions/gsd/tests/key-manager.test.ts +23 -4
  410. package/src/resources/extensions/gsd/tests/mcp-filter.test.ts +19 -1
  411. package/src/resources/extensions/gsd/tests/mcp-project-config.test.ts +24 -0
  412. package/src/resources/extensions/gsd/tests/migration-auto-check.test.ts +56 -1
  413. package/src/resources/extensions/gsd/tests/notification-overlay.test.ts +6 -1
  414. package/src/resources/extensions/gsd/tests/orphaned-worktree-audit.test.ts +70 -10
  415. package/src/resources/extensions/gsd/tests/parallel-monitor-overlay.test.ts +7 -1
  416. package/src/resources/extensions/gsd/tests/park-milestone.test.ts +9 -0
  417. package/src/resources/extensions/gsd/tests/post-exec-retry-bypass.test.ts +127 -10
  418. package/src/resources/extensions/gsd/tests/post-execution-checks.test.ts +44 -0
  419. package/src/resources/extensions/gsd/tests/post-unit-retry-on-orchestrator-bridge.test.ts +93 -0
  420. package/src/resources/extensions/gsd/tests/project-relocation-recovery.test.ts +101 -0
  421. package/src/resources/extensions/gsd/tests/queue-reorder-ui.test.ts +46 -0
  422. package/src/resources/extensions/gsd/tests/register-extension-guard.test.ts +116 -11
  423. package/src/resources/extensions/gsd/tests/repo-identity-worktree.test.ts +27 -0
  424. package/src/resources/extensions/gsd/tests/repository-registry.test.ts +30 -1
  425. package/src/resources/extensions/gsd/tests/show-config-command.test.ts +4 -0
  426. package/src/resources/extensions/gsd/tests/skill-discovery.test.ts +111 -0
  427. package/src/resources/extensions/gsd/tests/skill-scope-auto.test.ts +67 -0
  428. package/src/resources/extensions/gsd/tests/skills.test.ts +55 -0
  429. package/src/resources/extensions/gsd/tests/start-auto-detached.test.ts +13 -2
  430. package/src/resources/extensions/gsd/tests/state-reconciliation-drift.test.ts +303 -0
  431. package/src/resources/extensions/gsd/tests/token-tool-gating.test.ts +67 -1
  432. package/src/resources/extensions/gsd/tests/tool-param-optionality.test.ts +24 -1
  433. package/src/resources/extensions/gsd/tests/tui-border-assertions.ts +28 -0
  434. package/src/resources/extensions/gsd/tests/tui-render-kit.test.ts +14 -0
  435. package/src/resources/extensions/gsd/tests/unit-context-manifest.test.ts +18 -0
  436. package/src/resources/extensions/gsd/tests/user-input-boundary.test.ts +26 -0
  437. package/src/resources/extensions/gsd/tests/vision-ask.test.ts +23 -0
  438. package/src/resources/extensions/gsd/tests/visualizer-overlay.test.ts +6 -1
  439. package/src/resources/extensions/gsd/tests/workflow-mcp-auto-prep.test.ts +133 -0
  440. package/src/resources/extensions/gsd/tests/workflow-tool-executors.test.ts +82 -0
  441. package/src/resources/extensions/gsd/tests/workspace-git-preflight.test.ts +16 -1
  442. package/src/resources/extensions/gsd/tests/worktree-lifecycle.test.ts +28 -0
  443. package/src/resources/extensions/gsd/tests/worktree-post-create-hook.test.ts +141 -1
  444. package/src/resources/extensions/gsd/tests/worktree-state-projection.test.ts +38 -1
  445. package/src/resources/extensions/gsd/tests/write-gate-planning-unit.test.ts +10 -0
  446. package/src/resources/extensions/gsd/tests/zombie-gsd-state.test.ts +45 -1
  447. package/src/resources/extensions/gsd/tools/complete-task.ts +9 -0
  448. package/src/resources/extensions/gsd/tools/exec-tool.ts +42 -10
  449. package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +82 -5
  450. package/src/resources/extensions/gsd/tui/render-kit.ts +82 -0
  451. package/src/resources/extensions/gsd/unit-context-manifest.ts +37 -26
  452. package/src/resources/extensions/gsd/user-input-boundary.ts +1 -1
  453. package/src/resources/extensions/gsd/vision-ask.ts +28 -0
  454. package/src/resources/extensions/gsd/visualizer-overlay.ts +12 -40
  455. package/src/resources/extensions/gsd/worktree-lifecycle.ts +37 -2
  456. package/src/resources/extensions/gsd/worktree-post-create-hook.ts +127 -0
  457. package/src/resources/extensions/gsd/worktree-state-projection.ts +33 -0
  458. package/src/resources/extensions/search-the-web/native-search.ts +60 -8
  459. package/src/resources/extensions/shared/confirm-ui.ts +8 -12
  460. package/src/resources/extensions/shared/dialog-frame.ts +71 -0
  461. package/src/resources/extensions/shared/interview-ui.ts +43 -42
  462. package/src/resources/extensions/shared/next-action-ui.ts +6 -6
  463. package/src/resources/extensions/shared/tests/confirm-ui.test.ts +57 -0
  464. package/src/resources/extensions/shared/tests/interview-ui-border.test.ts +163 -0
  465. package/src/resources/extensions/shared/tests/next-action-ui-hasui.test.ts +55 -0
  466. package/src/resources/extensions/subagent/index.ts +8 -15
  467. package/src/resources/shared/package-manager-detection.ts +39 -0
  468. package/src/resources/skills/agent-browser/SKILL.md +1 -1
  469. package/src/resources/skills/api-design/SKILL.md +1 -1
  470. package/src/resources/skills/code-optimizer/SKILL.md +6 -11
  471. package/src/resources/skills/create-gsd-extension/SKILL.md +1 -1
  472. package/src/resources/skills/create-mcp-server/SKILL.md +1 -1
  473. package/src/resources/skills/create-skill/references/gsd-skill-ecosystem.md +1 -1
  474. package/src/resources/skills/create-skill/workflows/verify-skill.md +2 -10
  475. package/src/resources/skills/debug-like-expert/references/when-to-research.md +1 -5
  476. package/src/resources/skills/decompose-into-slices/SKILL.md +3 -3
  477. package/src/resources/skills/dependency-upgrade/SKILL.md +1 -1
  478. package/src/resources/skills/forensics/SKILL.md +2 -2
  479. package/src/resources/skills/grill-me/SKILL.md +1 -1
  480. package/src/resources/skills/handoff/SKILL.md +1 -1
  481. package/src/resources/skills/make-interfaces-feel-better/SKILL.md +1 -1
  482. package/src/resources/skills/observability/SKILL.md +1 -1
  483. package/src/resources/skills/security-review/SKILL.md +1 -1
  484. package/src/resources/skills/spike-wrap-up/SKILL.md +1 -1
  485. package/src/resources/skills/tdd/SKILL.md +1 -1
  486. package/src/resources/skills/write-docs/SKILL.md +1 -1
  487. package/src/resources/skills/write-milestone-brief/SKILL.md +1 -1
  488. package/dist/tsconfig.extensions.tsbuildinfo +0 -1
  489. /package/dist/web/standalone/.next/static/{BEjZM0MLHLibeMFbjtMol → tH1tnDYt1E0hK9Ien73Z0}/_buildManifest.js +0 -0
  490. /package/dist/web/standalone/.next/static/{BEjZM0MLHLibeMFbjtMol → tH1tnDYt1E0hK9Ien73Z0}/_ssgManifest.js +0 -0
@@ -15,6 +15,7 @@
15
15
  * if (!confirmed) return textResult("Cancelled.");
16
16
  */
17
17
  import { Key, matchesKey, truncateToWidth } from "@gsd/pi-tui";
18
+ import { renderSharedDialogFrame } from "./dialog-frame.js";
18
19
  import { makeUI, GLYPH } from "./ui.js";
19
20
  /**
20
21
  * Show a themed yes/no confirmation dialog.
@@ -69,12 +70,13 @@ export async function showConfirm(ctx, opts) {
69
70
  function render(width) {
70
71
  if (cachedLines)
71
72
  return cachedLines;
72
- const ui = makeUI(theme, width);
73
+ const contentWidth = Math.max(1, width - 4);
74
+ const ui = makeUI(theme, contentWidth);
73
75
  const lines = [];
74
76
  const push = (...rows) => { for (const r of rows)
75
77
  lines.push(...r); };
76
- push(ui.bar(), ui.blank(), ui.header(` ${opts.title}`), ui.blank(), ui.subtitle(` ${opts.message}`), ui.blank());
77
- const add = (s) => truncateToWidth(s, width);
78
+ push(ui.blank(), ui.subtitle(` ${opts.message}`), ui.blank());
79
+ const add = (s) => truncateToWidth(s, contentWidth);
78
80
  const option = (num, label, selected) => {
79
81
  if (selected) {
80
82
  return add(` ${theme.fg("accent", GLYPH.cursor)} ${theme.fg("accent", `${num}. ${label}`)}`);
@@ -83,9 +85,10 @@ export async function showConfirm(ctx, opts) {
83
85
  };
84
86
  lines.push(option(1, yesLabel, cursor === 0));
85
87
  lines.push(option(2, noLabel, cursor === 1));
86
- push(ui.blank(), ui.hints(["↑/↓ to choose", "y/n to quick-select", "enter to confirm"]), ui.bar());
87
- cachedLines = lines;
88
- return lines;
88
+ push(ui.blank());
89
+ const footer = ui.hints(["↑/↓ to choose", "y/n to quick-select", "enter to confirm"])[0] ?? "";
90
+ cachedLines = renderSharedDialogFrame(theme, opts.title, lines, width, { footer });
91
+ return cachedLines;
89
92
  }
90
93
  return {
91
94
  render,
@@ -0,0 +1,42 @@
1
+ import { truncateToWidth, visibleWidth } from "@gsd/pi-tui";
2
+ function safeLine(text, width) {
3
+ return truncateToWidth(text, width, "");
4
+ }
5
+ function padVisible(text, width) {
6
+ const clipped = safeLine(text, width);
7
+ return clipped + " ".repeat(Math.max(0, width - visibleWidth(clipped)));
8
+ }
9
+ function renderTopBorder(theme, title, width, border) {
10
+ const trimmedTitle = title.trim();
11
+ if (!trimmedTitle || width < 10) {
12
+ return border("╭" + "─".repeat(width - 2) + "╮");
13
+ }
14
+ const safeTitle = safeLine(trimmedTitle, Math.max(0, width - 7));
15
+ const fill = Math.max(0, width - visibleWidth(safeTitle) - 5);
16
+ return border("╭─ ") + theme.bold(theme.fg("accent", safeTitle)) + border(" " + "─".repeat(fill) + "╮");
17
+ }
18
+ export function renderSharedDialogFrame(theme, title, inner, width, options = {}) {
19
+ if (width < 4)
20
+ return inner.map((line) => safeLine(line, width));
21
+ const paddingX = Math.max(0, options.paddingX ?? 1);
22
+ const contentWidth = Math.max(0, width - 2 - paddingX * 2);
23
+ const border = (text) => theme.fg(options.borderColor ?? "borderAccent", text);
24
+ const pad = " ".repeat(paddingX);
25
+ const lines = [renderTopBorder(theme, title, width, border)];
26
+ for (const line of inner) {
27
+ lines.push(border("│") + pad + padVisible(line, contentWidth) + pad + border("│"));
28
+ }
29
+ const footer = Array.isArray(options.footer)
30
+ ? options.footer
31
+ : options.footer
32
+ ? [options.footer]
33
+ : [];
34
+ if (footer.length > 0) {
35
+ lines.push(border("├" + "─".repeat(width - 2) + "┤"));
36
+ for (const line of footer) {
37
+ lines.push(border("│") + pad + padVisible(line, contentWidth) + pad + border("│"));
38
+ }
39
+ }
40
+ lines.push(border("╰" + "─".repeat(width - 2) + "╯"));
41
+ return lines;
42
+ }
@@ -27,6 +27,7 @@
27
27
  */
28
28
  import { getMarkdownTheme } from "@gsd/pi-coding-agent";
29
29
  import { Editor, Key, Markdown, matchesKey, truncateToWidth, } from "@gsd/pi-tui";
30
+ import { renderSharedDialogFrame } from "./dialog-frame.js";
30
31
  import { mergeSideBySide } from "./layout-utils.js";
31
32
  import { makeUI, INDENT } from "./ui.js";
32
33
  // ─── Constants ────────────────────────────────────────────────────────────────
@@ -39,6 +40,9 @@ const PREVIEW_RATIO = 0.60; // preview gets the majority of the width
39
40
  const DIVIDER_CHARS = " │ ";
40
41
  const DIVIDER_WIDTH = 3;
41
42
  const PREVIEW_MAX_LINES = 20; // hard cap — keeps total ≤ 24 rows for single-question
43
+ function dialogContentWidth(width) {
44
+ return width < 4 ? Math.max(1, width) : Math.max(1, width - 4);
45
+ }
42
46
  // ─── Wrap-up screen ───────────────────────────────────────────────────────────
43
47
  export async function showWrapUpScreen(opts, ctx) {
44
48
  return ctx.ui.custom((tui, theme, _kb, done) => {
@@ -81,11 +85,12 @@ export async function showWrapUpScreen(opts, ctx) {
81
85
  function render(width) {
82
86
  if (cachedLines)
83
87
  return cachedLines;
84
- const ui = makeUI(theme, width);
88
+ const contentWidth = dialogContentWidth(width);
89
+ const ui = makeUI(theme, contentWidth);
85
90
  const lines = [];
86
91
  const push = (...rows) => { for (const r of rows)
87
92
  lines.push(...r); };
88
- push(ui.bar(), ui.blank(), ui.header(` ${opts.headline}`), ui.blank());
93
+ push(ui.blank());
89
94
  if (opts.progress)
90
95
  push(ui.meta(` ${opts.progress}`), ui.blank());
91
96
  if (cursorIdx === 1) {
@@ -101,9 +106,10 @@ export async function showWrapUpScreen(opts, ctx) {
101
106
  else {
102
107
  push(ui.actionUnselected(2, opts.keepGoingLabel, "Continue with another batch of questions."));
103
108
  }
104
- push(ui.blank(), ui.hints(["↑/↓ to choose", "1/2 to quick-select", "enter to confirm"]), ui.bar());
105
- cachedLines = lines;
106
- return lines;
109
+ push(ui.blank());
110
+ const footer = ui.hints(["↑/↓ to choose", "1/2 to quick-select", "enter to confirm"])[0] ?? "";
111
+ cachedLines = renderSharedDialogFrame(theme, opts.headline, lines, width, { footer });
112
+ return cachedLines;
107
113
  }
108
114
  return {
109
115
  render,
@@ -427,11 +433,13 @@ export async function showInterviewRound(questions, opts, ctx) {
427
433
  }
428
434
  // ── Review screen ────────────────────────────────────────────────
429
435
  function renderReviewScreen(width) {
430
- const ui = makeUI(theme, width);
436
+ const contentWidth = dialogContentWidth(width);
437
+ const title = opts.reviewHeadline ?? "Review your answers";
438
+ const ui = makeUI(theme, contentWidth);
431
439
  const lines = [];
432
440
  const push = (...rows) => { for (const r of rows)
433
441
  lines.push(...r); };
434
- push(ui.bar(), ui.blank(), ui.header(` ${opts.reviewHeadline ?? "Review your answers"}`), ui.blank());
442
+ push(ui.blank());
435
443
  for (let i = 0; i < questions.length; i++) {
436
444
  const q = questions[i];
437
445
  const st = states[i];
@@ -453,16 +461,19 @@ export async function showInterviewRound(questions, opts, ctx) {
453
461
  push(ui.note(`${INDENT.note}note: ${st.notes}`));
454
462
  push(ui.blank());
455
463
  }
456
- push(ui.actionSelected(0, "Submit answers"), ui.blank(), ui.hints(["← to go back and edit", "enter to submit", `esc to ${opts.exitLabel ?? "end interview"}`]), ui.bar());
457
- return lines;
464
+ push(ui.actionSelected(0, "Submit answers"), ui.blank());
465
+ const footer = ui.hints(["← to go back and edit", "enter to submit", `esc to ${opts.exitLabel ?? "end interview"}`])[0] ?? "";
466
+ return renderSharedDialogFrame(theme, title, lines, width, { footer });
458
467
  }
459
468
  // ── Exit confirm screen ──────────────────────────────────────────
460
469
  function renderExitConfirm(width) {
461
- const ui = makeUI(theme, width);
470
+ const contentWidth = dialogContentWidth(width);
471
+ const title = opts.exitHeadline ?? "End interview?";
472
+ const ui = makeUI(theme, contentWidth);
462
473
  const lines = [];
463
474
  const push = (...rows) => { for (const r of rows)
464
475
  lines.push(...r); };
465
- push(ui.bar(), ui.blank(), ui.header(` ${opts.exitHeadline ?? "End interview?"}`), ui.blank(), ui.subtitle(" Answers from this batch won't be saved."), ui.blank());
476
+ push(ui.blank(), ui.subtitle(" Answers from this batch won't be saved."), ui.blank());
466
477
  const keepGoingLabel = "Keep going";
467
478
  const exitActionLabel = opts.exitLabel
468
479
  ? opts.exitLabel.charAt(0).toUpperCase() + opts.exitLabel.slice(1)
@@ -480,8 +491,9 @@ export async function showInterviewRound(questions, opts, ctx) {
480
491
  else {
481
492
  push(ui.actionUnselected(2, exitActionLabel, "Exit and discard this batch of answers."));
482
493
  }
483
- push(ui.blank(), ui.hints(["↑/↓ to choose", "1/2 to quick-select", "enter to confirm"]), ui.bar());
484
- return lines;
494
+ push(ui.blank());
495
+ const footer = ui.hints(["↑/↓ to choose", "1/2 to quick-select", "enter to confirm"])[0] ?? "";
496
+ return renderSharedDialogFrame(theme, title, lines, width, { footer });
485
497
  }
486
498
  // ── Preview helpers ──────────────────────────────────────────────
487
499
  let mdThemeCache = null;
@@ -587,15 +599,16 @@ export async function showInterviewRound(questions, opts, ctx) {
587
599
  cachedLines = renderReviewScreen(width);
588
600
  return cachedLines;
589
601
  }
602
+ const contentWidth = dialogContentWidth(width);
603
+ const title = questions[currentIdx]?.header || "GSD Interview";
590
604
  const useSideBySide = questionHasAnyPreview()
591
- && width >= (MIN_OPTIONS_WIDTH + MIN_PREVIEW_WIDTH + DIVIDER_WIDTH);
605
+ && contentWidth >= (MIN_OPTIONS_WIDTH + MIN_PREVIEW_WIDTH + DIVIDER_WIDTH);
592
606
  if (useSideBySide) {
593
607
  // ── Preview path ──────────────────────────────────────
594
- const ui = makeUI(theme, width);
608
+ const ui = makeUI(theme, contentWidth);
595
609
  const lines = [];
596
610
  const push = (...rows) => { for (const r of rows)
597
611
  lines.push(...r); };
598
- push(ui.bar());
599
612
  if (isMultiQuestion) {
600
613
  const unanswered = questions.filter((_, i) => !isQuestionAnswered(i)).length;
601
614
  const answeredSet = new Set(questions.map((_, i) => i).filter(i => isQuestionAnswered(i)));
@@ -619,11 +632,11 @@ export async function showInterviewRound(questions, opts, ctx) {
619
632
  // component: spinner/loader (1-2), status line (1), tool header (1),
620
633
  // plus a safety margin for future additions.
621
634
  const termRows = (typeof process !== "undefined" && process.stdout?.rows) || 24;
622
- const footerLines = 3; // blank + hints + bar
635
+ const footerLines = 5; // body spacer + frame top/footer/bottom chrome
623
636
  const tuiChrome = 5;
624
637
  const maxBody = Math.min(PREVIEW_MAX_LINES, Math.max(6, termRows - lines.length - footerLines - tuiChrome));
625
- const previewWidth = Math.max(MIN_PREVIEW_WIDTH, Math.floor(width * PREVIEW_RATIO));
626
- const leftWidth = Math.max(MIN_OPTIONS_WIDTH, width - previewWidth - DIVIDER_WIDTH);
638
+ const previewWidth = Math.max(MIN_PREVIEW_WIDTH, Math.min(contentWidth - MIN_OPTIONS_WIDTH - DIVIDER_WIDTH, Math.floor(contentWidth * PREVIEW_RATIO)));
639
+ const leftWidth = Math.max(MIN_OPTIONS_WIDTH, contentWidth - previewWidth - DIVIDER_WIDTH);
627
640
  const fullLeft = renderOptionsColumn(leftWidth);
628
641
  const leftLines = fullLeft.slice(0, maxBody);
629
642
  if (fullLeft.length > maxBody) {
@@ -646,7 +659,7 @@ export async function showInterviewRound(questions, opts, ctx) {
646
659
  while (rightLines.length < maxBody)
647
660
  rightLines.push("");
648
661
  const divider = theme.fg("dim", DIVIDER_CHARS);
649
- lines.push(...mergeSideBySide(leftLines, rightLines, leftWidth, divider, width));
662
+ lines.push(...mergeSideBySide(leftLines, rightLines, leftWidth, divider, contentWidth));
650
663
  // Footer
651
664
  push(ui.blank());
652
665
  const isLast = !isMultiQuestion || currentIdx === questions.length - 1;
@@ -669,19 +682,18 @@ export async function showInterviewRound(questions, opts, ctx) {
669
682
  hints.push(isLast && allAnswered() ? "enter to review" : "enter to next");
670
683
  }
671
684
  hints.push("esc to exit");
672
- push(ui.hints(hints), ui.bar());
673
- cachedLines = lines;
674
- return lines;
685
+ const footer = ui.hints(hints)[0] ?? "";
686
+ cachedLines = renderSharedDialogFrame(theme, title, lines, width, { footer });
687
+ return cachedLines;
675
688
  }
676
689
  // ── Original path — no preview, untouched ────────────────
677
- const ui = makeUI(theme, width);
690
+ const ui = makeUI(theme, contentWidth);
678
691
  const lines = [];
679
692
  const push = (...rows) => { for (const r of rows)
680
693
  lines.push(...r); };
681
694
  const q = questions[currentIdx];
682
695
  const st = states[currentIdx];
683
696
  const multiSel = isMultiSelect(currentIdx);
684
- push(ui.bar());
685
697
  // ── Progress header ────────────────────────────────────────────
686
698
  if (isMultiQuestion) {
687
699
  const unanswered = questions.filter((_, i) => !isQuestionAnswered(i)).length;
@@ -750,8 +762,8 @@ export async function showInterviewRound(questions, opts, ctx) {
750
762
  if (st.notesVisible || focusNotes) {
751
763
  push(ui.blank(), ui.notesLabel(focusNotes));
752
764
  if (focusNotes) {
753
- for (const line of getEditor().render(width - 2))
754
- lines.push(truncateToWidth(` ${line}`, width));
765
+ for (const line of getEditor().render(contentWidth - 2))
766
+ lines.push(truncateToWidth(` ${line}`, contentWidth));
755
767
  }
756
768
  else if (st.notes) {
757
769
  push(ui.notesText(st.notes));
@@ -779,9 +791,9 @@ export async function showInterviewRound(questions, opts, ctx) {
779
791
  hints.push(isLast && allAnswered() ? "enter to review" : "enter to next");
780
792
  }
781
793
  hints.push("esc to exit");
782
- push(ui.hints(hints), ui.bar());
783
- cachedLines = lines;
784
- return lines;
794
+ const footer = ui.hints(hints)[0] ?? "";
795
+ cachedLines = renderSharedDialogFrame(theme, title, lines, width, { footer });
796
+ return cachedLines;
785
797
  }
786
798
  return {
787
799
  render,
@@ -41,6 +41,7 @@
41
41
  * Pressing Escape also resolves as "not_yet".
42
42
  */
43
43
  import { Key, matchesKey } from "@gsd/pi-tui";
44
+ import { renderSharedDialogFrame } from "./dialog-frame.js";
44
45
  import { makeUI } from "./ui.js";
45
46
  /**
46
47
  * Show the next-action prompt and return the chosen action id, or "not_yet".
@@ -101,14 +102,14 @@ export async function showNextAction(ctx, opts) {
101
102
  function render(width) {
102
103
  if (cachedLines)
103
104
  return cachedLines;
104
- const ui = makeUI(theme, width);
105
+ const contentWidth = Math.max(1, width - 4);
106
+ const ui = makeUI(theme, contentWidth);
105
107
  const lines = [];
106
108
  const push = (...rows) => { for (const r of rows)
107
109
  lines.push(...r); };
108
110
  // ── Header — uses success colour to signal completion ────────────
109
111
  // Note: next-action intentionally uses "success" for its bar/title
110
112
  // to distinguish it from regular accent-coloured screens.
111
- push(ui.bar());
112
113
  push(ui.blank());
113
114
  push(ui.header(` ✓ ${opts.title}`));
114
115
  // ── Summary ──────────────────────────────────────────────────────
@@ -150,10 +151,9 @@ export async function showNextAction(ctx, opts) {
150
151
  }
151
152
  // ── Footer ────────────────────────────────────────────────────────
152
153
  const numHint = allActions.map((_, i) => `${i + 1}`).join("/");
153
- push(ui.hints([`↑/↓ to choose`, `${numHint} to quick-select`, `enter to confirm`]));
154
- push(ui.bar());
155
- cachedLines = lines;
156
- return lines;
154
+ const footer = ui.hints([`↑/↓ to choose`, `${numHint} to quick-select`, `enter to confirm`])[0] ?? "";
155
+ cachedLines = renderSharedDialogFrame(theme, "GSD Next Action", lines, width, { footer });
156
+ return cachedLines;
157
157
  }
158
158
  return { render, invalidate: () => { cachedLines = undefined; }, handleInput };
159
159
  });
@@ -589,17 +589,17 @@ const TaskItem = Type.Object({
589
589
  cwd: Type.Optional(Type.String({ description: "Working directory for the agent process" })),
590
590
  model: Type.Optional(Type.String({ description: "Model override for this task (e.g. 'claude-sonnet-4-6')" })),
591
591
  context: Type.Optional(StringEnum(["fresh", "fork"], {
592
- description: 'Context mode for this task. "fresh" keeps the existing isolated context behavior; "fork" branches the parent session.',
592
+ description: 'Context mode for this task (see context field on the top-level params).',
593
593
  default: "fresh",
594
594
  })),
595
595
  });
596
596
  const ChainItem = Type.Object({
597
597
  agent: Type.String({ description: "Name of the agent to invoke" }),
598
- task: Type.String({ description: "Task with optional {previous} placeholder for prior output" }),
598
+ task: Type.String({ description: "Task with optional {previous} placeholder for prior step output" }),
599
599
  cwd: Type.Optional(Type.String({ description: "Working directory for the agent process" })),
600
600
  model: Type.Optional(Type.String({ description: "Model override for this step (e.g. 'claude-sonnet-4-6')" })),
601
601
  context: Type.Optional(StringEnum(["fresh", "fork"], {
602
- description: 'Context mode for this step. "fresh" keeps the existing isolated context behavior; "fork" branches the parent session.',
602
+ description: 'Context mode for this step (see context field on the top-level params).',
603
603
  default: "fresh",
604
604
  })),
605
605
  });
@@ -659,21 +659,14 @@ export default function (pi) {
659
659
  name: "subagent",
660
660
  label: "Subagent",
661
661
  description: [
662
- "Delegate tasks to specialized subagents with isolated context windows.",
663
- "Each subagent is a separate pi process with its own tools, model, and system prompt.",
664
- "Modes: single ({ agent, task }), parallel ({ tasks: [{agent, task},...] }), chain ({ chain: [{agent, task},...] } with {previous} placeholder).",
665
- "Agents are defined as .md files in ~/.gsd/agent/agents/ (user) or .gsd/agents/ (project).",
666
- "Use the /subagent command to list available agents and their descriptions.",
667
- "Use chain mode to pipeline: scout finds context, planner designs, worker implements.",
662
+ "Delegate tasks to specialized subagents, each a separate pi process with its own isolated context window, tools, model, and system prompt.",
663
+ "Modes: single ({ agent, task }), parallel ({ tasks: [{agent, task},...] }), chain ({ chain: [{agent, task},...] } where each step's {previous} placeholder receives the prior output).",
664
+ "Agents are defined as .md files in ~/.gsd/agent/agents/ (user) or .gsd/agents/ (project); list them with the /subagent command.",
668
665
  ].join(" "),
669
666
  promptGuidelines: [
670
- "Prefer subagent dispatch over inline work whenever a task is self-contained recon, planning, review, refactor, test writing, security audit, doc writing. Each dispatch gets a fresh context window, so your main session stays focused on synthesis.",
671
- "Before reading more than ~3 files to understand something, dispatch the scout agent and work from its compressed report instead.",
672
- "Before any change touching ≥2 packages, the orchestration kernel, auto-mode, or a public API, dispatch the planner agent first. Plan first, then implement.",
667
+ "Prefer subagent dispatch over inline work for self-contained tasks (recon, planning, review, refactor, test writing, security audit, docs); each dispatch gets a fresh context window so the main session stays focused on synthesis.",
673
668
  "You MUST use parallel mode when ≥2 ready tasks are independent of each other's output. Do not serialize independent tasks manually — that wastes wall time and context.",
674
- "Use chain mode for sequential pipelines where each step's output feeds the next: scout planner → worker, or worker → reviewer → worker.",
675
- "Before opening a PR or marking a slice complete, dispatch the reviewer agent (and security agent if the change touches auth, network, parsing, file IO, or shell exec).",
676
- "Always check available agents with /subagent before choosing one — there are bundled specialists plus any project-scoped agents.",
669
+ "Check available agents with /subagent before choosing one there are bundled specialists plus any project-scoped agents.",
677
670
  ],
678
671
  parameters: SubagentParams,
679
672
  async execute(_toolCallId, params, signal, onUpdate, ctx) {
@@ -0,0 +1,36 @@
1
+ import { homedir } from 'node:os';
2
+ import { join, resolve as resolvePath, sep } from 'node:path';
3
+ function hasPnpmPath(value) {
4
+ if (!value)
5
+ return false;
6
+ const normalized = value.replace(/\\/g, '/').toLowerCase();
7
+ return (normalized.includes('/.pnpm/') ||
8
+ normalized.endsWith('/pnpm') ||
9
+ normalized.endsWith('/pnpm.cjs') ||
10
+ normalized.endsWith('/pnpm.js'));
11
+ }
12
+ function pathStartsWith(pathValue, dir) {
13
+ if (!pathValue)
14
+ return false;
15
+ const resolvedPath = resolvePath(pathValue);
16
+ const resolvedDir = resolvePath(dir);
17
+ return resolvedPath === resolvedDir || resolvedPath.startsWith(resolvedDir + sep);
18
+ }
19
+ // Shared by update-check.ts and gsd command handlers. The JS installer keeps a
20
+ // parallel copy because it runs before TypeScript output exists.
21
+ export function isPnpmInstall(argv1 = process.argv[1], env = process.env) {
22
+ if (env.npm_config_user_agent?.startsWith('pnpm/'))
23
+ return true;
24
+ if (hasPnpmPath(env.npm_execpath))
25
+ return true;
26
+ if (hasPnpmPath(argv1))
27
+ return true;
28
+ if (!argv1)
29
+ return false;
30
+ const pnpmBinDirs = [];
31
+ if (env.PNPM_HOME)
32
+ pnpmBinDirs.push(env.PNPM_HOME);
33
+ pnpmBinDirs.push(join(homedir(), 'Library', 'pnpm'));
34
+ pnpmBinDirs.push(join(homedir(), '.local', 'share', 'pnpm'));
35
+ return pnpmBinDirs.some((dir) => pathStartsWith(argv1, dir) || pathStartsWith(env.npm_execpath, dir));
36
+ }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: agent-browser
3
- description: Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
3
+ description: Browser automation CLI for AI agents. Use when interacting with websites navigating pages, filling forms, clicking buttons, taking screenshots, scraping/extracting data, logging in, or testing web apps. Triggers on "open a website", "fill out a form", "take a screenshot", "scrape data from a page", "test this web app", "automate browser actions", or any programmatic web interaction.
4
4
  allowed-tools: Bash(npx agent-browser:*), Bash(agent-browser:*)
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: api-design
3
- description: Design or review an HTTP/REST/GraphQL API for versioning, pagination, error shapes, idempotency, auth, and evolvability. Use when asked to "design an API", "shape the endpoints", "design the schema", "add a new endpoint", "review this API", or when building/modifying a public or internal HTTP surface. Complements `design-an-interface` (which is interface-agnostic) by covering HTTP-specific concerns like status codes, cache headers, and breaking-change management.
3
+ description: Design or review an HTTP/REST/GraphQL API for versioning, pagination, error shapes, idempotency, auth, status codes, cache headers, and breaking-change management. Use when asked to "design an API", "shape the endpoints", "design the schema", "add a new endpoint", "review this API", or when building/modifying a public or internal HTTP surface. HTTP-specific complement to `design-an-interface`.
4
4
  ---
5
5
 
6
6
  <objective>
@@ -1,17 +1,12 @@
1
1
  ---
2
2
  name: code-optimizer
3
3
  description: >
4
- Deep code optimization audit using parallel specialist agents. Each agent hunts for performance
5
- anti-patterns, inefficiencies, and suboptimal code using pattern-based detection (Grep/Glob)
6
- WITHOUT reading the full source code first avoiding anchoring bias on existing implementations.
7
- Covers ALL optimization domains: database queries, memory leaks, algorithmic complexity,
8
- concurrency, bundle size, dead code, I/O & network, rendering/UI, data structures,
9
- error handling, caching, build config, security-performance, logging, and infrastructure.
10
- Use when asked to: "optimize my code", "find performance issues", "audit code quality",
11
- "speed up my app", "find bottlenecks", "code review for performance", "find anti-patterns",
12
- "improve code efficiency", "reduce latency", "optimize performance", "code smell detection",
13
- "find slow code", "optimize this project", "performance audit", "code optimization".
14
- Also triggers on: "optimizar codigo", "encontrar cuellos de botella", "mejorar rendimiento".
4
+ Deep code optimization audit using parallel specialist agents that hunt performance
5
+ anti-patterns via pattern-based detection, avoiding anchoring bias. Covers DB queries,
6
+ memory leaks, algorithmic complexity, concurrency, bundle size, dead code, I/O/network,
7
+ rendering, caching, and build config. Use when asked to optimize code, find performance
8
+ issues or bottlenecks, speed up an app, reduce latency, detect code smells, or run a
9
+ performance/quality audit.
15
10
  ---
16
11
 
17
12
  # Code Optimizer
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: create-gsd-extension
3
- description: Create, debug, and iterate on GSD extensions (TypeScript modules that add tools, commands, event hooks, custom UI, and providers to GSD). Use when asked to build an extension, add a tool the LLM can call, register a slash command, hook into GSD events, create custom TUI components, or modify GSD behavior. Triggers on "create extension", "build extension", "add a tool", "register command", "hook into gsd", "custom tool", "gsd plugin", "gsd extension".
3
+ description: Create, debug, and iterate on GSD extensions (TypeScript modules adding tools, commands, event hooks, custom UI, and providers). Use when asked to build an extension, add a tool the LLM can call, register a slash command, hook into GSD events, create custom TUI components, or modify GSD behavior. Triggers on "create/build extension", "add a tool", "register command", "hook into gsd", "gsd plugin".
4
4
  ---
5
5
 
6
6
  <essential_principles>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: create-mcp-server
3
- description: Build, iterate, and evaluate Model Context Protocol (MCP) servers that expose external services as tools an LLM can call. Use when asked to "build an MCP server", "create an MCP tool", "wrap this API as MCP", "expose X to Claude", or when extending GSD with custom tool integrations. Covers research, schema/tool design, error handling, pagination, testing via MCP Inspector, and producing a 10-question eval set that proves the server actually enables real work.
3
+ description: Build, iterate, and evaluate Model Context Protocol (MCP) servers that expose external services as tools an LLM can call. Covers schema/tool design, error handling, pagination, MCP Inspector testing, and an eval set. Use when asked to "build an MCP server", "create an MCP tool", "wrap this API as MCP", "expose X to Claude", or when extending GSD with custom tool integrations.
4
4
  ---
5
5
 
6
6
  <objective>
@@ -31,7 +31,7 @@ GSD auto-discovers skills at session start and during auto-mode:
31
31
 
32
32
  **Session start:** All discovered skills are enumerated and their names + descriptions are injected into the system prompt as `<available_skills>`.
33
33
 
34
- **Auto-mode discovery:** `skill-discovery.ts` takes a snapshot of the skills directory at auto-mode start. On each unit boundary it diffs against the snapshot. Any new skills found are injected via a `<newly_discovered_skills>` XML block so the LLM sees them without requiring `/reload`.
34
+ **Auto-mode discovery:** `skill-discovery.ts` snapshots installed skill names at auto-mode start. When new skills appear mid-run, GSD reloads the resource catalog so they appear in the standard `<available_skills>` block (no separate XML injection).
35
35
 
36
36
  **Manual reload:** Running `/reload` re-scans the skill directories and updates the available skills list mid-session.
37
37
  </skill_discovery>
@@ -82,11 +82,7 @@ which {tool-name}
82
82
  ```
83
83
 
84
84
  ### For API/Service Skills
85
- Use Context7 to fetch current documentation:
86
- ```
87
- mcp__context7__resolve-library-id: {service-name}
88
- mcp__context7__get-library-docs: {library-id}, topic: {relevant-topic}
89
- ```
85
+ Use the active Context7 documentation tools to fetch current documentation if they are available. Resolve the library ID first, then fetch docs for `{library-id}` with `topic: {relevant-topic}`; use the exact tool names from the active tool list.
90
86
 
91
87
  Compare skill's documented patterns against current docs:
92
88
  - Are endpoints still valid?
@@ -94,11 +90,7 @@ Compare skill's documented patterns against current docs:
94
90
  - Are there deprecated methods being used?
95
91
 
96
92
  ### For Framework Skills
97
- Use Context7:
98
- ```
99
- mcp__context7__resolve-library-id: {framework-name}
100
- mcp__context7__get-library-docs: {library-id}, topic: {specific-api}
101
- ```
93
+ Use the active Context7 documentation tools if they are available. Resolve the library ID first, then fetch docs for `{library-id}` with `topic: {specific-api}`; use the exact tool names from the active tool list.
102
94
 
103
95
  Check:
104
96
  - Are documented APIs still current?
@@ -175,11 +175,7 @@ DO reason through it:
175
175
  - Learning correct usage patterns
176
176
 
177
177
  **How**:
178
- ```
179
- Use mcp__context7__resolve-library-id with library name
180
- Then mcp__context7__get-library-docs with library ID
181
- Ask specific questions about the library
182
- ```
178
+ Use the active Context7 documentation tools if they are available: resolve the library ID with the library name, then fetch docs with the library ID. Ask specific questions about the library, and use exact tool names from the active tool list.
183
179
 
184
180
  **Good uses**:
185
181
  - "How do I use Prisma transactions?"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: decompose-into-slices
3
- description: Break a plan or milestone brief into independently-grabbable vertical slices (tracer bullets). Produces slices in `M###-ROADMAP.md` by default, or GitHub issues only with explicit user confirmation. Use when asked to "break this into slices", "decompose the plan", "vertical slices", "break into issues", or when a plan is ready but needs task-level decomposition. Prefers many thin slices over few thick ones; marks dependency order explicitly.
3
+ description: Break a plan or milestone brief into independently-grabbable vertical slices (tracer bullets), written to `M###-ROADMAP.md` by default (GitHub issues only on explicit confirmation). Prefers many thin slices over few thick ones and marks dependency order. Use when asked to "break this into slices", "decompose the plan", "vertical slices", "break into issues", or when a plan needs task-level decomposition.
4
4
  ---
5
5
 
6
6
  <objective>
@@ -31,7 +31,7 @@ Typical invocation points:
31
31
  1. Read `M###-CONTEXT.md` for the active milestone — the brief is the source of truth for scope.
32
32
  2. Read `M###-ROADMAP.md` if one exists — you may be refining rather than creating from scratch.
33
33
  3. Read `src/resources/extensions/gsd/templates/roadmap.md` for the exact slice format. The parser depends on it.
34
- 4. If the plan came from a GitHub issue (user passed a URL or number), fetch it with `mcp__github__issue_read`.
34
+ 4. If the plan came from a GitHub issue (user passed a URL or number), fetch it with the active GitHub issue-read tool if one is available; use the exact tool name from the active tool list.
35
35
 
36
36
  ## Step 2: Explore the codebase briefly
37
37
 
@@ -84,7 +84,7 @@ Use `write` to the path `.gsd/milestones/<MID>/<MID>-ROADMAP.md`. Do not edit ch
84
84
 
85
85
  ## Step 6: Optionally file as GitHub issues
86
86
 
87
- If the user explicitly asks (and only if — outward actions need confirmation), create one GitHub issue per slice with `mcp__github__issue_write`. Create in dependency order so "Blocked by" references can cite real issue numbers.
87
+ If the user explicitly asks (and only if — outward actions need confirmation), create one GitHub issue per slice with the active GitHub issue-write tool if one is available; use the exact tool name from the active tool list. Create in dependency order so "Blocked by" references can cite real issue numbers.
88
88
 
89
89
  ### Issue body template
90
90
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dependency-upgrade
3
- description: Plan, batch, and verify dependency upgrades safely. Triages outdated packages into risk tiers, upgrades in order (dev/minor/patch first, runtime majors last), verifies each batch before moving on, and produces an auditable commit sequence. Use when asked to "upgrade deps", "bump packages", "update node_modules", "fix vulnerabilities", "upgrade React/Node/TypeScript", or after `/gsd start dep-upgrade`. Complements the dep-upgrade workflow template with execution-level rigor.
3
+ description: Plan, batch, and verify dependency upgrades safely. Triages outdated packages into risk tiers, upgrades in order (dev/minor/patch first, runtime majors last), verifies each batch, and produces an auditable commit sequence. Use when asked to "upgrade deps", "bump packages", "update node_modules", "fix vulnerabilities", "upgrade React/Node/TypeScript", or after `/gsd start dep-upgrade`.
4
4
  ---
5
5
 
6
6
  <objective>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: forensics
3
- description: Post-mortem a failed GSD auto-mode run. Traces from symptom to root cause using `.gsd/activity/*.jsonl`, `.gsd/journal/YYYY-MM-DD.jsonl`, `.gsd/metrics.json`, and `.gsd/auto.lock`. Produces a filing-ready bug report with file:line references and a concrete fix suggestion. Use when asked to "forensics", "post-mortem", "why did auto-mode fail", "trace the stuck loop", "debug the crash", after `/gsd forensics` is invoked, or when a session ended in an unexpected terminal state. Reads existing artifacts — does NOT re-run anything.
3
+ description: Post-mortem a failed GSD auto-mode run. Traces symptom to root cause via `.gsd/` activity, journal, metrics, and lock artifacts, producing a filing-ready bug report with file:line refs and a fix suggestion. Use when asked to "forensics", "post-mortem", "why did auto-mode fail", "trace the stuck loop", "debug the crash", after `/gsd forensics`, or when a session ended in an unexpected terminal state. Reads artifacts only — re-runs nothing.
4
4
  ---
5
5
 
6
6
  <objective>
@@ -126,7 +126,7 @@ Format the output as a GitHub-issue-ready report:
126
126
  <high / medium / low> — <what would change this confidence>
127
127
  ```
128
128
 
129
- Offer to file this as a GitHub issue via `mcp__github__issue_write` — explicit confirmation required per the outward-action rule. Also save a copy to `.gsd/forensics/<slug>.md` for future reference.
129
+ Offer to file this as a GitHub issue via the active GitHub issue-write tool if one is available, using its exact active tool name — explicit confirmation required per the outward-action rule. Also save a copy to `.gsd/forensics/<slug>.md` for future reference.
130
130
 
131
131
  </process>
132
132
 
@@ -66,7 +66,7 @@ At the end, offer the user one of:
66
66
 
67
67
  1. Append resolved decisions to `.gsd/DECISIONS.md` (one line each, dated).
68
68
  2. Write or update `M###-CONTEXT.md` or `S##-CONTEXT.md` for the active milestone/slice.
69
- 3. Draft a GitHub issue via `mcp__github__issue_write` (only with explicit confirmation per the outward-action rule).
69
+ 3. Draft a GitHub issue via the active GitHub issue-write tool if one is available, using its exact active tool name (only with explicit confirmation per the outward-action rule).
70
70
  4. Leave it as conversation context if the work is ephemeral.
71
71
 
72
72
  Default: ask which they want. Do not auto-write.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: handoff
3
- description: Prepare a clean cross-session handoff so the next agent (or you tomorrow) can pick up exactly where you left off. Writes a focused `continue.md` in the active slice directory and ensures `STATE.md` + summary artifacts are current. Use when asked to "hand off", "prepare handoff", "pause work", "bookmark this", "I'll come back to this later", before running out of context budget, or at the end of a long session with unfinished work. Closes the v1 `/gsd-pause-work` parity gap.
3
+ description: Prepare a clean cross-session handoff so the next agent can pick up where you left off. Writes a focused `continue.md` in the active slice dir and ensures `STATE.md` + summary artifacts are current. Use when asked to "hand off", "prepare handoff", "pause work", "bookmark this", "I'll come back to this later", before running out of context budget, or ending a long session with unfinished work.
4
4
  ---
5
5
 
6
6
  <objective>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: make-interfaces-feel-better
3
- description: Design engineering principles for making interfaces feel polished. Use when building UI components, reviewing frontend code, implementing animations, hover states, shadows, borders, typography, micro-interactions, enter/exit animations, or any visual detail work. Triggers on UI polish, design details, "make it feel better", "feels off", stagger animations, border radius, optical alignment, font smoothing, tabular numbers, image outlines, box shadows.
3
+ description: Design-engineering principles for making interfaces feel polished. Use when building UI components or doing visual detail work — animations, hover states, shadows, borders, typography, micro-interactions. Triggers on "make it feel better", "feels off", stagger animations, border radius, optical alignment, font smoothing, tabular numbers, box shadows.
4
4
  ---
5
5
 
6
6
  # Details that make interfaces feel better
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: observability
3
- description: Add agent-first observability to code — structured logs, health endpoints, failure-state persistence, and explicit failure modes — so the next agent hitting a problem at 3am has the signals it needs to diagnose. Use when asked to "add logging", "add observability", "add metrics", "debug later", "make this observable", or when building/refactoring a subsystem that will run unattended (auto-mode engine, background jobs, servers, watchers). Operationalizes VISION.md's "agent-first observability" principle.
3
+ description: Add agent-first observability — structured logs, health endpoints, failure-state persistence, explicit failure modes — so the next agent can diagnose problems unattended. Use when asked to "add logging", "add observability", "add metrics", "make this observable", or when building/refactoring a subsystem that runs unattended (auto-mode engine, background jobs, servers, watchers).
4
4
  ---
5
5
 
6
6
  <objective>