regel · dutch, “rule” — also “a line of code” · rhymes with “bagel”

The code is rows.
The rows are TypeScript.

Regel fuses two siblings. From kern: the application as governed, content-addressed rows in one Postgres — code that enters by admission transaction, pauses as continuations, and runs inside capability environments. From streng: the dialect — closed-world strict TypeScript 7, the most fluently machine-written language on earth, checked by a vendored native compiler in milliseconds. One Go kernel. One Postgres. Deploy is a commit. Rollback is a WHERE clause. And nothing lands unverified — not from an engineer, a tenant, or an agent.

deal.ts streng dialect · what models write
admit! tsgo 7 + verifiers · in the transaction
rows content-addressed · catalogued · immortal
kernel ⇄ pg evaluates · remembers
Parentage

Each parent's fatal flaw was the other's core strength

Read side by side, kern and streng were converging and neither noticed. Kern conceded that nothing about code-as-rows requires s-expressions — only a canonical rendering and an AST with a schema. Streng's gate was already an embryonic admission pipeline; its sandbox was already kern's governed evaluation; its epoch was already kern's re-verify-the-world move. What kept them apart was that each carried a flaw the other had solved — confessed, in both documents, in their own honest edges:

kern confessed

“A new dialect is a small hiring pond.”

Regel's dialect is the largest developer pool and the deepest training corpus in software. There is nothing to learn — only things to subtract. Every model, and a million engineers, are fluent on day one.

kern confessed

“A dynamic dialect can't say ‘it doesn't compile.’”

Regel puts tsgo — a real static checker, native and instant — inside the insert transaction. The type system kern had to rebuild from verifiers comes off the shelf; the verifiers are freed to check what types can't: capabilities, PII flow, contracts.

streng conceded

Files and git — the most conservative substrate in the family.

Regel stores the application as content-addressed rows: deploy is a commit, rollback is as-of, the artifact registry is the history tier, and the audit machinery finally covers the code. Git remains — as a deterministic projection, not as truth.

streng conceded

Only tenants were caged.

In regel, governed evaluation is the whole substrate. An engineer's deploy, a tenant's Settings edit, and an agent's patch pass one gate — the same transaction, the same verifiers, the same audit row. There is no privileged side door called “CI.”

The one-sentence mind-blow: the codebase is a database you can SELECT — and its language is the one every model on earth already speaks. Kern built the substrate agents can't hallucinate off of; streng built the dialect agents can't stop writing. Regel is the observation that they were two halves of one system.
How it runs

The kernel has three jobs. Everything else is rows.

Kern's shape, kept exactly. The kernel — a reactor, the vendored tsgo checker, an owned interpreter with a fuel meter, the verifier suite, and a wire protocol — is the only compiled artifact, and it ships zero business logic. It is to your product what Postgres is to your rows.

admit — code enters by transaction

A patch arrives as TypeScript source. The canonical printer normalizes it to the one rendering; tsgo typechecks it against the catalog; the verifiers — capability audit, PII flow, contracts, catalog parity — run in the insert transaction, with the schema migration if it carries one. Rejected code never becomes code.

evaluate — two tiers, one language

Admitted definitions run on the kernel's owned interpreter: the strict subset, CPS-transformed so any program can pause. Trusted code runs unmetered; tenant and agent code runs fuel-metered in capability environments — an unauthorized call isn't rejected, it's unnameable.

resume — everything paused is a row

Workflows, UI sessions, and durable conditions are continuations — expression plus environment, stored with a wake condition. Any node resumes any of them, and a paused workflow resumes against the exact code hashes it started with. As-of for code deletes the workflow-versioning problem.

remember — one history, both substances

Every version of every row and every version of every definition, in one time-partitioned history tier. “Who changed this workflow, what did it look like, who approved it” is the same query as “who changed this record.” The SOC 2 answer is a SELECT, not a screenshot.

The stack

What each parent contributes — and what only the fusion has

