A MANIFESTO

Constraints Are the Product

Code is an artifact of DNA, not the other way around.

Leviathan Project · April 2026

This isn't an agent framework. It's the operating system for agent-human symbiosis. We believe the era of prompting is ending. When your software is written by autonomous agents operating under constraint regimes, the constraints you define ARE the product. Not the code. Not the prompts. Not the tests. The DNA contracts that declare what the system IS — before a single line of code ships. The best AI model in the world follows less than 30% of complex instructions perfectly. Leviathan achieves 96% compliance on the cheapest model. The difference isn't the model. It's the harness.

96%
Instruction Compliance
vs industry <30%
2
Root Axioms
Everything else derives
7
Execution Primitives
Node, Edge, Loop, Eval, Session, Effect, Intent
$0.07
Cost per Agent Task
AXI benchmark

Two Axioms. Everything Else Derives.

The entire system—every gate, every lifecycle rule, every governance decision—follows from two irreducible truths.

C1 — Finitude

All resources are finite. Time, tokens, context, memory, compute, attention. Every design decision must respect scarcity. Token budgets are constraints, not suggestions. Context windows are walls, not guidelines.

This axiom forces honest engineering. No infinite retry loops. No unbounded context accumulation. No "just throw more compute at it." Every operation has a budget and a deadline.

C2 — Non-Commutation

Order matters. A then B is not B then A. History is irreversible. Every commit is an immutable receipt. Every state transition is append-only.

This axiom forces accountability. No rewriting history. No silent rollbacks. No pretending a failed experiment didn't happen. The system remembers everything, and the order in which it happened.

Agents Are Dead. The Graph Is Alive.

The reactive graph IS the AI. FlowMinds listen. Loops manifest. Evals validate.

Agents are dead. Sessions are dead. Swarms are meaningless. What matters is the reactive graph—a self-manifesting knowledge structure where you update a node, connected nodes trickle-update, loops manifest the change, and the whole system converges toward coherence.

The industry is obsessed with agents—how to coordinate them, how to give them memory, how to make them collaborate. This is the wrong abstraction.

Leviathan doesn't have agents. It has a graph that expresses itself through execution primitives. A "coding agent" is just a loop node with an eval gate and a git-commit effect. A "research agent" is a loop with a metric eval and an accumulation session. Strip away the anthropomorphic naming and you find seven primitives composing into arbitrary behaviors.

You don't spawn agents. You spawn workstreams. The graph does the rest.

graph TD
  G[Knowledge Graph] -->|trickle-update| N1[Node: Intent]
  G -->|trickle-update| N2[Node: Template]
  G -->|trickle-update| N3[Node: Gate]
  N1 -->|manifest| L[Loop]
  L -->|produce| A[Artifact]
  A -->|eval| E[Gate]
  E -->|pass| C[Commit to Graph]
  E -->|fail| L
  C -->|trickle-update| G

The reactive graph manifests itself through loops and gates

Stop Prompting. Start Compiling.

Three eras of AI-native development. Most teams are still in era one.

2

024: Context Engineering

Craft the perfect prompt. Stuff the context window. Hope the model does the right thing. Prompt engineering is the BASIC of the AI era—necessary to learn, fatal to stay in.

2

025: Harness Engineering

Build eval loops. Add quality gates. Measure before shipping. The prompt is no longer the moat—the harness is. Control plane, runtime loop, gating strategy. Prompts converge. Harnesses differentiate.

2

026: Constraint Engineering

Define what the system IS, not what it should do. DNA contracts compile into harnesses, which compile into runtime behavior. The constraints are the product. Code is the downstream artifact. You're not telling an agent what the system does. You're telling it what the system IS.

Four Steps. No Exceptions.

Extracted from production agent systems. Validated across 117+ development ticks.

1

. Define Constraints

Write DNA contracts and validation gates BEFORE implementation. The constraints declare what 'correct' means—not as vague requirements, but as executable contracts a machine can verify. YAML is DNA. These files define the organism.

2

. Build the Harness

