Mercury Composable · white paper briefing
…and the architecture of Human-AI collaboration. The Mercury story — from event-driven systems to AI co-authorship: shared memory, an AI grammar, and governed execution.
Eric Law · with Claude Code and GitHub Copilot · 2026-09-04
The thesis
Prompts tell AI what to do. Context helps AI understand. Intent explains what matters.
Prompt engineering
Human provides instructions.
AI contributes responses.
Context engineering
Human provides instructions, knowledge, constraints, project
specifics.
AI contributes better responses.
Intent-driven development
Human provides vision, goals, boundaries, priorities, judgment.
AI contributes collaboration in analysis, design, implementation,
refinement.
Productivity does not come from generating more code. It comes from reducing the distance between human intent and a working, governed system.
Why now
The governance problem
AI writes imperative code fast — and ungoverned. Enterprises cannot certify what they cannot read, and reviewing machine-authored code at machine speed does not scale.
The context problem
AI agents consume context expensively. The default way an agent learns a dependency is to read its source — a cost that repeats for every dependency, every session, every team.
Mercury answers both — and it started answering them years before the questions were asked.
Origin · 2018
From the actor-model lineage (Scala/Akka) onto the Eclipse Vert.x event bus: every function is self-contained, addressed by a route-name string, exchanging immutable event envelopes. No shared objects. No direct references. Nothing to rot at the joints.
You can only compose what you never coupled.
Evolution
rest.yaml, a task in a flow, a
skill on a graph node. The layers compose downward with no coupling.Layer 3, governed
The semantic layer is guarded the way production software must be. A graph model deploys only through CompileGraph, the mandatory validation gate: a model is compiled and listed, or its endpoint answers 404 as if it never existed.
The same compile-before-run discipline code has always had — applied to knowledge.
The turn
An AI that authors a flow or a graph model is producing a declarative, compiler-validated, human-legible artifact. CompileFlows and CompileGraph reject malformed intent at build time; the Playground dry-runs it; a product owner can read it and certify it.
Governed nondeterminism — the creativity of a model author, bounded by gates.
Never a determinism claim. A governance design.
The discipline
Humans provide
Purpose and outcomes · boundaries and priorities · architectural rulings and trade-offs · certification of consequential artifacts · the decision to go live.
AI partners contribute
Synthesis and critique · translation of intent into structured artifacts · implementation of bounded tasks · consistency checking · surfacing ambiguity.
Platforms provide
Contracts and constraints · structural and semantic validation · controlled execution · deployment gates · observability and feedback.
Sharpened in practice by specialized reviewer personas invoked on demand — architecture, security, consistency, documentation — structured, independent perspectives for the human architect. Not autonomous replacement: complementary responsibility.
What intent controls
Acceleration without direction is only faster drift.
Two instruments
Shared memory · continuity
Why the project exists, what is true, what was decided and rejected, what happens next. Backward it preserves decisions and provenance; forward it carries intent through Vision → Blueprint → design → implementation → feedback. A new session continues the project instead of reconstructing it.
AI grammar · legibility
What a platform or building block can express, where authoritative guidance lives, which contracts artifacts must satisfy, and how conformance is verified — so behavior is derivable rather than guessable.
Memory without grammar: direction without dependable execution. Grammar without memory: capability without purpose. And in the memory layer itself — mechanize the arithmetic; do not mechanize the judgment.
The AI grammar
An AI grammar is the discovery map, reference guides, machine-readable catalogs, and validation gates that let an AI agent author correct artifacts without reading engine source.
Sufficient
An agent guide may claim “you can generate correct artifacts from this page alone” — and only agent guides may claim it.
Verified
CI binds every claim to the code: drift tests, coverage and link-integrity gates, golden vectors, a version-matched manifest.
Cheap
Measured in tokens, not pages. Discovery in one hop; a map that stays lean enough to read every session.
Shipped today
rest.yaml · Event Script flows · MiniGraph commands — each a grammar reference + machine-readable JSON catalog + AI agent guide + CI drift testThe benchmark
A grammar is useful only if the agent finds the right page in one hop and the map stays cheap. Measured on the Rust engine, 2026-09-04:
Completeness that costs discovery is a regression. The map is dense with the exact tokens an agent searches for — and gated in CI so it cannot silently rot.
Proven, not promised
The ai-enabled-repo-demo exercises put the grammar under load: fresh AI agents — no project context, no human hints — built and ran applications from the grammar alone, through repeated rehearsals and a live demonstration.
json
simple plugin closing a data-mapping gap, an export-guard correction, recipe lines where two
independent agents drew the same wrong conclusion.The methodology
Greenfield or existing: install the shared memory layer, write the Vision with the AI partner (human-confirmed, never fabricated), derive the Blueprint, plan increments. Every session thereafter starts oriented.
The engine arrives carrying its own grammar. Recommended for applications: Layer 3 — model the service as a knowledge graph, dry-run in the Playground, deploy behind the CompileGraph gate. The path is a dial, not a wall.
Applications: intent → model → certify → deploy. Building blocks: layer-2 + layer-3 patterns — then compile an AI grammar into the block’s own repo, so it becomes as legible as Mercury itself.
Proof point for step 1: Mercury’s own Rust engine was AI-enabled before its first line of code — about a hundred increments later it ships in lock-step with the Java engine.
The recursion
To an AI partner, undocumented capability is absent capability.
Industry context
AGENTS.md and kin, with a routing shim: contributors → the memory protocol; consumers → the version-matched contractEach practice is known. Binding them into one CI-enforced, token-budgeted contract an AI partner can build from — that is the AI grammar.
Parnas 1972 · Hewitt 1973 · Nygard 2011 · Robinson 2006 · llms.txt (Howard 2024) · AGENTS.md · GitHub Spec Kit 2025 · NIST AI RMF · EU AI Act art. 14 · ISO/IEC 42001 · DORA 2024–25 · HELM · SWE-bench — full citations in the white paper’s References section.
Where it goes
The Active Knowledge Graph is the application. Humans and AI co-author the model, the event-driven runtime executes it, and changing behavior means editing knowledge — not shipping code.
The working posture
Do not just prompt. Do not just vibe code. Do not expect magic.
Express intent. Define boundaries. Build living context. Guide your AI partners. Review the work. Improve the system.
White paper: Intent-Driven Development and the Architecture of Human-AI Collaboration · accenture.github.io/mercury-composable