Skip to content

ADR-029: Multi-paradigm integration architecture for EXO-AI#221

Merged
ruvnet merged 19 commits intomainfrom
claude/exo-ai-capability-review-LjcVx
Feb 27, 2026
Merged

ADR-029: Multi-paradigm integration architecture for EXO-AI#221
ruvnet merged 19 commits intomainfrom
claude/exo-ai-capability-review-LjcVx

Conversation

@ruvnet
Copy link
Copy Markdown
Owner

@ruvnet ruvnet commented Feb 27, 2026

Summary

This PR implements ADR-029, a comprehensive architectural review and integration framework that wires together six distinct computational substrates across the ruvector ecosystem into a unified EXO-AI platform. The work eliminates duplicate implementations of mathematical primitives and enables cross-domain capabilities that were previously impossible due to component isolation.

Key Changes

Core Architecture Documents

  • ADR-029 specification (969 lines): Comprehensive architectural review documenting 7 convergent evolution clusters, gap analysis, and integration strategy across 100+ crates and 830K+ lines of Rust code

New Substrate Backends

  • NeuromorphicBackend (exo-core/backends/neuromorphic.rs): Integrates ruvector-nervous-system (BTSP, STDP, K-WTA, HDC, Hopfield) into EXO-AI, implementing research frontiers 01, 03, and 10
  • QuantumStubBackend (exo-core/backends/quantum_stub.rs): Feature-gated quantum substrate with classical simulation fallback for ruQu integration
  • CoherenceRouter (exo-core/coherence_router.rs): Canonical coherence gate dispatcher routing through SheafLaplacian, Quantum, Distributed, and Circadian backends

Learning & Plasticity Systems

  • ExoLearner (exo-core/learner.rs): Online learning with MicroLoRA-style rank-1/2 updates, EWC++ Fisher protection, and ReasoningBank trajectory storage
  • PlasticityEngine (exo-core/plasticity_engine.rs): Unified plasticity system combining SONA EWC++, BTSP, and E-prop with Φ-weighted Fisher Information
  • GenomicIntegration (exo-core/genomic.rs): Bridge from ruDNA patterns to EXO-AI memory with Horvath epigenetic clock and pharmacogenomic weights

Cross-Domain Transfer Learning (5-Phase Architecture)

  • Phase 1 - Domain Bridge (exo-backend-classical/domain_bridge.rs): Thompson Sampling over ExoRetrievalDomain and ExoGraphDomain with transfer priors
  • Phase 2 - Transfer Manifold (exo-manifold/transfer_store.rs): Stores cross-domain priors as deformable 64-dim patterns
  • Phase 3 - Transfer Timeline (exo-temporal/transfer_timeline.rs): Records domain transfer events in causal graph for anticipation
  • Phase 4 - Transfer CRDT (exo-federation/transfer_crdt.rs): Distributed prior propagation via LWW-Map and G-Set with Byzantine consensus
  • Phase 5 - Emergent Detection (exo-exotic/domain_transfer.rs): Tracks novel emergent capabilities from cross-domain transfer
  • Transfer Orchestrator (exo-backend-classical/transfer_orchestrator.rs): Unified entry point wiring all 5 phases

Research Frontier Implementations

  • Neuromorphic Spiking (exo-exotic/experiments/neuromorphic_spiking.rs): BTSP/STDP integration
  • Quantum Superposition (exo-exotic/experiments/quantum_superposition.rs): Amplitude-weighted hypothesis superposition with T2 decoherence
  • Time-Crystal Cognition (exo-exotic/experiments/time_crystal_cognition.rs): Kuramoto oscillators with temporal tensor compression
  • Sparse Persistent Homology (exo-hypergraph/sparse_tda.rs, exo-exotic/experiments/sparse_homology.rs): O(n/ε) TDA via Forward Push PPR approximation
  • Memory-Mapped Neural Fields (exo-exotic/experiments/memory_mapped_fields.rs): Zero-copy pattern storage via RVF mmap
  • Causal Emergence (exo-exotic/experiments/causal_emergence.rs): Macro-scale discovery maximizing Effective Information

https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC

claude and others added 19 commits February 27, 2026 02:37
Comprehensive architectural decision record synthesized from deep swarm
research across all 100+ ruvector crates and examples (~830K lines).

