research prototype
case study

The interface is the next instruction.

An operator and an AI invent shared shorthand over repeated trials. That shorthand — not prose — is the right primitive for handing work to an agent.

Three experiments measured it: token cost, structural fidelity under compression, and a live architecture reconstruction. The finding holds at every level.

HTML · CSS · D3 3 experiments
01 / 11 — the premise

Most UI assumes a human is reading.

When the consumer of your interface is an agent, the screen is not an output to look at — it is the input the model acts on. What you hand the agent determines every next step.

So the honest question becomes: what is the smallest, most reliable way to hand an agent a complex structure? We kept reaching for the wrong noun to describe what we were building.

framework
tempting: it ships reusable substrate.but there is nothing to build against — you mount your work on it and it watches.
experiment
tempting: it is the running test of a published finding.but it never stops to conclude — the experiment and the workbench are the same surface.
agent
tempting: agents run inside it.but the agents are tenants, not the thing — the thing dispatches them.
architecture
tempting: it has a layered structure.but architecture is the static noun; this one changes shape as you type intent.

The real primitive is context — and the question is how to make it dense, exact, and cheap.

02 / 11 — scope to ideas

Scope the work to an idea, not a directory.

The idea-harness: a path resolves to the idea that owns it. The session inherits that idea's context on resume. Leaving the idea's boundary is an EXCURSION — surfaced inline, not silently mis-attributed.

A repo-scoped session leaks everything in: unrelated workstreams, stale context, half-complete ideas competing for the model's attention. The cwd/repo binding silently mis-attributes work and corrupts the compression the kernel depends on.

The excursion prompt — "write plan-b/…? outside this idea — allow / re-bind / split" — keeps the context boundary sharp without demanding discipline from the operator.

L0 root L1 ideas L2 workstreams L3 primitives

the idea-harness — the idea (L1) is the unit of inherited context; structure nests outward to primitives.

03 / 11 — reference + method

Fan's architect/builder, run on a human–AI dyad.

In Fan's block-tower studies, two players have asymmetric roles: an architect who sees the target and describes it; a builder who can only act on words. Over repeated trials the language compresses into shared names. Wong et al. 2022 established the qualitative tradeoff — too few names forces re-derivation, too many produces retrieval noise. Our operating window of 25–60 primitives is where we found the cost curve bottoms out in practice.

Our dyad: operator = architect, Claude session = builder, the substrate = a lexicographer that watches every channel and proposes convergent names. Built and run in a week with Claude Code — agents played every role including building these visuals.

25–60
our operating window
33
our kernel — inside the band
library-size U-curve — cost vs. named primitives; our operating window + kernel marker
the working loop — architect / builder / lexicographer over a shared ledger
compresses the next intent ↻ ARCHITECT the operator sees target · describes BUILDER a Claude session acts · writes artifact LEXICOGRAPHER the substrate proposes names intent trace LEDGER · KERNEL the append-only notebook the next session reads · memory the lab dyads never had
04 / 11 — experiment 1 · context cost

A name is paid for once, invoked forever.

Named primitives are the compression layer. Experiment 1 measured it: the same 2D block tower described two ways — natural language vs. a shared kernel of named shapes.

The kernel costs ~9x fewer tokens per object — measured against the fully-explicit prose below, and amortized over reuse: its 216-token definition is repaid by the 2nd object (break-even ≈ 1.25), but for a true one-off, plain language is cheaper. Both reconstructions were exact — the compression is lossless.

what stack(C,Pi,L) means — and the prose it replaces
Three named shapes composed bottom-to-top: C(0,0) — rows 0–2, open on the right; Pi(0,3) — rows 3–5, open at the bottom; L(0,6) — rows 6–8. stack composes them in order.
kernel — 18 tokens
18 tok C(0,0) Pi(0,3) L(0,6)
the same tower in prose 176 tok
"On a grid with columns 0–2 and rows 0–8, place unit blocks. Rows 0–2: fill column 0 for all three rows; on row 0 also fill columns 1 and 2; on row 2 also fill columns 1 and 2; leave columns 1 and 2 of row 1 empty (open on the right). Rows 3–5: fill column 0 and column 2 for all three rows; on row 5 also fill column 1 (open at the bottom). Rows 6–8: fill column 0 for all three rows; on row 6 also fill columns 1 and 2."
C, Pi, and L are shapes the author defined once in the kernel.
cumulative tokens to describe N objects — crossover
tower grids — the actual structures described in each experiment
05 / 11 — experiment 2 · brief AND exact single run · failure-rate unmeasured

Prose broke. The kernel didn't.

Push toward irregular structures and the token lead shrinks (8.2x at L1, 1.8x at L3) — incompressible structure forces the kernel back to individual block primitives. In this run, concise prose got it wrong while the symbolic kernel stayed exact.

The failure was encoder-side: the architect's prose was wrong before the builder read it. "col 2 is solid r0–r3" — column 2 fills r0, r2–r5. Builder faithfully added (2,1), dropped (2,4). IoU 0.86.

The durable edge is not brevity: a name can't be vague — and, unlike prose, it can be checked. One worked case, not yet a measured rate.

verbatim · exp 2 L3 — where prose broke

architectprose
col 2 is solid r0–r3 — wrong; col 2 fills r0,r2–r5
builderhaiku
✗ missed (2,4) · invented (2,1)(4,5)(4,8)
tokens vs. structure regularity — ladder
fidelity overlay · L3 irregular — NL vs. kernel reconstruction
06 / 11 — experiment 3 · real architecture 30 builder runs · graph validated

