agentic-qe 3.2.3 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/.claude/agents/v3/qe-accessibility-auditor.md +90 -0
  2. package/README.md +43 -5
  3. package/package.json +3 -2
  4. package/scripts/cloud-db-config.json +37 -0
  5. package/scripts/cloud-db-connect.sh +37 -0
  6. package/scripts/cloud-db-tunnel.sh +23 -0
  7. package/v3/CHANGELOG.md +165 -0
  8. package/v3/README.md +59 -1
  9. package/v3/assets/agents/v3/qe-accessibility-auditor.md +90 -0
  10. package/v3/dist/adapters/claude-flow/index.d.ts +54 -0
  11. package/v3/dist/adapters/claude-flow/index.d.ts.map +1 -0
  12. package/v3/dist/adapters/claude-flow/index.js +79 -0
  13. package/v3/dist/adapters/claude-flow/index.js.map +1 -0
  14. package/v3/dist/adapters/claude-flow/model-router-bridge.d.ts +70 -0
  15. package/v3/dist/adapters/claude-flow/model-router-bridge.d.ts.map +1 -0
  16. package/v3/dist/adapters/claude-flow/model-router-bridge.js +203 -0
  17. package/v3/dist/adapters/claude-flow/model-router-bridge.js.map +1 -0
  18. package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts +73 -0
  19. package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts.map +1 -0
  20. package/v3/dist/adapters/claude-flow/pretrain-bridge.js +276 -0
  21. package/v3/dist/adapters/claude-flow/pretrain-bridge.js.map +1 -0
  22. package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts +70 -0
  23. package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts.map +1 -0
  24. package/v3/dist/adapters/claude-flow/trajectory-bridge.js +205 -0
  25. package/v3/dist/adapters/claude-flow/trajectory-bridge.js.map +1 -0
  26. package/v3/dist/adapters/claude-flow/types.d.ts +99 -0
  27. package/v3/dist/adapters/claude-flow/types.d.ts.map +1 -0
  28. package/v3/dist/adapters/claude-flow/types.js +6 -0
  29. package/v3/dist/adapters/claude-flow/types.js.map +1 -0
  30. package/v3/dist/causal-discovery/causal-graph.d.ts +80 -1
  31. package/v3/dist/causal-discovery/causal-graph.d.ts.map +1 -1
  32. package/v3/dist/causal-discovery/causal-graph.js +111 -1
  33. package/v3/dist/causal-discovery/causal-graph.js.map +1 -1
  34. package/v3/dist/cli/bundle.js +11612 -4929
  35. package/v3/dist/cli/commands/claude-flow-setup.d.ts +82 -0
  36. package/v3/dist/cli/commands/claude-flow-setup.d.ts.map +1 -0
  37. package/v3/dist/cli/commands/claude-flow-setup.js +334 -0
  38. package/v3/dist/cli/commands/claude-flow-setup.js.map +1 -0
  39. package/v3/dist/cli/commands/hooks.d.ts +2 -0
  40. package/v3/dist/cli/commands/hooks.d.ts.map +1 -1
  41. package/v3/dist/cli/commands/hooks.js +13 -2
  42. package/v3/dist/cli/commands/hooks.js.map +1 -1
  43. package/v3/dist/cli/commands/init.d.ts +19 -0
  44. package/v3/dist/cli/commands/init.d.ts.map +1 -0
  45. package/v3/dist/cli/commands/init.js +345 -0
  46. package/v3/dist/cli/commands/init.js.map +1 -0
  47. package/v3/dist/cli/index.js +110 -2
  48. package/v3/dist/cli/index.js.map +1 -1
  49. package/v3/dist/coordination/mincut/interfaces.d.ts +8 -2
  50. package/v3/dist/coordination/mincut/interfaces.d.ts.map +1 -1
  51. package/v3/dist/coordination/mincut/interfaces.js.map +1 -1
  52. package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts +5 -0
  53. package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts.map +1 -1
  54. package/v3/dist/coordination/mincut/mincut-health-monitor.js +22 -4
  55. package/v3/dist/coordination/mincut/mincut-health-monitor.js.map +1 -1
  56. package/v3/dist/coordination/mincut/queen-integration.d.ts +4 -0
  57. package/v3/dist/coordination/mincut/queen-integration.d.ts.map +1 -1
  58. package/v3/dist/coordination/mincut/queen-integration.js +14 -1
  59. package/v3/dist/coordination/mincut/queen-integration.js.map +1 -1
  60. package/v3/dist/coordination/queen-coordinator.d.ts +5 -0
  61. package/v3/dist/coordination/queen-coordinator.d.ts.map +1 -1
  62. package/v3/dist/coordination/queen-coordinator.js +45 -7
  63. package/v3/dist/coordination/queen-coordinator.js.map +1 -1
  64. package/v3/dist/domains/learning-optimization/coordinator.d.ts +5 -0
  65. package/v3/dist/domains/learning-optimization/coordinator.d.ts.map +1 -1
  66. package/v3/dist/domains/learning-optimization/coordinator.js +79 -0
  67. package/v3/dist/domains/learning-optimization/coordinator.js.map +1 -1
  68. package/v3/dist/domains/test-generation/coherence-gate.d.ts +245 -0
  69. package/v3/dist/domains/test-generation/coherence-gate.d.ts.map +1 -0
  70. package/v3/dist/domains/test-generation/coherence-gate.js +454 -0
  71. package/v3/dist/domains/test-generation/coherence-gate.js.map +1 -0
  72. package/v3/dist/domains/test-generation/coordinator.d.ts +32 -1
  73. package/v3/dist/domains/test-generation/coordinator.d.ts.map +1 -1
  74. package/v3/dist/domains/test-generation/coordinator.js +70 -1
  75. package/v3/dist/domains/test-generation/coordinator.js.map +1 -1
  76. package/v3/dist/domains/test-generation/index.d.ts +1 -0
  77. package/v3/dist/domains/test-generation/index.d.ts.map +1 -1
  78. package/v3/dist/domains/test-generation/index.js +4 -0
  79. package/v3/dist/domains/test-generation/index.js.map +1 -1
  80. package/v3/dist/domains/test-generation/services/index.d.ts +1 -0
  81. package/v3/dist/domains/test-generation/services/index.d.ts.map +1 -1
  82. package/v3/dist/domains/test-generation/services/index.js +2 -0
  83. package/v3/dist/domains/test-generation/services/index.js.map +1 -1
  84. package/v3/dist/domains/visual-accessibility/index.d.ts +2 -1
  85. package/v3/dist/domains/visual-accessibility/index.d.ts.map +1 -1
  86. package/v3/dist/domains/visual-accessibility/index.js +1 -0
  87. package/v3/dist/domains/visual-accessibility/index.js.map +1 -1
  88. package/v3/dist/domains/visual-accessibility/interfaces.d.ts +131 -0
  89. package/v3/dist/domains/visual-accessibility/interfaces.d.ts.map +1 -1
  90. package/v3/dist/domains/visual-accessibility/plugin.d.ts +26 -0
  91. package/v3/dist/domains/visual-accessibility/plugin.d.ts.map +1 -1
  92. package/v3/dist/domains/visual-accessibility/plugin.js +151 -0
  93. package/v3/dist/domains/visual-accessibility/plugin.js.map +1 -1
  94. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts +42 -1
  95. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts.map +1 -1
  96. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js +69 -0
  97. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js.map +1 -1
  98. package/v3/dist/domains/visual-accessibility/services/eu-compliance.d.ts +138 -0
  99. package/v3/dist/domains/visual-accessibility/services/eu-compliance.d.ts.map +1 -0
  100. package/v3/dist/domains/visual-accessibility/services/eu-compliance.js +830 -0
  101. package/v3/dist/domains/visual-accessibility/services/eu-compliance.js.map +1 -0
  102. package/v3/dist/domains/visual-accessibility/services/index.d.ts +1 -0
  103. package/v3/dist/domains/visual-accessibility/services/index.d.ts.map +1 -1
  104. package/v3/dist/domains/visual-accessibility/services/index.js +1 -0
  105. package/v3/dist/domains/visual-accessibility/services/index.js.map +1 -1
  106. package/v3/dist/init/enhancements/claude-flow-adapter.d.ts +84 -0
  107. package/v3/dist/init/enhancements/claude-flow-adapter.d.ts.map +1 -0
  108. package/v3/dist/init/enhancements/claude-flow-adapter.js +250 -0
  109. package/v3/dist/init/enhancements/claude-flow-adapter.js.map +1 -0
  110. package/v3/dist/init/enhancements/detector.d.ts +10 -0
  111. package/v3/dist/init/enhancements/detector.d.ts.map +1 -0
  112. package/v3/dist/init/enhancements/detector.js +87 -0
  113. package/v3/dist/init/enhancements/detector.js.map +1 -0
  114. package/v3/dist/init/enhancements/index.d.ts +13 -0
  115. package/v3/dist/init/enhancements/index.d.ts.map +1 -0
  116. package/v3/dist/init/enhancements/index.js +25 -0
  117. package/v3/dist/init/enhancements/index.js.map +1 -0
  118. package/v3/dist/init/enhancements/types.d.ts +93 -0
  119. package/v3/dist/init/enhancements/types.d.ts.map +1 -0
  120. package/v3/dist/init/enhancements/types.js +6 -0
  121. package/v3/dist/init/enhancements/types.js.map +1 -0
  122. package/v3/dist/init/index.d.ts +8 -0
  123. package/v3/dist/init/index.d.ts.map +1 -1
  124. package/v3/dist/init/index.js +4 -0
  125. package/v3/dist/init/index.js.map +1 -1
  126. package/v3/dist/init/migration/config-migrator.d.ts +31 -0
  127. package/v3/dist/init/migration/config-migrator.d.ts.map +1 -0
  128. package/v3/dist/init/migration/config-migrator.js +133 -0
  129. package/v3/dist/init/migration/config-migrator.js.map +1 -0
  130. package/v3/dist/init/migration/data-migrator.d.ts +72 -0
  131. package/v3/dist/init/migration/data-migrator.d.ts.map +1 -0
  132. package/v3/dist/init/migration/data-migrator.js +233 -0
  133. package/v3/dist/init/migration/data-migrator.js.map +1 -0
  134. package/v3/dist/init/migration/detector.d.ts +44 -0
  135. package/v3/dist/init/migration/detector.d.ts.map +1 -0
  136. package/v3/dist/init/migration/detector.js +106 -0
  137. package/v3/dist/init/migration/detector.js.map +1 -0
  138. package/v3/dist/init/migration/index.d.ts +8 -0
  139. package/v3/dist/init/migration/index.d.ts.map +1 -0
  140. package/v3/dist/init/migration/index.js +8 -0
  141. package/v3/dist/init/migration/index.js.map +1 -0
  142. package/v3/dist/init/orchestrator.d.ts +68 -0
  143. package/v3/dist/init/orchestrator.d.ts.map +1 -0
  144. package/v3/dist/init/orchestrator.js +239 -0
  145. package/v3/dist/init/orchestrator.js.map +1 -0
  146. package/v3/dist/init/phases/01-detection.d.ts +30 -0
  147. package/v3/dist/init/phases/01-detection.d.ts.map +1 -0
  148. package/v3/dist/init/phases/01-detection.js +143 -0
  149. package/v3/dist/init/phases/01-detection.js.map +1 -0
  150. package/v3/dist/init/phases/02-analysis.d.ts +18 -0
  151. package/v3/dist/init/phases/02-analysis.d.ts.map +1 -0
  152. package/v3/dist/init/phases/02-analysis.js +28 -0
  153. package/v3/dist/init/phases/02-analysis.js.map +1 -0
  154. package/v3/dist/init/phases/03-configuration.d.ts +26 -0
  155. package/v3/dist/init/phases/03-configuration.d.ts.map +1 -0
  156. package/v3/dist/init/phases/03-configuration.js +98 -0
  157. package/v3/dist/init/phases/03-configuration.js.map +1 -0
  158. package/v3/dist/init/phases/04-database.d.ts +22 -0
  159. package/v3/dist/init/phases/04-database.d.ts.map +1 -0
  160. package/v3/dist/init/phases/04-database.js +88 -0
  161. package/v3/dist/init/phases/04-database.js.map +1 -0
  162. package/v3/dist/init/phases/05-learning.d.ts +28 -0
  163. package/v3/dist/init/phases/05-learning.d.ts.map +1 -0
  164. package/v3/dist/init/phases/05-learning.js +98 -0
  165. package/v3/dist/init/phases/05-learning.js.map +1 -0
  166. package/v3/dist/init/phases/06-code-intelligence.d.ts +33 -0
  167. package/v3/dist/init/phases/06-code-intelligence.d.ts.map +1 -0
  168. package/v3/dist/init/phases/06-code-intelligence.js +115 -0
  169. package/v3/dist/init/phases/06-code-intelligence.js.map +1 -0
  170. package/v3/dist/init/phases/07-hooks.d.ts +27 -0
  171. package/v3/dist/init/phases/07-hooks.d.ts.map +1 -0
  172. package/v3/dist/init/phases/07-hooks.js +209 -0
  173. package/v3/dist/init/phases/07-hooks.js.map +1 -0
  174. package/v3/dist/init/phases/08-mcp.d.ts +22 -0
  175. package/v3/dist/init/phases/08-mcp.d.ts.map +1 -0
  176. package/v3/dist/init/phases/08-mcp.js +62 -0
  177. package/v3/dist/init/phases/08-mcp.js.map +1 -0
  178. package/v3/dist/init/phases/09-assets.d.ts +23 -0
  179. package/v3/dist/init/phases/09-assets.d.ts.map +1 -0
  180. package/v3/dist/init/phases/09-assets.js +82 -0
  181. package/v3/dist/init/phases/09-assets.js.map +1 -0
  182. package/v3/dist/init/phases/10-workers.d.ts +23 -0
  183. package/v3/dist/init/phases/10-workers.d.ts.map +1 -0
  184. package/v3/dist/init/phases/10-workers.js +111 -0
  185. package/v3/dist/init/phases/10-workers.js.map +1 -0
  186. package/v3/dist/init/phases/11-claude-md.d.ts +26 -0
  187. package/v3/dist/init/phases/11-claude-md.d.ts.map +1 -0
  188. package/v3/dist/init/phases/11-claude-md.js +121 -0
  189. package/v3/dist/init/phases/11-claude-md.js.map +1 -0
  190. package/v3/dist/init/phases/12-verification.d.ts +38 -0
  191. package/v3/dist/init/phases/12-verification.d.ts.map +1 -0
  192. package/v3/dist/init/phases/12-verification.js +187 -0
  193. package/v3/dist/init/phases/12-verification.js.map +1 -0
  194. package/v3/dist/init/phases/index.d.ts +46 -0
  195. package/v3/dist/init/phases/index.d.ts.map +1 -0
  196. package/v3/dist/init/phases/index.js +64 -0
  197. package/v3/dist/init/phases/index.js.map +1 -0
  198. package/v3/dist/init/phases/phase-interface.d.ts +193 -0
  199. package/v3/dist/init/phases/phase-interface.d.ts.map +1 -0
  200. package/v3/dist/init/phases/phase-interface.js +119 -0
  201. package/v3/dist/init/phases/phase-interface.js.map +1 -0
  202. package/v3/dist/integrations/coherence/coherence-service.d.ts +323 -0
  203. package/v3/dist/integrations/coherence/coherence-service.d.ts.map +1 -0
  204. package/v3/dist/integrations/coherence/coherence-service.js +799 -0
  205. package/v3/dist/integrations/coherence/coherence-service.js.map +1 -0
  206. package/v3/dist/integrations/coherence/engines/category-adapter.d.ts +170 -0
  207. package/v3/dist/integrations/coherence/engines/category-adapter.d.ts.map +1 -0
  208. package/v3/dist/integrations/coherence/engines/category-adapter.js +403 -0
  209. package/v3/dist/integrations/coherence/engines/category-adapter.js.map +1 -0
  210. package/v3/dist/integrations/coherence/engines/causal-adapter.d.ts +159 -0
  211. package/v3/dist/integrations/coherence/engines/causal-adapter.d.ts.map +1 -0
  212. package/v3/dist/integrations/coherence/engines/causal-adapter.js +348 -0
  213. package/v3/dist/integrations/coherence/engines/causal-adapter.js.map +1 -0
  214. package/v3/dist/integrations/coherence/engines/cohomology-adapter.d.ts +174 -0
  215. package/v3/dist/integrations/coherence/engines/cohomology-adapter.d.ts.map +1 -0
  216. package/v3/dist/integrations/coherence/engines/cohomology-adapter.js +401 -0
  217. package/v3/dist/integrations/coherence/engines/cohomology-adapter.js.map +1 -0
  218. package/v3/dist/integrations/coherence/engines/homotopy-adapter.d.ts +201 -0
  219. package/v3/dist/integrations/coherence/engines/homotopy-adapter.d.ts.map +1 -0
  220. package/v3/dist/integrations/coherence/engines/homotopy-adapter.js +324 -0
  221. package/v3/dist/integrations/coherence/engines/homotopy-adapter.js.map +1 -0
  222. package/v3/dist/integrations/coherence/engines/index.d.ts +20 -0
  223. package/v3/dist/integrations/coherence/engines/index.d.ts.map +1 -0
  224. package/v3/dist/integrations/coherence/engines/index.js +26 -0
  225. package/v3/dist/integrations/coherence/engines/index.js.map +1 -0
  226. package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts +193 -0
  227. package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts.map +1 -0
  228. package/v3/dist/integrations/coherence/engines/spectral-adapter.js +476 -0
  229. package/v3/dist/integrations/coherence/engines/spectral-adapter.js.map +1 -0
  230. package/v3/dist/integrations/coherence/engines/witness-adapter.d.ts +175 -0
  231. package/v3/dist/integrations/coherence/engines/witness-adapter.d.ts.map +1 -0
  232. package/v3/dist/integrations/coherence/engines/witness-adapter.js +377 -0
  233. package/v3/dist/integrations/coherence/engines/witness-adapter.js.map +1 -0
  234. package/v3/dist/integrations/coherence/index.d.ts +84 -0
  235. package/v3/dist/integrations/coherence/index.d.ts.map +1 -0
  236. package/v3/dist/integrations/coherence/index.js +114 -0
  237. package/v3/dist/integrations/coherence/index.js.map +1 -0
  238. package/v3/dist/integrations/coherence/threshold-tuner.d.ts +396 -0
  239. package/v3/dist/integrations/coherence/threshold-tuner.d.ts.map +1 -0
  240. package/v3/dist/integrations/coherence/threshold-tuner.js +538 -0
  241. package/v3/dist/integrations/coherence/threshold-tuner.js.map +1 -0
  242. package/v3/dist/integrations/coherence/types.d.ts +879 -0
  243. package/v3/dist/integrations/coherence/types.d.ts.map +1 -0
  244. package/v3/dist/integrations/coherence/types.js +134 -0
  245. package/v3/dist/integrations/coherence/types.js.map +1 -0
  246. package/v3/dist/integrations/coherence/wasm-loader.d.ts +351 -0
  247. package/v3/dist/integrations/coherence/wasm-loader.d.ts.map +1 -0
  248. package/v3/dist/integrations/coherence/wasm-loader.js +842 -0
  249. package/v3/dist/integrations/coherence/wasm-loader.js.map +1 -0
  250. package/v3/dist/integrations/embeddings/index/HNSWIndex.d.ts.map +1 -1
  251. package/v3/dist/integrations/embeddings/index/HNSWIndex.js +4 -1
  252. package/v3/dist/integrations/embeddings/index/HNSWIndex.js.map +1 -1
  253. package/v3/dist/kernel/interfaces.d.ts +8 -1
  254. package/v3/dist/kernel/interfaces.d.ts.map +1 -1
  255. package/v3/dist/learning/aqe-learning-engine.d.ts +272 -0
  256. package/v3/dist/learning/aqe-learning-engine.d.ts.map +1 -0
  257. package/v3/dist/learning/aqe-learning-engine.js +708 -0
  258. package/v3/dist/learning/aqe-learning-engine.js.map +1 -0
  259. package/v3/dist/learning/causal-verifier.d.ts +244 -0
  260. package/v3/dist/learning/causal-verifier.d.ts.map +1 -0
  261. package/v3/dist/learning/causal-verifier.js +300 -0
  262. package/v3/dist/learning/causal-verifier.js.map +1 -0
  263. package/v3/dist/learning/experience-capture.d.ts +266 -0
  264. package/v3/dist/learning/experience-capture.d.ts.map +1 -0
  265. package/v3/dist/learning/experience-capture.js +647 -0
  266. package/v3/dist/learning/experience-capture.js.map +1 -0
  267. package/v3/dist/learning/index.d.ts +8 -0
  268. package/v3/dist/learning/index.d.ts.map +1 -1
  269. package/v3/dist/learning/index.js +16 -0
  270. package/v3/dist/learning/index.js.map +1 -1
  271. package/v3/dist/learning/memory-auditor.d.ts +235 -0
  272. package/v3/dist/learning/memory-auditor.d.ts.map +1 -0
  273. package/v3/dist/learning/memory-auditor.js +478 -0
  274. package/v3/dist/learning/memory-auditor.js.map +1 -0
  275. package/v3/dist/learning/pattern-store.d.ts.map +1 -1
  276. package/v3/dist/learning/pattern-store.js +27 -6
  277. package/v3/dist/learning/pattern-store.js.map +1 -1
  278. package/v3/dist/learning/qe-patterns.d.ts +15 -1
  279. package/v3/dist/learning/qe-patterns.d.ts.map +1 -1
  280. package/v3/dist/learning/qe-patterns.js +26 -5
  281. package/v3/dist/learning/qe-patterns.js.map +1 -1
  282. package/v3/dist/learning/qe-reasoning-bank.d.ts +38 -2
  283. package/v3/dist/learning/qe-reasoning-bank.d.ts.map +1 -1
  284. package/v3/dist/learning/qe-reasoning-bank.js +86 -4
  285. package/v3/dist/learning/qe-reasoning-bank.js.map +1 -1
  286. package/v3/dist/learning/real-qe-reasoning-bank.d.ts +32 -2
  287. package/v3/dist/learning/real-qe-reasoning-bank.d.ts.map +1 -1
  288. package/v3/dist/learning/real-qe-reasoning-bank.js +61 -6
  289. package/v3/dist/learning/real-qe-reasoning-bank.js.map +1 -1
  290. package/v3/dist/mcp/bundle.js +6303 -266
  291. package/v3/dist/mcp/tools/coherence/audit.d.ts +107 -0
  292. package/v3/dist/mcp/tools/coherence/audit.d.ts.map +1 -0
  293. package/v3/dist/mcp/tools/coherence/audit.js +236 -0
  294. package/v3/dist/mcp/tools/coherence/audit.js.map +1 -0
  295. package/v3/dist/mcp/tools/coherence/check.d.ts +106 -0
  296. package/v3/dist/mcp/tools/coherence/check.d.ts.map +1 -0
  297. package/v3/dist/mcp/tools/coherence/check.js +205 -0
  298. package/v3/dist/mcp/tools/coherence/check.js.map +1 -0
  299. package/v3/dist/mcp/tools/coherence/collapse.d.ts +123 -0
  300. package/v3/dist/mcp/tools/coherence/collapse.d.ts.map +1 -0
  301. package/v3/dist/mcp/tools/coherence/collapse.js +279 -0
  302. package/v3/dist/mcp/tools/coherence/collapse.js.map +1 -0
  303. package/v3/dist/mcp/tools/coherence/consensus.d.ts +100 -0
  304. package/v3/dist/mcp/tools/coherence/consensus.d.ts.map +1 -0
  305. package/v3/dist/mcp/tools/coherence/consensus.js +201 -0
  306. package/v3/dist/mcp/tools/coherence/consensus.js.map +1 -0
  307. package/v3/dist/mcp/tools/coherence/index.d.ts +31 -0
  308. package/v3/dist/mcp/tools/coherence/index.d.ts.map +1 -0
  309. package/v3/dist/mcp/tools/coherence/index.js +42 -0
  310. package/v3/dist/mcp/tools/coherence/index.js.map +1 -0
  311. package/v3/dist/mcp/tools/index.d.ts +6 -1
  312. package/v3/dist/mcp/tools/index.d.ts.map +1 -1
  313. package/v3/dist/mcp/tools/index.js +9 -1
  314. package/v3/dist/mcp/tools/index.js.map +1 -1
  315. package/v3/dist/mcp/tools/mincut/index.d.ts +1 -1
  316. package/v3/dist/mcp/tools/mincut/index.d.ts.map +1 -1
  317. package/v3/dist/mcp/tools/mincut/index.js.map +1 -1
  318. package/v3/dist/mcp/tools/registry.d.ts +4 -0
  319. package/v3/dist/mcp/tools/registry.d.ts.map +1 -1
  320. package/v3/dist/mcp/tools/registry.js +5 -0
  321. package/v3/dist/mcp/tools/registry.js.map +1 -1
  322. package/v3/dist/mcp/types.d.ts +1 -1
  323. package/v3/dist/mcp/types.d.ts.map +1 -1
  324. package/v3/dist/strange-loop/belief-reconciler.d.ts +357 -0
  325. package/v3/dist/strange-loop/belief-reconciler.d.ts.map +1 -0
  326. package/v3/dist/strange-loop/belief-reconciler.js +696 -0
  327. package/v3/dist/strange-loop/belief-reconciler.js.map +1 -0
  328. package/v3/dist/strange-loop/index.d.ts +1 -0
  329. package/v3/dist/strange-loop/index.d.ts.map +1 -1
  330. package/v3/dist/strange-loop/index.js +2 -0
  331. package/v3/dist/strange-loop/index.js.map +1 -1
  332. package/v3/dist/strange-loop/strange-loop.d.ts +177 -5
  333. package/v3/dist/strange-loop/strange-loop.d.ts.map +1 -1
  334. package/v3/dist/strange-loop/strange-loop.js +452 -9
  335. package/v3/dist/strange-loop/strange-loop.js.map +1 -1
  336. package/v3/dist/strange-loop/types.d.ts +205 -1
  337. package/v3/dist/strange-loop/types.d.ts.map +1 -1
  338. package/v3/dist/strange-loop/types.js +5 -0
  339. package/v3/dist/strange-loop/types.js.map +1 -1
  340. package/v3/package.json +5 -1