The eval harness is itself constrained by its own DNA. Self-referential grounding. The system that verifies your code is verified by the same system. If the harness can be gamed, you have no system.

3

. Develop Inside It

The harness IS the development loop. Not a test suite you run after. Every tick: produce an artifact, judge it, compare alternatives, keep or discard. The eval flow is the REPL.

4

. Let It Grow

Every exploit discovered becomes a new constraint. The verification surface grows monotonically. Gate quality > task quality. If the gates are right, the code follows mechanically.

Code Is an Artifact of DNA, Not the Other Way Around

DNA YAML steers agent behavior. Prose does not. Proof: 14/15 treatment vs 0/15 control.

You're not telling an agent what the system does. You're telling it what the system IS. The DNA is the irreducible representation. Specs explain it. Code implements it. Gates enforce it. But the DNA is the source of truth.

Three Formats, One Truth

Markdown = Intent

Human-readable purpose and rationale. Lossy but essential for onboarding and alignment. Specs, designs, manifesto. The WHY.

DNA YAML = Behavioral Contract

Machine-readable constraints and validation gates. The authoritative declaration of what the system IS. Compiles into runtime behavior. The WHAT.

FlowMind = Execution Contract

Deterministic workflow graphs. YAML that compiles into agent orchestration. Nodes, edges, gates, effects. The HOW.

When a Go kernel and a Python script independently arrive at the same four-phase cycle—modify, measure, decide, accumulate—you are not looking at two inventions. You are looking at one primitive asserting itself across codebases.

DNA YAML isn't configuration. It's the genome of the system. It compiles to any framework format like LLVM targets multiple architectures. Today it compiles to FlowMind graphs and reactive hooks. Tomorrow it could compile to CrewAI, LangGraph, or anything else. The constraints are framework-agnostic. The runtime is a projection.

Produce → Judge → Compare → Keep or Discard

No single-sample decisions. Statistical significance required. Safety violations = automatic discard.

graph LR
  P[Produce] --> J[Judge]
  J --> C[Compare]
  C --> K{Verdict}
  K -->|Keep| Ship[Exit: Ship]
  K -->|Discard| Bin[Exit: Reject]
  K -->|HOLD| P
  style Ship fill:#059669,color:#fff
  style Bin fill:#dc2626,color:#fff

The eval flow — simple, universal, inescapable

Key Invariants

Minimum sample size enforced BEFORE judging — no snap decisions on one example. Judge criteria defined BEFORE production — no post-hoc rationalization. Safety violations = automatic discard — regardless of other metrics. HOLD loops back for more samples — bounded by max_sample_budget.

The agent never marks its own homework. Judgment is externalized.

Anti-Pattern: The Noise Ship

"One eval run showed improvement, ship it." Single-sample decisions are noise dressed up as signal. The eval flow forces statistical grounding. You collect enough samples before you judge, and you compare against a baseline. Anything else is coin-flipping with extra steps.

Gates = Loss Function

Whoever controls the gates controls what the graph learns.

Gates are the loss function. The architect's job is not to write code—it is to write gates. Code is a downstream consequence of well-defined constraints. Gate quality > task quality. Always.

In machine learning, the loss function determines what the model optimizes for. Get the loss function wrong and the model optimizes for the wrong thing—perfectly.

The same principle applies to agent systems. Gates are the loss function of your development process. They determine what gets shipped and what gets rejected. If your gates are weak, agents learn to satisfy weak criteria. If your gates are precise, agents produce precise output.

This realization changes who does what. The senior engineer's job isn't writing code. It's writing gates. The code is what the agent produces under those gates. The graph learns what the gates teach it.

Gates Only Move Forward

C4: Gates never demote. Aspirational gates can become enforced. Enforced gates cannot become aspirational.

Aspirational

The gate exists as a goal. Violations logged, not blocked.

Declared

The gate is documented and measured. Teams track compliance.

Enforced

The gate blocks. Violations prevent shipping. No exceptions.

Auto-Enforced

The gate runs automatically in CI. No human in the loop. The system enforces itself.

Seven Primitives. Infinite Composition.

