DANIEL KLIEWERThe book

The Loop Closes Itself: A Compiler That Directs Its Own Next Compile

By
4 min read

Yesterday's post shipped Pass 4, the Scientific State Compiler: a versioned model of what a field understands, separating accepted from uncertain from contested, preserving disagreement rather than flattening it.

Today we closed the loop. The compiler now takes its own open questions, turns the most leveraged one into a new evidence source, re-compiles the field, and records a real version diff. It begins to direct its own next compile. This is the moment the loop — not the model — becomes the product.

The shape of the loop

The architecture is five steps, all running on hardware we own:

  1. Read the state. Pull the current scientific-state.json — the accepted, uncertain, and contested models, plus the open questions.
  2. Pick a target. Choose the highest-leverage open question. When the field is contested, prefer the question sitting closest to the live disagreement — that is where new evidence moves the needle most.
  3. Generate an evidence brief. A model pass proposes what would resolve the question and what type of evidence would do it. Not citations — a specification of the experiment: "a longitudinal cohort with fasting insulin and hippocampal volumetry," "pericyte-specific insulin-receptor knockout with BBB tracer kinetics."
  4. Write it as a source. The brief becomes a new document in the corpus. The loop has manufactured its own next input.
  5. Re-compile and diff. Re-run the state pass, then commit to Scientific Git. The new version carries a real diff against the old one — what models entered, what stayed contested, what the field's counts became.

Step 3 is the part a retrieval system cannot do. A search returns the papers that exist. The brief specifies the study that should exist. That is synthesis, not retrieval.

What actually happened

On the three-document Alzheimer's & metabolic dysfunction corpus, the loop ran end to end against the 35B model:

  • It targeted the open question "What is the temporal hierarchy between metabolic/ vascular dysfunction and amyloid?" — the most contested hinge in the field.
  • It produced a brief titled "Temporal Hierarchy and Permissive Role of Metabolic/ Vascular Dysfunction in Early Amyloid-Driven Neurotoxicity."
  • It wrote that brief into the corpus and re-compiled.
  • Scientific Git committed version 2 (hash bd692c8db287b7f1), with a real diff: the state now carries 7 accepted / 4 uncertain / 3 contested models and 3 open conflicts, each named, each attributable.

The diff is not cosmetic. It is the structural record that re-compiling with new evidence changed the field's modeled understanding. Run it again and version 3 appears. The artifact is no longer a frozen file — it is a versioned research substrate, and the version history is the proof the loop is advancing rather than spinning.

Why this matters

The prevailing paradigm treats research assistance as a question answered. The State Compiler treats research as a compile — an idempotent, versioned transformation of a corpus into understanding. The closing loop makes that transformation self-directing: the output of one compile (open questions) is the input selector for the next (which evidence to seek).

This is exactly the SovereignSpec thesis made mechanical: intelligence is not the model; intelligence is the accumulated decisions that shaped the model. Here, the accumulated decisions are the versioned sequence of compiles, each one recorded, each one diffable, none of it leaving the machine unless you push it.

What you can look at

Where this goes

The five compiler directions — Mechanistic Reasoning, Scientific Question, Scientific State, Discovery, Unknown Detector — are passes in one architecture. With Question (Pass 2) and State (Pass 4) producing versioned artifacts, and the loop closing them, the remaining move is to let the loop run unattended across a corpus that grows from its own output: a research compiler that wakes each morning, reads its own open questions, and compiles the field one step further.

You are looking at a compiler that directs its own next compile, running on hardware we own.

What this makes possible next

Unattended iteration: the loop reads its open questions, proposes evidence, and re-compiles on a schedule — each pass a new versioned commit. The field's modeled state advances without a human prompting it, and every advance is diffable and revertible. That is observability as the operating system, applied to science itself.

Related research

Jul 26, 2026

Does the Compiler Know When It's Wrong? Semantic Rediscovery and the Limits of Falsification-Awareness