Regel the fusion's own
ancestor · unison, executed on the corpus language Content-addressed TypeScript. The strict subset has exactly one canonical rendering, so the hash is the identity, names are catalog pointers, renames are metadata, and an agent's patch references exact hashes. Structural diffs are the only diffs. Nobody has done this to the language everyone writes.
Dialect from streng
strict closed-world typescript 7 Subtract, never add: no any, no unchecked casts, no eval, no imports outside the world. The corpus is the spec, tsgo is the checker, the editor plane is inherited free, and the epoch upgrades dialect, engine, stdlib, and gate as one atomic step.
World from streng
std/ — the batteries, owed by the closed world identity, the two-tier component library (primitives + derived forms, tables, dashboards, operator plane), the workflow engine, resources with vault and history, mail · files · i18n, test. Complete for the B2B envelope, versioned with the epoch, grown by the Rule of Three.
Admission from kern
verifiers in the insert transaction Deploy pipeline, artifact registry, rollback runbook, and guardrail bolt-ons — deleted, replaced by one gate. “Declared but unenforced” cannot be admitted: a policy no admitted path consults fails catalog parity and never becomes code.
Continuations from kern
durable execution without replay gymnastics Workflows and sessions serialize as rows; effect and checkpoint commit in one transaction; a failed step signals a durable condition whose restarts render as choices for an operator — or an agent. Deploys and node loss drop nothing.
Surface from kern
the mutable surface · no eject cliff Settings is an admission client; a tenant's custom field is a scoped overlay row; the workflow canvas and form designer are projectional editors over the catalog — whatever the UI writes, an engineer can open; whatever an engineer admits, the UI renders back. Config and code are one substance.
Go + Postgres substrate
the only dependencies tsgo 7 vendored (Apache, pinned — a file in the repo), an owned pure-Go interpreter sized to the subset, an owned Postgres wire client, Go's stdlib for HTTP/TLS/crypto, vetted AEAD + KDF for the vault. No cgo, no Node, no npm, no registry — anywhere.
Admission

One gate. Engineers, tenants, and agents walk through it equally.

The canonical exchange: an agent submits a patch in the language it knows best, and the database answers — in the transaction — with a verdict. Everything on the left is plain strict TypeScript; everything on the right happens before the row exists.

an agent's patch — streng dialectfollow-up.ts
import { workflow, days } from "std/taak";
import { sendIntro, sendContract } from "app/crm/mail";

export const followUp = workflow(
  async (wf, dealId: DealId) => {
    await wf.step(sendIntro(dealId));
    await wf.sleep(days(3));       // continuation → row
    const ok = await wf.receive(Approval);
    if (ok) await wf.step(sendContract(dealId));
  },
  { capabilities: ["crm.read", "mail.send"] },
);
admit!
the admission transcript — inside the insertone transaction
admit patch-3f9c by agent:builder-7 via mcp

canonical print    one rendering · 61 tokens
tsgo 7             0 errors · 91 ms
capability-audit   crm.read, mail.send — granted
pii-flow           no vault value escapes masked
catalog-parity      contracts 

→ row 3f9c… catalogued · live · audit-rowed
rollback: as-of — the previous app, forever
rejected code never becomes code.

The same gate is the product's no-code surface: a tenant admin adding a field from Settings submits an extendResource form scoped to their org; a workflow drawn on the canvas lands as the same workflow() definition an engineer would write. And the framework ships its MCP server in the kernel: agents query the catalog, fetch definitions by hash, submit patches, and receive verdicts as structured data. The IDE is an API, and the API speaks TypeScript.

What we won't pretend

What the fusion costs

The continuation bet got harder, not easier.

Kern planned to CPS-transform a Lisp designed for it. Regel must CPS-transform a strict TypeScript subset — async/await, closures, iterators — and serialize the environments stably across years. This is the deepest engineering bet in the family, owned, tested red-path-first, and built before anything else gets clever.

SBCL is gone, and native compile-at-admission went with it.

The owned interpreter is the tax; the envelope argument (I/O-bound SaaS, heavy lifting in SQL) carries v1, and the AOT lane — verified hot functions compiled to Go, taal's lane — is held in reserve, opened per-function when production says so.

The condition system is rebuilt, not inherited.

Lisp gave kern restarts as a language feature. Regel engineers the same product truth: a failed step signals a durable condition row whose restarts render as buttons an operator presses. Equivalent behavior, less linguistic elegance — stated plainly.

Homoiconicity is approximated, not native.

TypeScript is not s-expressions. “Code is data” arrives through the subset's AST schema plus the canonical printer — one rendering, hashable, structurally diffable. That is enough for the catalog, the builders, and admission; it is not the full macro-expansion elegance kern had, and the derivation layer works harder for it.

TypeScript's unsound corners survive in the trusted tier.

