agentic-qe 3.7.9 → 3.7.11

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 (401) hide show
  1. package/.claude/skills/.validation/README.md +111 -111
  2. package/.claude/skills/.validation/examples/chaos-engineering-output.example.json +530 -530
  3. package/.claude/skills/.validation/examples/performance-testing-output.example.json +252 -252
  4. package/.claude/skills/.validation/examples/security-testing-output.example.json +413 -413
  5. package/.claude/skills/.validation/examples/testability-scoring-output.example.json +350 -350
  6. package/.claude/skills/.validation/schemas/skill-eval.schema.json +462 -462
  7. package/.claude/skills/.validation/schemas/skill-frontmatter.schema.json +341 -341
  8. package/.claude/skills/.validation/schemas/skill-output-meta.schema.json +199 -199
  9. package/.claude/skills/.validation/schemas/skill-output.template.json +610 -610
  10. package/.claude/skills/.validation/skill-validation-mcp-integration.md +250 -250
  11. package/.claude/skills/.validation/templates/eval.template.yaml +366 -366
  12. package/.claude/skills/.validation/templates/schemas/output.json +145 -145
  13. package/.claude/skills/.validation/templates/security-testing-eval.template.yaml +725 -725
  14. package/.claude/skills/.validation/templates/skill-frontmatter.example.yaml +225 -225
  15. package/.claude/skills/.validation/test-data/invalid-output.json +5 -5
  16. package/.claude/skills/.validation/test-data/minimal-output.json +9 -9
  17. package/.claude/skills/.validation/test-data/sample-output.json +73 -73
  18. package/.claude/skills/a11y-ally/evals/a11y-ally.yaml +376 -376
  19. package/.claude/skills/a11y-ally/schemas/output.json +549 -549
  20. package/.claude/skills/accessibility-testing/evals/accessibility-testing.yaml +719 -719
  21. package/.claude/skills/accessibility-testing/schemas/output.json +776 -776
  22. package/.claude/skills/accessibility-testing/test-data/sample-output.json +191 -191
  23. package/.claude/skills/agentic-quality-engineering/schemas/output.json +577 -577
  24. package/.claude/skills/api-testing-patterns/evals/api-testing-patterns.yaml +696 -696
  25. package/.claude/skills/api-testing-patterns/schemas/output.json +845 -845
  26. package/.claude/skills/aqe-v2-v3-migration/schemas/output.json +513 -513
  27. package/.claude/skills/brutal-honesty-review/schemas/output.json +291 -291
  28. package/.claude/skills/bug-reporting-excellence/schemas/output.json +288 -288
  29. package/.claude/skills/chaos-engineering-resilience/evals/chaos-engineering-resilience.yaml +761 -761
  30. package/.claude/skills/chaos-engineering-resilience/schemas/output.json +1205 -1205
  31. package/.claude/skills/cicd-pipeline-qe-orchestrator/evals/cicd-pipeline-qe-orchestrator.yaml +157 -157
  32. package/.claude/skills/cicd-pipeline-qe-orchestrator/schemas/output.json +542 -542
  33. package/.claude/skills/code-review-quality/schemas/output.json +264 -264
  34. package/.claude/skills/compatibility-testing/evals/compatibility-testing.yaml +410 -410
  35. package/.claude/skills/compatibility-testing/schemas/output.json +551 -551
  36. package/.claude/skills/compliance-testing/evals/compliance-testing.yaml +1107 -1107
  37. package/.claude/skills/compliance-testing/schemas/output.json +845 -845
  38. package/.claude/skills/consultancy-practices/schemas/output.json +282 -282
  39. package/.claude/skills/contract-testing/evals/contract-testing.yaml +748 -748
  40. package/.claude/skills/contract-testing/schemas/output.json +638 -638
  41. package/.claude/skills/database-testing/evals/database-testing.yaml +968 -968
  42. package/.claude/skills/database-testing/schemas/output.json +1446 -1446
  43. package/.claude/skills/debug-loop/SKILL.md +61 -61
  44. package/.claude/skills/enterprise-integration-testing/SKILL.md +735 -735
  45. package/.claude/skills/enterprise-integration-testing/evals/enterprise-integration-testing.yaml +158 -158
  46. package/.claude/skills/enterprise-integration-testing/schemas/output.json +74 -74
  47. package/.claude/skills/enterprise-integration-testing/scripts/validate-config.json +25 -25
  48. package/.claude/skills/iterative-loop/SKILL.md +371 -371
  49. package/.claude/skills/localization-testing/evals/localization-testing.yaml +544 -544
  50. package/.claude/skills/localization-testing/schemas/output.json +325 -325
  51. package/.claude/skills/middleware-testing-patterns/SKILL.md +798 -798
  52. package/.claude/skills/middleware-testing-patterns/evals/middleware-testing-patterns.yaml +153 -153
  53. package/.claude/skills/middleware-testing-patterns/schemas/output.json +58 -58
  54. package/.claude/skills/middleware-testing-patterns/scripts/validate-config.json +25 -25
  55. package/.claude/skills/mobile-testing/evals/mobile-testing.yaml +537 -537
  56. package/.claude/skills/mobile-testing/schemas/output.json +318 -318
  57. package/.claude/skills/mutation-testing/evals/mutation-testing.yaml +652 -652
  58. package/.claude/skills/mutation-testing/schemas/output.json +707 -707
  59. package/.claude/skills/mutation-testing/test-data/sample-output.json +295 -295
  60. package/.claude/skills/n8n-expression-testing/evals/n8n-expression-testing.yaml +450 -450
  61. package/.claude/skills/n8n-expression-testing/schemas/output.json +369 -369
  62. package/.claude/skills/n8n-integration-testing-patterns/evals/n8n-integration-testing-patterns.yaml +522 -522
  63. package/.claude/skills/n8n-integration-testing-patterns/schemas/output.json +291 -291
  64. package/.claude/skills/n8n-security-testing/evals/n8n-security-testing.yaml +493 -493
  65. package/.claude/skills/n8n-security-testing/schemas/output.json +293 -293
  66. package/.claude/skills/n8n-trigger-testing-strategies/evals/n8n-trigger-testing-strategies.yaml +500 -500
  67. package/.claude/skills/n8n-trigger-testing-strategies/schemas/output.json +295 -295
  68. package/.claude/skills/n8n-workflow-testing-fundamentals/evals/n8n-workflow-testing-fundamentals.yaml +497 -497
  69. package/.claude/skills/n8n-workflow-testing-fundamentals/schemas/output.json +254 -254
  70. package/.claude/skills/observability-testing-patterns/SKILL.md +930 -930
  71. package/.claude/skills/observability-testing-patterns/evals/observability-testing-patterns.yaml +157 -157
  72. package/.claude/skills/observability-testing-patterns/schemas/output.json +58 -58
  73. package/.claude/skills/observability-testing-patterns/scripts/validate-config.json +25 -25
  74. package/.claude/skills/pentest-validation/SKILL.md +268 -268
  75. package/.claude/skills/pentest-validation/evals/pentest-validation.yaml +708 -708
  76. package/.claude/skills/pentest-validation/schemas/output.json +281 -281
  77. package/.claude/skills/performance-analysis/evals/performance-analysis.yaml +144 -144
  78. package/.claude/skills/performance-analysis/schemas/output.json +588 -588
  79. package/.claude/skills/performance-testing/evals/performance-testing.yaml +772 -772
  80. package/.claude/skills/performance-testing/schemas/output.json +1184 -1184
  81. package/.claude/skills/pr-review/SKILL.md +61 -61
  82. package/.claude/skills/qcsd-cicd-swarm/SKILL.md +2206 -2206
  83. package/.claude/skills/qcsd-cicd-swarm/evals/qcsd-cicd-swarm.yaml +211 -211
  84. package/.claude/skills/qcsd-cicd-swarm/schemas/output.json +86 -86
  85. package/.claude/skills/qcsd-cicd-swarm/scripts/validate-config.json +30 -30
  86. package/.claude/skills/qcsd-development-swarm/SKILL.md +2154 -2154
  87. package/.claude/skills/qcsd-development-swarm/evals/qcsd-development-swarm.yaml +162 -162
  88. package/.claude/skills/qcsd-development-swarm/schemas/output.json +72 -72
  89. package/.claude/skills/qcsd-development-swarm/scripts/validate-config.json +25 -25
  90. package/.claude/skills/qcsd-ideation-swarm/evals/qcsd-ideation-swarm.yaml +138 -138
  91. package/.claude/skills/qcsd-ideation-swarm/schemas/output.json +568 -568
  92. package/.claude/skills/qcsd-production-swarm/SKILL.md +2781 -2781
  93. package/.claude/skills/qcsd-production-swarm/evals/qcsd-production-swarm.yaml +246 -246
  94. package/.claude/skills/qcsd-production-swarm/schemas/output.json +505 -505
  95. package/.claude/skills/qcsd-production-swarm/scripts/validate-config.json +25 -25
  96. package/.claude/skills/qe-chaos-resilience/evals/qe-chaos-resilience.yaml +443 -443
  97. package/.claude/skills/qe-chaos-resilience/schemas/output.json +314 -314
  98. package/.claude/skills/qe-code-intelligence/evals/qe-code-intelligence.yaml +459 -459
  99. package/.claude/skills/qe-code-intelligence/schemas/output.json +315 -315
  100. package/.claude/skills/qe-contract-testing/evals/qe-contract-testing.yaml +513 -513
  101. package/.claude/skills/qe-contract-testing/schemas/output.json +295 -295
  102. package/.claude/skills/qe-coverage-analysis/evals/qe-coverage-analysis.yaml +494 -494
  103. package/.claude/skills/qe-coverage-analysis/schemas/output.json +286 -286
  104. package/.claude/skills/qe-defect-intelligence/evals/qe-defect-intelligence.yaml +511 -511
  105. package/.claude/skills/qe-defect-intelligence/schemas/output.json +283 -283
  106. package/.claude/skills/qe-iterative-loop/schemas/output.json +264 -264
  107. package/.claude/skills/qe-learning-optimization/evals/qe-learning-optimization.yaml +144 -144
  108. package/.claude/skills/qe-learning-optimization/schemas/output.json +288 -288
  109. package/.claude/skills/qe-quality-assessment/evals/qe-quality-assessment.yaml +506 -506
  110. package/.claude/skills/qe-quality-assessment/schemas/output.json +550 -550
  111. package/.claude/skills/qe-requirements-validation/evals/qe-requirements-validation.yaml +598 -598
  112. package/.claude/skills/qe-requirements-validation/schemas/output.json +587 -587
  113. package/.claude/skills/qe-security-compliance/evals/qe-security-compliance.yaml +595 -595
  114. package/.claude/skills/qe-security-compliance/schemas/output.json +498 -498
  115. package/.claude/skills/qe-test-execution/evals/qe-test-execution.yaml +607 -607
  116. package/.claude/skills/qe-test-execution/schemas/output.json +529 -529
  117. package/.claude/skills/qe-test-generation/evals/qe-test-generation.yaml +148 -148
  118. package/.claude/skills/qe-test-generation/schemas/output.json +439 -439
  119. package/.claude/skills/qe-visual-accessibility/evals/qe-visual-accessibility.yaml +142 -142
  120. package/.claude/skills/qe-visual-accessibility/schemas/output.json +491 -491
  121. package/.claude/skills/quality-metrics/evals/quality-metrics.yaml +494 -494
  122. package/.claude/skills/quality-metrics/schemas/output.json +403 -403
  123. package/.claude/skills/refactoring-patterns/schemas/output.json +475 -475
  124. package/.claude/skills/regression-testing/evals/regression-testing.yaml +504 -504
  125. package/.claude/skills/regression-testing/schemas/output.json +311 -311
  126. package/.claude/skills/release/SKILL.md +347 -347
  127. package/.claude/skills/risk-based-testing/evals/risk-based-testing.yaml +141 -141
  128. package/.claude/skills/risk-based-testing/schemas/output.json +480 -480
  129. package/.claude/skills/security-testing/evals/security-testing.yaml +789 -789
  130. package/.claude/skills/security-testing/schemas/output.json +879 -879
  131. package/.claude/skills/security-visual-testing/evals/security-visual-testing.yaml +163 -163
  132. package/.claude/skills/security-visual-testing/schemas/output.json +486 -486
  133. package/.claude/skills/sfdipot-product-factors/SKILL.md +239 -239
  134. package/.claude/skills/sherlock-review/schemas/output.json +297 -297
  135. package/.claude/skills/shift-left-testing/evals/shift-left-testing.yaml +145 -145
  136. package/.claude/skills/shift-left-testing/schemas/output.json +459 -459
  137. package/.claude/skills/shift-right-testing/evals/shift-right-testing.yaml +147 -147
  138. package/.claude/skills/shift-right-testing/schemas/output.json +418 -418
  139. package/.claude/skills/skills-manifest.json +1 -1
  140. package/.claude/skills/tdd-london-chicago/schemas/output.json +444 -444
  141. package/.claude/skills/technical-writing/schemas/output.json +268 -268
  142. package/.claude/skills/test-automation-strategy/evals/test-automation-strategy.yaml +148 -148
  143. package/.claude/skills/test-automation-strategy/schemas/output.json +444 -444
  144. package/.claude/skills/test-data-management/evals/test-data-management.yaml +504 -504
  145. package/.claude/skills/test-data-management/schemas/output.json +284 -284
  146. package/.claude/skills/test-design-techniques/evals/test-design-techniques.yaml +142 -142
  147. package/.claude/skills/test-design-techniques/schemas/output.json +295 -295
  148. package/.claude/skills/test-environment-management/schemas/output.json +310 -310
  149. package/.claude/skills/test-idea-rewriting/SKILL.md +229 -229
  150. package/.claude/skills/test-reporting-analytics/evals/test-reporting-analytics.yaml +155 -155
  151. package/.claude/skills/test-reporting-analytics/schemas/output.json +329 -329
  152. package/.claude/skills/testability-scoring/evals/testability-scoring.yaml +814 -814
  153. package/.claude/skills/testability-scoring/resources/templates/config.template.js +84 -84
  154. package/.claude/skills/testability-scoring/schemas/output.json +606 -606
  155. package/.claude/skills/testability-scoring/scripts/generate-html-report.js +1007 -1007
  156. package/.claude/skills/verification-quality/evals/verification-quality.yaml +150 -150
  157. package/.claude/skills/verification-quality/schemas/output.json +432 -432
  158. package/.claude/skills/visual-testing-advanced/evals/visual-testing-advanced.yaml +154 -154
  159. package/.claude/skills/visual-testing-advanced/schemas/output.json +294 -294
  160. package/.claude/skills/wms-testing-patterns/evals/wms-testing-patterns.yaml +165 -165
  161. package/.claude/skills/wms-testing-patterns/schemas/output.json +150 -150
  162. package/.claude/skills/wms-testing-patterns/scripts/validate-config.json +51 -51
  163. package/CHANGELOG.md +36 -0
  164. package/README.md +171 -901
  165. package/assets/agents/v3/helpers/quality-criteria/evidence-classification.md +116 -116
  166. package/assets/agents/v3/helpers/quality-criteria/htsm-categories.md +139 -139
  167. package/assets/governance/constitution.md +202 -202
  168. package/assets/governance/shards/chaos-resilience.shard.md +221 -221
  169. package/assets/governance/shards/code-intelligence.shard.md +178 -178
  170. package/assets/governance/shards/contract-testing.shard.md +206 -206
  171. package/assets/governance/shards/coverage-analysis.shard.md +146 -146
  172. package/assets/governance/shards/defect-intelligence.shard.md +182 -182
  173. package/assets/governance/shards/learning-optimization.shard.md +248 -248
  174. package/assets/governance/shards/quality-assessment.shard.md +165 -165
  175. package/assets/governance/shards/requirements-validation.shard.md +177 -177
  176. package/assets/governance/shards/security-compliance.shard.md +196 -196
  177. package/assets/governance/shards/test-execution.shard.md +156 -156
  178. package/assets/governance/shards/test-generation.shard.md +128 -128
  179. package/assets/governance/shards/visual-accessibility.shard.md +209 -209
  180. package/assets/hooks/cross-phase-memory.yaml +253 -253
  181. package/assets/patterns/adr-051-booster-patterns.json +78 -78
  182. package/assets/patterns/adr-051-embedding-patterns.json +147 -147
  183. package/assets/patterns/adr-051-integration-summary.json +62 -62
  184. package/assets/patterns/adr-051-reasoning-patterns.json +166 -166
  185. package/assets/patterns/adr-051-router-patterns.json +113 -113
  186. package/assets/patterns/index.json +136 -136
  187. package/assets/skills/.validation/README.md +111 -111
  188. package/assets/skills/.validation/examples/chaos-engineering-output.example.json +530 -530
  189. package/assets/skills/.validation/examples/performance-testing-output.example.json +252 -252
  190. package/assets/skills/.validation/examples/security-testing-output.example.json +413 -413
  191. package/assets/skills/.validation/examples/testability-scoring-output.example.json +350 -350
  192. package/assets/skills/.validation/schemas/skill-eval.schema.json +462 -462
  193. package/assets/skills/.validation/schemas/skill-frontmatter.schema.json +341 -341
  194. package/assets/skills/.validation/schemas/skill-output-meta.schema.json +199 -199
  195. package/assets/skills/.validation/schemas/skill-output.template.json +610 -610
  196. package/assets/skills/.validation/skill-validation-mcp-integration.md +250 -250
  197. package/assets/skills/.validation/templates/eval.template.yaml +366 -366
  198. package/assets/skills/.validation/templates/schemas/output.json +145 -145
  199. package/assets/skills/.validation/templates/security-testing-eval.template.yaml +725 -725
  200. package/assets/skills/.validation/templates/skill-frontmatter.example.yaml +225 -225
  201. package/assets/skills/.validation/test-data/invalid-output.json +5 -5
  202. package/assets/skills/.validation/test-data/minimal-output.json +9 -9
  203. package/assets/skills/.validation/test-data/sample-output.json +73 -73
  204. package/assets/skills/a11y-ally/evals/a11y-ally.yaml +376 -376
  205. package/assets/skills/a11y-ally/schemas/output.json +549 -549
  206. package/assets/skills/accessibility-testing/evals/accessibility-testing.yaml +719 -719
  207. package/assets/skills/accessibility-testing/schemas/output.json +776 -776
  208. package/assets/skills/accessibility-testing/test-data/sample-output.json +191 -191
  209. package/assets/skills/agentic-quality-engineering/schemas/output.json +577 -577
  210. package/assets/skills/api-testing-patterns/evals/api-testing-patterns.yaml +696 -696
  211. package/assets/skills/api-testing-patterns/schemas/output.json +845 -845
  212. package/assets/skills/aqe-v2-v3-migration/schemas/output.json +513 -513
  213. package/assets/skills/brutal-honesty-review/schemas/output.json +291 -291
  214. package/assets/skills/bug-reporting-excellence/schemas/output.json +288 -288
  215. package/assets/skills/chaos-engineering-resilience/evals/chaos-engineering-resilience.yaml +761 -761
  216. package/assets/skills/chaos-engineering-resilience/schemas/output.json +1205 -1205
  217. package/assets/skills/cicd-pipeline-qe-orchestrator/evals/cicd-pipeline-qe-orchestrator.yaml +157 -157
  218. package/assets/skills/cicd-pipeline-qe-orchestrator/schemas/output.json +542 -542
  219. package/assets/skills/code-review-quality/schemas/output.json +264 -264
  220. package/assets/skills/compatibility-testing/evals/compatibility-testing.yaml +410 -410
  221. package/assets/skills/compatibility-testing/schemas/output.json +551 -551
  222. package/assets/skills/compliance-testing/evals/compliance-testing.yaml +1107 -1107
  223. package/assets/skills/compliance-testing/schemas/output.json +845 -845
  224. package/assets/skills/consultancy-practices/schemas/output.json +282 -282
  225. package/assets/skills/contract-testing/evals/contract-testing.yaml +748 -748
  226. package/assets/skills/contract-testing/schemas/output.json +638 -638
  227. package/assets/skills/database-testing/evals/database-testing.yaml +968 -968
  228. package/assets/skills/database-testing/schemas/output.json +1446 -1446
  229. package/assets/skills/debug-loop/SKILL.md +61 -61
  230. package/assets/skills/enterprise-integration-testing/SKILL.md +735 -735
  231. package/assets/skills/enterprise-integration-testing/evals/enterprise-integration-testing.yaml +158 -158
  232. package/assets/skills/enterprise-integration-testing/schemas/output.json +74 -74
  233. package/assets/skills/enterprise-integration-testing/scripts/validate-config.json +25 -25
  234. package/assets/skills/localization-testing/evals/localization-testing.yaml +544 -544
  235. package/assets/skills/localization-testing/schemas/output.json +325 -325
  236. package/assets/skills/middleware-testing-patterns/SKILL.md +798 -798
  237. package/assets/skills/middleware-testing-patterns/evals/middleware-testing-patterns.yaml +153 -153
  238. package/assets/skills/middleware-testing-patterns/schemas/output.json +58 -58
  239. package/assets/skills/middleware-testing-patterns/scripts/validate-config.json +25 -25
  240. package/assets/skills/mobile-testing/evals/mobile-testing.yaml +537 -537
  241. package/assets/skills/mobile-testing/schemas/output.json +318 -318
  242. package/assets/skills/mutation-testing/evals/mutation-testing.yaml +652 -652
  243. package/assets/skills/mutation-testing/schemas/output.json +707 -707
  244. package/assets/skills/mutation-testing/test-data/sample-output.json +295 -295
  245. package/assets/skills/n8n-expression-testing/evals/n8n-expression-testing.yaml +450 -450
  246. package/assets/skills/n8n-expression-testing/schemas/output.json +369 -369
  247. package/assets/skills/n8n-integration-testing-patterns/evals/n8n-integration-testing-patterns.yaml +522 -522
  248. package/assets/skills/n8n-integration-testing-patterns/schemas/output.json +291 -291
  249. package/assets/skills/n8n-security-testing/evals/n8n-security-testing.yaml +493 -493
  250. package/assets/skills/n8n-security-testing/schemas/output.json +293 -293
  251. package/assets/skills/n8n-trigger-testing-strategies/evals/n8n-trigger-testing-strategies.yaml +500 -500
  252. package/assets/skills/n8n-trigger-testing-strategies/schemas/output.json +295 -295
  253. package/assets/skills/n8n-workflow-testing-fundamentals/evals/n8n-workflow-testing-fundamentals.yaml +497 -497
  254. package/assets/skills/n8n-workflow-testing-fundamentals/schemas/output.json +254 -254
  255. package/assets/skills/observability-testing-patterns/SKILL.md +930 -930
  256. package/assets/skills/observability-testing-patterns/evals/observability-testing-patterns.yaml +157 -157
  257. package/assets/skills/observability-testing-patterns/schemas/output.json +58 -58
  258. package/assets/skills/observability-testing-patterns/scripts/validate-config.json +25 -25
  259. package/assets/skills/pentest-validation/SKILL.md +268 -268
  260. package/assets/skills/pentest-validation/evals/pentest-validation.yaml +708 -708
  261. package/assets/skills/pentest-validation/schemas/output.json +281 -281
  262. package/assets/skills/performance-testing/evals/performance-testing.yaml +772 -772
  263. package/assets/skills/performance-testing/schemas/output.json +1184 -1184
  264. package/assets/skills/pr-review/SKILL.md +61 -61
  265. package/assets/skills/qcsd-cicd-swarm/SKILL.md +2206 -2206
  266. package/assets/skills/qcsd-cicd-swarm/evals/qcsd-cicd-swarm.yaml +211 -211
  267. package/assets/skills/qcsd-cicd-swarm/schemas/output.json +86 -86
  268. package/assets/skills/qcsd-cicd-swarm/scripts/validate-config.json +30 -30
  269. package/assets/skills/qcsd-development-swarm/SKILL.md +2154 -2154
  270. package/assets/skills/qcsd-development-swarm/evals/qcsd-development-swarm.yaml +162 -162
  271. package/assets/skills/qcsd-development-swarm/schemas/output.json +72 -72
  272. package/assets/skills/qcsd-development-swarm/scripts/validate-config.json +25 -25
  273. package/assets/skills/qcsd-ideation-swarm/evals/qcsd-ideation-swarm.yaml +138 -138
  274. package/assets/skills/qcsd-ideation-swarm/schemas/output.json +568 -568
  275. package/assets/skills/qcsd-production-swarm/SKILL.md +2781 -2781
  276. package/assets/skills/qcsd-production-swarm/evals/qcsd-production-swarm.yaml +246 -246
  277. package/assets/skills/qcsd-production-swarm/schemas/output.json +505 -505
  278. package/assets/skills/qcsd-production-swarm/scripts/validate-config.json +25 -25
  279. package/assets/skills/qe-chaos-resilience/evals/qe-chaos-resilience.yaml +443 -443
  280. package/assets/skills/qe-chaos-resilience/schemas/output.json +314 -314
  281. package/assets/skills/qe-code-intelligence/evals/qe-code-intelligence.yaml +459 -459
  282. package/assets/skills/qe-code-intelligence/schemas/output.json +315 -315
  283. package/assets/skills/qe-contract-testing/evals/qe-contract-testing.yaml +513 -513
  284. package/assets/skills/qe-contract-testing/schemas/output.json +295 -295
  285. package/assets/skills/qe-coverage-analysis/evals/qe-coverage-analysis.yaml +494 -494
  286. package/assets/skills/qe-coverage-analysis/schemas/output.json +286 -286
  287. package/assets/skills/qe-defect-intelligence/evals/qe-defect-intelligence.yaml +511 -511
  288. package/assets/skills/qe-defect-intelligence/schemas/output.json +283 -283
  289. package/assets/skills/qe-iterative-loop/schemas/output.json +264 -264
  290. package/assets/skills/qe-learning-optimization/evals/qe-learning-optimization.yaml +144 -144
  291. package/assets/skills/qe-learning-optimization/schemas/output.json +288 -288
  292. package/assets/skills/qe-quality-assessment/evals/qe-quality-assessment.yaml +506 -506
  293. package/assets/skills/qe-quality-assessment/schemas/output.json +550 -550
  294. package/assets/skills/qe-requirements-validation/evals/qe-requirements-validation.yaml +598 -598
  295. package/assets/skills/qe-requirements-validation/schemas/output.json +587 -587
  296. package/assets/skills/qe-security-compliance/evals/qe-security-compliance.yaml +595 -595
  297. package/assets/skills/qe-security-compliance/schemas/output.json +498 -498
  298. package/assets/skills/qe-test-execution/evals/qe-test-execution.yaml +607 -607
  299. package/assets/skills/qe-test-execution/schemas/output.json +529 -529
  300. package/assets/skills/qe-test-generation/evals/qe-test-generation.yaml +148 -148
  301. package/assets/skills/qe-test-generation/schemas/output.json +439 -439
  302. package/assets/skills/qe-visual-accessibility/evals/qe-visual-accessibility.yaml +142 -142
  303. package/assets/skills/qe-visual-accessibility/schemas/output.json +491 -491
  304. package/assets/skills/quality-metrics/evals/quality-metrics.yaml +494 -494
  305. package/assets/skills/quality-metrics/schemas/output.json +403 -403
  306. package/assets/skills/refactoring-patterns/schemas/output.json +475 -475
  307. package/assets/skills/regression-testing/evals/regression-testing.yaml +504 -504
  308. package/assets/skills/regression-testing/schemas/output.json +311 -311
  309. package/assets/skills/risk-based-testing/evals/risk-based-testing.yaml +141 -141
  310. package/assets/skills/risk-based-testing/schemas/output.json +480 -480
  311. package/assets/skills/security-testing/evals/security-testing.yaml +789 -789
  312. package/assets/skills/security-testing/schemas/output.json +879 -879
  313. package/assets/skills/security-visual-testing/evals/security-visual-testing.yaml +163 -163
  314. package/assets/skills/security-visual-testing/schemas/output.json +486 -486
  315. package/assets/skills/sfdipot-product-factors/SKILL.md +239 -239
  316. package/assets/skills/sherlock-review/schemas/output.json +297 -297
  317. package/assets/skills/shift-left-testing/evals/shift-left-testing.yaml +145 -145
  318. package/assets/skills/shift-left-testing/schemas/output.json +459 -459
  319. package/assets/skills/shift-right-testing/evals/shift-right-testing.yaml +147 -147
  320. package/assets/skills/shift-right-testing/schemas/output.json +418 -418
  321. package/assets/skills/tdd-london-chicago/schemas/output.json +444 -444
  322. package/assets/skills/technical-writing/schemas/output.json +268 -268
  323. package/assets/skills/test-automation-strategy/evals/test-automation-strategy.yaml +148 -148
  324. package/assets/skills/test-automation-strategy/schemas/output.json +444 -444
  325. package/assets/skills/test-data-management/evals/test-data-management.yaml +504 -504
  326. package/assets/skills/test-data-management/schemas/output.json +284 -284
  327. package/assets/skills/test-design-techniques/evals/test-design-techniques.yaml +142 -142
  328. package/assets/skills/test-design-techniques/schemas/output.json +295 -295
  329. package/assets/skills/test-environment-management/schemas/output.json +310 -310
  330. package/assets/skills/test-idea-rewriting/SKILL.md +229 -229
  331. package/assets/skills/test-reporting-analytics/evals/test-reporting-analytics.yaml +155 -155
  332. package/assets/skills/test-reporting-analytics/schemas/output.json +329 -329
  333. package/assets/skills/testability-scoring/evals/testability-scoring.yaml +814 -814
  334. package/assets/skills/testability-scoring/resources/templates/config.template.js +84 -84
  335. package/assets/skills/testability-scoring/schemas/output.json +606 -606
  336. package/assets/skills/testability-scoring/scripts/generate-html-report.js +1007 -1007
  337. package/assets/skills/verification-quality/evals/verification-quality.yaml +150 -150
  338. package/assets/skills/verification-quality/schemas/output.json +432 -432
  339. package/assets/skills/visual-testing-advanced/evals/visual-testing-advanced.yaml +154 -154
  340. package/assets/skills/visual-testing-advanced/schemas/output.json +294 -294
  341. package/assets/skills/wms-testing-patterns/evals/wms-testing-patterns.yaml +165 -165
  342. package/assets/skills/wms-testing-patterns/schemas/output.json +150 -150
  343. package/assets/skills/wms-testing-patterns/scripts/validate-config.json +51 -51
  344. package/assets/templates/validation-summary.json +56 -56
  345. package/dist/agents/claim-verifier/verifiers/output-verifier.d.ts +1 -0
  346. package/dist/agents/claim-verifier/verifiers/output-verifier.d.ts.map +1 -1
  347. package/dist/agents/claim-verifier/verifiers/output-verifier.js +16 -3
  348. package/dist/agents/claim-verifier/verifiers/output-verifier.js.map +1 -1
  349. package/dist/cli/bundle.js +488 -75
  350. package/dist/cli/commands/mcp.d.ts.map +1 -1
  351. package/dist/cli/commands/mcp.js +11 -9
  352. package/dist/cli/commands/mcp.js.map +1 -1
  353. package/dist/governance/adversarial-defense-integration.d.ts +29 -0
  354. package/dist/governance/adversarial-defense-integration.d.ts.map +1 -1
  355. package/dist/governance/adversarial-defense-integration.js +85 -1
  356. package/dist/governance/adversarial-defense-integration.js.map +1 -1
  357. package/dist/governance/continue-gate-integration.d.ts +7 -5
  358. package/dist/governance/continue-gate-integration.d.ts.map +1 -1
  359. package/dist/governance/continue-gate-integration.js +72 -15
  360. package/dist/governance/continue-gate-integration.js.map +1 -1
  361. package/dist/governance/deterministic-gateway-integration.d.ts +5 -0
  362. package/dist/governance/deterministic-gateway-integration.d.ts.map +1 -1
  363. package/dist/governance/deterministic-gateway-integration.js +35 -1
  364. package/dist/governance/deterministic-gateway-integration.js.map +1 -1
  365. package/dist/governance/evolution-pipeline-integration.d.ts +5 -0
  366. package/dist/governance/evolution-pipeline-integration.d.ts.map +1 -1
  367. package/dist/governance/evolution-pipeline-integration.js +57 -1
  368. package/dist/governance/evolution-pipeline-integration.js.map +1 -1
  369. package/dist/governance/memory-write-gate-integration.d.ts +6 -3
  370. package/dist/governance/memory-write-gate-integration.d.ts.map +1 -1
  371. package/dist/governance/memory-write-gate-integration.js +48 -10
  372. package/dist/governance/memory-write-gate-integration.js.map +1 -1
  373. package/dist/governance/proof-envelope-integration.d.ts +1 -0
  374. package/dist/governance/proof-envelope-integration.d.ts.map +1 -1
  375. package/dist/governance/proof-envelope-integration.js +37 -0
  376. package/dist/governance/proof-envelope-integration.js.map +1 -1
  377. package/dist/governance/shard-retriever-integration.d.ts +10 -0
  378. package/dist/governance/shard-retriever-integration.d.ts.map +1 -1
  379. package/dist/governance/shard-retriever-integration.js +50 -1
  380. package/dist/governance/shard-retriever-integration.js.map +1 -1
  381. package/dist/governance/trust-accumulator-integration.d.ts +5 -0
  382. package/dist/governance/trust-accumulator-integration.d.ts.map +1 -1
  383. package/dist/governance/trust-accumulator-integration.js +35 -2
  384. package/dist/governance/trust-accumulator-integration.js.map +1 -1
  385. package/dist/init/phases/10-workers.js +2 -2
  386. package/dist/init/phases/10-workers.js.map +1 -1
  387. package/dist/mcp/bundle.js +478 -62
  388. package/dist/mcp/protocol-server.js +2 -2
  389. package/dist/mcp/tool-registry.d.ts.map +1 -1
  390. package/dist/mcp/tool-registry.js +1 -0
  391. package/dist/mcp/tool-registry.js.map +1 -1
  392. package/dist/shared/language-detector.js +1 -1
  393. package/dist/shared/language-detector.js.map +1 -1
  394. package/dist/shared/parsers/multi-language-parser.d.ts.map +1 -1
  395. package/dist/shared/parsers/multi-language-parser.js +55 -16
  396. package/dist/shared/parsers/multi-language-parser.js.map +1 -1
  397. package/dist/shared/sql-safety.d.ts.map +1 -1
  398. package/dist/shared/sql-safety.js +7 -1
  399. package/dist/shared/sql-safety.js.map +1 -1
  400. package/package.json +6 -2
  401. package/scripts/prepare-assets.sh +8 -0
