Proprietary · AI & Products

Clausify turns laws into code

Laws are made of clauses: if these conditions are met, this follows. A Horn clause is the same idea in logic: one conclusion, and the conditions that make it true. That makes Horn clauses a natural way to write law as code.

Clausify is our formalisation engine: a pipeline that tightly constrains large language models to turn legal text into verified, executable logic programs. LLMs do the translating, but never make the decisions. Decision-making runs deterministically in Clausal Prolog.

In short

Clausify turns legal text into rules a machine can run, then checks them against an independent test before they ship.
Our published rule sets went from 8 on 20 October to 181 on 28 November 2026. See our progress

What it is

Clausify turns normative text into verified, executable rulebases in Clausal Prolog, with query, planning and explanation on top.

It is a power tool for a human operator. It is not an autonomous agent.

The language model translates. It is never on the inference path. The result is a logic program, and queries are answered by resolution over it. No model runs when a decision is made.

Clausify is proprietary. The engine it targets and the published rulebases are open: see Law as Code.

The pipeline

Every domain starts as an order. The order names the statutes, pins the public interface and states the verdict vocabulary: eligible, ineligible or indeterminate. A producer model then works through a phase ladder: research and plan, rules and tests, gates, packaging. The result is scored against a sealed oracle that the producer never sees. Green means zero refutations. Anything else goes back into repair.

Order, then research and plan, rules and tests, gates, sealed scoring against an independent oracle with a repair loop, then the domain package

What comes out is a domain package, the same shape as the rulebases in our open repository:

  • rules in .clausal, where every rule names the provision it implements;
  • citations that quote the statute word for word;
  • the statute text, pinned by URL and SHA-256;
  • tests, and a provision ledger for the domains that track provisions so far;
  • a manifest stating the scope and the public interface;
  • generated ISO Prolog, so the rules also run on Scryer Prolog and Trealla Prolog.

Could this check have failed?

Turning a regulation into code is a translation, and translations can be wrong. Writing some tests and watching them pass is close to worthless when whoever wrote the rules also wrote the tests. So the verification asks a harder question: could this check have failed, and if it could, was it able to fail for the right reason?

A rulebase ships only when all eight layers are green. Each layer is reported separately, because each certifies something different.

Eight layers from weakest to strongest: loads and runs, conformance, blind authoring and sealing, differential testing, mutation testing, non-vacuity, standing adversary, proof

An outer gate-runner re-derives every verdict itself. A run cannot grade itself.

Built for rigour

  • Blind authoring. Each domain gets two artefacts: the rulebook, and an independent oracle, a second implementation whose only purpose is to disagree. Different models write them from the primary legal text, and the oracle's author never sees the rulebook.
  • Mutation testing. We break a copy of the rulebook in small, legally plausible ways, such as a figure transcribed wrong, an off-by-one on "equal to or more than", or a dropped exemption. The unchanged oracle must notice every break.
  • A standing adversary. A catalogue of attacks chosen by the shape of the contract, plus a free-form frontier model. A refutation carries a replayable witness: the exact query and the wrong answer.
  • Proof, where proof is available. For the questions where it can be done, rules are checked to be disjoint and exhaustive.

Every divergence is a rulebook bug, an oracle bug, or a genuine ambiguity in the law. Finding the third kind is part of the point.

What it does not claim

Conformance is not correctness, because the author writes the conformance tests. A kill rate in mutation testing certifies detection power over the errors we planted, not the absence of every defect. We say so because the point of this approach is that its claims can be checked.

Back to products