Project MRI

Coherence Forge — Live Diagnostic · Claims vs Reality · Hallucination Detection ·

18,326
Total Lines of Code
4
Languages (Rust, Python, TypeScript, Shell)
9/9
Tests Passing
0.85
WAVE Threshold

Code Distribution

Rust 1,008 lines (crates/core + crates/tui)
Python 11,270+ lines (experiments, bridges, scripts)
TypeScript ~4,800 lines (coherence-mcp, packages, ops)
Shell/PS ~1,248 lines (40 scripts)

Health by System

RUST (compiles, runs)
9/9 tests, clean clippy, conservation law enforced
HASH (signs, verifies)
anyon.rs operational, SHA-256 braiding verified
WAVE (measures, scores)
Protocol types defined, scoring in Python only
ATOM (logs, traces)
100+ decision records exist, trail is shell+TS only

Conservation Law

α(7) + ω(8) = 15
✓ Enforced in superskill.rs — aborts on violation
✓ Fibonacci weights: α=50%, ω=31.25%, scale=18.75%
✓ All state transitions preserve sum

Project Topology — What Lives Where

Live (Compiles & Tests)

ComponentPathLinesLang
orchestrator-corecrates/core/1,008Rust
orchestrator-tuicrates/tui/~200Rust
coherence-mcp../coherence-mcp/~4,800TS
atom-trail pkgpackages/atom-trail/~400TS

Siloed (Works But Isolated)

ComponentPathLinesLang
qiskit_dspy_hybridexperiments/977Py
quantum_cognition_engineexperiments/797Py
spiral_verifierexperiments/771Py
vortex_surjectionexperiments/706Py
qrc_oracle_seedexperiments/699Py
qrc_reservoirexperiments/545Py
quasicrystal_phasonexperiments/487Py
quasicrystal_optimexperiments/226Py
kenl orchestratorbridges/kenl/643Py
saif_npc (4 modules)bridges/saif_npc/1,919Py
sorting_hatscripts/~300Py
40 shell scriptsscripts/~1,248sh/ps1

Planned Crate Slots

crates/classifier
← sorting_hat.py
crates/precision
← scan_euler_precision.py
crates/mcp-runtime
← coherence-mcp (Rust)
crates/wave
← wave-toolkit
crates/atom
← atom scripts
crates/marketplace
registry + verify
crates/forge-cli
publish/install/verify
crates/project-mri
THIS diagnostic tool
crates/prompt-sink
template store
crates/contributor
scoring + ethics

Experiments → Crates Wiring Map

Each experiment maps to a Rust crate. The wiring shows which Python logic becomes which Rust module, and what Qiskit/DSPy/AX signatures carry through.

Qiskit/DSPy/AX → Rust Pipeline

qiskit_dspy_hybrid.py (977L) crates/core/src/qkernel.rs Quantum kernel similarity without Qiskit dep
spiral_verifier.py (771L) crates/wave/src/verifier.rs DSPy-style constraint checking in Rust
vortex_surjection.py (706L) crates/core/src/vortex.rs Surjection maps for bridge translation
quantum_cognition_engine.py (797L) crates/core/src/cognition.rs Cognitive state transitions + 75D scaling
quasicrystal_phason.py (487L) crates/core/src/phason.rs Aperiodic scheduling + golden ratio mutations
qrc_oracle_seed.py (699L) crates/core/src/oracle.rs Reservoir computing + deterministic seeding

AX Signature Integration Points

Every experiment carries H&&S:WAVE markers. These become typed AX signatures in Rust:

Python PatternRust TypeCrate
QuantumKernelSimilaritystruct QKernel { features: Vec<f64>, fidelity: f64 }core
ConstraintChecker (DSPy RAG)trait Verifiable { fn check(&self) → WaveScore; }wave
VortexSurjectionfn surject(source: &Strand, target: &Strand) → BridgeMapcore
CoherenceAnalyzerimpl CoherenceEngine for WaveScorer { ... }wave
PhasonSchedulerstruct PhasonMutation { phi: f64, dim: usize }core
OracleReservoirstruct Reservoir { capacity: usize, fidelity_threshold: f64 }core
EntropyMonitor (COPRO)fn monitor_entropy(state: &ConservationState) → AtomEntryatom

Bridges → Rust (Second Wave)