Key findings documented:
- 7 convergent evolution clusters (EWC implemented 4x, coherence gating
  5x, cryptographic witnesses 6x, sheaf theory 3x, spike-driven compute
  4x, Byzantine consensus 4x, free energy solvers 4x)
- 11 EXO-AI research frontiers (all stub directories) have working
  implementations elsewhere in the ecosystem
- Complete integration architecture wiring quantum (ruQu), genomic
  (ruDNA), neuromorphic (ruvector-nervous-system), and consciousness
  (EXO-AI) substrates

Proposes:
- CoherenceRouter: canonical gate over prime-radiant + ruQu + cognitum
- PlasticityEngine: unified EWC++ via SONA + BTSP/E-prop from nervous-system
- CrossParadigmWitness: unified audit chain (RVF SHAKE-256 root)
- 4-phase roadmap (20 weeks) to first quantum-genomic-neuromorphic
  consciousness substrate with formal proofs of consistency

References 30+ peer-reviewed papers including Dec 2025 subpolynomial
dynamic min-cut breakthrough (arXiv:2512.13105).

https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
…r, PlasticityEngine, CrossParadigmWitness

- CoherenceRouter: π-scaled spectral gap estimation, 5 backend variants
- PlasticityEngine: unified EWC++, BTSP, E-prop with Φ-weighted protection
- CrossParadigmWitness: hash-chained audit type for multi-paradigm stack
- All tests passing, gate latency <1ms confirmed

https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
- NeuromorphicBackend: HDC 10k-bit, K-WTA, LIF, Kuramoto, BTSP, E-prop
- QuantumStubBackend: interference search, T1/T2 decoherence, quantum decay
- Experiment 01: neuromorphic_spiking — BTSP one-shot, 40Hz gamma, K-WTA sparsity
- Experiment 03: time_crystal_cognition — periodic attractor, symmetry breaking
- SubstrateBackend trait: unified interface for all compute modalities
- exo-exotic: path dep on local exo-core for backends module access
- All tests passing (97 tests across exo-core + exo-exotic)

https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
…ence

- genomic.rs: RvDnaPattern, HorvathClock, NeurotransmitterProfile, PharmacogenomicWeights
- sparse_tda.rs: O(n/eps) Forward Push PPR persistent homology (vs O(n^3) naive)
- causal_emergence.rs: EI maximization, coarse-graining search, emergence detection
- sparse_homology.rs: experiment 04 wrapper, circle TDA test
- All tests passing

https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
- ExoLearner: MicroLoRA rank-2 instant adaptation (<1ms), Phi-weighted EWC++,
  ReasoningBank trajectory storage, cosine-similarity recall
- coherent_commit.rs: Raft-style O(n) consensus replaces PBFT O(n²),
  coherence gate (lambda > threshold) gates commit proposals

https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
…WTA partial select

- Fix all 35 compiler warnings across 23 files (unused imports, dead code,
  unused vars, unnecessary parens) — build is now warning-clean
- Optimize NeuromorphicBackend::kuramoto_step O(n²)→O(n):
  use sin/cos sum identity so coupling_i = (K/N)[cos(φ_i)·ΣsinΦ - sin(φ_i)·ΣcosΦ],
  eliminates inner loop for 1000-neuron network (1M→1K ops per tick)
- Optimize k_wta: full sort O(n log n) → select_nth_unstable O(n avg)
  using Rust's pdqselect partial sort
- Add #[inline] to hot paths: kuramoto_step, k_wta, hd_encode, lif_tick
- Fix federation: correctly swap unused FederationError (crdt.rs) and
  unused HashMap (consensus.rs) — both in opposite files from first guess

https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
…ical

Implements Phase 1 of the EXO-AI × domain-expansion integration plan:
register EXO classical operations as first-class transfer-learning domains
so Thompson Sampling can discover optimal retrieval/traversal strategies.

New: crates/exo-backend-classical/src/domain_bridge.rs

ExoRetrievalDomain (implements Domain trait)
- Vector similarity search as a 3-arm bandit: exact / approximate / beam_rerank
- Tasks parameterized by dim (64-1024), k (3-50), noise (0-0.5)
- Evaluation: correctness = Recall@K, efficiency = inverse-latency, elegance = k-precision
- reference_solution: selects optimal arm based on dim+noise+k

