Kelright
← All writing

The Pattern Cards: How the Spec Became the Source Code

12 min read

Close-up of an old Jacquard weaving machine
Photo by mohammad hassan taheri on Unsplash
›Contents

The views in this post are my own. This is a follow-up to The Loom Is Here, where I shared twelve months of engineering data from a three-person team shipping at multiples above industry benchmarks. Disclosure at the end.


Sometime around 2006, Werner Vogels described how Amazon started new products.1 Not with code, not with a design doc, not even with a prototype.

They wrote the press release first. Then the FAQ. Then the customer experience. Finally, they wrote the user manual. Before a single line of code existed, someone at Amazon had written the documentation for software that didn't exist yet, describing exactly how it would behave, as if it already did.2

For twenty years, "Working Backwards" got filed under product management culture. It felt more like a discipline trick, or a forcing function to keep teams honest about the customer. Seems nice if you can afford it.

I now think we all misread it. Amazon wasn't doing product management; they were writing source code in the only language that was going to matter. This happened decades before a compiler existed for it.

The compiler showed up in July 2026.

An 835-Page Program#

On July 20, 2026, Cursor published the results of an experiment that I think will be remembered as a turning point,3 though most of the coverage focused on the wrong part of it.

They gave a swarm of AI agents the SQLite documentation (all 835 pages of it) and asked them to implement the database from scratch in Rust. No source code, no test suites, no internet access, just the manual and a Cursor harness.

The swarm produced a working database engine. Cursor then graded it against a held-out conformance suite the agents never saw (sqllogictest which has millions of SQL queries with known correct answers).4 Every configuration they ran eventually passed 100% of it. Keep in mind, this was making the database itself from scratch.

The headlines went to the cost table (configurations ranged from about $1,300 to over $10,000 for the same passing result, a 15x swing based purely on how models were assigned to roles) and to the swarm engineering (a custom VCS handling a thousand commits a second, planner agents that never write code, neutral conflict-resolver agents). All of these takeaways are genuinely interesting, but one area caught my eye.

Buried in Cursor's own write-up is the sentence that matters. Their conclusion about the binding constraint wasn't model quality, or context windows, or swarm coordination. It was intent specification: having an accurate, complete-enough description of what the software should do. The 835-page manual was the program. The swarm was the compiler. The agents didn't need SQLite's source code because, for their purposes, the documentation was the source code.

Read that back against Amazon writing user manuals before writing software, and the twenty-year-old ritual snaps into focus. The manual-first discipline wasn't a proxy for good thinking. It was the artifact itself. Everything downstream (the code, the tests, the deployment) was always a lossy compilation step performed by humans, because humans were the only compilers available.

The spec was always the source code. Humans compiling it by hand was the temporary part.

The Cards Came Before the Computer#

In my last post I argued that AI-augmented engineering is a loom moment: the relationship between a person and their output permanently altered, the constraint moving up the stack from typing to taste.

Here's the part of the loom story that next jumps out.

In 1804, Joseph Marie Jacquard attached a mechanism to the loom that read punched cards. Each card encoded one row of a pattern to be woven. Chain the cards together, and the loom would weave arbitrarily complex designs (brocades that had previously taken a master weaver weeks of manual thread-lifting) automatically, repeatably, perfectly.5

The silk weavers of Lyon rioted when they saw it, and they were not wrong to be intimidated by what they confronted. The knowledge of how to weave a pattern, knowledge that had lived in a master weaver's hands, passed down through apprenticeship, hoarded as livelihood, now lived in a stack of cardboard. The cards separated the description of the work from the performance of the work, and made the description the valuable half. The card was not a tool for the weaver. The card was the weaver, minus the person.

A Jacquard loom with its chain of punched cards hanging above the warp threads
The cards themselves, chained above a Jacquard loom. Photo by Georg Eiermann on Unsplash.

The weaver's job didn't disappear. It transformed. The valuable work stopped being the lifting of threads and became the authoring of the cards. Get the cards right and the loom produced flawless cloth all day. Get one hole wrong and it produced flawed cloth all day, with equal enthusiasm.


