TypeScript + Effect-TS harness for benchmarking local LLMs.
The harness sweeps a set of configurations against a set of challenges and records each pairing as a sealed, content-addressed bundle. A configuration is a model plus its runtime, quantization, sampling settings, and system prompt, defined in configs.yaml. A challenge is a named, versioned set of scored items, defined in releases/<release>/challenges/*.yaml. The unit of work is a bundle — one (configuration × challenge) pairing executed within a run — written as one .jsonl file in the store. A static webapp reads the aggregated results.
npm install
./bench list-models # sanity-check the configured models
./bench list-prompts # sanity-check the inline challenge items
# Smallest end-to-end sweep — smoke-config against the smoke challenge:
./bench run --configs smoke-config --challenges smoke --store /tmp/bench-smoke
# Check the sealed bundle the run wrote:
./bench verify /tmp/bench-smoke/bundles/*.jsonl
# Build the snapshots (store/scores is gitignored, so a fresh checkout grades first):
./bench score --dataset alpha
./bench score --dataset draft
./bench report
# Open the webapp:
cd webapp && npm install && npm run devrun writes one sealed bundle, bundles/<digest>.jsonl, plus its score records into the store for each matched configuration × challenge cell. A dataset manifest (datasets/<name>.yaml) lists the bundles a dataset counts; report builds one snapshot per manifest into webapp/public/snapshots/ (and the drilldown detail files); the webapp renders them.
To run a real benchmark, add a configuration to configs.yaml (a model artifact, runtime, quant, sampling, and system-prompt key) and point run at a challenge suite under releases/draft/challenges/.
llama-server(llama.cpp) — install a pinned release tarball (seellama-cpp-guide.md) and put it onPATH. Required for any configuration withruntime: llamacpp.python3 -m mlx_lm.server(MLX runtime, mlx-lm) —pip install mlx-lminto a venv, default~/llm-env. Required for any configuration withruntime: mlx.omlx(oMLX) —brew tap jundot/omlx https://github.com/jundot/omlx && brew install jundot/omlx/omlx, orpip install -e .from a source checkout. Required for any configuration withruntime: omlx. The harness runsomlx serveunder a scratchHOME, so it boots from stock defaults and neither reads nor writes the~/.omlx/settings.jsonyour desktop oMLX install owns.
A configuration's runtime field selects which server the harness launches per configuration; you only need the runtime(s) your configurations use.
| Path | Purpose |
|---|---|
bench |
Shell launcher — tsx src/cli/main.ts |
src/cli/ |
@effect/cli subcommands: run, verify, score, release, legacy, dataset, report, list-models, list-prompts |
src/orchestration/ |
Per-bundle orchestrator — resolves the configuration + challenge, runs each item, seals the bundle, appends score records |
src/llm/ |
OpenAI-compatible ChatCompletion client; llama-server / MLX supervisor |
src/scoring/ |
Scorer dispatch — exact_match, constraint, code_exec, game |
src/config/ |
YAML loaders for configs.yaml, inline releases/<release>/challenges/*.yaml, and root system-prompts.yaml; identity hashing |
src/store/ |
Bundle writer / sealer / verifier, skip index, weights digest, score records |
src/legacy/ |
Read-only reader for the legacy schemaVersion 1–3 attempt archives, with its content store |
src/report/ |
Dataset manifests → immutable snapshots (<digest>.json), the snapshot index and detail files |
src/schema/ |
@effect/schema definitions for the bundle header, executions, scorers, configurations, challenges |
src/errors/ |
Typed Data.TaggedError classes grouped by domain |
releases/<release>/ |
A release: challenges/ (one YAML per suite, each a versioned set of fully-inline scored items, plus any companion code_exec .test.py files), release.json (item digests and the item-set digest), errata.yaml, blobs/. releases/0/ is the alpha challenge set, releases/draft/ the draft (see docs/ERRATA.md) |
scenarios/ |
Multi-turn game scenarios, loaded separately (see docs/SCENARIOS.md) |
configs.yaml |
Configuration registry: id, artifact, runtime, quant, temperature, systemPrompt, maxTokens |
system-prompts.yaml |
System-prompt registry (key → text); a configuration selects one via systemPrompt: |
store/ |
Default --store — open/ (bundles being written), bundles/<digest>.jsonl (sealed), scores/<digest>.jsonl (score records), scores/legacy.jsonl (regraded legacy alpha lines), weights.json (local weights-digest cache) |
benchmark-archive/ |
Legacy attempt archives (schemaVersion 1–3): .jsonl files plus the shared content/ store; read by report, audit, export-eee |
datasets/ |
Default --datasets-dir: dataset manifests, the bundles (v4) or pinned legacy attempts a dataset counts, its release and eval version |
webapp/ |
Static report viewer; reads webapp/public/snapshots/ written by ./bench report |
docs/ARCHITECTURE.md— layer map, run lifecycle, report pipeline, troubleshootingdocs/GUARANTEES.md— invariants the harness commits todocs/CONFIG.md— YAML schemas for configurations, inline challenge items, and system promptsdocs/ARCHIVE-FORMAT.md— the store (bundles, score log), releases, dataset manifests and snapshots, and the read-only legacy attempt format (schemaVersion 1–3); the design rationale is indocs/superpowers/specs/2026-11-17-archive-data-model-design.mddocs/SCORING.md— scorer dispatch and the constraint-check catalogdocs/ERRATA.md— errata registry, release file, eval versions, and the release commanddocs/DEPLOY.md— publishing the report to GitHub Pages behindvcarl.com/evals, and the agent-facingllms.txtdocs/EVAL-TIMING.md— when each item's release was frozen versus when the weights a run loaded were published, and the per-row timing labels
All subcommands take --help. Paths default to convention.
./bench run [--configs GLOB] [--challenges GLOB]
[--challenges-dir DIR] [--system-prompts-file FILE] [--configs-file FILE]
[--store DIR] [--samples K] [--items FILE|LIST]
[--no-skip] [--verbose]
./bench verify <bundle>... [--releases-dir DIR]
./bench score --dataset NAME [--datasets-dir DIR] [--store DIR] [--releases-dir DIR]
[--legacy-root DIR]
./bench release sync|verify <release> [--releases-dir DIR]
./bench release commit <YYYY.N> [--from DIR] [--releases-dir DIR]
./bench dataset add <name> <bundle>... [--datasets-dir DIR] [--store DIR]
./bench legacy freeze --dataset NAME --title TEXT --release 0|draft [--eval-version V]
--archive NAME [--reuse NAME] --challenges-dir DIR [--legacy-root DIR]
[--legacy-hardware ID] [--unranked] [--datasets-dir DIR]
./bench legacy convert --source FILE --dataset NAME [--datasets-dir DIR] [--legacy-root DIR]
[--store DIR] [--releases-dir DIR] [--templates-dir DIR] [--report FILE]
./bench report [--datasets-dir DIR] [--store DIR] [--releases-dir DIR] [--legacy-root DIR]
[--output DIR] [--configs-file FILE] [--allow-dirty] [--verbose]
./bench audit [--archive-dir DIR] [--challenge ID] [--flag suspect-key|saturated|edge|zero-failure]
[--min-n N] [--edge-top K] [--json] [--verbose]
./bench export-eee <attempt> [--dataset NAME] [--datasets-dir DIR] [--legacy-root DIR] [--out DIR] [--collection NAME]
[--relationship third_party|first_party|collaborative|other] [--verbose]
./bench list-models [--configs-file FILE] [--system-prompts-file FILE]
./bench list-prompts [--challenges DIR] [--scenarios DIR]
-
runsweeps matched configurations against matched challenges (globs over config ids and challenge stems), executing each configuration × challenge cell, printing a live per-cell result line, and finishing with a summary grid. It writes schemaVersion 4 bundles into--store(defaultstore):store/open/<runId>-<configId>-<challengeId>.jsonlwhile running, sealed tostore/bundles/<bundleDigest>.jsonl, then score records appended tostore/scores/<bundleDigest>.jsonl. A configuration × challenge that executes nothing writes no bundle.--challenges-dir(defaultreleases/draft/challenges) names the release: a path.../releases/<name>/challengesis release<name>, any other directory the releasedraft; release0, the alpha challenge set, is refused. A cell is skipped whole only when one bundle in the store already holds all of it at the current config and prompt, and an interrupted cell resumes its open file (run skip);--no-skipruns every cell. The contributor isBENCH_CONTRIBUTOR(defaultlocal; a value containing@is refused).--samples Ksets each item's sample set to 0..K-1 (see Repeated samples);--itemslimits that to the matchingchallengeId/itemNameglobs — a file with one per line or a comma list; a multi-turn item's name selects all its turns — and fails if a pattern matches no item. -
verifychecks bundle files: every line canonical, the digest equal to the file name,configDigestandhardwareIdre-derived, theexecutionscount, no duplicate item × sample; then release pinning against--releases-dir(defaultreleases): the release is frozen (a draft passes with a warning), the challenge and every item are in it, and everymessagesDigestmatches the release's prompt blob, the header's system prompt and the gold history. It printsok/FAILEDper file, exits nonzero on any failure, and writes nothing. -
score --dataset <name>appends the score records a v4 dataset manifest (datasets/<name>.yaml) needs at its eval version andstore/scores/lacks, grading each execution with the scorer blob the release puts in effect; it never rewrites a record. For the legacy alpha dataset (--legacy-root, default.) it grades the counted archive lines whose recorded scorer is not their item's current one intostore/scores/legacy.jsonl. -
release sync|commit|verifykeepsreleases/draft/release.jsonand its blobs in step with the draft, freezes the draft's item set as aYYYY.Nrelease, and verifies a release; see ERRATA.md. -
dataset add <name> <bundle…>appends bundle digests, each with a# configId · challengecomment, to a v4 manifest. New runs join the draft this way:./bench run, then./bench dataset add draft <bundle…>,./bench score --dataset draft, commitdatasets/draft.yaml, then./bench report(it refuses an uncommitted manifest).legacy freezewrites a legacy manifest pinning an archive's attempts and blobs by SHA-256, reading the archive in place (alpha:--dataset alpha --release 0 --eval-version 0.7 --archive benchmark-archive --challenges-dir releases/0/challenges --legacy-root <dir>; release 0 is closed, so it is not re-frozen).legacy convertturns a legacy manifest's pinned attempts into v4 bundles, converting an execution only when its provenance is proven, and lists them in a v4 dataset; the rest are reported with their reasons and need a rerun. See ARCHIVE-FORMAT.md § Converting a legacy dataset:./bench legacy convert --source datasets/sources/draft-legacy.yaml --dataset draft --legacy-root <dir>Provenance before reuse. Every evaluation result keeps its provenance: a result in an older format is reused only when its provenance is proven while converting it, otherwise the evaluation is rerun, and each dataset holds exactly one format. See GUARANTEES.md § Provenance before reuse.
-
auditreads a legacy archive's completed attempts, takes each config's latest result per challenge, and prints one row per item; see Item audit. -
reportbuilds one snapshot per manifest in--datasets-dir(defaultdatasets) into--output(defaultwebapp/public/snapshots):<digest>.jsonnamed by the SHA-256 of its bytes and never rewritten,details/<id>.json, andindex.json. A v4 dataset reads its bundles from--storeand their score records at its eval version (a missing record fails the build: run./bench score --datasetfirst); a legacy dataset reads its pinned attempt files under--legacy-rootand fails on any file that no longer matches its pin. A frozen release's snapshot carries the evaluation-timing labels of its rows (alpha and draft snapshots carry none) (EVAL-TIMING.md). It prints one line per snapshot and the detail counts; see ARCHITECTURE.md § Report pipeline. -
export-eeewrites one completed legacy attempt as Every Eval Ever (schema 0.3.0) JSON plus an instance-level samples JSONL, locally; see EEE-EXPORT.md. -
list-modelsreadsconfigs.yamland prints one line per configuration (id,artifact,runtime,quant,active).list-promptsaggregates every challenge file's inline items and prints each item's name, category, and tier (tab-separated), followed by a# Scenariossection. Both are read-only sanity checks.
For invariants the harness commits to (complete-run skip, scope-managed cleanup, archive immutability, error-channel discipline) see docs/GUARANTEES.md.
./bench run prints a live per-cell result line to stdout as each configuration × challenge cell completes, then prints a summary grid. Pass --verbose (-v) to add intra-call detail: HTTP requests, store scans, health polls, and server lifecycle events.
npm run test # vitest
npm run typecheck # tsc --noEmit
npm run lint # biome + scripts/lint-strict.sh (bans try/catch/throw/console outside CLI)
npm run lint:fix # biome --writescripts/lint-strict.sh enforces the Effect error-channel discipline: throw, try/catch, and console.* are only allowed inside src/cli/. Everything else surfaces errors through tagged Data.TaggedError classes in src/errors/.