Repository navigation
Releases
Klein 3.1.0 — proportional rigor: the quick look
A study can now say how much rigor it is asking for, and what it says caps what it can claim: policy: {rigor: quick} (default full).
A quick look is a real study — a typed question, a data check, a registered prediction decided by the notary, a claim with a pinned number — that needs only the CONSULT and DATA gates, takes no sealed look, closes without a referee, and can claim exploratory at most. klein promote lifts it to full rigor later; nothing is re-run or rewritten.
klein new --rigor quickscaffolds one;klein nextdrives it;status,map, the verify receipt and the report all carry the tier.- The record has the last word: a study that has spent sealed evidence, or closed
confirmed, is not a quick look whatever its contract now says. An independent review of this release found that gap and it is closed. - A claim strength can be lowered by an erratum, never raised.
klein replicate --tolerance seed-stdfor seed-array runs.- The release packaging check now inspects the installed wheel, and runs on every pull request.
Every existing study is full by default, and the eight shipped exhibits verify with the same passes and warnings as under 3.0.0. This release contains all of 3.0.0, which never reached PyPI.
pip install klein-auto-research · full list and known limitations: CHANGELOG.md · design: docs/design/klein-3.1-quick-look.md
Klein 3.0.0 — from a notary to a research instrument
Klein 2 certified research. Klein 3 keeps that judgment unchanged — the eight shipped exhibits verify with the same checks, passes and warnings — and adds what a researcher does most: looking around, and making sense of what was found.
klein demo— a real tiny study, live, in about 15 seconds, offline.klein probe— a look on the record: hash-chained, fenced from the sealed data, never claim evidence.klein map— question → predictions → runs → claims → decisions, and what is still open.- One schema (3). Older studies verify at
v2.3.1/v1.3.0; nothing was rewritten. - A sealed run now requires a passing rehearsal of the same code.
--jsonon every verb,kleinlib.api, JSON Schemas (klein schema), the whole skill inside the wheel, a Claude Code plug-in.
This version is not on PyPI. Its release run failed in a faulty packaging check — the check inspected the source folder instead of the installed wheel — and published nothing. The wheel itself was complete. The check is fixed in 3.1.0, which contains all of 3.0.0, so install 3.1.0 instead: pip install klein-auto-research. This tag stays for anyone pinning the commit.
Breaking changes and the full list: CHANGELOG.md. Rationale: docs/design/klein-3-design.md.
Klein 2.3.1
PyPI README images, opt-in identifier-aware numerals (policy: {numerals: identifier-aware}), and a preflight advisory when calls: has no price. No shipped receipt changes.
This is the last release that reads schema-2 studies: an archived schema-2 study verifies with this engine.
Full detail: CHANGELOG.md.
Klein 2.3.0
[2.3.0] — 2026-11-03
Klein 2.2 notarized research on tables well and on everything else by workaround: a
binary evaluator, a whole-log metric channel, one input file, wall-clock budgets only,
a blocking wrapper as the only remote compute, and a Claude Science row that was a
paragraph. 2.3 keeps the trust kernel exactly as it was — the notary transaction, the
hash-chained events, manifests, the claims law, the predictions ledger, the referee
gate, the verify receipt — and grows domain packs and host bridges around it, so a
study in computer vision, deep-learning training, LLM evaluation, data science or
mathematics is a first-class Klein study. Every shipped study re-verifies unchanged:
new behaviour lives only in contract fields 2.3 scaffolds write (an older engine
refuses such a study loudly instead of misjudging it), and a manifest records a
non-default rule only when it applied.
Added — guided onboarding
klein next [--study S] [--json]— the ONE next action a study needs: its stage,
what is done, the exact command, the protocol section and why. Strictly read-only.
klein status --jsonbeside it.klein new --recipe <domain>—tabular-predict,cv-classify,dl-scaling,
llm-eval,ds-causal,math-verify: kind / modality / profile / metric / split,
the 2.3 contract blocks and apolicy:block pre-filled, and aprepare.py+
entrypoint (+ verifier) that smoke offline — with{{…}}placeholders wherever
judgment is required, so a gate still refuses a rubber stamp. Explicit flags win
over the recipe.--runner pythonwritespython -u …commands for hosts
without uv.klein claims apply claims.yaml— artifact pins, numbers and claims in one
all-or-nothing file.
Added — the metric channel, data and evaluation
entrypoint.printed: block— metrics are read from the last line that is
exactly---to the end of the log, so training chatter (loss: nan,epoch: 3)
can neither crash nor pollute a run; a log without the opener is a crash. The
manifest recordsprinted_scopeand replication follows it.- Index-table splits (
data.split.index,id_column,label_column,
split_column) for images, text, sequences and graphs, andkind: predefined
for official partitions (MedMNIST, GSM8K): real fingerprints over item ids, enforced
at every run.kleinlib.data.load_items()hands an entrypoint its partition's ids. data.inputsfor multi-file studies andhf:<owner>/<repo>@<commit>/<path>
pinned Hugging Face sources;klein doctor --studyreports one line per file.- Near-duplicate and contamination audits —
python -m kleinlib.leakage --index … --near-dup image|text [--against <pool>]: 64-bit dHash for images, normalized
13-gram overlap for text. policy:— strictness-only knobs:card_sections: enforce(the modality's data
card headings, plusNear-duplicate auditfor image/text/sequence/graph and
Contamination auditfor thellmprofile),realized_split: required,
noise_floor: required.- Evaluators:
evaluate_multiclass(accuracy, balanced accuracy, macro-F1, top-5,
log-loss, ECE; confusion table pinned; a one-class collapse guard),evaluate_items
(exact match, pass@k with the unbiased estimator, per-item tables, cluster bootstrap),
ranking (NDCG@k, MRR, recall@k), survival (Harrell's C) and segmentation (mIoU,
Dice). Metrology: exact McNemar, paired item bootstrap, seed-by-item variance; the
item-bootstrapandresamplefloor recipes. - Profiles
llm,cv,data-science(eight sections each, banned words included);
ml-researchdeepened as the deep-learning profile. Five new seed method cards.
Added — execution
- Seed arrays (
entrypoint.seeds: [0, 1, 2]): one candidate is N children with
KLEIN_SEED; the notary decides on the mean, records std / min / max and pins
runs/E####/seeds.tsv. A contract field, never a flag, so N cannot be chosen after
seeing results. - Usage and budgets — a child reports steps / tokens / calls / USD with
kleinlib.dl.report_usage;manifest.usageandexecution.hardwareare recorded
for every exit status, andphases[].budget_steps|tokens|usdare enforced beside
budget_seconds.kleinlib.dl:seed_everything,hardware_report, an atomic
Checkpointer.SweepRunner(workers=N). - The model-call ledger (
kleinlib.calls.CallLedger, stdlib only): a
content-addressed record of every request and response (calls/E####-NNN.jsonl.gz,
deterministic shards, secrets scrubbed), a hard budget that crashes honestly,
KLEIN_OFFLINE=1cache-only replay, and pinning on every exit status.
klein replicate --replayre-runs offline from the pinned ledger (areplay:
record, never counted as a replication); plainklein replicatere-queries with
salted keys. No Klein verb imports it. - Detached runs (opt-in,
entrypoint.execution: [local, detached]):
klein run-one --detachfiles the candidate and a job bundle and freezes the study;
klein job execruns it on any host and writes a receipt;klein run-one --collectchecks the receipt against the committed job and judges the run locally,
recorded as attested, not observed;--abandon --reasoncloses one that never
returns.verify,finalize,recoverandnextall know about an open one.
Added — host bridges
integrations/claude-science/— install (PyPI wheel, or uv with
UV_PROJECT_ENVIRONMENT), project instructions,klein-researcherand
klein-refereeSpecialists, Reviewer criteria (a pre-referee pass, never Gate 3),
remote compute via SSH/Slurm and Modal job cards, artifacts.klein mcp— a stdlib, read-only MCP server over stdio (list_studies,next,
status,doctor,preflight,verifywithout a receipt,predictions,
claims_verify,explain). No gate or run tool, by design.klein refs verify [--record]— resolve every DOI (Crossref, OpenAlex) and arXiv
id inreferences.yamland compare titles; opt-in network, never imported by verify;
--recordis a comment-preserving edit that never overwrites a human verification.klein notebook E####— a run as a reading-copy.ipynbof the executed source
at its candidate commit plus its printed block.klein doctor --host claude-science|claude-code|generic.- The audience profiles ship inside the wheel, so a PyPI install keeps the vocabulary
scan; CI asserts byte-identity and that the recipes are packaged. .github/workflows/release.yml— PyPI trusted publishing onv*tags.
Added — five exhibits, one per domain pack
Each ran the full lifecycle on its own experiments/<id> branch, merged with history:
recipe scaffold, typed data card with the new audits, method card with verified
references, registered predictions, sealed run after the mandatory dry run,
replications, claims lock, an independent referee (20–23 failed round 1 and passed round 2
with notes; 24 passed round 1 with notes), finalize confirmed, a tutorial, and knowledge promoted with typed
citations (knowledge/domains/{llm,cv,data-science}/, ml-research/, math/,
research-discipline.md lessons 12 onward).
- 20
llm-cot-contamination(test · text · llm) — chain-of-thought vs direct
answers on GSM8K and on procedurally generated twins, every DashScope call ledgered;
re-verifies with the network off. - 21
bloodmnist-cnn(predict · image · cv) — pixel logistic regression to a small
CNN under a 3-seed-array floor; predefined official split with cross-split
near-duplicates removed by the audit's rule. - 22
cnn-data-scaling(estimate · image · ml-research) — a data-scaling law fitted
on detached (attested) cells and held to a sealed full-data extrapolation. - 23
lalonde-causal-replication(replicate · tabular · data-science) — Dehejia–Wahba
NSW/PSID/CPS viadata.inputs; an operator incident (a history repair during a live
run) is filed underincidents/. - 24
golomb-llm-vs-search(test · none · math) — LLM proposals vs a classical
randomized search at a matched budget of exact-verifier calls. - Studies 20 and 24 commit their model call ledgers (
calls/), produced on a paid
pay-as-you-go DashScope key and labelled AI-generated incalls/README.md, as the
provider's terms require.
Fixed
- The leakage audit reproduces scalar-task and predefined splits (found at study 23's
DATA gate). - A phase ladder rewritten at CONSULT is followed by the state until work starts
(found at study 23's first preflight). - The
cv-classifyanddl-scalingrecipe smokes train long enough to clear the
collapse guard on real data (found at study 21). klein finalizeandklein nexthonour a track's ownconfirmation.require: a
track declaring a non-empty list withoutsealed(study 22's fitted exponent,
[replicate]) closes on its records instead of being held to a sealed look it was
never meant to take; an empty list still cannot closeconfirmed. Labels already
recorded are never recomputed (found at study 22's finalize).- The sealed dry run files the new files its evaluator wrote (a DRYRUN-keyed
confusion table) in its own commit, so the mandatory rehearsal no longer leaves a
tree that refuses the sealed run (found at study 21). - The contract-driven split check recognises
load_items, the index-table wrapper
overload_partition, instead of warning that no source asks the contract for a
partition (found by the referees of studies 20 and 21). - The referee protocol asks for repo-relative paths: a gate-hashed report cannot be
edited afterwards, and study 21's round-2 report named its worktree (exempted by exact
path in the universality guard, as frozen evidence)....
v2.2.0 — Klein 2.2: the report reads the study's records
Klein Auto Research 2.2.0 — the report reads the study's records
The tutorial builder (.claude/skills/klein/scripts/build_tutorial.py) now reads the study's own records instead of trusting prose: an <!--EVIDENCE--> block copied from claims.lock and study_state.json (claim totals by strength and class, errata, the finalization label, the referee's verdict and independence), source includes that name the run they show (data-run="E####", read at that run's candidate commit with a provenance line; a bare include of a mutable-surface file is refused), a track- and kind-aware experiment ledger, captioned figures with decoded sizes and a CSS-only zoom, stable subsection anchors, and a layout that fits a 320 px phone and prints whole. A new weekly scripts/check_shipped_reports.py measures every shipped report in a real browser at four widths plus a print-to-PDF pass; older pages classify LEGACY and never fail.
The six schema-3 reports (studies 00, 10, 11, 12, 13, 15) are rebuilt under the contract — including the correction of study 15's stale ten-claim paragraph and study 11's include, which had shown the restored template while the prose called it the executed cell — with each notebook disclosing the rebuild and each verify receipt re-issued. No run, ledger, prediction, claim, gate record, lock, referee report or findings changed. Core klein verbs, schema 3 and the generation layer are untouched; the only kleinlib change is that the advisory tutorial numeral scan skips navigation text.
Full changes: CHANGELOG.md, section [2.2.0].
v2.1.0 — Klein 2.1: the process-verifiable generation layer
The process-verifiable generation layer. Klein 2.0 made the verification half of
research auditable by a stranger: typed question, registered prediction, notarized
evidence, locked claim, independent referee. 2.1 adds the generation half as an opt-in
layer beside it: a schema-3 study may now record what it committed to BEFORE the evidence
existed — which domain baseline it would reproduce, which hypotheses it would try and how
likely it thought each was, which expert comparison it would run and by what rule, which
segments it would screen — and have a separate audit establish, by hashes and git ancestry
rather than by a clock, that each commitment preceded the action it constrained. The layer
records, hashes and computes arithmetic on rows the driver wrote. It never proposes,
ranks, selects, schedules or retries.
Highlights
- The spine —
klein generation init | check | verify | label | status | recover.
An immutable opt-in manifest anchored before the CONSULT gate; one admission receipt
per action, binding the intended action and the exact bytes of the mutable surface,
committed before the run; a refusal recorded exactly like an admission, so ignoring one
is detectable.generation verifywrites its own receipt and classifies every run in
scope asadmitted | unadmitted | refused-but-run | mismatched | replayed. Order comes
from three local witnesses — the extension hash chain, an anchor into the core chain,
git ancestry — never a timestamp. Thegeneration-verifiedlabel needs the core
klein verifyreceipt AND the generation receipt passing at the same HEAD. - Ten capabilities, declared at
init, each a registered plug-in with its own verify
family —expertise(freeze a domain card, reproduce its baseline as an ordinary
run, and no challenger is admitted until it reproduces), reference records (what a
citation rests on and how closely it was read),slates(4–6 authored hypotheses per
phase with forecasts scored by Brier afterwards — nothing scores or ranks a candidate),
design(what the evidence is for, locked before the DATA gate, with every validity
condition reaching an arithmetic rule),premortem(a recorded red team between the
draft slate and the first run),parity(one preregistered vector comparison against
the expert pipeline, decided as exceeds / at least parity / refuted / inconclusive with
margins written down before the evidence),contribution(the AI-value ledger,
rejections included, descriptive unless a matched ablation is cited),escalation(a
frozen ladder out of a stall, every rung accounted for, successor studies that inherit
their exposure),knowledge(a repo-level store of promoted claims copied verbatim,
contested only with cited evidence, consulted before the CONSULT ack with a replayable
receipt), andbenchmark(planted truths under a salted hash commitment, submissions
frozen before reveal, custody as a named holder's testimony — a hash is not secrecy). - Integrity and outcome are reported separately. A study that reproduced nothing,
stalled, or stopped is stillgeneration-verifiedif every attempt is on the record;
the label carries each capability's outcome beside it. - The public face —
README.mdreordered around a five-minute path, a new
docs/quickstart.md
that walks one complete study from install to the signed tutorial with every command
executed and its output quoted, and the lifecycle and transaction drawings regenerated
to show where the opt-in layer sits.
The core is unchanged
run-one gains no call site, option or default; klein verify, finalize, the claims
law and every existing receipt are byte-for-byte what 2.0.0 produced. The diff outside
the new package is two registration lines in the CLI. A study that does not opt in is
untouched. Schema-2 studies keep verifying under schema-2 rules forever, and the layer is
schema 3 only.
Full detail, including every Fixed entry from the review pass:
CHANGELOG.md § 2.1.0.
Two follow-ups landed on main after the tag, both CI-only: the parity tamper test now sets its own git identity (it failed on identity-less runners), and the Windows full-suite lane has a longer cap. Neither changes shipped behaviour; main is fully green at bb77df3.
v2.0.0 — Klein 2.0: process-verifiable research for AI for Science
Process-verifiable research for AI for Science. Klein 1.x ran a disciplined
experiment loop; 2.0 makes the whole study auditable by a stranger with no model in the
loop. A study is now TYPED on three axes — kind (what shape of question), modality
(what shape of evidence), profile (whose vocabulary is honest here) — predictions are
registered before their evidence and adjudicated by arithmetic inside the run
transaction, every number in the write-up has a pinned home, and an independent referee
on a different model applies a fixed ten-check rubric before the study may close.
Highlights
- The inquiry model —
kind×modality×profile. The kind fixes the track
mode, what "sealed" means and the strength a claim can reach; the modality selects the
data-gate card; the profile changes vocabulary, never what the engine checks. - The schema-3 contract — a declared mutable surface, frontier and registered
track modes, a per-track verifier that always sits outside the mutable surface (the
checker is never the searcher), metric bounds, andpredictions[]with arithmetic
rules. - Predictions adjudicated by the notary —
klein run-one --tests P#evaluates each
rule on the printed block inside the transaction.klein finalizerefuses open
predictions; a refuted prediction with no datedDecision:line fails verification. - The claims lock and the numbers law —
claims.lockschema 2: claims with a class,
a strength and resolvable evidence; numbers with a pinned artifact and a precision;
a seven-check law including append-only across git history. Errata re-scope claims;
nothing is ever removed. - REFEREE, Gate 3 — a fresh context on a different model, tool or person reads
findings.mdfirst andprogram.mdlast.klein gate record refereerefuses a FAIL
outright and stores the independence rung reached. - A receipt that measures evidence use —
verify_receipt.jsoncarries every check,
the hashes of what the audit read, andevidence_use_rate: the share of discards,
crashes, measured cells and registered sweeps the write-up actually cites. - Metrology and the detection limit —
klein noise-floormeasures the floor with a
named estimand before any comparison; headroomh = (incumbent − ideal) / minimum_delta
refuses a tournament that was decided before it ran. - Contract-driven splits, a sealed dry-run, and
klein replicate— partitions built
fromstudy.yamlalone with a fingerprint the notary compares; a mandatory rehearsal
that spends no seal; a development run re-executed in a detached worktree. - Five refereed exhibits — studies 00, 10, 11, 12 and 13, one per axis of generality.
Schema 2 is frozen, not migrated
Studies 03 and 05–09 keep verifying under the rules they were run under, byte for byte,
forever; none of the schema-3 checks are enforced on them. Version-1 studies stay
readable at tag v1.3.0. docs/migration-schema2-to-3.md is the contract diff — the
short version is: do not re-open a closed study, start a new one and cite the old one's
claims.
Full detail, including every Changed / Fixed / Removed entry:
CHANGELOG.md § 2.0.0.
v1.3.0 — the detection-limit release
The detection-limit release. A measured noise floor can honestly outgrow the
incumbent's entire distance to perfection — and when it does, the keep bar sits below
zero and no challenger can ever win. Study 07 hit exactly that, and nothing in the
engine said so.
1.3.0 adds bounded-metric headroom: declare the metric's best achievable value and Klein
computes h = (incumbent − ideal) / minimum_delta, discloses it at preflight and
verify, enforces it at run-one, and refuses further development runs at h < 1
until klein headroom ack puts the closed door on the record. Read h ≥ 1 as
"not arithmetically excluded", never as "plausible".
Release bookkeeping — an erratum
Filed in the spirit of Klein's own erratum doctrine: tag what happened, never rewrite it.
This tree still declares version 1.2.0 in pyproject.toml and its CHANGELOG carries no
1.3.0 entry. The release was merged and used by studies 07, 08 and 09 without ever being
tagged, which is why those studies' claims.lock files record klein_version 1.2.0.
Pin by commit, not by version string: the code at this tag IS the v1.3.0 framework.
The tag itself was created retroactively on 2026-09-02, and this GitHub release was
published later still, alongside v2.0.0.
This tag is also the last tree that contains the schema-1 quickstart study
(studies/00-*) and its v1 ledger adapter; Klein 2.0 removes both from main and
documents "read v1 studies at tag v1.3.0".
v1.2.0 — the typeset release
The typeset release: the two frictions the 05/06 arc filed are fixed in the
engine, and generated tutorials gain build-time typeset mathematics and
highlighted code — with the zero-network CSP contract byte-identical. All four
public exhibits are re-authored to the new convention and rebuilt; their prose
numbers are unchanged (verified by numeric-multiset diff against the previous
pages).
Added
- Tutorial builder: LaTeX in
data-math/data-math-displayelements is
typeset at BUILD time to inline SVG glyph paths (ziamath, STIX Two Math
outlines) — no fonts shipped, no runtime script;font-src 'none'and the
single-hashscript-srcstand, and the browser netlog CI fixture now
exercises math and code forever. Pygments highlightslanguage-…blocks
(pinned dual-theme styles);<pre data-code="train.py">includes the winning
script by reference — the included bytes are guaranteed to be the committed
file's, so a hand-paste can no longer drift. New deps: pygments, ziamath,
latex2mathml. klein preflight"guardrail visibility" check: warns when a declared
guardrail metric is neither auto-printed for the study's calling evaluator
(kleinlib.schema.AUTO_PRINTED_METRIC_KEYS+EVALUATOR_PRINTED_KEYS) nor
named in the study's Python sources.- Ledger-derived seal guard in
klein run-one --final-test: a sealed access
recorded in the hash-committed manifests refuses a second access even if
study_state.jsonwas edited afterwards. - Studies 05 (freMTPL2 sealed-gap forensics) and 06 (hurricane gQLS
return-level stability) — the third and fourth public exhibits, carried from
the pre-release period (full detail in the CHANGELOG).
Fixed
- F1 (study 05, E0001): every evaluator prints
wall_seconds:— guardrails
read the PRINTED block, and the sidecar-only value discarded an anchor-exact
candidate. Callers already passing it viaextra=keep byte-identical
stdout. - F2 (study 05, E0012):
load_statetops upfinal_holdout_accessfrom the
current contract in memory, so a post-scaffold track addition no longer
strands the sealed gate.
Changed
- All four exhibits re-authored to the typeset convention (three divergent
math notations retired); studies 00/03 additionally gain the full winning
train.pyby reference.pre codetypography tightened (1.55 → 1.4
line-height).tutorial-spec.mdreworked: the bundled builder is the route
of record; authoring conventions + validated LaTeX subset documented; war
story №6 added (the unprinted guardrail).
SemVer: additive minor — the study schema (v2), the klein CLI surface, and
the ledger formats are untouched.
Klein Auto Research 1.1.0
Klein Auto Research 1.1.0 — the slim release.
Public main is now the reader-first product: two executed exhibits — the bundled-data ML quickstart (00-glm-claims-quickstart, 58k real auto-insurance claims, runs from a bare clone) and the schema-v2 math/optimization study (03-noisy-rosenbrock-dfo, full evidence contract live) — plus the engine, the protocols, and nothing a first-time reader must climb over. The tree is 39% fewer files and 44% lighter.
Nothing is lost. The three further exhibits (the 58k DAE honest-no, the robust-QLS known-truth severity lab, the 678k freMTPL2 frequency soak) and the retired archive docs are preserved intact at tag v1.0.0, where every recorded candidate commit resolves.
Also in this release:
- CI retargeted step-level with no check renamed; reproduction anchors for both kept studies remain.
- Framework tests adopt
kleinlib.data.load_xyandfeature_column_groups; engine coverage holds at 87%. - ML/Math positioning aligned across README, package metadata, and CITATION (math labs run under
task_type: simulation); repo topics gainedoptimizationandsimulation. - Commit-message trailers normalized across
main(authorship-metadata cleanup); tags v0.1.0–v1.0.0 keep the original history.
Full details: CHANGELOG.md · Operating manual: AGENTS.md