agentic-qe 3.7.21 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/.claude/helpers/brain-checkpoint.cjs +4 -1
  2. package/.claude/helpers/statusline-v3.cjs +3 -1
  3. package/.claude/skills/skills-manifest.json +1 -1
  4. package/CHANGELOG.md +45 -0
  5. package/README.md +2 -14
  6. package/assets/helpers/statusline-v3.cjs +3 -1
  7. package/dist/cli/brain-commands.js +6 -10
  8. package/dist/cli/bundle.js +7441 -4327
  9. package/dist/cli/commands/audit.d.ts +43 -0
  10. package/dist/cli/commands/audit.js +125 -0
  11. package/dist/cli/commands/hooks.js +29 -6
  12. package/dist/cli/commands/init.js +1 -73
  13. package/dist/cli/commands/learning.js +270 -13
  14. package/dist/cli/commands/ruvector-commands.d.ts +15 -0
  15. package/dist/cli/commands/ruvector-commands.js +271 -0
  16. package/dist/cli/handlers/init-handler.d.ts +0 -1
  17. package/dist/cli/handlers/init-handler.js +0 -6
  18. package/dist/cli/index.js +4 -2
  19. package/dist/context/sources/defect-source.js +2 -2
  20. package/dist/context/sources/memory-source.js +2 -2
  21. package/dist/context/sources/requirements-source.js +2 -2
  22. package/dist/coordination/behavior-tree/decorators.d.ts +108 -0
  23. package/dist/coordination/behavior-tree/decorators.js +251 -0
  24. package/dist/coordination/behavior-tree/index.d.ts +12 -0
  25. package/dist/coordination/behavior-tree/index.js +15 -0
  26. package/dist/coordination/behavior-tree/nodes.d.ts +165 -0
  27. package/dist/coordination/behavior-tree/nodes.js +338 -0
  28. package/dist/coordination/behavior-tree/qe-trees.d.ts +105 -0
  29. package/dist/coordination/behavior-tree/qe-trees.js +181 -0
  30. package/dist/coordination/coherence-action-gate.d.ts +284 -0
  31. package/dist/coordination/coherence-action-gate.js +512 -0
  32. package/dist/coordination/index.d.ts +4 -0
  33. package/dist/coordination/index.js +8 -0
  34. package/dist/coordination/reasoning-qec.d.ts +315 -0
  35. package/dist/coordination/reasoning-qec.js +585 -0
  36. package/dist/coordination/task-executor.d.ts +16 -0
  37. package/dist/coordination/task-executor.js +99 -0
  38. package/dist/coordination/workflow-orchestrator.d.ts +29 -0
  39. package/dist/coordination/workflow-orchestrator.js +42 -0
  40. package/dist/domains/visual-accessibility/cnn-visual-regression.d.ts +135 -0
  41. package/dist/domains/visual-accessibility/cnn-visual-regression.js +327 -0
  42. package/dist/domains/visual-accessibility/index.d.ts +1 -0
  43. package/dist/domains/visual-accessibility/index.js +4 -0
  44. package/dist/governance/coherence-validator.d.ts +112 -0
  45. package/dist/governance/coherence-validator.js +180 -0
  46. package/dist/governance/index.d.ts +1 -0
  47. package/dist/governance/index.js +2 -0
  48. package/dist/governance/witness-chain.d.ts +311 -0
  49. package/dist/governance/witness-chain.js +509 -0
  50. package/dist/init/index.d.ts +0 -2
  51. package/dist/init/index.js +0 -1
  52. package/dist/init/init-wizard-steps.d.ts +10 -0
  53. package/dist/init/init-wizard-steps.js +87 -1
  54. package/dist/init/init-wizard.d.ts +1 -9
  55. package/dist/init/init-wizard.js +3 -69
  56. package/dist/init/orchestrator.js +0 -1
  57. package/dist/init/phases/01-detection.js +0 -27
  58. package/dist/init/phases/07-hooks.js +6 -4
  59. package/dist/init/phases/phase-interface.d.ts +0 -1
  60. package/dist/init/settings-merge.js +1 -1
  61. package/dist/integrations/browser/qe-dashboard/clustering.d.ts +48 -0
  62. package/dist/integrations/browser/qe-dashboard/clustering.js +183 -0
  63. package/dist/integrations/browser/qe-dashboard/index.d.ts +12 -0
  64. package/dist/integrations/browser/qe-dashboard/index.js +15 -0
  65. package/dist/integrations/browser/qe-dashboard/pattern-explorer.d.ts +165 -0
  66. package/dist/integrations/browser/qe-dashboard/pattern-explorer.js +260 -0
  67. package/dist/integrations/browser/qe-dashboard/wasm-vector-store.d.ts +144 -0
  68. package/dist/integrations/browser/qe-dashboard/wasm-vector-store.js +277 -0
  69. package/dist/integrations/ruvector/cognitive-container-codec.d.ts +51 -0
  70. package/dist/integrations/ruvector/cognitive-container-codec.js +180 -0
  71. package/dist/integrations/ruvector/cognitive-container.d.ts +125 -0
  72. package/dist/integrations/ruvector/cognitive-container.js +306 -0
  73. package/dist/integrations/ruvector/coherence-gate.d.ts +309 -0
  74. package/dist/integrations/ruvector/coherence-gate.js +631 -0
  75. package/dist/integrations/ruvector/compressed-hnsw-integration.d.ts +176 -0
  76. package/dist/integrations/ruvector/compressed-hnsw-integration.js +301 -0
  77. package/dist/integrations/ruvector/dither-adapter.d.ts +122 -0
  78. package/dist/integrations/ruvector/dither-adapter.js +295 -0
  79. package/dist/integrations/ruvector/domain-transfer.d.ts +129 -0
  80. package/dist/integrations/ruvector/domain-transfer.js +220 -0
  81. package/dist/integrations/ruvector/feature-flags.d.ts +214 -2
  82. package/dist/integrations/ruvector/feature-flags.js +167 -2
  83. package/dist/integrations/ruvector/filter-adapter.d.ts +71 -0
  84. package/dist/integrations/ruvector/filter-adapter.js +285 -0
  85. package/dist/integrations/ruvector/gnn-wrapper.d.ts +20 -0
  86. package/dist/integrations/ruvector/gnn-wrapper.js +40 -0
  87. package/dist/integrations/ruvector/hnsw-health-monitor.d.ts +237 -0
  88. package/dist/integrations/ruvector/hnsw-health-monitor.js +394 -0
  89. package/dist/integrations/ruvector/index.d.ts +8 -2
  90. package/dist/integrations/ruvector/index.js +18 -2
  91. package/dist/integrations/ruvector/interfaces.d.ts +40 -0
  92. package/dist/integrations/ruvector/sona-persistence.d.ts +54 -0
  93. package/dist/integrations/ruvector/sona-persistence.js +162 -0
  94. package/dist/integrations/ruvector/sona-three-loop.d.ts +392 -0
  95. package/dist/integrations/ruvector/sona-three-loop.js +814 -0
  96. package/dist/integrations/ruvector/sona-wrapper.d.ts +97 -0
  97. package/dist/integrations/ruvector/sona-wrapper.js +147 -3
  98. package/dist/integrations/ruvector/spectral-math.d.ts +101 -0
  99. package/dist/integrations/ruvector/spectral-math.js +254 -0
  100. package/dist/integrations/ruvector/temporal-compression.d.ts +163 -0
  101. package/dist/integrations/ruvector/temporal-compression.js +318 -0
  102. package/dist/integrations/ruvector/thompson-sampler.d.ts +61 -0
  103. package/dist/integrations/ruvector/thompson-sampler.js +118 -0
  104. package/dist/integrations/ruvector/transfer-coherence-stub.d.ts +80 -0
  105. package/dist/integrations/ruvector/transfer-coherence-stub.js +63 -0
  106. package/dist/integrations/ruvector/transfer-verification.d.ts +119 -0
  107. package/dist/integrations/ruvector/transfer-verification.js +115 -0
  108. package/dist/kernel/hnsw-adapter.d.ts +52 -1
  109. package/dist/kernel/hnsw-adapter.js +139 -4
  110. package/dist/kernel/hnsw-index-provider.d.ts +5 -0
  111. package/dist/kernel/native-hnsw-backend.d.ts +110 -0
  112. package/dist/kernel/native-hnsw-backend.js +408 -0
  113. package/dist/kernel/unified-memory.js +5 -6
  114. package/dist/learning/aqe-learning-engine.d.ts +2 -0
  115. package/dist/learning/aqe-learning-engine.js +65 -0
  116. package/dist/learning/experience-capture-middleware.js +20 -0
  117. package/dist/learning/experience-capture.d.ts +10 -0
  118. package/dist/learning/experience-capture.js +34 -0
  119. package/dist/learning/index.d.ts +2 -2
  120. package/dist/learning/index.js +4 -4
  121. package/dist/learning/metrics-tracker.d.ts +11 -0
  122. package/dist/learning/metrics-tracker.js +29 -13
  123. package/dist/learning/pattern-lifecycle.d.ts +30 -1
  124. package/dist/learning/pattern-lifecycle.js +92 -20
  125. package/dist/learning/pattern-store.d.ts +8 -0
  126. package/dist/learning/pattern-store.js +8 -2
  127. package/dist/learning/qe-unified-memory.js +1 -28
  128. package/dist/learning/regret-tracker.d.ts +201 -0
  129. package/dist/learning/regret-tracker.js +361 -0
  130. package/dist/mcp/bundle.js +5915 -474
  131. package/dist/routing/index.d.ts +4 -2
  132. package/dist/routing/index.js +3 -1
  133. package/dist/routing/neural-tiny-dancer-router.d.ts +268 -0
  134. package/dist/routing/neural-tiny-dancer-router.js +514 -0
  135. package/dist/routing/queen-integration.js +5 -5
  136. package/dist/routing/routing-config.d.ts +6 -0
  137. package/dist/routing/routing-config.js +1 -0
  138. package/dist/routing/simple-neural-router.d.ts +76 -0
  139. package/dist/routing/simple-neural-router.js +202 -0
  140. package/dist/routing/tiny-dancer-router.d.ts +20 -1
  141. package/dist/routing/tiny-dancer-router.js +21 -2
  142. package/dist/test-scheduling/dag-attention-scheduler.d.ts +81 -0
  143. package/dist/test-scheduling/dag-attention-scheduler.js +358 -0
  144. package/dist/test-scheduling/dag-attention-types.d.ts +81 -0
  145. package/dist/test-scheduling/dag-attention-types.js +10 -0
  146. package/dist/test-scheduling/index.d.ts +1 -0
  147. package/dist/test-scheduling/index.js +4 -0
  148. package/dist/test-scheduling/pipeline.d.ts +8 -0
  149. package/dist/test-scheduling/pipeline.js +28 -0
  150. package/package.json +6 -2
  151. package/dist/cli/commands/migrate.d.ts +0 -9
  152. package/dist/cli/commands/migrate.js +0 -566
  153. package/dist/init/init-wizard-migration.d.ts +0 -52
  154. package/dist/init/init-wizard-migration.js +0 -345
  155. package/dist/init/migration/config-migrator.d.ts +0 -31
  156. package/dist/init/migration/config-migrator.js +0 -149
  157. package/dist/init/migration/data-migrator.d.ts +0 -72
  158. package/dist/init/migration/data-migrator.js +0 -232
  159. package/dist/init/migration/detector.d.ts +0 -44
  160. package/dist/init/migration/detector.js +0 -105
  161. package/dist/init/migration/index.d.ts +0 -8
  162. package/dist/init/migration/index.js +0 -8
  163. package/dist/learning/v2-to-v3-migration.d.ts +0 -86
  164. package/dist/learning/v2-to-v3-migration.js +0 -529
