@vpxa/kb 0.1.13 → 0.1.15

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 (383) hide show
  1. package/README.md +8 -2
  2. package/package.json +10 -7
  3. package/packages/analyzers/dist/blast-radius-analyzer.d.ts +17 -20
  4. package/packages/analyzers/dist/blast-radius-analyzer.js +6 -12
  5. package/packages/analyzers/dist/dependency-analyzer.d.ts +31 -27
  6. package/packages/analyzers/dist/dependency-analyzer.js +7 -9
  7. package/packages/analyzers/dist/diagram-generator.d.ts +12 -8
  8. package/packages/analyzers/dist/diagram-generator.js +3 -4
  9. package/packages/analyzers/dist/entry-point-analyzer.d.ts +39 -35
  10. package/packages/analyzers/dist/entry-point-analyzer.js +5 -6
  11. package/packages/analyzers/dist/index.d.ts +12 -14
  12. package/packages/analyzers/dist/index.js +1 -1
  13. package/packages/analyzers/dist/knowledge-producer.d.ts +29 -25
  14. package/packages/analyzers/dist/knowledge-producer.js +16 -15
  15. package/packages/analyzers/dist/pattern-analyzer.d.ts +14 -10
  16. package/packages/analyzers/dist/pattern-analyzer.js +3 -5
  17. package/packages/analyzers/dist/regex-call-graph.d.ts +6 -12
  18. package/packages/analyzers/dist/regex-call-graph.js +2 -1
  19. package/packages/analyzers/dist/structure-analyzer.d.ts +13 -9
  20. package/packages/analyzers/dist/structure-analyzer.js +3 -4
  21. package/packages/analyzers/dist/symbol-analyzer.d.ts +12 -8
  22. package/packages/analyzers/dist/symbol-analyzer.js +8 -13
  23. package/packages/analyzers/dist/ts-call-graph.d.ts +16 -13
  24. package/packages/analyzers/dist/ts-call-graph.js +2 -1
  25. package/packages/analyzers/dist/types.d.ts +82 -79
  26. package/packages/analyzers/dist/types.js +1 -0
  27. package/packages/chunker/dist/call-graph-extractor.d.ts +13 -10
  28. package/packages/chunker/dist/call-graph-extractor.js +2 -1
  29. package/packages/chunker/dist/chunker-factory.d.ts +6 -2
  30. package/packages/chunker/dist/chunker-factory.js +2 -1
  31. package/packages/chunker/dist/chunker.interface.d.ts +8 -4
  32. package/packages/chunker/dist/chunker.interface.js +1 -0
  33. package/packages/chunker/dist/code-chunker.d.ts +16 -12
  34. package/packages/chunker/dist/code-chunker.js +12 -14
  35. package/packages/chunker/dist/generic-chunker.d.ts +14 -10
  36. package/packages/chunker/dist/generic-chunker.js +6 -5
  37. package/packages/chunker/dist/index.d.ts +8 -8
  38. package/packages/chunker/dist/index.js +1 -1
  39. package/packages/chunker/dist/markdown-chunker.d.ts +16 -12
  40. package/packages/chunker/dist/markdown-chunker.js +4 -10
  41. package/packages/chunker/dist/treesitter-chunker.d.ts +28 -31
  42. package/packages/chunker/dist/treesitter-chunker.js +7 -8
  43. package/packages/cli/dist/commands/analyze.d.ts +6 -2
  44. package/packages/cli/dist/commands/analyze.js +3 -3
  45. package/packages/cli/dist/commands/context-cmds.d.ts +6 -2
  46. package/packages/cli/dist/commands/context-cmds.js +2 -1
  47. package/packages/cli/dist/commands/environment.d.ts +6 -2
  48. package/packages/cli/dist/commands/environment.js +2 -2
  49. package/packages/cli/dist/commands/execution.d.ts +6 -2
  50. package/packages/cli/dist/commands/execution.js +2 -1
  51. package/packages/cli/dist/commands/graph.d.ts +6 -2
  52. package/packages/cli/dist/commands/graph.js +6 -6
  53. package/packages/cli/dist/commands/init/adapters.d.ts +27 -0
  54. package/packages/cli/dist/commands/init/adapters.js +2 -0
  55. package/packages/cli/dist/commands/init/config.d.ts +11 -0
  56. package/packages/cli/dist/commands/init/config.js +4 -0
  57. package/packages/cli/dist/commands/init/curated.d.ts +8 -0
  58. package/packages/cli/dist/commands/init/curated.js +2 -0
  59. package/packages/cli/dist/commands/init/index.d.ts +23 -0
  60. package/packages/cli/dist/commands/init/index.js +3 -0
  61. package/packages/cli/dist/commands/init/scaffold.d.ts +24 -0
  62. package/packages/cli/dist/commands/init/scaffold.js +2 -0
  63. package/packages/cli/dist/commands/init/templates.d.ts +10 -0
  64. package/packages/cli/dist/commands/init/templates.js +302 -0
  65. package/packages/cli/dist/commands/init.d.ts +8 -3
  66. package/packages/cli/dist/commands/init.js +120 -123
  67. package/packages/cli/dist/commands/knowledge.d.ts +6 -2
  68. package/packages/cli/dist/commands/knowledge.js +2 -1
  69. package/packages/cli/dist/commands/search.d.ts +6 -2
  70. package/packages/cli/dist/commands/search.js +2 -8
  71. package/packages/cli/dist/commands/system.d.ts +6 -2
  72. package/packages/cli/dist/commands/system.js +5 -7
  73. package/packages/cli/dist/commands/workspace.d.ts +6 -2
  74. package/packages/cli/dist/commands/workspace.js +2 -2
  75. package/packages/cli/dist/context.d.ts +7 -4
  76. package/packages/cli/dist/context.js +2 -1
  77. package/packages/cli/dist/helpers.d.ts +51 -47
  78. package/packages/cli/dist/helpers.js +6 -5
  79. package/packages/cli/dist/index.d.ts +4 -1
  80. package/packages/cli/dist/index.js +3 -2
  81. package/packages/cli/dist/kb-init.d.ts +48 -50
  82. package/packages/cli/dist/kb-init.js +2 -1
  83. package/packages/cli/dist/types.d.ts +8 -5
  84. package/packages/cli/dist/types.js +1 -0
  85. package/packages/core/dist/constants.d.ts +36 -33
  86. package/packages/core/dist/constants.js +2 -1
  87. package/packages/core/dist/content-detector.d.ts +8 -7
  88. package/packages/core/dist/content-detector.js +2 -1
  89. package/packages/core/dist/errors.d.ts +15 -12
  90. package/packages/core/dist/errors.js +2 -1
  91. package/packages/core/dist/index.d.ts +6 -6
  92. package/packages/core/dist/index.js +1 -1
  93. package/packages/core/dist/logger.d.ts +16 -7
  94. package/packages/core/dist/logger.js +2 -1
  95. package/packages/core/dist/types.d.ts +107 -91
  96. package/packages/core/dist/types.js +2 -0
  97. package/packages/embeddings/dist/embedder.interface.d.ts +22 -19
  98. package/packages/embeddings/dist/embedder.interface.js +1 -0
  99. package/packages/embeddings/dist/index.d.ts +3 -3
  100. package/packages/embeddings/dist/index.js +1 -1
  101. package/packages/embeddings/dist/onnx-embedder.d.ts +21 -22
  102. package/packages/embeddings/dist/onnx-embedder.js +2 -1
  103. package/packages/enterprise-bridge/dist/cache.d.ts +29 -0
  104. package/packages/enterprise-bridge/dist/cache.js +2 -0
  105. package/packages/enterprise-bridge/dist/er-client.d.ts +38 -0
  106. package/packages/enterprise-bridge/dist/er-client.js +2 -0
  107. package/packages/enterprise-bridge/dist/evolution-collector.d.ts +63 -0
  108. package/packages/enterprise-bridge/dist/evolution-collector.js +2 -0
  109. package/packages/enterprise-bridge/dist/index.d.ts +8 -0
  110. package/packages/enterprise-bridge/dist/index.js +1 -0
  111. package/packages/enterprise-bridge/dist/policy-store.d.ts +46 -0
  112. package/packages/enterprise-bridge/dist/policy-store.js +2 -0
  113. package/packages/enterprise-bridge/dist/push-adapter.d.ts +24 -0
  114. package/packages/enterprise-bridge/dist/push-adapter.js +2 -0
  115. package/packages/enterprise-bridge/dist/result-merger.d.ts +15 -0
  116. package/packages/enterprise-bridge/dist/result-merger.js +2 -0
  117. package/packages/enterprise-bridge/dist/types.d.ts +82 -0
  118. package/packages/enterprise-bridge/dist/types.js +2 -0
  119. package/packages/indexer/dist/file-hasher.d.ts +5 -2
  120. package/packages/indexer/dist/file-hasher.js +2 -1
  121. package/packages/indexer/dist/filesystem-crawler.d.ts +23 -20
  122. package/packages/indexer/dist/filesystem-crawler.js +2 -1
  123. package/packages/indexer/dist/graph-extractor.d.ts +9 -12
  124. package/packages/indexer/dist/graph-extractor.js +2 -1
  125. package/packages/indexer/dist/incremental-indexer.d.ts +49 -43
  126. package/packages/indexer/dist/incremental-indexer.js +2 -1
  127. package/packages/indexer/dist/index.d.ts +5 -5
  128. package/packages/indexer/dist/index.js +1 -1
  129. package/packages/server/dist/api.d.ts +3 -8
  130. package/packages/server/dist/api.js +1 -1
  131. package/packages/server/dist/config.d.ts +6 -2
  132. package/packages/server/dist/config.js +2 -1
  133. package/packages/server/dist/curated-manager.d.ts +79 -76
  134. package/packages/server/dist/curated-manager.js +6 -10
  135. package/packages/server/dist/index.d.ts +1 -2
  136. package/packages/server/dist/index.js +2 -1
  137. package/packages/server/dist/replay-interceptor.d.ts +6 -6
  138. package/packages/server/dist/replay-interceptor.js +2 -1
  139. package/packages/server/dist/resources/resources.d.ts +7 -3
  140. package/packages/server/dist/resources/resources.js +3 -2
  141. package/packages/server/dist/server.d.ts +34 -24
  142. package/packages/server/dist/server.js +2 -1
  143. package/packages/server/dist/tools/analyze.tools.d.ts +14 -10
  144. package/packages/server/dist/tools/analyze.tools.js +2 -3
  145. package/packages/server/dist/tools/audit.tool.d.ts +8 -4
  146. package/packages/server/dist/tools/audit.tool.js +2 -4
  147. package/packages/server/dist/tools/bridge.tools.d.ts +35 -0
  148. package/packages/server/dist/tools/bridge.tools.js +16 -0
  149. package/packages/server/dist/tools/evolution.tools.d.ts +8 -0
  150. package/packages/server/dist/tools/evolution.tools.js +6 -0
  151. package/packages/server/dist/tools/forge.tools.d.ts +13 -11
  152. package/packages/server/dist/tools/forge.tools.js +11 -13
  153. package/packages/server/dist/tools/forget.tool.d.ts +7 -3
  154. package/packages/server/dist/tools/forget.tool.js +2 -7
  155. package/packages/server/dist/tools/graph.tool.d.ts +7 -3
  156. package/packages/server/dist/tools/graph.tool.js +5 -5
  157. package/packages/server/dist/tools/list.tool.d.ts +7 -3
  158. package/packages/server/dist/tools/list.tool.js +3 -8
  159. package/packages/server/dist/tools/lookup.tool.d.ts +7 -3
  160. package/packages/server/dist/tools/lookup.tool.js +3 -9
  161. package/packages/server/dist/tools/onboard.tool.d.ts +8 -4
  162. package/packages/server/dist/tools/onboard.tool.js +3 -2
  163. package/packages/server/dist/tools/policy.tools.d.ts +8 -0
  164. package/packages/server/dist/tools/policy.tools.js +3 -0
  165. package/packages/server/dist/tools/produce.tool.d.ts +6 -2
  166. package/packages/server/dist/tools/produce.tool.js +3 -2
  167. package/packages/server/dist/tools/read.tool.d.ts +7 -3
  168. package/packages/server/dist/tools/read.tool.js +3 -6
  169. package/packages/server/dist/tools/reindex.tool.d.ts +10 -6
  170. package/packages/server/dist/tools/reindex.tool.js +3 -2
  171. package/packages/server/dist/tools/remember.tool.d.ts +8 -3
  172. package/packages/server/dist/tools/remember.tool.js +4 -5
  173. package/packages/server/dist/tools/replay.tool.d.ts +6 -2
  174. package/packages/server/dist/tools/replay.tool.js +3 -6
  175. package/packages/server/dist/tools/search.tool.d.ts +10 -4
  176. package/packages/server/dist/tools/search.tool.js +7 -22
  177. package/packages/server/dist/tools/status.tool.d.ts +7 -3
  178. package/packages/server/dist/tools/status.tool.js +3 -3
  179. package/packages/server/dist/tools/toolkit.tools.d.ts +36 -34
  180. package/packages/server/dist/tools/toolkit.tools.js +20 -24
  181. package/packages/server/dist/tools/update.tool.d.ts +7 -3
  182. package/packages/server/dist/tools/update.tool.js +2 -6
  183. package/packages/server/dist/tools/utility.tools.d.ts +15 -14
  184. package/packages/server/dist/tools/utility.tools.js +11 -23
  185. package/packages/server/dist/version-check.d.ts +5 -1
  186. package/packages/server/dist/version-check.js +2 -1
  187. package/packages/store/dist/graph-store.interface.d.ts +89 -86
  188. package/packages/store/dist/graph-store.interface.js +1 -0
  189. package/packages/store/dist/index.d.ts +6 -6
  190. package/packages/store/dist/index.js +1 -1
  191. package/packages/store/dist/lance-store.d.ts +37 -30
  192. package/packages/store/dist/lance-store.js +2 -1
  193. package/packages/store/dist/sqlite-graph-store.d.ts +43 -46
  194. package/packages/store/dist/sqlite-graph-store.js +14 -13
  195. package/packages/store/dist/store-factory.d.ts +11 -7
  196. package/packages/store/dist/store-factory.js +2 -1
  197. package/packages/store/dist/store.interface.d.ts +47 -46
  198. package/packages/store/dist/store.interface.js +1 -0
  199. package/packages/tools/dist/audit.d.ts +61 -61
  200. package/packages/tools/dist/audit.js +5 -5
  201. package/packages/tools/dist/batch.d.ts +20 -17
  202. package/packages/tools/dist/batch.js +2 -1
  203. package/packages/tools/dist/changelog.d.ts +29 -26
  204. package/packages/tools/dist/changelog.js +3 -2
  205. package/packages/tools/dist/check.d.ts +42 -38
  206. package/packages/tools/dist/check.js +3 -2
  207. package/packages/tools/dist/checkpoint.d.ts +17 -14
  208. package/packages/tools/dist/checkpoint.js +2 -2
  209. package/packages/tools/dist/codemod.d.ts +35 -32
  210. package/packages/tools/dist/codemod.js +3 -2
  211. package/packages/tools/dist/compact.d.ts +34 -37
  212. package/packages/tools/dist/compact.js +3 -2
  213. package/packages/tools/dist/data-transform.d.ts +10 -7
  214. package/packages/tools/dist/data-transform.js +2 -1
  215. package/packages/tools/dist/dead-symbols.d.ts +29 -25
  216. package/packages/tools/dist/dead-symbols.js +3 -2
  217. package/packages/tools/dist/delegate.d.ts +26 -23
  218. package/packages/tools/dist/delegate.js +2 -5
  219. package/packages/tools/dist/diff-parse.d.ts +24 -21
  220. package/packages/tools/dist/diff-parse.js +4 -3
  221. package/packages/tools/dist/digest.d.ts +43 -45
  222. package/packages/tools/dist/digest.js +5 -5
  223. package/packages/tools/dist/encode.d.ts +11 -8
  224. package/packages/tools/dist/encode.js +2 -1
  225. package/packages/tools/dist/env-info.d.ts +25 -22
  226. package/packages/tools/dist/env-info.js +2 -1
  227. package/packages/tools/dist/eval.d.ts +13 -10
  228. package/packages/tools/dist/eval.js +3 -3
  229. package/packages/tools/dist/evidence-map.d.ts +64 -61
  230. package/packages/tools/dist/evidence-map.js +3 -3
  231. package/packages/tools/dist/file-cache.d.ts +42 -0
  232. package/packages/tools/dist/file-cache.js +4 -0
  233. package/packages/tools/dist/file-summary.d.ts +34 -29
  234. package/packages/tools/dist/file-summary.js +3 -2
  235. package/packages/tools/dist/file-walk.d.ts +6 -3
  236. package/packages/tools/dist/file-walk.js +2 -1
  237. package/packages/tools/dist/find-examples.d.ts +26 -21
  238. package/packages/tools/dist/find-examples.js +4 -3
  239. package/packages/tools/dist/find.d.ts +39 -40
  240. package/packages/tools/dist/find.js +2 -1
  241. package/packages/tools/dist/forge-classify.d.ts +35 -38
  242. package/packages/tools/dist/forge-classify.js +3 -2
  243. package/packages/tools/dist/forge-ground.d.ts +58 -60
  244. package/packages/tools/dist/forge-ground.js +2 -1
  245. package/packages/tools/dist/git-context.d.ts +22 -19
  246. package/packages/tools/dist/git-context.js +4 -3
  247. package/packages/tools/dist/graph-query.d.ts +75 -78
  248. package/packages/tools/dist/graph-query.js +2 -1
  249. package/packages/tools/dist/guide.d.ts +14 -11
  250. package/packages/tools/dist/guide.js +2 -1
  251. package/packages/tools/dist/health.d.ts +13 -10
  252. package/packages/tools/dist/health.js +3 -2
  253. package/packages/tools/dist/http-request.d.ts +20 -17
  254. package/packages/tools/dist/http-request.js +2 -1
  255. package/packages/tools/dist/index.d.ts +54 -53
  256. package/packages/tools/dist/index.js +1 -1
  257. package/packages/tools/dist/lane.d.ts +28 -25
  258. package/packages/tools/dist/lane.js +7 -7
  259. package/packages/tools/dist/measure.d.ts +32 -29
  260. package/packages/tools/dist/measure.js +3 -2
  261. package/packages/tools/dist/onboard.d.ts +29 -26
  262. package/packages/tools/dist/onboard.js +18 -41
  263. package/packages/tools/dist/parse-output.d.ts +48 -45
  264. package/packages/tools/dist/parse-output.js +3 -2
  265. package/packages/tools/dist/path-resolver.d.ts +4 -1
  266. package/packages/tools/dist/path-resolver.js +2 -1
  267. package/packages/tools/dist/process-manager.d.ts +18 -15
  268. package/packages/tools/dist/process-manager.js +2 -1
  269. package/packages/tools/dist/queue.d.ts +28 -25
  270. package/packages/tools/dist/queue.js +2 -2
  271. package/packages/tools/dist/regex-test.d.ts +26 -23
  272. package/packages/tools/dist/regex-test.js +2 -1
  273. package/packages/tools/dist/rename.d.ts +28 -25
  274. package/packages/tools/dist/rename.js +3 -2
  275. package/packages/tools/dist/replay.d.ts +32 -29
  276. package/packages/tools/dist/replay.js +5 -6
  277. package/packages/tools/dist/response-envelope.d.ts +32 -29
  278. package/packages/tools/dist/response-envelope.js +2 -1
  279. package/packages/tools/dist/schema-validate.d.ts +15 -12
  280. package/packages/tools/dist/schema-validate.js +2 -1
  281. package/packages/tools/dist/scope-map.d.ts +45 -47
  282. package/packages/tools/dist/scope-map.js +2 -1
  283. package/packages/tools/dist/snippet.d.ts +26 -24
  284. package/packages/tools/dist/snippet.js +2 -1
  285. package/packages/tools/dist/stash.d.ts +13 -10
  286. package/packages/tools/dist/stash.js +2 -2
  287. package/packages/tools/dist/stratum-card.d.ts +27 -27
  288. package/packages/tools/dist/stratum-card.js +4 -5
  289. package/packages/tools/dist/symbol.d.ts +29 -25
  290. package/packages/tools/dist/symbol.js +4 -3
  291. package/packages/tools/dist/test-run.d.ts +19 -15
  292. package/packages/tools/dist/test-run.js +3 -2
  293. package/packages/tools/dist/text-utils.d.ts +6 -3
  294. package/packages/tools/dist/text-utils.js +3 -2
  295. package/packages/tools/dist/time-utils.d.ts +15 -12
  296. package/packages/tools/dist/time-utils.js +2 -1
  297. package/packages/tools/dist/trace.d.ts +24 -20
  298. package/packages/tools/dist/trace.js +3 -2
  299. package/packages/tools/dist/truncation.d.ts +6 -3
  300. package/packages/tools/dist/truncation.js +8 -14
  301. package/packages/tools/dist/watch.d.ts +28 -25
  302. package/packages/tools/dist/watch.js +2 -1
  303. package/packages/tools/dist/web-fetch.d.ts +35 -32
  304. package/packages/tools/dist/web-fetch.js +7 -12
  305. package/packages/tools/dist/web-search.d.ts +16 -13
  306. package/packages/tools/dist/web-search.js +2 -1
  307. package/packages/tools/dist/workset.d.ts +19 -16
  308. package/packages/tools/dist/workset.js +2 -2
  309. package/packages/tui/dist/App-BAlmxCCw.js +3 -0
  310. package/packages/tui/dist/App.d.ts +11 -5
  311. package/packages/tui/dist/App.js +1 -450
  312. package/packages/tui/dist/CuratedPanel-sYdZAICX.js +3 -0
  313. package/packages/tui/dist/LogPanel-DVB8Sv46.js +4 -0
  314. package/packages/tui/dist/SearchPanel-DREo6zgt.js +3 -0
  315. package/packages/tui/dist/StatusPanel-2ex8fLOO.js +3 -0
  316. package/packages/tui/dist/chunk-D6axbAb-.js +2 -0
  317. package/packages/tui/dist/devtools-DUyj952l.js +8 -0
  318. package/packages/tui/dist/embedder.interface-D4ew0HPW.d.ts +29 -0
  319. package/packages/tui/dist/index-B9VpfVPP.d.ts +14 -0
  320. package/packages/tui/dist/index.d.ts +3 -19
  321. package/packages/tui/dist/index.js +2 -476
  322. package/packages/tui/dist/jsx-runtime-Cof-kwFn.js +317 -0
  323. package/packages/tui/dist/panels/CuratedPanel.d.ts +11 -5
  324. package/packages/tui/dist/panels/CuratedPanel.js +1 -371
  325. package/packages/tui/dist/panels/LogPanel.d.ts +7 -2
  326. package/packages/tui/dist/panels/LogPanel.js +1 -449
  327. package/packages/tui/dist/panels/SearchPanel.d.ts +14 -7
  328. package/packages/tui/dist/panels/SearchPanel.js +1 -372
  329. package/packages/tui/dist/panels/StatusPanel.d.ts +11 -5
  330. package/packages/tui/dist/panels/StatusPanel.js +1 -371
  331. package/packages/tui/dist/store.interface-CnY6SPOH.d.ts +151 -0
  332. package/scaffold/adapters/claude-code.mjs +20 -0
  333. package/scaffold/adapters/copilot.mjs +320 -0
  334. package/scaffold/copilot/agents/Architect-Reviewer-Alpha.agent.md +14 -0
  335. package/scaffold/copilot/agents/Architect-Reviewer-Beta.agent.md +14 -0
  336. package/scaffold/copilot/agents/Code-Reviewer-Alpha.agent.md +12 -0
  337. package/scaffold/copilot/agents/Code-Reviewer-Beta.agent.md +12 -0
  338. package/scaffold/copilot/agents/Debugger.agent.md +31 -0
  339. package/scaffold/copilot/agents/Documenter.agent.md +35 -0
  340. package/scaffold/copilot/agents/Explorer.agent.md +50 -0
  341. package/scaffold/copilot/agents/Frontend.agent.md +29 -0
  342. package/scaffold/copilot/agents/Implementer.agent.md +31 -0
  343. package/scaffold/copilot/agents/Orchestrator.agent.md +96 -0
  344. package/scaffold/copilot/agents/Planner.agent.md +45 -0
  345. package/scaffold/copilot/agents/README.md +57 -0
  346. package/scaffold/copilot/agents/Refactor.agent.md +30 -0
  347. package/scaffold/copilot/agents/Researcher-Alpha.agent.md +12 -0
  348. package/scaffold/copilot/agents/Researcher-Beta.agent.md +12 -0
  349. package/scaffold/copilot/agents/Researcher-Delta.agent.md +12 -0
  350. package/scaffold/copilot/agents/Researcher-Gamma.agent.md +12 -0
  351. package/scaffold/copilot/agents/Security.agent.md +42 -0
  352. package/scaffold/copilot/agents/_shared/adr-protocol.md +91 -0
  353. package/scaffold/copilot/agents/_shared/architect-reviewer-base.md +50 -0
  354. package/scaffold/copilot/agents/_shared/code-agent-base.md +70 -0
  355. package/scaffold/copilot/agents/_shared/code-reviewer-base.md +54 -0
  356. package/scaffold/copilot/agents/_shared/decision-protocol.md +27 -0
  357. package/scaffold/copilot/agents/_shared/forge-protocol.md +46 -0
  358. package/scaffold/copilot/agents/_shared/researcher-base.md +61 -0
  359. package/scaffold/copilot/agents/templates/adr-template.md +27 -0
  360. package/scaffold/copilot/agents/templates/execution-state.md +25 -0
  361. package/scaffold/copilot/prompts/ask.prompt.md +20 -0
  362. package/scaffold/copilot/prompts/debug.prompt.md +25 -0
  363. package/scaffold/copilot/prompts/design.prompt.md +22 -0
  364. package/scaffold/copilot/prompts/implement.prompt.md +26 -0
  365. package/scaffold/copilot/prompts/plan.prompt.md +24 -0
  366. package/scaffold/copilot/prompts/review.prompt.md +31 -0
  367. package/scaffold/definitions/agents.mjs +165 -0
  368. package/scaffold/definitions/bodies.mjs +292 -0
  369. package/scaffold/definitions/hooks.mjs +43 -0
  370. package/scaffold/definitions/models.mjs +56 -0
  371. package/scaffold/definitions/plugins.mjs +24 -0
  372. package/scaffold/definitions/prompts.mjs +145 -0
  373. package/scaffold/definitions/protocols.mjs +322 -0
  374. package/scaffold/definitions/tools.mjs +176 -0
  375. package/scaffold/generate.mjs +74 -0
  376. package/skills/brainstorming/SKILL.md +259 -0
  377. package/skills/brainstorming/scripts/frame-template.html +365 -0
  378. package/skills/brainstorming/scripts/helper.js +216 -0
  379. package/skills/brainstorming/scripts/server.cjs +9 -0
  380. package/skills/brainstorming/scripts/server.src.cjs +249 -0
  381. package/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  382. package/skills/brainstorming/visual-companion.md +430 -0
  383. package/skills/knowledge-base/SKILL.md +22 -9
