Files
ruflo/v3/docs/adr
rUvandr 56fe4dc604 feat: ecosystem convergence — agentdb 3.0.0, agentic-flow 3.0.0, AIMDS packs; release 3.67.0 (#4628)
* fix(aidefence): restore the ADR-118 wider-detection pass to source (3.0.4)

@claude-flow/aidefence 3.0.3 (npm latest) was published from an uncommitted
tree carrying the ADR-118 / #2004 patterns, so main never had them, and
main's #3177 ReDoS bounds never reached npm. 3.0.4 is a true superset:
the verb-noun override window, behave-as role hijack and god/root/admin/sudo
mode jailbreak markers, on top of main's bounded PII/marker regexes.
Parity against the published 3.0.3 dist: 24-input corpus, 0 regressions.
Drops publishConfig.tag=alpha. Refs #4625.

Co-Authored-By: RuFlo <ruv@ruv.net>

* feat(aidefence): merge AIMDS pattern packs into ThreatDetectionService (3.1.0)

Vendors the AIMDS pack engine (normalize, decoders, pattern-loader, engine)
and its six pattern packs (53 patterns) from midstream AIMDS at abe78d6 into
src/domain/services/packs/. Packs are embedded as TS modules, so they load
from the published ESM dist with no fs path lookup; the files allowlist is
unchanged.

ThreatDetectionService.detect() runs the packs in a second pass over the raw
input and merges findings into the existing result shape (one threat per
type, as before). Built-in patterns, including the ADR-118 extras, stay and
their confidences are unchanged. Packs are on by default; disable or select
them with createThreatDetectionService({ packs }) or createAIDefence({ packs }).
The legacy pattern-array argument still works.

- ThreatType gains tool_invocation, data_exfiltration, markup_forgery;
  Threat gains an optional ruleId (e.g. EX-001) for pack findings.
- Packs are validated, compiled and regex-warmed once per process, so
  isSafe()/checkThreats() no longer pay a compile per call and the first
  detect() is not charged ~17 ms of lazy regex compilation.
- Fixes a quadratic regex in the vendored normaliser (undoLeet): 100 KB of
  hex digits took 1.8 s; now 6 ms. Decoders cap each blob before decoding.

Corpus (55 attacks / 30 legit): built-ins only 8/55, packs on 55/55; false
positives F13 and F27 in both modes (built-in encoding_attack), pinned.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(memory): build AgentDB controllers with an embedder and the shared vector backend

LearningSystem, NightlyLearner, ExplainableRecall and the graph transformer's
CausalMemoryGraph take (db, embedder, ...). The registry passed only the
database, so the first predict/discover/recall threw on this.embedder (the
#3327 Finding A class, fixed for ReasoningBank only). Real-agentdb test fails
on the old source (learningSystem.embedder undefined). memory suite 659/659.
Adds ADR-513 (stable versions, convergence) and ADR-516 (aidefence recovery).

Co-Authored-By: RuFlo <ruv@ruv.net>

* feat(cli): move to agentic-flow ^2.2.0 (main line); stable-only tag policy

- agentic-flow ^3.0.0-alpha.1 resolved to the March 3.0.0-alpha.2, which
  pulled @xenova/transformers -> onnx-proto -> protobufjs 6 (critical).
  2.2.0 is agentic-flow's main line (ADR-515). The update validator and the
  init doc table follow.
- neural-tools: computeEmbedding returns a Float32Array, which JSON.stringify
  writes as {"0":...}; convert to an array before the neural store.
- CLAUDE.md: no more alpha/v3alpha/next dist-tags (ADR-513); overrides do not
  reach users; examples use ruflo@latest.

Co-Authored-By: RuFlo <ruv@ruv.net>

* chore(cli): pin @claude-flow/aidefence 3.1.0 (AIMDS pattern packs)

Co-Authored-By: RuFlo <ruv@ruv.net>

* chore(cli): target agentic-flow ^3.0.0 (first stable 3.x, ADR-515)

agentic-flow's security defaults change in a breaking way (agents no longer
bypass permissions by default, proxies need a token), so the main line ships
as 3.0.0 rather than 2.2.0. That also gives the 3.x alpha line a stable head:
existing ^3.0.0-alpha.1 installs resolve to it and drop the March alpha's
protobufjs 6 (critical).

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(memory): capture AgentDB's backend failure reason from stderr too

agentdb 3.0.0 moves library diagnostics off stdout (they corrupted stdio MCP
JSON-RPC), so the #4622 lock-reason capture patches console.error as well.

Co-Authored-By: RuFlo <ruv@ruv.net>

* docs(adr): ADR-514 agentdb 3.0.0, ADR-515 agentic-flow 3.0.0, ADR-517 AIMDS pattern packs

Co-Authored-By: RuFlo <ruv@ruv.net>

* chore(memory): 3.2.1 (embedder wiring, stderr reason capture)

Co-Authored-By: RuFlo <ruv@ruv.net>

* chore(release): 3.67.0 — agentdb 3.0.0, agentic-flow 3.0.0, aidefence 3.1.0, memory 3.2.1

- CLI and the claude-flow umbrella declare agentic-flow ^3.0.0 (root lock and
  v3 pnpm lock resolve 3.0.0 / agentdb 3.0.0).
- CHANGELOG 3.67.0.

Co-Authored-By: RuFlo <ruv@ruv.net>

* test/docs: dated ADRs 513-517; scope the bracket/DAN timing test to built-ins

- ADRs 513-517 gain Date lines (the console ADR parser expects >97% dated)
  and ADR-513/516 name the versions that shipped (agentic-flow 3.0.0,
  aidefence 3.1.0).
- threat-detection 'bounds the bracket and DAN patterns' measures the
  built-in regexes it was written for ({ packs: false }); the AIMDS packs
  have their own 100 KB adversarial timing test. Full detector on that input:
  86 ms locally, 301 ms on the CI runner (linear, budget was 200 ms).

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(deps): stop pinning ruvector 0.2.27 under agentdb 3.0.0; CLI agentdb ^3.0.0

The root (and ruflo wrapper) overrides pinned ruvector ^0.2.27 from the BEIR
work (3.10.29). npm applies overrides inside this repo's tree, so CI ran
agentdb 3.0.0 on ruvector 0.2.27, below agentdb's own ^0.2.40: a pairing no
user ever installs (published overrides are ignored), and the one where #2226
pattern recall failed on CI. Raised to ^0.2.41.

The CLI's agentdb range moves to ^3.0.0 (stable; no alpha ranges, ADR-513),
so the v3 pnpm lock resolves 3.0.0 and the v3 test job exercises what users
get instead of 3.0.0-alpha.20. 115 agentdb/memory-related CLI test files:
868/868 on 3.0.0.

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-10-31 17:59:28 -04:00
..

Claude Flow V3 - Architecture Decision Records

All ADRs are located in /v3/implementation/adrs/.

ADR Title Status
ADR-001 Adopt agentic-flow as Core Foundation Complete
ADR-002 Domain-Driven Design Structure Complete
ADR-003 Single Coordination Engine Complete
ADR-004 Plugin Architecture Complete
ADR-005 MCP-First API Design Complete
ADR-006 Unified Memory Service Complete
ADR-007 Event Sourcing Complete
ADR-008 Vitest Testing Complete
ADR-009 Hybrid Memory Backend Complete
ADR-010 Node.js Only Complete
ADR-011 LLM Provider System Complete
ADR-012 MCP Security Features Complete
ADR-013 Core Security Module Complete
ADR-014 Workers System Complete
ADR-015 Unified Plugin System Complete
ADR-016 Collaborative Issue Claims Complete
ADR-017 RuVector Integration Complete
ADR-018 Claude Code Integration Complete
ADR-019 Headless Runtime Package Complete
ADR-020 Headless Worker Integration Complete
ADR-046 Dual Umbrella: claude-flow + ruflo Accepted
ADR-047 Fast Mode Integration Proposed
ADR-178 Verifiable Memory Governance and RepE IPI Detection Proposed
ADR-301 Promotional Status Surface for CLI Runtime Proposed
ADR-302 Post-Initialization Capability Enrollment Proposed
ADR-303 Intelligent Credit Exhaustion Experience Proposed
ADR-304 Local Meta LLM Proxy Product Proposed
ADR-305 Customer Lifecycle Funnel (RuFlo → Cognitum) Proposed
ADR-306 Cognitum Authentication and Account Linking Proposed
ADR-307 Proxy Runtime, Packaging, and Service Lifecycle Proposed
ADR-308 Cognitum Public API and Server Contract Proposed
ADR-309 Funnel Governance, Privacy, and Ecosystem Policy Proposed
ADR-310 Funnel Rollout, Measurement, and Emergency Controls Proposed
ADR-320 MCP Tool Composition Inspector + Inter-Agent Channel Guardrails Accepted
ADR-323 Typed Memory Provenance in AgentDB (MemIR-style claim typing, corrects #2804's dream-cycle proposal) Accepted
ADR-324 Agentic Policy Engine and Policy-Governed Codex Swarms Accepted
ADR-325 Claim Federation as a Zero-Trust Capability and Work-Ownership Plane Proposed
ADR-326 Cognitum Product-Plane Claim Federation Profile Proposed
ADR-327 Federated Concurrent Development Harness Proposed
ADR-328 Cognitum-Assisted Agent Learning Capability Plane Proposed
ADR-329 Ruflo Capability Brain for MCP Guidance Accepted
ADR-330 Adaptive Pheromone Swarm Consensus Accepted
ADR-331 Project-Local Flywheel Evaluation Anchors Accepted
ADR-332 Hermetic Release Verification and Supported Runtime Baseline Accepted
ADR-333 Efficiency-First Orchestration — Pre-hoc Failure Inference and Adaptive Agent Count Routing Proposed
ADR-334 Hierarchical Consensus Topology for Large-Scale Swarm Coordination Proposed
ADR-335 Upgrade to Multi-Vector HNSW (MV-HNSW) for Agent Memory Retrieval Proposed
ADR-336 Agent Authorization Propagation and MCP Authentication Enforcement Proposed
ADR-337 Plugin Supply Chain Integrity and Memory Namespace Governance Proposed
ADR-338 SONA Behavioral Trajectory Auditing via Embedding-Space Trait Vectors Proposed
ADR-339 Memory Write Integrity Validation & MCP Tool Verification Proposed
ADR-340 Retrospective Harness Optimization (RHO) for SONA Intelligence Loop Proposed
ADR-341 Multi-Signal Memory Retrieval Proposed
ADR-342 RuVector Production-Scale Backend Adoption Proposed
ADR-343 Shared-Context Parallel Dispatch for Multi-Agent Performance Proposed
ADR-344 Knowledge Graph Index for ReasoningBank Proposed
ADR-345 Swarm Credit Routing via Shapley-Value Attribution Proposed
ADR-346 Multi-Layer Agent Security Stack Proposed
ADR-347 Trajectory-Quality JUDGE Scoring for ReasoningBank Proposed
ADR-348 Task-Adaptive Swarm Topology Selector Proposed
ADR-349 FLARE-Style Lookahead Planning Buffer for SONA Intelligence Layer Proposed
ADR-350 Trust-Weighted Consensus for Swarm Coordination Proposed
ADR-351 Stateful Execution Loop with KV-Cache Discipline and Agent Execution Graphs Proposed
ADR-352 MCP Tool Permission Attestation (Min-Privilege Contract) Proposed
ADR-353 Trace-to-Skill Distillation for Intelligence Pipeline Proposed
ADR-354 AgentDB Memory Write Verification and Temporal Supersession Layer Proposed
ADR-355 Reinforcement-Learned Stopping Policy for Ruflo Swarm Orchestration Proposed
ADR-356 Cross-Agent KV-Cache Sharing for Swarm Performance Proposed
ADR-357 Dimension-Aware Intelligence Routing for Heterogeneous Agent Pools Proposed
ADR-358 AutoMem-Style RL Training Loop for AgentDB Memory Operations Proposed
ADR-359 Swarm Dissent Mechanism: Inverse-Wisdom Law Compliance Proposed
ADR-360 Cross-Agent Shared KV Pool (PolyKV Architecture) Proposed
ADR-361 Skill Evolution Worker (SEW) — Runtime RL-Based Skill Acquisition for SONA Proposed
ADR-362 HNSW-as-Communication-Fabric (HCF) for RuVector Swarm Knowledge Gossip Proposed
ADR-363 Workflow-Atomic Inference Scheduling (WAIS) for Multi-Agent Execution Proposed
ADR-364 Plugin Supply-Chain Scanner and Behavioral Manifest Proposed
ADR-365 Recurrence-Gated Memory Consolidation for AgentDB Proposed
ADR-366 Self-Evolving Swarm Skill Distillation via Trajectory Feedback Proposed
ADR-367 Epistemic Working Memory in the Intelligence Pipeline Proposed
ADR-368 Selective Persistent Memory Categories for AgentDB Proposed
ADR-369 Information-Bottleneck Vector-Quantized Inter-Agent Messaging Proposed
ADR-370 World-Model Agent Planning for Cost-Aware Task Pre-Simulation Proposed
ADR-371 Neural Cryptographic Authorization Gate for Agentic Action Execution Proposed
ADR-372 Cognitive Mode Router for Agent Memory Query Dispatch Proposed
ADR-373 Budget-Dependent Memory Operator Selection (OAS) Proposed
ADR-374 SubagentPermissionDelegate: Workspace-Scoped Privilege Delegation for Swarm Agents Proposed
ADR-375 Agentic Inference Benchmarking Standard + Mixture-of-Agents Test-Time Scaling Proposed
ADR-376 Heterogeneous Agent Ensemble Composition API Proposed
ADR-377 AgentDB Retrieval Security Layer Proposed
ADR-378 npm Trusted Publishing for CI/CD Release Automation Proposed
ADR-379 Optional Context/Session/Week Usage Segments and Extra Statusline Lines Proposed
ADR-380 AGNTCY/Outshift Runtime Integration: SLIM Transport, CASA Enforcement, IOC Coordination Events Proposed

Summary Documents

Performance Targets

Metric Target Status
HNSW Search 150x-12,500x faster ✅ Achieved
Flash Attention 2.49x-7.47x speedup ✅ Achieved (alpha.102)
Memory Reduction 50-75% ✅ Achieved
MCP Response <100ms ✅ Achieved
CLI Startup <500ms ✅ Achieved

Neural Features (alpha.102+)

Component Status Lines Notes
SONA Optimizer ✅ Real 841 Pattern learning from trajectories
EWC++ Consolidation ✅ Real ~600 Fisher matrix, prevents forgetting
MoE Router ✅ Real ~500 8 experts with gating network
Flash Attention ✅ Real ~500 O(N) block attention
LoRA Adapter ✅ Real ~400 128x compression (rank=8)
Hyperbolic Embeddings ✅ Real - Poincaré ball model
Int8 Quantization ✅ Real - 3.92x memory savings

Security Status

CVE Severity Status
CVE-2 Critical ✅ Fixed
CVE-3 Critical ✅ Fixed
HIGH-1 High ✅ Fixed
HIGH-2 High ✅ Fixed

Security Score: 10/10


Last Updated: 2026-01-14 CLI Version: @claude-flow/cli@3.0.0-alpha.104