You probably know what happened to those cards. Charles Babbage saw them (he owned a portrait of Jacquard woven from 24,000 of them, and showed it to dinner guests as the future of computation) and designed the Analytical Engine around the same principle. Herman Hollerith used them to tabulate the 1890 census, and the company he founded became IBM.6 Punched cards fed programs into computers into the 1970s.

A vacuum-tube computer rack in a museum, cables running down both sides
The machines that read them: a vacuum-tube rack, wired by hand. Photo by Valentin Petkov on Unsplash.

The pattern card is the direct ancestor of the computer program. Which means the first program in history wasn't instructions for a computer at all. It was a specification of desired output, this pattern, this cloth, handed to a machine that figured out the mechanics.

We spent the next two centuries drifting away from that. Programming became writing instructions for the machine, imperative, procedural, mechanical, because machines were too dumb to accept a description of the outcome. That era is the anomaly, and it's ending. The Cursor result is programming returning to its original form: hand the machine the pattern, let it work the threads.

The Objection That Deserves the Floor#

Now, the strongest version of the skeptic's case, because it's a good one and it's mostly right.

SQLite is arguably the best-documented piece of software on Earth. An 835-page manual that accurately and completely describes system behavior is not a normal artifact. It's a freak occurrence, the product of decades of obsessive maintenance by a small team with unusual values. Cursor didn't just pick a well-known target. They picked possibly the only target where the spec already existed at compilable quality.

Your business is not SQLite. Your internal billing service, the one half-owned by a team that's been reorged twice, does not have a manual. Its real specification is smeared across production incidents, tribal knowledge, six generations of Slack threads, a Confluence page last updated in 2021, and load-bearing decisions that live in the head of an engineer who left in March. The honest description of most enterprise software is underspecified, undocumented, and full of behavior nobody chose on purpose.

A historical parts storeroom with technicians in white coats and shelves of boxed components
Institutional knowledge, on shelves and in heads. Photo by Museums Victoria on Unsplash.

There's a second objection worth stating plainly: SQLite has been reimplemented in Rust before, and those implementations exist in training data. Skeptics reasonably asked how much the swarm was reasoning from the manual versus surfacing memorized structure. Cursor's held-out grading suite is a partial answer, not a complete one.

So the fair summary of the SQLite result is a subset of the headlines: when a complete, accurate specification exists, agents can now compile it into working software: cheaply, repeatably, and verifiably.

This reduction doesn't diminish the result, it just relocates it.

What My Data Was Actually Measuring#

In the Loom post I reported that a three-person team shipped 300,000+ lines of production Python in twelve months with a 2:1 test-to-source ratio, hexagonal architecture, 100+ documentation files, and a median PR cycle time under two hours. I explained the mechanism as a compounding loop: cheap tests enable safe refactoring, safe refactoring keeps architecture clean, clean architecture makes AI output better, better output makes everything faster.

I described that loop as a quality flywheel. I now think I was underselling it.

Every element of that loop (the typed interfaces, the checked exceptions, the architecture rules enforced by pre-commit hooks, the documentation kept current as a matter of routine, the tests written for everything because they cost nothing) was doing one job: continuously converting intent into machine-checkable form. We weren't just maintaining quality. We were, without fully naming it, authoring and maintaining the pattern cards for our own system. The AI tools performed exactly as well as those cards were accurate, and degraded exactly where they were vague.

That's why the discipline paid compounding returns instead of the usual abstraction tax. In the old world, a rigorous spec was overhead: a document that drifted from the code the moment it was written, maintained out of virtue. In the new regime, the spec is the load-bearing artifact and the code is its shadow. Rigor stopped being a cost center the day the machine started reading the cards.


And the held-out test suite deserves its own sentence, because it's the least-discussed and most important component of the Cursor experiment. The swarm's output was credible for exactly one reason: an independent grader with millions of known-correct answers said so. Without sqllogictest, "we rebuilt SQLite" is a vibe. With it, it's a fact. Specification tells the machine what to build. Verification is how you know it built it. Neither is optional, and the second one is the reason anyone believed the first.

There Are Two Jobs Left#

Put the pieces together and the next decade of software work gets clearer.