@@ -0,0 +1,292 @@
1
+ /**
2
+ * Agent body content — the full instruction text for each agent.
3
+ *
4
+ * Separated from agents.mjs to keep definitions clean.
5
+ * Keys match agent names in agents.mjs.
6
+ * Variant agents use their sharedBase — no body needed here.
7
+ */
8
+
9
+ export const AGENT_BODIES = {
10
+ Orchestrator: (agentTable) => `**Before starting any work:**
11
+ 1. **Read the \`knowledge-base\` skill** (\`.github/skills/knowledge-base/SKILL.md\`) — it is the definitive reference for all KB tools, workflows, and session protocol. Follow its Session Protocol section.
12
+ 2. Check \`AGENTS.md\` in the workspace root for project-specific instructions.
13
+ 3. **Read _shared/decision-protocol.md** for the multi-model decision workflow.
14
+ 4. **Read _shared/forge-protocol.md** for the quality gate protocol.
15
+ 5. **Use templates/adr-template.md** when writing Architecture Decision Records.
16
+
17
+ ## Agent Arsenal
18
+
19
+ ${agentTable}
20
+
21
+ **Parallel rules**: Read-only agents (Explorer, Researcher*, Architect-Reviewer*, Code-Reviewer*, Security) can run in parallel. File-modifying agents can run in parallel ONLY if they touch completely different files.
22
+
23
+ ## Routing: Brainstorming vs Decision Protocol
24
+
25
+ Two complementary workflows — **never skip both, never confuse them.**
26
+
27
+ | Situation | Workflow | Interaction |
28
+ |-----------|----------|-------------|
29
+ | New feature, component, behavior change, or unclear requirements | **Brainstorming Skill** (interactive) | User dialogue → design doc |
30
+ | Non-trivial technical decision (architecture, infra, library choice) | **Decision Protocol** (autonomous) | 4 Researchers in parallel → ADR |
31
+ | Both: creative work with unresolved technical choices | **Brainstorming → Decision Protocol** | Interactive design, then autonomous analysis for unresolved decisions |
32
+ | Bug fix, refactor, doc update, or explicit "no design needed" | **Skip to Planning** | — |
33
+
34
+ ### Phase 0: Design Gate
35
+ Before Planning, determine the routing:
36
+ 1. **Is this additive/creative work?** (new feature, component, service, behavior change) → Invoke **brainstorming skill** (interactive design dialogue with user)
37
+ 2. **Is there a non-trivial technical decision?** (architecture, data model, library, trade-off) → Run **decision protocol** (launch 4 Researchers in parallel → synthesize → ADR)
38
+ 3. **Both?** → Brainstorming skill first. When it reaches unresolved technical choices, escalate those to the decision protocol, then return to the user for design approval.
39
+ 4. **Neither?** → Skip to Phase 1: Planning
40
+
41
+ ## Multi-Model Decision Protocol
42
+
43
+ Launch ALL Researcher variants in parallel with identical framing. Each returns: recommendation, reasoning, trade-offs, risks.
44
+
45
+ Synthesize → present agreements/disagreements to user → produce ADR → \`remember\` the decision.
46
+
47
+ ## Workflow
48
+
49
+ ### Phase 1: Planning
50
+ 1. Parse user's goal, identify affected subsystems
51
+ 2. Research — Small (<5 files): handle directly. Medium (5-15): Explorer → Researcher. Large (>15): multiple Explorers → Researchers in parallel
52
+ 3. Draft plan — 3-10 phases, assign agents, include TDD steps
53
+ 4. Build dependency graph — phases with no dependencies MUST be batched for parallel execution
54
+ 5. **🛑 MANDATORY STOP** — Wait for user approval
55
+
56
+ ### Phase 2: Implementation Cycle
57
+ Process phases in parallel batches based on dependency graph.
58
+
59
+ For each batch: Implement (parallel) → Code Review → Architecture Review (if boundary changes) → Security Review (if applicable) → **🛑 MANDATORY STOP** — present commit message.
60
+
61
+ ### Phase 3: Completion
62
+ 1. Optional: Refactor for cleanup (separate commit)
63
+ 2. Documenter for docs updates
64
+ 3. \`remember\` decisions, patterns, gotchas from this session
65
+
66
+ ## Context Budget
67
+ - After **5 delegations**, prefer handling directly
68
+ - Max **4 concurrent file-modifying agents** per batch
69
+ - Compress previous phase results to **decisions + file paths** before passing to next agent
70
+
71
+ ## Critical Rules
72
+ 1. **You do NOT implement** — you orchestrate agents
73
+ 2. **Search KB before planning** — check past decisions
74
+ 3. **Parallel when independent** — never serialize what can run simultaneously
75
+ 4. **Route correctly** — brainstorming for design, decision protocol for technical choices
76
+ 5. **Never proceed without user approval** at mandatory stops
77
+ 6. **Max 2 retries** then escalate`,
78
+
79
+ Planner: `**Read \`AGENTS.md\`** in the workspace root for project conventions and KB protocol.
80
+
81
+ **Read _shared/code-agent-base.md NOW** — it contains KB recall, FORGE, and handoff protocols.
82
+
83
+ ## Planning Workflow
84
+
85
+ 1. **KB Recall** — Search for past plans, architecture decisions, known patterns
86
+ 2. **FORGE Ground** — \`forge_ground\` to classify tier, scope map, seed unknowns, load constraints
87
+ 3. **Research** — Delegate to Explorer and Researcher agents to gather context
88
+ 4. **Draft Plan** — Produce a structured plan:
89
+ - 3-10 implementation phases
90
+ - Agent assignments per phase (Implementer, Frontend, Refactor, etc.)
91
+ - TDD steps (write test → fail → implement → pass → lint)
92
+ - Security-sensitive phases flagged
93
+ 5. **Dependency Graph** — For each phase, list dependencies. Group into parallel batches
94
+ 6. **Present** — Show plan with open questions, complexity estimate, parallel batch layout
95
+
96
+ ## Output Format
97
+
98
+ \`\`\`markdown
99
+ ## Plan: {Title}
100
+ {TL;DR: 1-3 sentences}
101
+
102
+ ### Dependency Graph & Parallel Batches
103
+ | Phase | Depends On | Batch |
104
+ |-------|-----------|-------|
105
+
106
+ ### Phase {N}: {Title}
107
+ - **Objective / Agent / Files / Tests / Security Sensitive**
108
+ - Steps: Write test → Run (fail) → Implement → Run (pass) → Lint
109
+
110
+ **Open Questions** / **Risks**
111
+ \`\`\`
112
+
113
+ **🛑 MANDATORY STOP** — Wait for user approval before any implementation.`,
114
+
115
+ Implementer: `**Read \`AGENTS.md\`** in the workspace root for project conventions and KB protocol.
116
+
117
+ **Read _shared/code-agent-base.md NOW** — it contains KB recall, FORGE, and handoff protocols.
118
+
119
+ ## Implementation Protocol
120
+
121
+ 1. **Understand scope** — Read the phase objective, identify target files
122
+ 2. **Write test first** (Red) — Create failing tests that define expected behavior
123
+ 3. **Implement** (Green) — Write minimal code to make tests pass
124
+ 4. **Refactor** — Clean up while keeping tests green
125
+ 5. **Validate** — \`check\`, \`test_run\`, \`blast_radius\`
126
+ 6. **Persist** — \`remember\` any decisions or patterns discovered
127
+
128
+ ## Rules
129
+
130
+ - **Test-first always** — No implementation without a failing test
131
+ - **Minimal code** — Don't build what isn't asked for
132
+ - **Follow existing patterns** — Search KB for conventions before creating new ones
133
+ - **Never modify tests to make them pass** — Fix the implementation instead
134
+ - **Run \`check\` after every change** — Catch errors early`,
135
+
136
+ Frontend: `**Read \`AGENTS.md\`** in the workspace root for project conventions and KB protocol.
137
+
138
+ **Read _shared/code-agent-base.md NOW** — it contains KB recall, FORGE, and handoff protocols.
139
+
140
+ ## Frontend Protocol
141
+
142
+ 1. **Search KB** for existing component patterns and design tokens
143
+ 2. **Write component tests first** — Accessibility, rendering, interaction
144
+ 3. **Implement** — Follow existing component patterns, use design system tokens
145
+ 4. **Validate** — \`check\`, \`test_run\`, visual review
146
+ 5. **Persist** — \`remember\` new component patterns
147
+
148
+ ## Rules
149
+
150
+ - **Accessibility first** — ARIA attributes, keyboard navigation, screen reader support
151
+ - **Follow design system** — Use existing tokens, don't create one-off values
152
+ - **Responsive by default** — Mobile-first, test all breakpoints
153
+ - **Test-first** — Component tests before implementation`,
154
+
155
+ Debugger: `**Read \`AGENTS.md\`** in the workspace root for project conventions and KB protocol.
156
+
157
+ **Read _shared/code-agent-base.md NOW** — it contains KB recall, FORGE, and handoff protocols.
158
+
159
+ ## Debugging Protocol
160
+
161
+ 1. **KB Recall** — Search for known issues matching this error pattern
162
+ 2. **Reproduce** — Confirm the error, get full stack trace
163
+ 3. **Trace** — \`symbol\`, \`trace\`, follow call chains backwards
164
+ 4. **Diagnose** — Form hypothesis, gather evidence, identify root cause
165
+ 5. **Fix** — Implement the fix, verify with tests
166
+ 6. **Validate** — \`check\`, \`test_run\` to confirm no regressions
167
+ 7. **Persist** — \`remember\` the fix with category \`troubleshooting\`
168
+
169
+ ## Rules
170
+
171
+ - **Never guess** — Always trace the actual execution path
172
+ - **Reproduce first** — Confirm the error before attempting a fix
173
+ - **Minimal fix** — Fix the root cause, don't add workarounds
174
+ - **Test the fix** — Every fix must have a test that would have caught the bug`,
175
+
176
+ Refactor: `**Read \`AGENTS.md\`** in the workspace root for project conventions and KB protocol.
177
+
178
+ **Read _shared/code-agent-base.md NOW** — it contains KB recall, FORGE, and handoff protocols.
179
+
180
+ ## Refactoring Protocol
181
+
182
+ 1. **KB Recall** — Search for established patterns and conventions
183
+ 2. **Analyze** — \`analyze_structure\`, \`analyze_patterns\`, \`dead_symbols\`
184
+ 3. **Ensure test coverage** — Run existing tests, add coverage for untested paths
185
+ 4. **Refactor in small steps** — Each step must keep tests green
186
+ 5. **Validate** — \`check\`, \`test_run\`, \`blast_radius\` after each step
187
+ 6. **Persist** — \`remember\` new patterns established
188
+
189
+ ## Rules
190
+
191
+ - **Tests must pass at every step** — Never break behavior
192
+ - **Smaller is better** — Prefer many small refactors over one big one
193
+ - **Follow existing patterns** — Consolidate toward established conventions
194
+ - **Don't refactor what isn't asked** — Scope discipline`,
195
+
196
+ Security: `**Read \`AGENTS.md\`** in the workspace root for project conventions and KB protocol.
197
+
198
+ ## Security Review Protocol
199
+
200
+ 1. **KB Recall** — Search for past security findings and conventions
201
+ 2. **OWASP Top 10 Scan** — Check each category systematically
202
+ 3. **Dependency Audit** — Check for known CVEs in dependencies
203
+ 4. **Secret Detection** — Scan for hardcoded credentials, API keys, tokens
204
+ 5. **Auth/AuthZ Review** — Verify access control, session management
205
+ 6. **Input Validation** — Check all user inputs for injection vectors
206
+ 7. **Report** — Severity-ranked findings with remediation guidance
207
+ 8. **Persist** — \`remember\` findings with category \`troubleshooting\`
208
+
209
+ ## Severity Levels
210
+
211
+ | Level | Criteria | Action |
212
+ |-------|----------|--------|
213
+ | CRITICAL | Exploitable with high impact | BLOCKED — must fix before merge |
214
+ | HIGH | Exploitable or high impact | Must fix, can be separate PR |
215
+ | MEDIUM | Requires specific conditions | Should fix, document if deferred |
216
+ | LOW | Minimal impact | Fix when convenient |
217
+
218
+ ## Output Format
219
+
220
+ \`\`\`markdown
221
+ ## Security Review: {scope}
222
+ **Overall: PASS / NEEDS_FIXES / BLOCKED**
223
+
224
+ ### Findings
225
+ 1. **[SEVERITY]** Title — Description, file:line, remediation
226
+ \`\`\``,
227
+
228
+ Documenter: `**Read \`AGENTS.md\`** in the workspace root for project conventions and KB protocol.
229
+
230
+ ## Documentation Protocol
231
+
232
+ 1. **KB Recall** — Search for existing docs, conventions, architecture decisions
233
+ 2. **Analyze** — \`analyze_structure\`, \`analyze_entry_points\`, \`file_summary\`
234
+ 3. **Draft** — Write documentation following project conventions
235
+ 4. **Cross-reference** — Link to related docs, ensure consistency
236
+ 5. **Persist** — \`remember\` documentation standards discovered
237
+
238
+ ## Documentation Types
239
+
240
+ | Type | When | Format |
241
+ |------|------|--------|
242
+ | README | New package/module | Structure, usage, API |
243
+ | API docs | New/changed endpoints | Request/response, examples |
244
+ | Architecture | Design decisions | Context, decision, consequences |
245
+ | Changelog | After implementation | Keep a Changelog format |
246
+
247
+ ## Rules
248
+
249
+ - **Accuracy over completeness** — Better to be correct and concise than thorough and wrong
250
+ - **Examples always** — Every API docs section needs a code example
251
+ - **Keep it current** — Update docs with every code change`,
252
+
253
+ Explorer: `**Read \`AGENTS.md\`** in the workspace root for project conventions and KB protocol.
254
+
255
+ ## Exploration Protocol
256
+
257
+ 1. **KB Recall** — \`search\` for existing analysis on this area
258
+ 2. **Discover** — Use \`find\`, \`symbol\`, \`scope_map\` to locate relevant files
259
+ 3. **Analyze** — Use \`analyze_structure\`, \`analyze_dependencies\`, \`file_summary\`
260
+ 4. **Map** — Build a picture of the subsystem: files, exports, dependencies, call chains
261
+ 5. **Report** — Structured findings with file paths and key observations
262
+
263
+ ## Exploration Modes
264
+
265
+ | Goal | Tools |
266
+ |------|-------|
267
+ | Find files for a feature | \`find\`, \`scope_map\` |
268
+ | Map a symbol's usage | \`symbol\`, \`trace\` |
269
+ | Understand a package | \`analyze_structure\`, \`analyze_dependencies\`, \`file_summary\` |
270
+ | Check impact of a change | \`blast_radius\` |
271
+
272
+ ## Output Format
273
+
274
+ \`\`\`markdown
275
+ ## Exploration: {topic}
276
+
277
+ ### Files Found
278
+ - path/to/file.ts — purpose, key exports
279
+
280
+ ### Dependencies
281
+ - package A → package B (via import)
282
+
283
+ ### Key Observations
284
+ - Notable patterns, potential issues, architectural notes
285
+ \`\`\`
286
+
287
+ ## Rules
288
+
289
+ - **Speed over depth** — Provide a useful map quickly, not an exhaustive analysis
290
+ - **Read-only** — Never create, edit, or delete files
291
+ - **Structured output** — Always return findings in the format above`,
292
+ };
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Hook definitions — lifecycle events that agents can respond to.
3
+ *
4
+ * Not all IDEs support hooks natively:
5
+ * - Copilot: No native hook support (hooks are documented in instructions only)
6
+ * - Claude Code: Maps to hooks config in settings.json
7
+ * - Claude Code: Supports hooks via settings.json
8
+ *
9
+ * Each adapter decides how to surface these:
10
+ * - Copilot adapter: Embeds as rules in copilot-instructions.md
11
+ * - Claude Code adapter: Generates hooks config [future]
12
+ */
13
+
14
+ export const HOOKS = {
15
+ sessionStart: {
16
+ description: 'Run at the start of every agent session',
17
+ actions: ['status({})', 'list()', 'search({ query: "SESSION CHECKPOINT", origin: "curated" })'],
18
+ rationale: 'Resume prior work, load existing knowledge',
19
+ },
20
+
21
+ sessionEnd: {
22
+ description: 'Run at the end of every agent session',
23
+ actions: [
24
+ 'remember({ title: "Session checkpoint: <topic>", content: "<decisions, next steps>", category: "conventions" })',
25
+ ],
26
+ rationale: 'Persist decisions for future sessions',
27
+ },
28
+
29
+ beforeCodeChange: {
30
+ description: 'Run before modifying any code',
31
+ actions: [
32
+ 'search({ query: "<what you are changing>" })',
33
+ 'scope_map({ task: "<description>" })',
34
+ ],
35
+ rationale: 'Check for prior decisions and understand impact',
36
+ },
37
+
38
+ beforeCommit: {
39
+ description: 'Run before committing changes',
40
+ actions: ['check({})', 'test_run({})', 'blast_radius({ changed_files: ["..."] })'],
41
+ rationale: 'Validate changes before they enter version control',
42
+ },
43
+ };
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Centralized model assignments — THE SINGLE FILE to update when models change.
3
+ *
4
+ * Keys are agent names (stable, model-agnostic).
5
+ * Values are model strings in the format expected by the target IDE.
6
+ * Each IDE adapter may interpret or transform these values.
7
+ *
8
+ * Naming convention for variants: {Role}-Alpha, {Role}-Beta, {Role}-Gamma, {Role}-Delta
9
+ * These are abstract labels — the actual model behind each is defined HERE.
10
+ */
11
+
12
+ export const MODELS = {
13
+ // ─── Single-role agents ───────────────────────────────────────────────
14
+ Orchestrator: 'Claude Opus 4.6',
15
+ Planner: 'Claude Opus 4.6',
16
+ Implementer: 'GPT-5.4',
17
+ Frontend: 'Gemini 3.1 Pro (Preview)',
18
+ Debugger: 'Claude Opus 4.6',
19
+ Refactor: 'GPT-5.4',
20
+ Security: 'Claude Opus 4.6',
21
+ Documenter: 'GPT-5.4',
22
+ Explorer: 'Gemini 3 Flash (Preview)',
23
+
24
+ // ─── Researcher variants (4 models for multi-model decision protocol) ────────────
25
+ 'Researcher-Alpha': 'Claude Opus 4.6',
26
+ 'Researcher-Beta': 'Claude Sonnet 4.6',
27
+ 'Researcher-Gamma': 'GPT-5.4',
28
+ 'Researcher-Delta': 'Gemini 3.1 Pro (Preview)',
29
+
30
+ // ─── Code-Reviewer variants (2 models for dual review) ───────────────
31
+ 'Code-Reviewer-Alpha': 'GPT-5.4',
32
+ 'Code-Reviewer-Beta': 'Claude Opus 4.6',
33
+
34
+ // ─── Architect-Reviewer variants (2 models for dual review) ──────────
35
+ 'Architect-Reviewer-Alpha': 'GPT-5.4',
36
+ 'Architect-Reviewer-Beta': 'Claude Opus 4.6',
37
+ };
38
+
39
+ /**
40
+ * Variant group definitions — maps role to variant suffixes.
41
+ * Used by adapters to know which agents are variants of the same role.
42
+ */
43
+ export const VARIANT_GROUPS = {
44
+ Researcher: ['Alpha', 'Beta', 'Gamma', 'Delta'],
45
+ 'Code-Reviewer': ['Alpha', 'Beta'],
46
+ 'Architect-Reviewer': ['Alpha', 'Beta'],
47
+ };
48
+
49
+ /**
50
+ * Primary variant per role — the "default" one for single-agent invocation.
51
+ */
52
+ export const PRIMARY_VARIANT = {
53
+ Researcher: 'Alpha',
54
+ 'Code-Reviewer': 'Alpha',
55
+ 'Architect-Reviewer': 'Alpha',
56
+ };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Plugin/skill definitions — packages of domain knowledge for agents.
3
+ *
4
+ * Copilot: .github/skills/{name}/SKILL.md
5
+ * Claude Code: Maps to tool_use permissions and MCP config
6
+ * Claude Code: Referenced via CLAUDE.md or MCP
7
+ *
8
+ * Skills are NOT generated — they are copied from knowledge-base/skills/.
9
+ * This file defines WHICH skills to copy and their metadata.
10
+ */
11
+
12
+ export const PLUGINS = {
13
+ 'knowledge-base': {
14
+ description: 'KB search, analysis, memory, and developer tools',
15
+ source: 'skills/knowledge-base/SKILL.md',
16
+ required: true,
17
+ },
18
+
19
+ brainstorming: {
20
+ description: 'Brainstorming & design exploration workflow',
21
+ source: 'skills/brainstorming/SKILL.md',
22
+ required: true,
23
+ },
24
+ };
@@ -0,0 +1,145 @@
1
+ /**
2
+ * Prompt/command definitions — IDE-agnostic workflow triggers.
3
+ *
4
+ * Copilot: .prompt.md files in .github/prompts/
5
+ * Claude Code: Maps to CLAUDE.md slash commands
6
+ * Claude Code: Slash commands
7
+ *
8
+ * Each prompt defines: description, target agent, required tools, and content.
9
+ */
10
+
11
+ export const PROMPTS = {
12
+ ask: {
13
+ description: 'Quick research question — find answer using KB + web search',
14
+ agent: 'Researcher-Alpha',
15
+ tools: ['search', 'web_search', 'web_fetch', 'compact', 'file_summary', 'remember'],
16
+ content: `## Quick Research
17
+
18
+ 1. **KB Recall** — Search knowledge base for existing answers
19
+ 2. **Web Search** — If KB has no relevant results, search the web
20
+ 3. **Synthesize** — Combine findings into a clear, concise answer
21
+ 4. **Remember** — If the answer is broadly useful, persist it to KB
22
+
23
+ **Always cite sources** — KB entries, file paths, or URLs.`,
24
+ },
25
+
26
+ debug: {
27
+ description: 'Systematic error diagnosis: reproduce → trace → diagnose → fix → verify',
28
+ agent: 'Debugger',
29
+ tools: [
30
+ 'search',
31
+ 'symbol',
32
+ 'trace',
33
+ 'blast_radius',
34
+ 'check',
35
+ 'test_run',
36
+ 'parse_output',
37
+ 'compact',
38
+ 'remember',
39
+ ],
40
+ content: `## Debug Workflow
41
+
42
+ 1. **Parse Error** — Use \`parse_output\` on the error message/stack trace
43
+ 2. **KB Recall** — Search for known issues matching this pattern
44
+ 3. **Reproduce** — Run the failing command/test to confirm
45
+ 4. **Trace** — Use \`symbol\` and \`trace\` to follow the call chain
46
+ 5. **Diagnose** — Form hypothesis, gather evidence
47
+ 6. **Fix** — Implement minimal fix
48
+ 7. **Verify** — \`check\` + \`test_run\` to confirm fix and no regressions
49
+ 8. **Remember** — Persist the fix with category \`troubleshooting\``,
50
+ },
51
+
52
+ implement: {
53
+ description: 'Full lifecycle implementation: plan → build → review → commit',
54
+ agent: 'Orchestrator',
55
+ tools: [
56
+ 'search',
57
+ 'scope_map',
58
+ 'forge_ground',
59
+ 'check',
60
+ 'test_run',
61
+ 'blast_radius',
62
+ 'remember',
63
+ 'audit',
64
+ ],
65
+ content: `## Implementation Pipeline
66
+
67
+ Follow the Orchestrator's full workflow:
68
+
69
+ 1. **Phase 0: Design Gate** — Orchestrator checks if design is needed. Creative/additive work triggers brainstorming first. Use \`/design\` if you want to start with design explicitly.
70
+ 2. **Phase 1: Planning** — Research, draft plan, present to user for approval
71
+ 3. **Phase 2: Implementation** — Execute phases in parallel batches
72
+ 4. **Phase 3: Completion** — Final review, docs, persist learnings
73
+
74
+ **🛑 MANDATORY STOPS** — After plan, after each batch, after completion.
75
+
76
+ Refer to the Orchestrator agent's full instructions for the detailed workflow.`,
77
+ },
78
+
79
+ plan: {
80
+ description: 'Create a detailed TDD implementation plan without executing it',
81
+ agent: 'Planner',
82
+ tools: [
83
+ 'search',
84
+ 'scope_map',
85
+ 'forge_ground',
86
+ 'forge_classify',
87
+ 'file_summary',
88
+ 'analyze_structure',
89
+ 'analyze_dependencies',
90
+ 'remember',
91
+ ],
92
+ content: `## Planning Workflow
93
+
94
+ 1. **KB Recall** — Search for past plans, architecture decisions
95
+ 2. **FORGE Ground** — Classify tier, scope map, seed unknowns
96
+ 3. **Research** — Explore codebase, understand subsystems
97
+ 4. **Draft Plan** — 3-10 phases with agent assignments, TDD steps
98
+ 5. **Dependency Graph** — Group into parallel batches
99
+ 6. **Present** — Show plan with open questions
100
+
101
+ **🛑 MANDATORY STOP** — Wait for user approval. Do NOT implement.`,
102
+ },
103
+
104
+ design: {
105
+ description:
106
+ 'Collaborative design session — explore ideas, refine requirements, produce a design spec',
107
+ agent: 'Orchestrator',
108
+ tools: ['search', 'scope_map', 'file_summary', 'compact', 'remember', 'forge_classify'],
109
+ content: `## Design Session
110
+
111
+ Enter Phase 0 (Design Gate) directly — the user is requesting a design session.
112
+
113
+ 1. **Invoke the brainstorming skill** — interactive design dialogue with user
114
+ 2. Follow the skill's full process (auto-selects Simple or Advanced mode)
115
+ 3. If Advanced Mode, use Decision Protocol for unresolved technical choices
116
+ 4. Terminal state: brainstorming skill invokes writing-plans skill
117
+
118
+ **🛑 HARD GATE** — Do NOT skip brainstorming. Do NOT write code. Design first.`,
119
+ },
120
+
121
+ review: {
122
+ description: 'Dual-model code + architecture review pipeline',
123
+ agent: 'Orchestrator',
124
+ tools: ['search', 'blast_radius', 'check', 'test_run', 'analyze_dependencies', 'remember'],
125
+ content: `## Review Pipeline
126
+
127
+ ### Step 1: Scope
128
+ Identify changed files and their blast radius.
129
+
130
+ ### Step 2: Code Review (parallel)
131
+ Launch Code-Reviewer-Alpha and Code-Reviewer-Beta on the same changeset.
132
+
133
+ ### Step 3: Architecture Review (if needed)
134
+ If changes cross service boundaries or modify interfaces, launch Architect-Reviewer-Alpha and Architect-Reviewer-Beta.
135
+
136
+ ### Step 4: Synthesis
137
+ Merge findings from both reviewers:
138
+ - **Agreements**: Both found same issue → HIGH confidence
139
+ - **Unique findings**: One found, other didn't → verify
140
+ - **Disagreements**: Contradicting verdicts → present both to user
141
+
142
+ ### Step 5: Report
143
+ Present unified review with: verdict, findings by severity, recommended actions.`,
144
+ },
145
+ };