1149 Commits

Author SHA1 Message Date
Dragan Spiridonov ba4e2c6de0 Merge pull request #353 from proffesor-for-testing/march-fixes-and-improvements
chore(release): v3.7.22
v3.7.22
2026-03-14 12:08:38 +01:00
Dragan Spiridonov 29c5793252 chore(release): bump version to v3.7.22
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 11:05:13 +00:00
Dragan Spiridonov 948d4e0f41 fix: use __dirname instead of process.cwd() in helpers for reliable path resolution (#352)
Helpers (brain-checkpoint.cjs, statusline-v3.cjs) used process.cwd()
to find the project root, which breaks when Claude Code runs hooks from
a different working directory. Fixed to use path.resolve(__dirname, '..', '..')
since these files always live at <project>/.claude/helpers/.

Also updated hook commands in 07-hooks.ts and settings-merge.ts to use
$(git rev-parse --show-toplevel) for absolute path resolution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 09:54:30 +00:00
Dragan Spiridonov 24625cf78c fix: escape quotes in settings.json hook commands to produce valid JSON
Five hook commands (UserPromptSubmit, SessionStart, Stop) had unescaped
double quotes around $(git rev-parse ...) subshells, breaking JSON parsing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 09:43:41 +00:00
Dragan Spiridonov c0989110d7 refactor: remove all v2-to-v3 migration code (no v2 users exist)
Deletes 7 v2-migration files (~2,600 lines) and cleans up all
references. writeVersionToDb/readVersionFromDb relocated to
init-wizard-steps.ts to preserve the v3 upgrade system
(aqe init --upgrade / --auto).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 09:25:01 +00:00
Dragan Spiridonov c3899c41e3 fix: unblock pattern growth pipeline and remove v2 learning_experiences refs
Root cause: pattern count stalled for 5 days because:
1. cli-hook experiences (quality=0.40, sr=0.24) flooded the pipeline,
   failing the HAVING clause thresholds — now filtered out
2. Pattern names were static (agent-session-pattern), so dedup check
   always matched existing patterns — now date-bucketed (YYYY-MM)
3. PatternLifecycleManager queried non-existent learning_experiences
   table — now uses captured_experiences directly
4. captured_experiences table was missing 5 consolidation columns
   (consolidated_into, consolidation_count, etc.) — now auto-migrated

Also removes all learning_experiences references from runtime code
paths (metrics-tracker, pattern-lifecycle, learning CLI commands).

Closes #348 (pattern stagnation)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 08:57:22 +00:00
Dragan Spiridonov e394b07d1b fix: enforce safe DB opens everywhere to prevent SQLite corruption (#348)
Replace all remaining raw `new Database()` calls with `openDatabase()` from
safe-db.ts, which enforces WAL mode + busy_timeout=5000ms. This prevents
B-tree index corruption from concurrent hook/session writers.

Also adds `aqe learning repair` CLI command for dump+reimport recovery of
corrupted databases without data loss.

Fixes #348

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 08:21:07 +00:00
Dragan Spiridonov fe11808bbc Merge pull request #351 from proffesor-for-testing/dependabot/npm_and_yarn/npm_and_yarn-1d4d4816e9
chore(deps): bump undici from 7.22.0 to 7.24.1 in the npm_and_yarn group across 1 directory
2026-03-14 08:52:46 +01:00
dependabot[bot] ac89377dc5 chore(deps): bump undici in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the / directory: [undici](https://github.com/nodejs/undici).


Updates `undici` from 7.22.0 to 7.24.1
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v7.22.0...v7.24.1)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 7.24.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-13 23:33:53 +00:00
Dragan Spiridonov cbc9b2afee Merge pull request #349 from proffesor-for-testing/march-fixes-and-improvements
chore(release): v3.7.21
v3.7.21
2026-03-13 17:58:24 +01:00
Dragan Spiridonov 1ce7b79f60 chore(release): bump version to v3.7.21
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:36:40 +00:00
Dragan Spiridonov 575633958a fix: eliminate shell injection vectors, upgrade error logging, and reduce DRY violations
P1 (Security): Convert all execSync template-literal calls to execFileSync
with argument arrays, eliminating shell metacharacter injection across:
- claude-flow-adapter.ts (8 calls)
- trajectory-bridge.ts, pretrain-bridge.ts, model-router-bridge.ts (8 calls)
- brain-checkpoint.cjs, statusline-v3.cjs helpers (3 calls)
- 07-hooks.ts generated scripts (2 calls)
Remove dead escapeArg() methods from bridge files.

P2 (Reliability): Replace swallowed .catch(() => {}) handlers with
structured logging via createLogger() from the project's LoggerFactory:
- task-executor.ts: 5 recordOutcome catches → logger.warn with taskId
- experience-capture-middleware.ts: embedding catch → ecLogger.warn
- token-tracker.ts: DB init + KV persist → ttLogger.warn
- qe-reasoning-bank.ts: 3 witness chain catches → logger.warn
- init-wizard.ts: V2 migration → console.warn (logger not yet initialized)

P2 (Correctness): Guard non-null assertion in mincut-test-optimizer.ts
with early continue. Wrap JSON.parse in brain-rvf-exporter.ts with
inner try-catch for clearer error messages on malformed kernel data.

P3 (DRY): Extract shared backoffDelay() to src/shared/llm/retry.ts,
replacing 12 duplicate Math.min(1000 * Math.pow(2, attempt), 30000)
across 6 LLM providers. Collapse 100-line capability boolean matrix
in agent-router-config.ts into 4 named presets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:15:37 +00:00
Dragan Spiridonov 3ec84594dd ADR updates statuses 2026-03-13 13:54:47 +00:00
Dragan Spiridonov 5baf27e8e7 feat: implement agent dependency intelligence (#342)
Add three subsystems for fleet orchestration intelligence:
- Pre-spawn MCP validation scans agent files for tool references and
  validates availability at install and spawn time (advisory only)
- Agent dependency graph with YAML frontmatter parsing, topological
  sort, and phased spawn plans for multi-agent orchestration
- Co-execution repository tracks agent pair success rates, feeding
  behavioral signals into the signal merger for routing decisions

Wire all subsystems into the queen coordinator: dependency graph built
on initialize(), MCP validation in requestAgentSpawn(), co-execution
recording in handleTaskCompletionCallback(), and getSpawnPlan()/
getDependencyGraph() exposed on the public interface.

Add structured dependencies frontmatter to 5 agent definitions and
475 passing tests including 7 end-to-end integration tests proving
the wiring works.

Closes #342

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 13:52:27 +00:00
Dragan Spiridonov 253cefab7e fix: wire semgrep into SAST pipeline and correct security scanner overclaims
Semgrep integration was well-written but only used as a fallback in the
coordination layer — never invoked when the regex scanner succeeded.
Now SASTScanner.scanWithRules() runs pattern scanning + semgrep in parallel
when semgrep is installed, merging and deduplicating results.

Also corrects agent documentation that falsely claimed OWASP ZAP, TruffleHog,
Gitleaks, ESLint Security, and Snyk integrations. The actual implementations
are: regex patterns + semgrep (SAST), OSV API (deps), custom fetch-based
scanner (DAST), and regex patterns (secrets).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 13:46:52 +00:00
Dragan Spiridonov d0d7dbef19 Merge pull request #347 from proffesor-for-testing/march-fixes-and-improvements
chore(release): v3.7.20
v3.7.20
2026-03-12 20:32:11 +01:00
Dragan Spiridonov 8156b4fa92 chore(release): bump version to v3.7.20
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 19:11:25 +00:00
Dragan Spiridonov 6442491a09 fix: deduplicate brain-checkpoint hooks and fix governance time budget (#344, #345)
Hook deduplication: add brain-checkpoint.cjs and .claude/helpers/ patterns to
AQE_COMMAND_PATTERNS so mergeHooksSmart() correctly identifies them as AQE-owned
and removes old copies on re-init instead of accumulating duplicates.

Governance time budget: change budgetRemaining.timeMs to measure idle time since
last action instead of total elapsed since first action, and increase default
idleTimeoutMs from 5 to 15 minutes. Prevents false "Budget exhausted: time"
blocks on requirements_validate and coverage_analyze_sublinear.

Closes #344, closes #345

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 18:51:49 +00:00
Dragan Spiridonov 9a0e26bcba docs: add missing v3.7.19 release notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 18:40:59 +00:00
Dragan Spiridonov 1d8a6b7d52 Merge pull request #343 from proffesor-for-testing/march-fixes-and-improvements
chore(release): v3.7.19 — YAML pipelines, validation pipeline, cross-phase signals
v3.7.19
2026-03-12 17:18:36 +01:00
Dragan Spiridonov 87ff3e96da feat: YAML pipelines, validation pipeline, cross-phase signals, heartbeat scheduler, context sources
- Add YAML deterministic pipeline loader and registry (Imp-9) for token-free workflow execution
- Add validation pipeline skill and MCP handler (BMAD-003) with 13-step requirements validation
- Add cross-phase signal handlers for QCSD feedback loops (store, query, agent_complete, phase events)
- Add heartbeat scheduler worker (Imp-10) for token-free background maintenance every 30 minutes
- Add defect intelligence and requirements traceability context sources
- Register all new MCP tools in protocol-server and server
- Update skills manifests, tests, and documentation

chore(release): bump version to v3.7.19

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 16:17:04 +00:00
Dragan Spiridonov 2b5e2795f3 iterative-loop skill 2026-03-11 16:21:34 +00:00
Dragan Spiridonov 1f363bc352 Merge pull request #341 from proffesor-for-testing/hotfix/init-agents-install
fix(init): agents not installed during upgrade
v3.7.18
2026-03-11 16:49:33 +01:00
Dragan Spiridonov 4efa556482 fix(init): agents not installed during aqe init --auto upgrade
preserveOverridesDir() used __dirname (undefined in ESM bundles), causing
a TypeError that crashed the agents installer. Skills were installed but
agents were silently skipped. Fixed by using import.meta.url resolution
with try/catch fallback. Also wrapped agents installer in try/catch in
the assets phase so one failure doesn't crash the entire phase.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 15:49:06 +00:00
Dragan Spiridonov afdbad2f1d Merge pull request #340 from proffesor-for-testing/march-fixes-and-improvements
chore(release): v3.7.17
v3.7.17
2026-03-11 15:07:20 +01:00
Dragan Spiridonov 8bb5d77391 chore(release): bump version to v3.7.17
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 13:46:59 +00:00
Dragan Spiridonov 514135814a release skill 2026-03-11 13:30:00 +00:00
Dragan Spiridonov 9e7320e79f feat(bmad): implement 6 BMAD-inspired quality engineering improvements
- Adversarial review with minimum findings enforcement (weighted scoring, second-pass, clean justification)
- Agent customization overlays via .claude/agent-overrides/*.yaml with runtime integration
- Structured validation pipelines with 13-step requirements validation and blocking gates
- Mechanical edge case detection with regex-based branch enumerator (13 construct types) and CLI command
- Context compilation for agents with parallel source gathering and token budget management
- Micro-file step architecture splitting 5 QCSD skills into 44 step files (<500 lines each)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 13:29:49 +00:00
Dragan Spiridonov 180c2e081c Merge remote-tracking branch 'origin/main' into march-fixes-and-improvements 2026-03-11 13:21:38 +00:00
Dragan Spiridonov 80b5587232 Merge pull request #339 from proffesor-for-testing/dependabot/npm_and_yarn/npm_and_yarn-877cdb123e
chore(deps): bump file-type from 21.3.0 to 21.3.1 in the npm_and_yarn group across 1 directory
2026-03-11 14:16:06 +01:00
Dragan Spiridonov 6307ce1f9a statusline fixes 2026-03-11 11:43:34 +00:00
dependabot[bot] 4bdf8998df chore(deps): bump file-type in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the / directory: [file-type](https://github.com/sindresorhus/file-type).


Updates `file-type` from 21.3.0 to 21.3.1
- [Release notes](https://github.com/sindresorhus/file-type/releases)
- [Commits](https://github.com/sindresorhus/file-type/compare/v21.3.0...v21.3.1)

---
updated-dependencies:
- dependency-name: file-type
  dependency-version: 21.3.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-11 09:55:34 +00:00
Dragan Spiridonov 4f14069c22 Merge branch 'main' into march-fixes-and-improvements 2026-03-11 09:54:42 +00:00
Dragan Spiridonov 31ce59b408 Merge pull request #338 from proffesor-for-testing/dependabot/npm_and_yarn/npm_and_yarn-d3731d7e25
chore(deps): bump hono from 4.12.5 to 4.12.7 in the npm_and_yarn group across 1 directory
2026-03-11 10:54:14 +01:00
Dragan Spiridonov 9ec5bf16d7 cleanup and ruflo+aqe new versions init after recreating devpod 2026-03-11 09:10:55 +00:00
Profa b942b1103d config updates 2026-03-11 07:21:52 +00:00
dependabot[bot] d8e1dc64f1 chore(deps): bump hono in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the / directory: [hono](https://github.com/honojs/hono).


Updates `hono` from 4.12.5 to 4.12.7
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.12.5...v4.12.7)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.12.7
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-11 02:06:56 +00:00
Dragan Spiridonov e16291653b Merge pull request #337 from proffesor-for-testing/march-fixes-and-improvements
chore(release): v3.7.16
v3.7.16
2026-03-10 20:55:44 +01:00
Profa 1cb79a0c4e chore(release): bump version to v3.7.16
Tier 3 baseline instrumentation and critical fix for test-induced
production database deletion. Tests using relative '.agentic-qe/memory.db'
paths were deleting the production DB during cleanup — now all test DB
paths use os.tmpdir(). Also fixes resetUnifiedMemory() cache leak and
process.cwd() bypasses in pull-agent and brain-handler.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 19:17:59 +00:00
Profa 4f88b7cb3f feat(tier3): collect baselines and add instrumentation for Tier 3 features (#334)
Fix MCP persistence pipeline so test_outcomes and coverage_sessions
receive data from live tool calls. Add Priority 2 instrumentation:
routing tier tags, HNSW/FTS5 search latency, token tracker auto-save,
and pipeline step timers. Collect baseline snapshots for all Tier 3
metrics.

Key changes:
- Fix handler-factory Step 5d: wire recordDomainFeedback into feedback loop
- Add getQualityFeedbackLoop singleton for cross-module access
- Graceful degradation for optional native modules (FlashAttention, DecisionTransformer)
- Add experience embedding computation on capture
- Add model_tier column to routing_outcomes with tier inference
- Add performance.now() timing to HNSW search and FTS5 searchFTS
- Activate TokenMetricsCollector DB persistence and auto-save on init
- Add per-step latencies to TestSchedulingPipeline result
- WAL checkpoint in brain-checkpoint before RVF export
- Baseline docs and JSON for Tier 3 benchmark comparison

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 14:08:19 +00:00
Dragan Spiridonov 3af20386cf Merge pull request #335 from proffesor-for-testing/march-fixes-and-improvements
chore(release): v3.7.15
v3.7.15
2026-03-09 20:01:50 +01:00
Profa 80b8880aa5 fix(security): escape backslashes before pipe chars in daily-log markdown
Fixes CodeQL js/incomplete-sanitization finding by escaping backslash
characters before pipe escaping, preventing double-escape bypass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 18:40:06 +00:00
Profa 46e482bd50 chore(release): bump version to v3.7.15
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 18:32:16 +00:00
Profa 416c97ab39 feat(learning): implement Six Hats Tier 0-2 improvements and fix test flakiness
Tier 0 (Bug Fixes):
- Fix promotion threshold inconsistency (standardized on 3)
- Add embedding backfill script and ghost pattern health check
- Add FTS5 virtual table with hybrid vector/text search

Tier 1 (Quick Wins):
- Binary reward assignment (+1/-1/0) for outcome-based learning
- At-least-one learning guarantee per session
- Temporal decay on search results (30-day half-life)
- Configurable promotion activity window
- Enable coherence gate by default

Tier 2 (Medium Investments):
- Pre-compaction flush hook to prevent knowledge loss
- OPD remediation hints ("bad because X, fix by Y")
- Per-agent MCP tool scoping for security isolation
- Daily Markdown log tier for audit trail
- Proof-of-Quality CLI command with SHA-256 attestation
- Devil's advocate scoring fixes (FTS normalization, cap, decay, freshness)

Test Fixes:
- Fix queen governance flakiness in domain-handlers tests
- Fix cross-suite singleton contamination in handler-factory and e2e tests
- Fix mcp-server domain tool timeout and invocation failures

610 test files pass, 0 failures, 18,589 tests green.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 17:43:23 +00:00
Profa c0c0ae9fc5 aqe.rvf.manifest.json 2026-03-09 07:39:57 +00:00
Dragan Spiridonov 69ff621aec Merge pull request #333 from proffesor-for-testing/march-fixes-and-improvements
chore(release): v3.7.14
v3.7.14
2026-03-08 16:36:28 +01:00
Profa 3b81b10d30 chore(release): bump version to v3.7.14
Brain export v3.0 (25 tables), witness chain v3 with Ed25519 signing,
streaming for large tables, RVF freeze/derive/indexStats, npm packaging fix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 14:36:26 +00:00
Profa e857dfd646 fix(packaging): reduce npm package from 5473 to 3293 files to fix ENOTEMPTY install error
The massive file count (5473 files / 63MB) triggered npm's ENOTEMPTY race
condition during global install upgrades. Narrowed package.json `files` field
to exclude 2144 source maps and 36 dev-only scripts while keeping all 8
consumer-facing scripts (lifecycle hooks, skill validators, fetch-content).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 08:35:15 +00:00
Dragan Spiridonov a5e014786a Merge pull request #331 from proffesor-for-testing/working-branch-march
chore(release): v3.7.13
v3.7.13
2026-03-07 13:11:51 +01:00
Profa f45c01cd10 fix(security): replace ReDoS-vulnerable regex in trigger-optimizer
CodeQL flagged `parseSkillFrontmatter` regex `/^---\s*\n([\s\S]*?)\n---/`
as polynomial-time on crafted input. Replaced with indexOf-based parsing
that avoids backtracking entirely.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 11:52:12 +00:00