Now on a real architecture.

A real engineering talk rebuilt as a component graph (39 components · 48 relations). Arch span 6,616 tok · kernel 158 encoding (+389 one-time def). Ten Haiku builders rebuilt the graph from each source: kernel scored 0.98 edge-F1 (0% failed) vs. prose 0.80 vs. raw transcript 0.56 (40% failed).

encoding 158 tok ·  declare 39 (shared) · OSB 21 · Sovereign 15 · CloudFormation 10 · Packer 8 · Edge 65 — five per-service sub-kernels, none over ~65 tok
architecture component graph — 39 components · 48 relations (validated vs. diagram + talk) · source ↗
scroll to zoom · drag to pan
07 / 11 — two rules keep it compressible

Two rules keep it compressible.

PIGEONHOLE — load is the ratio of primitives vs. sibling workstreams, not raw count. When a bucket strains (too many primitives for one idea), split it. The library-size U-curve made operational: you do not optimize globally, you re-cleave locally.

PARETO — most agent questions are not scalar. Brevity alone is not enough; exactness alone is too expensive. The kernel is brief AND exact, so it dominates prose on both axes simultaneously. No prose register reaches the non-dominated corner.

The scatter is real Experiment-3 data: each point is a builder's median edge-F1 (10 Haiku runs, min–max whiskers) against the tokens to encode the architecture. The kernel sits alone in the non-dominated corner — fewer tokens and higher fidelity than both a concise human summary and the raw transcript.

pigeonhole — bucket load ratio, then re-cleave
Pareto frontier · real exp-3 — encoding tokens × edge-F1 (10 runs each, min–max) · kernel dominates
08 / 11 — the larger hypothesis

Layered named context.

One framework, three levels. L1 ideas are the context unit — what is inherited when a session opens. L2 workstreams have capacity (pigeonhole: split when a bucket strains). L3 primitives are the kernel — measured, lossless, cheap.

Selection across layers is multi-objective (Pareto): you want fewer tokens and higher fidelity, simultaneously. The kernel sits on that frontier.

Honest frontier: the experiments prove L3 directly. Idea-scoping (L1), pigeonhole (L2), and the Pareto framing are the hypothesis — consistent with the data but not yet separately measured. That is the next round.

reconciliation bar — every name resolves to code · zero divergent

12 kernel + 21 modifiers = 33 named primitives · inside our 25–60 operating window · zero names say X while the code does Y.

L1 · ideas
context unit — what a session inherits on open · scoped by path · excursion flag on boundary-cross
↓
L2 · workstreams
capacity-bounded — pigeonhole load = primitives / siblings · split when a bucket strains
↓
L3 · primitives
the kernel — named, lossless, measured · 9x compression · brief AND exact · dominates on Pareto frontier
↓
selection · Pareto
multi-objective — brief + exact simultaneously · kernel dominates on both axes at every level
09 / 11 — the operator surface

From prose to a named handoff.

If the interface is the next instruction, the operator shouldn't re-type structure as prose every session. The surface should notice repeated structure, propose a name, and let you hand an agent a primitive instead of a paragraph — with a guard when work strays outside it.

claude code — operator
give @builder the target ↓
"On a grid with columns 0–2 and rows 0–8, place unit blocks. Rows 0–2: fill column 0 for all three rows; on row 0 also fill columns 1 and 2; on row 2 also fill columns 1 and 2; leave columns 1 and 2 of row 1 empty… (+148 tokens)"
176 tok · re-typed every session · prose drifts
before — context as prose
→ mint
name
hand off
claude code — operator
seen this structure 3× — name it? stack(C, Pi, L) Accept ⏎ dismiss
give @builder the target ↓
› stack(C, Pi, L) → @builder
18 tok · exact · reusable · named once
⤳ next step edits auth-flow — outside stack. allow · re-bind · split
after — a named, handoff-able primitive

Same architecture, two surfaces. The named primitive costs 18 tokens vs. 176 (slide 4) and hands off at 0.98 vs. 0.80 reconstruction fidelity (slide 6) — the operator mints structure once and reuses it, instead of re-describing it in prose that drifts. The kernel isn't a syntax to learn; it's what the surface lets you name.

10 / 11 — colophon

Built in a week, in code, with AI.

3 experiments — a dozen dispatched agents — a locked design system — prototyped entirely in HTML, CSS, and D3 with Claude Code as the collaborator. Every visualization on every slide was built by the same dyad being studied.

The substrate ran the experiments the literature describes and made the failures legible. Instrumentation precedes insight; the dyad cannot see what it has not yet agreed to record.

3
experiments run
~9x
fewer tokens vs. explicit prose
33
kernel primitives
39
components · exp 3
scope & caveats
  • Small n, authored stimuli. Exp 1–2 use toy towers the kernel itself authored — so lossless reconstruction is partly true by construction. Exp 3 (a real talk the kernel did not author) is the unrigged test — 30 builder runs against a validated graph.
  • Small samples. Token counts are deterministic (tiktoken). Exp 1–2 fidelity came from single, non-deterministic agent runs (a worked case); Exp 3 is 30 runs/condition — a measured failure rate (kernel 0% · prose 0% · transcript 40%) — but still one architecture, one builder model.
  • Hypothesis vs. proven. The experiments support L3 (the kernel) directly; idea-scoping (L1), pigeonhole (L2), and the Pareto framing are consistent with the data but not yet separately measured. The 25–60 window is our own operating range, not a literature finding.
← → to navigate