agentic-qe 3.8.1 → 3.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. package/.claude/agents/v3/qe-security-scanner.md +2 -2
  2. package/.claude/commands/claude-flow-help.md +1 -1
  3. package/.claude/helpers/github-setup.sh +4 -4
  4. package/.claude/helpers/post-commit +1 -1
  5. package/.claude/helpers/pre-commit +1 -1
  6. package/.claude/helpers/quick-start.sh +4 -4
  7. package/.claude/helpers/setup-mcp.sh +3 -3
  8. package/.claude/helpers/statusline-v3.cjs +1 -1
  9. package/.claude/helpers/validation-pipeline.cjs +625 -0
  10. package/.claude/skills/a11y-ally/SKILL.md +0 -1
  11. package/.claude/skills/accessibility-testing/SKILL.md +0 -1
  12. package/.claude/skills/agentic-quality-engineering/SKILL.md +0 -1
  13. package/.claude/skills/aqe-v2-v3-migration/skill.md +0 -1
  14. package/.claude/skills/brutal-honesty-review/SKILL.md +0 -1
  15. package/.claude/skills/bug-reporting-excellence/SKILL.md +0 -1
  16. package/.claude/skills/cicd-pipeline-qe-orchestrator/SKILL.md +0 -1
  17. package/.claude/skills/code-review-quality/SKILL.md +0 -1
  18. package/.claude/skills/compliance-testing/SKILL.md +0 -1
  19. package/.claude/skills/consultancy-practices/SKILL.md +0 -1
  20. package/.claude/skills/context-driven-testing/SKILL.md +0 -1
  21. package/.claude/skills/exploratory-testing-advanced/SKILL.md +0 -1
  22. package/.claude/skills/holistic-testing-pact/SKILL.md +0 -1
  23. package/.claude/skills/iterative-loop/SKILL.md +6 -6
  24. package/.claude/skills/localization-testing/SKILL.md +0 -1
  25. package/.claude/skills/mobile-testing/SKILL.md +0 -1
  26. package/.claude/skills/mutation-testing/SKILL.md +0 -1
  27. package/.claude/skills/n8n-expression-testing/SKILL.md +0 -1
  28. package/.claude/skills/n8n-integration-testing-patterns/SKILL.md +0 -1
  29. package/.claude/skills/n8n-security-testing/SKILL.md +0 -1
  30. package/.claude/skills/n8n-trigger-testing-strategies/SKILL.md +0 -1
  31. package/.claude/skills/n8n-workflow-testing-fundamentals/SKILL.md +0 -1
  32. package/.claude/skills/qcsd-cicd-swarm/SKILL.md +0 -1
  33. package/.claude/skills/qcsd-development-swarm/SKILL.md +0 -1
  34. package/.claude/skills/qcsd-ideation-swarm/SKILL.md +0 -1
  35. package/.claude/skills/qcsd-production-swarm/SKILL.md +0 -1
  36. package/.claude/skills/qcsd-production-swarm/steps/01-flag-detection.md +1 -1
  37. package/.claude/skills/qcsd-production-swarm/steps/07-learning-persistence.md +2 -2
  38. package/.claude/skills/qcsd-refinement-swarm/SKILL.md +0 -1
  39. package/.claude/skills/qcsd-refinement-swarm/steps/01-flag-detection.md +1 -1
  40. package/.claude/skills/qe-chaos-resilience/SKILL.md +0 -1
  41. package/.claude/skills/qe-code-intelligence/SKILL.md +0 -1
  42. package/.claude/skills/qe-contract-testing/SKILL.md +0 -1
  43. package/.claude/skills/qe-coverage-analysis/SKILL.md +0 -1
  44. package/.claude/skills/qe-defect-intelligence/SKILL.md +0 -1
  45. package/.claude/skills/qe-iterative-loop/SKILL.md +0 -1
  46. package/.claude/skills/qe-learning-optimization/SKILL.md +0 -1
  47. package/.claude/skills/qe-quality-assessment/SKILL.md +0 -1
  48. package/.claude/skills/qe-requirements-validation/SKILL.md +0 -1
  49. package/.claude/skills/qe-security-compliance/SKILL.md +0 -1
  50. package/.claude/skills/qe-test-execution/SKILL.md +0 -1
  51. package/.claude/skills/qe-test-generation/SKILL.md +0 -1
  52. package/.claude/skills/qe-visual-accessibility/SKILL.md +0 -1
  53. package/.claude/skills/quality-metrics/SKILL.md +0 -1
  54. package/.claude/skills/refactoring-patterns/SKILL.md +0 -1
  55. package/.claude/skills/regression-testing/SKILL.md +0 -1
  56. package/.claude/skills/risk-based-testing/SKILL.md +0 -1
  57. package/.claude/skills/security-visual-testing/SKILL.md +0 -1
  58. package/.claude/skills/sherlock-review/SKILL.md +0 -1
  59. package/.claude/skills/shift-left-testing/SKILL.md +0 -1
  60. package/.claude/skills/shift-right-testing/SKILL.md +0 -1
  61. package/.claude/skills/six-thinking-hats/SKILL.md +0 -1
  62. package/.claude/skills/skills-manifest.json +1 -1
  63. package/.claude/skills/tdd-london-chicago/SKILL.md +0 -1
  64. package/.claude/skills/technical-writing/SKILL.md +0 -1
  65. package/.claude/skills/test-automation-strategy/SKILL.md +0 -1
  66. package/.claude/skills/test-data-management/SKILL.md +0 -1
  67. package/.claude/skills/test-design-techniques/SKILL.md +0 -1
  68. package/.claude/skills/test-environment-management/SKILL.md +0 -1
  69. package/.claude/skills/test-reporting-analytics/SKILL.md +0 -1
  70. package/.claude/skills/validation-pipeline/SKILL.md +4 -5
  71. package/.claude/skills/visual-testing-advanced/SKILL.md +0 -1
  72. package/.claude/skills/xp-practices/SKILL.md +0 -1
  73. package/.opencode/agents/collective-intelligence-coordinator.yaml +52 -0
  74. package/.opencode/agents/ddd-domain-expert.yaml +49 -0
  75. package/.opencode/agents/memory-specialist.yaml +49 -0
  76. package/.opencode/agents/performance-engineer.yaml +53 -0
  77. package/.opencode/agents/qe-accessibility-auditor.yaml +118 -0
  78. package/.opencode/agents/qe-api-contract-validator.yaml +85 -0
  79. package/.opencode/agents/qe-bdd-generator.yaml +83 -0
  80. package/.opencode/agents/qe-chaos-engineer.yaml +114 -0
  81. package/.opencode/agents/qe-code-complexity.yaml +82 -0
  82. package/.opencode/agents/qe-code-intelligence.yaml +80 -0
  83. package/.opencode/agents/qe-coverage-analyzer.yaml +75 -0
  84. package/.opencode/agents/qe-defect-predictor.yaml +81 -0
  85. package/.opencode/agents/qe-dependency-mapper.yaml +81 -0
  86. package/.opencode/agents/qe-deployment-advisor.yaml +82 -0
  87. package/.opencode/agents/qe-devils-advocate.yaml +63 -0
  88. package/.opencode/agents/qe-flaky-hunter.yaml +116 -0
  89. package/.opencode/agents/qe-fleet-commander.yaml +83 -0
  90. package/.opencode/agents/qe-gap-detector.yaml +81 -0
  91. package/.opencode/agents/qe-graphql-tester.yaml +84 -0
  92. package/.opencode/agents/qe-impact-analyzer.yaml +81 -0
  93. package/.opencode/agents/qe-integration-architect.yaml +46 -0
  94. package/.opencode/agents/qe-integration-tester.yaml +84 -0
  95. package/.opencode/agents/qe-kg-builder.yaml +75 -0
  96. package/.opencode/agents/qe-learning-coordinator.yaml +82 -0
  97. package/.opencode/agents/qe-load-tester.yaml +84 -0
  98. package/.opencode/agents/qe-message-broker-tester.yaml +94 -0
  99. package/.opencode/agents/qe-metrics-optimizer.yaml +81 -0
  100. package/.opencode/agents/qe-middleware-validator.yaml +92 -0
  101. package/.opencode/agents/qe-mutation-tester.yaml +84 -0
  102. package/.opencode/agents/qe-odata-contract-tester.yaml +98 -0
  103. package/.opencode/agents/qe-parallel-executor.yaml +79 -0
  104. package/.opencode/agents/qe-pattern-learner.yaml +80 -0
  105. package/.opencode/agents/qe-pentest-validator.yaml +137 -0
  106. package/.opencode/agents/qe-performance-tester.yaml +83 -0
  107. package/.opencode/agents/qe-product-factors-assessor.yaml +116 -0
  108. package/.opencode/agents/qe-property-tester.yaml +82 -0
  109. package/.opencode/agents/qe-quality-criteria-recommender.yaml +111 -0
  110. package/.opencode/agents/qe-quality-gate.yaml +80 -0
  111. package/.opencode/agents/qe-queen-coordinator.yaml +59 -0
  112. package/.opencode/agents/qe-qx-partner.yaml +75 -0
  113. package/.opencode/agents/qe-regression-analyzer.yaml +90 -0
  114. package/.opencode/agents/qe-requirements-validator.yaml +111 -0
  115. package/.opencode/agents/qe-responsive-tester.yaml +85 -0
  116. package/.opencode/agents/qe-retry-handler.yaml +82 -0
  117. package/.opencode/agents/qe-risk-assessor.yaml +81 -0
  118. package/.opencode/agents/qe-root-cause-analyzer.yaml +82 -0
  119. package/.opencode/agents/qe-sap-idoc-tester.yaml +104 -0
  120. package/.opencode/agents/qe-sap-rfc-tester.yaml +94 -0
  121. package/.opencode/agents/qe-security-auditor.yaml +90 -0
  122. package/.opencode/agents/qe-security-scanner.yaml +80 -0
  123. package/.opencode/agents/qe-soap-tester.yaml +93 -0
  124. package/.opencode/agents/qe-sod-analyzer.yaml +96 -0
  125. package/.opencode/agents/qe-tdd-specialist.yaml +84 -0
  126. package/.opencode/agents/qe-test-generator.yaml +78 -0
  127. package/.opencode/agents/qe-test-idea-rewriter.yaml +88 -0
  128. package/.opencode/agents/qe-transfer-specialist.yaml +81 -0
  129. package/.opencode/agents/qe-visual-tester.yaml +82 -0
  130. package/.opencode/agents/security-architect.yaml +51 -0
  131. package/.opencode/agents/security-auditor.yaml +50 -0
  132. package/.opencode/permissions.yaml +74 -0
  133. package/.opencode/skills/qcsd-cicd-swarm.yaml +45 -0
  134. package/.opencode/skills/qcsd-development-swarm.yaml +45 -0
  135. package/.opencode/skills/qcsd-ideation-swarm.yaml +45 -0
  136. package/.opencode/skills/qcsd-production-swarm.yaml +45 -0
  137. package/.opencode/skills/qcsd-refinement-swarm.yaml +45 -0
  138. package/.opencode/skills/qe-a11y-ally.yaml +45 -0
  139. package/.opencode/skills/qe-accessibility-testing.yaml +45 -0
  140. package/.opencode/skills/qe-agentic-jujutsu.yaml +45 -0
  141. package/.opencode/skills/qe-agentic-quality-engineering.yaml +45 -0
  142. package/.opencode/skills/qe-api-testing-patterns.yaml +45 -0
  143. package/.opencode/skills/qe-aqe-v2-v3-migration.yaml +45 -0
  144. package/.opencode/skills/qe-brutal-honesty-review.yaml +45 -0
  145. package/.opencode/skills/qe-bug-reporting-excellence.yaml +45 -0
  146. package/.opencode/skills/qe-chaos-engineering-resilience.yaml +30 -0
  147. package/.opencode/skills/qe-chaos-resilience.yaml +45 -0
  148. package/.opencode/skills/qe-cicd-pipeline-qe-orchestrator.yaml +45 -0
  149. package/.opencode/skills/qe-code-intelligence.yaml +45 -0
  150. package/.opencode/skills/qe-code-review-quality.yaml +45 -0
  151. package/.opencode/skills/qe-compatibility-testing.yaml +35 -0
  152. package/.opencode/skills/qe-compliance-testing.yaml +35 -0
  153. package/.opencode/skills/qe-consultancy-practices.yaml +45 -0
  154. package/.opencode/skills/qe-context-driven-testing.yaml +45 -0
  155. package/.opencode/skills/qe-contract-testing.yaml +45 -0
  156. package/.opencode/skills/qe-coverage-analysis.yaml +45 -0
  157. package/.opencode/skills/qe-database-testing.yaml +40 -0
  158. package/.opencode/skills/qe-debug-loop.yaml +45 -0
  159. package/.opencode/skills/qe-defect-intelligence.yaml +45 -0
  160. package/.opencode/skills/qe-enterprise-integration-testing.yaml +45 -0
  161. package/.opencode/skills/qe-exploratory-testing-advanced.yaml +45 -0
  162. package/.opencode/skills/qe-github-code-review.yaml +45 -0
  163. package/.opencode/skills/qe-github-multi-repo.yaml +45 -0
  164. package/.opencode/skills/qe-github-project-management.yaml +45 -0
  165. package/.opencode/skills/qe-github-release-management.yaml +45 -0
  166. package/.opencode/skills/qe-github-workflow-automation.yaml +45 -0
  167. package/.opencode/skills/qe-holistic-testing-pact.yaml +45 -0
  168. package/.opencode/skills/qe-iterative-loop.yaml +45 -0
  169. package/.opencode/skills/qe-learning-optimization.yaml +45 -0
  170. package/.opencode/skills/qe-localization-testing.yaml +40 -0
  171. package/.opencode/skills/qe-middleware-testing-patterns.yaml +45 -0
  172. package/.opencode/skills/qe-mobile-testing.yaml +35 -0
  173. package/.opencode/skills/qe-mutation-testing.yaml +35 -0
  174. package/.opencode/skills/qe-n8n-expression-testing.yaml +45 -0
  175. package/.opencode/skills/qe-n8n-integration-testing-patterns.yaml +45 -0
  176. package/.opencode/skills/qe-n8n-security-testing.yaml +45 -0
  177. package/.opencode/skills/qe-n8n-trigger-testing-strategies.yaml +45 -0
  178. package/.opencode/skills/qe-n8n-workflow-testing-fundamentals.yaml +45 -0
  179. package/.opencode/skills/qe-observability-testing-patterns.yaml +45 -0
  180. package/.opencode/skills/qe-pair-programming.yaml +45 -0
  181. package/.opencode/skills/qe-pentest-validation.yaml +45 -0
  182. package/.opencode/skills/qe-performance-analysis.yaml +45 -0
  183. package/.opencode/skills/qe-performance-testing.yaml +45 -0
  184. package/.opencode/skills/qe-pr-review.yaml +45 -0
  185. package/.opencode/skills/qe-quality-assessment.yaml +45 -0
  186. package/.opencode/skills/qe-quality-metrics.yaml +45 -0
  187. package/.opencode/skills/qe-refactoring-patterns.yaml +40 -0
  188. package/.opencode/skills/qe-regression-testing.yaml +40 -0
  189. package/.opencode/skills/qe-release.yaml +45 -0
  190. package/.opencode/skills/qe-requirements-validation.yaml +45 -0
  191. package/.opencode/skills/qe-risk-based-testing.yaml +45 -0
  192. package/.opencode/skills/qe-security-compliance.yaml +45 -0
  193. package/.opencode/skills/qe-security-testing.yaml +45 -0
  194. package/.opencode/skills/qe-security-visual-testing.yaml +45 -0
  195. package/.opencode/skills/qe-sfdipot-product-factors.yaml +45 -0
  196. package/.opencode/skills/qe-sherlock-review.yaml +45 -0
  197. package/.opencode/skills/qe-shift-left-testing.yaml +45 -0
  198. package/.opencode/skills/qe-shift-right-testing.yaml +45 -0
  199. package/.opencode/skills/qe-six-thinking-hats.yaml +45 -0
  200. package/.opencode/skills/qe-skill-builder.yaml +45 -0
  201. package/.opencode/skills/qe-sparc-methodology.yaml +45 -0
  202. package/.opencode/skills/qe-stream-chain.yaml +45 -0
  203. package/.opencode/skills/qe-tdd-london-chicago.yaml +45 -0
  204. package/.opencode/skills/qe-technical-writing.yaml +45 -0
  205. package/.opencode/skills/qe-test-automation-strategy.yaml +35 -0
  206. package/.opencode/skills/qe-test-data-management.yaml +45 -0
  207. package/.opencode/skills/qe-test-design-techniques.yaml +40 -0
  208. package/.opencode/skills/qe-test-environment-management.yaml +40 -0
  209. package/.opencode/skills/qe-test-execution.yaml +45 -0
  210. package/.opencode/skills/qe-test-generation.yaml +45 -0
  211. package/.opencode/skills/qe-test-idea-rewriting.yaml +45 -0
  212. package/.opencode/skills/qe-test-reporting-analytics.yaml +45 -0
  213. package/.opencode/skills/qe-testability-scoring.yaml +45 -0
  214. package/.opencode/skills/qe-verification-quality.yaml +45 -0
  215. package/.opencode/skills/qe-visual-accessibility.yaml +45 -0
  216. package/.opencode/skills/qe-visual-testing-advanced.yaml +40 -0
  217. package/.opencode/skills/qe-wms-testing-patterns.yaml +45 -0
  218. package/.opencode/skills/qe-xp-practices.yaml +45 -0
  219. package/.opencode/tools/qe-defect-scan.ts +79 -0
  220. package/.opencode/tools/qe-fleet-status.ts +59 -0
  221. package/.opencode/tools/qe-full-audit.ts +81 -0
  222. package/.opencode/tools/qe-learning-report.ts +74 -0
  223. package/.opencode/tools/qe-test-and-verify.ts +97 -0
  224. package/CHANGELOG.md +21 -0
  225. package/assets/agents/v3/qe-security-scanner.md +2 -2
  226. package/assets/helpers/statusline-v3.cjs +1 -1
  227. package/assets/helpers/validation-pipeline.cjs +625 -0
  228. package/assets/skills/a11y-ally/SKILL.md +0 -1
  229. package/assets/skills/accessibility-testing/SKILL.md +0 -1
  230. package/assets/skills/agentic-quality-engineering/SKILL.md +0 -1
  231. package/assets/skills/aqe-v2-v3-migration/skill.md +0 -1
  232. package/assets/skills/brutal-honesty-review/SKILL.md +0 -1
  233. package/assets/skills/bug-reporting-excellence/SKILL.md +0 -1
  234. package/assets/skills/cicd-pipeline-qe-orchestrator/SKILL.md +0 -1
  235. package/assets/skills/code-review-quality/SKILL.md +0 -1
  236. package/assets/skills/compliance-testing/SKILL.md +0 -1
  237. package/assets/skills/consultancy-practices/SKILL.md +0 -1
  238. package/assets/skills/context-driven-testing/SKILL.md +0 -1
  239. package/assets/skills/exploratory-testing-advanced/SKILL.md +0 -1
  240. package/assets/skills/holistic-testing-pact/SKILL.md +0 -1
  241. package/assets/skills/localization-testing/SKILL.md +0 -1
  242. package/assets/skills/mobile-testing/SKILL.md +0 -1
  243. package/assets/skills/mutation-testing/SKILL.md +0 -1
  244. package/assets/skills/n8n-expression-testing/SKILL.md +0 -1
  245. package/assets/skills/n8n-integration-testing-patterns/SKILL.md +0 -1
  246. package/assets/skills/n8n-security-testing/SKILL.md +0 -1
  247. package/assets/skills/n8n-trigger-testing-strategies/SKILL.md +0 -1
  248. package/assets/skills/n8n-workflow-testing-fundamentals/SKILL.md +0 -1
  249. package/assets/skills/qcsd-cicd-swarm/SKILL.md +0 -1
  250. package/assets/skills/qcsd-development-swarm/SKILL.md +0 -1
  251. package/assets/skills/qcsd-ideation-swarm/SKILL.md +0 -1
  252. package/assets/skills/qcsd-production-swarm/SKILL.md +0 -1
  253. package/assets/skills/qcsd-production-swarm/steps/01-flag-detection.md +1 -1
  254. package/assets/skills/qcsd-production-swarm/steps/07-learning-persistence.md +2 -2
  255. package/assets/skills/qcsd-refinement-swarm/SKILL.md +0 -1
  256. package/assets/skills/qcsd-refinement-swarm/steps/01-flag-detection.md +1 -1
  257. package/assets/skills/qe-chaos-resilience/SKILL.md +0 -1
  258. package/assets/skills/qe-code-intelligence/SKILL.md +0 -1
  259. package/assets/skills/qe-contract-testing/SKILL.md +0 -1
  260. package/assets/skills/qe-coverage-analysis/SKILL.md +0 -1
  261. package/assets/skills/qe-defect-intelligence/SKILL.md +0 -1
  262. package/assets/skills/qe-iterative-loop/SKILL.md +0 -1
  263. package/assets/skills/qe-learning-optimization/SKILL.md +0 -1
  264. package/assets/skills/qe-quality-assessment/SKILL.md +0 -1
  265. package/assets/skills/qe-requirements-validation/SKILL.md +0 -1
  266. package/assets/skills/qe-security-compliance/SKILL.md +0 -1
  267. package/assets/skills/qe-test-execution/SKILL.md +0 -1
  268. package/assets/skills/qe-test-generation/SKILL.md +0 -1
  269. package/assets/skills/qe-visual-accessibility/SKILL.md +0 -1
  270. package/assets/skills/quality-metrics/SKILL.md +0 -1
  271. package/assets/skills/refactoring-patterns/SKILL.md +0 -1
  272. package/assets/skills/regression-testing/SKILL.md +0 -1
  273. package/assets/skills/risk-based-testing/SKILL.md +0 -1
  274. package/assets/skills/security-visual-testing/SKILL.md +0 -1
  275. package/assets/skills/sherlock-review/SKILL.md +0 -1
  276. package/assets/skills/shift-left-testing/SKILL.md +0 -1
  277. package/assets/skills/shift-right-testing/SKILL.md +0 -1
  278. package/assets/skills/six-thinking-hats/SKILL.md +0 -1
  279. package/assets/skills/tdd-london-chicago/SKILL.md +0 -1
  280. package/assets/skills/technical-writing/SKILL.md +0 -1
  281. package/assets/skills/test-automation-strategy/SKILL.md +0 -1
  282. package/assets/skills/test-data-management/SKILL.md +0 -1
  283. package/assets/skills/test-design-techniques/SKILL.md +0 -1
  284. package/assets/skills/test-environment-management/SKILL.md +0 -1
  285. package/assets/skills/test-reporting-analytics/SKILL.md +0 -1
  286. package/assets/skills/validation-pipeline/SKILL.md +4 -5
  287. package/assets/skills/visual-testing-advanced/SKILL.md +0 -1
  288. package/assets/skills/xp-practices/SKILL.md +0 -1
  289. package/dist/adapters/claude-flow/detect.d.ts +5 -0
  290. package/dist/adapters/claude-flow/detect.js +38 -18
  291. package/dist/adapters/claude-flow/model-router-bridge.js +4 -3
  292. package/dist/adapters/claude-flow/pretrain-bridge.js +5 -4
  293. package/dist/adapters/claude-flow/trajectory-bridge.js +5 -4
  294. package/dist/cli/bundle.js +159 -62
  295. package/dist/cli/commands/claude-flow-setup.js +4 -4
  296. package/dist/domains/learning-optimization/coordinator.d.ts +6 -1
  297. package/dist/domains/learning-optimization/coordinator.js +26 -4
  298. package/dist/domains/learning-optimization/plugin.d.ts +2 -0
  299. package/dist/domains/learning-optimization/plugin.js +2 -0
  300. package/dist/governance/adversarial-defense-integration.js +1 -0
  301. package/dist/governance/continue-gate-integration.d.ts +1 -0
  302. package/dist/governance/continue-gate-integration.js +1 -0
  303. package/dist/governance/deterministic-gateway-integration.d.ts +1 -0
  304. package/dist/governance/deterministic-gateway-integration.js +1 -0
  305. package/dist/governance/evolution-pipeline-integration.d.ts +1 -0
  306. package/dist/governance/evolution-pipeline-integration.js +1 -0
  307. package/dist/governance/memory-write-gate-integration.d.ts +1 -0
  308. package/dist/governance/memory-write-gate-integration.js +1 -0
  309. package/dist/governance/proof-envelope-integration.d.ts +1 -0
  310. package/dist/governance/proof-envelope-integration.js +1 -0
  311. package/dist/governance/shard-retriever-integration.d.ts +1 -0
  312. package/dist/governance/shard-retriever-integration.js +1 -0
  313. package/dist/governance/trust-accumulator-integration.d.ts +1 -0
  314. package/dist/governance/trust-accumulator-integration.js +1 -0
  315. package/dist/init/agents-installer.js +28 -1
  316. package/dist/init/enhancements/claude-flow-adapter.js +15 -2
  317. package/dist/init/init-wizard-hooks.js +3 -3
  318. package/dist/init/kiro-installer.js +10 -4
  319. package/dist/init/opencode-installer.d.ts +13 -1
  320. package/dist/init/opencode-installer.js +50 -11
  321. package/dist/init/phases/07-hooks.js +21 -7
  322. package/dist/init/settings-merge.d.ts +1 -1
  323. package/dist/init/settings-merge.js +13 -13
  324. package/dist/mcp/bundle.js +70 -30
  325. package/package.json +8 -3
