Skip to main content

Crate eidos_kernel

Crate eidos_kernel 

Source
Expand description

eidos-kernel — the pure-logic brain engine.

This crate is L1 of the Eidos layer model. It owns the graph schema, the deterministic retrieval engine (BM25F with calibrated confidence bands), the golden-set eval harness, and the ranking policy (floor, scope, canonical dominance). It has no IO — no tokio, no rmcp, no clap, no std::fs. Every function is a pure transformation over Graph, fully unit- testable with zero files on disk.

The grounding law lives here: a source proposes nodes and edges; the kernel owns and verifies every receipt — each file:line is checked against the real file before a hit is returned. Sources compute nodes; the kernel never fabricates provenance.

§Modules

moduleowns
schemaNode, Edge, Graph, Kind, Span, relation vocabulary
retrievalground, ground_scoped, BM25F scoring, confidence bands
evalthe golden-set eval harness (GoldenSet, evaluate)
relationalcallers, impact, kind-intent, rerank-by-kind
workflowdeterministic task brief decomposition and validation

Modules§

calibration
The calibration surface — the single documented home for the constants that shape ranking and confidence. Moving any value here (or an inline boost listed in the REGISTRY below) moves the frozen eval baselines, so every change is a reviewed diff against evals/baseline.json plus, in the ideal, a re-freeze justification.
eval
Retrieval eval — score ground against a golden set so graph changes are MEASURED, not asserted. Mirrors the discipline of the Python test_retrieval_eval, but runs over whatever graph it’s handed (a hermetic fixture in tests; the real vault from the CLI).
graph_index
Indexed read view over a Graph.
relational
Relational (call-graph / impact) retrieval over the code graph.
retrieval
Retrieval — lexical scoring + CALIBRATED confidence.
schema
Graph schema — nodes, edges, kinds. Defines the Aun graph-artifact contract.
trigram
Trigram inverted index — the hippocampus (fast pattern separation).
workflow
Deterministic task decomposition primitives.