agentic-qe 3.2.3 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/v3/qe-accessibility-auditor.md +90 -0
- package/README.md +43 -5
- package/package.json +3 -2
- package/scripts/cloud-db-config.json +37 -0
- package/scripts/cloud-db-connect.sh +37 -0
- package/scripts/cloud-db-tunnel.sh +23 -0
- package/v3/CHANGELOG.md +165 -0
- package/v3/README.md +59 -1
- package/v3/assets/agents/v3/qe-accessibility-auditor.md +90 -0
- package/v3/dist/adapters/claude-flow/index.d.ts +54 -0
- package/v3/dist/adapters/claude-flow/index.d.ts.map +1 -0
- package/v3/dist/adapters/claude-flow/index.js +79 -0
- package/v3/dist/adapters/claude-flow/index.js.map +1 -0
- package/v3/dist/adapters/claude-flow/model-router-bridge.d.ts +70 -0
- package/v3/dist/adapters/claude-flow/model-router-bridge.d.ts.map +1 -0
- package/v3/dist/adapters/claude-flow/model-router-bridge.js +203 -0
- package/v3/dist/adapters/claude-flow/model-router-bridge.js.map +1 -0
- package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts +73 -0
- package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts.map +1 -0
- package/v3/dist/adapters/claude-flow/pretrain-bridge.js +276 -0
- package/v3/dist/adapters/claude-flow/pretrain-bridge.js.map +1 -0
- package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts +70 -0
- package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts.map +1 -0
- package/v3/dist/adapters/claude-flow/trajectory-bridge.js +205 -0
- package/v3/dist/adapters/claude-flow/trajectory-bridge.js.map +1 -0
- package/v3/dist/adapters/claude-flow/types.d.ts +99 -0
- package/v3/dist/adapters/claude-flow/types.d.ts.map +1 -0
- package/v3/dist/adapters/claude-flow/types.js +6 -0
- package/v3/dist/adapters/claude-flow/types.js.map +1 -0
- package/v3/dist/causal-discovery/causal-graph.d.ts +80 -1
- package/v3/dist/causal-discovery/causal-graph.d.ts.map +1 -1
- package/v3/dist/causal-discovery/causal-graph.js +111 -1
- package/v3/dist/causal-discovery/causal-graph.js.map +1 -1
- package/v3/dist/cli/bundle.js +11612 -4929
- package/v3/dist/cli/commands/claude-flow-setup.d.ts +82 -0
- package/v3/dist/cli/commands/claude-flow-setup.d.ts.map +1 -0
- package/v3/dist/cli/commands/claude-flow-setup.js +334 -0
- package/v3/dist/cli/commands/claude-flow-setup.js.map +1 -0
- package/v3/dist/cli/commands/hooks.d.ts +2 -0
- package/v3/dist/cli/commands/hooks.d.ts.map +1 -1
- package/v3/dist/cli/commands/hooks.js +13 -2
- package/v3/dist/cli/commands/hooks.js.map +1 -1
- package/v3/dist/cli/commands/init.d.ts +19 -0
- package/v3/dist/cli/commands/init.d.ts.map +1 -0
- package/v3/dist/cli/commands/init.js +345 -0
- package/v3/dist/cli/commands/init.js.map +1 -0
- package/v3/dist/cli/index.js +110 -2
- package/v3/dist/cli/index.js.map +1 -1
- package/v3/dist/coordination/mincut/interfaces.d.ts +8 -2
- package/v3/dist/coordination/mincut/interfaces.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/interfaces.js.map +1 -1
- package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts +5 -0
- package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/mincut-health-monitor.js +22 -4
- package/v3/dist/coordination/mincut/mincut-health-monitor.js.map +1 -1
- package/v3/dist/coordination/mincut/queen-integration.d.ts +4 -0
- package/v3/dist/coordination/mincut/queen-integration.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/queen-integration.js +14 -1
- package/v3/dist/coordination/mincut/queen-integration.js.map +1 -1
- package/v3/dist/coordination/queen-coordinator.d.ts +5 -0
- package/v3/dist/coordination/queen-coordinator.d.ts.map +1 -1
- package/v3/dist/coordination/queen-coordinator.js +45 -7
- package/v3/dist/coordination/queen-coordinator.js.map +1 -1
- package/v3/dist/domains/learning-optimization/coordinator.d.ts +5 -0
- package/v3/dist/domains/learning-optimization/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/coordinator.js +79 -0
- package/v3/dist/domains/learning-optimization/coordinator.js.map +1 -1
- package/v3/dist/domains/test-generation/coherence-gate.d.ts +245 -0
- package/v3/dist/domains/test-generation/coherence-gate.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/coherence-gate.js +454 -0
- package/v3/dist/domains/test-generation/coherence-gate.js.map +1 -0
- package/v3/dist/domains/test-generation/coordinator.d.ts +32 -1
- package/v3/dist/domains/test-generation/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/coordinator.js +70 -1
- package/v3/dist/domains/test-generation/coordinator.js.map +1 -1
- package/v3/dist/domains/test-generation/index.d.ts +1 -0
- package/v3/dist/domains/test-generation/index.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/index.js +4 -0
- package/v3/dist/domains/test-generation/index.js.map +1 -1
- package/v3/dist/domains/test-generation/services/index.d.ts +1 -0
- package/v3/dist/domains/test-generation/services/index.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/services/index.js +2 -0
- package/v3/dist/domains/test-generation/services/index.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/index.d.ts +2 -1
- package/v3/dist/domains/visual-accessibility/index.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/index.js +1 -0
- package/v3/dist/domains/visual-accessibility/index.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/interfaces.d.ts +131 -0
- package/v3/dist/domains/visual-accessibility/interfaces.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/plugin.d.ts +26 -0
- package/v3/dist/domains/visual-accessibility/plugin.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/plugin.js +151 -0
- package/v3/dist/domains/visual-accessibility/plugin.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts +42 -1
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js +69 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/eu-compliance.d.ts +138 -0
- package/v3/dist/domains/visual-accessibility/services/eu-compliance.d.ts.map +1 -0
- package/v3/dist/domains/visual-accessibility/services/eu-compliance.js +830 -0
- package/v3/dist/domains/visual-accessibility/services/eu-compliance.js.map +1 -0
- package/v3/dist/domains/visual-accessibility/services/index.d.ts +1 -0
- package/v3/dist/domains/visual-accessibility/services/index.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/index.js +1 -0
- package/v3/dist/domains/visual-accessibility/services/index.js.map +1 -1
- package/v3/dist/init/enhancements/claude-flow-adapter.d.ts +84 -0
- package/v3/dist/init/enhancements/claude-flow-adapter.d.ts.map +1 -0
- package/v3/dist/init/enhancements/claude-flow-adapter.js +250 -0
- package/v3/dist/init/enhancements/claude-flow-adapter.js.map +1 -0
- package/v3/dist/init/enhancements/detector.d.ts +10 -0
- package/v3/dist/init/enhancements/detector.d.ts.map +1 -0
- package/v3/dist/init/enhancements/detector.js +87 -0
- package/v3/dist/init/enhancements/detector.js.map +1 -0
- package/v3/dist/init/enhancements/index.d.ts +13 -0
- package/v3/dist/init/enhancements/index.d.ts.map +1 -0
- package/v3/dist/init/enhancements/index.js +25 -0
- package/v3/dist/init/enhancements/index.js.map +1 -0
- package/v3/dist/init/enhancements/types.d.ts +93 -0
- package/v3/dist/init/enhancements/types.d.ts.map +1 -0
- package/v3/dist/init/enhancements/types.js +6 -0
- package/v3/dist/init/enhancements/types.js.map +1 -0
- package/v3/dist/init/index.d.ts +8 -0
- package/v3/dist/init/index.d.ts.map +1 -1
- package/v3/dist/init/index.js +4 -0
- package/v3/dist/init/index.js.map +1 -1
- package/v3/dist/init/migration/config-migrator.d.ts +31 -0
- package/v3/dist/init/migration/config-migrator.d.ts.map +1 -0
- package/v3/dist/init/migration/config-migrator.js +133 -0
- package/v3/dist/init/migration/config-migrator.js.map +1 -0
- package/v3/dist/init/migration/data-migrator.d.ts +72 -0
- package/v3/dist/init/migration/data-migrator.d.ts.map +1 -0
- package/v3/dist/init/migration/data-migrator.js +233 -0
- package/v3/dist/init/migration/data-migrator.js.map +1 -0
- package/v3/dist/init/migration/detector.d.ts +44 -0
- package/v3/dist/init/migration/detector.d.ts.map +1 -0
- package/v3/dist/init/migration/detector.js +106 -0
- package/v3/dist/init/migration/detector.js.map +1 -0
- package/v3/dist/init/migration/index.d.ts +8 -0
- package/v3/dist/init/migration/index.d.ts.map +1 -0
- package/v3/dist/init/migration/index.js +8 -0
- package/v3/dist/init/migration/index.js.map +1 -0
- package/v3/dist/init/orchestrator.d.ts +68 -0
- package/v3/dist/init/orchestrator.d.ts.map +1 -0
- package/v3/dist/init/orchestrator.js +239 -0
- package/v3/dist/init/orchestrator.js.map +1 -0
- package/v3/dist/init/phases/01-detection.d.ts +30 -0
- package/v3/dist/init/phases/01-detection.d.ts.map +1 -0
- package/v3/dist/init/phases/01-detection.js +143 -0
- package/v3/dist/init/phases/01-detection.js.map +1 -0
- package/v3/dist/init/phases/02-analysis.d.ts +18 -0
- package/v3/dist/init/phases/02-analysis.d.ts.map +1 -0
- package/v3/dist/init/phases/02-analysis.js +28 -0
- package/v3/dist/init/phases/02-analysis.js.map +1 -0
- package/v3/dist/init/phases/03-configuration.d.ts +26 -0
- package/v3/dist/init/phases/03-configuration.d.ts.map +1 -0
- package/v3/dist/init/phases/03-configuration.js +98 -0
- package/v3/dist/init/phases/03-configuration.js.map +1 -0
- package/v3/dist/init/phases/04-database.d.ts +22 -0
- package/v3/dist/init/phases/04-database.d.ts.map +1 -0
- package/v3/dist/init/phases/04-database.js +88 -0
- package/v3/dist/init/phases/04-database.js.map +1 -0
- package/v3/dist/init/phases/05-learning.d.ts +28 -0
- package/v3/dist/init/phases/05-learning.d.ts.map +1 -0
- package/v3/dist/init/phases/05-learning.js +98 -0
- package/v3/dist/init/phases/05-learning.js.map +1 -0
- package/v3/dist/init/phases/06-code-intelligence.d.ts +33 -0
- package/v3/dist/init/phases/06-code-intelligence.d.ts.map +1 -0
- package/v3/dist/init/phases/06-code-intelligence.js +115 -0
- package/v3/dist/init/phases/06-code-intelligence.js.map +1 -0
- package/v3/dist/init/phases/07-hooks.d.ts +27 -0
- package/v3/dist/init/phases/07-hooks.d.ts.map +1 -0
- package/v3/dist/init/phases/07-hooks.js +209 -0
- package/v3/dist/init/phases/07-hooks.js.map +1 -0
- package/v3/dist/init/phases/08-mcp.d.ts +22 -0
- package/v3/dist/init/phases/08-mcp.d.ts.map +1 -0
- package/v3/dist/init/phases/08-mcp.js +62 -0
- package/v3/dist/init/phases/08-mcp.js.map +1 -0
- package/v3/dist/init/phases/09-assets.d.ts +23 -0
- package/v3/dist/init/phases/09-assets.d.ts.map +1 -0
- package/v3/dist/init/phases/09-assets.js +82 -0
- package/v3/dist/init/phases/09-assets.js.map +1 -0
- package/v3/dist/init/phases/10-workers.d.ts +23 -0
- package/v3/dist/init/phases/10-workers.d.ts.map +1 -0
- package/v3/dist/init/phases/10-workers.js +111 -0
- package/v3/dist/init/phases/10-workers.js.map +1 -0
- package/v3/dist/init/phases/11-claude-md.d.ts +26 -0
- package/v3/dist/init/phases/11-claude-md.d.ts.map +1 -0
- package/v3/dist/init/phases/11-claude-md.js +121 -0
- package/v3/dist/init/phases/11-claude-md.js.map +1 -0
- package/v3/dist/init/phases/12-verification.d.ts +38 -0
- package/v3/dist/init/phases/12-verification.d.ts.map +1 -0
- package/v3/dist/init/phases/12-verification.js +187 -0
- package/v3/dist/init/phases/12-verification.js.map +1 -0
- package/v3/dist/init/phases/index.d.ts +46 -0
- package/v3/dist/init/phases/index.d.ts.map +1 -0
- package/v3/dist/init/phases/index.js +64 -0
- package/v3/dist/init/phases/index.js.map +1 -0
- package/v3/dist/init/phases/phase-interface.d.ts +193 -0
- package/v3/dist/init/phases/phase-interface.d.ts.map +1 -0
- package/v3/dist/init/phases/phase-interface.js +119 -0
- package/v3/dist/init/phases/phase-interface.js.map +1 -0
- package/v3/dist/integrations/coherence/coherence-service.d.ts +323 -0
- package/v3/dist/integrations/coherence/coherence-service.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/coherence-service.js +799 -0
- package/v3/dist/integrations/coherence/coherence-service.js.map +1 -0
- package/v3/dist/integrations/coherence/engines/category-adapter.d.ts +170 -0
- package/v3/dist/integrations/coherence/engines/category-adapter.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/engines/category-adapter.js +403 -0
- package/v3/dist/integrations/coherence/engines/category-adapter.js.map +1 -0
- package/v3/dist/integrations/coherence/engines/causal-adapter.d.ts +159 -0
- package/v3/dist/integrations/coherence/engines/causal-adapter.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/engines/causal-adapter.js +348 -0
- package/v3/dist/integrations/coherence/engines/causal-adapter.js.map +1 -0
- package/v3/dist/integrations/coherence/engines/cohomology-adapter.d.ts +174 -0
- package/v3/dist/integrations/coherence/engines/cohomology-adapter.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/engines/cohomology-adapter.js +401 -0
- package/v3/dist/integrations/coherence/engines/cohomology-adapter.js.map +1 -0
- package/v3/dist/integrations/coherence/engines/homotopy-adapter.d.ts +201 -0
- package/v3/dist/integrations/coherence/engines/homotopy-adapter.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/engines/homotopy-adapter.js +324 -0
- package/v3/dist/integrations/coherence/engines/homotopy-adapter.js.map +1 -0
- package/v3/dist/integrations/coherence/engines/index.d.ts +20 -0
- package/v3/dist/integrations/coherence/engines/index.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/engines/index.js +26 -0
- package/v3/dist/integrations/coherence/engines/index.js.map +1 -0
- package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts +193 -0
- package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/engines/spectral-adapter.js +476 -0
- package/v3/dist/integrations/coherence/engines/spectral-adapter.js.map +1 -0
- package/v3/dist/integrations/coherence/engines/witness-adapter.d.ts +175 -0
- package/v3/dist/integrations/coherence/engines/witness-adapter.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/engines/witness-adapter.js +377 -0
- package/v3/dist/integrations/coherence/engines/witness-adapter.js.map +1 -0
- package/v3/dist/integrations/coherence/index.d.ts +84 -0
- package/v3/dist/integrations/coherence/index.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/index.js +114 -0
- package/v3/dist/integrations/coherence/index.js.map +1 -0
- package/v3/dist/integrations/coherence/threshold-tuner.d.ts +396 -0
- package/v3/dist/integrations/coherence/threshold-tuner.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/threshold-tuner.js +538 -0
- package/v3/dist/integrations/coherence/threshold-tuner.js.map +1 -0
- package/v3/dist/integrations/coherence/types.d.ts +879 -0
- package/v3/dist/integrations/coherence/types.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/types.js +134 -0
- package/v3/dist/integrations/coherence/types.js.map +1 -0
- package/v3/dist/integrations/coherence/wasm-loader.d.ts +351 -0
- package/v3/dist/integrations/coherence/wasm-loader.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/wasm-loader.js +842 -0
- package/v3/dist/integrations/coherence/wasm-loader.js.map +1 -0
- package/v3/dist/integrations/embeddings/index/HNSWIndex.d.ts.map +1 -1
- package/v3/dist/integrations/embeddings/index/HNSWIndex.js +4 -1
- package/v3/dist/integrations/embeddings/index/HNSWIndex.js.map +1 -1
- package/v3/dist/kernel/interfaces.d.ts +8 -1
- package/v3/dist/kernel/interfaces.d.ts.map +1 -1
- package/v3/dist/learning/aqe-learning-engine.d.ts +272 -0
- package/v3/dist/learning/aqe-learning-engine.d.ts.map +1 -0
- package/v3/dist/learning/aqe-learning-engine.js +708 -0
- package/v3/dist/learning/aqe-learning-engine.js.map +1 -0
- package/v3/dist/learning/causal-verifier.d.ts +244 -0
- package/v3/dist/learning/causal-verifier.d.ts.map +1 -0
- package/v3/dist/learning/causal-verifier.js +300 -0
- package/v3/dist/learning/causal-verifier.js.map +1 -0
- package/v3/dist/learning/experience-capture.d.ts +266 -0
- package/v3/dist/learning/experience-capture.d.ts.map +1 -0
- package/v3/dist/learning/experience-capture.js +647 -0
- package/v3/dist/learning/experience-capture.js.map +1 -0
- package/v3/dist/learning/index.d.ts +8 -0
- package/v3/dist/learning/index.d.ts.map +1 -1
- package/v3/dist/learning/index.js +16 -0
- package/v3/dist/learning/index.js.map +1 -1
- package/v3/dist/learning/memory-auditor.d.ts +235 -0
- package/v3/dist/learning/memory-auditor.d.ts.map +1 -0
- package/v3/dist/learning/memory-auditor.js +478 -0
- package/v3/dist/learning/memory-auditor.js.map +1 -0
- package/v3/dist/learning/pattern-store.d.ts.map +1 -1
- package/v3/dist/learning/pattern-store.js +27 -6
- package/v3/dist/learning/pattern-store.js.map +1 -1
- package/v3/dist/learning/qe-patterns.d.ts +15 -1
- package/v3/dist/learning/qe-patterns.d.ts.map +1 -1
- package/v3/dist/learning/qe-patterns.js +26 -5
- package/v3/dist/learning/qe-patterns.js.map +1 -1
- package/v3/dist/learning/qe-reasoning-bank.d.ts +38 -2
- package/v3/dist/learning/qe-reasoning-bank.d.ts.map +1 -1
- package/v3/dist/learning/qe-reasoning-bank.js +86 -4
- package/v3/dist/learning/qe-reasoning-bank.js.map +1 -1
- package/v3/dist/learning/real-qe-reasoning-bank.d.ts +32 -2
- package/v3/dist/learning/real-qe-reasoning-bank.d.ts.map +1 -1
- package/v3/dist/learning/real-qe-reasoning-bank.js +61 -6
- package/v3/dist/learning/real-qe-reasoning-bank.js.map +1 -1
- package/v3/dist/mcp/bundle.js +6303 -266
- package/v3/dist/mcp/tools/coherence/audit.d.ts +107 -0
- package/v3/dist/mcp/tools/coherence/audit.d.ts.map +1 -0
- package/v3/dist/mcp/tools/coherence/audit.js +236 -0
- package/v3/dist/mcp/tools/coherence/audit.js.map +1 -0
- package/v3/dist/mcp/tools/coherence/check.d.ts +106 -0
- package/v3/dist/mcp/tools/coherence/check.d.ts.map +1 -0
- package/v3/dist/mcp/tools/coherence/check.js +205 -0
- package/v3/dist/mcp/tools/coherence/check.js.map +1 -0
- package/v3/dist/mcp/tools/coherence/collapse.d.ts +123 -0
- package/v3/dist/mcp/tools/coherence/collapse.d.ts.map +1 -0
- package/v3/dist/mcp/tools/coherence/collapse.js +279 -0
- package/v3/dist/mcp/tools/coherence/collapse.js.map +1 -0
- package/v3/dist/mcp/tools/coherence/consensus.d.ts +100 -0
- package/v3/dist/mcp/tools/coherence/consensus.d.ts.map +1 -0
- package/v3/dist/mcp/tools/coherence/consensus.js +201 -0
- package/v3/dist/mcp/tools/coherence/consensus.js.map +1 -0
- package/v3/dist/mcp/tools/coherence/index.d.ts +31 -0
- package/v3/dist/mcp/tools/coherence/index.d.ts.map +1 -0
- package/v3/dist/mcp/tools/coherence/index.js +42 -0
- package/v3/dist/mcp/tools/coherence/index.js.map +1 -0
- package/v3/dist/mcp/tools/index.d.ts +6 -1
- package/v3/dist/mcp/tools/index.d.ts.map +1 -1
- package/v3/dist/mcp/tools/index.js +9 -1
- package/v3/dist/mcp/tools/index.js.map +1 -1
- package/v3/dist/mcp/tools/mincut/index.d.ts +1 -1
- package/v3/dist/mcp/tools/mincut/index.d.ts.map +1 -1
- package/v3/dist/mcp/tools/mincut/index.js.map +1 -1
- package/v3/dist/mcp/tools/registry.d.ts +4 -0
- package/v3/dist/mcp/tools/registry.d.ts.map +1 -1
- package/v3/dist/mcp/tools/registry.js +5 -0
- package/v3/dist/mcp/tools/registry.js.map +1 -1
- package/v3/dist/mcp/types.d.ts +1 -1
- package/v3/dist/mcp/types.d.ts.map +1 -1
- package/v3/dist/strange-loop/belief-reconciler.d.ts +357 -0
- package/v3/dist/strange-loop/belief-reconciler.d.ts.map +1 -0
- package/v3/dist/strange-loop/belief-reconciler.js +696 -0
- package/v3/dist/strange-loop/belief-reconciler.js.map +1 -0
- package/v3/dist/strange-loop/index.d.ts +1 -0
- package/v3/dist/strange-loop/index.d.ts.map +1 -1
- package/v3/dist/strange-loop/index.js +2 -0
- package/v3/dist/strange-loop/index.js.map +1 -1
- package/v3/dist/strange-loop/strange-loop.d.ts +177 -5
- package/v3/dist/strange-loop/strange-loop.d.ts.map +1 -1
- package/v3/dist/strange-loop/strange-loop.js +452 -9
- package/v3/dist/strange-loop/strange-loop.js.map +1 -1
- package/v3/dist/strange-loop/types.d.ts +205 -1
- package/v3/dist/strange-loop/types.d.ts.map +1 -1
- package/v3/dist/strange-loop/types.js +5 -0
- package/v3/dist/strange-loop/types.js.map +1 -1
- package/v3/package.json +5 -1
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic QE v3 - Test Generation Coherence Gate
|
|
3
|
+
* ADR-052: Coherence verification before test generation
|
|
4
|
+
*
|
|
5
|
+
* Verifies requirement coherence using Prime Radiant mathematical gates
|
|
6
|
+
* before allowing test generation to proceed.
|
|
7
|
+
*
|
|
8
|
+
* @module domains/test-generation/coherence-gate
|
|
9
|
+
*/
|
|
10
|
+
import { ok, err } from '../../shared/types/index.js';
|
|
11
|
+
/**
|
|
12
|
+
* Default configuration
|
|
13
|
+
*/
|
|
14
|
+
export const DEFAULT_COHERENCE_GATE_CONFIG = {
|
|
15
|
+
enabled: true,
|
|
16
|
+
coherenceThreshold: 0.1,
|
|
17
|
+
blockOnHumanLane: true,
|
|
18
|
+
enrichOnRetrievalLane: true,
|
|
19
|
+
embeddingDimension: 384,
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Error thrown when requirements have unresolvable contradictions
|
|
23
|
+
*/
|
|
24
|
+
export class CoherenceError extends Error {
|
|
25
|
+
contradictions;
|
|
26
|
+
lane;
|
|
27
|
+
constructor(message, contradictions, lane) {
|
|
28
|
+
super(message);
|
|
29
|
+
this.contradictions = contradictions;
|
|
30
|
+
this.lane = lane;
|
|
31
|
+
this.name = 'CoherenceError';
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Simple fallback embedding service using character-based hashing
|
|
36
|
+
* Used when no embedding service is provided
|
|
37
|
+
*/
|
|
38
|
+
class FallbackEmbeddingService {
|
|
39
|
+
dimension;
|
|
40
|
+
constructor(dimension = 384) {
|
|
41
|
+
this.dimension = dimension;
|
|
42
|
+
}
|
|
43
|
+
async embed(text) {
|
|
44
|
+
const embedding = new Array(this.dimension).fill(0);
|
|
45
|
+
const normalized = text.toLowerCase().trim();
|
|
46
|
+
// Simple character-based embedding with positional encoding
|
|
47
|
+
for (let i = 0; i < normalized.length; i++) {
|
|
48
|
+
const charCode = normalized.charCodeAt(i);
|
|
49
|
+
const position = i % this.dimension;
|
|
50
|
+
embedding[position] += Math.sin(charCode * (i + 1) * 0.1);
|
|
51
|
+
embedding[(position + 1) % this.dimension] += Math.cos(charCode * (i + 1) * 0.1);
|
|
52
|
+
}
|
|
53
|
+
// Normalize to unit vector
|
|
54
|
+
const magnitude = Math.sqrt(embedding.reduce((sum, val) => sum + val * val, 0));
|
|
55
|
+
if (magnitude > 0) {
|
|
56
|
+
for (let i = 0; i < embedding.length; i++) {
|
|
57
|
+
embedding[i] /= magnitude;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return embedding;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// ============================================================================
|
|
64
|
+
// Test Generation Coherence Gate Implementation
|
|
65
|
+
// ============================================================================
|
|
66
|
+
/**
|
|
67
|
+
* Test Generation Coherence Gate
|
|
68
|
+
*
|
|
69
|
+
* Verifies requirement coherence before allowing test generation.
|
|
70
|
+
* Per ADR-052, this gate uses Prime Radiant mathematical coherence
|
|
71
|
+
* checking to detect contradictions and route to appropriate compute lanes.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```typescript
|
|
75
|
+
* const gate = new TestGenerationCoherenceGate(coherenceService);
|
|
76
|
+
*
|
|
77
|
+
* const result = await gate.checkRequirementCoherence(spec.requirements);
|
|
78
|
+
*
|
|
79
|
+
* if (result.lane === 'human') {
|
|
80
|
+
* throw new CoherenceError('Requirements contain unresolvable contradictions', result.contradictions);
|
|
81
|
+
* }
|
|
82
|
+
*
|
|
83
|
+
* if (result.lane === 'retrieval') {
|
|
84
|
+
* spec = await gate.enrichSpecification(spec, result.recommendations);
|
|
85
|
+
* }
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export class TestGenerationCoherenceGate {
|
|
89
|
+
coherenceService;
|
|
90
|
+
config;
|
|
91
|
+
embeddingService;
|
|
92
|
+
constructor(coherenceService, embeddingService, config = {}) {
|
|
93
|
+
this.coherenceService = coherenceService;
|
|
94
|
+
this.config = { ...DEFAULT_COHERENCE_GATE_CONFIG, ...config };
|
|
95
|
+
this.embeddingService = embeddingService || new FallbackEmbeddingService(this.config.embeddingDimension);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Check coherence of requirements
|
|
99
|
+
*
|
|
100
|
+
* @param requirements - Array of requirements to check
|
|
101
|
+
* @returns Coherence result with lane recommendation
|
|
102
|
+
*/
|
|
103
|
+
async checkRequirementCoherence(requirements) {
|
|
104
|
+
const startTime = Date.now();
|
|
105
|
+
// If coherence checking is disabled or no service, return coherent
|
|
106
|
+
if (!this.config.enabled || !this.coherenceService) {
|
|
107
|
+
return this.createPassingResult(startTime, true);
|
|
108
|
+
}
|
|
109
|
+
// Handle edge cases
|
|
110
|
+
if (requirements.length === 0) {
|
|
111
|
+
return this.createPassingResult(startTime, false);
|
|
112
|
+
}
|
|
113
|
+
if (requirements.length === 1) {
|
|
114
|
+
// Single requirement is always coherent with itself
|
|
115
|
+
return this.createPassingResult(startTime, false);
|
|
116
|
+
}
|
|
117
|
+
try {
|
|
118
|
+
// Convert requirements to coherence nodes
|
|
119
|
+
const nodes = await this.requirementsToNodes(requirements);
|
|
120
|
+
// Check coherence using the service
|
|
121
|
+
const coherenceResult = await this.coherenceService.checkCoherence(nodes);
|
|
122
|
+
// Convert result to requirement-specific format
|
|
123
|
+
return this.transformCoherenceResult(coherenceResult, requirements, Date.now() - startTime);
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
console.error('[TestGenerationCoherenceGate] Coherence check failed:', error);
|
|
127
|
+
// Return fallback result - don't block on errors
|
|
128
|
+
return {
|
|
129
|
+
isCoherent: true,
|
|
130
|
+
energy: 0,
|
|
131
|
+
lane: 'reflex',
|
|
132
|
+
contradictions: [],
|
|
133
|
+
recommendations: [{
|
|
134
|
+
type: 'add-context',
|
|
135
|
+
requirementId: '',
|
|
136
|
+
description: 'Coherence check failed. Manual review recommended.',
|
|
137
|
+
suggestedResolution: 'Review requirements manually before proceeding.',
|
|
138
|
+
}],
|
|
139
|
+
durationMs: Date.now() - startTime,
|
|
140
|
+
usedFallback: true,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Enrich a test specification based on coherence recommendations
|
|
146
|
+
*
|
|
147
|
+
* @param spec - Original test specification
|
|
148
|
+
* @param recommendations - Recommendations from coherence check
|
|
149
|
+
* @returns Enriched specification
|
|
150
|
+
*/
|
|
151
|
+
async enrichSpecification(spec, recommendations) {
|
|
152
|
+
if (recommendations.length === 0) {
|
|
153
|
+
return spec;
|
|
154
|
+
}
|
|
155
|
+
// Create a deep copy of the specification
|
|
156
|
+
const enrichedSpec = {
|
|
157
|
+
...spec,
|
|
158
|
+
requirements: [...spec.requirements],
|
|
159
|
+
context: { ...spec.context },
|
|
160
|
+
};
|
|
161
|
+
// Track which requirements need updates
|
|
162
|
+
const requirementUpdates = new Map();
|
|
163
|
+
for (const rec of recommendations) {
|
|
164
|
+
switch (rec.type) {
|
|
165
|
+
case 'clarify':
|
|
166
|
+
// Add clarification note to requirement metadata
|
|
167
|
+
this.addClarificationNote(requirementUpdates, rec);
|
|
168
|
+
break;
|
|
169
|
+
case 'add-context':
|
|
170
|
+
// Add context to the specification
|
|
171
|
+
enrichedSpec.context = {
|
|
172
|
+
...enrichedSpec.context,
|
|
173
|
+
coherenceRecommendations: [
|
|
174
|
+
...(enrichedSpec.context?.coherenceRecommendations || []),
|
|
175
|
+
rec.description,
|
|
176
|
+
],
|
|
177
|
+
};
|
|
178
|
+
break;
|
|
179
|
+
case 'resolve-ambiguity':
|
|
180
|
+
// Add disambiguation note
|
|
181
|
+
this.addDisambiguationNote(requirementUpdates, rec);
|
|
182
|
+
break;
|
|
183
|
+
case 'split-requirement':
|
|
184
|
+
// Mark requirement for potential splitting
|
|
185
|
+
enrichedSpec.context = {
|
|
186
|
+
...enrichedSpec.context,
|
|
187
|
+
requirementsSuggestedForSplit: [
|
|
188
|
+
...(enrichedSpec.context?.requirementsSuggestedForSplit || []),
|
|
189
|
+
rec.requirementId,
|
|
190
|
+
],
|
|
191
|
+
};
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
// Apply requirement updates
|
|
196
|
+
enrichedSpec.requirements = enrichedSpec.requirements.map(req => {
|
|
197
|
+
const updates = requirementUpdates.get(req.id);
|
|
198
|
+
if (updates) {
|
|
199
|
+
return {
|
|
200
|
+
...req,
|
|
201
|
+
metadata: {
|
|
202
|
+
...req.metadata,
|
|
203
|
+
...updates.metadata,
|
|
204
|
+
},
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
return req;
|
|
208
|
+
});
|
|
209
|
+
// Add enrichment metadata
|
|
210
|
+
enrichedSpec.context = {
|
|
211
|
+
...enrichedSpec.context,
|
|
212
|
+
enrichedAt: new Date().toISOString(),
|
|
213
|
+
enrichmentCount: recommendations.length,
|
|
214
|
+
};
|
|
215
|
+
return enrichedSpec;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Validate requirements before test generation
|
|
219
|
+
*
|
|
220
|
+
* Convenience method that combines coherence check with automatic
|
|
221
|
+
* enrichment and error handling per ADR-052 specification.
|
|
222
|
+
*
|
|
223
|
+
* @param spec - Test specification to validate
|
|
224
|
+
* @returns Validated (and possibly enriched) specification
|
|
225
|
+
* @throws CoherenceError if requirements have unresolvable contradictions
|
|
226
|
+
*/
|
|
227
|
+
async validateAndEnrich(spec) {
|
|
228
|
+
const coherenceResult = await this.checkRequirementCoherence(spec.requirements);
|
|
229
|
+
// Human lane = unresolvable contradictions, block generation
|
|
230
|
+
if (this.config.blockOnHumanLane && coherenceResult.lane === 'human') {
|
|
231
|
+
return err(new CoherenceError('Requirements contain unresolvable contradictions that require human review', coherenceResult.contradictions, coherenceResult.lane));
|
|
232
|
+
}
|
|
233
|
+
// Retrieval lane = needs enrichment
|
|
234
|
+
if (this.config.enrichOnRetrievalLane && coherenceResult.lane === 'retrieval') {
|
|
235
|
+
const enrichedSpec = await this.enrichSpecification(spec, coherenceResult.recommendations);
|
|
236
|
+
return ok(enrichedSpec);
|
|
237
|
+
}
|
|
238
|
+
// Reflex or heavy lane = proceed with original spec
|
|
239
|
+
return ok(spec);
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Check if the gate is available (coherence service is initialized)
|
|
243
|
+
*/
|
|
244
|
+
isAvailable() {
|
|
245
|
+
return this.coherenceService?.isInitialized() ?? false;
|
|
246
|
+
}
|
|
247
|
+
// ============================================================================
|
|
248
|
+
// Private Methods
|
|
249
|
+
// ============================================================================
|
|
250
|
+
/**
|
|
251
|
+
* Convert requirements to coherence nodes
|
|
252
|
+
*/
|
|
253
|
+
async requirementsToNodes(requirements) {
|
|
254
|
+
const nodes = [];
|
|
255
|
+
for (const req of requirements) {
|
|
256
|
+
const embedding = await this.embeddingService.embed(req.description);
|
|
257
|
+
nodes.push({
|
|
258
|
+
id: req.id,
|
|
259
|
+
embedding,
|
|
260
|
+
weight: this.priorityToWeight(req.priority),
|
|
261
|
+
metadata: {
|
|
262
|
+
description: req.description,
|
|
263
|
+
source: req.source,
|
|
264
|
+
...req.metadata,
|
|
265
|
+
},
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
return nodes;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Transform coherence result to requirement-specific format
|
|
272
|
+
*/
|
|
273
|
+
transformCoherenceResult(result, requirements, durationMs) {
|
|
274
|
+
// Create requirement ID lookup
|
|
275
|
+
const reqById = new Map(requirements.map(r => [r.id, r]));
|
|
276
|
+
// Transform contradictions
|
|
277
|
+
const contradictions = result.contradictions.map(c => ({
|
|
278
|
+
requirementId1: c.nodeIds[0],
|
|
279
|
+
requirementId2: c.nodeIds[1],
|
|
280
|
+
severity: this.mapSeverity(c.severity),
|
|
281
|
+
description: c.description,
|
|
282
|
+
confidence: c.confidence,
|
|
283
|
+
suggestedResolution: c.resolution || this.generateResolutionSuggestion(reqById.get(c.nodeIds[0]), reqById.get(c.nodeIds[1]), c.severity),
|
|
284
|
+
}));
|
|
285
|
+
// Generate enrichment recommendations
|
|
286
|
+
const recommendations = this.generateRecommendations(result, contradictions, requirements);
|
|
287
|
+
return {
|
|
288
|
+
isCoherent: result.isCoherent,
|
|
289
|
+
energy: result.energy,
|
|
290
|
+
lane: result.lane,
|
|
291
|
+
contradictions,
|
|
292
|
+
recommendations,
|
|
293
|
+
durationMs,
|
|
294
|
+
usedFallback: result.usedFallback,
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Generate enrichment recommendations based on coherence result
|
|
299
|
+
*/
|
|
300
|
+
generateRecommendations(result, contradictions, requirements) {
|
|
301
|
+
const recommendations = [];
|
|
302
|
+
// Add recommendations from coherence service
|
|
303
|
+
for (const rec of result.recommendations) {
|
|
304
|
+
recommendations.push({
|
|
305
|
+
type: 'add-context',
|
|
306
|
+
requirementId: '',
|
|
307
|
+
description: rec,
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
// Add specific recommendations for contradictions
|
|
311
|
+
for (const contradiction of contradictions) {
|
|
312
|
+
if (contradiction.severity === 'critical' || contradiction.severity === 'high') {
|
|
313
|
+
recommendations.push({
|
|
314
|
+
type: 'resolve-ambiguity',
|
|
315
|
+
requirementId: contradiction.requirementId1,
|
|
316
|
+
description: `Potential conflict with requirement ${contradiction.requirementId2}: ${contradiction.description}`,
|
|
317
|
+
suggestedResolution: contradiction.suggestedResolution,
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
recommendations.push({
|
|
322
|
+
type: 'clarify',
|
|
323
|
+
requirementId: contradiction.requirementId1,
|
|
324
|
+
description: `Minor tension with requirement ${contradiction.requirementId2}: ${contradiction.description}`,
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
// Check for requirements that might need splitting
|
|
329
|
+
const complexRequirements = requirements.filter(r => r.description.length > 200 ||
|
|
330
|
+
r.description.includes(' and ') && r.description.includes(' or '));
|
|
331
|
+
for (const req of complexRequirements) {
|
|
332
|
+
recommendations.push({
|
|
333
|
+
type: 'split-requirement',
|
|
334
|
+
requirementId: req.id,
|
|
335
|
+
description: 'Complex requirement may benefit from splitting into smaller, focused requirements',
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
return recommendations;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Generate a resolution suggestion for a contradiction
|
|
342
|
+
*/
|
|
343
|
+
generateResolutionSuggestion(req1, req2, severity) {
|
|
344
|
+
if (!req1 || !req2) {
|
|
345
|
+
return 'Review and reconcile conflicting requirements.';
|
|
346
|
+
}
|
|
347
|
+
if (severity === 'critical') {
|
|
348
|
+
return `Requirements "${req1.id}" and "${req2.id}" appear to be mutually exclusive. ` +
|
|
349
|
+
`Consider removing one or explicitly documenting the conditions under which each applies.`;
|
|
350
|
+
}
|
|
351
|
+
if (severity === 'high') {
|
|
352
|
+
return `Requirements "${req1.id}" and "${req2.id}" may conflict. ` +
|
|
353
|
+
`Add clarification about their relationship and precedence.`;
|
|
354
|
+
}
|
|
355
|
+
return `Minor tension between "${req1.id}" and "${req2.id}". ` +
|
|
356
|
+
`Consider adding context to clarify their relationship.`;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Create a passing coherence result
|
|
360
|
+
*/
|
|
361
|
+
createPassingResult(startTime, usedFallback) {
|
|
362
|
+
return {
|
|
363
|
+
isCoherent: true,
|
|
364
|
+
energy: 0,
|
|
365
|
+
lane: 'reflex',
|
|
366
|
+
contradictions: [],
|
|
367
|
+
recommendations: [],
|
|
368
|
+
durationMs: Date.now() - startTime,
|
|
369
|
+
usedFallback,
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Convert priority to weight
|
|
374
|
+
*/
|
|
375
|
+
priorityToWeight(priority) {
|
|
376
|
+
switch (priority) {
|
|
377
|
+
case 'high': return 1.0;
|
|
378
|
+
case 'medium': return 0.7;
|
|
379
|
+
case 'low': return 0.4;
|
|
380
|
+
default: return 0.5;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Map Severity type to ContradictionSeverity
|
|
385
|
+
* Coherence Severity includes 'info' which we map to 'low'
|
|
386
|
+
*/
|
|
387
|
+
mapSeverity(severity) {
|
|
388
|
+
switch (severity) {
|
|
389
|
+
case 'critical': return 'critical';
|
|
390
|
+
case 'high': return 'high';
|
|
391
|
+
case 'medium': return 'medium';
|
|
392
|
+
case 'low':
|
|
393
|
+
case 'info':
|
|
394
|
+
default: return 'low';
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Add clarification note to requirement updates
|
|
399
|
+
*/
|
|
400
|
+
addClarificationNote(updates, rec) {
|
|
401
|
+
const existing = updates.get(rec.requirementId) || { metadata: {} };
|
|
402
|
+
const notes = existing.metadata?.clarificationNotes || [];
|
|
403
|
+
notes.push(rec.description);
|
|
404
|
+
updates.set(rec.requirementId, {
|
|
405
|
+
...existing,
|
|
406
|
+
metadata: {
|
|
407
|
+
...existing.metadata,
|
|
408
|
+
clarificationNotes: notes,
|
|
409
|
+
needsClarification: true,
|
|
410
|
+
},
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Add disambiguation note to requirement updates
|
|
415
|
+
*/
|
|
416
|
+
addDisambiguationNote(updates, rec) {
|
|
417
|
+
const existing = updates.get(rec.requirementId) || { metadata: {} };
|
|
418
|
+
const notes = existing.metadata?.disambiguationNotes || [];
|
|
419
|
+
notes.push(rec.description);
|
|
420
|
+
updates.set(rec.requirementId, {
|
|
421
|
+
...existing,
|
|
422
|
+
metadata: {
|
|
423
|
+
...existing.metadata,
|
|
424
|
+
disambiguationNotes: notes,
|
|
425
|
+
needsDisambiguation: true,
|
|
426
|
+
suggestedResolution: rec.suggestedResolution,
|
|
427
|
+
},
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
// ============================================================================
|
|
432
|
+
// Factory Function
|
|
433
|
+
// ============================================================================
|
|
434
|
+
/**
|
|
435
|
+
* Create a TestGenerationCoherenceGate
|
|
436
|
+
*
|
|
437
|
+
* @param coherenceService - Optional coherence service (can be null for disabled mode)
|
|
438
|
+
* @param embeddingService - Optional embedding service
|
|
439
|
+
* @param config - Optional configuration
|
|
440
|
+
* @returns Configured coherence gate
|
|
441
|
+
*
|
|
442
|
+
* @example
|
|
443
|
+
* ```typescript
|
|
444
|
+
* // With coherence service
|
|
445
|
+
* const gate = createTestGenerationCoherenceGate(coherenceService);
|
|
446
|
+
*
|
|
447
|
+
* // Disabled mode (no blocking)
|
|
448
|
+
* const disabledGate = createTestGenerationCoherenceGate(null, null, { enabled: false });
|
|
449
|
+
* ```
|
|
450
|
+
*/
|
|
451
|
+
export function createTestGenerationCoherenceGate(coherenceService, embeddingService, config) {
|
|
452
|
+
return new TestGenerationCoherenceGate(coherenceService, embeddingService, config);
|
|
453
|
+
}
|
|
454
|
+
//# sourceMappingURL=coherence-gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coherence-gate.js","sourceRoot":"","sources":["../../../src/domains/test-generation/coherence-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAU,EAAE,EAAE,G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nD,OAAO,IAAI,2BAA2B,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;AACrF,CAAC"}
|
|
@@ -12,6 +12,8 @@ import { EventBus, MemoryBackend, AgentCoordinator } from '../../kernel/interfac
|
|
|
12
12
|
import { GenerateTestsRequest, GeneratedTests, TDDRequest, TDDResult, PropertyTestRequest, PropertyTests, TestDataRequest, TestData, LearnPatternsRequest, LearnedPatterns, TestGenerationAPI } from './interfaces';
|
|
13
13
|
import { type QEPatternType, type QESONAStats } from '../../integrations/ruvector/wrappers.js';
|
|
14
14
|
import { type QEWorkloadType, type QEFlashAttentionMetrics } from '../../integrations/ruvector/wrappers.js';
|
|
15
|
+
import { type Requirement, type RequirementCoherenceResult } from './coherence-gate.js';
|
|
16
|
+
import type { ICoherenceService } from '../../integrations/coherence/coherence-service.js';
|
|
15
17
|
/**
|
|
16
18
|
* Interface for the test generation coordinator
|
|
17
19
|
*/
|
|
@@ -21,6 +23,8 @@ export interface ITestGenerationCoordinator extends TestGenerationAPI {
|
|
|
21
23
|
getActiveWorkflows(): WorkflowStatus[];
|
|
22
24
|
getQESONAStats(): QESONAStats | null;
|
|
23
25
|
getFlashAttentionMetrics(): QEFlashAttentionMetrics[] | null;
|
|
26
|
+
checkRequirementCoherence(requirements: Requirement[]): Promise<RequirementCoherenceResult>;
|
|
27
|
+
isCoherenceGateAvailable(): boolean;
|
|
24
28
|
}
|
|
25
29
|
/**
|
|
26
30
|
* Workflow status tracking
|
|
@@ -48,6 +52,9 @@ export interface CoordinatorConfig {
|
|
|
48
52
|
enableDecisionTransformer: boolean;
|
|
49
53
|
sonaPatternType: QEPatternType;
|
|
50
54
|
flashAttentionWorkload: QEWorkloadType;
|
|
55
|
+
enableCoherenceGate: boolean;
|
|
56
|
+
blockOnIncoherentRequirements: boolean;
|
|
57
|
+
enrichOnRetrievalLane: boolean;
|
|
51
58
|
}
|
|
52
59
|
/**
|
|
53
60
|
* Test Generation Coordinator
|
|
@@ -62,6 +69,7 @@ export declare class TestGenerationCoordinator implements ITestGenerationCoordin
|
|
|
62
69
|
private readonly eventBus;
|
|
63
70
|
private readonly memory;
|
|
64
71
|
private readonly agentCoordinator;
|
|
72
|
+
private readonly coherenceService?;
|
|
65
73
|
private readonly config;
|
|
66
74
|
private readonly testGenerator;
|
|
67
75
|
private readonly patternMatcher;
|
|
@@ -71,7 +79,8 @@ export declare class TestGenerationCoordinator implements ITestGenerationCoordin
|
|
|
71
79
|
private flashAttention;
|
|
72
80
|
private decisionTransformer;
|
|
73
81
|
private testEmbeddings;
|
|
74
|
-
|
|
82
|
+
private coherenceGate;
|
|
83
|
+
constructor(eventBus: EventBus, memory: MemoryBackend, agentCoordinator: AgentCoordinator, config?: Partial<CoordinatorConfig>, coherenceService?: (ICoherenceService | null) | undefined);
|
|
75
84
|
/**
|
|
76
85
|
* Initialize the coordinator with @ruvector integrations
|
|
77
86
|
*/
|
|
@@ -155,6 +164,28 @@ export declare class TestGenerationCoordinator implements ITestGenerationCoordin
|
|
|
155
164
|
* Per ADR-040: Monitor Flash Attention performance
|
|
156
165
|
*/
|
|
157
166
|
getFlashAttentionMetrics(): QEFlashAttentionMetrics[] | null;
|
|
167
|
+
/**
|
|
168
|
+
* Check coherence of requirements before test generation
|
|
169
|
+
* Per ADR-052: Verify requirement coherence using Prime Radiant
|
|
170
|
+
*
|
|
171
|
+
* @param requirements - Array of requirements to check for coherence
|
|
172
|
+
* @returns Coherence result with lane recommendation
|
|
173
|
+
*/
|
|
174
|
+
checkRequirementCoherence(requirements: Requirement[]): Promise<RequirementCoherenceResult>;
|
|
175
|
+
/**
|
|
176
|
+
* Check if the coherence gate is available and initialized
|
|
177
|
+
* Per ADR-052: Expose coherence gate availability
|
|
178
|
+
*/
|
|
179
|
+
isCoherenceGateAvailable(): boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Verify requirements coherence and enrich spec if needed
|
|
182
|
+
* Per ADR-052: Main integration point for test generation
|
|
183
|
+
*
|
|
184
|
+
* @param spec - Test specification to verify
|
|
185
|
+
* @returns Validated and possibly enriched specification
|
|
186
|
+
* @throws CoherenceGateError if requirements have unresolvable contradictions
|
|
187
|
+
*/
|
|
188
|
+
private verifyAndEnrichSpec;
|
|
158
189
|
/**
|
|
159
190
|
* Encode test generation request as feature vector for SONA
|
|
160
191
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator.d.ts","sourceRoot":"","sources":["../../../src/domains/test-generation/coordinator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,MAAM,EAGP,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,QAAQ,EACR,aAAa,EACb,gBAAgB,EAEjB,MAAM,yBAAyB,CAAC;AAOjC,OAAO,EACL,oBAAoB,EACpB,cAAc,EAEd,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAmBtB,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,WAAW,EACjB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC7B,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"coordinator.d.ts","sourceRoot":"","sources":["../../../src/domains/test-generation/coordinator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,MAAM,EAGP,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,QAAQ,EACR,aAAa,EACb,gBAAgB,EAEjB,MAAM,yBAAyB,CAAC;AAOjC,OAAO,EACL,oBAAoB,EACpB,cAAc,EAEd,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAmBtB,OAAO,EACL,KAAK,aAAa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;IACH,wBAAwB,IAAI,OAAO;IAInC;;;;;;;OAOG;YACW,mBAAmB;IAkBjC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAgC/B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA2B7B;;OAEG;YACW,0BAA0B;IAqBxC;;OAEG;IACH,OAAO,CAAC,UAAU;YAcJ,iBAAiB;YAmBjB,iBAAiB;CAQhC"}
|
|
@@ -18,6 +18,8 @@ import { PatternMatcherService, } from './services/pattern-matcher';
|
|
|
18
18
|
import { createPersistentSONAEngine, } from '../../integrations/ruvector/sona-persistence.js';
|
|
19
19
|
import { createQEFlashAttention, } from '../../integrations/ruvector/wrappers.js';
|
|
20
20
|
import { DecisionTransformerAlgorithm, } from '../../integrations/rl-suite/algorithms/decision-transformer.js';
|
|
21
|
+
// Coherence Gate Integration (ADR-052)
|
|
22
|
+
import { createTestGenerationCoherenceGate, } from './coherence-gate.js';
|
|
21
23
|
const DEFAULT_CONFIG = {
|
|
22
24
|
maxConcurrentWorkflows: 5,
|
|
23
25
|
defaultTimeout: 60000, // 60 seconds
|
|
@@ -29,6 +31,10 @@ const DEFAULT_CONFIG = {
|
|
|
29
31
|
enableDecisionTransformer: true,
|
|
30
32
|
sonaPatternType: 'test-generation',
|
|
31
33
|
flashAttentionWorkload: 'test-similarity',
|
|
34
|
+
// Coherence gate defaults (ADR-052)
|
|
35
|
+
enableCoherenceGate: true,
|
|
36
|
+
blockOnIncoherentRequirements: true,
|
|
37
|
+
enrichOnRetrievalLane: true,
|
|
32
38
|
};
|
|
33
39
|
/**
|
|
34
40
|
* Test Generation Coordinator
|
|
@@ -43,6 +49,7 @@ export class TestGenerationCoordinator {
|
|
|
43
49
|
eventBus;
|
|
44
50
|
memory;
|
|
45
51
|
agentCoordinator;
|
|
52
|
+
coherenceService;
|
|
46
53
|
config;
|
|
47
54
|
testGenerator;
|
|
48
55
|
patternMatcher;
|
|
@@ -53,13 +60,25 @@ export class TestGenerationCoordinator {
|
|
|
53
60
|
flashAttention = null;
|
|
54
61
|
decisionTransformer = null;
|
|
55
62
|
testEmbeddings = new Map();
|
|
56
|
-
|
|
63
|
+
// Coherence gate (ADR-052)
|
|
64
|
+
coherenceGate = null;
|
|
65
|
+
constructor(eventBus, memory, agentCoordinator, config = {}, coherenceService) {
|
|
57
66
|
this.eventBus = eventBus;
|
|
58
67
|
this.memory = memory;
|
|
59
68
|
this.agentCoordinator = agentCoordinator;
|
|
69
|
+
this.coherenceService = coherenceService;
|
|
60
70
|
this.config = { ...DEFAULT_CONFIG, ...config };
|
|
61
71
|
this.testGenerator = new TestGeneratorService(memory);
|
|
62
72
|
this.patternMatcher = new PatternMatcherService(memory);
|
|
73
|
+
// Initialize coherence gate if service is provided (ADR-052)
|
|
74
|
+
if (this.config.enableCoherenceGate && coherenceService) {
|
|
75
|
+
this.coherenceGate = createTestGenerationCoherenceGate(coherenceService, undefined, // Use default embedding service
|
|
76
|
+
{
|
|
77
|
+
enabled: true,
|
|
78
|
+
blockOnHumanLane: this.config.blockOnIncoherentRequirements,
|
|
79
|
+
enrichOnRetrievalLane: this.config.enrichOnRetrievalLane,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
63
82
|
}
|
|
64
83
|
/**
|
|
65
84
|
* Initialize the coordinator with @ruvector integrations
|
|
@@ -723,6 +742,56 @@ export class TestGenerationCoordinator {
|
|
|
723
742
|
return this.flashAttention.getMetrics();
|
|
724
743
|
}
|
|
725
744
|
// ============================================================================
|
|
745
|
+
// Coherence Gate Methods (ADR-052)
|
|
746
|
+
// ============================================================================
|
|
747
|
+
/**
|
|
748
|
+
* Check coherence of requirements before test generation
|
|
749
|
+
* Per ADR-052: Verify requirement coherence using Prime Radiant
|
|
750
|
+
*
|
|
751
|
+
* @param requirements - Array of requirements to check for coherence
|
|
752
|
+
* @returns Coherence result with lane recommendation
|
|
753
|
+
*/
|
|
754
|
+
async checkRequirementCoherence(requirements) {
|
|
755
|
+
if (!this.coherenceGate) {
|
|
756
|
+
// Return passing result if gate is not configured
|
|
757
|
+
return {
|
|
758
|
+
isCoherent: true,
|
|
759
|
+
energy: 0,
|
|
760
|
+
lane: 'reflex',
|
|
761
|
+
contradictions: [],
|
|
762
|
+
recommendations: [],
|
|
763
|
+
durationMs: 0,
|
|
764
|
+
usedFallback: true,
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
return this.coherenceGate.checkRequirementCoherence(requirements);
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Check if the coherence gate is available and initialized
|
|
771
|
+
* Per ADR-052: Expose coherence gate availability
|
|
772
|
+
*/
|
|
773
|
+
isCoherenceGateAvailable() {
|
|
774
|
+
return this.coherenceGate?.isAvailable() ?? false;
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* Verify requirements coherence and enrich spec if needed
|
|
778
|
+
* Per ADR-052: Main integration point for test generation
|
|
779
|
+
*
|
|
780
|
+
* @param spec - Test specification to verify
|
|
781
|
+
* @returns Validated and possibly enriched specification
|
|
782
|
+
* @throws CoherenceGateError if requirements have unresolvable contradictions
|
|
783
|
+
*/
|
|
784
|
+
async verifyAndEnrichSpec(spec) {
|
|
785
|
+
if (!this.coherenceGate || !this.config.enableCoherenceGate) {
|
|
786
|
+
return spec;
|
|
787
|
+
}
|
|
788
|
+
const result = await this.coherenceGate.validateAndEnrich(spec);
|
|
789
|
+
if (result.success) {
|
|
790
|
+
return result.value;
|
|
791
|
+
}
|
|
792
|
+
throw result.error;
|
|
793
|
+
}
|
|
794
|
+
// ============================================================================
|
|
726
795
|
// Helper Methods for @ruvector Integration
|
|
727
796
|
// ============================================================================
|
|
728
797
|
/**
|