# mesa-clm documentation > mesa-clm proposes calibrated, ontology-grounded AVUs for the MESA stack with Contrastive LM (CLM): rank-first decisions with a fixed abstain anchor over mesa-mcp's OBO/OLS ontology tools, scored by a frozen Qwen3-8B encoder and CLM's projection heads, fingerprinted and pre-registered, with every decision recorded in a provenance sidecar next to the mesa-ducklake AVU history. This documentation covers installation, configuration, the decision model, tiers and the write policy, provenance and history, learning and the bench, serving, and development. The source repository is an Open Knowledge Format (OKF v0.2) bundle: every page carries YAML frontmatter with type, provenance (generated/sources), and lifecycle (status/stale_after) fields. Full corpus for ingestion: https://idss-mesa.github.io/mesa-clm/llms-full.txt Every page's Markdown source (OKF frontmatter included) is served at its URL plus `index.md` — for example https://idss-mesa.github.io/mesa-clm/getting-started/install/index.md. Agent guide: https://idss-mesa.github.io/mesa-clm/about/ai-agents/ For the decisions and verified facts behind the design, read DESIGN.md and RESEARCH.md in the repository; for behaviour, run mesa-clm and read its provenance sidecar. ## Getting started - [Configuration](https://idss-mesa.github.io/mesa-clm/getting-started/configuration/): Configure mesa-clm with a YAML file, MESA_CLM_ environment variables or flags; precedence, the sections, secrets, and the CLM fallbacks. (draft) - [Install](https://idss-mesa.github.io/mesa-clm/getting-started/install/): Install mesa-clm with uv, the command line that exists after milestones M1, M2 and M4's pre-run commit (annotate, explain, review, feedback, framings, provenance, serve, features, labels, bench, learn, artifacts, audit, doctor), the extras, and what a serving host needs. (draft) - [Quickstart](https://idss-mesa.github.io/mesa-clm/getting-started/quickstart/): Annotate a dataset card, read the run back, review its pending groups and export it: offline with the fake provider and the recorded OLS fixtures, then on the serving host with the real CLM provider. (draft) ## Concepts - [Decision model](https://idss-mesa.github.io/mesa-clm/concepts/decision-model/): How mesa-clm asks CLM: one rank per candidate group with a fixed abstain anchor, set-independent scores, the Q1-Q8 pipeline, contexts that end with the target, framings and the two keys, what the M2 framing experiment changed (F9 for column.ontology_fits; term.fits proposals by ols_rank under K1), and what drives each step since amendment A6 (the closed choices Q1, Q2, Q7 by deterministic rules, CLM's answers to them audit-only) and A8 (the aspect fallback for a column the lookup has not seen, by its dtype and unit, never taxon). (draft) - [Learning and bench](https://idss-mesa.github.io/mesa-clm/concepts/learning-and-bench/): Where mesa-clm's labels come from and how they are identified and frozen, the feature cache, the tier fitters, leave-one-card-out with nested selection, rule R, the lookup baseline every cell must beat, the pre-registered experiments X1-X4 with the AnyJev baseline numbers, how M2's analysis plan runs X1, the tier cells and X2, the registered M2 results (term.fits K1; F9 for column.ontology_fits), and how M4's analysis plan runs the probe tier (X3), K2, the teacher ablation (X4) and the artifacts, committed before any M4 result exists. (draft) - [Provenance](https://idss-mesa.github.io/mesa-clm/concepts/provenance/): The mesa_clm sidecar: a per-host DuckDB opened under a flock, its tables and fingerprints, the migrate, export, import and prune verbs, the direct/spool/none history backends and the lock set, source tags, and revert. (draft) - [Serving](https://idss-mesa.github.io/mesa-clm/concepts/serving/): The mesa-clm serving stack of milestone M1: a batch-invariant vLLM pooling container serving Qwen3-8B behind a bearer guard and a patched clm-serve on loopback with keys, the carried CLM patches, fingerprints and the serving lock, what the doctor probes, the GPU budget, the in-process fallback encoder, and the learned artifacts of M4 (versions, CURRENT.json, learn fit and promote, publish and pull, the probe served without clm-serve). (draft) - [Tiers and policy](https://idss-mesa.github.io/mesa-clm/concepts/tiers-and-policy/): What level and calibration promise on a mesa-clm decision, the record invariants, how a tier is chosen and how the probe tier is served without clm-serve (M4), the rules that turn a decision into auto, proposed or abstain with a cited bench cell (the citation test as implemented, the audit demotion), promotion and the production audits, and what drives each step of a run today (ols_rank for term.fits under K1; the closed choices by rule under amendment A6, the aspect fallback by dtype and unit under A8). (draft) ## Develop - [Architecture](https://idss-mesa.github.io/mesa-clm/develop/architecture/): The mesa-clm modules and which milestone delivers each, the annotate and apply phases, the MCP tools, and the boundaries with CLM, mesa-mcp, mesa-ducklake and neon-ducklake. (draft) - [Testing](https://idss-mesa.github.io/mesa-clm/develop/testing/): How to run the hermetic mesa-clm test suite, what the fake CLM transport, the recorded OLS fixtures and the offline doctor cover, the vendored-file and parity checks, the M1 tests, the M2 and M4 bench tests on synthetic labels only (and the plan-constants tests), the tests of amendment A1 after the registered run, and the opt-in live, engine, GPU, Postgres, end-to-end and neon tiers. (draft) ## About - [AI agents](https://idss-mesa.github.io/mesa-clm/about/ai-agents/): How AI agents should read this documentation bundle: llms.txt, the markdown mirror, trust markers, and where the decisions and facts live. (draft) - [License](https://idss-mesa.github.io/mesa-clm/about/license/): mesa-clm is MIT licensed by the Regents of the University of New Mexico; Contrastive LM, Qwen3-8B and the vendored AnyJev metrics are Apache-2.0; NEON data are CC BY 4.0. (draft) ## Meta - [Documentation update log](https://idss-mesa.github.io/mesa-clm/log/): dated history of changes to this bundle.