v0.1 · experimental

The gaps in your spec are writing your code.

A typical product surface has hundreds of thousands of interaction states. Your coding agent tests three of them. The bug that ships next week lives in one of the other 199,997. Lattice turns the schema your agent writes into the small deterministic set of scenarios that covers every pair — no combinations to guess.

What it does

Schema in. Deterministic rows out.

Your coding agent extracts the surface from your code, spec, or feature request — parameters, values, rules:

parameters:
  user: [signed_in, guest]
  payment: [card, apple_pay, paypal]
  cart: [empty, single, multi]
constraints:
  - invalid_pair: {user: guest, payment: apple_pay}

Lattice returns the covering set:

{"user": "guest",     "payment": "card",      "cart": "multi"}
{"user": "signed_in", "payment": "apple_pay", "cart": "empty"}
{"user": "signed_in", "payment": "paypal",    "cart": "empty"}
{"user": "guest",     "payment": "card",      "cart": "single"}
...  (9 rows covering every valid pair, including empty-cart states)

You write the feature. The agent writes the schema. Lattice writes the rows. Twelve parameters with a few values each collapse from millions of combinations to a few dozen — same schema, same seed, same rows every time.

What it unlocks

Two places it pays off.

Plans that pass code review and break in production. Hand an agent a feature spec and the plan it writes will be confidently wrong about interactions — it'll handle the role and the flag and the locale, but ship the build where all three meet. Model the surface as a Lattice schema first and the plan becomes a deterministic list of combinations the design has to answer for.

Test suites that lie to you. Hand the same agent a failing test and the next move is often to rewrite the test, not fix the code. Model the surface as a schema and the test file becomes one assertion per row. An unsatisfied row is a case the design has to answer for, not a test to delete.

The contract

Agent owns extraction.

Lattice owns the math.

Agent owns evaluation.

Receipts

Four production-class bugs no code review caught.

Stash now runs a Lattice pass as a code-review step. The first fifteen rounds, across email routing, wiki regeneration, scheduling, and webhook delivery:

  • 15 pairwise coverage runs on real production surfaces
  • 4 bugs surfaced that no human reviewer or unit test had caught
  • Two of those bugs are written up below

read the field notes →

A timing bug in my own product, found by crossing dimensions.

Stash's wiki regeneration job promised to re-queue itself when stale marks arrived during generation. The check it used was structurally incapable of firing in that moment.

Lattice modeled the lifecycle:

  • 1,728 raw combinations before constraints
  • 16 pairwise scenarios
  • 4 rows failed identically — the convergent shape was the diagnosis

Unknown bug in my own production code, surfaced by a single pairwise run.

read the case study →

A real OSS interaction issue, already reported upstream.

HTTPX had a query-parameter merge issue: URLs with existing query parameters worked, and params= worked, but together the original URL parameters were dropped.

Lattice modeled the interaction surface:

  • 288 raw parameter combinations before constraints
  • 12 pairwise scenarios
  • 6 rows reproduced the behavior against a requests compatibility baseline

Reported and fixed upstream. The receipt is that the failing combinations fall out of a six-parameter schema you could write in a minute.

read the case study →

Install
$ pipx install lattice-cli
$ lattice agent bootstrap
$ lattice agent doctor

Universal agent instructions: lattice agent instructions. Full guide and harness-specific paths in docs/install.md.

About the engine

Lattice is the second time this math has shipped under my name. The first was Hexawise, where I designed the implied-logic engine in graph theory in 2017 and watched related support tickets drop 90%. Came back in 2019 to rewrite it for a 99% speedup. Lattice is the same shape of math, pointed at coding agents instead of QA engineers.

I run engineering and AI at Skillit, where Lattice came out of the gap I kept hitting: agents that look careful, plans that miss obvious edges, schemas that aren't really schemas. I treat agents the way I treated client meetings at Hexawise — push past the easy answer until you find what nobody would catch. Lattice is the part of that loop that has to be deterministic.

Further reading

Still in the Driver's Seat — what working with Lattice taught me about the role of humans in agent-assisted work.

Lattice Earned Its Keep — guest post from Claude Opus 4.7. Field notes on Stash's adoption.

experimental 0.1 built in the open github