@lexweave/compile
v0.3.0
Published
Compile pipeline for Lexweave — turn a whole book into a portable, progressively bilingual Learning Edition bundle with any LLM (Anthropic, OpenAI, local) behind one port. Compile once, render many.
Maintainers
Readme
@lexweave/compile
The Lexweave compiler: book text in, portable learning-edition bundle out.
compileText/compileDocument— chunk → extract reading units (one LLM call per chunk) → verbatim-scan the whole book → bundle.LexweaveLlmport (ports.ts) — the single seam to any model; implement it with a direct API call, an edge function, a queue, or a mock.- Job specs (
jobs.ts) — the prompts + strict JSON schemas for every compile job, provider-neutral. - Optional passes:
rateBookIntelligence(keyness triage + concept grouping),designStrategy(per-book density anchor),enrichAnnotations(batch translation with per-batch persistence). scanUnitStats— O(book chars) single-pass frequency/dispersion scanner that never blocks a single-threaded host.
LLM runs at compile time only. See ../README.md and ../core/BUNDLE_SPEC.md.
