agentic-qe 3.7.21 → 3.7.22

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 (52) 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 +14 -0
  5. package/README.md +0 -12
  6. package/assets/helpers/statusline-v3.cjs +3 -1
  7. package/dist/cli/brain-commands.js +6 -10
  8. package/dist/cli/bundle.js +2049 -3380
  9. package/dist/cli/commands/hooks.js +29 -6
  10. package/dist/cli/commands/init.js +1 -73
  11. package/dist/cli/commands/learning.js +164 -12
  12. package/dist/cli/handlers/init-handler.d.ts +0 -1
  13. package/dist/cli/handlers/init-handler.js +0 -6
  14. package/dist/cli/index.js +0 -2
  15. package/dist/context/sources/defect-source.js +2 -2
  16. package/dist/context/sources/memory-source.js +2 -2
  17. package/dist/context/sources/requirements-source.js +2 -2
  18. package/dist/init/index.d.ts +0 -2
  19. package/dist/init/index.js +0 -1
  20. package/dist/init/init-wizard-steps.d.ts +10 -0
  21. package/dist/init/init-wizard-steps.js +87 -1
  22. package/dist/init/init-wizard.d.ts +1 -9
  23. package/dist/init/init-wizard.js +3 -69
  24. package/dist/init/orchestrator.js +0 -1
  25. package/dist/init/phases/01-detection.js +0 -27
  26. package/dist/init/phases/07-hooks.js +6 -4
  27. package/dist/init/phases/phase-interface.d.ts +0 -1
  28. package/dist/init/settings-merge.js +1 -1
  29. package/dist/kernel/unified-memory.js +5 -6
  30. package/dist/learning/experience-capture-middleware.js +20 -0
  31. package/dist/learning/index.d.ts +0 -2
  32. package/dist/learning/index.js +0 -4
  33. package/dist/learning/metrics-tracker.js +15 -13
  34. package/dist/learning/pattern-lifecycle.d.ts +1 -1
  35. package/dist/learning/pattern-lifecycle.js +18 -20
  36. package/dist/learning/qe-unified-memory.js +1 -28
  37. package/dist/mcp/bundle.js +180 -175
  38. package/package.json +1 -1
  39. package/dist/cli/commands/migrate.d.ts +0 -9
  40. package/dist/cli/commands/migrate.js +0 -566
  41. package/dist/init/init-wizard-migration.d.ts +0 -52
  42. package/dist/init/init-wizard-migration.js +0 -345
  43. package/dist/init/migration/config-migrator.d.ts +0 -31
  44. package/dist/init/migration/config-migrator.js +0 -149
  45. package/dist/init/migration/data-migrator.d.ts +0 -72
  46. package/dist/init/migration/data-migrator.js +0 -232
  47. package/dist/init/migration/detector.d.ts +0 -44
  48. package/dist/init/migration/detector.js +0 -105
  49. package/dist/init/migration/index.d.ts +0 -8
  50. package/dist/init/migration/index.js +0 -8
  51. package/dist/learning/v2-to-v3-migration.d.ts +0 -86
  52. 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.7.22",
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,20 @@ 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.7.22] - 2026-03-14
9
+
10
+ ### Fixed
11
+
12
+ - **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)
13
+ - **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.
14
+ - **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`).
15
+ - **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)
16
+
17
+ ### Changed
18
+
19
+ - **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.
20
+ - **README updated** — Removed the V2 to V3 migration section.
21
+
8
22
  ## [3.7.21] - 2026-03-13
9
23
 
10
24
  ### Added
package/README.md CHANGED
@@ -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();