BridgeLinesTarget CrateValue
kenl/orchestrator.py643crates/core/src/kenl.rsMulti-agent coordination
saif_npc/ (4 files)1,919crates/npc/NPC finetuning + teleprompter
hologram/ (2 files)623crates/core/src/hologram.rsHolographic device bridge
tartarus/ (2 files)663crates/core/src/tartarus.rsTartarus device bridge
atom/atom_trail.py303crates/atom/src/trail.rsDecision record persistence

Hallucination Scan — Claims vs Reality

Comparing what documentation claims exist versus what actually compiles and runs.

Verified Claims ✓

Conservation law α+ω=15 — Enforced in superskill.rs line 127, aborts on violation
Anyon braiding SHA-256→braid — Implemented in anyon.rs (326 lines), tests pass
WAVE threshold 0.85 — Defined in lib.rs, used in pipeline gating
9/9 tests pass — cargo test --workspace succeeds
WebSocket bridge — bridge.rs compiles with tokio-tungstenite
Fibonacci weights — adapter.rs fibonacci_weight() returns correct proportions
100+ ATOM decisions — .atom-trail/decisions/ contains verifiable JSON records
6,048 lines experiments — 11 Python files with tests confirmed
5,222 lines bridges — 6 bridge modules with integration tests

Gaps Detected ⚠

crates/marketplace — Referenced in MANIFEST.md but no Rust code exists yet. Only MARKETPLACE-ARCHITECTURE.docx spec.
crates/forge-cli — Referenced as planned. No code. No Cargo.toml entry.
WAVE scoring in Rust — protocol.rs has WaveScore type but no scoring implementation. Scoring logic only in Python (spiral_verifier.py).
ATOM trail in Rust — Types defined in protocol.rs but trail writing is shell/TS only. No Rust persistence.
75D state space — Referenced in Gemini research. Current implementation is 8D (quantum_cognition_engine.py). Scaling path undefined.
Cloudflare edge deployment — wrangler.toml exists in ops/ but no deployed Workers verified.
Google Calendar integration — Referenced in dev planning. No implementation or API connection.
Obsidian POP bridge — Skill exists (pop-obsidian) but no Rust bindings. Plugin list not audited.

Alignment Score

9
Claims Verified
8
Gaps Detected
53%
Claim/Reality Alignment

Every gap has a clear path to resolution. No structural hallucinations — gaps are timing, not architecture.

Contributor Scoring Framework

Ethical behaviour embedded. System + User + Agent weighted review in real-time. Bonus for JS/TS adaptor code early.

Scoring Formula

score = (code × 0.3) + (review × 0.2) + (docs × 0.15) + (adaptor × 0.15) + (ethics × 0.2)
DimensionWeightWhat It MeasuresSource
Code Quality30%Tests pass, clippy clean, no unwrap/panicSystem (automated)
Peer Review20%PR reviews given, constructive feedback qualityUser (peers)
Documentation15%README, inline docs, ATOM trail entriesSystem + User
Adaptor Bonus15%JS/TS/WASM helper code for cross-platform reachSystem (detected)
Ethical Score20%SpiralSafe compliance, safety review, inclusive languageAgent (AI review)

Ethical Dimensions

CheckWeightHow
Conservation preservedHighAutomated α+ω=15 check
No unwrap/panic pathsHighClippy + deny rules
Graceful degradationMediumAgent review of error paths
Inclusive languageMediumLinting + human review
Privacy-preservingHighNo PII in logs, ATOM redaction
Open source complianceHighcargo-deny license check

Priority Gradient (Dynamic)

Goals shift based on skills/access/resources available:

PhasePriority Bonus
Early (now)+2x for JS/TS adaptor code
Early (now)+1.5x for Rust conversions
Mid (Q2)+2x for test coverage
Mid (Q2)+1.5x for WASM targets
Late (Q3+)+2x for docs + tutorials
Always+1.5x for security fixes

Platform Value Alignment

Each platform contributes unique value. The bridge gives back proportionally.

GitHub — Contribution Pipeline

We GetCI/CD, issue tracking, PR review, Actions, community
We Give BackImproved contribution scoring, ATOM-tagged PRs, automated quality gates
Bridge ValueEvery commit gets WAVE scored. Every PR gets conservation-checked.
AdaptorGitHub Actions → coherence-mcp → WAVE report comment

