THE WHITE DRAGON BOOK · CHAPTER 10

Chapter 10: Zero-Q Agentic Compilers (ZER0Q + SUBSTRATE + SKIMMER)

CH. 10 · ZER0Q AGENTIC COMPILERS ZER0Q PLAN EMIT PROOF BENCH
Vector Architecture Diagram · asset-ch10

Chapter 10: Zero-Q Agentic Compilers (ZER0Q + SUBSTRATE + SKIMMER)

"Never pay a stochastic neural network to recompute a state transition that a SHA-256 hash already proved."

1. Historical Contrast: Deterministic Compilers to Stochastic Agent Loops

The Green (1977), Red (1986), and Purple (2006) Dragon Books assumed a deterministic world: given source text S, a compiler executes a fixed pipeline (lex → parse → IR → optimize → emit) and produces a predictable binary B. Even when build systems scaled to remote clusters (Bazel, Goma, RBE), the execution model remained queue-based: enqueue a job, wait for a worker, compile from scratch on a cache miss, and store opaque artifacts.

In 2026, software engineering entered the agentic era: autonomous LLM reasoning loops (AGENTS.md, SKILL.md, MCP tool calls, shell execution, test verification) act as high-level semantic compilers that transform intent and codebases into verified patches. Yet early agent platforms repeated every Von Neumann mistake:


2. The White Dragon Architecture: ZER0Q + SUBSTRATE + SKIMMER

The White Dragon Book applies content-addressed compilation (Chapter 4) directly to autonomous agents by splitting the runtime into two strict planes (docs/plans/ZERO-Q-AGENT-RUNNER-PLATFORM-PLAN.md):

Triggers (Cron / Webhook / Git / CLI — DEADHAND)
   │
   ▼
┌─────────────────────────────────────────────────────────────┐
│ Deterministic Control Plane (< 2 ms, Zero-Q)                │
│  SUBSTRATE-KV : Aliases, atomic SETNX leases, idempotency   │
│  SKIMMER      : H(AGENTS || SKILLS || Tools || Tree || Msg) │
│  SUBSTRATE-CAS: .b8p / SHA-256 Merkle + b8g-brain CAS index │
└──────────────┬───────────────────────────────┬──────────────┘
       CAS HIT (< 2 ms, 0 tokens)      CAS MISS (Lease Acquired)
               │                               │
               ▼                               ▼
   Verified Artifact / Diff        Autonomous Execution Plane
                                   (Sandbox + Reasoning Loop + Verify)
                                               │
                                   Commit Output + Transcript + Proof
                                               └──────► SUBSTRATE-CAS
// Canonical Zero-Q pre-flight resolver (SKIMMER + SUBSTRATE)
export interface Zer0qInputDigest {
  readonly instructionsHash: string; // SHA-256(AGENTS.md + resolved SKILL.md)
  readonly toolchainHash: string;    // SHA-256(MCP schemas + sandbox image digest)
  readonly workspaceHash: string;    // UniversalVersionedSource Merkle root
  readonly promptCanonical: string;  // Deterministic canonical JSON prompt
  readonly modelId: string;
}

export async function skimmerResolve(
  input: Zer0qInputDigest,
  cas: SubstrateCas,
  kv: SubstrateKv
): Promise<{ hit: true; outputHash: string; latencyMs: number } | { hit: false; leaseId: string }> {
  const t0 = performance.now();
  const digest = sha256Canonical(input);
  const cached = await cas.getVerifiedOutput(digest);
  if (cached) {
    return { hit: true, outputHash: cached.outputTreeHash, latencyMs: performance.now() - t0 };
  }
  const leaseId = await kv.acquireAtomicLease(`lease:run:${digest}`, { ttlMs: 600_000 });
  return { hit: false, leaseId };
}

3. Comparison: Classic Compilers & Ad-Hoc Agents vs. White Dragon ZER0Q

Dimension Classic Dragon Compiler Ad-Hoc LLM Agent Scripts White Dragon ZER0Q + SUBSTRATE
Input Identity File paths + mtime Untyped prompt string Canonical SHA-256 input_digest
Repeat-Run Latency Seconds to hours 30–300 s (re-runs LLM) < 2 ms (SKIMMER CAS hit, 0 tokens)
Dispatch Mechanism Make / Ninja / RBE queue Broker queue / cron race Zero-Q optimistic KV SETNX leases
Knowledge / State Index Local .o / .pch files Unindexed chat logs b8g-brain SHA-256 CAS Merkle index
Reproducibility Deterministic Non-reproducible 100% deterministic zer0q replay <run_id>
Rollout / Rollback Full rebuild + redeploy Manual prompt edits Atomic KV alias pointer swap (< 1 ms)

4. Epilogue: Nunquam Ante, Numquam Iterum

From zero-header B8G-ABI dispatch tables and .b8p CAS packs to 233 µs O(1) origin arenas, 2.95 ns/op lock-free SPSC rings, algebraic I/O intersections, auto-revoking ephemeral capabilities, and < 2 ms ZER0Q agentic substrates — The White Dragon Book rests on a single Post-Neumann axiom: make every boundary explicit, content-addressed, memory-resident, and mathematically disposable.

← Back to White Dragon Book index