Everything composes from seven execution primitives. "Autoresearch" is just Loop + Eval + Session + Effect.

Node

A unit of computation. Takes input, produces output, has a gate. The atom of the system.

Edge

A connection between nodes. Carries data, has type constraints. The graph's wiring.

Loop

Repeated execution with a termination condition. Ralph loop, autoresearch loop, heartbeat loop. Three topologies.

Eval

Judgment. Gate-based, metric-based, LLM-as-judge, or adversarial. The loss function of the system.

Session

Accumulated state across ticks. The working memory. Bounded by C1 Finitude.

Effect

An irreversible side effect. Git commit, API call, file write. Requires a receipt (C2 Non-Commutation).

Intent

A declaration of what should happen. Resolves through the graph to concrete execution. The user's will, formalized.

Declaration → Compiler → IR → Runtime

This four-layer pattern recurs everywhere. It is the substrate of the substrate.

Across every layer of Leviathan, the same meta-pattern repeats: declare what you want (YAML, markdown, config), compile it through a lowering step (validation, type-checking, resolution), produce a stable intermediate representation (FlowMind graph, reactive pipeline, config tree), and project it into runtime behavior (CLI, MCP, HTTP, agent execution).

This is not an accident. It is the architectural invariant. When you see a new subsystem that doesn't follow this pattern, that subsystem is either pre-mature or broken.

Applied Everywhere

FlowMind

YAML declaration → flow compiler → execution graph → agent runtime

Poly Surfaces

Handler contract → surface compiler → adapter IR → CLI / MCP / HTTP / SDK

Skill Evolution

Markdown prompt → usage feedback → FlowMind definition → deterministic pipeline

Plugin Scaffold

config.yaml → DNA validator → handler registry → runtime capabilities

Every Exploit Hardens the System

Like Lean formal proofs for agent behavior. Impossible to cheat because the verification surface keeps growing.

Agent cheats? You find out? You make an adversarial flowmind. The constraint surface grows. The policy IS the environment. Modifying topology modifies decision-making. The system learns from its own failures.

The adversarial strategy answers one question: "did you game the system?" Per constraint, per invariant, potentially multiple checks per task. Both deterministic checks (did the output match the schema?) and subjective checks (does this feel gamed?).

When the system supports anonymous opt-in telemetry, discovered exploits become community-maintained constraints. Every user's pain becomes every other user's protection. Crowdsourced constraint engineering.

Unsat-Core-Driven Repair

When constraints conflict, the system doesn't hallucinate a fix. It uses mathematical techniques (SAT solvers, Z3) to identify the minimal set of conflicting constraints—the unsatisfiable core—and emits a repair candidate that the agent operates inside.

This replaces "the model hallucinates a fix" with "the system emits a mathematically grounded repair envelope." The agent's creativity is bounded by proof, not hope.

Memory That Ages Like Wine

Good patterns strengthen. Rejected approaches decay. Stale knowledge fades.

Patterns That Strengthen

Successful approaches are reinforced. Validated gate configurations propagate. Skill definitions that produce consistent results get promoted from markdown to FlowMind. The system gets better with age because positive outcomes compound.

Approaches That Decay

Failed experiments are remembered but demoted. Stale knowledge fades as newer evidence accumulates. The system doesn't just forget—it actively de-prioritizes approaches that reality has contradicted. Temporal decay is a feature, not a bug.

Leases, Not Permissions

Everything expires. Trust is earned through demonstrated competence, not granted by configuration.

Traditional agent frameworks give agents permissions: "this agent can write files," "this agent can call APIs." Permissions are static. They don't account for the agent's track record, the sensitivity of the operation, or the current state of the system.

Leviathan uses leases. An agent earns the right to perform operations by demonstrating competence at lower-stakes tasks. Leases expire. They must be renewed through continued compliance. An agent that starts failing gate checks loses capabilities automatically.

This is how you build systems that fail closed, not fail open. Constraints that never bend.

Agents Don't Chat. They Act Through Surfaces.

A browser button, a voice command, a VR gesture, a Stream Deck key, a mobile notification.

