modusbrain eval takes-quality — reproducible cross-modal quality eval
v0.32+ ships a CI-able quality gate for the takes layer. Three frontier models
score a sample of takes against a 5-dimension rubric, the runner aggregates to
PASS / FAIL / INCONCLUSIVE, and the receipt persists to eval_takes_quality_runs
so a follow-up trend or regress can compare against history.
This doc is the consumer contract. The sibling modusbrain-evals
repo and any future CI gate read receipts shaped exactly like the JSON below.
Fields are additive-stable at schema_version: 1. A breaking shape change
bumps the version.
Subcommands
replay is the only mode that runs without DATABASE_URL — it reads the
receipt file from disk and re-renders it. The other modes need the brain.
run flags
Receipt JSON shape (schema_version: 1)
Field reference
schema_version— locks the contract. Adding optional fields is additive and compatible. Renaming, removing, or changing semantics bumps the version.rubric_version+rubric_sha8— segregate trend rows by rubric epoch (codex review #3). When the rubric definition changes, both fields update, and trend mode groups runs accordingly so a stricter rubric doesn’t silently look like a quality drop.corpus.corpus_sha8— fingerprint over the joined takes-text the judge saw. Determines whether two runs are over the “same” sample.models_sha8— fingerprint over the sorted model id list. Re-ordering models in--modelsdoesn’t change the sha (sort is stable).successes_per_cycle— count of contributing models per cycle. A model contributes when (a) its JSON parsed AND (b) every declared rubric dim has a finite score (codex review #5 — missing-dim drops the contribution).verdict—passif every dim mean >= 7 AND every dim min across contributing models >= 5;failotherwise;inconclusiveif fewer than 2/3 models contributed complete scores.cost_usd— sum of per-call cost viapricing.ts. Unknown models when--budget-usdis set produce aPricingNotFoundErrorbefore any call fires.
Receipt persistence
Receipts persist toeval_takes_quality_runs (DB-authoritative per
codex review #6) AND to disk at ~/.modusbrain/eval-receipts/takes-quality-<corpus>-<prompt>-<models>-<rubric>.json
as a best-effort artifact. The DB row carries the full receipt JSON in the
receipt_json JSONB column, so when the disk artifact is gone, replay
can still reconstruct via loadReceiptFromDb (v0.33+ flag wiring).
The 4-sha primary key is unique (UNIQUE constraint) so re-running an
identical eval is INSERT ... ON CONFLICT DO NOTHING — idempotent.
Trend output
Plain text (default):--json):
Regress: gating CI on quality
corpus_sha8 /
prompt_sha8 / rubric_sha8 are surfaced as informational warnings (the
runner doesn’t refuse — that’s the caller’s call).
Contract stability
The shape above is the read contract for downstream consumers. Anything not listed (e.g. internal aggregator state, gateway providerMetadata) is not in the receipt and may change without notice. When you need to evolve the schema:- Additive optional field → no version bump; old consumers ignore the new key, new consumers read it.
- Renamed or removed field, or changed semantics → bump
schema_versionto2; runner emits both shapes for one release as a deprecation runway.