@@ -11,7 +11,8 @@
11
11
  * - Uses simple rule-based routing
12
12
  * - Falls back to sonnet as default
13
13
  */
14
- import { detectClaudeFlow } from './detect.js';
14
+ import { detectClaudeFlow, resolveCliPackage } from './detect.js';
15
+ const cliPkg = resolveCliPackage();
15
16
  /**
16
17
  * Task complexity indicators
17
18
  */
@@ -55,7 +56,7 @@ export class ModelRouterBridge {
55
56
  if (this.claudeFlowAvailable) {
56
57
  try {
57
58
  const { execFileSync } = await import('child_process');
58
- const result = execFileSync('npx', ['--no-install', '@claude-flow/cli', 'hooks', 'model-route', '--task', task], { encoding: 'utf-8', timeout: 10000, cwd: this.options.projectRoot });
59
+ const result = execFileSync('npx', ['--no-install', cliPkg, 'hooks', 'model-route', '--task', task], { encoding: 'utf-8', timeout: 10000, cwd: this.options.projectRoot });
59
60
  // Parse result
60
61
  const modelMatch = result.match(/model[:\s]+["']?(haiku|sonnet|opus)/i);
61
62
  const confMatch = result.match(/confidence[:\s]+([0-9.]+)/i);
@@ -89,7 +90,7 @@ export class ModelRouterBridge {
89
90
  if (this.claudeFlowAvailable) {
90
91
  try {
91
92
  const { execFileSync } = await import('child_process');
92
- execFileSync('npx', ['--no-install', '@claude-flow/cli', 'hooks', 'model-outcome', '--task', outcome.task, '--model', outcome.model, '--outcome', outcome.outcome], { encoding: 'utf-8', timeout: 10000, cwd: this.options.projectRoot });
93
+ execFileSync('npx', ['--no-install', cliPkg, 'hooks', 'model-outcome', '--task', outcome.task, '--model', outcome.model, '--outcome', outcome.outcome], { encoding: 'utf-8', timeout: 10000, cwd: this.options.projectRoot });
93
94
  }
94
95
  catch (error) {
95
96
  // Non-critical: outcome recording is optional
@@ -11,7 +11,8 @@
11
11
  * - Uses AQE's built-in project analyzer
12
12
  * - Generates basic agent configurations
13
13
  */
14
- import { detectClaudeFlow } from './detect.js';
14
+ import { detectClaudeFlow, resolveCliPackage } from './detect.js';
15
+ const cliPkg = resolveCliPackage();
15
16
  import { safeJsonParse } from '../../shared/safe-json.js';
16
17
  import { toErrorMessage } from '../../shared/error-utils.js';
17
18
  /**
@@ -50,7 +51,7 @@ export class PretrainBridge {
50
51
  if (this.claudeFlowAvailable) {
51
52
  try {
52
53
  const { execFileSync } = await import('child_process');
53
- const result = execFileSync('npx', ['--no-install', '@claude-flow/cli', 'hooks', 'pretrain', '--path', targetPath, '--depth', depth], { encoding: 'utf-8', timeout: 120000, cwd: this.options.projectRoot });
54
+ const result = execFileSync('npx', ['--no-install', cliPkg, 'hooks', 'pretrain', '--path', targetPath, '--depth', depth], { encoding: 'utf-8', timeout: 120000, cwd: this.options.projectRoot });
54
55
  // Try to parse JSON result
55
56
  try {
56
57
  const parsed = safeJsonParse(result);
@@ -88,7 +89,7 @@ export class PretrainBridge {
88
89
  if (this.claudeFlowAvailable) {
89
90
  try {
90
91
  const { execFileSync } = await import('child_process');
91
- const result = execFileSync('npx', ['--no-install', '@claude-flow/cli', 'hooks', 'build-agents', '--format', format], { encoding: 'utf-8', timeout: 60000, cwd: this.options.projectRoot });
92
+ const result = execFileSync('npx', ['--no-install', cliPkg, 'hooks', 'build-agents', '--format', format], { encoding: 'utf-8', timeout: 60000, cwd: this.options.projectRoot });
92
93
  try {
93
94
  return safeJsonParse(result);
94
95
  }
@@ -112,7 +113,7 @@ export class PretrainBridge {
112
113
  if (this.claudeFlowAvailable) {
113
114
  try {
114
115
  const { execFileSync } = await import('child_process');
115
- const result = execFileSync('npx', ['--no-install', '@claude-flow/cli', 'hooks', 'transfer', '--source-path', sourcePath, '--min-confidence', String(minConfidence)], { encoding: 'utf-8', timeout: 60000, cwd: this.options.projectRoot });
116
+ const result = execFileSync('npx', ['--no-install', cliPkg, 'hooks', 'transfer', '--source-path', sourcePath, '--min-confidence', String(minConfidence)], { encoding: 'utf-8', timeout: 60000, cwd: this.options.projectRoot });
116
117
  const transferredMatch = result.match(/transferred[:\s]+(\d+)/i);
117
118
  const skippedMatch = result.match(/skipped[:\s]+(\d+)/i);
118
119
  return {
@@ -1,5 +1,6 @@
1
1
  import { randomUUID } from 'node:crypto';
2
- import { detectClaudeFlow } from './detect.js';
2
+ import { detectClaudeFlow, resolveCliPackage } from './detect.js';
3
+ const cliPkg = resolveCliPackage();
3
4
  /**
4
5
  * Trajectory Bridge for SONA integration
5
6
  */
@@ -30,7 +31,7 @@ export class TrajectoryBridge {
30
31
  if (this.claudeFlowAvailable) {
31
32
  try {
32
33
  const { execFileSync } = await import('child_process');
33
- const args = ['--no-install', '@claude-flow/cli', 'hooks', 'intelligence', 'trajectory-start', '--task', task];
34
+ const args = ['--no-install', cliPkg, 'hooks', 'intelligence', 'trajectory-start', '--task', task];
34
35
  if (agent) {
35
36
  args.push('--agent', agent);
36
37
  }
@@ -63,7 +64,7 @@ export class TrajectoryBridge {
63
64
  if (this.claudeFlowAvailable) {
64
65
  try {
65
66
  const { execFileSync } = await import('child_process');
66
- const args = ['--no-install', '@claude-flow/cli', 'hooks', 'intelligence', 'trajectory-step', '--trajectory-id', trajectoryId, '--action', action];
67
+ const args = ['--no-install', cliPkg, 'hooks', 'intelligence', 'trajectory-step', '--trajectory-id', trajectoryId, '--action', action];
67
68
  if (result) {
68
69
  args.push('--result', result);
69
70
  }
@@ -97,7 +98,7 @@ export class TrajectoryBridge {
97
98
  if (this.claudeFlowAvailable) {
98
99
  try {
99
100
  const { execFileSync } = await import('child_process');
100
- const args = ['--no-install', '@claude-flow/cli', 'hooks', 'intelligence', 'trajectory-end', '--trajectory-id', trajectoryId, '--success', String(success)];
101
+ const args = ['--no-install', cliPkg, 'hooks', 'intelligence', 'trajectory-end', '--trajectory-id', trajectoryId, '--success', String(success)];
101
102
  if (feedback) {
102
103
  args.push('--feedback', feedback);
103
104
  }
@@ -22719,6 +22719,7 @@ import {
22719
22719
  existsSync as existsSync30,
22720
22720
  mkdirSync as mkdirSync13,
22721
22721
  readdirSync as readdirSync13,
22722
+ readFileSync as readFileSync22,
22722
22723
  writeFileSync as writeFileSync11,
22723
22724
  copyFileSync as copyFileSync7
22724
22725
  } from "fs";
@@ -22753,23 +22754,56 @@ var init_opencode_installer = __esm({
22753
22754
  // Source Directory Detection
22754
22755
  // ==========================================================================
22755
22756
  /**
22756
- * Find the source .opencode/ directory
22757
+ * Find the source .opencode/ directory containing agents/skills/tools to install.
22758
+ * Resolves relative to the package installation directory (not CWD) so that
22759
+ * globally-installed and bundled CLI paths all work correctly (#361).
22757
22760
  */
22758
22761
  findSourceDir() {
22762
+ const targetDir = join34(this.projectRoot, ".opencode");
22759
22763
  const possiblePaths = [
22760
- // Development: src/init/ or dist/init/ -> project root
22764
+ // From dist/init/ or src/init/ package root .opencode/
22761
22765
  join34(__dirname3, "../../.opencode"),
22762
- // From project root (CWD)
22763
- join34(process.cwd(), ".opencode"),
22764
- // NPM package location
22765
- join34(__dirname3, "../../assets/opencode")
22766
- ];
22766
+ // From dist/cli/ (bundle) → package root .opencode/
22767
+ join34(__dirname3, "../.opencode"),
22768
+ // require.resolve fallback: find the package root via its package.json
22769
+ this.resolveViaPackageJson()
22770
+ ].filter((p74) => p74 !== null);
22767
22771
  for (const path38 of possiblePaths) {
22768
- if (existsSync30(path38)) {
22772
+ if (path38 === targetDir) continue;
22773
+ if (this.isValidSourceDir(path38)) {
22769
22774
  return path38;
22770
22775
  }
22771
22776
  }
22772
- return join34(process.cwd(), ".opencode");
22777
+ return possiblePaths[0] ?? join34(__dirname3, "../../.opencode");
22778
+ }
22779
+ /**
22780
+ * Try to find the package root via require.resolve on our own package.json,
22781
+ * then return <root>/.opencode. Returns null if resolution fails.
22782
+ */
22783
+ resolveViaPackageJson() {
22784
+ try {
22785
+ let dir = __dirname3;
22786
+ for (let i58 = 0; i58 < 5; i58++) {
22787
+ const pkgPath = join34(dir, "package.json");
22788
+ if (existsSync30(pkgPath)) {
22789
+ const pkg = JSON.parse(readFileSync22(pkgPath, "utf-8"));
22790
+ if (pkg.name === "agentic-qe") {
22791
+ return join34(dir, ".opencode");
22792
+ }
22793
+ }
22794
+ dir = dirname9(dir);
22795
+ }
22796
+ } catch {
22797
+ }
22798
+ return null;
22799
+ }
22800
+ /**
22801
+ * Check if a directory is a valid source for OpenCode assets
22802
+ * (must exist and contain at least an agents/ or skills/ subdirectory)
22803
+ */
22804
+ isValidSourceDir(dir) {
22805
+ if (!existsSync30(dir)) return false;
22806
+ return existsSync30(join34(dir, "agents")) || existsSync30(join34(dir, "skills"));
22773
22807
  }
22774
22808
  // ==========================================================================
22775
22809
  // Installation
@@ -23009,16 +23043,21 @@ var init_kiro_installer = __esm({
23009
23043
  // ==========================================================================
23010
23044
  findOpenCodeDir() {
23011
23045
  const possiblePaths = [
23046
+ // Development: src/init/ or dist/init/ -> project root
23012
23047
  join35(__dirname4, "../../.opencode"),
23013
- join35(process.cwd(), ".opencode"),
23014
- join35(process.cwd(), ".opencode")
23048
+ // NPM package location
23049
+ join35(__dirname4, "../../assets/opencode")
23015
23050
  ];
23016
23051
  for (const p74 of possiblePaths) {
23017
- if (existsSync31(p74)) {
23052
+ if (existsSync31(p74) && (existsSync31(join35(p74, "agents")) || existsSync31(join35(p74, "skills")))) {
23018
23053
  return p74;
23019
23054
  }
23020
23055
  }
23021
- return join35(process.cwd(), ".opencode");
23056
+ const cwdPath = join35(process.cwd(), ".opencode");
23057
+ if (existsSync31(cwdPath) && (existsSync31(join35(cwdPath, "agents")) || existsSync31(join35(cwdPath, "skills")))) {
23058
+ return cwdPath;
23059
+ }
23060
+ return possiblePaths[0];
23022
23061
  }
23023
23062
  // ==========================================================================
23024
23063
  // Installation
@@ -122207,8 +122246,9 @@ var LearningOptimizationCoordinator = class extends BaseDomainCoordinator {
122207
122246
  * QESONA (Self-Optimizing Neural Architecture) for pattern learning
122208
122247
  * Provides <0.05ms pattern adaptation via @ruvector/sona
122209
122248
  * Now uses PersistentSONAEngine to survive restarts
122249
+ * Nullable: init may fail (e.g. during `aqe init`) — coordinator degrades gracefully
122210
122250
  */
122211
- sona;
122251
+ sona = null;
122212
122252
  /**
122213
122253
  * DreamScheduler for offline pattern consolidation and insight generation
122214
122254
  * Wraps DreamEngine with automatic scheduling and trigger support
@@ -122220,7 +122260,7 @@ var LearningOptimizationCoordinator = class extends BaseDomainCoordinator {
122220
122260
  /**
122221
122261
  * Initialize the coordinator.
122222
122262
  * CQ-002: Domain-specific initialization
122223
- * Throws if QESONA fails to initialize.
122263
+ * SONA init failure is non-fatal — coordinator degrades gracefully (#359).
122224
122264
  */
122225
122265
  async onInitialize() {
122226
122266
  try {
@@ -122234,7 +122274,8 @@ var LearningOptimizationCoordinator = class extends BaseDomainCoordinator {
122234
122274
  console.log("[LearningOptimizationCoordinator] PersistentSONAEngine initialized for pattern learning");
122235
122275
  } catch (error) {
122236
122276
  console.error("[LearningOptimizationCoordinator] Failed to initialize PersistentSONAEngine:", error);
122237
- throw error;
122277
+ console.warn("[LearningOptimizationCoordinator] Continuing without SONA pattern persistence");
122278
+ this.sona = null;
122238
122279
  }
122239
122280
  if (this.config.enableDreamScheduler) {
122240
122281
  try {
@@ -122604,6 +122645,7 @@ var LearningOptimizationCoordinator = class extends BaseDomainCoordinator {
122604
122645
  */
122605
122646
  learnPattern(state3, action, outcome, patternType, domain, metadata) {
122606
122647
  this.ensureInitialized();
122648
+ this.ensureSONAAvailable();
122607
122649
  return this.sona.createPattern(state3, action, outcome, patternType, domain, metadata);
122608
122650
  }
122609
122651
  /**
@@ -122616,6 +122658,16 @@ var LearningOptimizationCoordinator = class extends BaseDomainCoordinator {
122616
122658
  );
122617
122659
  }
122618
122660
  }
122661
+ /**
122662
+ * Ensure SONA engine is available (may be null if init failed gracefully).
122663
+ */
122664
+ ensureSONAAvailable() {
122665
+ if (!this.sona) {
122666
+ throw new Error(
122667
+ "[LearningOptimizationCoordinator] SONA engine is not available. Pattern persistence failed during initialization."
122668
+ );
122669
+ }
122670
+ }
122619
122671
  /**
122620
122672
  * Adapt a pattern based on current context using QESONA.
122621
122673
  * Leverages @ruvector/sona's HNSW-indexed pattern matching for <0.05ms adaptation.
@@ -122628,6 +122680,7 @@ var LearningOptimizationCoordinator = class extends BaseDomainCoordinator {
122628
122680
  */
122629
122681
  async adaptPattern(state3, patternType, domain) {
122630
122682
  this.ensureInitialized();
122683
+ this.ensureSONAAvailable();
122631
122684
  return this.sona.adaptPattern(state3, patternType, domain);
122632
122685
  }
122633
122686
  /**
@@ -122638,6 +122691,7 @@ var LearningOptimizationCoordinator = class extends BaseDomainCoordinator {
122638
122691
  */
122639
122692
  getSONAStats() {
122640
122693
  this.ensureInitialized();
122694
+ this.ensureSONAAvailable();
122641
122695
  return this.sona.getStats();
122642
122696
  }
122643
122697
  /**
@@ -122648,6 +122702,7 @@ var LearningOptimizationCoordinator = class extends BaseDomainCoordinator {
122648
122702
  */
122649
122703
  getSONAPatterns() {
122650
122704
  this.ensureInitialized();
122705
+ this.ensureSONAAvailable();
122651
122706
  return this.sona.getAllPatterns();
122652
122707
  }
122653
122708
  /**
@@ -122659,6 +122714,7 @@ var LearningOptimizationCoordinator = class extends BaseDomainCoordinator {
122659
122714
  */
122660
122715
  getSONAPatternsByType(type) {
122661
122716
  this.ensureInitialized();
122717
+ this.ensureSONAAvailable();
122662
122718
  return this.sona.getPatternsByType(type);
122663
122719
  }
122664
122720
  /**
@@ -122670,6 +122726,7 @@ var LearningOptimizationCoordinator = class extends BaseDomainCoordinator {
122670
122726
  */
122671
122727
  getSONAPatternsByDomain(domain) {
122672
122728
  this.ensureInitialized();
122729
+ this.ensureSONAAvailable();
122673
122730
  return this.sona.getPatternsByDomain(domain);
122674
122731
  }
122675
122732
  /**
@@ -122684,6 +122741,7 @@ var LearningOptimizationCoordinator = class extends BaseDomainCoordinator {
122684
122741
  */
122685
122742
  updateSONAPattern(patternId, success, quality) {
122686
122743
  this.ensureInitialized();
122744
+ this.ensureSONAAvailable();
122687
122745
  return this.sona.updatePattern(patternId, success, quality);
122688
122746
  }
122689
122747
  /**
@@ -122695,6 +122753,7 @@ var LearningOptimizationCoordinator = class extends BaseDomainCoordinator {
122695
122753
  */
122696
122754
  forceSONALearning() {
122697
122755
  this.ensureInitialized();
122756
+ this.ensureSONAAvailable();
122698
122757
  return this.sona.forceLearn();
122699
122758
  }
122700
122759
  /**
@@ -122703,7 +122762,7 @@ var LearningOptimizationCoordinator = class extends BaseDomainCoordinator {
122703
122762
  * @returns True if SONA is available
122704
122763
  */
122705
122764
  isSONAAvailable() {
122706
- return this.initialized;
122765
+ return this.initialized && this.sona !== null;
122707
122766
  }
122708
122767
  /**
122709
122768
  * Export all QESONA patterns for persistence or transfer.
@@ -122713,6 +122772,7 @@ var LearningOptimizationCoordinator = class extends BaseDomainCoordinator {
122713
122772
  */
122714
122773
  exportSONAPatterns() {
122715
122774
  this.ensureInitialized();
122775
+ this.ensureSONAAvailable();
122716
122776
  return this.sona.exportPatterns();
122717
122777
  }
122718
122778
  /**
@@ -122724,6 +122784,7 @@ var LearningOptimizationCoordinator = class extends BaseDomainCoordinator {
122724
122784
  */
122725
122785
  importSONAPatterns(patterns) {
122726
122786
  this.ensureInitialized();
122787
+ this.ensureSONAAvailable();
122727
122788
  this.sona.importPatterns(patterns);
122728
122789
  }
122729
122790
  /**
@@ -122735,6 +122796,7 @@ var LearningOptimizationCoordinator = class extends BaseDomainCoordinator {
122735
122796
  */
122736
122797
  async verifySONAPerformance(iterations = 100) {
122737
122798
  this.ensureInitialized();
122799
+ this.ensureSONAAvailable();
122738
122800
  return this.sona.verifyPerformance(iterations);
122739
122801
  }
122740
122802
  // ============================================================================
@@ -123443,6 +123505,8 @@ var LearningOptimizationPlugin = class extends BaseDomainPlugin {
123443
123505
  */
123444
123506
  getAPI() {
123445
123507
  const api = {
123508
+ // Availability check
123509
+ isSONAAvailable: () => this.coordinator?.isSONAAvailable() ?? false,
123446
123510
  // Coordinator methods
123447
123511
  runLearningCycle: this.runLearningCycle.bind(this),
123448
123512
  optimizeAllStrategies: this.optimizeAllStrategies.bind(this),
@@ -139344,7 +139408,7 @@ var ALL_DOMAINS2 = [
139344
139408
  "enterprise-integration"
139345
139409
  ];
139346
139410
  function getAQEVersion() {
139347
- return true ? "3.8.1" : "3.0.0";
139411
+ return true ? "3.8.2" : "3.0.0";
139348
139412
  }
139349
139413
  function createDefaultConfig(projectName, projectRoot) {
139350
139414
  return {
@@ -140303,8 +140367,9 @@ function generateAqeEnvVars(config) {
140303
140367
  AQE_V3_SUCCESS_RATE_THRESHOLD: String(config.learning?.qualityThreshold ?? 0.7)
140304
140368
  };
140305
140369
  }
140306
- function generateV3SettingsSections(config) {
140370
+ function generateV3SettingsSections(config, projectRoot) {
140307
140371
  const domains = config.domains?.enabled || [];
140372
+ const fallback = projectRoot ? `echo ${JSON.stringify(projectRoot)}` : "pwd";
140308
140373
  return {
140309
140374
  aqe: {
140310
140375
  version: config.version ?? "3.0.0",
@@ -140313,21 +140378,20 @@ function generateV3SettingsSections(config) {
140313
140378
  },
140314
140379
  statusLine: {
140315
140380
  type: "command",
140316
- command: 'node "$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.claude/helpers/statusline-v3.cjs" 2>/dev/null || echo "\u258A Agentic QE v3"',
140381
+ command: `node "$(git rev-parse --show-toplevel 2>/dev/null || ${fallback})/.claude/helpers/statusline-v3.cjs" 2>/dev/null || echo "\u258A Agentic QE v3"`,
140317
140382
  refreshMs: 5e3,
140318
140383
  enabled: true
140319
140384
  },
140320
- permissions: {
140321
- allow: [
140322
- "Bash(npx claude-flow:*)",
140323
- "Bash(npx @claude-flow/cli:*)",
140324
- "mcp__claude-flow__:*",
140325
- "mcp__agentic-qe__*"
140326
- ],
140327
- deny: [
140328
- "Bash(rm -rf /)"
140329
- ]
140330
- },
140385
+ // permissions are union-merged in 07-hooks.ts — not set here to avoid overwriting user entries (#362)
140386
+ _aqePermissions: [
140387
+ "Bash(npx ruflo:*)",
140388
+ "Bash(npx @ruflo/cli:*)",
140389
+ "Bash(npx claude-flow:*)",
140390
+ "Bash(npx @claude-flow/cli:*)",
140391
+ "mcp__ruflo__:*",
140392
+ "mcp__claude-flow__:*",
140393
+ "mcp__agentic-qe__*"
140394
+ ],
140331
140395
  includeCoAuthoredBy: true,
140332
140396
  v3Configuration: {
140333
140397
  domains: {
@@ -140499,7 +140563,7 @@ async function configureHooks(projectRoot, config) {
140499
140563
  ...existingEnv,
140500
140564
  ...generateAqeEnvVars(config)
140501
140565
  };
140502
- const v3Sections = generateV3SettingsSections(config);
140566
+ const v3Sections = generateV3SettingsSections(config, projectRoot);
140503
140567
  for (const [key, value] of Object.entries(v3Sections)) {
140504
140568
  settings[key] = value;
140505
140569
  }
@@ -140803,7 +140867,7 @@ Task({ prompt: "Run security audit", subagent_type: "qe-security-scanner", run_i
140803
140867
 
140804
140868
  \`\`\`javascript
140805
140869
  // STEP 1: Initialize Claude Flow swarm for coordination
140806
- Bash("npx @claude-flow/cli@latest swarm init --topology hierarchical --max-agents 15")
140870
+ Bash("npx ruflo swarm init --topology hierarchical --max-agents 15")
140807
140871
 
140808
140872
  // STEP 2: Initialize AQE Fleet for QE-specific work
140809
140873
  mcp__agentic-qe__fleet_init({
@@ -140816,7 +140880,7 @@ Task({ prompt: "Analyze coverage gaps", subagent_type: "qe-coverage-specialist",
140816
140880
 
140817
140881
  // STEP 4: Store learnings in both systems
140818
140882
  mcp__agentic-qe__memory_store({ key: "pattern-1", value: "...", namespace: "qe-patterns", persist: true })
140819
- Bash("npx @claude-flow/cli@latest memory store --key 'qe-pattern-1' --value '...' --namespace patterns")
140883
+ Bash("npx ruflo memory store --key 'qe-pattern-1' --value '...' --namespace patterns")
140820
140884
  \`\`\`
140821
140885
 
140822
140886
  ### Data Storage
@@ -141552,6 +141616,25 @@ ${capsSection}
141552
141616
  }
141553
141617
 
141554
141618
  // src/init/agents-installer.ts
141619
+ function bumpUpdatedDate(content) {
141620
+ const today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
141621
+ const fmMatch = content.match(/^---\n([\s\S]*?)\n---/);
141622
+ if (!fmMatch) return content;
141623
+ const fm = fmMatch[1];
141624
+ let newFm;
141625
+ if (/^updated:/m.test(fm)) {
141626
+ newFm = fm.replace(/^updated:.*$/m, `updated: ${today}`);
141627
+ } else if (/^created:/m.test(fm)) {
141628
+ newFm = fm.replace(/^(created:.*$)/m, `$1
141629
+ updated: ${today}`);
141630
+ } else {
141631
+ newFm = fm + `
141632
+ updated: ${today}`;
141633
+ }
141634
+ return content.replace(/^---\n[\s\S]*?\n---/, `---
141635
+ ${newFm}
141636
+ ---`);
141637
+ }
141555
141638
  var V3_QE_AGENTS = [
141556
141639
  // Test Generation Domain
141557
141640
  "qe-test-architect",
@@ -141790,7 +141873,8 @@ var AgentsInstaller = class {
141790
141873
  try {
141791
141874
  const agentContent = readFileSync18(agentFile, "utf-8");
141792
141875
  const { content: modifiedContent, applied } = applyOverlayToContent(agentContent, overlay);
141793
- writeFileSync5(agentFile, modifiedContent, "utf-8");
141876
+ const finalContent = bumpUpdatedDate(modifiedContent);
141877
+ writeFileSync5(agentFile, finalContent, "utf-8");
141794
141878
  result.overlaysApplied.push(agentName);
141795
141879
  const changes = [
141796
141880
  ...applied.replacedFields.map((f74) => `replaced:${f74}`),
@@ -143829,7 +143913,7 @@ var HooksPhase = class extends BasePhase {
143829
143913
  settings = {};
143830
143914
  }
143831
143915
  }
143832
- const aqeHooks = this.generateHooksConfig(config);
143916
+ const aqeHooks = this.generateHooksConfig(config, projectRoot);
143833
143917
  const hookTypes = Object.keys(aqeHooks);
143834
143918
  const existingHooks = settings.hooks || {};
143835
143919
  const existingAqeDetected = this.hasExistingAqeHooks(existingHooks);
@@ -143842,9 +143926,20 @@ var HooksPhase = class extends BasePhase {
143842
143926
  ...existingEnv,
143843
143927
  ...generateAqeEnvVars(config)
143844
143928
  };
143845
- const v3Sections = generateV3SettingsSections(config);
143929
+ const v3Sections = generateV3SettingsSections(config, projectRoot);
143846
143930
  for (const [key, value] of Object.entries(v3Sections)) {
143847
- settings[key] = value;
143931
+ if (key === "_aqePermissions") {
143932
+ const existingPerms = settings.permissions || {};
143933
+ const existingAllow = existingPerms.allow || [];
143934
+ const aqeEntries = value;
143935
+ const merged = [.../* @__PURE__ */ new Set([...existingAllow, ...aqeEntries])];
143936
+ settings.permissions = {
143937
+ ...existingPerms,
143938
+ allow: merged
143939
+ };
143940
+ } else {
143941
+ settings[key] = value;
143942
+ }
143848
143943
  }
143849
143944
  let existingMcp = settings.enabledMcpjsonServers || [];
143850
143945
  existingMcp = existingMcp.filter((s70) => s70 !== "aqe");
@@ -144126,7 +144221,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
144126
144221
  * Uses `npx agentic-qe` for portability - works without global installation.
144127
144222
  * All hooks use --json output for structured data and fail silently with continueOnError.
144128
144223
  */
144129
- generateHooksConfig(_config) {
144224
+ generateHooksConfig(_config, projectRoot) {
144130
144225
  return {
144131
144226
  PreToolUse: [
144132
144227
  // File guardian — MUST be first to block before learning hooks run
@@ -144240,7 +144335,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
144240
144335
  hooks: [
144241
144336
  {
144242
144337
  type: "command",
144243
- command: 'node "$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.claude/helpers/brain-checkpoint.cjs" verify --json',
144338
+ command: `node "$(git rev-parse --show-toplevel 2>/dev/null || echo ${JSON.stringify(projectRoot)})/.claude/helpers/brain-checkpoint.cjs" verify --json`,
144244
144339
  timeout: 5e3,
144245
144340
  continueOnError: true
144246
144341
  }
@@ -144262,7 +144357,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
144262
144357
  hooks: [
144263
144358
  {
144264
144359
  type: "command",
144265
- command: 'node "$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.claude/helpers/brain-checkpoint.cjs" export --json',
144360
+ command: `node "$(git rev-parse --show-toplevel 2>/dev/null || echo ${JSON.stringify(projectRoot)})/.claude/helpers/brain-checkpoint.cjs" export --json`,
144266
144361
  timeout: 6e4,
144267
144362
  continueOnError: true
144268
144363
  }
@@ -146864,7 +146959,7 @@ function checkMCPConfig(projectRoot) {
146864
146959
  if (existsSync45(mcpJsonPath)) {
146865
146960
  try {
146866
146961
  const config = safeJsonParse(readFileSync37(mcpJsonPath, "utf-8"));
146867
- if (config.mcpServers?.["claude-flow"]) {
146962
+ if (config.mcpServers?.["ruflo"] || config.mcpServers?.["claude-flow"]) {
146868
146963
  return { available: true, method: "mcp-config" };
146869
146964
  }
146870
146965
  } catch {
@@ -146875,7 +146970,7 @@ function checkMCPConfig(projectRoot) {
146875
146970
  try {
146876
146971
  const settings = safeJsonParse(readFileSync37(settingsPath, "utf-8"));
146877
146972
  const servers = settings.mcpServers || settings.mcp?.servers || {};
146878
- if (servers["claude-flow"] || servers["@anthropic/claude-flow"]) {
146973
+ if (servers["ruflo"] || servers["claude-flow"] || servers["@anthropic/claude-flow"]) {
146879
146974
  return { available: true, method: "mcp-config" };
146880
146975
  }
146881
146976
  } catch {
@@ -146889,7 +146984,7 @@ function checkPackageJson(projectRoot) {
146889
146984
  try {
146890
146985
  const pkg = safeJsonParse(readFileSync37(packageJsonPath, "utf-8"));
146891
146986
  const deps = { ...pkg.dependencies, ...pkg.devDependencies };
146892
- if (deps["@claude-flow/cli"] || deps["claude-flow"]) {
146987
+ if (deps["ruflo"] || deps["@claude-flow/cli"] || deps["claude-flow"]) {
146893
146988
  return { available: true, method: "npm-dependency" };
146894
146989
  }
146895
146990
  } catch {
@@ -146897,17 +146992,19 @@ function checkPackageJson(projectRoot) {
146897
146992
  return null;
146898
146993
  }
146899
146994
  function checkLocalBinary(projectRoot) {
146900
- try {
146901
- const result = execSync6("npx --no-install @claude-flow/cli --version", {
146902
- encoding: "utf-8",
146903
- timeout: 5e3,
146904
- cwd: projectRoot,
146905
- stdio: ["pipe", "pipe", "pipe"]
146906
- // suppress stderr noise
146907
- });
146908
- const version2 = result.trim().match(/\d+\.\d+\.\d+[\w.-]*/)?.[0];
146909
- return { available: true, method: "npx-cached", version: version2 };
146910
- } catch {
146995
+ for (const pkg of ["ruflo", "@claude-flow/cli"]) {
146996
+ try {
146997
+ const result = execSync6(`npx --no-install ${pkg} --version`, {
146998
+ encoding: "utf-8",
146999
+ timeout: 5e3,
147000
+ cwd: projectRoot,
147001
+ stdio: ["pipe", "pipe", "pipe"]
147002
+ // suppress stderr noise
147003
+ });
147004
+ const version2 = result.trim().match(/\d+\.\d+\.\d+[\w.-]*/)?.[0];
147005
+ return { available: true, method: "npx-cached", version: version2 };
147006
+ } catch {
147007
+ }
146911
147008
  }
146912
147009
  return null;
146913
147010
  }
@@ -146921,8 +147018,8 @@ function getClaudeFlowNotFoundMessage() {
146921
147018
  " - Codebase pretrain analysis",
146922
147019
  "",
146923
147020
  " To install later:",
146924
- " npm install -g @claude-flow/cli",
146925
- " claude mcp add claude-flow -- npx -y @claude-flow/cli@latest",
147021
+ " npm install -g ruflo",
147022
+ " claude mcp add ruflo -- npx -y ruflo@3.5.18",
146926
147023
  " aqe init --auto --with-claude-flow"
146927
147024
  ].join("\n");
146928
147025
  }
@@ -147010,10 +147107,10 @@ function updateMCPConfig(projectRoot) {
147010
147107
  settings.mcpServers = {};
147011
147108
  }
147012
147109
  const servers = settings.mcpServers;
147013
- if (!servers["claude-flow"]) {
147014
- servers["claude-flow"] = {
147110
+ if (!servers["ruflo"] && !servers["claude-flow"]) {
147111
+ servers["ruflo"] = {
147015
147112
  command: "npx",
147016
- args: ["@anthropic/claude-flow", "mcp"],
147113
+ args: ["ruflo@3.5.18", "mcp"],
147017
147114
  env: {}
147018
147115
  };
147019
147116
  }
@@ -147022,7 +147119,7 @@ function updateMCPConfig(projectRoot) {
147022
147119
  async function runPretrainAnalysis(projectRoot, debug) {
147023
147120
  try {
147024
147121
  if (debug) console.log("[ClaudeFlow] Running pretrain analysis...");
147025
- execSync7("npx --no-install @claude-flow/cli hooks pretrain --depth medium", {
147122
+ execSync7("npx --no-install ruflo hooks pretrain --depth medium", {
147026
147123
  encoding: "utf-8",
147027
147124
  timeout: 12e4,
147028
147125
  // 2 minutes
@@ -170052,7 +170149,7 @@ async function cleanupAndExit(code = 0) {
170052
170149
  process.exit(code);
170053
170150
  }
170054
170151
  var program = new Command22();
170055
- var VERSION = true ? "3.8.1" : "0.0.0-dev";
170152
+ var VERSION = true ? "3.8.2" : "0.0.0-dev";
170056
170153
  program.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(VERSION);
170057
170154
  var registry2 = createCommandRegistry(context, cleanupAndExit, ensureInitialized, ensureInitializedStrict);
170058
170155
  registry2.registerAll(program);
@@ -137,10 +137,10 @@ function updateMCPConfig(projectRoot) {
137
137
  }
138
138
  // Add claude-flow server if not present
139
139
  const servers = settings.mcpServers;
140
- if (!servers['claude-flow']) {
141
- servers['claude-flow'] = {
140
+ if (!servers['ruflo'] && !servers['claude-flow']) {
141
+ servers['ruflo'] = {
142
142
  command: 'npx',
143
- args: ['@anthropic/claude-flow', 'mcp'],
143
+ args: ['ruflo@3.5.18', 'mcp'],
144
144
  env: {},
145
145
  };
146
146
  }
@@ -155,7 +155,7 @@ async function runPretrainAnalysis(projectRoot, debug) {
155
155
  try {
156
156
  if (debug)
157
157
  console.log('[ClaudeFlow] Running pretrain analysis...');
158
- execSync('npx --no-install @claude-flow/cli hooks pretrain --depth medium', {
158
+ execSync('npx --no-install ruflo hooks pretrain --depth medium', {
159
159
  encoding: 'utf-8',
160
160
  timeout: 120000, // 2 minutes
161
161
  cwd: projectRoot,