Architecture
Compile and read boundary
Keep semantic analysis ahead of reading and deterministic decisions inside it.
Compile time
Compilation is O(book tokens). It extracts verbatim candidates, verifies their locations,
and enriches them with translations and policy metadata.
book.txt → chunk → extract units → verify spans → enrich → book.lexweave.jsonThe model sits behind one LexweaveLlm port. A direct API, queue, edge function, or local
model can implement that port without changing the output contract.
Read time
The read loop receives a bundle, reader state, and a flow budget. It plans replacement rules, renders a section, then records exposures and reader actions for the next plan.
bundle + memory + budget → replacement plan → deterministic render → feedbackNo model is called during this loop. Reader memory belongs to the host application and is deliberately excluded from the portable bundle.