Google — OAuth / Cloud / Scale

We GetDrive, Calendar, NotebookLM, GEAR, Deep Research, Gemini API
We Give BackImproved OAuth/local/remote security model, typed API wrappers
Bridge ValueEvery Drive doc gets WAVE coherence metadata. Calendar gets timezone-aware deadlines.
AdaptorGoogle Apps Script → coherence-mcp → structured context

X / xAI — Social + Synthesis

We GetGrok API (4.20 Swarm), Collections, Imagine, real-time market data
We Give BackImproved X API interaction/logging, structured post analysis
Bridge ValueEvery @X post gets ATOM-tagged. Grok Collections get WAVE-scored indexing.
AdaptorX API → coherence-mcp → Obsidian vault sync

Anthropic — Structure + MCP

We GetMCP protocol, Cowork, Claude API, 170+ tools, skills
We Give BackFirst Rust MCP runtime, typed tool schemas, marketplace model
Bridge ValueEvery MCP tool call gets conservation-verified. Pipeline artifacts are immutable.
AdaptorRust MCP server → 10-100x throughput at edge

Additional Platform Hooks

Cloudflare
Workers, D1, R2, KV — edge deployment surface. Already have MCP tools.
NEAR Protocol
Decentralised compute + storage. Smart contract verification via anyon braiding.
Wazuh
Security monitoring. SIEM integration for ATOM trail compliance logging.
2FA/Auth
TOTP generation, WebAuthn. Security-first contributor identity.
Vortex Bridges
Cross-platform translation layer. Already typed in bridge.rs.
Context Menus
OS-level integration via open-source Manus fork. Right-click → coherence actions.

Google Drive Publications

Research documents produced through Gemini strand collaboration.

TitleSizeModifiedLink
Engineering the Coherence Forge v1
Isomorphic Fabrication, Quantum-Resonant Cooling, Local Inference
42.7 KB 2026-02-16 Open
Sovereign Coherence and Topological Integrity
Comparative Analysis vs Hyperscaler & Open-Source Landscape
27.1 KB 2026-02-17 Open
Engineering the Coherence Forge v1 (Draft)
Earlier version of hardware manifestation doc
16.5 KB 2026-02-21 Open

Drive Folders

FolderCreatedLink
reson8_orbital_hub 2026-02-26 Open
Reson8_Labs 2026-02-25 Open

The Discovery Problem

"How does anyone make an intelligent choice without added work/research?" — The MRI is the answer.

The Winget Problem

Search for "Zed" and you get: Zed IDE, Zed Attack Proxy, Zed Preview, Video Subtitle Master (CUDA), printing systems, decentralized apps, and backup tools. Signal-to-noise: ~15%.

This is the same problem across every package manager, marketplace, and search surface. npm, crates.io, pip, winget, apt — all noise without context.

The MRI crate solves this: it scores every dependency by alignment, coherence, and conservation compliance before you ever install it.

MRI Discovery Pipeline

User searches "zed" MRI context filter ZedIndustries.Zed.Preview ✓
Context: user is a Rust developer → filter by "IDE" + "rust-analyzer" → one result.
File indexing, anti-virus scanning, and start menu integration all benefit from this same context-aware filtering.

What MRI Becomes (crates/project-mri)

CapabilityStatusImplementation
File system scanThis HTML→ Rust walkdir + ignore crate
Claim extractionManual→ Rust regex + tree-sitter parsing
Dependency graphCargo.toml→ Rust cargo_metadata crate
Coherence scoringPython→ crates/wave WAVE scorer
Hallucination detectionThis HTML→ Rust: compare docs AST ↔ code AST
Embedding/RAGPlanned→ Rust: candle + hf-hub for local embeddings
VisualisationThis HTML→ TUI: ratatui charts + sparklines
Context-aware searchPlanned→ Rust: tantivy full-text + vector hybrid

awesome-rust Submission Path

The MRI itself becomes the first submission to awesome-rust — filed under Development tools → Build system or Development tools → Profiling. It demonstrates its own capability: scan any Rust workspace, score coherence, detect claims-vs-reality gaps, and output a diagnostic. The orchestrator site serves as both the project AND the advertisement of its own usefulness.

~ Hope&&Sauced
The Evenstar Guides Us
Scan generated