ERDL — Deterministic Rule Semantics for the AI Era

Hand your rules to ERDL — review a 100,000+ word report in 1 minute

🇪🇺 EU AI Act 🇨🇳 GB/Z 185 🇺🇸 NIST AI RMF 🇸🇬 Singapore AI Gov ISO/IEC 42001 OWASP Top 10

Declarative semantic specification for AI rules

One spec, one canonical tree, one hash — the same rule and input produce byte-for-byte identical results and hashes on any conforming implementation, verifiable by any independent party.

The model reasons. The rules decide.

Why ERDL in the AI era

The question has changed: in 2016 we asked "who can access which resource under microservices"; in 2026 we ask "when an LLM joins the decision chain, how is every step verifiable, accountable, and recomputable".

Design assumptionRego / CedarERDL
Who writes rulesEngineersHumans (natural language) → LLM translates
ConsumerSystemsHuman + LLM + system + audit
Source of determinismSingle implementation (OPA / Rust)Semantic kernel + cross-implementation byte-identity
Decisions hashable / recomputable✅ canonical_tree + SHA-256
Built-in human approval / escalation✅ REQUEST_HUMAN / ESCALATE
Formal verificationNone / algorithm layer✅ Z3 SMT (spec layer)

AI collaboration

CapabilityREGOCEDARERDL
LLM as first-class citizen
Natural language → rule
Rule → natural-language readback (Gloss)
Conversational UI as entry point
Four-way semantic layer (human / LLM / system / audit)

Determinism guarantee

CapabilityREGOCEDARERDL
Cross-implementation byte-identity❌ (OPA only)❌ (Rust only)✅ (Go + Python, 107 bytes)
Decision hashable
Independently recomputable✅ (canonical_tree snapshot)
Semantic-primitive formal verificationPartial (Lean, algorithm layer)✅ (Z3, 64-primitive semantic layer)
Third-party independent audit✅ (multiple rounds)

Rego / Cedar are the excellent answer to the first question (system permissions); ERDL is the answer to the second (AI behavior boundaries). Not a replacement — a complement; they coexist.

Learn to write a business rule in 10 minutes

A rule is just a "when …, then …" sentence. No programming needed — business people can read it and write it. Four representative rules, each with its source and explanation:

1

Business rule · Large refunds need human approval

rules:
  - name: "Large refunds need human approval"
    when:
      conditions:
        - field: "tool.args.amount"  operator: gt  value: 5000
    then: REQUEST_HUMAN
    message: "Refund over 5000 requires human approval"
Source: company refund policy — "a single refund over 5000 must go to human approval."
Why: one sentence from the policy becomes a rule as-is — amount > 5000 is the condition, REQUEST_HUMAN is "route to a human".
2

Regulation · High-risk decisions keep human oversight

rules:
  - name: "High-risk decisions keep human oversight"
    when:
      conditions:
        - field: "risk.level"  operator: eq  value: "high"
    then: REQUEST_HUMAN
    message: "High-risk AI decisions need human review"
Source: EU AI Act Article 14 (human oversight) — "high-risk AI systems shall be designed and developed in such a way that they can be effectively overseen by natural persons during the period in which the AI system is in use."
Why: the law requires human oversight for high-risk systems — as a rule: "risk = high → request human approval".
3

Standard · No PII may leave

rules:
  - name: "No PII may leave"
    when:
      conditions:
        - field: "content.has_pii"  operator: eq  value: true
    then: DENY
    message: "PII detected — blocked"
Source: OWASP Top 10 for Agentic Applications — A03 Data Leakage.
Why: the standard requires blocking PII leakage — as a rule: "content contains PII → deny".
4

Large-document review · Contract missing a key clause is returned

rules:
  - name: "Contract missing a key clause is returned"
    when:
      conditions:
        - field: "doc.missing_clause"  operator: eq  value: "liability"
    then: CORRECT
    message: "Contract missing liability clause — revise"
Source: contract review policy (business scenario) — "a contract must include a liability clause."
Why: write "which clause is missing" as rules; the engine checks clause by clause — "missing liability" → CORRECT to revise. This is the logic behind "review a 100k-word report in 1 minute".

A rule is a structural rewrite of the policy — reading a rule is reading the policy. Regulations, standards, contracts, policies — each becomes a stack of "when … then …" rules.

Technology Stack · 7 Layers

  1. 1Semantic specificationERDL spec v2.1 (34-node kernel + evaluation semantics + 13 decision types)
  2. 2Deterministic enginepure-function evaluator, same input → same output
  3. 3Evidence chaindecision object + cryptographic audit chain (JCS + SHA-256, independently recomputable)
  4. 4Formal verificationZ3 SMT, full 34-node coverage
  5. 5Conformance vectors318 cross-implementation checks
  6. 6Guarddeterministic rule interception, replacing probabilistic prompt guardrails
  7. 7Runtime frameworkfull-stack, assembly-based Agent runtime

The category above: Professionalized AI Employee

This stack serves a category — the Professionalized AI Employee (PAE): AI + Human = the smallest employee unit, the human is the subject of responsibility, AI is the component of capability. Six elements of entry, three pillars of evaluation, a seven-stage lifecycle. See Professionalized AI Employee

Interop: compatible with any agent framework

MCP Server
attach as an MCP Server to any framework (Claude Desktop / LangChain / Cursor…), deterministic interception at the protocol layer. See runtime framework
A2A
multi-agent delegated authority, four runtime-authority invariants. See ecosystem

Determinism, verified by three independent systems

Determinism isn't a slogan — it's pinned down layer by layer:

01 · Claim
The language defines rules
@openoba/erdl, with the spec independently reviewed over multiple rounds.
02 · Measure
Vectors prove "implementations agree"
318, verified by independent Go / Python runners.
03 · Prove
Formal verification proves "every input is safe"
Z3 SMT, full 34-node coverage.

In one line: determinism, from claim → measurement → proof.

Quick Start (30 seconds)

bash
# install
$ npm install @openoba/erdl

Read the spec · Explore the engine · Browse the ecosystem

About

OpenOBA builds the AI semantic layer — turning policies, regulations, and standards into deterministic rules that AI can understand, execute, and audit. ERDL (Entity-Rule Definition Language) is the native semantic specification of that layer: born for the AI era, it makes rule semantics verifiable, recomputable, and traceable — one spec, one canonical tree, one hash.

OpenOBA's vision is to give every enterprise its own AI executive — and ERDL is the semantic foundation on which it understands, executes, and proves its rules.