Files
ruflo/v3/docs/adr
ruv 9de004b3f6 feat(metaharness): ADR-152 spike landed — similarity invariants pass, ADR Accepted (iter 35)
ADR-152 §"Smallest demonstrable spike" gate REACHED. Both invariants
verified on synthetic fixtures; ADR-152 graduates Proposed → Accepted.

MEASURED RESULTS
  similarity(LEGAL, LEGAL).overall = 1.0000  ✓ Invariant 1 (self-match exact)
  similarity(LEGAL, SUPPORT)       = 0.8296
  similarity(LEGAL, DEVOPS)        = 0.5840  ✓ Invariant 2 (vertical affinity)

  Per-component (LEGAL vs SUPPORT):  cosine=0.9987  categorical=0.75  jaccard=0.2857
  Per-component (LEGAL vs DEVOPS):   cosine=0.9734  categorical=0     jaccard=0

NOTABLE SPIKE FINDINGS
- Numerical cosine alone is too coarse: LEGAL vs DEVOPS scored cosine
  0.9734 despite being unrelated verticals. The numerics cluster around
  similar score ranges. Categorical + jaccard pulled the composite
  correctly to 0.58 vs 0.83.
- The 0.6/0.25/0.15 weighting from ADR-152 §Decision reproduces the
  intended ordering on the synthetic LEGAL/SUPPORT/DEVOPS fixtures.
- `categorical: 0` for LEGAL/DEVOPS correctly fires because they share
  no enum field (different archetypes, templates, modes). This is a
  strong feature of the design — categorical disagreement is a clean
  kill-switch for similarity.

THE SPIKE (50 LOC) IMPLEMENTS
- projectToVec()         — 9-dim numerical feature vector
- cosine()               — over the 9 numerics
- categoricalAgreement() — 4-field enum agreement / 4
- jaccard()              — set similarity over agent_topology
- similarity()           — weighted composite per ADR-152

ARCHITECTURAL CONSTRAINTS (all four preserved)
- Removable      ✓ pure-TS, reads JSON the CLI emits
- Optional       ✓ no new @metaharness/* dep
- Graceful       ✓ guards on missing fields, never throws
- CI gate        ✓ standalone unit-runnable, no npx required

LIFECYCLE NOTE
The spike STAYS in the codebase as the regression-suite anchor for
the two invariants. When the full feature lands (ADR-152 implementation
PR), it goes into `_similarity.mjs`; this `_spike-similarity.mjs`
remains as the gate that any future weight tweak must still pass.

DOCS UPDATED
- ADR-152 status: Proposed → Accepted, with measured spike results
  and per-component breakdown inlined
- ADR-151 §3.1 marker upgraded: "DRAFTED iter 34" → "ACCEPTED iter 35
  — spike landed, both invariants pass"

SMOKE STEP 17x
- Spike script exists, parses, declares the 3-component formula literal
- Both invariants explicitly named in source
- LEGAL/SUPPORT/DEVOPS fixtures present (anti-regression on the spike)
- Fail-closed exit
- ADR-152 status = Accepted in source
- ADR-151 §3.1 marker upgraded

Smoke: 39 → 40. Fleet: 33/33.

The Phase-3 critical path is now unblocked. ADR-153 (Recommendation
Engine), ADR-154 (Fleet Drift), and ADR-156 (Plugin Compat) can begin
once the user/maintainer decides to start them — they all consume
similarity() as the iter-35 spike implements it.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-06-16 16:17:05 -04:00
..
2026-02-08 17:21:23 +00: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

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