Whitepaper

World

A Desired-State Engine for Autonomous Software Development

Author: Delaney Burke
Organization: Zero2One OU — Tallinn, Estonia
Published: 2026-02-22
Version: 1.0

Every AI coding agent works from tasks. A human writes a ticket, the agent executes it, and someone checks the result. The agent has no persistent understanding of what the software should be — only what it was just told to do. Between tasks, nothing happens. Drift accumulates silently.

World addresses this by inverting the paradigm: instead of telling an agent what to do, you declare what the software should be. A persistent, testable model defines every entity, relationship, behavior, and constraint. A convergence loop continuously compares reality against this declaration and autonomously closes the gap.

Section 1

The Problem: Task-Oriented Agents

AI coding agents are reactive. They wait for instructions, execute them, and stop. This creates a fundamental limitation: the human becomes the intelligence, breaking down intent into discrete tasks and feeding them to the agent one by one.

1.1 The Decomposition Tax

Every feature requires the developer to decompose their intent into tasks the agent can execute. This decomposition is itself skilled work — it requires understanding the codebase, the domain model, the dependencies, and the right order of operations. The agent consumes tasks but cannot generate them from intent.

1.2 Silent Drift

Between development sessions, nothing watches the codebase. A model gains a field without a validation. A controller drifts from its specification. An association disappears during a refactor. These misalignments accumulate silently because no system continuously verifies that reality matches intent.

1.3 The Missing Primitive

Task-oriented agents operate on imperative commands: do this, then that, then check. But software has a natural declarative structure: entities have fields, fields have constraints, entities have relationships, behaviors connect actors to outcomes. No agent framework provides a persistent, testable declaration of what the software should be — independent of any specific task.

Section 2

World: Architecture

World is a desired-state engine that maintains a persistent, testable model of what software should be. A convergence loop called Heartbeat continuously compares this model against reality and dispatches an AI agent to close any gap.

2.1 The World Model

A World is a Ruby DSL that declares application structure at a semantic level. It is not code generation configuration. It is a domain model that exists independently of any target stack:

World.define(:vet_practice) do
  entity :owner do
    has :name, type: :string
    has :email, type: :string, required: true, unique: true
    has :phone, type: :string
  end

  entity :pet do
    has :name, type: :string, required: true
    has :species, type: :string
    has :owner, type: :reference    # infers belongs_to + inverse has_many
  end

  behavior :book_appointment do
    actor :owner
    trigger on: :form_submit, screen: :new_appointment
    precondition { |state| state[:pet] && state[:vet] }
    outcome "Appointment created and confirmation sent"
  end
end

From this declaration, the system can project a complete Rails application, verify existing code against it, generate test hypotheses, simulate behaviors, and detect drift — all without human involvement.

2.2 The Convergence Loop

Heartbeat — a Rust daemon — ticks every 8 minutes. Each tick runs the brain, which executes a three-stage fidelity check:

  1. Model Stability — Run all hypotheses against the World model itself. If the model has internal contradictions, stop and report. The model must be sound before checking code.
  2. Code Fidelity — Read actual project files. Compare them against the World using AST-aware structural parsing. If drift is found — a missing validation, a dropped association, a divergent controller — fix it in place.
  3. Code Coverage — Generate tasks from uncovered World objects. If entities exist in the World but have no corresponding code, create them.

The brain dispatches Claude Code with the World model exposed as an MCP (Model Context Protocol) server. Claude reads the model, reads the code, identifies the gap, and writes the fix. The next tick verifies convergence.

2.3 The Operator Pattern

This architecture directly mirrors the Kubernetes operator pattern. The World is the desired-state declaration (like a Kubernetes manifest). Heartbeat is the reconciliation loop (like a controller). Claude Code is the actuator that modifies reality to match the declaration. The system continuously converges toward the declared state.

World
Desired state
Heartbeat
Detect drift
Claude Code
Close gap
Verify
Next tick confirms
Section 3

The World DSL

The World DSL provides a complete vocabulary for declaring software structure. It is deliberately higher-level than code — it captures intent, not implementation.

3.1 Primitives

3.2 Reference Resolution

When an entity declares has :owner, type: :reference, the World resolves this after all entities are defined. It creates a belongs_to :owner on the referencing entity and a has_many :pets on the referenced entity. This means the developer declares the domain relationship once; the system infers both sides.

3.3 Hypotheses and Scenarios

The World model is testable. Hypotheses verify expected outcomes of behaviors. Scenarios chain multiple behaviors into multi-step sequences with state tracking. Both run against the model itself — no code required. If a hypothesis fails, the model is inconsistent. If a hypothesis passes but the code doesn't match, the code has drifted.

Section 4

Fidelity Checking

The fidelity checker is the critical bridge between the World model and reality. It performs AST-aware structural comparison — not string matching, not grep, but semantic verification that the code expresses what the World declares.

4.1 What Gets Checked

4.2 Target Awareness

The fidelity checker understands target stacks. For Rails, it checks model files, validates macros, and association declarations. For Next.js, it checks TypeScript interfaces, field types, and API route handlers. The same World model projects and verifies across stacks.

