agentic-qe 3.11.0 → 3.11.2

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 (470) hide show
  1. package/.claude/commands/agents/README.md +50 -0
  2. package/.claude/commands/agents/agent-capabilities.md +140 -0
  3. package/.claude/commands/agents/agent-coordination.md +28 -0
  4. package/.claude/commands/agents/agent-spawning.md +28 -0
  5. package/.claude/commands/agents/agent-types.md +216 -0
  6. package/.claude/commands/agents/health.md +139 -0
  7. package/.claude/commands/agents/list.md +100 -0
  8. package/.claude/commands/agents/logs.md +130 -0
  9. package/.claude/commands/agents/metrics.md +122 -0
  10. package/.claude/commands/agents/pool.md +127 -0
  11. package/.claude/commands/agents/spawn.md +140 -0
  12. package/.claude/commands/agents/status.md +115 -0
  13. package/.claude/commands/agents/stop.md +102 -0
  14. package/.claude/commands/claude-flow-help.md +1 -1
  15. package/.claude/commands/coordination/README.md +9 -0
  16. package/.claude/commands/coordination/agent-spawn.md +25 -0
  17. package/.claude/commands/coordination/init.md +44 -0
  18. package/.claude/commands/coordination/orchestrate.md +43 -0
  19. package/.claude/commands/coordination/spawn.md +45 -0
  20. package/.claude/commands/coordination/swarm-init.md +85 -0
  21. package/.claude/commands/coordination/task-orchestrate.md +25 -0
  22. package/.claude/commands/github/code-review-swarm.md +1 -1
  23. package/.claude/commands/github/issue-tracker.md +3 -3
  24. package/.claude/commands/github/release-manager.md +5 -3
  25. package/.claude/commands/github/release-swarm.md +1 -1
  26. package/.claude/commands/github/repo-architect.md +2 -2
  27. package/.claude/commands/github/swarm-issue.md +4 -1
  28. package/.claude/commands/github/swarm-pr.md +6 -3
  29. package/.claude/commands/github/sync-coordinator.md +3 -1
  30. package/.claude/commands/github/workflow-automation.md +2 -2
  31. package/.claude/commands/hive-mind/README.md +17 -0
  32. package/.claude/commands/hive-mind/hive-mind-consensus.md +8 -0
  33. package/.claude/commands/hive-mind/hive-mind-init.md +18 -0
  34. package/.claude/commands/hive-mind/hive-mind-memory.md +8 -0
  35. package/.claude/commands/hive-mind/hive-mind-metrics.md +8 -0
  36. package/.claude/commands/hive-mind/hive-mind-resume.md +8 -0
  37. package/.claude/commands/hive-mind/hive-mind-sessions.md +8 -0
  38. package/.claude/commands/hive-mind/hive-mind-spawn.md +21 -0
  39. package/.claude/commands/hive-mind/hive-mind-status.md +8 -0
  40. package/.claude/commands/hive-mind/hive-mind-stop.md +8 -0
  41. package/.claude/commands/hive-mind/hive-mind-wizard.md +8 -0
  42. package/.claude/commands/hive-mind/hive-mind.md +27 -0
  43. package/.claude/commands/memory/README.md +9 -0
  44. package/.claude/commands/memory/memory-persist.md +25 -0
  45. package/.claude/commands/memory/memory-search.md +25 -0
  46. package/.claude/commands/memory/memory-usage.md +25 -0
  47. package/.claude/commands/memory/neural.md +47 -0
  48. package/.claude/commands/swarm/README.md +15 -0
  49. package/.claude/commands/swarm/analysis.md +95 -0
  50. package/.claude/commands/swarm/development.md +96 -0
  51. package/.claude/commands/swarm/examples.md +168 -0
  52. package/.claude/commands/swarm/maintenance.md +102 -0
  53. package/.claude/commands/swarm/optimization.md +117 -0
  54. package/.claude/commands/swarm/research.md +136 -0
  55. package/.claude/commands/swarm/swarm-analysis.md +8 -0
  56. package/.claude/commands/swarm/swarm-background.md +8 -0
  57. package/.claude/commands/swarm/swarm-init.md +19 -0
  58. package/.claude/commands/swarm/swarm-modes.md +8 -0
  59. package/.claude/commands/swarm/swarm-monitor.md +8 -0
  60. package/.claude/commands/swarm/swarm-spawn.md +19 -0
  61. package/.claude/commands/swarm/swarm-status.md +8 -0
  62. package/.claude/commands/swarm/swarm-strategies.md +8 -0
  63. package/.claude/commands/swarm/swarm.md +87 -0
  64. package/.claude/commands/swarm/testing.md +131 -0
  65. package/.claude/commands/workflows/README.md +9 -0
  66. package/.claude/commands/workflows/development.md +78 -0
  67. package/.claude/commands/workflows/research.md +63 -0
  68. package/.claude/commands/workflows/workflow-create.md +25 -0
  69. package/.claude/commands/workflows/workflow-execute.md +25 -0
  70. package/.claude/commands/workflows/workflow-export.md +25 -0
  71. package/.claude/helpers/auto-commit.sh +1 -1
  72. package/.claude/helpers/auto-memory-hook.mjs +37 -4
  73. package/.claude/helpers/github-safe.js +90 -40
  74. package/.claude/helpers/github-setup.sh +30 -13
  75. package/.claude/helpers/hook-handler.cjs +68 -49
  76. package/.claude/helpers/intelligence.cjs +156 -27
  77. package/.claude/helpers/post-commit +1 -1
  78. package/.claude/helpers/pre-commit +1 -1
  79. package/.claude/helpers/quick-start.sh +4 -4
  80. package/.claude/helpers/router.js +70 -31
  81. package/.claude/helpers/ruflo-hook.cjs +59 -0
  82. package/.claude/helpers/session.js +28 -6
  83. package/.claude/helpers/setup-mcp.sh +3 -3
  84. package/.claude/helpers/statusline.cjs +584 -468
  85. package/.claude/helpers/statusline.js +47 -11
  86. package/.claude/skills/github-code-review/SKILL.md +2 -17
  87. package/.claude/skills/github-multi-repo/SKILL.md +4 -16
  88. package/.claude/skills/github-project-management/SKILL.md +18 -33
  89. package/.claude/skills/github-release-management/SKILL.md +4 -21
  90. package/.claude/skills/github-workflow-automation/SKILL.md +8 -26
  91. package/.claude/skills/pair-programming/SKILL.md +2 -2
  92. package/.claude/skills/qe-code-intelligence/SKILL.md +3 -0
  93. package/.claude/skills/reasoningbank-intelligence/SKILL.md +2 -2
  94. package/.claude/skills/skill-builder/SKILL.md +0 -103
  95. package/.claude/skills/skills-manifest.json +1 -1
  96. package/.claude/skills/sparc-methodology/SKILL.md +2 -11
  97. package/.claude/skills/stream-chain/SKILL.md +0 -3
  98. package/.claude/skills/swarm-advanced/SKILL.md +2 -5
  99. package/.claude/skills/swarm-orchestration/SKILL.md +1 -1
  100. package/.claude/skills/verification-quality/SKILL.md +121 -93
  101. package/CHANGELOG.md +84 -0
  102. package/README.md +1 -0
  103. package/assets/skills/pair-programming/SKILL.md +2 -2
  104. package/assets/skills/qe-code-intelligence/SKILL.md +3 -0
  105. package/assets/skills/verification-quality/SKILL.md +121 -93
  106. package/dist/audit/witness-chain.d.ts +1 -1
  107. package/dist/audit/witness-findings.d.ts +50 -0
  108. package/dist/audit/witness-findings.js +41 -0
  109. package/dist/cli/bundle.js +5 -5
  110. package/dist/cli/chunks/adapter-LDNYC4GH.js +2 -0
  111. package/dist/cli/chunks/{agent-booster-wasm-5CSKQB4O.js → agent-booster-wasm-FNCVODUJ.js} +2 -2
  112. package/dist/cli/chunks/{agent-handler-EBV3OKTE.js → agent-handler-JK7VK37B.js} +2 -2
  113. package/dist/cli/chunks/{agent-memory-branch-RZ53YM2U.js → agent-memory-branch-EPVVJNNA.js} +2 -2
  114. package/dist/cli/chunks/aqe-learning-engine-CA4CT5Q7.js +2 -0
  115. package/dist/cli/chunks/{arena-UCP74DRO.js → arena-EH2IMSRW.js} +4 -4
  116. package/dist/cli/chunks/{arena-QWYTIQ6I.js → arena-NTHVDZTJ.js} +2 -2
  117. package/dist/cli/chunks/{audit-M4FNIX47.js → audit-ODZV2T2B.js} +2 -2
  118. package/dist/cli/chunks/base-TSDAEMT4.js +2 -0
  119. package/dist/cli/chunks/{hnswlib-node-HMZC5TXM.js → better-sqlite3-5JTP47LA.js} +2 -2
  120. package/dist/cli/chunks/{brain-handler-OY6Q2GY5.js → brain-handler-NVB6OJ25.js} +3 -3
  121. package/dist/cli/chunks/{branch-enumerator-TQWN4NIX.js → branch-enumerator-BIXSELMY.js} +2 -2
  122. package/dist/cli/chunks/{browser-2EH3RXJ2.js → browser-S2Y2W33Z.js} +2 -2
  123. package/dist/cli/chunks/browser-workflow-3HCTJBLR.js +2 -0
  124. package/dist/cli/chunks/{chunk-V6WJVFRN.js → chunk-26ZMIYSK.js} +2 -2
  125. package/dist/cli/chunks/{chunk-I2HQLBWG.js → chunk-27KNLVOY.js} +2 -2
  126. package/dist/cli/chunks/{chunk-HNSZDIQU.js → chunk-2Q65LTJN.js} +2 -2
  127. package/dist/cli/chunks/{chunk-SKL225P5.js → chunk-3ATEYGVD.js} +2 -2
  128. package/dist/cli/chunks/{chunk-LTH6XARD.js → chunk-3J3QXLWP.js} +2 -2
  129. package/dist/cli/chunks/{chunk-NQD4CMXC.js → chunk-3KTOM7NN.js} +2 -2
  130. package/dist/cli/chunks/{chunk-QCJ7YOVN.js → chunk-3NCVUFAL.js} +2 -2
  131. package/dist/cli/chunks/{chunk-ZEUUVLS2.js → chunk-42DCMEUM.js} +1 -1
  132. package/dist/cli/chunks/{chunk-2QU6C3OS.js → chunk-4FTVTAMN.js} +2 -2
  133. package/dist/cli/chunks/{chunk-QYXTESM3.js → chunk-4PYJCIRO.js} +2 -2
  134. package/dist/cli/chunks/{chunk-LFT7WYHW.js → chunk-527U4AHC.js} +2 -2
  135. package/dist/cli/chunks/{chunk-VHON5NDM.js → chunk-5AFO7ZZG.js} +3 -3
  136. package/dist/cli/chunks/{chunk-F62ZQZQQ.js → chunk-5BDVFFYF.js} +2 -2
  137. package/dist/cli/chunks/{chunk-KBVXKFDI.js → chunk-5KMGG3QW.js} +4 -4
  138. package/dist/cli/chunks/{chunk-AVKGDS6F.js → chunk-6LQIVIZB.js} +2 -2
  139. package/dist/cli/chunks/{chunk-RKDNLPZM.js → chunk-6SOGYNJG.js} +2 -2
  140. package/dist/cli/chunks/{chunk-RPYYS6BX.js → chunk-6VAFRS5N.js} +2 -2
  141. package/dist/cli/chunks/chunk-72VVTMEL.js +2 -0
  142. package/dist/cli/chunks/{chunk-AURDGQNB.js → chunk-75C5GX7D.js} +2 -2
  143. package/dist/cli/chunks/{chunk-JN3IQB4L.js → chunk-76RO2RHG.js} +1 -1
  144. package/dist/cli/chunks/{chunk-7E5NYLJT.js → chunk-7HYO76F2.js} +2 -2
  145. package/dist/cli/chunks/{chunk-R3YO3Z7I.js → chunk-7KHZZVF2.js} +4 -4
  146. package/dist/cli/chunks/{chunk-G5VE3HQW.js → chunk-7MKF52GT.js} +2 -2
  147. package/dist/cli/chunks/{chunk-TGLEREP5.js → chunk-7VM4ZUHT.js} +2 -2
  148. package/dist/cli/chunks/{chunk-XW5OXBVV.js → chunk-7XIQR6VU.js} +2 -2
  149. package/dist/cli/chunks/{chunk-XKRG2U3V.js → chunk-A4ZDKF5F.js} +1 -1
  150. package/dist/cli/chunks/{chunk-XSG4XKGO.js → chunk-AAVUZVM6.js} +2 -2
  151. package/dist/cli/chunks/{chunk-XVQUVCFR.js → chunk-AINAWVGD.js} +2 -2
  152. package/dist/cli/chunks/{chunk-PUTRXS5I.js → chunk-AK5Q2WCJ.js} +2 -2
  153. package/dist/cli/chunks/{chunk-TYS77XHV.js → chunk-AKZK46TQ.js} +2 -2
  154. package/dist/cli/chunks/{chunk-JQM64WJ2.js → chunk-ARUXFZDY.js} +1 -1
  155. package/dist/cli/chunks/{chunk-YR44KQUK.js → chunk-AYXRT2ND.js} +1 -1
  156. package/dist/cli/chunks/{chunk-ZT4NPTML.js → chunk-AZQ6HDPM.js} +2 -2
  157. package/dist/cli/chunks/{chunk-DCJIXDO6.js → chunk-BGVEBYV4.js} +2 -2
  158. package/dist/cli/chunks/{chunk-IHNBZ5XG.js → chunk-C6UTRG66.js} +2 -2
  159. package/dist/cli/chunks/{chunk-R7FHQQAV.js → chunk-CAUTOCLZ.js} +2 -2
  160. package/dist/cli/chunks/{chunk-N52ZBTPM.js → chunk-CAVBEZV4.js} +2 -2
  161. package/dist/cli/chunks/{chunk-3LP5GPGU.js → chunk-CEMROADY.js} +1 -1
  162. package/dist/cli/chunks/{chunk-IQSPL2H4.js → chunk-CMVNYVKL.js} +2 -2
  163. package/dist/cli/chunks/{chunk-7BD7DZCB.js → chunk-CUDGKSFX.js} +2 -2
  164. package/dist/cli/chunks/{chunk-D3S4SRSA.js → chunk-CZYSCUJ4.js} +2 -2
  165. package/dist/cli/chunks/{chunk-4OTA6KYJ.js → chunk-DMUQV2YU.js} +2 -2
  166. package/dist/cli/chunks/{chunk-KZE5UR4T.js → chunk-DPFLJMEI.js} +3 -3
  167. package/dist/cli/chunks/{chunk-IOQYSR5S.js → chunk-DU4GQKTH.js} +2 -2
  168. package/dist/cli/chunks/{chunk-FMKALHT3.js → chunk-EDH4H55B.js} +2 -2
  169. package/dist/cli/chunks/{chunk-NI7O3GKZ.js → chunk-EIWZDVMT.js} +3 -3
  170. package/dist/cli/chunks/{chunk-5DG6H553.js → chunk-FPZLOVEF.js} +1 -1
  171. package/dist/cli/chunks/{chunk-DV7662EZ.js → chunk-FV53RMVB.js} +1 -1
  172. package/dist/cli/chunks/{chunk-BA4WZIAQ.js → chunk-FYY7OJ6Y.js} +2 -2
  173. package/dist/cli/chunks/{chunk-5ASPEVVF.js → chunk-G4CQBQBV.js} +1 -1
  174. package/dist/cli/chunks/{chunk-GBFAQ4DW.js → chunk-G6LIQFT2.js} +1 -1
  175. package/dist/cli/chunks/{chunk-2WVLFT2I.js → chunk-H3LGBH4Y.js} +1 -1
  176. package/dist/cli/chunks/{chunk-G25YZ7Z6.js → chunk-H4ZPPHOI.js} +2 -2
  177. package/dist/cli/chunks/{chunk-C33BMWYZ.js → chunk-H5TM4KIB.js} +5 -5
  178. package/dist/cli/chunks/{chunk-72QNONO6.js → chunk-H6MBRYA7.js} +2 -2
  179. package/dist/cli/chunks/{chunk-5OJXVVTI.js → chunk-HDBJORV7.js} +2 -2
  180. package/dist/cli/chunks/{chunk-HJFQVKPI.js → chunk-I3AD523O.js} +1 -1
  181. package/dist/cli/chunks/{chunk-2BBKA5J4.js → chunk-I7UWFV6N.js} +1 -1
  182. package/dist/cli/chunks/{chunk-IFTEM672.js → chunk-IMPSB5WW.js} +2 -2
  183. package/dist/cli/chunks/{chunk-YSTWLDVD.js → chunk-IO7ZUP2G.js} +3 -3
  184. package/dist/cli/chunks/{chunk-F6Y7DTHR.js → chunk-IQOCTGA2.js} +2 -2
  185. package/dist/cli/chunks/{chunk-RVQW6CBF.js → chunk-IXYF5BZY.js} +2 -2
  186. package/dist/cli/chunks/{chunk-3J6LYF6I.js → chunk-JC4Z2ADP.js} +2 -2
  187. package/dist/cli/chunks/{chunk-T6KT63NC.js → chunk-JCH2FHJ7.js} +2 -2
  188. package/dist/cli/chunks/{chunk-7PTA7AVW.js → chunk-JDFF2QMZ.js} +1 -1
  189. package/dist/cli/chunks/{chunk-UEH6C5JA.js → chunk-JELN5XTK.js} +1 -1
  190. package/dist/cli/chunks/{chunk-Z45QDDZQ.js → chunk-JSZNI3AO.js} +1 -1
  191. package/dist/cli/chunks/{chunk-ZFP3O5FM.js → chunk-K3YM2Z3E.js} +1 -1
  192. package/dist/cli/chunks/{chunk-X2TUDGFL.js → chunk-K426HTEQ.js} +44 -44
  193. package/dist/cli/chunks/{chunk-GGSXHGWD.js → chunk-K6IQBVD7.js} +2 -2
  194. package/dist/cli/chunks/{chunk-453UDYD2.js → chunk-KEJEZY2R.js} +163 -181
  195. package/dist/cli/chunks/{chunk-MTSMFEWK.js → chunk-KFE6LB4I.js} +2 -2
  196. package/dist/cli/chunks/{chunk-DDQWW22L.js → chunk-KO3WB4SU.js} +2 -2
  197. package/dist/cli/chunks/{chunk-ETGEGMYS.js → chunk-LAY35POY.js} +3 -3
  198. package/dist/cli/chunks/{chunk-P3NV6KN3.js → chunk-LFXXA325.js} +1 -1
  199. package/dist/cli/chunks/{chunk-ZK56THZT.js → chunk-LI3T5YNC.js} +3 -3
  200. package/dist/cli/chunks/{chunk-ACV2WVMX.js → chunk-LIEA5EON.js} +1 -1
  201. package/dist/cli/chunks/{chunk-KOOY72E3.js → chunk-LRJWKFGY.js} +2 -2
  202. package/dist/cli/chunks/{chunk-Y7TBCHW4.js → chunk-LY6PTRVL.js} +2 -2
  203. package/dist/cli/chunks/{chunk-WP6XUSVW.js → chunk-MAXOIEUG.js} +1 -1
  204. package/dist/cli/chunks/{chunk-X2L4POJE.js → chunk-MN6W7ZNL.js} +1 -1
  205. package/dist/cli/chunks/{chunk-CERSTEAJ.js → chunk-NGE5YNKC.js} +2 -2
  206. package/dist/cli/chunks/{chunk-J425SQFE.js → chunk-NIW4CLN2.js} +2 -2
  207. package/dist/cli/chunks/{chunk-PJ4HSXH3.js → chunk-NPT7BYGF.js} +1 -1
  208. package/dist/cli/chunks/{chunk-HHSEIPSQ.js → chunk-NZNXEEZR.js} +1 -1
  209. package/dist/cli/chunks/{chunk-FMULOSBL.js → chunk-O3IIAIXB.js} +1 -1
  210. package/dist/cli/chunks/{chunk-ITRUZ3WE.js → chunk-OC2W7KIW.js} +2 -2
  211. package/dist/cli/chunks/{chunk-QZQGYSDG.js → chunk-OFUF3APC.js} +2 -2
  212. package/dist/cli/chunks/{chunk-MKLLB4PM.js → chunk-OU52V67H.js} +4 -4
  213. package/dist/cli/chunks/{chunk-Y7UJC5OL.js → chunk-P2RR4SW5.js} +3 -3
  214. package/dist/cli/chunks/{chunk-7Q6CMSMD.js → chunk-P3VRXQ3H.js} +3 -3
  215. package/dist/cli/chunks/{chunk-YRP73HO4.js → chunk-P5SGBQLY.js} +1 -1
  216. package/dist/cli/chunks/{chunk-MDYI4IIW.js → chunk-P7MIOTVP.js} +1 -1
  217. package/dist/cli/chunks/{chunk-B4QA3YN6.js → chunk-PFDILSVO.js} +1 -1
  218. package/dist/cli/chunks/{chunk-2ZC7S4UG.js → chunk-PPD5ZLNA.js} +2 -2
  219. package/dist/cli/chunks/{chunk-VGYUVMSN.js → chunk-QFJDR4HC.js} +2 -2
  220. package/dist/cli/chunks/{chunk-3GWSHRDA.js → chunk-QZ2GQGJX.js} +2 -2
  221. package/dist/cli/chunks/{chunk-XMZ2DHUL.js → chunk-QZLTIGLB.js} +1 -1
  222. package/dist/cli/chunks/{chunk-BEOGI5FC.js → chunk-RHSUXQNF.js} +2 -2
  223. package/dist/cli/chunks/{chunk-ISVBO4XO.js → chunk-S6BWEZKK.js} +2 -2
  224. package/dist/cli/chunks/{chunk-AYOTODUV.js → chunk-SE4S23C7.js} +1 -1
  225. package/dist/cli/chunks/{chunk-SLWJNHCR.js → chunk-TOGZ37RL.js} +2 -2
  226. package/dist/cli/chunks/{chunk-73EWPVBJ.js → chunk-UCXW24HY.js} +2 -2
  227. package/dist/cli/chunks/{chunk-JQSA6EMI.js → chunk-UQ6WB4N2.js} +2 -2
  228. package/dist/cli/chunks/{chunk-SQPDGRYR.js → chunk-UQBGA4UA.js} +1 -1
  229. package/dist/cli/chunks/{chunk-N3R3JGUY.js → chunk-VNFL2TPU.js} +1 -1
  230. package/dist/cli/chunks/{chunk-QGBXENIP.js → chunk-WARFZ626.js} +1 -1
  231. package/dist/cli/chunks/{chunk-PVBJUANU.js → chunk-WEBHFIWS.js} +2 -2
  232. package/dist/cli/chunks/{chunk-YQIMO7VJ.js → chunk-WKIYYF3G.js} +2 -2
  233. package/dist/cli/chunks/{chunk-6VQKNPGY.js → chunk-WZC4HKGZ.js} +2 -2
  234. package/dist/cli/chunks/{chunk-O6FN53HB.js → chunk-X36TZXDK.js} +1 -1
  235. package/dist/cli/chunks/{chunk-IKNDGXZZ.js → chunk-XN4G3SRU.js} +2 -2
  236. package/dist/cli/chunks/{chunk-N7MKF4F4.js → chunk-XNREA3FG.js} +1 -1
  237. package/dist/cli/chunks/{chunk-PC3VIR2A.js → chunk-XRDPGJNW.js} +2 -2
  238. package/dist/cli/chunks/{chunk-ETZ62NFD.js → chunk-XXCSJMSR.js} +1 -1
  239. package/dist/cli/chunks/{chunk-LCDRRAES.js → chunk-XY2B2BEJ.js} +2 -2
  240. package/dist/cli/chunks/{chunk-HMSPPGUF.js → chunk-XY4JS3IZ.js} +2 -2
  241. package/dist/cli/chunks/{chunk-L7GQKJLV.js → chunk-Y4M2HMPR.js} +2 -2
  242. package/dist/cli/chunks/{chunk-2TUVBEWK.js → chunk-YDPBCN7H.js} +2 -2
  243. package/dist/cli/chunks/{chunk-NBTKI2TX.js → chunk-YGR54EAA.js} +2 -2
  244. package/dist/cli/chunks/{chunk-WBQEOACC.js → chunk-YGRY2TVI.js} +2 -2
  245. package/dist/cli/chunks/{chunk-VVJXQ4FR.js → chunk-YJUJCLXV.js} +2 -2
  246. package/dist/cli/chunks/{chunk-SHW43QQV.js → chunk-YWG4LHFU.js} +2 -2
  247. package/dist/cli/chunks/{chunk-FGOVDO3R.js → chunk-Z2QNTRUX.js} +2 -2
  248. package/dist/cli/chunks/{chunk-UFMW25MS.js → chunk-ZBJMVWQR.js} +2 -2
  249. package/dist/cli/chunks/{chunk-7MBF3S25.js → chunk-ZH6HYT7C.js} +1 -1
  250. package/dist/cli/chunks/{chunk-LYV7WJWA.js → chunk-ZP2GE6DM.js} +1 -1
  251. package/dist/cli/chunks/{chunk-JNX7IRSI.js → chunk-ZQYEBLTL.js} +2 -2
  252. package/dist/cli/chunks/{chunk-FTOICJQG.js → chunk-ZRU3OZEU.js} +2 -2
  253. package/dist/cli/chunks/{chunk-OZQIDDXB.js → chunk-ZU3V4CJ4.js} +2 -2
  254. package/dist/cli/chunks/{chunk-JZFA2PWY.js → chunk-ZWMXF6AX.js} +2 -2
  255. package/dist/cli/chunks/{ci-4JK2NFCD.js → ci-SM3EVLZ4.js} +2 -2
  256. package/dist/cli/chunks/{ci-output-LCGTJQWC.js → ci-output-YYXICZBC.js} +2 -2
  257. package/dist/cli/chunks/{circuit-breaker-EJF7D3L4.js → circuit-breaker-CV5UGKXT.js} +2 -2
  258. package/dist/cli/chunks/{claude-flow-setup-3RUC6OB4.js → claude-flow-setup-BSBUZ4B7.js} +2 -2
  259. package/dist/cli/chunks/client-WRDYZGM2.js +2 -0
  260. package/dist/cli/chunks/{cline-installer-6LY5C5QH.js → cline-installer-P2O6STIC.js} +2 -2
  261. package/dist/cli/chunks/code-M7DDLBGS.js +58 -0
  262. package/dist/cli/chunks/{code-index-extractor-OY5GQJBM.js → code-index-extractor-3QZIUYOG.js} +2 -2
  263. package/dist/cli/chunks/{codex-installer-BO7E2ZVA.js → codex-installer-5JVZCCTC.js} +2 -2
  264. package/dist/cli/chunks/{completions-VGL3KJ2R.js → completions-EM7IL2BJ.js} +8 -5
  265. package/dist/cli/chunks/{complexity-analyzer-5DPUK7IL.js → complexity-analyzer-VJXVB2CV.js} +2 -2
  266. package/dist/cli/chunks/{continuedev-installer-LFDG2D42.js → continuedev-installer-RCKJIAEC.js} +2 -2
  267. package/dist/cli/chunks/{copilot-installer-SEMMMIZH.js → copilot-installer-DZ7LTDOZ.js} +2 -2
  268. package/dist/cli/chunks/core-handlers-O6E5DNHT.js +2 -0
  269. package/dist/cli/chunks/{cost-tracker-OPBC6FQM.js → cost-tracker-QLOLXVAM.js} +2 -2
  270. package/dist/cli/chunks/{coverage-CFDUSRKU.js → coverage-LYHTLWRV.js} +3 -3
  271. package/dist/cli/chunks/cross-domain-router-EV7LQMDO.js +2 -0
  272. package/dist/cli/chunks/{cursor-installer-6TXUUVY4.js → cursor-installer-PSIZ3Y53.js} +2 -2
  273. package/dist/cli/chunks/{daemon-5KO46YQR.js → daemon-IYDTMA5M.js} +4 -4
  274. package/dist/cli/chunks/{daemon-7BDBPPAF.js → daemon-YLOAXM4X.js} +3 -3
  275. package/dist/cli/chunks/{dag-attention-scheduler-6DQKZOUW.js → dag-attention-scheduler-I2UIO3Z7.js} +2 -2
  276. package/dist/cli/chunks/{detect-R2QAYDPI.js → detect-ZXQ7X7GZ.js} +2 -2
  277. package/dist/cli/chunks/{dist-node-3POCIJ4N.js → dist-node-GK6OZX4H.js} +2 -2
  278. package/dist/cli/chunks/{domain-handler-KW63CHUH.js → domain-handler-NS3IBLRQ.js} +2 -2
  279. package/dist/cli/chunks/{domain-transfer-2QPOJCUD.js → domain-transfer-5G4RZEWF.js} +2 -2
  280. package/dist/cli/chunks/dream-E4C236UL.js +2 -0
  281. package/dist/cli/chunks/{embed-and-insert-pattern-OIDJZQEP.js → embed-and-insert-pattern-V4JJUFR6.js} +2 -2
  282. package/dist/cli/chunks/{eval-UGEKTTAQ.js → eval-7Q6PPYKR.js} +2 -2
  283. package/dist/cli/chunks/{experience-capture-middleware-3BIM2TT7.js → experience-capture-middleware-DUBKSYFM.js} +3 -3
  284. package/dist/cli/chunks/{fast-paths-HCJQXB7W.js → fast-paths-IDPPMBUW.js} +2 -2
  285. package/dist/cli/chunks/{feature-flags-W4JSFBMV.js → feature-flags-EPTMAAKA.js} +2 -2
  286. package/dist/cli/chunks/{feature-flags-GDGJKLN4.js → feature-flags-KXI6FDY7.js} +2 -2
  287. package/dist/cli/chunks/{file-discovery-JMUZ4MUH.js → file-discovery-EDX2OJO7.js} +2 -2
  288. package/dist/cli/chunks/{fleet-YNNK2CKW.js → fleet-67BO3LJ4.js} +3 -3
  289. package/dist/cli/chunks/{gnn-wrapper-R2ZY6CDD.js → gnn-wrapper-YARORYT7.js} +2 -2
  290. package/dist/cli/chunks/{heartbeat-handler-OZX2EJHQ.js → heartbeat-handler-K3JGPBYR.js} +4 -4
  291. package/dist/cli/chunks/heartbeat-scheduler-WMADLDKT.js +2 -0
  292. package/dist/cli/chunks/hnsw-adapter-STRDGJ65.js +2 -0
  293. package/dist/cli/chunks/hnsw-index-DBHX3TSC.js +2 -0
  294. package/dist/cli/chunks/{hnsw-legacy-bridge-3S6TYCG3.js → hnsw-legacy-bridge-CDDRSV5E.js} +2 -2
  295. package/dist/cli/chunks/{better-sqlite3-RIBLRHJL.js → hnswlib-node-2KL54YUA.js} +2 -2
  296. package/dist/cli/chunks/{hooks-KM7WR35T.js → hooks-6SCAE6LC.js} +10 -10
  297. package/dist/cli/chunks/hybrid-router-L2K55I4T.js +2 -0
  298. package/dist/cli/chunks/{hypergraph-engine-RX53A73M.js → hypergraph-engine-I3LUMO7I.js} +2 -2
  299. package/dist/cli/chunks/{hypergraph-handler-3QQB3H3Z.js → hypergraph-handler-YAKAIVCN.js} +3 -3
  300. package/dist/cli/chunks/impact-analyzer-WMO7ZGS7.js +2 -0
  301. package/dist/cli/chunks/{init-handler-Y62RH4ZI.js → init-handler-NBKCZD7Q.js} +6 -6
  302. package/dist/cli/chunks/init-wizard-ZAB7UZZS.js +2 -0
  303. package/dist/cli/chunks/kernel-4MUFDEQI.js +2 -0
  304. package/dist/cli/chunks/{kilocode-installer-26R253L2.js → kilocode-installer-YGPJCPU3.js} +2 -2
  305. package/dist/cli/chunks/{kiro-installer-PFA5QPZZ.js → kiro-installer-JV3ONVMN.js} +2 -2
  306. package/dist/cli/chunks/knowledge-graph-GZRFGXLX.js +2 -0
  307. package/dist/cli/chunks/{learning-CQLM5ANX.js → learning-2FEZJ5CX.js} +3 -3
  308. package/dist/cli/chunks/{llm-router-QZ5PG4PF.js → llm-router-SILI4KLU.js} +4 -4
  309. package/dist/cli/chunks/llm-router-service-5ODLU5U5.js +2 -0
  310. package/dist/cli/chunks/{load-UPA6LPHM.js → load-EGXLQVR3.js} +2 -2
  311. package/dist/cli/chunks/load-test-ZDQFS5XS.js +2 -0
  312. package/dist/cli/chunks/{mcp-LSWTLAJ4.js → mcp-OJH775TL.js} +2 -2
  313. package/dist/cli/chunks/{memory-VGEYYGCG.js → memory-FNEOK4FW.js} +5 -5
  314. package/dist/cli/chunks/memory-backend-UK7SQ6ZM.js +2 -0
  315. package/dist/cli/chunks/{memory-handlers-QBURG7NA.js → memory-handlers-6LDUH3JZ.js} +2 -2
  316. package/dist/cli/chunks/{multi-model-executor-VZVFBIKC.js → multi-model-executor-ORTFWLLE.js} +2 -2
  317. package/dist/cli/chunks/{opencode-installer-PBQAXNLV.js → opencode-installer-UAQLW6XX.js} +2 -2
  318. package/dist/cli/chunks/{orchestrator-YND7JB5O.js → orchestrator-VE5KJ2V4.js} +5 -5
  319. package/dist/cli/chunks/pattern-null-store-LO2QTIBU.js +2 -0
  320. package/dist/cli/chunks/{pipeline-GM5RRUES.js → pipeline-FNMDRWTU.js} +2 -2
  321. package/dist/cli/chunks/{platform-L7OGGRSL.js → platform-MGAKRUQN.js} +2 -2
  322. package/dist/cli/chunks/{plugin-N4YAE6H5.js → plugin-YX7THX3I.js} +2 -2
  323. package/dist/cli/chunks/{prime-radiant-advanced-wasm-7D67XV6Z.js → prime-radiant-advanced-wasm-XJV4RLMK.js} +2 -2
  324. package/dist/cli/chunks/protocol-executor-JWMYQEOI.js +2 -0
  325. package/dist/cli/chunks/{protocol-handler-V2WTFU7N.js → protocol-handler-QFET442Y.js} +2 -2
  326. package/dist/cli/chunks/{prove-33DS5Z3N.js → prove-QBAESCOC.js} +2 -2
  327. package/dist/cli/chunks/provider-manager-PEXOHGNB.js +2 -0
  328. package/dist/cli/chunks/qe-reasoning-bank-7B2G4UGQ.js +2 -0
  329. package/dist/cli/chunks/{quality-WCSEA5GH.js → quality-ZTNRL6EG.js} +2 -2
  330. package/dist/cli/chunks/queen-coordinator-6OF4HT3S.js +2 -0
  331. package/dist/cli/chunks/{real-embeddings-OQ5F37DG.js → real-embeddings-ZFFDV6HC.js} +2 -2
  332. package/dist/cli/chunks/{roocode-installer-II7LIR2X.js → roocode-installer-J4LFL4AE.js} +2 -2
  333. package/dist/cli/chunks/router-GMWRF6DU.js +2 -0
  334. package/dist/cli/chunks/routing-feedback-XKJSQK3I.js +2 -0
  335. package/dist/cli/chunks/{routing-handler-6OFHARIY.js → routing-handler-A5QG2TP2.js} +2 -2
  336. package/dist/cli/chunks/{ruvector-commands-GD5JTR4M.js → ruvector-commands-J5JL5WX5.js} +2 -2
  337. package/dist/cli/chunks/{rvf-dual-writer-HSK6BYZV.js → rvf-dual-writer-H7442GMO.js} +2 -2
  338. package/dist/cli/chunks/{rvf-migration-adapter-554SMF5S.js → rvf-migration-adapter-PTFQUYKC.js} +2 -2
  339. package/dist/cli/chunks/{rvf-migration-coordinator-OFDBCAYE.js → rvf-migration-coordinator-RSNROYRX.js} +2 -2
  340. package/dist/cli/chunks/rvf-native-adapter-YEA6TMXB.js +2 -0
  341. package/dist/cli/chunks/safe-db-5DOP2J3V.js +2 -0
  342. package/dist/cli/chunks/schedule-SUWTOBHP.js +2 -0
  343. package/dist/cli/chunks/scheduler-P4VTC5SQ.js +2 -0
  344. package/dist/cli/chunks/{security-GN4J6DSS.js → security-LHHLMCBA.js} +3 -3
  345. package/dist/cli/chunks/{shared-rvf-adapter-Q4PM3QCN.js → shared-rvf-adapter-NPSHVUTM.js} +2 -2
  346. package/dist/cli/chunks/{shared-rvf-dual-writer-R5WK5BXQ.js → shared-rvf-dual-writer-INQDY5WE.js} +2 -2
  347. package/dist/cli/chunks/sqlite-persistence-5Z2RAXH7.js +2 -0
  348. package/dist/cli/chunks/{status-handler-AHS5WVMG.js → status-handler-R2KIAMAE.js} +2 -2
  349. package/dist/cli/chunks/{structural-health-5KUKNLHZ.js → structural-health-2VPPIOZX.js} +2 -2
  350. package/dist/cli/chunks/{sync-PUMM3SR6.js → sync-ASZ3T5GT.js} +2 -2
  351. package/dist/cli/chunks/{sync-TQLGD5HX.js → sync-NLASP7AK.js} +2 -2
  352. package/dist/cli/chunks/{task-handler-D7VXV4AF.js → task-handler-UV5R6LJG.js} +2 -2
  353. package/dist/cli/chunks/{task-handlers-QMN4SWUG.js → task-handlers-I6YJXPYP.js} +3 -3
  354. package/dist/cli/chunks/{test-HEWZR6YQ.js → test-TE43TNTI.js} +4 -4
  355. package/dist/cli/chunks/{test-scheduling-VTMLBEPA.js → test-scheduling-WWWWF2TZ.js} +3 -3
  356. package/dist/cli/chunks/{token-bootstrap-IYBG7PQ6.js → token-bootstrap-HEWP7KKS.js} +2 -2
  357. package/dist/cli/chunks/{token-usage-C7H27BFZ.js → token-usage-3FVHUAW6.js} +2 -2
  358. package/dist/cli/chunks/{transformers-5ZJVC6NB.js → transformers-O5OFM4XM.js} +2 -2
  359. package/dist/cli/chunks/{tree-sitter-wasm-parser-EARBJG2H.js → tree-sitter-wasm-parser-YOYWFW63.js} +2 -2
  360. package/dist/cli/chunks/{types-3IHE42PZ.js → types-42GR6PLO.js} +2 -2
  361. package/dist/cli/chunks/unified-memory-HCKOPFAY.js +2 -0
  362. package/dist/cli/chunks/unified-memory-hnsw-6NQPYA5C.js +2 -0
  363. package/dist/cli/chunks/unified-persistence-NIMKNAFR.js +2 -0
  364. package/dist/cli/chunks/{upgrade-YP3VFSXO.js → upgrade-BU6DJ4LT.js} +2 -2
  365. package/dist/cli/chunks/{validate-VSBNKPN6.js → validate-MPTBARGN.js} +2 -2
  366. package/dist/cli/chunks/{validate-swarm-GOCJVWXE.js → validate-swarm-5LUQYHPP.js} +2 -2
  367. package/dist/cli/chunks/{vibium-U6YKCLDF.js → vibium-MJJDANDL.js} +2 -2
  368. package/dist/cli/chunks/visual-security-HFGHA57Z.js +2 -0
  369. package/dist/cli/chunks/{web-tree-sitter-TSNVGWSN.js → web-tree-sitter-5TF4UGB3.js} +2 -2
  370. package/dist/cli/chunks/{windsurf-installer-2VKMEFSD.js → windsurf-installer-NQAOSVCN.js} +2 -2
  371. package/dist/cli/chunks/{witness-chain-BWZCW52H.js → witness-chain-23UWK2JT.js} +2 -2
  372. package/dist/cli/chunks/witness-chain-VZGGJ7TJ.js +2 -0
  373. package/dist/cli/chunks/{workflow-J6SCYLU3.js → workflow-3QOLXRJC.js} +4 -4
  374. package/dist/cli/chunks/workflow-orchestrator-45L7D4SN.js +2 -0
  375. package/dist/cli/chunks/{wrappers-M5C7DONW.js → wrappers-S6EUZBCX.js} +2 -2
  376. package/dist/cli/commands/code.js +78 -2
  377. package/dist/cli/completions/index.js +4 -1
  378. package/dist/domains/code-intelligence/coordinator.js +8 -4
  379. package/dist/domains/code-intelligence/services/c4-model/from-detected.d.ts +41 -0
  380. package/dist/domains/code-intelligence/services/c4-model/from-detected.js +152 -0
  381. package/dist/domains/code-intelligence/services/c4-model/kg-relationships.d.ts +71 -0
  382. package/dist/domains/code-intelligence/services/c4-model/kg-relationships.js +87 -0
  383. package/dist/domains/code-intelligence/services/knowledge-graph.d.ts +6 -0
  384. package/dist/domains/code-intelligence/services/knowledge-graph.js +3 -3
  385. package/dist/domains/code-intelligence/services/product-factors-bridge.d.ts +26 -5
  386. package/dist/domains/code-intelligence/services/product-factors-bridge.js +72 -65
  387. package/dist/domains/requirements-validation/coordinator.d.ts +16 -2
  388. package/dist/domains/requirements-validation/coordinator.js +112 -7
  389. package/dist/domains/requirements-validation/plugin.js +20 -1
  390. package/dist/domains/test-generation/coordinator.d.ts +3 -1
  391. package/dist/domains/test-generation/coordinator.js +15 -33
  392. package/dist/integrations/darwin/types.d.ts +10 -3
  393. package/dist/integrations/darwin/types.js +10 -3
  394. package/dist/mcp/bundle.js +446 -464
  395. package/dist/mcp/tool-scoping.d.ts +8 -2
  396. package/dist/mcp/tool-scoping.js +13 -0
  397. package/dist/mcp/tools/code-intelligence/c4.d.ts +56 -0
  398. package/dist/mcp/tools/code-intelligence/c4.js +145 -0
  399. package/dist/mcp/tools/index.d.ts +1 -0
  400. package/dist/mcp/tools/index.js +1 -0
  401. package/dist/mcp/tools/registry.d.ts +1 -0
  402. package/dist/mcp/tools/registry.js +3 -0
  403. package/dist/routing/free-tier/coordinator-support.d.ts +90 -0
  404. package/dist/routing/free-tier/coordinator-support.js +78 -0
  405. package/dist/routing/free-tier/executor.d.ts +43 -1
  406. package/dist/routing/free-tier/executor.js +69 -26
  407. package/dist/routing/free-tier/index.d.ts +1 -0
  408. package/dist/routing/free-tier/index.js +1 -0
  409. package/dist/routing/value-score.d.ts +49 -0
  410. package/dist/routing/value-score.js +54 -0
  411. package/dist/shared/c4-model/confidence.d.ts +38 -0
  412. package/dist/shared/c4-model/confidence.js +69 -0
  413. package/dist/shared/c4-model/index.d.ts +4 -0
  414. package/dist/shared/c4-model/index.js +1 -0
  415. package/dist/shared/optional-module.d.ts +23 -0
  416. package/dist/shared/optional-module.js +46 -0
  417. package/dist/verification/adversarial-verify/calibrate.d.ts +32 -0
  418. package/dist/verification/adversarial-verify/calibrate.js +33 -0
  419. package/dist/verification/adversarial-verify/gate.d.ts +38 -0
  420. package/dist/verification/adversarial-verify/gate.js +32 -0
  421. package/dist/verification/adversarial-verify/index.d.ts +20 -0
  422. package/dist/verification/adversarial-verify/index.js +6 -0
  423. package/dist/verification/adversarial-verify/prompts.d.ts +14 -0
  424. package/dist/verification/adversarial-verify/prompts.js +17 -0
  425. package/dist/verification/adversarial-verify/synthesize.d.ts +18 -0
  426. package/dist/verification/adversarial-verify/synthesize.js +35 -0
  427. package/dist/verification/adversarial-verify/types.d.ts +59 -0
  428. package/dist/verification/adversarial-verify/types.js +10 -0
  429. package/dist/verification/adversarial-verify/verify.d.ts +20 -0
  430. package/dist/verification/adversarial-verify/verify.js +34 -0
  431. package/package.json +10 -1
  432. package/dist/cli/chunks/adapter-WLFT5VMV.js +0 -2
  433. package/dist/cli/chunks/aqe-learning-engine-JBH4GZUM.js +0 -2
  434. package/dist/cli/chunks/base-A7JGM473.js +0 -2
  435. package/dist/cli/chunks/browser-workflow-TIDJWULK.js +0 -2
  436. package/dist/cli/chunks/chunk-C4OYHUJV.js +0 -2
  437. package/dist/cli/chunks/client-ZLJ3JMBC.js +0 -2
  438. package/dist/cli/chunks/code-MPDG4UHS.js +0 -39
  439. package/dist/cli/chunks/core-handlers-EM7FUYTI.js +0 -2
  440. package/dist/cli/chunks/cross-domain-router-DYGHQ6P5.js +0 -2
  441. package/dist/cli/chunks/dream-DBE5D5BD.js +0 -2
  442. package/dist/cli/chunks/heartbeat-scheduler-NFHAANNL.js +0 -2
  443. package/dist/cli/chunks/hnsw-adapter-HMPCZFBY.js +0 -2
  444. package/dist/cli/chunks/hnsw-index-KRIWSXX4.js +0 -2
  445. package/dist/cli/chunks/hybrid-router-BAB32B2W.js +0 -2
  446. package/dist/cli/chunks/impact-analyzer-3D6XHWQE.js +0 -2
  447. package/dist/cli/chunks/init-wizard-LLU3WVGC.js +0 -2
  448. package/dist/cli/chunks/kernel-ZFHAYHHJ.js +0 -2
  449. package/dist/cli/chunks/knowledge-graph-ETZ65KOY.js +0 -2
  450. package/dist/cli/chunks/llm-router-service-R6CTGF5I.js +0 -2
  451. package/dist/cli/chunks/load-test-UOWIJUCH.js +0 -2
  452. package/dist/cli/chunks/memory-backend-E3ZQKW7A.js +0 -2
  453. package/dist/cli/chunks/pattern-null-store-OUOJO2RH.js +0 -2
  454. package/dist/cli/chunks/protocol-executor-KHAPG5CP.js +0 -2
  455. package/dist/cli/chunks/provider-manager-FGPPW7T4.js +0 -2
  456. package/dist/cli/chunks/qe-reasoning-bank-TS7XOJDA.js +0 -2
  457. package/dist/cli/chunks/queen-coordinator-J35FNFQ3.js +0 -2
  458. package/dist/cli/chunks/router-AFTKPDI5.js +0 -2
  459. package/dist/cli/chunks/routing-feedback-SABZUJTF.js +0 -2
  460. package/dist/cli/chunks/rvf-native-adapter-57MDDSFQ.js +0 -2
  461. package/dist/cli/chunks/safe-db-2HR6MVYM.js +0 -2
  462. package/dist/cli/chunks/schedule-KLVAN6XI.js +0 -2
  463. package/dist/cli/chunks/scheduler-WYZ6BC5Y.js +0 -2
  464. package/dist/cli/chunks/sqlite-persistence-2CGU5INO.js +0 -2
  465. package/dist/cli/chunks/unified-memory-PMYRQC5K.js +0 -2
  466. package/dist/cli/chunks/unified-memory-hnsw-7TRL2K5Q.js +0 -2
  467. package/dist/cli/chunks/unified-persistence-S4BNJK4S.js +0 -2
  468. package/dist/cli/chunks/visual-security-RPMZ3J7L.js +0 -2
  469. package/dist/cli/chunks/witness-chain-BTDZSQ6P.js +0 -2
  470. package/dist/cli/chunks/workflow-orchestrator-42B62D3V.js +0 -2