@@ -10,7 +10,10 @@ const { execFileSync } = require('child_process');
10
10
  const fs = require('fs');
11
11
  const path = require('path');
12
12
 
13
- const AQE_DIR = path.join(process.cwd(), '.agentic-qe');
13
+ // Resolve project root from __dirname (this file lives at <project>/.claude/helpers/)
14
+ // This works regardless of the current working directory
15
+ const PROJECT_ROOT = path.resolve(__dirname, '..', '..');
16
+ const AQE_DIR = path.join(PROJECT_ROOT, '.agentic-qe');
14
17
  const RVF_PATH = path.join(AQE_DIR, 'aqe.rvf');
15
18
  const DB_PATH = path.join(AQE_DIR, 'memory.db');
16
19
  const MAX_AGE_HOURS = 24;
@@ -665,7 +665,9 @@ function generateJSON(data) {
665
665
  // ═══════════════════════════════════════════════════════════════
666
666
 
667
667
  function main() {
668
- const projectDir = process.cwd();
668
+ // Resolve project root from __dirname (this file lives at <project>/.claude/helpers/)
669
+ // This works regardless of the current working directory
670
+ const projectDir = path.resolve(__dirname, '..', '..');
669
671
  const claudeInput = getClaudeCodeInput();
670
672
 
671
673
  // Collect all data
@@ -932,7 +932,7 @@
932
932
  },
933
933
  "metadata": {
934
934
  "generatedBy": "Agentic QE Fleet",
935
- "fleetVersion": "3.7.21",
935
+ "fleetVersion": "3.8.0",
936
936
  "manifestVersion": "1.3.0",
937
937
  "lastUpdated": "2026-02-04T00:00:00.000Z",
938
938
  "contributors": [
package/CHANGELOG.md CHANGED
@@ -5,6 +5,51 @@ All notable changes to the Agentic QE project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.8.0] - 2026-03-16
9
+
10
+ ### Added
11
+
12
+ - **RuVector native HNSW backend** — 150x faster vector search via native HNSW index with metadata filtering, replacing the pure-JS implementation. Searches that took seconds now complete in single-digit milliseconds. (ADR-081)
13
+ - **Neural model routing (TinyDancer)** — Intelligent router learns which model tier handles each task best, using REINFORCE policy gradient to minimize cost while maintaining quality. Routes simple tasks to fast/cheap tiers automatically. (ADR-082)
14
+ - **Coherence-gated agent actions** — 3-filter safety pipeline validates agent outputs before they execute, catching hallucinated tool calls and incoherent reasoning chains. Includes witness chain audit trail with SHA-256 hash linking for full traceability. (ADR-083)
15
+ - **Cross-domain transfer learning** — Agents share learned patterns across test domains (e.g., API testing insights improve UI testing) via Thompson Sampling, accelerating learning on new projects. (ADR-084)
16
+ - **Temporal tensor compression** — 4x memory reduction for stored embeddings using Int8Array quantization with deterministic golden-ratio dithering for cross-platform reproducibility. (ADR-085)
17
+ - **DAG attention scheduler** — Dependency-aware test ordering that runs independent tests in parallel while respecting execution order constraints, reducing overall suite time.
18
+ - **CNN visual regression** — Spatial pooling embeddings for visual diff detection, enabling image-based regression testing without pixel-exact matching.
19
+ - **Behavior tree orchestration** — Sequence/Selector/Parallel node types for composing complex agent workflows with built-in retry and fallback logic.
20
+ - **Reasoning QEC (Quantum Error Correction)** — Majority-vote consensus across multiple reasoning paths for higher confidence agent decisions.
21
+ - **QE dashboard scaffolding** — Browser-based dashboard for exploring learned patterns, cluster visualizations, and WASM-accelerated vector search.
22
+ - **Cognitive container export/import (RVF v2)** — Portable brain snapshots that capture an agent's full learned state for sharing across environments.
23
+ - **15 feature flags** — All new capabilities are enabled by default for immediate value. Disable individually via CLI profiles or `setRuVectorFeatureFlags()` for opt-out.
24
+ - **Regret tracker** — Monitors routing decisions over time with log-log regression to detect and correct degrading performance trends.
25
+ - **HNSW health monitor** — Spectral analysis of index health with automatic rebalancing recommendations.
26
+ - **CLI commands** — New `aqe ruvector`, `aqe audit`, and `aqe learning` commands for managing the new subsystems.
27
+
28
+ ### Fixed
29
+
30
+ - **4 flaky tests stabilized** — Reset shared singletons (queenGovernanceAdapter, sharedMinCutGraph, UnifiedPersistence) between tests to prevent cross-test state contamination under full-suite contention.
31
+ - **ARM64 install failure** — Moved `@ruvector/tiny-dancer-linux-arm64-gnu` from `dependencies` to `optionalDependencies` so `npm install` succeeds on non-ARM64 platforms.
32
+
33
+ ### Changed
34
+
35
+ - **26 new regression tests** — Covering task-executor coherence gates, learning engine wiring, experience capture witness integration, pattern store filter compatibility, and metrics dashboard regret methods.
36
+ - **Removed obsolete v2-to-v3-migration test** — Source code was removed in v3.7.22; test file now removed as well.
37
+ - **file-type dependency bumped** to 21.3.2 (security patch).
38
+
39
+ ## [3.7.22] - 2026-03-14
40
+
41
+ ### Fixed
42
+
43
+ - **Hook path resolution** — Helper scripts (`brain-checkpoint.cjs`, `statusline-v3.cjs`) used `process.cwd()` to find the project root, which broke when Claude Code ran hooks from a different working directory. Now uses `path.resolve(__dirname, '..', '..')` for reliable resolution regardless of `cwd`. (#352)
44
+ - **Invalid JSON in settings.json** — Hook commands for `SessionStart`, `Stop`, and `UserPromptSubmit` had unescaped double quotes around `$(git rev-parse ...)` subshells, producing invalid JSON that Claude Code could not parse.
45
+ - **Pattern growth pipeline unblocked** — Pattern promotion and metrics queries referenced the removed `learning_experiences` table. Updated to use `captured_experiences` with correct column mappings (`quality` instead of `reward`, `agent` instead of `action_type`).
46
+ - **SQLite corruption prevention** — All database open calls now use the safe wrapper (`openSafeDatabase`) which sets WAL mode, `busy_timeout=5000`, and `foreign_keys=ON` consistently. (#348)
47
+
48
+ ### Changed
49
+
50
+ - **V2 migration code removed** — The `aqe migrate` CLI command, V2-to-V3 migration wizard, and all supporting code (~2,400 lines) have been removed. No v2 installations exist in the wild.
51
+ - **README updated** — Removed the V2 to V3 migration section.
52
+
8
53
  ## [3.7.21] - 2026-03-13
9
54
 
10
55
  ### Added
package/README.md CHANGED
@@ -159,7 +159,7 @@ Plus **7 TDD subagents** (red, green, refactor, code/integration/performance/sec
159
159
 
160
160
  ---
161
161
 
162
- ## 80 QE Skills
162
+ ## 74 QE Skills
163
163
 
164
164
  Agents automatically apply relevant skills from the skill library. Skills are rated by **trust tier**:
165
165
 
@@ -171,7 +171,7 @@ Agents automatically apply relevant skills from the skill library. Skills are ra
171
171
  | **Tier 0 — Advisory** | 5 | Guidance only |
172
172
 
173
173
  <details>
174
- <summary><b>View all 80 skills</b></summary>
174
+ <summary><b>View all 74 skills</b></summary>
175
175
 
176
176
  **Core Testing (12):** agentic-quality-engineering, holistic-testing-pact, context-driven-testing, tdd-london-chicago, xp-practices, risk-based-testing, test-automation-strategy, refactoring-patterns, shift-left-testing, shift-right-testing, regression-testing, verification-quality
177
177
 
@@ -261,18 +261,6 @@ aqe init --auto
261
261
 
262
262
  ---
263
263
 
264
- ## V2 to V3 Migration
265
-
266
- ```bash
267
- aqe migrate status # check migration status
268
- aqe migrate run --backup # migrate with backup
269
- aqe migrate verify # verify migration
270
- ```
271
-
272
- All V2 agents map to V3 equivalents automatically. Memory, configuration, and learned patterns are migrated.
273
-
274
- ---
275
-
276
264
  ## Documentation
277
265
 
278
266
  | Guide | Description |
@@ -665,7 +665,9 @@ function generateJSON(data) {
665
665
  // ═══════════════════════════════════════════════════════════════
666
666
 
667
667
  function main() {
668
- const projectDir = process.cwd();
668
+ // Resolve project root from __dirname (this file lives at <project>/.claude/helpers/)
669
+ // This works regardless of the current working directory
670
+ const projectDir = path.resolve(__dirname, '..', '..');
669
671
  const claudeInput = getClaudeCodeInput();
670
672
 
671
673
  // Collect all data
@@ -9,7 +9,7 @@
9
9
  * - 'rvf' — Single portable .rvf file (native @ruvector/rvf-node)
10
10
  * - 'jsonl' — JSONL directory format (fallback, no native dependency)
11
11
  */
12
- import Database from 'better-sqlite3';
12
+ import { openDatabase } from '../shared/safe-db.js';
13
13
  import { exportBrain as coreExportBrain, importBrain as coreImportBrain, brainInfo as coreBrainInfo, } from '../integrations/ruvector/brain-exporter.js';
14
14
  import { exportBrainToRvf, importBrainFromRvf, brainInfoFromRvf, isRvfAvailable, } from '../integrations/ruvector/brain-rvf-exporter.js';
15
15
  import { createWitnessChain } from '../audit/witness-chain.js';
@@ -24,8 +24,7 @@ import { backfillWitnessChain } from '../audit/witness-backfill.js';
24
24
  export async function exportBrain(dbPath, options) {
25
25
  const format = resolveFormat(options.format);
26
26
  if (format === 'rvf') {
27
- const db = new Database(dbPath, { readonly: true });
28
- db.pragma('journal_mode = WAL');
27
+ const db = openDatabase(dbPath, { readonly: true });
29
28
  try {
30
29
  return exportBrainToRvf(db, {
31
30
  outputPath: options.outputPath,
@@ -37,8 +36,7 @@ export async function exportBrain(dbPath, options) {
37
36
  }
38
37
  }
39
38
  // JSONL fallback
40
- const db = new Database(dbPath, { readonly: true });
41
- db.pragma('journal_mode = WAL');
39
+ const db = openDatabase(dbPath, { readonly: true });
42
40
  try {
43
41
  return coreExportBrain(db, options, dbPath);
44
42
  }
@@ -56,8 +54,7 @@ export async function exportBrain(dbPath, options) {
56
54
  export async function importBrain(dbPath, containerPath, options) {
57
55
  const format = detectImportFormat(containerPath, options.format);
58
56
  if (format === 'rvf') {
59
- const db = new Database(dbPath);
60
- db.pragma('journal_mode = WAL');
57
+ const db = openDatabase(dbPath);
61
58
  try {
62
59
  return importBrainFromRvf(db, containerPath, {
63
60
  mergeStrategy: options.mergeStrategy,
@@ -69,8 +66,7 @@ export async function importBrain(dbPath, containerPath, options) {
69
66
  }
70
67
  }
71
68
  // JSONL fallback
72
- const db = new Database(dbPath);
73
- db.pragma('journal_mode = WAL');
69
+ const db = openDatabase(dbPath);
74
70
  try {
75
71
  return coreImportBrain(db, containerPath, options);
76
72
  }
@@ -95,7 +91,7 @@ export async function brainInfo(containerPath, format) {
95
91
  * that predate the witness chain feature.
96
92
  */
97
93
  export async function witnessBackfill(dbPath) {
98
- const db = new Database(dbPath, { readonly: false });
94
+ const db = openDatabase(dbPath);
99
95
  try {
100
96
  const chain = createWitnessChain(db);
101
97
  await chain.initialize();