The strict subset bans the lies it can see and derives runtime validators at every boundary, but structural-typing variance holes exist even in strict code. Verifier coverage is still the security boundary — versioned, adversarially tested, and stated as such. Kern's honesty, kept.

Two parents, one team.

Regel inherits both build burdens: an owned engine and an admission substrate. The staging answer is ruthless: the walking skeleton is admit → row → evaluate → respond, end to end, before a single feature exists — and the deepest bets (printer, continuations, fuel) are proven under kill-tests before the world grows around them.

The pitch, in one sentence: your app, your schema, your workflows, your tenants' customizations, and your agents' patches are versioned TypeScript rows in one Postgres, evaluated by one kernel — deploying, auditing, and governing them is one mechanism, in the one language every model on earth already speaks.

The reality of the project

It got built. v1 closed with every gate green.

Between 2026-07-09 and 2026-07-18 this stopped being a concept study. One Go kernel, one real PostgreSQL 16.13, an operator go/no-go gate between every stage, an external twelve-expert review, a fresh-eyes re-verification, and a final residue burn-down that turned twelve open items into machinery — across 20 session strands. Every claim below traces to a red-path test, a runnable demo, or a named residue. Nothing is silent — and when it was done, a council of reviewers was turned loose to find where the prose outruns the proof.

Stage A · walking skeleton · green

Admit → row → evaluate → respond, end to end, first.

One binary + Postgres: the full admission pipeline, the owned CEK interpreter at 27.1M steps/sec (27× the floor, metering tax ≈0%), and the admit/rollback/as-of demo — before a single feature existed.

Stage B · the deepest bet · green

Continuations survived real kill -9.

A workflow killed mid-step resumes on a different kernel to the identical result, effects exactly-once. A year-old continuation — under a backdated clock — resumed across an epoch. A 10k wake storm, zero duplicates. Resume p95 ~58ms; a serialized environment is ~199 bytes.

Stage C · the security boundary · green

Six verifiers, adversarially tested, in the transaction.

V1–V6 red-pathed with a hostile fixture corpus; 13 seeded production mutants all caught. Real tsgo typechecks inside the insert transaction at p95 = 12ms. The MCP agent plane (11 tools) and the byte-identical git projection walk the same gate.

Stage D · the world as rows · green

std/ is 72 genesis rows; the UI is a fold over the catalog.

Two fresh databases produce byte-identical worlds. The reactive layer ships server-rendered templates with binary SSE deltas — 50k-session storm drained exactly-once in 34s, optimistic echo at 0.0ms perceived latency.

Stage E · the proof · green

A CRM exists entirely as admitted rows.

Three erf resources, a workflow, a component, a typed SQL read — zero app logic in Go, grep-proven. Five scenarios scripted and passing: tenant field-add, agent patch over MCP, a workflow surviving two deploys mid-flight, rollback observed through the UI, vault crypto-shred with a clean history.

M5 · agents, measured · green

The agent claims were run against a real model, never mocked.

Authoring: pass@1 = pass@3 = 1.00 on a 52-task suite — pure-computation tasks, the model handed the dialect rules (k pinned per epoch; the retry ceiling is not a dial). Restart decisions: 0.968 accuracy on 31 labeled scenarios — so the agent's restart authority flipped on through its mechanized gate. It proves the governed plane works end to end; the harder corpus of real resources is v2's to run.

Stage F · residue burn-down · green

Twelve open residues became machinery — and using them found real bugs.

An agent restarted a real parked workflow across the flipped authority; the epoch migrate ran a genuinely new std pair; the settings form, operator-plane live updates, as-of row data, and two std batteries all landed as admitted rows. Chasing them red-path-first surfaced three real defects — a SELECT that could write, a migrate keyed on the wrong column, a template throw that leaked PII — each fixed with the failure witnessed first.

The discipline held under embarrassment, which is the real test. The first eval run's numbers were harness artifacts — kept as evidence, fixed red-path-first, re-run. An outside reviewer's first verdict on the reference CRM was UNFINISHED — the specifics were fixed and the re-review recorded as rows. Two bugs were found only by using the system, both fixed with the failure witnessed red first.