@@ -9,13 +9,19 @@ export type AgentRole = 'test-generator' | 'coverage-analyzer' | 'security-scann
9
9
  * Tool scope definition for an agent role
10
10
  */
11
11
  export interface ToolScope {
12
- /** Tools the agent can use (if empty/undefined, uses allowAll) */
12
+ /**
13
+ * Tools the agent can use. DEFAULT-DENY: if this is empty/undefined and
14
+ * `allowAll` is not set, the role is denied EVERY tool (`isToolAllowed`
15
+ * falls through to `return false`). It does NOT grant allowAll.
16
+ */
13
17
  allowed?: string[];
14
18
  /** Tools explicitly denied (overrides allowed) */
15
19
  denied?: string[];
16
- /** Allow all tools (default for fleet-admin and unrestricted) */
20
+ /** Allow all tools admin tiers only (fleet-admin, unrestricted). */
17
21
  allowAll?: boolean;
18
22
  }
23
+ /** Every agent role, in declaration order — for governance/policy iteration. */
24
+ export declare const ALL_AGENT_ROLES: AgentRole[];
19
25
  /**
20
26
  * Check if an agent role is allowed to use a specific tool
21
27
  */
@@ -4,6 +4,19 @@
4
4
  * Restricts MCP tool access by agent role for security isolation.
