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 assumption | Rego / Cedar | ERDL |
|---|---|---|
| Who writes rules | Engineers | Humans (natural language) → LLM translates |
| Consumer | Systems | Human + LLM + system + audit |
| Source of determinism | Single 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 verification | None / algorithm layer | ✅ Z3 SMT (spec layer) |
AI collaboration
| Capability | REGO | CEDAR | ERDL |
|---|---|---|---|
| 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
| Capability | REGO | CEDAR | ERDL |
|---|---|---|---|
| Cross-implementation byte-identity | ❌ (OPA only) | ❌ (Rust only) | ✅ (Go + Python, 107 bytes) |
| Decision hashable | ❌ | ❌ | ✅ |
| Independently recomputable | ❌ | ❌ | ✅ (canonical_tree snapshot) |
| Semantic-primitive formal verification | ❌ | Partial (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:
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 > 5000is the condition,REQUEST_HUMANis "route to a human".
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".
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".
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" →CORRECTto 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
Semantic specification — ERDL spec v2.1 (34-node kernel + evaluation semantics + 13 decision types)
- 2
Deterministic engine — pure-function evaluator, same input → same output
- 3
Evidence chain — decision object + cryptographic audit chain (JCS + SHA-256, independently recomputable)
- 4
Formal verification — Z3 SMT, full 34-node coverage
- 5
Conformance vectors — 318 cross-implementation checks
- 6
Guard — deterministic rule interception, replacing probabilistic prompt guardrails
- 7
Runtime framework — full-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
Determinism, verified by three independent systems
Determinism isn't a slogan — it's pinned down layer by layer:
@openoba/erdl, with the spec independently reviewed over multiple rounds.In one line: determinism, from claim → measurement → proof.
Quick Start (30 seconds)
# 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.