CLI (AXI-Principled)

Token-efficient TOON output. Content-first (no-args = live data). Self-documenting --help that IS the LLM guide. 40% fewer tokens than JSON.

MCP

Model Context Protocol for tool-use integration. Same handlers, different wire format. Schema overhead: 28.5% of input tokens.

HTTP / WebSocket

REST and streaming for web integration. Same business logic, transport-adapted. Daemon owns all state.

TypeScript SDK

Programmatic embedding. Import the handler, skip the wire format. Composable method routers with canHandle() + handle().

Benchmarks, Not Promises

490 benchmark runs. Real data from real agent tasks.

ApproachSuccess RateCost/TaskDurationTurns
AXI-Principled CLI100%$0.07421.5s4.5
Standalone CLI99%$0.07828.6s4.9
Rust CLI + Daemon99%$0.08824.6s4.8
MCP Tool Schemas99%$0.10126.0s6.2
The Insight

MCP tool schemas consume 28.5% of input tokens. AXI-principled CLIs average 79K tokens vs MCP's 185K. The debate between MCP and CLI is misframed. Principled design beats protocol choice. The cheapest approach is also the most reliable.

Run Agents for Free. Govern Agents for Money.

The cost of intelligence is dropping to zero. The winners built the best flywheel.

Kubernetes won by being the open standard, not by being the best at any single thing. Lev wins the same way. Open source IS the flywheel. The runtime is free. The constraint engineering platform—the governance, the audit trails, the enterprise gates—is where value accrues.

When intelligence costs zero, the competitive advantage isn't the intelligence—it's the governance. Who can audit what the agent did? Who can prove compliance? Who can demonstrate that the constraint surface is growing, not shrinking?

Leviathan is open source. The runtime, the DNA compiler, the eval harness, the FlowMind executor—all open. The enterprise layer—governance dashboards, audit trails, compliance gates, team coordination—is where the business model lives.

Local-first, federate-ready. Must work on a Raspberry Pi with no network. Must scale to a federated mesh.

The SDLC Applies to Everything

Software development is just where we prove it first

Once you figure out the software development lifecycle for LLM interaction, it applies to anything. Content creation, research, design, operations, training—the same spine. Conversation gets you into alignment. The proposal is the current understanding, confirmed correct. The plan is a graph patch. Execution dispatches under constraint. Feedback asks "did it work?" Self-learning saves the experience for next time.

Converse

Get into alignment

Propose

Understanding confirmed

Plan

Graph patch declared

Execute

Dispatch under constraint

Feedback

Did it work?

Learn

Save experience

Auditability Is Not Optional

This is not a 'nice to have after prototype.' This is the first requirement.

Tracked

Which agent. Which step. Which workflow. Which constraint surface. Every message is a Tick: INGEST → OBSERVE → PROPOSE → GATE → APPLY → UPDATE → EMIT.

Auditable

Input and output logged. Decisions captured. A commit is a tick—append-only, immutable receipt. A diff is a claim with evidence.

Receipt-Attested

Settlement binds to verified receipt. When money or irreversible effects appear, proof is not optional. The audit trail IS the training data for world models.

Schema-Validated

A contract per workflow, enforced. DNA constraints validate structure. Gates validate behavior. Both run before any artifact ships.

If Code Conflicts With These Principles, the Principles Win

This manifesto is canonical. The DNA is the irreducible representation. Specs explain it. Code implements it. Gates enforce it.

Constraint engineering isn't about restriction. It's about making the right thing easier than the wrong thing. Two axioms. A ratchet model. Validation gates at every boundary. That's how you go from agent chaos to engineering discipline—not by trusting agents more, but by making trust unnecessary.

Continue Reading

Part 2: DNA-Driven Development →

Code is an artifact of DNA, not the other way around. The representation triangle, the compilation pipeline, and framework parasitism.

Heartbeat Dashboard →

Live system status and runtime telemetry at a glance.

WebMCP Vision →

Browser as a structured tool API for autonomous agents.

Stop Prompting. Start Compiling.

Leviathan is open source. The DNA is the README.