What remains is named, not hidden. The burn-down discharged every one of the twelve, each with a witnessed-red test, and re-tallied the ledger to 31 claims — 30 carry a red-path test, 18 a runnable demo, 4 a residue with a stated why-safe. What it could not finish it re-named forward, not away: the operator plane now wires the restart door but not yet the approve-a-patch action, as-of reconstructs row data but not a row's birth, std grew files and i18n but not charts, and the projectional editors remain the one claim carried by residue alone. The "years" bet on continuation stability is still simulation-proven — real years are unfalsifiable in v1, so a golden corpus makes decode drift release-blocking instead.
The council of reviewers

Then five reviewers went looking for the gap between the prose and the proof.

A systems architect, a security engineer, a database expert, a product lead, and a designated skeptic each read the specs against the code — not the narrative. Their brief was to find what strains, what is over-claimed, and what breaks. None of them called it a paper architecture; the mechanisms, they agreed, are real engineering that matches its ADRs. All of them found the same fault line: the deepest, most-repeated claims are provisioned but unexercised, and the vision is more confident than the evidence beneath it.

Architecture · sound, with caveats

The immortality claim has never crossed a version boundary.

The CEK machine, the hand-rolled Postgres wire client, and the content-addressing are real and match the ADRs. But everything lives at format version 1 — the decoders reject any other — and the "year-old resume across an epoch" test advances the epoch by copying identical manifest roots. "Resume for years across epochs" is a design, not yet a result. And the one Postgres has no failover, replication, or restore drill specified: forever is currently one un-replicated disk.

Security · holds, with caveats

The admission gate holds; the runtime read boundary leaks.

Vault plaintext really is unreachable, the SELECT-only fix is engine-enforced, the restart flip fails closed. But typed SQL reads carry no injected tenant predicate and there is no row-level security anywhere — cross-tenant isolation rests on the app author remembering a WHERE clause the reference app itself omits. No statement timeout, and an advisory lock can poison a pooled connection. Harden per-tenant row isolation before a second tenant.

Data · sound, with caveats

One ledger order, welded into everything, unshardable.

Corruption is made unrepresentable rather than policed, and the git fold is genuinely determinism-safe. But a single global admission id underwrites the fold, the projection, and every as-of query — so the substrate cannot shard, and the history, outbox, and continuation tables grow forever with no aging path. The as-of reconstruction can even surface a row created after the queried instant. Decide now, in writing: is v1 one Postgres, one region, by design?

Product · niche, but viable

You write a schema and get an app — until you need a chart.

A 170-line CRM derives tables, history, policy, forms, REST, MCP tools, and a live UI; durable workflows take no ceremony; PII is a type modifier. Real, differentiated leverage. But the UI renders from a closed vocabulary with no charts, no custom widgets, no third-party embed and no escape hatch — a real product team hits that wall in week two and can only wait for a new kernel epoch. The proof CRM validates the substrate, not yet a product.

Skeptic · rigorous, with gaps

The agent numbers are perfect because the test is easy.

Exactly-once across a real kill -9 is a database fact; red-path-first is not theater; zero-business-logic-in-Go holds literally. But pass@1 = 1.00 was scored on toy arithmetic — gcd, fizzbuzz — in a dialect the eval configures to forbid the imports, types, and calls that make regel regel, with the decision rubric handed to the model in the prompt. It proves the governed plane works; not that an agent can author a real resource. The storms are cloned rows; the stranger review is Claude judging Claude.

The through-line

The machinery is real; the durability and agent claims are simulated.

Two reviewers converged on it independently. What is proven is that the mechanisms are correct at version 1, one node, small N, simulated time. What is asserted more confidently than shown is that they hold for years, across format versions, at scale, under a real agent workload. The risk register already says most of this — the honest fix is to make the vision speak in the same voice as its own risks.

The caveat this page owes you. The agent-plane numbers — authoring pass@1 = pass@3 = 1.00, restart accuracy 0.968 — were measured on toy pure-arithmetic tasks in a restricted dialect that forbids regel's actual surface, with the rubric in the prompt, against a single model. They show the governed admission and MCP plane works end to end; they do not measure an agent authoring real resources, workflows, or capability-scoped code. "Durable for years," the epoch resume, and the 10k/50k storms are proven under simulated clocks and cloned state — not real elapsed time or real clients. What got built is a genuine, gate-green pilot: one Postgres, small scale, the mechanisms correct. It is not yet the any-scale, lives-forever substrate the top of this page imagines — and the distance between those two is exactly the v2 backlog.