5
5
  * Each agent type has a defined set of tools it can invoke.
6
6
  */
7
+ /** Every agent role, in declaration order — for governance/policy iteration. */
8
+ export const ALL_AGENT_ROLES = [
9
+ 'test-generator',
10
+ 'coverage-analyzer',
11
+ 'security-scanner',
12
+ 'quality-assessor',
13
+ 'defect-predictor',
14
+ 'contract-validator',
15
+ 'accessibility-tester',
16
+ 'chaos-engineer',
17
+ 'fleet-admin',
18
+ 'unrestricted',
19
+ ];
7
20
  /**
8
21
  * Default tool scopes per agent role
9
22
  */
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Agentic QE v3 - C4 Architecture MCP Tool (ADR-112)
3
+ *
4
+ * qe/code/c4 - Generate C4 architecture diagrams (Context/Container/Component,
5
+ * Mermaid) from codebase analysis, plus semantic search over stored diagrams.
6
+ *
7
+ * Wraps the SAME pipeline the CLI `aqe code c4` drives:
8
+ * ProductFactorsBridgeService (detect) → C4ModelService (render+store) →
9
+ * deterministic confidence gate. This keeps MCP-CLI parity by construction.
10
+ */
11
+ import { MCPToolBase, MCPToolConfig, MCPToolContext } from '../base';
12
+ import { ToolResult } from '../../types';
13
+ import type { C4Diagrams, C4ConfidenceAssessment } from '../../../shared/c4-model';
14
+ export type C4Level = 'context' | 'container' | 'component' | 'all';
15
+ export interface CodeC4Params {
16
+ action: 'generate' | 'search';
17
+ projectPath?: string;
18
+ level?: C4Level;
19
+ query?: string;
20
+ limit?: number;
21
+ [key: string]: unknown;
22
+ }
23
+ export interface C4GenerateResult {
24
+ diagrams: C4Diagrams;
25
+ confidence?: C4ConfidenceAssessment;
26
+ componentsDetected: number;
27
+ externalSystemsDetected: number;
28
+ relationshipsDetected: number;
29
+ circularDependencies: number;
30
+ }
31
+ export interface C4SearchHit {
32
+ key: string;
33
+ type: 'context' | 'container' | 'component';
34
+ title: string;
35
+ score: number;
36
+ preview: string;
37
+ }
38
+ export interface C4SearchResult {
39
+ results: C4SearchHit[];
40
+ total: number;
41
+ }
42
+ export interface CodeC4Result {
43
+ action: string;
44
+ generateResult?: C4GenerateResult;
45
+ searchResult?: C4SearchResult;
46
+ }
47
+ export declare class CodeC4Tool extends MCPToolBase<CodeC4Params, CodeC4Result> {
48
+ readonly config: MCPToolConfig;
49
+ private bridge;
50
+ private searchService;
51
+ private getBridge;
52
+ /** Embeddings ON here so stored diagrams are semantically searchable. */
53
+ private getSearchService;
54
+ execute(params: CodeC4Params, context: MCPToolContext): Promise<ToolResult<CodeC4Result>>;
55
+ }
56
+ //# sourceMappingURL=c4.d.ts.map
@@ -0,0 +1,145 @@
1
+ /**
2
+ * Agentic QE v3 - C4 Architecture MCP Tool (ADR-112)
3
+ *
4
+ * qe/code/c4 - Generate C4 architecture diagrams (Context/Container/Component,
5
+ * Mermaid) from codebase analysis, plus semantic search over stored diagrams.
6
+ *
7
+ * Wraps the SAME pipeline the CLI `aqe code c4` drives:
8
+ * ProductFactorsBridgeService (detect) → C4ModelService (render+store) →
9
+ * deterministic confidence gate. This keeps MCP-CLI parity by construction.
10
+ */
11
+ import { MCPToolBase, getSharedMemoryBackend } from '../base';
12
+ import { ProductFactorsBridgeService } from '../../../domains/code-intelligence/services/product-factors-bridge';
13
+ import { C4ModelService } from '../../../domains/code-intelligence/services/c4-model';
14
+ import { KnowledgeGraphService } from '../../../domains/code-intelligence/services/knowledge-graph';
15
+ import { createKnowledgeGraphRelationshipResolver } from '../../../domains/code-intelligence/services/c4-model/kg-relationships';
16
+ import { InMemoryEventBus } from '../../../kernel/event-bus';
17
+ import { toErrorMessage } from '../../../shared/error-utils.js';
18
+ const want = (level, l) => level === 'all' || level === l;
19
+ // ============================================================================
20
+ // Tool Implementation
21
+ // ============================================================================
22
+ export class CodeC4Tool extends MCPToolBase {
23
+ config = {
24
+ name: 'qe/code/c4',
25
+ description: 'Generate C4 architecture diagrams (Context/Container/Component, Mermaid) from a codebase with a deterministic confidence gate, or semantically search previously generated diagrams.',
26
+ domain: 'code-intelligence',
27
+ schema: CODE_C4_SCHEMA,
28
+ streaming: false,
29
+ timeout: 300000,
30
+ };
31
+ bridge = null;
32
+ searchService = null;
33
+ async getBridge(context) {
34
+ if (!this.bridge) {
35
+ const memory = context.memory ?? (await getSharedMemoryBackend());
36
+ // ADR-112 C2: KG-backed resolver (project-scoped) so MCP matches the CLI.
37
+ // publishEvents:false — the MCP path doesn't need the cross-domain event.
38
+ this.bridge = new ProductFactorsBridgeService(new InMemoryEventBus(), memory, {
39
+ publishEvents: false,
40
+ // ADR-112: embed generated diagrams so `search` can find them.
41
+ enableC4Embeddings: true,
42
+ relationshipResolver: createKnowledgeGraphRelationshipResolver((projectPath) => new KnowledgeGraphService(memory, { basePath: projectPath })),
43
+ });
44
+ }
45
+ return this.bridge;
46
+ }
47
+ /** Embeddings ON here so stored diagrams are semantically searchable. */
48
+ async getSearchService(context) {
49
+ if (!this.searchService) {
50
+ const memory = context.memory ?? (await getSharedMemoryBackend());
51
+ this.searchService = new C4ModelService(memory, { enableEmbeddings: true });
52
+ }
53
+ return this.searchService;
54
+ }
55
+ async execute(params, context) {
56
+ const { action, projectPath = '.', level = 'all', query, limit = 10 } = params;
57
+ try {
58
+ if (this.isAborted(context)) {
59
+ return { success: false, error: 'Operation aborted' };
60
+ }
61
+ const result = { action };
62
+ switch (action) {
63
+ case 'generate': {
64
+ const bridge = await this.getBridge(context);
65
+ const res = await bridge.requestC4Diagrams({
66
+ projectPath,
67
+ includeContext: want(level, 'context'),
68
+ includeContainer: want(level, 'container'),
69
+ includeComponent: want(level, 'component'),
70
+ includeDependency: level === 'all',
71
+ analyzeComponents: true,
72
+ detectExternalSystems: true,
73
+ analyzeCoupling: true,
74
+ });
75
+ if (!res.success) {
76
+ return { success: false, error: toErrorMessage(res.error) };
77
+ }
78
+ const c4 = res.value;
79
+ result.generateResult = {
80
+ diagrams: c4.diagrams,
81
+ confidence: c4.metadata.analysisMetadata?.confidence,
82
+ componentsDetected: c4.components.length,
83
+ externalSystemsDetected: c4.externalSystems.length,
84
+ relationshipsDetected: c4.relationships.length,
85
+ circularDependencies: (c4.couplingAnalysis ?? []).filter((co) => co.isCircular).length,
86
+ };
87
+ break;
88
+ }
89
+ case 'search': {
90
+ if (!query) {
91
+ return { success: false, error: 'Query is required for search action' };
92
+ }
93
+ const service = await this.getSearchService(context);
94
+ const res = await service.searchDiagrams(query, limit);
95
+ if (!res.success) {
96
+ return { success: false, error: toErrorMessage(res.error) };
97
+ }
98
+ result.searchResult = {
99
+ results: res.value.map((r) => ({ key: r.key, type: r.type, title: r.title, score: r.score, preview: r.preview })),
100
+ total: res.value.length,
101
+ };
102
+ break;
103
+ }
104
+ default:
105
+ return { success: false, error: `Unknown action: ${action}` };
106
+ }
107
+ return { success: true, data: result };
108
+ }
109
+ catch (error) {
110
+ return { success: false, error: toErrorMessage(error) };
111
+ }
112
+ }
113
+ }
114
+ // ============================================================================
115
+ // Schema
116
+ // ============================================================================
117
+ const CODE_C4_SCHEMA = {
118
+ type: 'object',
119
+ properties: {
120
+ action: {
121
+ type: 'string',
122
+ description: 'C4 action to perform',
123
+ enum: ['generate', 'search'],
124
+ },
125
+ projectPath: {
126
+ type: 'string',
127
+ description: 'Project root to analyze (generate action). Defaults to the current directory.',
128
+ },
129
+ level: {
130
+ type: 'string',
131
+ description: 'C4 level to generate (generate action)',
132
+ enum: ['context', 'container', 'component', 'all'],
133
+ },
134
+ query: {
135
+ type: 'string',
136
+ description: 'Semantic search query over stored diagrams (search action)',
137
+ },
138
+ limit: {
139
+ type: 'number',
140
+ description: 'Max search results (search action)',
141
+ },
142
+ },
143
+ required: ['action'],
144
+ };
145
+ //# sourceMappingURL=c4.js.map
@@ -37,6 +37,7 @@ export { DefectPredictTool, type DefectPredictParams, type DefectPredictResult,
37
37
  export { RequirementsValidateTool, type RequirementsValidateParams, type RequirementsValidateResult, type RequirementInput, type ValidationResult, type TestabilityScore, type BDDScenario, } from './requirements-validation/validate';
38
38
  export { QualityCriteriaTool, qualityCriteriaTool, type QualityCriteriaParams, type QualityCriteriaResult, type EvidencePointInput, type AgentInvocation, } from './requirements-validation/quality-criteria';
39
39
  export { CodeAnalyzeTool, type CodeAnalyzeParams, type CodeAnalyzeResult, type IndexResult, type SearchResult, type ImpactResult, type DependencyResult, } from './code-intelligence/analyze';
40
+ export { CodeC4Tool, type CodeC4Params, type CodeC4Result, type C4GenerateResult, type C4SearchResult, } from './code-intelligence/c4';
40
41
  export { SecurityScanTool, type SecurityScanParams, type SecurityScanResult, type Vulnerability, type ScanSummary, type ComplianceResult, } from './security-compliance/scan';
41
42
  export { ContractValidateTool, type ContractValidateParams, type ContractValidateResult, type BreakingChange, type VerificationResult, type CompatibilityReport, } from './contract-testing/validate';
42
43
  export { VisualCompareTool, A11yAuditTool, type VisualCompareParams, type VisualCompareResult, type A11yAuditParams, type A11yAuditResult, type A11yViolation, type VisualComparison, } from './visual-accessibility';
@@ -61,6 +61,7 @@ export { QualityCriteriaTool, qualityCriteriaTool, } from './requirements-valida
61
61
  // Code Intelligence Domain
62
62
  // ============================================================================
63
63
  export { CodeAnalyzeTool, } from './code-intelligence/analyze';
64
+ export { CodeC4Tool, } from './code-intelligence/c4';
64
65
  // ============================================================================
65
66
  // Security Compliance Domain
66
67
  // ============================================================================
@@ -33,6 +33,7 @@ export declare const QE_TOOL_NAMES: {
33
33
  readonly REQUIREMENTS_VALIDATE: "qe/requirements/validate";
34
34
  readonly QUALITY_CRITERIA: "qe/requirements/quality-criteria";
35
35
  readonly CODE_ANALYZE: "qe/code/analyze";
36
+ readonly CODE_C4: "qe/code/c4";
36
37
  readonly SECURITY_SCAN: "qe/security/scan";
37
38
  readonly CONTRACT_VALIDATE: "qe/contracts/validate";
38
39
  readonly VISUAL_COMPARE: "qe/visual/compare";
@@ -13,6 +13,7 @@ import { DefectPredictTool } from './defect-intelligence/predict';
13
13
  import { RequirementsValidateTool } from './requirements-validation/validate';
14
14
  import { QualityCriteriaTool } from './requirements-validation/quality-criteria';
15
15
  import { CodeAnalyzeTool } from './code-intelligence/analyze';
16
+ import { CodeC4Tool } from './code-intelligence/c4';
16
17
  import { SecurityScanTool } from './security-compliance/scan';
17
18
  import { ContractValidateTool } from './contract-testing/validate';
18
19
  import { VisualCompareTool, A11yAuditTool } from './visual-accessibility';
@@ -48,6 +49,7 @@ export const QE_TOOL_NAMES = {
48
49
  QUALITY_CRITERIA: 'qe/requirements/quality-criteria',
49
50
  // Code Intelligence
50
51
  CODE_ANALYZE: 'qe/code/analyze',
52
+ CODE_C4: 'qe/code/c4',
51
53
  // Security Compliance
52
54
  SECURITY_SCAN: 'qe/security/scan',
53
55
  // Contract Testing
@@ -110,6 +112,7 @@ export const QE_TOOLS = [
110
112
  new QualityCriteriaTool(),
111
113
  // Code Intelligence Domain
112
114
  new CodeAnalyzeTool(),
115
+ new CodeC4Tool(),
113
116
  // Security Compliance Domain
114
117
  new SecurityScanTool(),
115
118
  // Contract Testing Domain
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Coordinator free-tier support (cross-pollination plan 06 — broadening the
3
+ * opt-in beyond test generation; ADR-111 escalation lane).
4
+ *
5
+ * Extracts the generic "build a FreeTierEscalatingExecutor from a coordinator's
6
+ * config + router" wiring that was inline in the test-generation coordinator, so
7
+ * ANY domain coordinator can opt in with a few lines instead of duplicating it.
8
+ *
9
+ * The opt-in lane is justified only for tasks that match the D3 criterion:
10
+ * BOUNDED generation graded by an OBJECTIVE oracle (a test+assertion, valid
11
+ * Gherkin, a schema). Do NOT wire it into analysis/judgement coordinators — the
12
+ * §11 "coder binds" finding means a cheap model can't carry open-ended reasoning.
13
+ */
14
+ import { FreeTierEscalatingExecutor, type QeExecutionResult, type QeVerifier } from './executor.js';
15
+ import { type RoutingFeedbackLike } from './feedback-sink.js';
16
+ import type { FreeTierProviderConfig } from './types.js';
17
+ /** Default cheap tier. qwen3:30b-a3b, NOT qwen3:8b — D3 (2026-06-23) measured the
18
+ * 8B below the QE generation floor (0/3 baseline-valid); the 30B MoE clears it. */
19
+ export declare const DEFAULT_FREE_TIER_MODEL = "qwen3:30b-a3b";
20
+ /** Per-coordinator config knobs (mix into a coordinator's CoordinatorConfig). */
21
+ export interface FreeTierCoordinatorConfig {
22
+ /** Opt-in the cheap-first free local tier. Also via env `AQE_FREE_TIER=1`. */
23
+ enableFreeTier?: boolean;
24
+ /** Local model id (default {@link DEFAULT_FREE_TIER_MODEL} or env AQE_FREE_TIER_MODEL). */
25
+ freeTierModel?: string;
26
+ /** Default same-tier D8 repair retries before escalating. Benchmarked at 2 (D3). */
27
+ freeTierRepairAttempts?: number;
28
+ /**
29
+ * Best-of-k diverse attempts per tier's first round (06 §12). D3 validated k=2
30
+ * (lifted cheap composite +16.7, baseline-valid 50%→70%). Costs an extra local
31
+ * call ONLY when variant 0 fails (the loop breaks on first pass). Default 2.
32
+ */
33
+ freeTierBestOfK?: number;
34
+ /**
35
+ * Cross-model best-of-k generator pool (A12, measured +6 composite over single-
36
+ * model via mutual validity rescue). When set, round-0 best-of-k draws candidates
37
+ * across these providers (e.g. local qwen + an OpenRouter model) instead of one
38
+ * model's variants. Omit ⇒ single-model. Set `freeTierBestOfK ≥ pool size`.
39
+ */
40
+ freeTierCandidateProviders?: FreeTierProviderConfig[];
41
+ }
42
+ /** Structural view of the HybridRouter — avoids a hard import (decoupling). */
43
+ export interface FreeTierLlmRouter {
44
+ chat(args: {
45
+ messages: Array<{
46
+ role: 'system' | 'user' | 'assistant';
47
+ content: string;
48
+ }>;
49
+ agentType: string;
50
+ complexity: 'low' | 'medium' | 'high';
51
+ }): Promise<{
52
+ content: string;
53
+ }>;
54
+ }
55
+ export interface BuildFreeTierExecutorOptions {
56
+ config: FreeTierCoordinatorConfig;
57
+ /** Router agentType hint for escalated (paid) tiers, e.g. 'qe-test-architect'. */
58
+ agentType: string;
59
+ /** D9 sink label, e.g. 'test-generation'. */
60
+ taskKind: string;
61
+ /** Delegate Claude tiers to the host router; omit → local-only (no escalation). */
62
+ llmRouter?: FreeTierLlmRouter | null;
63
+ /** D9: feed cheap-vs-escalated outcomes into routing-feedback. */
64
+ routingFeedback?: RoutingFeedbackLike | null;
65
+ env?: NodeJS.ProcessEnv;
66
+ logger?: {
67
+ info: (m: string) => void;
68
+ };
69
+ }
70
+ /**
71
+ * Build a cheap-first escalating executor from coordinator config + (optional)
72
+ * router. Returns `null` when the free tier is not opted in — callers store the
73
+ * result and fall through to their normal path when it is null.
74
+ */
75
+ export declare function buildFreeTierExecutor(opts: BuildFreeTierExecutorOptions): FreeTierEscalatingExecutor | null;
76
+ /**
77
+ * Run one bounded generation task cheap-first: best-of-k diverse attempts +
78
+ * D8 repair on the local tier, escalating the hard tail. Returns `null` when no
79
+ * executor (not opted in). The `verify` MUST be an objective oracle (06 §10).
80
+ */
81
+ export declare function runFreeTierTextTask(executor: FreeTierEscalatingExecutor | null, args: {
82
+ agentId: string;
83
+ system: string;
84
+ user: string;
85
+ verify: QeVerifier;
86
+ repairAttempts?: number;
87
+ escalate?: boolean;
88
+ bestOfK?: number;
89
+ }): Promise<QeExecutionResult | null>;
90
+ //# sourceMappingURL=coordinator-support.d.ts.map
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Coordinator free-tier support (cross-pollination plan 06 — broadening the
3
+ * opt-in beyond test generation; ADR-111 escalation lane).
4
+ *
5
+ * Extracts the generic "build a FreeTierEscalatingExecutor from a coordinator's
6
+ * config + router" wiring that was inline in the test-generation coordinator, so
7
+ * ANY domain coordinator can opt in with a few lines instead of duplicating it.
8
+ *
9
+ * The opt-in lane is justified only for tasks that match the D3 criterion:
10
+ * BOUNDED generation graded by an OBJECTIVE oracle (a test+assertion, valid
11
+ * Gherkin, a schema). Do NOT wire it into analysis/judgement coordinators — the
12
+ * §11 "coder binds" finding means a cheap model can't carry open-ended reasoning.
13
+ */
14
+ import { FreeTierEscalatingExecutor } from './executor.js';
15
+ import { defaultFreeTierLadder } from './ladder.js';
16
+ import { createRoutingFeedbackSink } from './feedback-sink.js';
17
+ /** Default cheap tier. qwen3:30b-a3b, NOT qwen3:8b — D3 (2026-06-23) measured the
18
+ * 8B below the QE generation floor (0/3 baseline-valid); the 30B MoE clears it. */
19
+ export const DEFAULT_FREE_TIER_MODEL = 'qwen3:30b-a3b';
20
+ /**
21
+ * Build a cheap-first escalating executor from coordinator config + (optional)
22
+ * router. Returns `null` when the free tier is not opted in — callers store the
23
+ * result and fall through to their normal path when it is null.
24
+ */
25
+ export function buildFreeTierExecutor(opts) {
26
+ const env = opts.env ?? process.env;
27
+ const on = opts.config.enableFreeTier === true || env.AQE_FREE_TIER === '1';
28
+ if (!on)
29
+ return null;
30
+ const model = opts.config.freeTierModel || env.AQE_FREE_TIER_MODEL || DEFAULT_FREE_TIER_MODEL;
31
+ // Paid escalation: map the ladder tier to a complexity hint so the host router
32
+ // picks that tier. No router → executor stays local-only (Claude tiers unavailable).
33
+ const claudeRunner = opts.llmRouter
34
+ ? async (tier, msgs) => {
35
+ const complexity = tier === 'opus' ? 'high' : tier === 'sonnet' ? 'medium' : 'low';
36
+ const resp = await opts.llmRouter.chat({
37
+ messages: msgs.map((m) => ({ role: m.role, content: m.content })),
38
+ agentType: opts.agentType,
39
+ complexity,
40
+ });
41
+ return { content: resp.content };
42
+ }
43
+ : undefined;
44
+ const exec = new FreeTierEscalatingExecutor({
45
+ ladder: defaultFreeTierLadder(model),
46
+ claudeRunner,
47
+ defaultRepairAttempts: opts.config.freeTierRepairAttempts ?? 1,
48
+ candidateProviders: opts.config.freeTierCandidateProviders, // A12 cross-model (off unless set)
49
+ onOutcome: opts.routingFeedback
50
+ ? createRoutingFeedbackSink(opts.routingFeedback, { taskKind: opts.taskKind })
51
+ : undefined,
52
+ });
53
+ opts.logger?.info(`Free-tier enabled for ${opts.taskKind} (model=${model}, ` +
54
+ `${claudeRunner ? 'escalation→router' : 'local-only'})`);
55
+ return exec;
56
+ }
57
+ /**
58
+ * Run one bounded generation task cheap-first: best-of-k diverse attempts +
59
+ * D8 repair on the local tier, escalating the hard tail. Returns `null` when no
60
+ * executor (not opted in). The `verify` MUST be an objective oracle (06 §10).
61
+ */
62
+ export async function runFreeTierTextTask(executor, args) {
63
+ if (!executor)
64
+ return null;
65
+ return executor.execute({
66
+ agentId: args.agentId,
67
+ messages: [
68
+ { role: 'system', content: args.system },
69
+ { role: 'user', content: args.user },
70
+ ],
71
+ verify: args.verify,
72
+ repairAttempts: args.repairAttempts,
73
+ escalate: args.escalate ?? true,
74
+ bestOfK: args.bestOfK,
75
+ oracleKind: 'objective',
76
+ });
77
+ }
78
+ //# sourceMappingURL=coordinator-support.js.map
@@ -16,7 +16,7 @@
16
16
  */
17
17
  import { type ChatMessage } from './provider.js';
18
18
  import { AutoEscalationTracker } from '../escalation/auto-escalation-tracker.js';
19
- import type { QeRoutingLadder } from './types.js';
19
+ import type { QeRoutingLadder, FreeTierProviderConfig } from './types.js';
20
20
  import type { AgentTier } from '../routing-config.js';
21
21
  /** Serves a Claude tier. Injected by the host (e.g. delegates to HybridRouter). */
22
22
  export type ClaudeTierRunner = (claudeTier: AgentTier, messages: ChatMessage[]) => Promise<{
@@ -43,12 +43,30 @@ export interface QeTaskRequest {
43
43
  escalate?: boolean;
44
44
  /** Cap on tiers tried for one task (default: full ladder). */
45
45
  maxEscalations?: number;
46
+ /**
47
+ * Best-of-k diverse attempts at each tier's first round (06 §12 correction).
48
+ * Ruv's ablation: a single repro-gated shot Goodharts the oracle (0 gold); k>1
49
+ * diverse attempts picked by the objective verifier are what convert. Default 1.
50
+ */
51
+ bestOfK?: number;
52
+ /**
53
+ * Goodhart guard (06 §10). `objective` = the verifier is a deterministic
54
+ * ground-truth oracle (arena/coverage/schema). `self-authored` = the verifier
55
+ * is the model's own test — an unreliable selection target, so its outcomes are
56
+ * NOT recorded into routing-feedback (they must not lift confidence). Default
57
+ * `objective` (existing callers inject real oracles, e.g. a coverage/test run).
58
+ */
59
+ oracleKind?: 'objective' | 'self-authored';
46
60
  }
47
61
  export interface TierAttempt {
48
62
  tier: string;
49
63
  provider: 'free-tier' | 'claude';
50
64
  /** 0 = first try at this tier; 1.. = repair rounds (D8). */
51
65
  repairRound: number;
66
+ /** Best-of-k variant index within round 0 (0 = primary, 1.. = diversified). */
67
+ variant?: number;
68
+ /** Generator model that produced this candidate (set for cross-model best-of-k). */
69
+ model?: string;
52
70
  ok: boolean;
53
71
  passed: boolean;
54
72
  latencyMs: number;
@@ -66,6 +84,13 @@ export interface QeExecutionResult {
66
84
  escalated: boolean;
67
85
  /** True iff a same-tier repair round produced the passing output. */
68
86
  repaired: boolean;
87
+ /** True iff best-of-k (k>1) diversity at a round produced the passing output. */
88
+ bestOf: boolean;
89
+ /**
90
+ * True iff the outcome was withheld from routing-feedback because the gate was
91
+ * a self-authored oracle (06 §10 Goodhart guard) — it cannot lift confidence.
92
+ */
93
+ goodhartGuarded: boolean;
69
94
  /** Per-attempt trace, cheapest → most capable. */
70
95
  attempts: TierAttempt[];
71
96
  }
@@ -79,6 +104,15 @@ export interface FreeTierExecutorOptions {
79
104
  env?: NodeJS.ProcessEnv;
80
105
  /** Default same-tier repair retries when a request omits `repairAttempts`. */
81
106
  defaultRepairAttempts?: number;
107
+ /**
108
+ * Cross-model best-of-k (A12, measured +6 composite over single-model). When set
109
+ * AND the START tier is free-tier, round-0 best-of-k draws each candidate from a
110
+ * DIFFERENT provider in this pool (e.g. local qwen + an OpenRouter model) instead
111
+ * of one model's temperature/prompt variants — diverse models cover each other's
112
+ * failures and raise the union. Selection stays the objective verifier (first-pass).
113
+ * Omit ⇒ single-model best-of-k (unchanged).
114
+ */
115
+ candidateProviders?: FreeTierProviderConfig[];
82
116
  /** D9 sink: record each completed task outcome (→ routing-feedback). */
83
117
  onOutcome?: (o: {
84
118
  agentId: string;
@@ -103,11 +137,19 @@ export declare class FreeTierEscalatingExecutor {
103
137
  private readonly baseTier;
104
138
  private readonly defaultRepairAttempts;
105
139
  private readonly onOutcome?;
140
+ /** Resolved cross-model generator pool (A12); undefined ⇒ single-model best-of-k. */
141
+ private readonly candidateProviders?;
106
142
  constructor(opts: FreeTierExecutorOptions);
107
143
  /** Expose the tracker so a coordinator can inspect/share adaptation state. */
108
144
  getTracker(): AutoEscalationTracker<string>;
109
145
  /** Run ONE tier once; never throws — failure becomes `{ok:false}` so we repair/escalate. */
110
146
  private runTier;
147
+ /**
148
+ * Best-of-k diversity turn (06 §12): nudge the model toward a structurally
149
+ * different valid solution. Deterministic by `variant` index (no RNG) so runs
150
+ * replay identically.
151
+ */
152
+ private diversify;
111
153
  /** Build the D8 repair turn: show the model its rejected output + why. */
112
154
  private repairMessages;
113
155
  /**