Commands¶
Every stage is a file-to-file transform, so you can stop after any of them, edit the JSON by
hand, and resume. mimem build is all of them at once.
All commands are shown with uv run; drop it if you have activated the environment.
build¶
The whole pipeline, source document to checkable programme.
| Option | |
|---|---|
--out, -o |
Output directory. Default out. |
--profile, -p |
skim, study (default) or drill. |
--listener |
Your listener.yaml. The single biggest quality lever. |
--llm / --local |
Call a model for stage 6, or skip it. Default --local. |
--fixtures |
Replay recorded elaborations from a directory instead of calling anything. |
--budget |
Hard cap in US dollars, checked before each call. |
Writes audio.md, study.md, cards.json, manifest.json, plus doc.ir.json,
registry.json, script.json and drop-report.md so that every intermediate stage is on disk.
Exits non-zero if the result breaks a design rule.
inspect¶
What ingestion actually produced. Read this before trusting a build.
Prints the title and metadata, block and role counts, the section outline, the estimated straight read time, and every diagnostic the pipeline raised. This is how you find out that ingestion quietly ate the methods section.
explain¶
Why does this beat exist?
Prints the beat's type, the design rules that produced it, its cost in seconds, whether it is the
source's or ours, the concept it serves with its scores, and the source sentence behind it. Beat
IDs come from manifest.json.
Without this, tuning the system is guesswork — which is why it exists from the first version rather than as a debugging afterthought.
The stages, individually¶
ingest¶
Reads the source into the canonical IR and cleans it. --no-clean stops after stage 1, so you
can run clean separately and compare.
triage¶
Decides what reaches the narration and records why. The drop report is worth skimming: it is where you notice that a whole section was classified as boilerplate.
concepts¶
Extracts and scores the concepts, and writes registry.json. Prints a table of the top concepts
with their difficulty, importance and budget, and says whether concreteness came from measured
norms or a morphological guess.
The registry is meant to be edited. Anything under a concept's overrides key survives every
future run.
elaborate¶
Stage 6. --dry-run prints the planned calls and an estimate without making any:
29 call(s) to claude-opus-5: 3 x analogy, 4 x anchor, 11 x gloss, 11 x why
estimated $1.67 -- an estimate, not a quote
| Option | |
|---|---|
--llm / --local |
Call a model, or run deterministic-only. Default --local. |
--dry-run |
Print the calls and the estimate, make none. |
--fixtures |
Replay recorded answers from a directory. |
--budget |
Hard cap in dollars. |
--model |
Override the model. |
--no-cache |
Skip the content-addressed cache. |
plan¶
Stage 7: beats, segments, prompts, spacing, the review block. Builds the registry first if there is not one.
render¶
Stage 8: the four artefacts, then lints the result.
lint¶
Given a build directory it checks both halves — the narration text against the speakability
rules, and the plan against the structure, retrieval and spacing rules. Given a bare audio.md
it can only do the first, and says so. Exits non-zero on any error.
eval¶
Builds every document in tests/fixtures/docs, measures the result, and compares it against the
committed baseline in tests/fixtures/eval/baseline.json. Exits non-zero on a regression.
This is the check the linter cannot do. Nothing in mimem breaks loudly: a concept scorer drifts, the spacing scheduler finds one fewer slot, a triage rule eats an extra paragraph — and every one of those produces a programme that lints perfectly clean and teaches less. The metrics are the handful of quantities the design is a claim about, so a design that stopped being true shows up as a number that moved.
| Column | What it is |
|---|---|
used |
programme length as a fraction of its duration budget |
q/min |
retrieval prompts per minute |
gloss |
concepts the listener was given a definition for |
spaced |
concepts met more than once in the body |
expand |
of the concepts met three times or more, those whose gaps never shrink |
ground |
beats that can point at a page, of those required to |
values |
source values that reached study.md |
kept |
words of the source that survived triage |
Writes the current numbers down as the new baseline. This is the only way to make a real regression pass, and it is a separate command on purpose: it puts the worse number in the diff where a reviewer has to look at it.
--corpus DIR measures your own documents instead, which is the fastest way to find out whether
mimem falls over on a field it has never seen. --json prints the metrics rather than the table.
narrate¶
A straight reading: the retained content, verbalized, with no prequestions, retrieval or spacing. Useful for seeing what the structural layer actually adds, and as a fallback when a document defeats the planner.
profiles¶
Lists the available profiles with their headline settings, and which listener file is currently loaded.
version¶
Version, and the file formats this build can read.
Environment¶
| Variable | |
|---|---|
MIMEM_LISTENER_FILE |
Default listener file, so you can stop passing --listener. |
MIMEM_CONCRETENESS_FILE |
Your copy of the Brysbaert norms. |
MIMEM_PROFILES_DIR |
Where to look for profiles. |
MIMEM_CACHE_DIR |
Where model answers are cached. Default .mimem-cache. |
ANTHROPIC_API_KEY |
Only read when you pass --llm. |