4.3 Drift Classification

Each drift item has a type, severity, affected file, and human-readable message. Severities are either error (must fix — structural mismatch) or warning (should fix — convention mismatch). The brain fixes errors autonomously. Warnings are logged for human review.

Section 5

Properties

5.1 Continuous Convergence

The system never idles. Every 8 minutes, reality is compared against intent. Drift is detected within one tick and fixed within two. The codebase continuously converges toward the World declaration without human intervention.

5.2 Declarative, Not Imperative

The developer declares what should exist. They never write tasks, tickets, or step-by-step instructions. The system decomposes intent into action autonomously. Changing the World model is sufficient to change the code — the convergence loop handles the rest.

5.3 Testable Intent

The World model is not documentation. It is executable. Hypotheses run against it. Scenarios simulate multi-step workflows. The model itself can be validated for internal consistency before any code is generated or checked.

5.4 Stack Independence

One World model projects into multiple target stacks. The same vet practice declaration can produce a Rails application, a Next.js application, or both. Domain logic is captured once; implementation details are projection concerns.

5.5 Auditable Convergence

Every brain cycle is logged with its session ID, duration, cost, and outcome. The journal records what was checked, what drifted, and what was fixed. Full provenance of every autonomous action.

Section 6

Comparison with Existing Approaches

Approach Execution Model State Persistence Drift Detection Autonomous
GitHub Copilot Reactive (autocomplete) None None No
Cursor / Windsurf Reactive (chat) Session only None No
Devin / SWE-Agent Task-oriented Per-task None Per task
OpenClaw Task-oriented (proactive) Conversation None Partial
Claude Code Task-oriented (agentic) Session + memory None Per session
World + Heartbeat Desired-state convergence Persistent model Continuous (8-min) Yes (always-on)

The gap: every agent framework is task-oriented. They execute what they're told. None of them maintain a persistent model of what the software should be. None of them continuously verify that reality matches intent. None of them autonomously fix drift without being asked.

Section 7

Demonstration: Autonomous Drift Correction

The following scenario was executed on 2026-02-22 against a vet practice application.

7.1 Introduce Drift

  1. The World model declares Owner with has :email, required: true, unique: true and has_many :pets (inferred from Pet's reference)
  2. A developer removes the email validation and the pets association from app/models/owner.rb
  3. The model now reads: class Owner < ApplicationRecord; validates :name, presence: true; end
  4. Two drift items exist: missing validation, missing association

7.2 Autonomous Correction

  1. Heartbeat ticks. The brain spawns a Claude Code session with the World MCP
  2. Stage 1: World simulation passes — 12/12 hypotheses green. Model is sound
  3. Stage 2: Fidelity check detects two drift items in owner.rb
  4. Brain reads the file, consults the World model, writes the fix
  5. File now contains has_many :pets and validates :email, presence: true, uniqueness: true
  6. Next tick: fidelity check passes. System reports "aligned"
  7. Total time: 105 seconds. Total cost: $0.32. Zero human involvement

Key insight: The developer never filed a ticket, wrote a task, or asked the agent to fix anything. They changed the code. The system detected the divergence from the World model and corrected it autonomously. The World is the specification. The loop is the developer.

Section 8

Success Metrics

World instruments five metrics from day one. The primary validation question: does the code match the World model? If fidelity holds, the system works.

  1. Fidelity score — Percentage of World objects with matching code. Target: 100% at every tick.
  2. Drift detection latency — Time between code change and drift detection. Target: one tick (8 minutes).
  3. Autonomous fix rate — Percentage of drift items fixed without human intervention. Current: 100% for validations and associations.
  4. Convergence time — Time from drift introduction to confirmed fix. Current: two ticks (16 minutes).
  5. Cost per cycle — LLM cost per brain cycle, reported by Claude Code from Anthropic's token pricing (input + output tokens across all turns). Current: $0.32 per fidelity check (~23 API round-trips).
Section 9

Implementation

9.1 Tech Stack

9.2 Current Scope

One developer, one World model, one target stack (Rails). Brain ticks every 8 minutes with a budget of 5 invocations per hour, 50 per day. Fidelity checking covers entity models, validations, associations, and controller presence. Projection generates complete Rails applications from the World model.

9.3 Roadmap

Section 10

Conclusion

World addresses a fundamental gap in AI-assisted software development: the absence of persistent intent. By declaring what software should be rather than instructing an agent what to do, it eliminates the decomposition tax that fragments every development session.

The architecture applies a proven infrastructure pattern — desired-state convergence — to software development. The World model is the manifest. The Heartbeat loop is the controller. Claude Code is the actuator. Drift is detected in minutes and corrected autonomously.

The real change is not speed. It is continuity. The system never forgets what the software should be. It never stops checking. It never waits to be asked. Between sessions, between days, between developers — the World holds the intent and the loop maintains the truth.

Declare the World. The loop does the rest.

Contact

Email: delaney@zero2one.ee
Web: https://zero2one.ee

Back to Whitepapers