Popper-ORKG ended with two honest failures: temporal rediscovery was near-zero, and the compiler confidently rebuilt Lamarckian inheritance. v4 exists to ask whether those are fixable weaknesses or fundamental limits — by adding measurement, not by tuning the scorer. The answer turned out to be one of each. Mechanism-level semantic matching shows rediscovery was a measurement artifact all along (0.63 vs 0.005 exact-match, flat across temporal gaps). But a falsification-awareness consensus check could not downgrade Lamarckism or caloric: the ORKG index contains no detectable refutation edges, so the near-miss is a genuine limit of the knowledge substrate. Everything in popper/ and orkg/ stayed byte-for-byte frozen, md5-verified. Run locally on a 35B model.

Jul 25, 2026

Does the Hypothesis Compiler Generalize? Running Popper on a Corpus I Did Not Build

Popper beat its controls on five hand-curated benchmark literatures — but I built those corpora, so the result could be an artifact of clean data. This experiment removes that objection: the identical pipeline, byte-for-byte, run on a corpus I did not build — the Open Research Knowledge Graph, 6.3 million triples across 65,689 papers and seven scientific disciplines. Same schema, same rubric, same four-way controls; the only independent variable is the corpus. The compiler still wins (0.85 composite vs 0.56 keyword vs 0.00 ungrounded), an ablation proves the architecture is load-bearing (remove graph reasoning and it collapses to zero), and the grounding audit finds zero hallucinated citations across 265 evidence items. It also fails honestly: exact temporal rediscovery is near-zero, and it confidently rebuilds Lamarckian inheritance. Run locally on a 35B model.

Jul 24, 2026

Popper: Making the Hypothesis Compiler Falsifiable — Rediscovery Benchmarks, Negative Controls, and the Move From Plausible to Provable

The last experiment proved a knowledge-graph compiler survives scale. This one asks a harder question: are its hypotheses scientifically meaningful, or only linguistically convincing? Popper stops trying to make the compiler smarter and starts making it falsifiable — a strict hypothesis schema, source-level provenance, three negative controls, and a historical rediscovery benchmark where the discovery paper is removed and the system must reconstruct the leap from prior literature alone. Run locally on a 35B model: the compiler scored 0.89–0.97 composite against 0.00 for ungrounded generation, and reconstructed the CTLA-4 checkpoint-blockade and nucleoside-modified-mRNA discoveries from their prior literature — while honestly failing on CRISPR and refusing to confidently rebuild phlogiston.

Jul 23, 2026

Building the Scientific Question Compiler: A Map of What We Do Not Know

We built the second compiler in the Scientific State program: the Scientific Question Compiler, which turns a corpus into a map of what humanity does not yet know. Local-first, running on a 35B model on our own hardware. Here is what we built, what broke, and what it means.

Jul 23, 2026

The Next Experiment: From 'Survives Scale' to 'Correct' — Grounding, Negative Controls, and Quantitative Domains

Today we proved the Scientific Question & State Compiler survives scale — 6.3M ORKG RDF triples distilled into a 300-document corpus, 881 claims, 13 ranked questions, a versioned state of the field, all compiled locally on a 35B model. But surviving scale is not the same as being correct. This post records what we built, what we learned, the four bugs that only appeared at scale (including one that shipped Alzheimer's data into the live ORKG demo), and a fully-specified next experiment: source-level traceability, a grounding audit with a groundedness rate, a negative control, a fixed versioning layer, an explicit distillation method, an external-validity check against survey papers, and a move to quantitative domains (COVID-19 observatory or materials science) where contradictions are measured, not just defined.

Jul 23, 2026

Pass 4: The Scientific State Compiler — A Versioned Model of What We Understand

Pass 4 of the Scientific State Compiler: we took the map of scientific uncertainty and promoted it into a versioned state of a field — accepted, uncertain, and contested models, with the disagreement preserved. Local-first, running on a 35B model on our own hardware.

More from the archive