@@ -0,0 +1,245 @@
1
+ /**
2
+ * Agentic QE v3 - Test Generation Coherence Gate
3
+ * ADR-052: Coherence verification before test generation
4
+ *
5
+ * Verifies requirement coherence using Prime Radiant mathematical gates
6
+ * before allowing test generation to proceed.
7
+ *
8
+ * @module domains/test-generation/coherence-gate
9
+ */
10
+ import { Result } from '../../shared/types/index.js';
11
+ import type { ICoherenceService } from '../../integrations/coherence/coherence-service.js';
12
+ import type { ComputeLane } from '../../integrations/coherence/types.js';
13
+ /**
14
+ * A requirement for test generation
15
+ */
16
+ export interface Requirement {
17
+ /** Unique requirement identifier */
18
+ id: string;
19
+ /** Requirement description */
20
+ description: string;
21
+ /** Optional priority */
22
+ priority?: 'high' | 'medium' | 'low';
23
+ /** Optional source of the requirement */
24
+ source?: string;
25
+ /** Optional metadata */
26
+ metadata?: Record<string, unknown>;
27
+ }
28
+ /**
29
+ * Test specification containing requirements
30
+ */
31
+ export interface TestSpecification {
32
+ /** Specification identifier */
33
+ id: string;
34
+ /** Name of the test specification */
35
+ name: string;
36
+ /** Requirements to generate tests for */
37
+ requirements: Requirement[];
38
+ /** Test type */
39
+ testType: 'unit' | 'integration' | 'e2e';
40
+ /** Target framework */
41
+ framework: string;
42
+ /** Additional context */
43
+ context?: Record<string, unknown>;
44
+ }
45
+ /**
46
+ * Enrichment recommendation from coherence analysis
47
+ */
48
+ export interface EnrichmentRecommendation {
49
+ /** Type of enrichment */
50
+ type: 'clarify' | 'add-context' | 'resolve-ambiguity' | 'split-requirement';
51
+ /** Target requirement ID */
52
+ requirementId: string;
53
+ /** Description of what to do */
54
+ description: string;
55
+ /** Optional suggested resolution */
56
+ suggestedResolution?: string;
57
+ }
58
+ /**
59
+ * Result of coherence check on requirements
60
+ */
61
+ export interface RequirementCoherenceResult {
62
+ /** Whether requirements are coherent */
63
+ isCoherent: boolean;
64
+ /** Coherence energy (lower = more coherent) */
65
+ energy: number;
66
+ /** Recommended compute lane */
67
+ lane: ComputeLane;
68
+ /** Detected contradictions between requirements */
69
+ contradictions: RequirementContradiction[];
70
+ /** Recommendations for resolving issues */
71
+ recommendations: EnrichmentRecommendation[];
72
+ /** Duration of the check in milliseconds */
73
+ durationMs: number;
74
+ /** Whether fallback logic was used */
75
+ usedFallback: boolean;
76
+ }
77
+ /**
78
+ * Severity type for requirement contradictions
79
+ */
80
+ export type ContradictionSeverity = 'critical' | 'high' | 'medium' | 'low';
81
+ /**
82
+ * A contradiction between requirements
83
+ */
84
+ export interface RequirementContradiction {
85
+ /** First requirement ID */
86
+ requirementId1: string;
87
+ /** Second requirement ID */
88
+ requirementId2: string;
89
+ /** Severity of the contradiction */
90
+ severity: ContradictionSeverity;
91
+ /** Description of the contradiction */
92
+ description: string;
93
+ /** Confidence that this is a true contradiction */
94
+ confidence: number;
95
+ /** Suggested resolution */
96
+ suggestedResolution?: string;
97
+ }
98
+ /**
99
+ * Configuration for the coherence gate
100
+ */
101
+ export interface TestGenerationCoherenceGateConfig {
102
+ /** Whether coherence checking is enabled */
103
+ enabled: boolean;
104
+ /** Coherence threshold for passing (default: 0.1) */
105
+ coherenceThreshold: number;
106
+ /** Whether to block on human lane (default: true) */
107
+ blockOnHumanLane: boolean;
108
+ /** Whether to enrich spec on retrieval lane (default: true) */
109
+ enrichOnRetrievalLane: boolean;
110
+ /** Embedding dimension for requirements (default: 384) */
111
+ embeddingDimension: number;
112
+ }
113
+ /**
114
+ * Default configuration
115
+ */
116
+ export declare const DEFAULT_COHERENCE_GATE_CONFIG: TestGenerationCoherenceGateConfig;
117
+ /**
118
+ * Error thrown when requirements have unresolvable contradictions
119
+ */
120
+ export declare class CoherenceError extends Error {
121
+ readonly contradictions: RequirementContradiction[];
122
+ readonly lane: ComputeLane;
123
+ constructor(message: string, contradictions: RequirementContradiction[], lane: ComputeLane);
124
+ }
125
+ /**
126
+ * Interface for embedding service (dependency injection)
127
+ */
128
+ export interface IEmbeddingService {
129
+ /** Generate embedding for text */
130
+ embed(text: string): Promise<number[]>;
131
+ }
132
+ /**
133
+ * Test Generation Coherence Gate
134
+ *
135
+ * Verifies requirement coherence before allowing test generation.
136
+ * Per ADR-052, this gate uses Prime Radiant mathematical coherence
137
+ * checking to detect contradictions and route to appropriate compute lanes.
138
+ *
139
+ * @example
140
+ * ```typescript
141
+ * const gate = new TestGenerationCoherenceGate(coherenceService);
142
+ *
143
+ * const result = await gate.checkRequirementCoherence(spec.requirements);
144
+ *
145
+ * if (result.lane === 'human') {
146
+ * throw new CoherenceError('Requirements contain unresolvable contradictions', result.contradictions);
147
+ * }
148
+ *
149
+ * if (result.lane === 'retrieval') {
150
+ * spec = await gate.enrichSpecification(spec, result.recommendations);
151
+ * }
152
+ * ```
153
+ */
154
+ export declare class TestGenerationCoherenceGate {
155
+ private readonly coherenceService;
156
+ private readonly config;
157
+ private readonly embeddingService;
158
+ constructor(coherenceService: ICoherenceService | null, embeddingService?: IEmbeddingService, config?: Partial<TestGenerationCoherenceGateConfig>);
159
+ /**
160
+ * Check coherence of requirements
161
+ *
162
+ * @param requirements - Array of requirements to check
163
+ * @returns Coherence result with lane recommendation
164
+ */
165
+ checkRequirementCoherence(requirements: Requirement[]): Promise<RequirementCoherenceResult>;
166
+ /**
167
+ * Enrich a test specification based on coherence recommendations
168
+ *
169
+ * @param spec - Original test specification
170
+ * @param recommendations - Recommendations from coherence check
171
+ * @returns Enriched specification
172
+ */
173
+ enrichSpecification(spec: TestSpecification, recommendations: EnrichmentRecommendation[]): Promise<TestSpecification>;
174
+ /**
175
+ * Validate requirements before test generation
176
+ *
177
+ * Convenience method that combines coherence check with automatic
178
+ * enrichment and error handling per ADR-052 specification.
179
+ *
180
+ * @param spec - Test specification to validate
181
+ * @returns Validated (and possibly enriched) specification
182
+ * @throws CoherenceError if requirements have unresolvable contradictions
183
+ */
184
+ validateAndEnrich(spec: TestSpecification): Promise<Result<TestSpecification, CoherenceError>>;
185
+ /**
186
+ * Check if the gate is available (coherence service is initialized)
187
+ */
188
+ isAvailable(): boolean;
189
+ /**
190
+ * Convert requirements to coherence nodes
191
+ */
192
+ private requirementsToNodes;
193
+ /**
194
+ * Transform coherence result to requirement-specific format
195
+ */
196
+ private transformCoherenceResult;
197
+ /**
198
+ * Generate enrichment recommendations based on coherence result
199
+ */
200
+ private generateRecommendations;
201
+ /**
202
+ * Generate a resolution suggestion for a contradiction
203
+ */
204
+ private generateResolutionSuggestion;
205
+ /**
206
+ * Create a passing coherence result
207
+ */
208
+ private createPassingResult;
209
+ /**
210
+ * Convert priority to weight
211
+ */
212
+ private priorityToWeight;
213
+ /**
214
+ * Map Severity type to ContradictionSeverity
215
+ * Coherence Severity includes 'info' which we map to 'low'
216
+ */
217
+ private mapSeverity;
218
+ /**
219
+ * Add clarification note to requirement updates
220
+ */
221
+ private addClarificationNote;
222
+ /**
223
+ * Add disambiguation note to requirement updates
224
+ */
225
+ private addDisambiguationNote;
226
+ }
227
+ /**
228
+ * Create a TestGenerationCoherenceGate
229
+ *
230
+ * @param coherenceService - Optional coherence service (can be null for disabled mode)
231
+ * @param embeddingService - Optional embedding service
232
+ * @param config - Optional configuration
233
+ * @returns Configured coherence gate
234
+ *
235
+ * @example
236
+ * ```typescript
237
+ * // With coherence service
238
+ * const gate = createTestGenerationCoherenceGate(coherenceService);
239
+ *
240
+ * // Disabled mode (no blocking)
241
+ * const disabledGate = createTestGenerationCoherenceGate(null, null, { enabled: false });
242
+ * ```
243
+ */
244
+ export declare function createTestGenerationCoherenceGate(coherenceService: ICoherenceService | null, embeddingService?: IEmbeddingService, config?: Partial<TestGenerationCoherenceGateConfig>): TestGenerationCoherenceGate;
245
+ //# sourceMappingURL=coherence-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coherence-gate.d.ts","sourceRoot":"","sources":["../../../src/domains/test-generation/coherence-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,MAAM,EAAW,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EACV,iBAAiB,EAClB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,KAAK,EAGV,WAAW,EAEZ,MAA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