Metatron-R is a post-symbolic cognition engine that models the Metatron Cube geometry and orchestrates a layered stack of oscillators, resonance fields, and adaptive agents. The crate exposes a configurable MetatronEngine that combines low-level geometric cognition with higher-order feedback loops so applications can experiment with hybrid symbolic/embodied reasoning pipelines in pure Rust.
- Canonical Metatron geometry – The crate defines the 13 canonical nodes of the Metatron Cube, their coordinates, and the primary edge sets, enabling downstream modules to reason about distances, adjacency, and node lookup by label or index.
- Graph representation and symmetry operations –
MetatronCubeGraphbuilds weighted adjacency matrices, supports dynamic edge manipulation, and can apply permutation matrices derived from the symmetry utilities for group-theoretic exploration. - Structured cube operators –
MetatronCuberegisters C6 rotations and D6 reflections, exposes solid memberships (tetrahedron, cube, octahedron, etc.), and allows custom operators to be installed for experimentation with new symmetries. - Configurable low-level agent –
MetatronAgentwires the cube graph, QLogic oscillator, and monolith decision kernel, validating configuration for oscillator nodes, tripolar operators, and optional semantic prototypes before running cognition steps. - Spectral cognition pipeline – The QLogic subsystem generates oscillator patterns, computes Fourier-like spectra, estimates entropy, and consults the semantic field for prototype classification while emitting rich diagnostics.
- High-level master orchestration –
MasterAgentintegrates SpiralMemory embeddings, Gabriel cell lattices, the Mandorla resonance field, and Seraphic feedback filters to transform heterogeneous inputs into binary decisions and intermediate telemetry. - Adaptive cognition tooling – The QDASH agent and meta-interpreter provide iterative resonance cycles and sliding-window adaptation of Mandorla parameters and oscillator frequency, enabling online tuning of decision behaviour.
- Resonance tensor networks – Multi-dimensional resonance fields can be stepped, modulated, and evaluated for coherence or singularities, then aggregated inside a
TensorNetworkfor cross-field analysis. - Quantum and field utilities – Helper modules expose phase-tracking field vectors, quantum state/operators derived from permutation matrices, and history/logging utilities for capturing cognition traces.
- Export and visualization helpers – JSON serializers publish nodes, edges, adjacency matrices, and symmetry groups, while visualization helpers turn histories and vector bundles into plotting-friendly series.
- Rust 1.70+ (stable toolchain recommended)
Clone the repository and build the library:
cargo buildRun the test suite to validate all subsystems:
cargo testThe engine accepts any input that can convert into a SeraphicValue (text, numbers, or numeric sequences). Construct an engine with defaults and execute a cognition cycle:
use metatron_rust::{MetatronEngine, EngineSnapshot};
use metatron_rust::error::EngineResult;
fn main() -> EngineResult<()> {
let mut engine = MetatronEngine::new()?;
let snapshot: EngineSnapshot = engine.cycle([
"CYBER", // &str -> SeraphicValue::Text
7.5, // f64 -> SeraphicValue::Number
vec![0.1, 0.3, 0.5], // Vec<f64> -> SeraphicValue::Sequence
])?;
println!("Mandorla resonance: {:.3}", snapshot.master_output.mandorla_resonance);
println!("QLogic entropy: {:.3}", snapshot.agent_step.qlogic.entropy);
Ok(())
}MetatronEngine::new materialises both the low-level agent and master agent from their default configurations, then cycle feeds the master agent and advances the oscillator-driven agent in lock-step. Input values are promoted via the SeraphicValue enum, so strings, numbers, and numeric vectors can flow through the Seraphic feedback filter without additional adapters.
For finer control, instantiate an EngineConfig and tweak the nested agent parameters:
use metatron_rust::config::{EngineConfig, AgentConfig, TripolarConfig, PrototypeConfig, MasterAgentConfig};
use metatron_rust::MetatronEngine;
let config = EngineConfig {
agent: AgentConfig {
qlogic_nodes: 21,
operators: vec![TripolarConfig { psi: 0.7, rho: 0.8, omega: 0.9 }; 4],
semantic_prototypes: vec![PrototypeConfig::new("harmonics", vec![1.0; 21])],
monolith_threshold: 1.2,
},
master: MasterAgentConfig {
gabriel_cells: 5,
mandorla_alpha: 0.4,
mandorla_beta: 0.6,
spiral_alpha: 0.08,
},
};
let mut engine = MetatronEngine::from_config(config)?;Configuration structs enforce sensible defaults and validation, rejecting zero-node oscillators, missing tripolar operators, or invalid Mandorla parameters before a cycle begins.
The crate is organised into layers that mirror the cognition pipeline:
- Geometry & Symmetry Layer –
geometry,graph,cube, andsymmetriesprovide the static lattice, adjacency matrices, and permutation utilities that back every higher layer. - Oscillation & Semantics Layer –
qlogic,semantic_field,field_vector, andquantumimplement oscillator dynamics, spectral analysis, and quantum-inspired transformations. - Resonance & Memory Layer –
mandorla,spiralmemory,resonance_tensor, andtensor_networkhandle resonance scoring, spiral embeddings, and multi-field coherence tracking. - Agents & Adaptation Layer –
agent,master_agent,qdash_agent, andmeta_interpretercoordinate cognition cycles, feedback decisions, and adaptive retuning. - I/O & Observability Layer –
api,history, andvisualizationexport structured results and help visualise resonance histories for downstream analytics.
src/lib.rs– re-exports the primary engine and agents for external consumers.src/agent.rs– low-level Metatron agent implementation.src/master_agent.rs– high-level orchestrator combining feedback modules.src/qdash_agent.rs– iterative decision loop with temporal resonance modulation.src/meta_interpreter.rs– adaptive controller for the QDASH agent.src/geometry.rs,src/graph.rs,src/cube.rs,src/symmetries.rs– geometry and group theory foundations.src/qlogic.rs,src/semantic_field.rs– oscillator and semantic analysis subsystems.src/mandorla.rs,src/spiralmemory.rs,src/gabriel_cell.rs– resonance and memory components.src/resonance_tensor.rs,src/tensor_network.rs– high-dimensional field modelling.src/seraphic_feedback.rs,src/api.rs,src/history.rs,src/visualization.rs– ingestion, export, and observability helpers.
The project ships with unit tests across the geometry, agent, resonance, and export modules. Run the full suite with:
cargo testContinuous validation ensures changes maintain deterministic cognition flows and catch misconfigurations early.
MIT License