Job one: writing the missing manuals. The world's valuable systems (the ERP configurations, the billing logic, the franchise royalty calculations, the claims-processing rules, the operational knowledge of every unglamorous business that actually runs the economy) do not have 835-page manuals. Their specs exist, but implicitly: encoded in legacy code, in databases, in the judgment of tenured operators, in the exception-handling that only happens on the last business day of the month. Extracting that implicit behavior into explicit, accurate, implementation-agnostic specification is about to become one of the most valuable activities in software. Not documentation as an afterthought. Specification as the asset: the thing that outlives any particular implementation, the thing you hand to the next compiler, and the one after that.

Job two: grading the compilers. Agents will compile specs into systems with total confidence and no shame. The loom weaves flawed cloth as enthusiastically as flawless cloth. As agent-built and agent-modified software floods into production, the question that matters shifts from can the agents do it (Cursor's experiment answered that) to how do you know they did it right? Every serious deployment is going to need what the SQLite run had: a held-out, independent, mechanically-checkable definition of correct, and continuous verification of execution against it. Today almost nothing outside of famous open-source projects has that. That gap is not a detail. It's the difference between an industrial revolution and an industrial accident.

A 1960s control room with rows of consoles, countdown clocks, and an IBM lab coat on a chair
Late in the punched card century: a 1960s control room, IBM coat in the foreground. Photo by Tetiana Sapon on Unsplash.

The teams that internalize this will look strange for a while, the way manual-first Amazon looked strange, the way a three-person team outshipping departments looked strange. They'll spend what appears to be a lavish share of their effort on specification and verification infrastructure while everyone else sprints ahead generating code. Then the compounding will kick in, and the gap will stop being explicable by effort.

Full Circle#

The Jacquard loom didn't reward the fastest hands. It rewarded whoever authored the most precise cards, and whoever could tell quickly and mechanically that the cloth coming off the machine matched the pattern that went in.

Amazon was punching cards in prose for a compiler that didn't exist yet. Cursor just demonstrated the compiler. My team's numbers, I now believe, were an early measurement of what happens when a system's cards are kept accurate enough for machines to read.

What's missing is everything in between: the manuals for the software that runs the world, and the graders that make agent output trustworthy against them. That's the layer I've spent the last year thinking about, and it's the layer I'm now building: a system that extracts how a business actually operates into ground-truth specification and verifies agent execution against it. It's called Kelright, and if the argument above is right, you can probably see why I couldn't stay away.

The loom is here. The pattern cards are the point.

The Operator's Move#

Run the SQLite test on your own systems this quarter; it costs nothing. Pick the one process or service you would least trust an outsider to run (the month-end close, the billing calculation, the claims decision) and ask the person who owns it to write one page: what "done correctly" means, what the known exceptions are, and how they can tell when it has gone wrong. Don't automate anything. Just find out whether the page can be written at all. If it can, you have the beginning of a pattern card: the artifact every compiler from here on will read. If it can't, if the answer is "it depends, you'd have to ask Marie," that is the exact spot where your organization is a master weaver in 1803. The manual for your business doesn't exist yet, and nobody is going to write it but you.


Metrics referenced from my prior post are derived from git log analysis, GitHub API data, and issue tracker data, Feb 2025–Feb 2026. The Cursor experiment details are from their July 20, 2026 research post, "Agent swarms and the new model economics."

References#

  1. Werner Vogels, "Working Backwards," All Things Distributed, November 1, 2006. ↩

  2. Colin Bryar and Bill Carr, Working Backwards: Insights, Stories, and Secrets from Inside Amazon (St. Martin's Press, 2021). ↩

  3. Cursor, "Agent swarms and the new model economics," research post, July 20, 2026. ↩

  4. SQLite Consortium, "sqllogictest," sqlite.org. The suite contains millions of queries with results cross-checked against multiple independent SQL engines. ↩

  5. James Essinger, Jacquard's Web: How a Hand-Loom Led to the Birth of the Information Age (Oxford University Press, 2004). ↩

  6. Geoffrey D. Austrian, Herman Hollerith: Forgotten Giant of Information Processing (Columbia University Press, 1982). ↩

Get the next essay

New writing, straight to your inbox. No spam, unsubscribe anytime.