Show HN: Holix, a local-first context-folding MCP server in Rust and Lean 4 A developer released Holix, a local-first context-folding engine and semantic memory MCP server written in Rust with Lean 4/Kani proofs, which indexes code, prose, tables, email and PDFs into a SQLite FTS5 and Orion HNSW store and hydrates only exact byte spans on demand. Holix enforces a strict max_token_budget per query and caps raw byte reads behind a fail-closed hydration gate at 4 MiB with FNV-1a content hash checks, avoiding the file-copying and raw-chunk stuffing of standard RAG pipelines. The project splits pure no_std math verified via Charon/Aeneas extraction into Lean 4 (0 sorry) from the SQLite persistence layer and a CLI plus MCP 2026-07-28 JSON-RPC stdio server, and exposes holix_rs::ingest_bytes with a BlobSource trait so hydrating a 200-byte span never buffers a 50 MB PDF in RAM. holix Holographic + Index is a local-first context-folding engine and semantic memory MCP server in Rust for code, prose, tables, email, and PDFs, backed by SQLite FTS5, Orion HNSW, and Lean 4/Kani proofs. Unlike standard RAG pipelines that copy files and stuff raw chunks into your prompt, holix folds assets into a local SQLite + Orion index and only hydrates exact byte spans on demand. LLM agents burn through context windows when they read raw files directly into prompts. holix avoids that by slicing .rs , .py , .md , .yml , .pdf , .csv , .xlsx , and .eml files into folded projections inside a .holix/index.db SQLite WAL and FTS5 database. Every query enforces a strict max token budget and keeps raw byte reads behind a fail-closed hydration gate capped at 4 MiB with FNV-1a content hash checks, which gives predictable token usage without losing exact byte provenance. The workspace splits formal invariants, runtime indexing, and transport into three layers so that proof obligations stay isolated from I/O and FFI. | Layer | Crates / Modules | Responsibility | Verification | |---|---|---|---| | Layer 1 | holix-core-verified | Pure no std math for coordinate bounds, token packing, concept DAG acyclicity src rank < dst rank , and hydration gates | Charon/Aeneas extraction into Lean 4 HolixSpec , HolixProofs , --wfail , 0 sorry | | Layer 2 | holix-rs | SQLite WAL + FTS5 index persistence, BlobSource lazy hydration, push ingest bytes , Tree-sitter AST, YAML, CSV/XLSX, EML slicers, pure-Rust PDF page text extraction lopdf , TextTiling prose folding, and OrionRouter orion-vdb | Unit tests and Kani bounded model checking default-unwind = 1 | | Layer 3 | holix-cli | CLI binary holix and MCP 2026-07-28 JSON-RPC stdio server holix serve | Integration and piped stdio E2E tests | Where B is raw corpus bytes, N is indexed entries folds, edges, blackboard, annotations , D is embedding dimension 64 default FeatureHashEmbedder , 1 byte/dim SQ8 in orion , ef is the HNSW search beam width, K is top-K candidates, and S is hydrated span bytes <= 4 MiB : | Operation | Time | Space / Disk | |---|---|---| | holix ingest full | O B + N D log N | Disk O N D , zero raw file copies | | holix ingest incremental | O B dirty + n dirty D log N | Appends to .vdb.delta without rewriting .vdb | | holix discover warm | O ef D log N + K log K | RAM O K + ef per query | | holix hydrate byte spans | O S bounded | RAM O S <= 4 MiB Layer 1 fail-closed gate | When holix-rs runs inside a backend or object-store pipeline, it should not assume files live on a local filesystem. holix rs::ingest bytes accepts an in-memory byte slice, a logical URI, an optional external locator , an immutable flag, and faceted BTreeMap tags. Later reads hydrate exact byte ranges through &dyn BlobSource content len , read range , read all , skipping full-blob FNV-1a hashing on immutable blobs so hydrating a 200-byte span never buffers a 50 MB PDF in RAM. use std::collections::BTreeMap; use holix rs::hydrate::{hydrate projection with source, BlobSource, HydrateError}; use holix rs::ingest::ingest bytes; use holix rs::persist::IndexSnapshot; use holix rs::store::AssetRecord; struct MemoryStore Vec