@@ -1500,12 +1500,20 @@ var init_sql_safety = __esm({
1500
1500
  "coverage_sessions",
1501
1501
  // Sync tables
1502
1502
  "patterns",
1503
- // Hypergraph tables
1503
+ // Hypergraph tables (actual table names from migration 20260120)
1504
+ "hypergraph_nodes",
1505
+ "hypergraph_edges",
1506
+ // Legacy allowlist aliases (hypergraph-schema.ts compat)
1504
1507
  "hypergraph_vertices",
1505
1508
  "hypergraph_hyperedges",
1506
1509
  "hypergraph_edge_vertices",
1507
1510
  "hypergraph_vertex_properties",
1508
- "hypergraph_edge_properties"
1511
+ "hypergraph_edge_properties",
1512
+ // Learning experience tables
1513
+ "captured_experiences",
1514
+ "experience_applications",
1515
+ // Audit trail
1516
+ "witness_chain"
1509
1517
  ]);
1510
1518
  IDENTIFIER_REGEX = /^[a-z_][a-z0-9_]{0,62}$/;
1511
1519
  }
@@ -5699,10 +5707,11 @@ function countBraceDelta(line) {
5699
5707
  }
5700
5708
  return delta;
5701
5709
  }
5702
- var PythonParser, JavaParser, CSharpParser, GoParser, RustParser, SwiftParser, KotlinParser, DartParser, TreeSitterParserRegistry, treeSitterRegistry;
5710
+ var MAX_REGEX_LINE_LEN, PythonParser, JavaParser, CSharpParser, GoParser, RustParser, SwiftParser, KotlinParser, DartParser, TreeSitterParserRegistry, treeSitterRegistry;
5703
5711
  var init_multi_language_parser = __esm({
5704
5712
  "src/shared/parsers/multi-language-parser.ts"() {
5705
5713
  "use strict";
5714
+ MAX_REGEX_LINE_LEN = 1e3;
5706
5715
  PythonParser = class {
5707
5716
  language = "python";
5708
5717
  supportedExtensions = [".py"];
@@ -5719,8 +5728,9 @@ var init_multi_language_parser = __esm({
5719
5728
  const functions = [];
5720
5729
  const rawLines = content.split("\n");
5721
5730
  const { logicalLines, lineMap } = joinMultiLineSignatures(content);
5722
- const funcRegex = /^(\s*)(async\s+)?def\s+(\w+)\s*\(([^)]*)\)(?:\s*->\s*([^:]+))?\s*:/;
5731
+ const funcRegex = /^(\s*)(async\s+)?def\s+(\w+)\s*\(([^)]*)\)(?:\s*->\s*([^:]*\S))?\s*:/;
5723
5732
  for (let i58 = 0; i58 < logicalLines.length; i58++) {
5733
+ if (logicalLines[i58].length > MAX_REGEX_LINE_LEN) continue;
5724
5734
  const match = logicalLines[i58].match(funcRegex);
5725
5735
  if (match) {
5726
5736
  const indent = match[1].length;
@@ -5806,9 +5816,10 @@ var init_multi_language_parser = __esm({
5806
5816
  const imports = [];
5807
5817
  const lines = content.split("\n");
5808
5818
  for (const line of lines) {
5819
+ if (line.length > MAX_REGEX_LINE_LEN) continue;
5809
5820
  const fromMatch = line.match(/^\s*from\s+(\S+)\s+import\s+(.+)/);
5810
5821
  if (fromMatch) {
5811
- const names = fromMatch[2].split(",").map((n61) => n61.trim().split(/\s+as\s+/)[0]);
5822
+ const names = fromMatch[2].split(",").map((n61) => n61.trim().split(" as ")[0]);
5812
5823
  imports.push({
5813
5824
  module: fromMatch[1],
5814
5825
  namedImports: names,
@@ -5857,10 +5868,11 @@ var init_multi_language_parser = __esm({
5857
5868
  const functions = [];
5858
5869
  const rawLines = content.split("\n");
5859
5870
  const { logicalLines, lineMap } = joinMultiLineSignatures(content);
5860
- const methodRegex = /^\s*(public|private|protected)?\s*(static)?\s*(async)?\s*(?:<\S+>\s+)?([\w<>,.\s[\]?]+)\s+(\w+)\s*\(([^)]*)\)/;
5871
+ const methodRegex = /^\s*(public|private|protected)?\s*(static)?\s*(async)?\s*(?:<\S+>\s+)?([\w<>,.[\]?]+(?:\s+[\w<>,.[\]?]+)*)\s+(\w+)\s*\(([^)]*)\)/;
5861
5872
  for (let i58 = 0; i58 < logicalLines.length; i58++) {
5862
5873
  const line = logicalLines[i58];
5863
5874
  if (line.includes(" class ") || line.includes(" interface ")) continue;
5875
+ if (line.length > MAX_REGEX_LINE_LEN) continue;
5864
5876
  const match = line.match(methodRegex);
5865
5877
  if (match) {
5866
5878
  const visibility = match[1] || "default";
@@ -5897,8 +5909,9 @@ var init_multi_language_parser = __esm({
5897
5909
  const classes = [];
5898
5910
  const rawLines = content.split("\n");
5899
5911
  const { logicalLines, lineMap } = joinMultiLineSignatures(content);
5900
- const classRegex = /^\s*(public|private|protected)?\s*(abstract)?\s*class\s+(\w+)(?:<[^{]*>)?(?:\s+extends\s+(\w+))?(?:\s+implements\s+([^{]+))?\s*\{?/;
5912
+ const classRegex = /^\s*(public|private|protected)?\s*(abstract)?\s*class\s+(\w+)(?:<[^{]*>)?(?:\s+extends\s+(\w+))?(?:\s+implements\s+([^{\s]+(?:\s+[^{\s]+)*))?\s*\{?/;
5901
5913
  for (let i58 = 0; i58 < logicalLines.length; i58++) {
5914
+ if (logicalLines[i58].length > MAX_REGEX_LINE_LEN) continue;
5902
5915
  const match = logicalLines[i58].match(classRegex);
5903
5916
  if (match) {
5904
5917
  const name = match[3];
@@ -5925,7 +5938,8 @@ var init_multi_language_parser = __esm({
5925
5938
  const imports = [];
5926
5939
  const lines = content.split("\n");
5927
5940
  for (const line of lines) {
5928
- const match = line.match(/^\s*import\s+(static\s+)?([^;]+);/);
5941
+ if (line.length > MAX_REGEX_LINE_LEN) continue;
5942
+ const match = line.match(/^\s*import +(static +)?(\S[^;]*);/);
5929
5943
  if (match) {
5930
5944
  const module = match[2].trim();
5931
5945
  const parts = module.split(".");
@@ -5966,10 +5980,11 @@ var init_multi_language_parser = __esm({
5966
5980
  const functions = [];
5967
5981
  const rawLines = content.split("\n");
5968
5982
  const { logicalLines, lineMap } = joinMultiLineSignatures(content);
5969
- const methodRegex = /^\s*(public|private|protected|internal)?\s*(static)?\s*(async)?\s*([\w<>,.\s[\]?]+)\s+(\w+)\s*\(([^)]*)\)/;
5983
+ const methodRegex = /^\s*(public|private|protected|internal)?\s*(static)?\s*(async)?\s*([\w<>,.[\]?]+(?:\s+[\w<>,.[\]?]+)*)\s+(\w+)\s*\(([^)]*)\)/;
5970
5984
  for (let i58 = 0; i58 < logicalLines.length; i58++) {
5971
5985
  const line = logicalLines[i58];
5972
5986
  if (line.includes(" class ") || line.includes(" interface ") || line.includes(" namespace ")) continue;
5987
+ if (line.length > MAX_REGEX_LINE_LEN) continue;
5973
5988
  const match = line.match(methodRegex);
5974
5989
  if (match) {
5975
5990
  const visibility = match[1] || "private";
@@ -6007,8 +6022,9 @@ var init_multi_language_parser = __esm({
6007
6022
  const classes = [];
6008
6023
  const rawLines = content.split("\n");
6009
6024
  const { logicalLines, lineMap } = joinMultiLineSignatures(content);
6010
- const classRegex = /^\s*(public|private|protected|internal)?\s*(abstract|sealed|static|partial)?\s*class\s+(\w+)(?:<[^{]*>)?(?:\s*:\s*([^{]+))?\s*\{?/;
6025
+ const classRegex = /^\s*(public|private|protected|internal)?\s*(abstract|sealed|static|partial)?\s*class\s+(\w+)(?:<[^{]*>)?(?:\s*:\s*([^{\s]+(?:\s+[^{\s]+)*))?\s*\{?/;
6011
6026
  for (let i58 = 0; i58 < logicalLines.length; i58++) {
6027
+ if (logicalLines[i58].length > MAX_REGEX_LINE_LEN) continue;
6012
6028
  const match = logicalLines[i58].match(classRegex);
6013
6029
  if (match) {
6014
6030
  const name = match[3];
@@ -6034,7 +6050,8 @@ var init_multi_language_parser = __esm({
6034
6050
  const imports = [];
6035
6051
  const lines = content.split("\n");
6036
6052
  for (const line of lines) {
6037
- const match = line.match(/^\s*using\s+(static\s+)?([^;]+);/);
6053
+ if (line.length > MAX_REGEX_LINE_LEN) continue;
6054
+ const match = line.match(/^\s*using +(static +)?(\S[^;]*);/);
6038
6055
  if (match) {
6039
6056
  imports.push({
6040
6057
  module: match[2].trim(),
@@ -6080,6 +6097,10 @@ var init_multi_language_parser = __esm({
6080
6097
  let braceDepth = 0;
6081
6098
  for (let i58 = 0; i58 < logicalLines.length; i58++) {
6082
6099
  const line = logicalLines[i58];
6100
+ if (line.length > MAX_REGEX_LINE_LEN) {
6101
+ braceDepth += (line.match(/\{/g)?.length ?? 0) - (line.match(/\}/g)?.length ?? 0);
6102
+ continue;
6103
+ }
6083
6104
  const match = line.match(funcRegex);
6084
6105
  if (match && braceDepth === 0) {
6085
6106
  const name = match[3];
@@ -6187,7 +6208,7 @@ var init_multi_language_parser = __esm({
6187
6208
  const functions = [];
6188
6209
  const rawLines = content.split("\n");
6189
6210
  const { logicalLines, lineMap } = joinMultiLineSignatures(content);
6190
- const fnRegex = /^\s*(pub(?:\(crate\))?\s+)?(async\s+)?fn\s+(\w+)(?:<[^{]*>)?\s*\(([^)]*)\)(?:\s*->\s*([^{]+))?\s*(?:where\s+[^{]*)?\s*\{?/;
6211
+ const fnRegex = /^\s*(pub(?:\(crate\))? +)?(async +)?fn\s+(\w+)(?:<[^{]*>)?\s*\(([^)]*)\)(?:\s*->\s*([^{\s]+(?:\s+[^{\s]+)*))?\s*(?:where\s+[^{\s]+(?:\s+[^{\s]+)*)?\s*\{?/;
6191
6212
  let braceDepth = 0;
6192
6213
  for (let i58 = 0; i58 < logicalLines.length; i58++) {
6193
6214
  const line = logicalLines[i58];
@@ -6247,7 +6268,8 @@ var init_multi_language_parser = __esm({
6247
6268
  const imports = [];
6248
6269
  const lines = content.split("\n");
6249
6270
  for (const line of lines) {
6250
- const match = line.match(/^\s*use\s+([^;]+);/);
6271
+ if (line.length > MAX_REGEX_LINE_LEN) continue;
6272
+ const match = line.match(/^\s*use +(\S[^;]*);/);
6251
6273
  if (match) {
6252
6274
  imports.push({
6253
6275
  module: match[1].trim(),
@@ -6292,8 +6314,9 @@ var init_multi_language_parser = __esm({
6292
6314
  extractFunctions(content) {
6293
6315
  const functions = [];
6294
6316
  const { logicalLines, lineMap } = joinMultiLineSignatures(content);
6295
- const funcRegex = /^\s*(public|private|internal|open)?\s*(static)?\s*func\s+(\w+)(?:<[^{]*>)?\s*\(([^)]*)\)(?:\s*(async))?\s*(?:throws\s+)?(?:->\s*([^{]+))?\s*\{?/;
6317
+ const funcRegex = /^\s*(public|private|internal|open)?\s*(static)?\s*func\s+(\w+)(?:<[^{]*>)?\s*\(([^)]*)\)(?:\s*(async))?\s*(?:throws +)?(?:->\s*([^{\s]+(?:\s+[^{\s]+)*))?\s*\{?/;
6296
6318
  for (let i58 = 0; i58 < logicalLines.length; i58++) {
6319
+ if (logicalLines[i58].length > MAX_REGEX_LINE_LEN) continue;
6297
6320
  const match = logicalLines[i58].match(funcRegex);
6298
6321
  if (match) {
6299
6322
  const visibility = match[1] || "internal";
@@ -6320,8 +6343,9 @@ var init_multi_language_parser = __esm({
6320
6343
  extractClasses(content) {
6321
6344
  const classes = [];
6322
6345
  const { logicalLines, lineMap } = joinMultiLineSignatures(content);
6323
- const classRegex = /^\s*(public|private|internal|open)?\s*(class|struct|protocol)\s+(\w+)(?:<[^{]*>)?(?:\s*:\s*([^{]+))?\s*\{?/;
6346
+ const classRegex = /^\s*(public|private|internal|open)?\s*(class|struct|protocol)\s+(\w+)(?:<[^{]*>)?(?:\s*:\s*([^{\s]+(?:\s+[^{\s]+)*))?\s*\{?/;
6324
6347
  for (let i58 = 0; i58 < logicalLines.length; i58++) {
6348
+ if (logicalLines[i58].length > MAX_REGEX_LINE_LEN) continue;
6325
6349
  const match = logicalLines[i58].match(classRegex);
6326
6350
  if (match) {
6327
6351
  const name = match[3];
@@ -6387,10 +6411,14 @@ var init_multi_language_parser = __esm({
6387
6411
  const functions = [];
6388
6412
  const rawLines = content.split("\n");
6389
6413
  const { logicalLines, lineMap } = joinMultiLineSignatures(content);
6390
- const funcRegex = /^\s*(public|private|protected|internal)?\s*(suspend)?\s*fun\s+(?:<[^{]*>\s+)?(\w+)\s*\(([^)]*)\)(?:\s*:\s*([^{=]+))?\s*/;
6414
+ const funcRegex = /^\s*(public|private|protected|internal)?\s*(suspend)?\s*fun\s+(?:<[^{]*> +)?(\w+)\s*\(([^)]*)\)(?:\s*:\s*([^{=\s]+(?:\s+[^{=\s]+)*))?\s*/;
6391
6415
  let braceDepth = 0;
6392
6416
  for (let i58 = 0; i58 < logicalLines.length; i58++) {
6393
6417
  const line = logicalLines[i58];
6418
+ if (line.length > MAX_REGEX_LINE_LEN) {
6419
+ braceDepth += (line.match(/\{/g)?.length ?? 0) - (line.match(/\}/g)?.length ?? 0);
6420
+ continue;
6421
+ }
6394
6422
  const match = line.match(funcRegex);
6395
6423
  if (match && braceDepth <= 1) {
6396
6424
  const visibility = match[1] || "public";
@@ -6429,8 +6457,9 @@ var init_multi_language_parser = __esm({
6429
6457
  const classes = [];
6430
6458
  const rawLines = content.split("\n");
6431
6459
  const { logicalLines, lineMap } = joinMultiLineSignatures(content);
6432
- const classRegex = /^\s*(public|private|protected|internal)?\s*(data|sealed|abstract|open)?\s*class\s+(\w+)(?:<[^{]*>)?(?:\s*(?:\([^)]*\))?\s*:\s*([^{]+))?\s*\{?/;
6460
+ const classRegex = /^\s*(public|private|protected|internal)?\s*(data|sealed|abstract|open)?\s*class\s+(\w+)(?:<[^{]*>)?(?:\s*(?:\([^)]*\))?\s*:\s*([^{\s]+(?:\s+[^{\s]+)*))?\s*\{?/;
6433
6461
  for (let i58 = 0; i58 < logicalLines.length; i58++) {
6462
+ if (logicalLines[i58].length > MAX_REGEX_LINE_LEN) continue;
6434
6463
  const match = logicalLines[i58].match(classRegex);
6435
6464
  if (match) {
6436
6465
  const name = match[3];
@@ -6503,10 +6532,11 @@ var init_multi_language_parser = __esm({
6503
6532
  extractFunctions(content) {
6504
6533
  const functions = [];
6505
6534
  const { logicalLines, lineMap } = joinMultiLineSignatures(content);
6506
- const funcRegex = /^\s*([\w<>,.\s?]+)\s+(\w+)\s*\(([^)]*)\)(?:\s*(async))?\s*\{/;
6535
+ const funcRegex = /^\s*([\w<>,.?]+(?:\s+[\w<>,.?]+)*)\s+(\w+)\s*\(([^)]*)\)(?:\s*(async))?\s*\{/;
6507
6536
  for (let i58 = 0; i58 < logicalLines.length; i58++) {
6508
6537
  const line = logicalLines[i58];
6509
6538
  if (line.includes(" class ")) continue;
6539
+ if (line.length > MAX_REGEX_LINE_LEN) continue;
6510
6540
  const match = line.match(funcRegex);
6511
6541
  if (match) {
6512
6542
  const returnTypeRaw = match[1].trim();
@@ -6540,8 +6570,9 @@ var init_multi_language_parser = __esm({
6540
6570
  extractClasses(content) {
6541
6571
  const classes = [];
6542
6572
  const { logicalLines, lineMap } = joinMultiLineSignatures(content);
6543
- const classRegex = /^\s*(abstract\s+)?class\s+(\w+)(?:<[^{]*>)?(?:\s+extends\s+(\w+))?(?:\s+(?:with|implements)\s+([^{]+))?\s*\{/;
6573
+ const classRegex = /^\s*(abstract +)?class\s+(\w+)(?:<[^{]*>)?(?:\s+extends\s+(\w+))?(?:\s+(?:with|implements)\s+([^{\s]+(?:\s+[^{\s]+)*))?\s*\{/;
6544
6574
  for (let i58 = 0; i58 < logicalLines.length; i58++) {
6575
+ if (logicalLines[i58].length > MAX_REGEX_LINE_LEN) continue;
6545
6576
  const match = logicalLines[i58].match(classRegex);
6546
6577
  if (match) {
6547
6578
  const name = match[2];
@@ -44065,7 +44096,7 @@ function detectFrameworkFromProject(language, projectRoot) {
44065
44096
  }
44066
44097
  function findFiles(dir, pattern) {
44067
44098
  try {
44068
- const ext = pattern.replace("*", "");
44099
+ const ext = pattern.replace(/\*/g, "");
44069
44100
  return fs2.readdirSync(dir).filter((f74) => f74.endsWith(ext)).map((f74) => path2.join(dir, f74));
44070
44101
  } catch {
44071
44102
  return [];
@@ -49082,13 +49113,30 @@ var ContinueGateIntegration = class _ContinueGateIntegration {
49082
49113
  /**
49083
49114
  * Initialize the ContinueGate integration
49084
49115
  *
49085
- * Note: The @claude-flow/guidance ContinueGate has a different API
49086
- * designed for step-level evaluation with coherence/uncertainty scores.
49087
- * Our local implementation is better suited for AQE agent coordination
49088
- * which tracks action-level loop detection and rework ratios.
49116
+ * Attempts to load @claude-flow/guidance ContinueGate for step-level
49117
+ * evaluation with coherence/uncertainty scoring. Falls back to local
49118
+ * loop detection if the guidance package is unavailable.
49089
49119
  */
49090
49120
  async initialize() {
49091
49121
  if (this.initialized) return;
49122
+ try {
49123
+ const modulePath = "@claude-flow/guidance/continue-gate";
49124
+ const mod = await import(
49125
+ /* @vite-ignore */
49126
+ modulePath
49127
+ );
49128
+ if (mod && typeof mod.createContinueGate === "function") {
49129
+ const flags = governanceFlags.getFlags().continueGate;
49130
+ this.guidanceContinueGate = mod.createContinueGate({
49131
+ maxConsecutiveSteps: flags.maxConsecutiveRetries * 10,
49132
+ maxReworkRatio: flags.reworkRatioThreshold,
49133
+ checkpointIntervalSteps: 25
49134
+ });
49135
+ console.log("[ContinueGateIntegration] Guidance ContinueGate loaded");
49136
+ }
49137
+ } catch {
49138
+ this.guidanceContinueGate = null;
49139
+ }
49092
49140
  try {
49093
49141
  this.db = getUnifiedMemory();
49094
49142
  if (!this.db.isInitialized()) await this.db.initialize();
@@ -49169,7 +49217,35 @@ var ContinueGateIntegration = class _ContinueGateIntegration {
49169
49217
  escalate: false
49170
49218
  };
49171
49219
  }
49172
- return this.localEvaluation(agentId, history, flags);
49220
+ const localDecision = this.localEvaluation(agentId, history, flags);
49221
+ if (this.guidanceContinueGate && localDecision.shouldContinue && !localDecision.reason) {
49222
+ try {
49223
+ const reworkRatio = this.calculateReworkRatio(history.slice(-10));
49224
+ const stepContext = {
49225
+ stepNumber: history.length,
49226
+ totalToolCalls: history.length,
49227
+ reworkCount: history.filter((a37) => !a37.success).length,
49228
+ coherenceScore: 1 - reworkRatio,
49229
+ uncertaintyScore: reworkRatio,
49230
+ elapsedMs: history.length > 0 ? Date.now() - history[0].timestamp : 0,
49231
+ lastCheckpointStep: 0,
49232
+ totalTokensUsed: history.length * 500,
49233
+ // Estimate ~500 tokens per action
49234
+ budgetRemaining: {
49235
+ tokens: Math.max(0, flags.maxConsecutiveRetries * 10 * 500 - history.length * 500),
49236
+ toolCalls: Math.max(0, flags.maxConsecutiveRetries * 10 - history.length),
49237
+ timeMs: Math.max(0, flags.idleTimeoutMs - (history.length > 0 ? Date.now() - history[0].timestamp : 0))
49238
+ },
49239
+ recentDecisions: []
49240
+ };
49241
+ const decision = this.guidanceContinueGate.evaluateWithHistory(stepContext);
49242
+ if (decision.decision !== "continue") {
49243
+ return this.mapGuidanceDecision(decision, agentId);
49244
+ }
49245
+ } catch {
49246
+ }
49247
+ }
49248
+ return localDecision;
49173
49249
  }
49174
49250
  /**
49175
49251
  * Local loop detection implementation
@@ -49246,21 +49322,25 @@ var ContinueGateIntegration = class _ContinueGateIntegration {
49246
49322
  return failedCount / actions.length;
49247
49323
  }
49248
49324
  /**
49249
- * Map guidance package decision to our format
49325
+ * Map guidance ContinueDecision to our ContinueGateDecision format.
49326
+ *
49327
+ * ContinueDecision has: { decision, reasons, metrics, recommendedAction }
49328
+ * We map to: { shouldContinue, reason, throttleMs, escalate, reworkRatio }
49250
49329
  */
49251
49330
  mapGuidanceDecision(decision, agentId) {
49252
49331
  const flags = governanceFlags.getFlags().continueGate;
49253
- if (!decision.shouldContinue && flags.throttleOnExceed) {
49254
- const throttleMs = decision.throttleMs || 5e3;
49332
+ const shouldContinue = decision.decision === "continue" || decision.decision === "checkpoint";
49333
+ const reason = decision.reasons.length > 0 ? decision.reasons.join("; ") : void 0;
49334
+ if (!shouldContinue && flags.throttleOnExceed) {
49335
+ const throttleMs = decision.decision === "stop" ? 3e4 : decision.decision === "pause" ? 15e3 : 5e3;
49255
49336
  this.throttledAgents.set(agentId, Date.now() + throttleMs);
49256
49337
  }
49257
49338
  return {
49258
- shouldContinue: decision.shouldContinue ?? true,
49259
- reason: decision.reason,
49260
- throttleMs: decision.throttleMs,
49261
- escalate: decision.escalate,
49262
- reworkRatio: decision.reworkRatio,
49263
- consecutiveCount: decision.consecutiveCount
49339
+ shouldContinue,
49340
+ reason,
49341
+ throttleMs: decision.decision === "throttle" ? 5e3 : decision.decision === "pause" ? 15e3 : decision.decision === "stop" ? 3e4 : void 0,
49342
+ escalate: decision.decision === "stop" || decision.decision === "pause",
49343
+ reworkRatio: decision.metrics.reworkRatio
49264
49344
  };
49265
49345
  }
49266
49346
  /**
@@ -49340,12 +49420,27 @@ var MemoryWriteGateIntegration = class {
49340
49420
  /**
49341
49421
  * Initialize the MemoryWriteGate integration
49342
49422
  *
49343
- * Note: The @claude-flow/guidance MemoryWriteGate has a different API.
49344
- * Our local implementation provides contradiction detection and temporal decay
49423
+ * Attempts to load @claude-flow/guidance MemoryWriteGate for authority-scoped
49424
+ * writes and rate limiting. Falls back to local contradiction detection
49345
49425
  * optimized for AQE's ReasoningBank pattern storage.
49346
49426
  */
49347
49427
  async initialize() {
49348
49428
  if (this.initialized) return;
49429
+ try {
49430
+ const modulePath = "@claude-flow/guidance/memory-gate";
49431
+ const mod = await import(
49432
+ /* @vite-ignore */
49433
+ modulePath
49434
+ );
49435
+ if (mod && typeof mod.createMemoryWriteGate === "function") {
49436
+ this.guidanceMemoryGate = mod.createMemoryWriteGate({
49437
+ enableContradictionTracking: true
49438
+ });
49439
+ console.log("[MemoryWriteGateIntegration] Guidance MemoryWriteGate loaded");
49440
+ }
49441
+ } catch {
49442
+ this.guidanceMemoryGate = null;
49443
+ }
49349
49444
  this.initialized = true;
49350
49445
  }
49351
49446
  /**
@@ -49359,7 +49454,31 @@ var MemoryWriteGateIntegration = class {
49359
49454
  const flags = governanceFlags.getFlags().memoryWriteGate;
49360
49455
  pattern.timestamp = pattern.timestamp || Date.now();
49361
49456
  pattern.useCount = pattern.useCount || 0;
49362
- return this.localEvaluation(pattern, flags);
49457
+ const localDecision = this.localEvaluation(pattern, flags);
49458
+ if (this.guidanceMemoryGate && localDecision.allowed && !localDecision.reason) {
49459
+ try {
49460
+ const authority = {
49461
+ agentId: pattern.agentId || "unknown",
49462
+ role: "worker",
49463
+ namespaces: [pattern.domain],
49464
+ maxWritesPerMinute: 60,
49465
+ canDelete: false,
49466
+ canOverwrite: true,
49467
+ trustLevel: 0.7
49468
+ };
49469
+ const decision = this.guidanceMemoryGate.evaluateWrite(
49470
+ authority,
49471
+ pattern.key,
49472
+ pattern.domain,
49473
+ pattern.value
49474
+ );
49475
+ if (!decision.allowed) {
49476
+ return this.mapGuidanceDecision(decision);
49477
+ }
49478
+ } catch {
49479
+ }
49480
+ }
49481
+ return localDecision;
49363
49482
  }
49364
49483
  /**
49365
49484
  * Local contradiction detection implementation
@@ -49495,15 +49614,17 @@ var MemoryWriteGateIntegration = class {
49495
49614
  return [...keys].map((key) => this.patternIndex.get(key)).filter((p74) => p74 !== void 0);
49496
49615
  }
49497
49616
  /**
49498
- * Map guidance package decision to our format
49617
+ * Map guidance WriteDecision to our MemoryWriteGateDecision format.
49618
+ *
49619
+ * WriteDecision has: { allowed, reason, contradictions, authorityCheck, rateCheck, overwriteCheck }
49620
+ * We map to: { allowed, reason, conflictingPatterns, suggestedResolution, requiresManualReview }
49499
49621
  */
49500
49622
  mapGuidanceDecision(decision) {
49501
49623
  return {
49502
- allowed: decision.allowed ?? true,
49624
+ allowed: decision.allowed,
49503
49625
  reason: decision.reason,
49504
- conflictingPatterns: decision.conflictingPatterns,
49505
- suggestedResolution: decision.suggestedResolution,
49506
- requiresManualReview: decision.requiresManualReview
49626
+ requiresManualReview: !decision.authorityCheck.passed || decision.contradictions.length > 0,
49627
+ suggestedResolution: decision.contradictions.length > 0 ? "reject" : void 0
49507
49628
  };
49508
49629
  }
49509
49630
  /**
@@ -49623,12 +49744,38 @@ var TrustAccumulatorIntegration = class {
49623
49744
  agentMetrics = /* @__PURE__ */ new Map();
49624
49745
  taskHistory = /* @__PURE__ */ new Map();
49625
49746
  tierThresholds = { ...DEFAULT_TIER_THRESHOLDS };
49747
+ guidanceTrustSystem = null;
49626
49748
  initialized = false;
49627
49749
  /**
49628
49750
  * Initialize the TrustAccumulator integration
49751
+ *
49752
+ * Attempts to load @claude-flow/guidance TrustSystem for gate-outcome-based
49753
+ * trust accumulation with exponential decay. Falls back to local
49754
+ * implementation optimized for AQE agent routing.
49629
49755
  */
49630
49756
  async initialize() {
49631
49757
  if (this.initialized) return;
49758
+ try {
49759
+ const modulePath = "@claude-flow/guidance/trust";
49760
+ const mod = await import(
49761
+ /* @vite-ignore */
49762
+ modulePath
49763
+ );
49764
+ if (mod && typeof mod.createTrustSystem === "function") {
49765
+ this.guidanceTrustSystem = mod.createTrustSystem({
49766
+ initialTrust: 0.7,
49767
+ allowDelta: 0.02,
49768
+ denyDelta: 0.05,
49769
+ warnDelta: 0.01,
49770
+ decayRate: 0.05,
49771
+ decayIntervalMs: 3e5
49772
+ // 5 minutes
49773
+ });
49774
+ console.log("[TrustAccumulatorIntegration] Guidance TrustSystem loaded");
49775
+ }
49776
+ } catch {
49777
+ this.guidanceTrustSystem = null;
49778
+ }
49632
49779
  this.initialized = true;
49633
49780
  }
49634
49781
  /**
@@ -49652,6 +49799,13 @@ var TrustAccumulatorIntegration = class {
49652
49799
  }
49653
49800
  this.taskHistory.set(agentId, history);
49654
49801
  this.updateAgentMetrics(agentId, outcome);
49802
+ if (this.guidanceTrustSystem) {
49803
+ try {
49804
+ const gateOutcome = success ? "allow" : "deny";
49805
+ this.guidanceTrustSystem.recordOutcome(agentId, gateOutcome, `Task ${taskType}: ${success ? "success" : "failure"}`);
49806
+ } catch {
49807
+ }
49808
+ }
49655
49809
  const flags = governanceFlags.getFlags().trustAccumulator;
49656
49810
  if (flags.autoTierAdjustment) {
49657
49811
  this.adjustTier(agentId);
@@ -50013,14 +50167,32 @@ var DeterministicGatewayIntegration = class {
50013
50167
  requestHistory = /* @__PURE__ */ new Map();
50014
50168
  resultCache = /* @__PURE__ */ new Map();
50015
50169
  toolSchemas = /* @__PURE__ */ new Map();
50170
+ guidanceGateway = null;
50016
50171
  initialized = false;
50017
50172
  /**
50018
50173
  * Initialize the DeterministicGateway integration
50174
+ *
50175
+ * Attempts to load @claude-flow/guidance DeterministicToolGateway for
50176
+ * idempotency keys, schema validation, and budget metering. Falls back
50177
+ * to local implementation.
50019
50178
  */
50020
50179
  async initialize() {
50021
50180
  if (this.initialized) return;
50022
50181
  this.registerDefaultSchemas();
50023
50182
  this.initialized = true;
50183
+ try {
50184
+ const modulePath = "@claude-flow/guidance/gateway";
50185
+ const mod = await import(
50186
+ /* @vite-ignore */
50187
+ modulePath
50188
+ );
50189
+ if (mod && typeof mod.createToolGateway === "function") {
50190
+ this.guidanceGateway = mod.createToolGateway();
50191
+ console.log("[DeterministicGateway] Guidance ToolGateway loaded");
50192
+ }
50193
+ } catch {
50194
+ this.guidanceGateway = null;
50195
+ }
50024
50196
  }
50025
50197
  /**
50026
50198
  * Register default schemas for AQE tools
@@ -50145,6 +50317,23 @@ var DeterministicGatewayIntegration = class {
50145
50317
  };
50146
50318
  }
50147
50319
  }
50320
+ if (this.guidanceGateway && typeof params === "object" && params !== null) {
50321
+ try {
50322
+ const guidanceDecision = this.guidanceGateway.evaluate(
50323
+ toolName,
50324
+ params
50325
+ );
50326
+ if (!guidanceDecision.allowed) {
50327
+ this.logEvent(toolName, "guidance_denied", key);
50328
+ return {
50329
+ allowed: !isStrictMode(),
50330
+ reason: `Guidance gateway: ${guidanceDecision.reason}`,
50331
+ idempotencyKey: key
50332
+ };
50333
+ }
50334
+ } catch {
50335
+ }
50336
+ }
50148
50337
  return {
50149
50338
  allowed: true,
50150
50339
  idempotencyKey: key
@@ -50447,6 +50636,7 @@ var EvolutionPipelineIntegration = class _EvolutionPipelineIntegration {
50447
50636
  rules = /* @__PURE__ */ new Map();
50448
50637
  variantTests = /* @__PURE__ */ new Map();
50449
50638
  taskOutcomes = /* @__PURE__ */ new Map();
50639
+ guidanceEvolution = null;
50450
50640
  initialized = false;
50451
50641
  // KV persistence
50452
50642
  db = null;
@@ -50469,6 +50659,10 @@ var EvolutionPipelineIntegration = class _EvolutionPipelineIntegration {
50469
50659
  };
50470
50660
  /**
50471
50661
  * Initialize the Evolution Pipeline integration
50662
+ *
50663
+ * Attempts to load @claude-flow/guidance EvolutionPipeline for
50664
+ * signed change proposals and staged rollout. Falls back to local
50665
+ * rule effectiveness tracking.
50472
50666
  */
50473
50667
  async initialize() {
50474
50668
  if (this.initialized) return;
@@ -50480,6 +50674,19 @@ var EvolutionPipelineIntegration = class _EvolutionPipelineIntegration {
50480
50674
  console.warn("[EvolutionPipeline] DB init failed, using memory-only:", toErrorMessage(error));
50481
50675
  this.db = null;
50482
50676
  }
50677
+ try {
50678
+ const modulePath = "@claude-flow/guidance/evolution";
50679
+ const mod = await import(
50680
+ /* @vite-ignore */
50681
+ modulePath
50682
+ );
50683
+ if (mod && typeof mod.createEvolutionPipeline === "function") {
50684
+ this.guidanceEvolution = mod.createEvolutionPipeline();
50685
+ console.log("[EvolutionPipeline] Guidance EvolutionPipeline loaded");
50686
+ }
50687
+ } catch {
50688
+ this.guidanceEvolution = null;
50689
+ }
50483
50690
  this.initialized = true;
50484
50691
  this.logEvent("initialize", "Evolution Pipeline initialized");
50485
50692
  }
@@ -50594,6 +50801,21 @@ var EvolutionPipelineIntegration = class _EvolutionPipelineIntegration {
50594
50801
  timestamp: Date.now(),
50595
50802
  reason
50596
50803
  });
50804
+ if (this.guidanceEvolution) {
50805
+ try {
50806
+ this.guidanceEvolution.propose({
50807
+ kind: "rule-promote",
50808
+ title: `Promote rule ${ruleId}`,
50809
+ description: reason,
50810
+ author: "aqe-evolution-pipeline",
50811
+ targetPath: `rules/${ruleId}`,
50812
+ diff: { before: oldStatus, after: newStatus },
50813
+ rationale: reason,
50814
+ riskAssessment: { level: "low", factors: ["automated-promotion"] }
50815
+ });
50816
+ } catch {
50817
+ }
50818
+ }
50597
50819
  this.logEvent("rule_promotion", `Rule ${ruleId} promoted: ${oldStatus} -> ${newStatus}. Reason: ${reason}`);
50598
50820
  }
50599
50821
  }
@@ -50623,6 +50845,24 @@ var EvolutionPipelineIntegration = class _EvolutionPipelineIntegration {
50623
50845
  timestamp: Date.now(),
50624
50846
  reason
50625
50847
  });
50848
+ if (this.guidanceEvolution) {
50849
+ try {
50850
+ this.guidanceEvolution.propose({
50851
+ kind: "rule-remove",
50852
+ title: `Demote rule ${ruleId}`,
50853
+ description: reason,
50854
+ author: "aqe-evolution-pipeline",
50855
+ targetPath: `rules/${ruleId}`,
50856
+ diff: { before: oldStatus, after: newStatus },
50857
+ rationale: reason,
50858
+ riskAssessment: {
50859
+ level: newStatus === "deprecated" ? "medium" : "low",
50860
+ factors: ["automated-demotion"]
50861
+ }
50862
+ });
50863
+ } catch {
50864
+ }
50865
+ }
50626
50866
  this.logEvent("rule_demotion", `Rule ${ruleId} demoted: ${oldStatus} -> ${newStatus}. Reason: ${reason}`);
50627
50867
  }
50628
50868
  }
@@ -51345,9 +51585,15 @@ var AdversarialDefenseIntegration = class {
51345
51585
  blocklist = /* @__PURE__ */ new Map();
51346
51586
  stats = this.createEmptyStats();
51347
51587
  assessmentHistory = [];
51588
+ guidanceThreatDetector = null;
51589
+ guidanceCollusionDetector = null;
51348
51590
  initialized = false;
51349
51591
  /**
51350
51592
  * Initialize the AdversarialDefense integration
51593
+ *
51594
+ * Attempts to load @claude-flow/guidance adversarial defense for
51595
+ * ThreatDetector and CollusionDetector. Falls back to local
51596
+ * pattern-based detection.
51351
51597
  */
51352
51598
  async initialize() {
51353
51599
  if (this.initialized) return;
@@ -51355,6 +51601,24 @@ var AdversarialDefenseIntegration = class {
51355
51601
  this.patterns.set(pattern.name, pattern);
51356
51602
  }
51357
51603
  this.initialized = true;
51604
+ try {
51605
+ const modulePath = "@claude-flow/guidance/adversarial";
51606
+ const mod = await import(
51607
+ /* @vite-ignore */
51608
+ modulePath
51609
+ );
51610
+ if (mod && typeof mod.createThreatDetector === "function") {
51611
+ this.guidanceThreatDetector = mod.createThreatDetector();
51612
+ console.log("[AdversarialDefense] Guidance ThreatDetector loaded");
51613
+ }
51614
+ if (mod && typeof mod.createCollusionDetector === "function") {
51615
+ this.guidanceCollusionDetector = mod.createCollusionDetector();
51616
+ console.log("[AdversarialDefense] Guidance CollusionDetector loaded");
51617
+ }
51618
+ } catch {
51619
+ this.guidanceThreatDetector = null;
51620
+ this.guidanceCollusionDetector = null;
51621
+ }
51358
51622
  }
51359
51623
  /**
51360
51624
  * Assess threat level of an input
@@ -51366,6 +51630,25 @@ var AdversarialDefenseIntegration = class {
51366
51630
  const flags = governanceFlags.getFlags().adversarialDefense;
51367
51631
  const detectedPatterns = this.detectInjectionPatterns(input);
51368
51632
  const blocklistMatches = this.checkBlocklist(input);
51633
+ if (this.guidanceThreatDetector && detectedPatterns.length === 0) {
51634
+ try {
51635
+ const guidanceContext = { agentId: context2?.agentId || "", toolName: context2?.taskType || "" };
51636
+ const signals = this.guidanceThreatDetector.analyzeInput(input, guidanceContext);
51637
+ if (signals && Array.isArray(signals) && signals.length > 0) {
51638
+ for (const signal of signals) {
51639
+ detectedPatterns.push({
51640
+ name: `guidance:${signal.category || "unknown"}`,
51641
+ category: signal.category || "custom",
51642
+ matched: signal.description || "",
51643
+ position: 0,
51644
+ severity: signal.severity || 0.5,
51645
+ description: signal.description || "Detected by guidance ThreatDetector"
51646
+ });
51647
+ }
51648
+ }
51649
+ } catch {
51650
+ }
51651
+ }
51369
51652
  let threatScore = 0;
51370
51653
  if (detectedPatterns.length > 0) {
51371
51654
  const severities = detectedPatterns.map((p74) => p74.severity).sort((a37, b68) => b68 - a37);
@@ -51509,6 +51792,37 @@ var AdversarialDefenseIntegration = class {
51509
51792
  }
51510
51793
  return matches;
51511
51794
  }
51795
+ /**
51796
+ * Record an agent interaction for collusion detection
51797
+ *
51798
+ * Forwards to guidance CollusionDetector when available.
51799
+ * Call this whenever two agents interact during task execution.
51800
+ */
51801
+ recordAgentInteraction(fromAgent, toAgent, contentHash) {
51802
+ if (!isAdversarialDefenseEnabled()) return;
51803
+ if (this.guidanceCollusionDetector) {
51804
+ try {
51805
+ this.guidanceCollusionDetector.recordInteraction(fromAgent, toAgent, contentHash);
51806
+ } catch {
51807
+ }
51808
+ }
51809
+ }
51810
+ /**
51811
+ * Check for collusion patterns among agents
51812
+ *
51813
+ * Delegates to guidance CollusionDetector when available.
51814
+ * Returns null if collusion detection is not available.
51815
+ */
51816
+ detectCollusion() {
51817
+ if (!isAdversarialDefenseEnabled()) return null;
51818
+ if (this.guidanceCollusionDetector) {
51819
+ try {
51820
+ return this.guidanceCollusionDetector.detectCollusion();
51821
+ } catch {
51822
+ }
51823
+ }
51824
+ return null;
51825
+ }
51512
51826
  /**
51513
51827
  * Penalize an agent's trust score based on threat assessment
51514
51828
  */
@@ -52777,6 +53091,7 @@ var ProofEnvelopeIntegration = class {
52777
53091
  kernel;
52778
53092
  chain = [];
52779
53093
  signingKey = "";
53094
+ guidanceProofChain = null;
52780
53095
  initialized = false;
52781
53096
  envelopeIndex = /* @__PURE__ */ new Map();
52782
53097
  /**
@@ -52796,6 +53111,19 @@ var ProofEnvelopeIntegration = class {
52796
53111
  if (this.initialized) return;
52797
53112
  await this.kernel.initialize();
52798
53113
  this.signingKey = signingKey;
53114
+ try {
53115
+ const modulePath = "@claude-flow/guidance/proof";
53116
+ const mod = await import(
53117
+ /* @vite-ignore */
53118
+ modulePath
53119
+ );
53120
+ if (mod && typeof mod.createProofChain === "function") {
53121
+ this.guidanceProofChain = mod.createProofChain({ signingKey });
53122
+ console.log("[ProofEnvelopeIntegration] Guidance ProofChain loaded");
53123
+ }
53124
+ } catch {
53125
+ this.guidanceProofChain = null;
53126
+ }
52799
53127
  this.initialized = true;
52800
53128
  }
52801
53129
  /**
@@ -52899,6 +53227,31 @@ var ProofEnvelopeIntegration = class {
52899
53227
  const index = this.chain.length;
52900
53228
  this.chain.push(envelope);
52901
53229
  this.envelopeIndex.set(envelope.id, index);
53230
+ if (this.guidanceProofChain) {
53231
+ try {
53232
+ const runEvent = {
53233
+ eventId: envelope.id,
53234
+ taskId: envelope.metadata?.taskId ? String(envelope.metadata.taskId) : envelope.id,
53235
+ guidanceHash: envelope.contentHash,
53236
+ retrievedRuleIds: [],
53237
+ toolsUsed: envelope.action ? [envelope.action] : [],
53238
+ filesTouched: [],
53239
+ diffSummary: { linesAdded: 0, linesRemoved: 0, filesChanged: 0 },
53240
+ testResults: { passed: 0, failed: 0, skipped: 0 },
53241
+ metrics: {},
53242
+ timestamp: new Date(envelope.timestamp).toISOString()
53243
+ };
53244
+ this.guidanceProofChain.append(
53245
+ runEvent,
53246
+ [],
53247
+ // toolCalls
53248
+ [],
53249
+ // memoryOps
53250
+ { agentId: envelope.agentId, sessionId: envelope.metadata?.sessionId ? String(envelope.metadata.sessionId) : "aqe" }
53251
+ );
53252
+ } catch {
53253
+ }
53254
+ }
52902
53255
  }
52903
53256
  /**
52904
53257
  * Get the current chain
@@ -54898,6 +55251,7 @@ var ShardRetrieverIntegration = class {
54898
55251
  cacheMisses = 0;
54899
55252
  lastCacheCleanup = null;
54900
55253
  parseErrors = [];
55254
+ guidanceRetriever = null;
54901
55255
  initialized = false;
54902
55256
  basePath;
54903
55257
  constructor(basePath) {
@@ -54905,6 +55259,10 @@ var ShardRetrieverIntegration = class {
54905
55259
  }
54906
55260
  /**
54907
55261
  * Initialize the ShardRetrieverIntegration
55262
+ *
55263
+ * Attempts to load @claude-flow/guidance ShardRetriever for
55264
+ * embedding-based semantic shard matching. Falls back to local
55265
+ * filesystem-based loading with keyword matching.
54908
55266
  */
54909
55267
  async initialize() {
54910
55268
  if (this.initialized) return;
@@ -54912,6 +55270,19 @@ var ShardRetrieverIntegration = class {
54912
55270
  this.initialized = true;
54913
55271
  return;
54914
55272
  }
55273
+ try {
55274
+ const modulePath = "@claude-flow/guidance/retriever";
55275
+ const mod = await import(
55276
+ /* @vite-ignore */
55277
+ modulePath
55278
+ );
55279
+ if (mod && typeof mod.createRetriever === "function") {
55280
+ this.guidanceRetriever = mod.createRetriever();
55281
+ console.log("[ShardRetrieverIntegration] Guidance ShardRetriever loaded");
55282
+ }
55283
+ } catch {
55284
+ this.guidanceRetriever = null;
55285
+ }
54915
55286
  await this.loadAllShards();
54916
55287
  this.initialized = true;
54917
55288
  }
@@ -54978,6 +55349,11 @@ var ShardRetrieverIntegration = class {
54978
55349
  }
54979
55350
  /**
54980
55351
  * Retrieve shards relevant to a task
55352
+ *
55353
+ * Local filesystem-based retrieval is authoritative. When guidance
55354
+ * ShardRetriever is available, its embedding-based results supplement
55355
+ * the local results by boosting relevance scores for shards that
55356
+ * guidance also considers relevant.
54981
55357
  */
54982
55358
  async retrieveForTask(taskType, context2) {
54983
55359
  if (!isShardRetrieverEnabled()) {
@@ -54986,9 +55362,31 @@ var ShardRetrieverIntegration = class {
54986
55362
  await this.initialize();
54987
55363
  const flags = getShardRetrieverFlags();
54988
55364
  const allShards = await this.getAllCachedOrLoadedShards();
55365
+ const guidanceRelevantDomains = /* @__PURE__ */ new Set();
55366
+ if (this.guidanceRetriever) {
55367
+ try {
55368
+ const result = await this.guidanceRetriever.retrieve({
55369
+ taskDescription: `${taskType}: ${context2.intent || ""} ${(context2.keywords || []).join(" ")}`,
55370
+ maxShards: flags.maxShardsPerQuery
55371
+ });
55372
+ if (result && result.shards) {
55373
+ for (const s70 of result.shards) {
55374
+ if (s70.shard?.rule?.domains) {
55375
+ for (const d74 of s70.shard.rule.domains) {
55376
+ guidanceRelevantDomains.add(d74);
55377
+ }
55378
+ }
55379
+ }
55380
+ }
55381
+ } catch {
55382
+ }
55383
+ }
54989
55384
  const scoredShards = [];
54990
55385
  for (const shard of allShards.values()) {
54991
- const score = this.calculateRelevance(shard, { ...context2, taskType });
55386
+ let score = this.calculateRelevance(shard, { ...context2, taskType });
55387
+ if (guidanceRelevantDomains.has(shard.domain)) {
55388
+ score = Math.min(1, score + 0.1);
55389
+ }
54992
55390
  if (score >= flags.relevanceThreshold) {
54993
55391
  scoredShards.push({ shard, score });
54994
55392
  }
@@ -78317,9 +78715,17 @@ var TestBasedVerifier = class {
78317
78715
  };
78318
78716
 
78319
78717
  // src/agents/claim-verifier/verifiers/output-verifier.ts
78320
- import { exec as exec3 } from "node:child_process";
78718
+ import { execFile } from "node:child_process";
78321
78719
  import { promisify as promisify3 } from "node:util";
78322
- var execAsync3 = promisify3(exec3);
78720
+ var execFileAsync = promisify3(execFile);
78721
+ var ALLOWED_COMMANDS = /* @__PURE__ */ new Map([
78722
+ ["npm run build", { bin: "npm", args: ["run", "build"] }],
78723
+ ["npm run lint", { bin: "npm", args: ["run", "lint"] }],
78724
+ ["npm test", { bin: "npm", args: ["test"] }],
78725
+ ["npm run typecheck", { bin: "npm", args: ["run", "typecheck"] }],
78726
+ ["npm run test:unit", { bin: "npm", args: ["run", "test:unit"] }],
78727
+ ["npm run test:ci", { bin: "npm", args: ["run", "test:ci"] }]
78728
+ ]);
78323
78729
  var OutputBasedVerifier = class {
78324
78730
  config;
78325
78731
  /**
@@ -78444,11 +78850,18 @@ var OutputBasedVerifier = class {
78444
78850
  }
78445
78851
  /**
78446
78852
  * Execute a command and capture output.
78853
+ * Uses execFile with an allowlist to prevent command injection (CWE-78).
78447
78854
  */
78448
78855
  async executeCommand(command) {
78449
78856
  const startTime = Date.now();
78857
+ const allowed = ALLOWED_COMMANDS.get(command);
78858
+ if (!allowed) {
78859
+ throw new Error(
78860
+ `Command not in allowlist: "${command}". Allowed: ${[...ALLOWED_COMMANDS.keys()].join(", ")}`
78861
+ );
78862
+ }
78450
78863
  try {
78451
- const { stdout, stderr } = await execAsync3(command, {
78864
+ const { stdout, stderr } = await execFileAsync(allowed.bin, [...allowed.args], {
78452
78865
  cwd: this.config.rootDir,
78453
78866
  timeout: this.config.timeout,
78454
78867
  maxBuffer: this.config.maxOutputSize,
@@ -109761,7 +110174,7 @@ init_error_utils();
109761
110174
  init_safe_json();
109762
110175
  init_crypto_random();
109763
110176
  import * as net from "net";
109764
- import { execFile } from "child_process";
110177
+ import { execFile as execFile2 } from "child_process";
109765
110178
  var DEFAULT_CONFIG48 = {
109766
110179
  defaultTimeout: 6e4,
109767
110180
  // 60 seconds
@@ -110260,7 +110673,7 @@ Provide:
110260
110673
  const parts = sanitizedCommand.trim().split(/\s+/);
110261
110674
  const executable = parts[0];
110262
110675
  const args = parts.slice(1);
110263
- execFile(executable, args, { timeout }, (error, stdout, _stderr) => {
110676
+ execFile2(executable, args, { timeout }, (error, stdout, _stderr) => {
110264
110677
  if (error) {
110265
110678
  console.log(`Command probe failed: ${probe.name} -> ${error.message}`);
110266
110679
  resolve22(false);
@@ -110604,7 +111017,7 @@ Provide:
110604
111017
  const parts = sanitizedCommand.trim().split(/\s+/);
110605
111018
  const executable = parts[0];
110606
111019
  const args = parts.slice(1);
110607
- execFile(executable, args, { timeout }, (error, _stdout, stderr) => {
111020
+ execFile2(executable, args, { timeout }, (error, _stdout, stderr) => {
110608
111021
  if (error) {
110609
111022
  reject(new Error(`Command rollback failed: ${error.message}. ${stderr}`));
110610
111023
  } else {
@@ -119980,13 +120393,13 @@ DomainServiceRegistry.register(
119980
120393
  // src/domains/security-compliance/services/semgrep-integration.ts
119981
120394
  init_error_utils();
119982
120395
  init_safe_json();
119983
- import { execFile as execFile2 } from "child_process";
120396
+ import { execFile as execFile3 } from "child_process";
119984
120397
  import { promisify as promisify4 } from "util";
119985
120398
  import * as path16 from "path";
119986
- var execFileAsync = promisify4(execFile2);
120399
+ var execFileAsync2 = promisify4(execFile3);
119987
120400
  async function isSemgrepAvailable() {
119988
120401
  try {
119989
- await execFileAsync("semgrep", ["--version"], { timeout: 5e3 });
120402
+ await execFileAsync2("semgrep", ["--version"], { timeout: 5e3 });
119990
120403
  return true;
119991
120404
  } catch {
119992
120405
  return false;
@@ -119994,7 +120407,7 @@ async function isSemgrepAvailable() {
119994
120407
  }
119995
120408
  async function getSemgrepVersion() {
119996
120409
  try {
119997
- const { stdout } = await execFileAsync("semgrep", ["--version"], { timeout: 5e3 });
120410
+ const { stdout } = await execFileAsync2("semgrep", ["--version"], { timeout: 5e3 });
119998
120411
  return stdout.trim();
119999
120412
  } catch {
120000
120413
  return null;
@@ -120031,7 +120444,7 @@ async function runSemgrep(config) {
120031
120444
  }
120032
120445
  args.push(fullConfig.target);
120033
120446
  const timeoutMs = (fullConfig.timeout ?? 300) * 1e3;
120034
- const { stdout, stderr } = await execFileAsync("semgrep", args, {
120447
+ const { stdout, stderr } = await execFileAsync2("semgrep", args, {
120035
120448
  timeout: timeoutMs,
120036
120449
  maxBuffer: 50 * 1024 * 1024,
120037
120450
  // 50MB buffer for large results
@@ -133726,7 +134139,7 @@ var ALL_DOMAINS2 = [
133726
134139
  "enterprise-integration"
133727
134140
  ];
133728
134141
  function getAQEVersion() {
133729
- return true ? "3.7.9" : "3.0.0";
134142
+ return true ? "3.7.11" : "3.0.0";
133730
134143
  }
133731
134144
  function createDefaultConfig(projectName, projectRoot) {
133732
134145
  return {
@@ -138977,7 +139390,7 @@ appendFileSync(logFile, '[' + ts + '] Starting AQE v3 Worker Daemon...\\n');
138977
139390
  // Find the best way to run aqe-mcp
138978
139391
  const candidates = [
138979
139392
  join(projectRoot, 'node_modules', '.bin', 'aqe-mcp'),
138980
- join(projectRoot, 'node_modules', 'agentic-qe', 'v3', 'dist', 'mcp', 'bundle.js'),
139393
+ join(projectRoot, 'node_modules', 'agentic-qe', 'dist', 'mcp', 'bundle.js'),
138981
139394
  ];
138982
139395
 
138983
139396
  let mcpCmd, mcpArgs;
@@ -139167,7 +139580,7 @@ try {
139167
139580
  if (existsSync39(localMcpBin)) {
139168
139581
  return { command: localMcpBin, args: [] };
139169
139582
  }
139170
- const localBundle = join43(projectRoot, "node_modules", "agentic-qe", "v3", "dist", "mcp", "bundle.js");
139583
+ const localBundle = join43(projectRoot, "node_modules", "agentic-qe", "dist", "mcp", "bundle.js");
139171
139584
  if (existsSync39(localBundle)) {
139172
139585
  return { command: "node", args: [localBundle] };
139173
139586
  }
@@ -162537,15 +162950,15 @@ function findMcpEntry() {
162537
162950
  const __filename7 = fileURLToPath10(import.meta.url);
162538
162951
  const __dirname7 = dirname27(__filename7);
162539
162952
  const candidates = [
162540
- // 1. Bundled dist (production)
162541
- join64(__dirname7, "..", "..", "mcp", "bundle.js"),
162542
- // 2. Compiled dist
162543
- join64(__dirname7, "..", "..", "mcp", "entry.js"),
162544
- // 3. Source (development with tsx)
162545
- join64(__dirname7, "..", "..", "mcp", "entry.ts"),
162546
- // 4. From node_modules (when used as dependency)
162547
- join64(process.cwd(), "node_modules", "agentic-qe", "v3", "dist", "mcp", "bundle.js"),
162548
- join64(process.cwd(), "node_modules", "agentic-qe", "v3", "dist", "mcp", "entry.js")
162953
+ // 1. Sibling bundle in dist/ (production: dist/cli/ -> dist/mcp/)
162954
+ join64(__dirname7, "..", "mcp", "bundle.js"),
162955
+ // 2. Sibling compiled in dist/
162956
+ join64(__dirname7, "..", "mcp", "entry.js"),
162957
+ // 3. Source (development with tsx: src/cli/ -> src/mcp/)
162958
+ join64(__dirname7, "..", "mcp", "entry.ts"),
162959
+ // 4. From node_modules (when used as dependency — flat structure since v3.7.5)
162960
+ join64(process.cwd(), "node_modules", "agentic-qe", "dist", "mcp", "bundle.js"),
162961
+ join64(process.cwd(), "node_modules", "agentic-qe", "dist", "mcp", "entry.js")
162549
162962
  ];
162550
162963
  for (const candidate of candidates) {
162551
162964
  if (existsSync66(candidate)) {
@@ -162952,7 +163365,7 @@ async function cleanupAndExit(code = 0) {
162952
163365
  process.exit(code);
162953
163366
  }
162954
163367
  var program = new Command20();
162955
- var VERSION = true ? "3.7.9" : "0.0.0-dev";
163368
+ var VERSION = true ? "3.7.11" : "0.0.0-dev";
162956
163369
  program.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(VERSION);
162957
163370
  var registry2 = createCommandRegistry(context, cleanupAndExit, ensureInitialized, ensureInitializedStrict);
162958
163371
  registry2.registerAll(program);
@@ -163156,14 +163569,14 @@ workflowCmd.command("list").description("List workflows").option("-s, --schedule
163156
163569
  if (activeExecutions.length === 0) {
163157
163570
  console.log(chalk33.gray(" No active executions\n"));
163158
163571
  } else {
163159
- for (const exec4 of activeExecutions) {
163160
- const statusColor = exec4.status === "running" ? chalk33.yellow : chalk33.gray;
163161
- console.log(` ${statusColor("*")} ${chalk33.white(exec4.workflowName)}`);
163162
- console.log(chalk33.gray(` Execution: ${exec4.executionId}`));
163163
- console.log(chalk33.gray(` Status: ${exec4.status}`));
163164
- console.log(chalk33.gray(` Progress: ${exec4.progress}%`));
163165
- if (exec4.currentSteps.length > 0) {
163166
- console.log(chalk33.gray(` Current: ${exec4.currentSteps.join(", ")}`));
163572
+ for (const exec3 of activeExecutions) {
163573
+ const statusColor = exec3.status === "running" ? chalk33.yellow : chalk33.gray;
163574
+ console.log(` ${statusColor("*")} ${chalk33.white(exec3.workflowName)}`);
163575
+ console.log(chalk33.gray(` Execution: ${exec3.executionId}`));
163576
+ console.log(chalk33.gray(` Status: ${exec3.status}`));
163577
+ console.log(chalk33.gray(` Progress: ${exec3.progress}%`));
163578
+ if (exec3.currentSteps.length > 0) {
163579
+ console.log(chalk33.gray(` Current: ${exec3.currentSteps.join(", ")}`));
163167
163580
  }
163168
163581
  console.log("");
163169
163582
  }