Contracts Before Code
Jeremy McEntire
VP of Engineering9 min read
The cost that fell, and the one that didn't
AI made implementation cheap, and a lot of people drew the wrong lesson from that, which is that it made engineering cheap. The cost of producing code collapsed; the cost of correctness did not move at all. A model can fill a screen with plausible code in seconds, and plausibility is exactly the problem, because correctness was never a function of volume. It lives in what a system must do, what it must never do, the boundary it cannot cross, the data it cannot leak, the operation it must refuse when the answer is uncertain. None of that is produced by typing faster. It is produced by constraint, and constraint is still the expensive, human part of the work.
For most of the profession's history the scarce thing was implementation. Someone had to know the language, hold the system in their head, wire the call, write the test, fix the build. A good engineer was valuable because that work was slow and the mistakes were slow to surface. That world has not disappeared, but it has been demoted. Once the typing is cheap, the value moves to the judgment that decides what should be typed in the first place.
The work that doesn't commoditize
That judgment is the thing I find hardest to get out of AI, and the most durable reason engineers stay necessary. Ask a model for a design and it reaches for the most common answer, the ubiquitous pattern, the shape that appears most often in its training, which is frequently the wrong answer for the situation in front of you. Synthesis, the weighing of tradeoffs we tend to file under intuition or mastery or grokking a system, is precisely where models are weakest and where good engineers earn their keep. Whatever it is that makes two engineers with similar résumés perform differently in the same role is now close to the whole game. Being middling is increasingly commoditized; being genuinely good is increasingly valuable, because the floor rose while the ceiling did not.
Name the forces before the bolts
This changes how the code itself should be built. A project should begin the way a bridge begins, with load and span and soil and failure modes, not with admiration of the bolts. The contract is where those forces get named: who the actors are, what authority they hold, which component owns which fact, what must happen atomically, what must fail closed, and what counts as evidence that the running system is the system you described. The ordinary AI workflow inverts this. You ask for code, get code, read the diff, then write tests against whatever came out, which makes the implementation the first draft of the truth and the tests a biography of the code, a record of what it happened to do rather than what the system required.
The better order is colder. Frame the task, state the constraints, decompose the system, write typed contracts, write tests against those contracts, add hidden tests where gaming is likely, and only then allow implementation. Those tests are not documentation that reads well; they are an executable gate the generated code has to pass before it can merge. The implementation behind the gate can come from Claude, Codex, a human, or three agents racing each other, and it does not matter, because the contract is the judge and the judge does not change when the author does. This is strong typing applied to the whole act of building, rather than to variables alone.
Constraint has to bind the architecture too, not only the behavior. Every prior era taught the same lesson: when implementation gets cheaper, engineers spend the savings on complexity they do not need, and a machine that writes code for free is an open invitation to stand up fifteen services for a problem that wanted one. Bounding behavior while letting the structure sprawl only relocates the mess. The contract should also govern how much system is allowed to exist, and a good reviewer spends as much suspicion on unnecessary abstraction as on incorrect logic.
Move the human obligation upward
Process changes for the same reason, because human review does not scale against machine output. No one can deeply inspect every line an agent can generate, and machine-authored code carries less inherited trust than code from a teammate whose habits and judgment you already know. Rather than pretend otherwise, the discipline is to move the human obligation upward, onto the control plane: the contracts, invariants, validators, trust boundaries, failure modes, deployment gates, and the live evidence that the deployed artifact is the one the plan described. That is where engineering judgment belongs, and the implementation becomes the data plane beneath it, accepted only when it satisfies the plane above.
A test written from a contract is law. It has no loyalty to the implementation, and it can be generated by AI without losing its authority, because the authority comes from the constraint it encodes, not the tool that typed it. The failure mode to watch is the closed circle, where AI-written code, AI-written tests, and an AI-written explanation all descend from the same mistaken premise and agree with each other perfectly. A disciplined team breaks that circle on purpose with mutation, adversarial review, hidden acceptance criteria, and live proof, because a green test states a claim without closing the case. The same suspicion belongs on documents: a compliance matrix that reads "implemented" with no file, artifact, or live result behind it is decoration, and a system that cannot tell the truth about its own blocked, partial, and human-dependent parts is already broken before production finds the fault.
Brooks's law under abundance
The team structure has to move with all of this, and the reason is old. Brooks described the coordination and communication overhead of engineering organizations half a century ago1, and the quantity that drives that overhead is the volume of change. AI raised the volume of change sharply, which raises coordination pressure, which makes the seven-person team too wide in many cases, because every amplified engineer creates more surface area for everyone else. At Wander we have been moving away from the standard two-pizza team toward smaller tactical squads of one to three engineers, with two to five squads rolling up into a conventional PM, EM, and tech-lead structure.2
That move solves one bottleneck and threatens to create another, because the coordination it removes from inside the squad reappears above it. Fracture thirty engineers into a dozen fast-moving squads and the managers can drown coordinating a dozen streams where they used to run four. What keeps the management layer from becoming the new bottleneck is the same discipline applied one level up: squads integrate through typed contracts rather than standing meetings, so the lead's job shifts toward certifying the contracts between squads rather than mediating the conversation between them. When the interfaces are explicit and enforced by tests, a manager can hold far more streams in view, because the contract carries the coordination that used to require a person in a room. Clean contracts are what let both the squad and the org chart absorb the volume, and they force operational maturity earlier and more aggressively than the industry was used to.
Coaching and hiring for constraint
Talent development follows the same line. The coaching I used to give younger engineers centered on code quality: style, readability, decomposition, idiom, implementation discipline. Those still matter, but the emphasis now shifts toward constraint-driven development. Can the engineer define the shape of a problem clearly enough that the implementation is bounded? Can they name the invariants that must always hold, identify the edge cases most likely to break the system, specify the contracts between services, and write the tests that prove behavior without anyone reading every line?
Hiring follows from that. Systems design and genuine coding ability still matter, especially at senior levels, because AI is not flawless and someone has to certify the plane above the code. But the differentiator I care about most now is edge-case thinking: what could go wrong, how would you know, how would you constrain the system so the wrong thing is hard to do, and how would you demonstrate correctness at the level of the whole system rather than the single function. The strongest engineers I work with are the ones who design the meta-system around the code, the contracts and tests and observability and rollback paths and permission boundaries and audit trails and operational checks, because that is exactly what lets a small team absorb a much larger volume of change safely.
The economics of verified change
Underneath all of it sits a plain economic test, and it should settle most of the arguments about whether AI is worth using. Emitting more text is not the same as delivering more value. AI earns its cost when it increases the amount of verified, correct, operated change that reaches production, measured against everything spent getting it there, which includes tokens and subscriptions but also review, cleanup, tests, coordination, incidents, and operational risk. Measured that way the question stops being religious. You use the tool where it clears that burden, you refuse it where it does not, and you invest in the constraint system so that more work clears the burden over time without lowering the bar.
This is the premise behind Pact, and behind contract-first engineering generally.3 It binds what the generator produces to contracts the generator does not control, which makes the trustworthiness of the generator beside the point. You do not have to believe the machine; you only have to check its output against a law it cannot edit. Code production is already flooding, so it is no longer the scarce thing or the hard thing. The craft now is preserving truth under abundance, binding constraint to evidence to the behavior of the system that is actually running. That is how AI makes engineering faster without asking anyone to believe in it, and it is why the engineers who can define the laws of a system before a machine fills in the land are going to matter more, not less.