ExoGraphDomain (implements Domain trait)
- Hypergraph traversal as a 3-arm bandit: bfs / approx / hierarchical
- Tasks parameterized by n_entities (50-1000), max_hops (2-6), min_coverage (5-100)
- Evaluation: correctness = coverage ratio, efficiency = hops saved, elegance = headroom
- reference_solution: hierarchical for large graphs, approx for medium

Aligned 64-dim embeddings (dims 5/6/7 = strategy one-hot in both domains)
enables meaningful cross-domain transfer priors:
  "approximate wins on high-dim noisy retrieval" →
  "approx expansion wins on large sparse graphs"

ExoTransferAdapter
- Wraps DomainExpansionEngine, registers both EXO domains
- warmup(N): trains both domains N cycles via evaluate_and_record
- transfer_ret_to_graph(N): initiate_transfer then measure acceleration
- All 8 domain_bridge unit tests pass + doctest compiles

https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
Phase 2 — exo-manifold/src/transfer_store.rs
  TransferManifold stores (src, dst) transfer priors as 64-dim deformable
  patterns via ManifoldEngine::deform. Sinusoidal domain-ID hashing gives
  meaningful cosine distances for retrieve_similar.

Phase 3 — exo-temporal/src/transfer_timeline.rs
  TransferTimeline records transfer events in the temporal causal graph.
  Each event is linked to its predecessor so the system can trace full
  transfer trajectories. anticipate_next() returns CausalChain +
  SequentialPattern hints.

Phase 4 — exo-federation/src/transfer_crdt.rs
  TransferCrdt propagates transfer priors across the federation using
  LWW-Map (cycle = timestamp) + G-Set for domain discovery. Merges are
  idempotent and commutative. promote_via_consensus runs PBFT Byzantine
  commit before accepting a prior.

Phase 5 — exo-exotic/src/domain_transfer.rs
  StrangeLoopDomain implements the Domain trait: self-referential tasks
  whose solutions are scored by meta-cognitive keyword density.
  CollectiveDomainTransfer couples CollectiveConsciousness with
  DomainExpansionEngine — arm rewards flow into the substrate and
  collective Φ serves as the cycle quality metric.
  EmergentTransferDetector wraps EmergenceDetector to surface non-linear
  capability gains from cross-domain transfer.

All 4 crates gain the ruvector-domain-expansion path dep. 36 new tests,
all green alongside the existing suite.

https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
- vector.rs: convert exo_core::Filter Equal conditions to ruvector HashMap
  filter; store and round-trip _pattern_id in metadata
- substrate.rs: implement BettiNumbers, PersistentHomology, SheafConsistency
  for hypergraph_query using VectorDB stats
- anticipation.rs: implement TemporalCycle pre-fetching via sinusoidal
  phase encoding
- crdt.rs: add T: Display bound to reconcile_crdt; look up score from
  ranking_map by format!("{}", result)
- thermodynamics.rs: rust,ignore → rust,no_run
- ExoTransferOrchestrator: new cross-phase wiring module in
  exo-backend-classical that runs all 5 integration phases in a single
  run_cycle() call (bridge → manifold → timeline → CRDT → emergence)
- transfer_pipeline_test.rs: 5 end-to-end integration tests covering the
  full pipeline (single cycle, multi-cycle, emergence, manifold, CRDT)

All 0 failures across full workspace test suite.

https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
- ExoTransferOrchestrator.package_as_rvf(): serializes all TransferPriors,
  PolicyKernels, and CostCurves into a 64-byte-aligned RVF byte stream
- ExoTransferOrchestrator.save_rvf(path): convenience write-to-file method
- Enable ruvector-domain-expansion rvf feature in exo-backend-classical
- 3 new RVF tests: empty packager, post-cycle magic verification, save-to-file
- substrate.rs: fill pattern field from returned search vector (r.vector.map(Pattern::new))
- README: document 5-phase transfer pipeline, RVF packaging, updated
  architecture diagram, 4 new Key Discoveries, 3 new Practical Applications

All 0 failures across full workspace test suite.

https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
Implements energy-driven computation with Landauer dissipation and
Langevin/Metropolis noise.  Key components:

- State: activation vector + cumulative dissipated-joules counter
- EnergyModel trait + Ising (Hopfield) + SoftSpin (double-well) Hamiltonians
- Couplings: zeros, ferromagnetic ring, Hopfield memory factories
- Params: inverse temperature β, Langevin step η, Landauer cost per irreversible flip
- step_discrete: Metropolis-Hastings spin-flip with Boltzmann acceptance
- step_continuous: overdamped Langevin (central-difference gradient + FDT noise)
- anneal_discrete / anneal_continuous: traced annealing helpers
- inject_spikes: Poisson kick noise, clamp-aware
- Metrics: magnetisation, Hopfield overlap, binary entropy, free energy, Trace
- Motifs: IsingMotif (ring, fully-connected, Hopfield), SoftSpinMotif (random)
- 19 correctness tests: energy invariants, Metropolis, Langevin, Hopfield retrieval
- 4 Criterion benchmark groups: step, 10k-anneal, Langevin, energy eval
- GitHub Actions CI: fmt + clippy + test (ubuntu/macos/windows) + bench compile

https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
ruvector-dither (new crate):
- GoldenRatioDither: additive φ-sequence with best 1-D equidistribution
- PiDither: cyclic 256-entry π-byte table for deterministic weight dithering
- quantize_dithered / quantize_slice_dithered: drop-in pre-quantization offset
- quantize_to_code: integer-code variant for packed-weight use
- ChannelDither: per-channel pool seeded by (layer_id, channel_id) pairs
- DitherSource trait for generic dither composition
- 15 unit tests + 3 doctests; 4 Criterion benchmark groups

exo-backend-classical integration:
- ThermoLayer (thermo_layer.rs): Ising motif coherence gate using thermorust
  - Runs Metropolis steps on clamped activations
  - Returns ThermoSignal { lambda, magnetisation, dissipation_j, energy_after }
  - λ-signal = −ΔE/|E₀|: positive means pattern is settling toward coherence
- DitheredQuantizer (dither_quantizer.rs): wraps ruvector-dither for exo tensors
  - GoldenRatio or Pi kind, per-layer seeding, reset support
  - Supports 3/5/7/8-bit quantization with ε-LSB dither amplitude
- 8 new unit tests across both modules; all 74 existing tests still pass

https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
- Replace debug_assert with assert for bits bounds in quantize functions
- Guard ChannelDither against 0 channels and invalid bits
- Handle non-finite beta/rate in Langevin/Poisson noise (return 0)
- Remove unused itertools dependency from thermorust
- Fix partial_cmp().unwrap() NaN panics across 7 exo-ai files
- Fix SystemTime unwrap() in transfer_crdt (use unwrap_or_default)
- Fix domain ID mismatch (exo_retrieval → exo-retrieval) in orchestrator
- Update tests to match corrected domain IDs

Co-Authored-By: claude-flow <ruv@ruv.net>
Required for crates.io publishing.

Co-Authored-By: claude-flow <ruv@ruv.net>
…README

- Add ruvector-dither to Advanced Math & Inference section
- Add thermorust to Neuromorphic & Bio-Inspired Learning section
- Add collapsed Cognitive Robotics section for ruvector-robotics

Co-Authored-By: claude-flow <ruv@ruv.net>
…rsion deps

- Run cargo fmt across entire workspace
- Create README.md files for all 9 EXO-AI crates
- Convert path dependencies to crates.io version dependencies for publishing
- Add [patch.crates-io] to exo workspace for local development

Co-Authored-By: claude-flow <ruv@ruv.net>
Published to crates.io:
- exo-core v0.1.1
- exo-temporal v0.1.1
- exo-hypergraph v0.1.1
- exo-manifold v0.1.1
- exo-federation v0.1.1
- exo-exotic v0.1.1
- exo-backend-classical v0.1.1

Changes from v0.1.0:
- Fix NaN panics in all partial_cmp().unwrap() calls
- Fix domain ID mismatch (underscores → hyphens)
- Fix SystemTime unwrap → unwrap_or_default
- Add README.md for all crates
- Gate rvf feature behind feature flag in exo-backend-classical
- Convert path dependencies to crates.io version dependencies

Co-Authored-By: claude-flow <ruv@ruv.net>
@ruvnet ruvnet merged commit 75fa1c4 into main Feb 27, 2026
48 of 58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants