The SMK imposes two concentric rings of authority around all trade execution. Ring -1 sits above the analytical layers and decides whether the market regime is fit to trade at all. Ring 0 sits below the layers and fuses every sensor signal into a final go/no-go decision. Both rings have unconditional veto power: if either ring objects,Documentation Index
Fetch the complete documentation index at: https://mintlify.com/deskiziarecords/QUIMERIA-HYPERION/llms.txt
Use this file to discover all available pages before exploring further.
r['veto']['trade_allowed'] is set to false and the AEGIS bridge takes no action.
Ring -1: Bayesian orchestration
Ring -1 is implemented incore/kernel/gmos_hmm_engine.py and surfaces in the pipeline as the gmos key of the step result. It runs three concurrent sub-systems:
HMM regime tracker (7ZERO)
The Hidden Markov Model tracks market regime persistence. It classifies each bar into one of three states:| State | Value | Meaning |
|---|---|---|
| SIDEWAYS | 0 | Choppy, range-bound — no trending structure detected |
| STABLE | 1 | Stable regime — trending conditions confirmed |
| STABLE | 2 | Stable-trending — high-persistence momentum confirmed |
GMOS Governor (Hamiltonian energy)
The GMOS (General Market Orchestration System) Governor measures market exhaustion using a physics-inspired Hamiltonian energy metricH_t. It accepts six sensor probabilities per bar and updates a Bayesian posterior over execution confidence. The telemetry fields exposed in r['gmos'] are:
available: false indicates the GMOS governor is running in numpy fallback mode because JAX is not installed. The pipeline continues operating — it passes p_fused from the Lambda Fusion Engine through instead of computing the Hamiltonian energy independently.OBNFE kill switch
The OBNFE (Optimal Bayesian Non-parametric Fusion Engine) Kill Switch monitors whether the combined posterior probability of a market reversal exceeds a hard threshold. If sensor reliability drops or the posterior for regime stability falls below the configured prior, OBNFE halts execution before any lambda sensor runs. This prevents the pipeline from acting on structurally invalid data.Ring 0: fusion and veto authority
Ring 0 is implemented acrosscore/kernel/lambda_fusion_engine.py, risk/mandra_kernels.py, detectors/kl_divergence_detector.py, and detectors/topological_fracture_detector.py. It runs after all lambda sensors have fired and combines their outputs into the final execution decision.
Lambda Fusion Engine
The Lambda Fusion Engine collects all eight λ signals — each with a score, confidence, and veto flag — and computes a single fused probabilityp_fused:
r['fusion']:
Mandra Gate (information energy constraint)
The Mandra Gate applies an information-theoretic check: trade execution is only allowed if the information energy gain ΔE is positive and exceeds the minimum threshold of 0.02. Formally,ΔE = E_current − E_previous, where energy is derived from p_fused² × confidence.
KL Divergence detector
The KL Divergence detector monitors for regime fractures — moments when the current price distribution has drifted so far from the calibrated manifold that the model’s assumptions no longer hold. It is calibrated on the first 60 bars of a dataset viakl.calibrate_manifold().
A KL:REGIME_FRACTURE veto fires when kl['score'] > 1.3 × threshold and kl['stable'] == False. Error code ERR_REGIME_FRACTURE requires manual manifold recalibration.
Topological Fracture detector
The Topological Fracture detector uses persistent homology (via theripser library) to detect H₁ loop formation in the price manifold — a sign that the market structure has broken down into a non-linear, looping topology. A TOPO:H1_FRACTURE veto fires when h1_score > threshold.
The six Ring 0 veto conditions
All six conditions are evaluated in_veto() in smk_pipeline.py. If any single condition is met, trade_allowed is set to false.
| Condition | Trigger | Source module |
|---|---|---|
MANDRA:ΔE<0 | Negative information energy gain (mandra['open'] == False) | risk/mandra_kernels.py |
TOPO:H1_FRACTURE | Persistent homology loop sum exceeds threshold | detectors/topological_fracture_detector.py |
FUSION:LAMBDA_VETO | Any λ sensor issued a hard veto flag | core/kernel/lambda_fusion_engine.py |
L3:LIAR_STATE | FFT phase inversion exceeds π/2 (harmonic['inverted'] == True) | lambda_sensors/harmonic_trap_detector.py |
KL:REGIME_FRACTURE | KL divergence score exceeds 1.3× threshold | detectors/kl_divergence_detector.py |
CONF:INSUFFICIENT | Fusion confidence below 0.2 (fusion['confidence'] < 0.2) | core/kernel/lambda_fusion_engine.py |
Reading the veto decision
The final veto output lives inr['veto'] and is checked by the AEGIS bridge before any order action:
decision can take three values:
Proceed— all Ring 0 conditions passed, AEGIS may executeHalt— one or more veto conditions triggered, no executionReset— the AMD R_MASTER flag is set (retracement reset in progress), AEGIS holds
logs/veto.log (5 rotating backups, 10 MB each) for post-session audit.