gsd-pi 2.20.0 → 2.22.0

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 (279) hide show
  1. package/README.md +12 -0
  2. package/dist/cli.js +21 -18
  3. package/dist/help-text.d.ts +2 -0
  4. package/dist/help-text.js +47 -0
  5. package/dist/loader.js +2 -16
  6. package/dist/mcp-server.d.ts +18 -0
  7. package/dist/mcp-server.js +53 -0
  8. package/dist/onboarding.d.ts +0 -6
  9. package/dist/onboarding.js +0 -28
  10. package/dist/resources/agents/javascript-pro.md +280 -0
  11. package/dist/resources/agents/typescript-pro.md +255 -0
  12. package/dist/resources/extensions/bg-shell/index.ts +14 -2
  13. package/dist/resources/extensions/bg-shell/utilities.ts +14 -0
  14. package/dist/resources/extensions/browser-tools/{core.js → core.ts} +329 -190
  15. package/dist/resources/extensions/gsd/auto-dashboard.ts +2 -1
  16. package/dist/resources/extensions/gsd/auto-prompts.ts +42 -1
  17. package/dist/resources/extensions/gsd/auto-worktree.ts +35 -2
  18. package/dist/resources/extensions/gsd/auto.ts +116 -10
  19. package/dist/resources/extensions/gsd/claude-import.ts +656 -0
  20. package/dist/resources/extensions/gsd/collision-diagnostics.ts +332 -0
  21. package/dist/resources/extensions/gsd/commands.ts +60 -7
  22. package/dist/resources/extensions/gsd/diff-context.ts +220 -0
  23. package/dist/resources/extensions/gsd/docs/claude-marketplace-import.md +214 -0
  24. package/dist/resources/extensions/gsd/docs/preferences-reference.md +2 -1
  25. package/dist/resources/extensions/gsd/doctor.ts +12 -4
  26. package/dist/resources/extensions/gsd/file-watcher.ts +97 -0
  27. package/dist/resources/extensions/gsd/files.ts +1 -1
  28. package/dist/resources/extensions/gsd/forensics.ts +596 -0
  29. package/dist/resources/extensions/gsd/git-service.ts +2 -1
  30. package/dist/resources/extensions/gsd/github-client.ts +235 -0
  31. package/dist/resources/extensions/gsd/gitignore.ts +1 -0
  32. package/dist/resources/extensions/gsd/marketplace-discovery.ts +507 -0
  33. package/dist/resources/extensions/gsd/mcp-server.ts +87 -0
  34. package/dist/resources/extensions/gsd/namespaced-registry.ts +467 -0
  35. package/dist/resources/extensions/gsd/namespaced-resolver.ts +307 -0
  36. package/dist/resources/extensions/gsd/plugin-importer.ts +410 -0
  37. package/dist/resources/extensions/gsd/preferences.ts +14 -3
  38. package/dist/resources/extensions/gsd/prompts/execute-task.md +1 -1
  39. package/dist/resources/extensions/gsd/prompts/forensics.md +71 -0
  40. package/dist/resources/extensions/gsd/prompts/plan-slice.md +1 -1
  41. package/dist/resources/extensions/gsd/prompts/research-slice.md +1 -1
  42. package/dist/resources/extensions/gsd/prompts/system.md +12 -3
  43. package/dist/resources/extensions/gsd/roadmap-slices.ts +1 -1
  44. package/dist/resources/extensions/gsd/session-forensics.ts +5 -5
  45. package/dist/resources/extensions/gsd/tests/claude-import-tui.test.ts +351 -0
  46. package/dist/resources/extensions/gsd/tests/collision-diagnostics.test.ts +705 -0
  47. package/dist/resources/extensions/gsd/tests/context-compression.test.ts +13 -0
  48. package/dist/resources/extensions/gsd/tests/diff-context.test.ts +136 -0
  49. package/dist/resources/extensions/gsd/tests/doctor-git.test.ts +118 -0
  50. package/dist/resources/extensions/gsd/tests/marketplace-discovery.test.ts +202 -0
  51. package/dist/resources/extensions/gsd/tests/marketplace-test-fixtures.ts +91 -0
  52. package/dist/resources/extensions/gsd/tests/namespaced-registry.test.ts +1027 -0
  53. package/dist/resources/extensions/gsd/tests/namespaced-resolver.test.ts +671 -0
  54. package/dist/resources/extensions/gsd/tests/none-mode-gates.test.ts +105 -0
  55. package/dist/resources/extensions/gsd/tests/plugin-importer-live.test.ts +481 -0
  56. package/dist/resources/extensions/gsd/tests/plugin-importer.test.ts +1383 -0
  57. package/dist/resources/extensions/gsd/tests/preferences-git.test.ts +21 -2
  58. package/dist/resources/extensions/gsd/tests/preferences-schema-validation.test.ts +8 -1
  59. package/dist/resources/extensions/gsd/tests/visualizer-data.test.ts +11 -0
  60. package/dist/resources/extensions/gsd/tests/worktree-bugfix.test.ts +120 -0
  61. package/dist/resources/extensions/gsd/token-counter.ts +45 -0
  62. package/dist/resources/extensions/gsd/visualizer-data.ts +2 -2
  63. package/dist/resources/extensions/gsd/worktree-manager.ts +29 -1
  64. package/dist/resources/extensions/gsd/worktree.ts +3 -0
  65. package/dist/resources/extensions/mcporter/index.ts +90 -7
  66. package/dist/resources/extensions/search-the-web/native-search.ts +2 -0
  67. package/dist/resources/extensions/search-the-web/tool-fetch-page.ts +9 -1
  68. package/dist/resources/extensions/search-the-web/url-utils.ts +35 -1
  69. package/dist/resources/extensions/shared/terminal.ts +1 -1
  70. package/dist/resources/extensions/universal-config/discovery.ts +4 -0
  71. package/dist/resources/extensions/universal-config/format.ts +35 -4
  72. package/dist/resources/extensions/universal-config/index.ts +5 -3
  73. package/dist/resources/extensions/universal-config/scanners.ts +65 -2
  74. package/dist/resources/extensions/universal-config/tests/discovery.test.ts +9 -1
  75. package/dist/resources/extensions/universal-config/tests/format.test.ts +22 -6
  76. package/dist/resources/extensions/universal-config/tests/scanners.test.ts +18 -0
  77. package/dist/resources/extensions/universal-config/types.ts +20 -1
  78. package/dist/resources/skills/lint/SKILL.md +141 -0
  79. package/dist/resources/skills/review/SKILL.md +214 -0
  80. package/dist/resources/skills/test/SKILL.md +201 -0
  81. package/dist/tool-bootstrap.js +2 -1
  82. package/dist/wizard.js +2 -0
  83. package/package.json +12 -7
  84. package/packages/pi-ai/dist/providers/azure-openai-responses.d.ts.map +1 -1
  85. package/packages/pi-ai/dist/providers/azure-openai-responses.js +12 -1
  86. package/packages/pi-ai/dist/providers/azure-openai-responses.js.map +1 -1
  87. package/packages/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
  88. package/packages/pi-ai/dist/providers/openai-responses.js +12 -1
  89. package/packages/pi-ai/dist/providers/openai-responses.js.map +1 -1
  90. package/packages/pi-ai/node_modules/@smithy/node-http-handler/LICENSE +201 -0
  91. package/packages/pi-ai/node_modules/@smithy/node-http-handler/README.md +9 -0
  92. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-cjs/index.js +762 -0
  93. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +19 -0
  94. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/constants.js +1 -0
  95. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +9 -0
  96. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -0
  97. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +230 -0
  98. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +87 -0
  99. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +32 -0
  100. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +169 -0
  101. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +21 -0
  102. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +88 -0
  103. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +36 -0
  104. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +21 -0
  105. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +22 -0
  106. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +23 -0
  107. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +8 -0
  108. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +41 -0
  109. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +21 -0
  110. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/timing.js +4 -0
  111. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +63 -0
  112. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +10 -0
  113. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +5 -0
  114. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +4 -0
  115. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -0
  116. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +46 -0
  117. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +24 -0
  118. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +12 -0
  119. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +63 -0
  120. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +13 -0
  121. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts +12 -0
  122. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +2 -0
  123. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +6 -0
  124. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +6 -0
  125. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +2 -0
  126. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +5 -0
  127. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +6 -0
  128. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +13 -0
  129. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +8 -0
  130. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +10 -0
  131. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +5 -0
  132. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +4 -0
  133. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +3 -0
  134. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +46 -0
  135. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +24 -0
  136. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +12 -0
  137. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +63 -0
  138. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +13 -0
  139. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts +12 -0
  140. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +2 -0
  141. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +6 -0
  142. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +6 -0
  143. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +2 -0
  144. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +5 -0
  145. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/index.d.ts +6 -0
  146. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +13 -0
  147. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +8 -0
  148. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +12 -0
  149. package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +12 -0
  150. package/packages/pi-ai/node_modules/@smithy/node-http-handler/package.json +68 -0
  151. package/packages/pi-ai/package.json +3 -0
  152. package/packages/pi-ai/pnpm-lock.yaml +2022 -0
  153. package/packages/pi-ai/src/providers/azure-openai-responses.ts +12 -1
  154. package/packages/pi-ai/src/providers/openai-responses.ts +12 -1
  155. package/packages/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
  156. package/packages/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
  157. package/packages/pi-coding-agent/dist/core/extensions/index.js +1 -1
  158. package/packages/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
  159. package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts +1 -0
  160. package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
  161. package/packages/pi-coding-agent/dist/core/extensions/loader.js +12 -1
  162. package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
  163. package/packages/pi-coding-agent/dist/core/extensions/loader.test.d.ts +2 -0
  164. package/packages/pi-coding-agent/dist/core/extensions/loader.test.d.ts.map +1 -0
  165. package/packages/pi-coding-agent/dist/core/extensions/loader.test.js +113 -0
  166. package/packages/pi-coding-agent/dist/core/extensions/loader.test.js.map +1 -0
  167. package/packages/pi-coding-agent/dist/core/extensions/project-trust.d.ts +4 -0
  168. package/packages/pi-coding-agent/dist/core/extensions/project-trust.d.ts.map +1 -0
  169. package/packages/pi-coding-agent/dist/core/extensions/project-trust.js +42 -0
  170. package/packages/pi-coding-agent/dist/core/extensions/project-trust.js.map +1 -0
  171. package/packages/pi-coding-agent/dist/core/resolve-config-value.d.ts +1 -0
  172. package/packages/pi-coding-agent/dist/core/resolve-config-value.d.ts.map +1 -1
  173. package/packages/pi-coding-agent/dist/core/resolve-config-value.js +18 -0
  174. package/packages/pi-coding-agent/dist/core/resolve-config-value.js.map +1 -1
  175. package/packages/pi-coding-agent/dist/core/resolve-config-value.test.d.ts +2 -0
  176. package/packages/pi-coding-agent/dist/core/resolve-config-value.test.d.ts.map +1 -0
  177. package/packages/pi-coding-agent/dist/core/resolve-config-value.test.js +114 -0
  178. package/packages/pi-coding-agent/dist/core/resolve-config-value.test.js.map +1 -0
  179. package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  180. package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +8 -2
  181. package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -1
  182. package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.d.ts +2 -0
  183. package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.d.ts.map +1 -1
  184. package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.js +23 -9
  185. package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.js.map +1 -1
  186. package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.test.d.ts +2 -0
  187. package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.test.d.ts.map +1 -0
  188. package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.test.js +67 -0
  189. package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.test.js.map +1 -0
  190. package/packages/pi-coding-agent/package.json +1 -1
  191. package/packages/pi-coding-agent/pnpm-lock.yaml +454 -0
  192. package/packages/pi-coding-agent/scripts/copy-assets.cjs +24 -0
  193. package/packages/pi-coding-agent/src/core/extensions/index.ts +3 -0
  194. package/packages/pi-coding-agent/src/core/extensions/loader.test.ts +141 -0
  195. package/packages/pi-coding-agent/src/core/extensions/loader.ts +14 -1
  196. package/packages/pi-coding-agent/src/core/extensions/project-trust.ts +51 -0
  197. package/packages/pi-coding-agent/src/core/resolve-config-value.test.ts +132 -0
  198. package/packages/pi-coding-agent/src/core/resolve-config-value.ts +20 -0
  199. package/packages/pi-coding-agent/src/modes/interactive/components/login-dialog.ts +7 -2
  200. package/packages/pi-coding-agent/src/resources/extensions/memory/storage.test.ts +98 -0
  201. package/packages/pi-coding-agent/src/resources/extensions/memory/storage.ts +24 -9
  202. package/packages/pi-tui/dist/tui.d.ts.map +1 -1
  203. package/packages/pi-tui/dist/tui.js +2 -2
  204. package/packages/pi-tui/dist/tui.js.map +1 -1
  205. package/packages/pi-tui/package.json +3 -1
  206. package/packages/pi-tui/src/tui.ts +2 -2
  207. package/src/resources/agents/javascript-pro.md +280 -0
  208. package/src/resources/agents/typescript-pro.md +255 -0
  209. package/src/resources/extensions/bg-shell/index.ts +14 -2
  210. package/src/resources/extensions/bg-shell/utilities.ts +14 -0
  211. package/src/resources/extensions/browser-tools/{core.js → core.ts} +329 -190
  212. package/src/resources/extensions/gsd/auto-dashboard.ts +2 -1
  213. package/src/resources/extensions/gsd/auto-prompts.ts +42 -1
  214. package/src/resources/extensions/gsd/auto-worktree.ts +35 -2
  215. package/src/resources/extensions/gsd/auto.ts +116 -10
  216. package/src/resources/extensions/gsd/claude-import.ts +656 -0
  217. package/src/resources/extensions/gsd/collision-diagnostics.ts +332 -0
  218. package/src/resources/extensions/gsd/commands.ts +60 -7
  219. package/src/resources/extensions/gsd/diff-context.ts +220 -0
  220. package/src/resources/extensions/gsd/docs/claude-marketplace-import.md +214 -0
  221. package/src/resources/extensions/gsd/docs/preferences-reference.md +2 -1
  222. package/src/resources/extensions/gsd/doctor.ts +12 -4
  223. package/src/resources/extensions/gsd/file-watcher.ts +97 -0
  224. package/src/resources/extensions/gsd/files.ts +1 -1
  225. package/src/resources/extensions/gsd/forensics.ts +596 -0
  226. package/src/resources/extensions/gsd/git-service.ts +2 -1
  227. package/src/resources/extensions/gsd/github-client.ts +235 -0
  228. package/src/resources/extensions/gsd/gitignore.ts +1 -0
  229. package/src/resources/extensions/gsd/marketplace-discovery.ts +507 -0
  230. package/src/resources/extensions/gsd/mcp-server.ts +87 -0
  231. package/src/resources/extensions/gsd/namespaced-registry.ts +467 -0
  232. package/src/resources/extensions/gsd/namespaced-resolver.ts +307 -0
  233. package/src/resources/extensions/gsd/plugin-importer.ts +410 -0
  234. package/src/resources/extensions/gsd/preferences.ts +14 -3
  235. package/src/resources/extensions/gsd/prompts/execute-task.md +1 -1
  236. package/src/resources/extensions/gsd/prompts/forensics.md +71 -0
  237. package/src/resources/extensions/gsd/prompts/plan-slice.md +1 -1
  238. package/src/resources/extensions/gsd/prompts/research-slice.md +1 -1
  239. package/src/resources/extensions/gsd/prompts/system.md +12 -3
  240. package/src/resources/extensions/gsd/roadmap-slices.ts +1 -1
  241. package/src/resources/extensions/gsd/session-forensics.ts +5 -5
  242. package/src/resources/extensions/gsd/tests/claude-import-tui.test.ts +351 -0
  243. package/src/resources/extensions/gsd/tests/collision-diagnostics.test.ts +705 -0
  244. package/src/resources/extensions/gsd/tests/context-compression.test.ts +13 -0
  245. package/src/resources/extensions/gsd/tests/diff-context.test.ts +136 -0
  246. package/src/resources/extensions/gsd/tests/doctor-git.test.ts +118 -0
  247. package/src/resources/extensions/gsd/tests/marketplace-discovery.test.ts +202 -0
  248. package/src/resources/extensions/gsd/tests/marketplace-test-fixtures.ts +91 -0
  249. package/src/resources/extensions/gsd/tests/namespaced-registry.test.ts +1027 -0
  250. package/src/resources/extensions/gsd/tests/namespaced-resolver.test.ts +671 -0
  251. package/src/resources/extensions/gsd/tests/none-mode-gates.test.ts +105 -0
  252. package/src/resources/extensions/gsd/tests/plugin-importer-live.test.ts +481 -0
  253. package/src/resources/extensions/gsd/tests/plugin-importer.test.ts +1383 -0
  254. package/src/resources/extensions/gsd/tests/preferences-git.test.ts +21 -2
  255. package/src/resources/extensions/gsd/tests/preferences-schema-validation.test.ts +8 -1
  256. package/src/resources/extensions/gsd/tests/visualizer-data.test.ts +11 -0
  257. package/src/resources/extensions/gsd/tests/worktree-bugfix.test.ts +120 -0
  258. package/src/resources/extensions/gsd/token-counter.ts +45 -0
  259. package/src/resources/extensions/gsd/visualizer-data.ts +2 -2
  260. package/src/resources/extensions/gsd/worktree-manager.ts +29 -1
  261. package/src/resources/extensions/gsd/worktree.ts +3 -0
  262. package/src/resources/extensions/mcporter/index.ts +90 -7
  263. package/src/resources/extensions/search-the-web/native-search.ts +2 -0
  264. package/src/resources/extensions/search-the-web/tool-fetch-page.ts +9 -1
  265. package/src/resources/extensions/search-the-web/url-utils.ts +35 -1
  266. package/src/resources/extensions/shared/terminal.ts +1 -1
  267. package/src/resources/extensions/universal-config/discovery.ts +4 -0
  268. package/src/resources/extensions/universal-config/format.ts +35 -4
  269. package/src/resources/extensions/universal-config/index.ts +5 -3
  270. package/src/resources/extensions/universal-config/scanners.ts +65 -2
  271. package/src/resources/extensions/universal-config/tests/discovery.test.ts +9 -1
  272. package/src/resources/extensions/universal-config/tests/format.test.ts +22 -6
  273. package/src/resources/extensions/universal-config/tests/scanners.test.ts +18 -0
  274. package/src/resources/extensions/universal-config/types.ts +20 -1
  275. package/src/resources/skills/lint/SKILL.md +141 -0
  276. package/src/resources/skills/review/SKILL.md +214 -0
  277. package/src/resources/skills/test/SKILL.md +201 -0
  278. package/dist/resources/extensions/browser-tools/core.d.ts +0 -205
  279. package/src/resources/extensions/browser-tools/core.d.ts +0 -205
@@ -0,0 +1,201 @@
1
+ ---
2
+ name: test
3
+ description: Generate or run tests. Auto-detects test framework, generates comprehensive tests for source files, or runs existing test suites with failure analysis.
4
+ ---
5
+
6
+ <objective>
7
+ Generate or run tests for the current project. This skill auto-detects the test framework in use, generates comprehensive tests for source files, or runs existing test suites and analyzes failures.
8
+
9
+ Accepts optional arguments:
10
+ - A file path: generate tests for that source file
11
+ - `run`: run the existing test suite and analyze results
12
+ - No arguments: suggest what to test based on recent changes
13
+ </objective>
14
+
15
+ <context>
16
+ This skill handles test generation and execution across multiple languages and frameworks. It adapts to whatever testing conventions the project already uses rather than imposing new ones.
17
+ </context>
18
+
19
+ <quick_start>
20
+
21
+ <step_1_detect_framework>
22
+
23
+ **Detect the test framework and conventions before doing anything else.**
24
+
25
+ Check these sources in order:
26
+
27
+ 1. **package.json** (Node/JS/TS projects):
28
+ - `scripts.test` for the test command
29
+ - `devDependencies` for jest, vitest, mocha, ava, tap, node:test, playwright, cypress
30
+ - `jest` or `vitest` config keys
31
+
32
+ 2. **Config files**:
33
+ - `jest.config.*`, `vitest.config.*`, `.mocharc.*`, `ava.config.*`
34
+ - `pytest.ini`, `pyproject.toml` (look for `[tool.pytest]`), `setup.cfg`
35
+ - `go.mod` (Go projects use `go test` by default)
36
+ - `Cargo.toml` (Rust projects use `cargo test`)
37
+
38
+ 3. **Existing test files**:
39
+ - Scan for `*.test.*`, `*.spec.*`, `*_test.*`, `test_*.*` files
40
+ - Read 1-2 existing test files to understand patterns, imports, assertion style, and structure
41
+ - Note the directory structure (co-located tests vs `__tests__/` vs `tests/` vs `test/`)
42
+
43
+ 4. **Record your findings**:
44
+ - Framework name and version
45
+ - Test file naming convention
46
+ - Test file location convention
47
+ - Import/require style
48
+ - Assertion style (expect, assert, chai, etc.)
49
+ - Any custom utilities, fixtures, or helpers used
50
+
51
+ </step_1_detect_framework>
52
+
53
+ <step_2_handle_arguments>
54
+
55
+ **Route based on the argument provided.**
56
+
57
+ - **File path given** -> Go to `generate_tests`
58
+ - **"run" given** -> Go to `run_tests`
59
+ - **No arguments** -> Go to `suggest_tests`
60
+
61
+ </step_2_handle_arguments>
62
+
63
+ <generate_tests>
64
+
65
+ **Generate tests for the specified source file.**
66
+
67
+ **A. Read and analyze the source file:**
68
+ - Identify all exported/public functions, classes, methods, and types
69
+ - Understand each function's parameters, return types, and side effects
70
+ - Note error handling patterns (throws, returns null, returns Result, etc.)
71
+ - Identify dependencies that will need mocking
72
+
73
+ **B. Read existing test files in the project (1-2 files minimum):**
74
+ - Match their import style exactly
75
+ - Match their describe/it or test block structure
76
+ - Match their assertion patterns
77
+ - Match their mock/stub approach
78
+ - Use the same test utilities and helpers
79
+
80
+ **C. Generate tests covering:**
81
+
82
+ 1. **Happy paths**: Normal expected inputs produce correct outputs
83
+ 2. **Edge cases**:
84
+ - Empty inputs (empty string, empty array, null, undefined, zero)
85
+ - Boundary values (min/max integers, very long strings)
86
+ - Single element collections
87
+ 3. **Error handling**:
88
+ - Invalid inputs that should throw or return errors
89
+ - Missing required parameters
90
+ - Type mismatches (if applicable)
91
+ 4. **Async behavior** (if the function is async):
92
+ - Successful resolution
93
+ - Rejection/error cases
94
+ - Timeout scenarios (if relevant)
95
+ 5. **Dependencies**:
96
+ - Mock external dependencies (APIs, databases, file system)
97
+ - Verify correct interaction with dependencies (called with right args)
98
+
99
+ **D. Place the test file correctly:**
100
+ - Follow the project's existing convention for test file location
101
+ - Use the project's naming convention (`.test.ts`, `.spec.js`, `_test.go`, `test_*.py`, etc.)
102
+
103
+ **E. Run the generated tests immediately to verify they pass.**
104
+ - If tests fail, read the error output carefully
105
+ - Fix the test code (not the source code)
106
+ - Re-run until all tests pass
107
+
108
+ </generate_tests>
109
+
110
+ <run_tests>
111
+
112
+ **Run the existing test suite and analyze results.**
113
+
114
+ **A. Determine the test command:**
115
+ - Check `package.json` `scripts.test` for Node projects
116
+ - Use `pytest` for Python projects
117
+ - Use `go test ./...` for Go projects
118
+ - Use `cargo test` for Rust projects
119
+ - Fall back to the detected framework's CLI
120
+
121
+ **B. Run the tests:**
122
+ - Execute the test command
123
+ - Capture full output including failures and errors
124
+
125
+ **C. Analyze results:**
126
+ - Report total passed, failed, skipped counts
127
+ - For each failure:
128
+ - Identify the failing test name and file
129
+ - Show the assertion that failed (expected vs actual)
130
+ - Read the relevant source code if needed
131
+ - Provide a specific diagnosis of why it failed
132
+ - Suggest a concrete fix (is it a test bug or a source bug?)
133
+
134
+ **D. Present a summary:**
135
+
136
+ ```
137
+ Test Results: X passed, Y failed, Z skipped
138
+
139
+ Failures:
140
+ 1. [test name] - [brief diagnosis]
141
+ Fix: [specific suggestion]
142
+
143
+ 2. [test name] - [brief diagnosis]
144
+ Fix: [specific suggestion]
145
+ ```
146
+
147
+ </run_tests>
148
+
149
+ <suggest_tests>
150
+
151
+ **Suggest what to test when no arguments are given.**
152
+
153
+ **A. Check recent changes:**
154
+ - Run `git diff --name-only HEAD~5` to find recently changed files
155
+ - Run `git diff --name-only --cached` for staged files
156
+ - Filter to source files (exclude configs, docs, lockfiles)
157
+
158
+ **B. Check test coverage gaps:**
159
+ - Find source files that have no corresponding test file
160
+ - Prioritize files that were recently modified
161
+
162
+ **C. Present suggestions:**
163
+
164
+ ```
165
+ Suggested files to test (based on recent changes and coverage gaps):
166
+
167
+ 1. [file path] - modified recently, no test file exists
168
+ 2. [file path] - modified recently, tests exist but may need updating
169
+ 3. [file path] - no test coverage found
170
+
171
+ Run `/test <file path>` to generate tests for any of these.
172
+ Run `/test run` to run the existing test suite.
173
+ ```
174
+
175
+ </suggest_tests>
176
+
177
+ </quick_start>
178
+
179
+ <critical_rules>
180
+
181
+ 1. **MATCH EXISTING PATTERNS**: Never impose a new test style. Always mirror what the project already does.
182
+ 2. **READ BEFORE WRITING**: Always read existing test files before generating new ones.
183
+ 3. **VERIFY GENERATED TESTS**: Always run generated tests. Untested test code is unreliable.
184
+ 4. **DON'T MODIFY SOURCE CODE**: If generated tests fail, fix the tests, not the source. If the source has a real bug, report it to the user.
185
+ 5. **MOCK EXTERNAL DEPENDENCIES**: Never let tests hit real APIs, databases, or file systems unless the project explicitly uses integration tests that way.
186
+ 6. **ONE FILE AT A TIME**: Generate tests for one source file per invocation. Keep scope manageable.
187
+ 7. **USE PROJECT DEPENDENCIES**: Only use test libraries already installed in the project. Do not add new dependencies without asking.
188
+
189
+ </critical_rules>
190
+
191
+ <success_criteria>
192
+
193
+ Before completing:
194
+ - [ ] Test framework and conventions were detected correctly
195
+ - [ ] Generated tests match the project's existing test style
196
+ - [ ] All generated tests pass when run
197
+ - [ ] Tests cover happy paths, edge cases, and error handling
198
+ - [ ] Test file is placed in the correct location with the correct naming convention
199
+ - [ ] No source code was modified
200
+
201
+ </success_criteria>
@@ -1,205 +0,0 @@
1
- /**
2
- * Type declarations for core.js — runtime-neutral helper logic for browser-tools.
3
- */
4
-
5
- export interface ActionTimeline {
6
- limit: number;
7
- nextId: number;
8
- entries: ActionEntry[];
9
- }
10
-
11
- export interface ActionEntry {
12
- id: number;
13
- tool: string;
14
- paramsSummary: string;
15
- startedAt: number;
16
- finishedAt: number | null;
17
- status: string;
18
- beforeUrl: string;
19
- afterUrl: string;
20
- verificationSummary?: string;
21
- warningSummary?: string;
22
- diffSummary?: string;
23
- changed?: boolean;
24
- error?: string;
25
- }
26
-
27
- export interface ActionPartial {
28
- tool: string;
29
- paramsSummary?: string;
30
- startedAt?: number;
31
- beforeUrl?: string;
32
- afterUrl?: string;
33
- verificationSummary?: string;
34
- warningSummary?: string;
35
- diffSummary?: string;
36
- changed?: boolean;
37
- error?: string;
38
- }
39
-
40
- export interface ActionUpdates {
41
- finishedAt?: number;
42
- status?: string;
43
- afterUrl?: string;
44
- verificationSummary?: string;
45
- warningSummary?: string;
46
- diffSummary?: string;
47
- changed?: boolean;
48
- error?: string;
49
- }
50
-
51
- export interface DiffResult {
52
- changed: boolean;
53
- changes: Array<{ type: string; before: unknown; after: unknown }>;
54
- summary: string;
55
- }
56
-
57
- export interface Threshold {
58
- op: string;
59
- n: number;
60
- }
61
-
62
- export interface PageRegistry {
63
- pages: PageEntry[];
64
- activePageId: number | null;
65
- nextId: number;
66
- }
67
-
68
- export interface PageEntry {
69
- id: number;
70
- page: any;
71
- title: string;
72
- url: string;
73
- opener: number | null;
74
- }
75
-
76
- export interface PageListEntry {
77
- id: number;
78
- title: string;
79
- url: string;
80
- opener: number | null;
81
- isActive: boolean;
82
- }
83
-
84
- export interface SnapshotModeConfig {
85
- tags: string[];
86
- roles: string[];
87
- selectors: string[];
88
- ariaAttributes: string[];
89
- useInteractiveFilter: boolean;
90
- visibleOnly?: boolean;
91
- containerExpand?: boolean;
92
- }
93
-
94
- export interface AssertionCheckResult {
95
- name: string;
96
- passed: boolean;
97
- actual: unknown;
98
- expected: unknown;
99
- selector?: string;
100
- text?: string;
101
- }
102
-
103
- export interface AssertionEvaluation {
104
- verified: boolean;
105
- checks: AssertionCheckResult[];
106
- summary: string;
107
- agentHint: string;
108
- }
109
-
110
- export interface WaitValidationError {
111
- error: string;
112
- }
113
-
114
- export interface BatchStepResult {
115
- ok: boolean;
116
- stopReason: string | null;
117
- failedStepIndex: number | null;
118
- stepResults: unknown[];
119
- summary: string;
120
- }
121
-
122
- export interface FormattedTimeline {
123
- entries: Array<{
124
- id: number | null;
125
- tool: string;
126
- status: string;
127
- durationMs: number | null;
128
- beforeUrl: string;
129
- afterUrl: string;
130
- line: string;
131
- }>;
132
- retained: number;
133
- totalRecorded: number;
134
- bounded: boolean;
135
- summary: string;
136
- }
137
-
138
- export interface FailureHypothesis {
139
- hasFailures: boolean;
140
- categories: string[];
141
- summary: string;
142
- signals: Array<{ category: string; source: string; detail: string }>;
143
- }
144
-
145
- export interface SessionSummary {
146
- counts: {
147
- pages: number;
148
- actions: { total: number; retained: number; success: number; error: number; running: number };
149
- waits: { total: number; success: number; error: number; running: number };
150
- assertions: { total: number; passed: number; failed: number; running: number };
151
- consoleErrors: number;
152
- failedRequests: number;
153
- dialogs: number;
154
- };
155
- activePage: { id: number | null; title: string; url: string } | null;
156
- caveats: string[];
157
- failureHypothesis: FailureHypothesis;
158
- summary: string;
159
- }
160
-
161
- export function createActionTimeline(limit?: number): ActionTimeline;
162
- export function beginAction(timeline: ActionTimeline, partial: ActionPartial): ActionEntry;
163
- export function finishAction(timeline: ActionTimeline, actionId: number, updates?: ActionUpdates): ActionEntry | null;
164
- export function findAction(timeline: ActionTimeline, actionId: number): ActionEntry | null;
165
- export function toActionParamsSummary(params: unknown): string;
166
- export function diffCompactStates(before: unknown, after: unknown): DiffResult;
167
- export function includesNeedle(haystack: string, needle: string): boolean;
168
- export function parseThreshold(value: string | null | undefined): Threshold | null;
169
- export function meetsThreshold(count: number, threshold: Threshold): boolean;
170
- export function getEntriesSince(
171
- entries: Array<{ timestamp?: number }>,
172
- sinceActionId: number | undefined,
173
- timeline: ActionTimeline,
174
- ): unknown[];
175
- export function evaluateAssertionChecks(args: { checks: unknown[]; state: unknown }): AssertionEvaluation;
176
- export function validateWaitParams(params: { condition: string; value?: string; threshold?: string }): WaitValidationError | null;
177
- export function createRegionStableScript(selector: string): string;
178
- export function createPageRegistry(): PageRegistry;
179
- export function registryAddPage(
180
- registry: PageRegistry,
181
- info: { page: unknown; title?: string; url?: string; opener?: number | null },
182
- ): PageEntry;
183
- export function registryRemovePage(registry: PageRegistry, pageId: number): { removed: PageEntry; newActiveId: number | null };
184
- export function registrySetActive(registry: PageRegistry, pageId: number): void;
185
- export function registryGetActive(registry: PageRegistry): PageEntry;
186
- export function registryGetPage(registry: PageRegistry, pageId: number): PageEntry | null;
187
- export function registryListPages(registry: PageRegistry): PageListEntry[];
188
- export function createBoundedLogPusher(maxSize: number): (array: unknown[], entry: unknown) => void;
189
- export function runBatchSteps(args: {
190
- steps: unknown[];
191
- executeStep: (step: unknown, index: number) => Promise<{ ok: boolean; [key: string]: unknown }>;
192
- stopOnFailure?: boolean;
193
- }): Promise<BatchStepResult>;
194
-
195
- export declare const SNAPSHOT_MODES: Record<string, SnapshotModeConfig>;
196
- export function getSnapshotModeConfig(mode: string): SnapshotModeConfig | null;
197
- export function computeContentHash(text: string): string;
198
- export function computeStructuralSignature(tag: string, role: string, childTags: string[]): string;
199
- export function matchFingerprint(
200
- stored: { contentHash?: string; structuralSignature?: string },
201
- candidate: { contentHash?: string; structuralSignature?: string },
202
- ): boolean;
203
- export function formatTimelineEntries(entries?: unknown[], options?: Record<string, unknown>): FormattedTimeline;
204
- export function buildFailureHypothesis(session?: Record<string, unknown>): FailureHypothesis;
205
- export function summarizeBrowserSession(session?: Record<string, unknown>): SessionSummary;
@@ -1,205 +0,0 @@
1
- /**
2
- * Type declarations for core.js — runtime-neutral helper logic for browser-tools.
3
- */
4
-
5
- export interface ActionTimeline {
6
- limit: number;
7
- nextId: number;
8
- entries: ActionEntry[];
9
- }
10
-
11
- export interface ActionEntry {
12
- id: number;
13
- tool: string;
14
- paramsSummary: string;
15
- startedAt: number;
16
- finishedAt: number | null;
17
- status: string;
18
- beforeUrl: string;
19
- afterUrl: string;
20
- verificationSummary?: string;
21
- warningSummary?: string;
22
- diffSummary?: string;
23
- changed?: boolean;
24
- error?: string;
25
- }
26
-
27
- export interface ActionPartial {
28
- tool: string;
29
- paramsSummary?: string;
30
- startedAt?: number;
31
- beforeUrl?: string;
32
- afterUrl?: string;
33
- verificationSummary?: string;
34
- warningSummary?: string;
35
- diffSummary?: string;
36
- changed?: boolean;
37
- error?: string;
38
- }
39
-
40
- export interface ActionUpdates {
41
- finishedAt?: number;
42
- status?: string;
43
- afterUrl?: string;
44
- verificationSummary?: string;
45
- warningSummary?: string;
46
- diffSummary?: string;
47
- changed?: boolean;
48
- error?: string;
49
- }
50
-
51
- export interface DiffResult {
52
- changed: boolean;
53
- changes: Array<{ type: string; before: unknown; after: unknown }>;
54
- summary: string;
55
- }
56
-
57
- export interface Threshold {
58
- op: string;
59
- n: number;
60
- }
61
-
62
- export interface PageRegistry {
63
- pages: PageEntry[];
64
- activePageId: number | null;
65
- nextId: number;
66
- }
67
-
68
- export interface PageEntry {
69
- id: number;
70
- page: any;
71
- title: string;
72
- url: string;
73
- opener: number | null;
74
- }
75
-
76
- export interface PageListEntry {
77
- id: number;
78
- title: string;
79
- url: string;
80
- opener: number | null;
81
- isActive: boolean;
82
- }
83
-
84
- export interface SnapshotModeConfig {
85
- tags: string[];
86
- roles: string[];
87
- selectors: string[];
88
- ariaAttributes: string[];
89
- useInteractiveFilter: boolean;
90
- visibleOnly?: boolean;
91
- containerExpand?: boolean;
92
- }
93
-
94
- export interface AssertionCheckResult {
95
- name: string;
96
- passed: boolean;
97
- actual: unknown;
98
- expected: unknown;
99
- selector?: string;
100
- text?: string;
101
- }
102
-
103
- export interface AssertionEvaluation {
104
- verified: boolean;
105
- checks: AssertionCheckResult[];
106
- summary: string;
107
- agentHint: string;
108
- }
109
-
110
- export interface WaitValidationError {
111
- error: string;
112
- }
113
-
114
- export interface BatchStepResult {
115
- ok: boolean;
116
- stopReason: string | null;
117
- failedStepIndex: number | null;
118
- stepResults: unknown[];
119
- summary: string;
120
- }
121
-
122
- export interface FormattedTimeline {
123
- entries: Array<{
124
- id: number | null;
125
- tool: string;
126
- status: string;
127
- durationMs: number | null;
128
- beforeUrl: string;
129
- afterUrl: string;
130
- line: string;
131
- }>;
132
- retained: number;
133
- totalRecorded: number;
134
- bounded: boolean;
135
- summary: string;
136
- }
137
-
138
- export interface FailureHypothesis {
139
- hasFailures: boolean;
140
- categories: string[];
141
- summary: string;
142
- signals: Array<{ category: string; source: string; detail: string }>;
143
- }
144
-
145
- export interface SessionSummary {
146
- counts: {
147
- pages: number;
148
- actions: { total: number; retained: number; success: number; error: number; running: number };
149
- waits: { total: number; success: number; error: number; running: number };
150
- assertions: { total: number; passed: number; failed: number; running: number };
151
- consoleErrors: number;
152
- failedRequests: number;
153
- dialogs: number;
154
- };
155
- activePage: { id: number | null; title: string; url: string } | null;
156
- caveats: string[];
157
- failureHypothesis: FailureHypothesis;
158
- summary: string;
159
- }
160
-
161
- export function createActionTimeline(limit?: number): ActionTimeline;
162
- export function beginAction(timeline: ActionTimeline, partial: ActionPartial): ActionEntry;
163
- export function finishAction(timeline: ActionTimeline, actionId: number, updates?: ActionUpdates): ActionEntry | null;
164
- export function findAction(timeline: ActionTimeline, actionId: number): ActionEntry | null;
165
- export function toActionParamsSummary(params: unknown): string;
166
- export function diffCompactStates(before: unknown, after: unknown): DiffResult;
167
- export function includesNeedle(haystack: string, needle: string): boolean;
168
- export function parseThreshold(value: string | null | undefined): Threshold | null;
169
- export function meetsThreshold(count: number, threshold: Threshold): boolean;
170
- export function getEntriesSince(
171
- entries: Array<{ timestamp?: number }>,
172
- sinceActionId: number | undefined,
173
- timeline: ActionTimeline,
174
- ): unknown[];
175
- export function evaluateAssertionChecks(args: { checks: unknown[]; state: unknown }): AssertionEvaluation;
176
- export function validateWaitParams(params: { condition: string; value?: string; threshold?: string }): WaitValidationError | null;
177
- export function createRegionStableScript(selector: string): string;
178
- export function createPageRegistry(): PageRegistry;
179
- export function registryAddPage(
180
- registry: PageRegistry,
181
- info: { page: unknown; title?: string; url?: string; opener?: number | null },
182
- ): PageEntry;
183
- export function registryRemovePage(registry: PageRegistry, pageId: number): { removed: PageEntry; newActiveId: number | null };
184
- export function registrySetActive(registry: PageRegistry, pageId: number): void;
185
- export function registryGetActive(registry: PageRegistry): PageEntry;
186
- export function registryGetPage(registry: PageRegistry, pageId: number): PageEntry | null;
187
- export function registryListPages(registry: PageRegistry): PageListEntry[];
188
- export function createBoundedLogPusher(maxSize: number): (array: unknown[], entry: unknown) => void;
189
- export function runBatchSteps(args: {
190
- steps: unknown[];
191
- executeStep: (step: unknown, index: number) => Promise<{ ok: boolean; [key: string]: unknown }>;
192
- stopOnFailure?: boolean;
193
- }): Promise<BatchStepResult>;
194
-
195
- export declare const SNAPSHOT_MODES: Record<string, SnapshotModeConfig>;
196
- export function getSnapshotModeConfig(mode: string): SnapshotModeConfig | null;
197
- export function computeContentHash(text: string): string;
198
- export function computeStructuralSignature(tag: string, role: string, childTags: string[]): string;
199
- export function matchFingerprint(
200
- stored: { contentHash?: string; structuralSignature?: string },
201
- candidate: { contentHash?: string; structuralSignature?: string },
202
- ): boolean;
203
- export function formatTimelineEntries(entries?: unknown[], options?: Record<string, unknown>): FormattedTimeline;
204
- export function buildFailureHypothesis(session?: Record<string, unknown>): FailureHypothesis;
205
- export function summarizeBrowserSession(session?: Record<string, unknown>): SessionSummary;