Code is cheap, judgment is expensive

Why fundamentals are back in the age of AI, and why the most important question in code review today is: “should this exist in this form at all?”

In 2026, a developer's most valuable skill is no longer writing code. It is the ability to tell an AI: this code is wrong — and explain why.

That sounds like a conference slide, so let's start with something less glamorous: a pull request.

An agent gets the task “add product reservation to the cart”. A few minutes later there is a PR: a few hundred lines, a new endpoint, a migration, a dozen tests, all green. The description is more careful than anything a tired human would write on a Friday afternoon. The review takes five minutes, because everything “looks fine”.

Three weeks later, during a sale, the shop sells 40 units of a product it had 12 of.

The code worked. The tests passed. The solution was wrong. We will come back to this PR.

This article does not claim that AI writes bad code. It often writes better-than-average code. It claims something else: AI radically lowers the cost of generating code, but raises the value of being able to judge whether that code is correct, secure, maintainable and architecturally right. The most valuable developer today is not the one who produces code fastest, but the one who can tell whether a solution should exist in that form at all.

In short:

  • Generating code is getting cheaper faster than verifying it. The bottleneck has moved from writing to review and judgment.
  • AI code is rarely just broken. More often it is locally correct: it passes tests, but has the wrong data model, a race condition, an authorization hole, or it harms the rest of the system.
  • Judgment captured once, in tests, constraints and permissions, scales. Judgment re-applied on every PR does not.
  • AI working inside an application should have the permissions of the user it acts for, and a human should approve every data change.
  • Juniors who fully delegate their work to AI learn significantly less than those who ask AI for explanations.

Code is becoming a commodity. Decisions are not

Simon Willison, co-creator of Django and creator of Datasette, opens the Agentic Engineering Patterns guide with a chapter called “Writing code is cheap now”. The thesis is simple: the cost of producing a first working version of code has dropped to almost nothing, but delivering good code is still expensive.

More interesting than the thesis is how Willison defines “good code”. It has to work, but it also has to be verifiable, solve the right problem, handle errors sensibly, be as simple as possible, have tests and up-to-date documentation, be easy to change later, and meet quality requirements such as security and reliability.

Only the first item on that list gets cheaper by default. Everything else is a decision.

Kent Beck, the creator of Extreme Programming, captures the same shift in a post from April 2023, written after a first try with ChatGPT: the value of 90% of Beck's skills had dropped to zero, while the leverage of the remaining 10% had gone up a thousandfold. In the follow-up essay, that 10% turns out to be knowing what is worth doing and what to ask for, not the ability to string words together well.

There is also a simpler, economic explanation. In “Strategy Letter V” from 2002, Joel Spolsky restates a basic rule: when a product gets cheaper, demand for its complements rises. Code and the judgment of code are complements. When code gets cheaper, more of it gets written, and every new line needs someone to decide whether it should reach production.

The oldest explanation dates back to 1986. In “No Silver Bullet”, Fred Brooks splits software complexity into accidental and essential. Accidental complexity comes from our tools: syntax, boilerplate, looking up signatures in the docs. Essential complexity comes from the problem itself: what the system should do, which conditions must always hold, what happens when something fails. According to Brooks, no single tool would deliver an order-of-magnitude productivity gain, because none would remove the essential complexity.

LLMs are the most serious silver bullet candidate we have seen. But overwhelmingly, they attack accidental complexity. The essential kind stayed where it always was — with humans.


More code does not mean more software

If generating code were the bottleneck, cheaper code would translate directly into faster delivery of working software. The data shows something more complicated.

SourceWhat was studiedResultCaveat
Faros AI, 2025telemetry from more than 10,000 developers across 1,255 teamsin teams with high AI adoption: +98% merged PRs, +91% review time, +154% average PR size, +9% bugs per developer; no improvement at company levelanalytics vendor; correlation, not causation
DORA, 2024survey and statistical modela 25% increase in AI adoption was associated with a 1.5% drop in delivery throughput and a 7.2% drop in delivery stabilitymodel-based estimates
DORA, 2025surveyfor the first time AI increases throughput, but it still increases instability; it amplifies whatever is already in the teamself-reported data
METR, 2025randomized trial: 16 experienced developers, 246 tasks in repositories they knew wellwith AI, tasks took 19% longer, although participants believed they had been 20% fasterearly-2025 tools; newer 2026 data suggests a speedup, but METR itself considers it unreliable due to selection effects
Stack Overflow, 2025developer survey66% name AI answers that are “almost right, but not quite” as their biggest frustration; 46% distrust their accuracy, 33% trust itself-reported, not measured
CodeRabbit, 2025470 open-source pull requestsAI co-authored PRs had on average 1.7× more issues, and 75% more logic errorsAI review vendor; automated analysis
GitClear, 2025211 million changed lines of codethe share of moved code, a proxy for refactoring, fell from 25% in 2021 to under 10% in 2024; copy/pasted code rose from 8.3% to 12.3%coincides with the AI assistant era, not proof of causation

None of these studies settles the question on its own. Together they show a consistent pattern: generation got faster, verification did not.

This is Amdahl's law applied to a team. A system runs as fast as its slowest stage. If writing code gets several times faster while review, testing, deployment and debugging keep their pace, the bottleneck simply moves. From the keyboard to judgment.

The most worrying result is METR's, and not because of the 19% itself. The problem is the gap between perception and reality. A team that feels faster does not look for its bottleneck.


Works ≠ right. Six ways AI writes correct, wrong code

The examples below share one trait: they pass tests, look professional and would survive a hurried review. They are composites of common patterns, not descriptions of specific incidents. They do, however, match what OX Security described in its “Army of Juniors” report after analyzing 300 repositories: AI-generated code is highly functional but systematically lacks architectural judgment. Among the most frequent anti-patterns, the report lists over-specification, avoidance of refactoring, the “worked on my machine” syndrome and fake test coverage.

1. Abstraction in advance

Task: “email the customer after the order is paid”.

type Notifier interface {
	Notify(ctx context.Context, n Notification) error
}

type NotifierFactory struct {
	registry map[Channel]func(cfg Config) (Notifier, error)
}

func (f *NotifierFactory) Register(ch Channel, ctor func(Config) (Notifier, error)) {
	f.registry[ch] = ctor
}

// EmailNotifier — done
// SMSNotifier, PushNotifier, WebhookNotifier — TODO

It compiles, the email channel test passes, and the whole thing looks “enterprise”.

The problem is that we now have four abstractions for a single use case. Every future reader, human or agent, has to understand a registry, a factory and a config to send one email. The empty channels pretend to be extension points that were never actually designed. When a real SMS requirement arrives, it will turn out to need different things: consent, cost, rate limits, different retry rules. It will not fit the prepared interface anyway.

One function would have been enough: sendOrderPaidEmail(ctx, order). An abstraction makes sense when the second real use case appears, not when the model happens to know a design pattern.

The question judgment asks: how many real use cases does this abstraction have today?

2. A data model that starts lying after a month

Task: “add order history”.

CREATE TABLE order_items (
  id         BIGSERIAL PRIMARY KEY,
  order_id   BIGINT REFERENCES orders(id),
  product_id BIGINT REFERENCES products(id),
  quantity   INT NOT NULL
);
-- order total: SUM(products.price * order_items.quantity)

The test creates a product and an order and checks the total. Everything adds up.

Until the first price change. From that moment, historical orders and invoices change value retroactively, because the order line points at the current state of the product instead of recording what the customer actually bought. Removing a product from the catalog will either be blocked by the foreign key or break the history. If the price also lands in a FLOAT column, you get rounding errors in money on top.

A correct model stores a snapshot in the order line: unit price, name, SKU and currency at the time of purchase, and keeps amounts as NUMERIC or as an integer in minor units. That is how the GoatCMS shop model works: shop_order_item stores its own title, sku, unit_price and line_total, independent of later product changes.

Data model mistakes are the most expensive of all, because code can be regenerated in a minute. Two years of business data cannot.

The question judgment asks: what is a historical fact, and what is current state?

3. A race condition no unit test will see

Back to the PR from the beginning.

func Reserve(ctx context.Context, db *sql.DB, productID int64, qty int) error {
	var stock int
	err := db.QueryRowContext(ctx,
		`SELECT stock FROM products WHERE id = $1`, productID).Scan(&stock)
	if err != nil {
		return err
	}
	if stock < qty {
		return ErrOutOfStock
	}
	_, err = db.ExecContext(ctx,
		`UPDATE products SET stock = $1 WHERE id = $2`, stock-qty, productID)
	return err
}

The tests call this function one after another, so everything works. In production, two requests read stock = 1 at the same time, both pass the check, both write 0. We sold two units out of one. This is the classic check-then-act pattern and a lost update.

The fix is shorter than the original:

UPDATE products
SET stock = stock - $1
WHERE id = $2 AND stock >= $1;
-- 0 affected rows means out of stock

The same class of problem returns in payment webhooks. The payment provider retries a notification, so the handler runs twice. Without an idempotency key and a uniqueness constraint in the database, the customer gets two licenses or two parcels.

The question judgment asks: what happens if this code runs twice at the same time? And twice in a row?

4. Code that hides failures

Task: “the dashboard crashes when the payments API does not respond — fix it”.

payments, err := client.ListPayments(ctx, since)
if err != nil {
	log.Println("could not fetch payments")
	return []Payment{}, nil
}

The dashboard no longer crashes. Ticket closed.

Except the error has turned into data. “Zero payments” is now indistinguishable from “we don't know how many payments there were”. The log has no cause, no request ID, no response time. There is no metric and no alert. The person on night duty sees revenue equal to zero and cannot tell whether the integration is down or the business has a problem.

A better version returns the error or an explicit “data unavailable” state, logs in a structured way with context, increments an integration error counter and adds a tracing span. Observability is not “just in case” logging. It is the ability to ask a running system a question nobody anticipated.

The question judgment asks: how will I find out that this is not working, and why?

5. A vulnerability you cannot see on the happy path

// GET /api/orders/{id}, behind a middleware that requires login
func (h *Handler) GetOrder(w http.ResponseWriter, r *http.Request) {
	order, err := h.repo.FindByID(r.Context(), r.PathValue("id"))
	if err != nil {
		http.Error(w, "not found", http.StatusNotFound)
		return
	}
	json.NewEncoder(w).Encode(order)
}

The endpoint is “secured” because it requires a session. Yet any logged-in user can read someone else's order by changing the ID in the URL. This is Broken Object Level Authorization, number one on the OWASP API Security Top 10. The tests pass because the author only checks their own orders.

The fix is a query scoped to the owner, for example FindByIDForOwner(ctx, id, session.UserID), returning the same 404 for both a missing record and someone else's record, so the endpoint does not reveal which IDs exist.

The data here is unusually consistent. Veracode's 2025 report tested more than 100 models on 80 tasks: in 45% of cases the generated code contained a vulnerability, and larger, newer models did not do clearly better. Dependencies are a separate class of risk. A study presented at USENIX Security 2025 found that commercial models suggested non-existent packages in at least 5.2% of cases and open models in 21.7%. 43% of the invented names reappeared in every one of ten repetitions of the same prompt, which makes them a predictable target: all an attacker needs is to register a package with that name. The attack is called slopsquatting. We wrote about the risks of installing dependencies in npm install should not mean: “run foreign code on my computer”.

The question judgment asks: who else can call this code, and whose data will they get?

6. Locally correct, globally harmful

Task: “the integration test sometimes times out on the pricing service — add a retry”.

for attempt := 0; attempt < 4; attempt++ {
	resp, err = pricing.Get(ctx, sku)
	if err == nil {
		break
	}
}

Locally, all is well: the flaky test turns green.

Globally, we have just built a failure amplifier. The Google SRE Book describes exactly this mechanism: if three layers of a system each retry three times, a single user action can produce 4 × 4 × 4 = 64 attempts against a service that is already struggling. Retries without exponential backoff, random jitter and a retry budget turn a slowdown into a cascading failure.

The agent saw one file. The problem lives in the call graph, which was never in its context.

The question judgment asks: what will this change do to the rest of the system when something is already failing?

Tests versus judgment

ExampleWhat the test checkedWhat judgment asks
Abstraction in advancewas the email senthow many real use cases does this abstraction have?
Data modeldoes the order total add upwhat is a historical fact, and what is current state?
Concurrencydoes reservation workwhat if the code runs twice at the same time?
Observabilitydoes the dashboard stay uphow will I learn about a failure and its cause?
Securitycan the owner see their orderwho else can call this?
Retrydoes the test passwhat will this change do to the system during an outage?

None of these questions is about syntax. All of them are about consequences.


Seniority: from “how do I write this” to “should it be done this way”

For years, part of a senior's value came from speed: knowing the APIs, remembering the framework's traps, writing without opening the docs. That part is now being taken over by an agent that knows more APIs than any of us.

What remains is what the agent does not have in its context: knowing what not to build, how to model data, how the system fails and what it costs to reverse a decision.

The OX Security report aptly describes AI as an army of talented but inexperienced juniors. That leads to an uncomfortable conclusion: every developer working with an agent becomes the lead of such an army. Juniors who never get tired, never ask questions and always sound confident.

Addy Osmani from Google calls this asymmetry “the 70% problem”: AI quickly delivers most of a solution, but the last 30% — edge cases, integrations, security and performance — requires exactly the knowledge the tool does not replace. That is why experienced developers gain more from AI. They constantly evaluate, correct and reject. Less experienced developers more often accept the output as a whole.

Peter Naur goes deeper still. Naur's 1985 essay “Programming as Theory Building” argues that a program is first of all a theory in the heads of the people who build it, and the code is only a partial record of that theory. When the team that holds the theory leaves, the program starts to die, even if the code still compiles.

AI can generate code without a theory. Osmani calls the result comprehension debt: the growing gap between how much code exists in a system and how much of it anyone actually understands. Kernighan and Plauger's “The Elements of Programming Style” is the source of the observation that debugging is twice as hard as writing. If code is written at the edge of our understanding, we will not be able to debug it.

Willison offers a practical rule: do not commit code you could not explain to someone else. If code written by an LLM has been reviewed, tested and understood, that is simply software engineering. At the other end of the spectrum is vibe coding: building without looking at how the code works.

Eight questions for every AI-generated PR

  1. What problem does this change solve, and is it a problem we actually have?
  2. What does this change touch that it should not?
  3. Which invariants must hold after the change, and what enforces them: a test, a type, a database constraint, or hope?
  4. What happens with two concurrent calls, or with a retry?
  5. How does it fail, and how will we find out?
  6. Who can call it, and what data will they get access to?
  7. What will it cost to reverse this decision in six months, once data, a public API or other teams depend on it?
  8. Can I explain this change without reading the code out loud?

Review is the new bottleneck. Reading faster will not widen it

Since judgment has become the bottleneck, organizations are starting to manage it explicitly.

In March 2026 the Financial Times described internal Amazon documents linking a series of “high blast radius” outages to changes assisted by generative AI. According to the FT, AI-assisted changes made by junior and mid-level engineers would require sign-off from a senior engineer. Amazon disputed the report: according to the company, only one of the incidents discussed involved AI, none involved AI-written code, and no such requirement had been introduced. Whoever is right on the details, the dispute itself shows that “who signs off on an AI-generated change?” has become a board-level question.

The Thoughtworks Technology Radar places “complacency with AI-generated code” in the Hold ring. The Radar team points out that agents generate ever larger change sets, and developers are increasingly reluctant to review them.

“Let's review more carefully” is not enough. If there are twice as many PRs and each is two and a half times larger, reading line by line stops being a strategy.

OpenAI shows a more interesting answer in its February 2026 article on harness engineering. A small team built, in five months, a product of roughly a million lines of code without writing a single one by hand. Humans designed the agents' working environment, specified intent and built feedback loops. Architectural boundaries were not described in a document asking for compliance. They were enforced by linters and structural tests.

Birgitta Böckeler of Thoughtworks describes such a harness as a set of guides that steer the agent before it acts and sensors that check the result afterwards. Böckeler also notes that the OpenAI write-up is missing verification of functionality and behavior. Linters guard structure. They will not tell you whether the system does what it should.

This leads to the most important distinction in this article:

Judgment applied once and captured as a test, a type, a constraint or a permission scales. Judgment re-applied on every PR does not.

We wrote more about turning decisions into contracts in From Vibe Coding to Contract-Driven AI Development. One thing is worth adding here: AI can help with review, but a model should not be the only judge of its own work. Someone has to own the decision, and responsibility cannot be assigned to a model.


When AI becomes a user of the application: judgment captured in permissions

So far we have talked about AI that writes code. There is a second, increasingly important front: AI that works inside the application. It reads data, fills in forms, proposes deleting a record.

Here the question is no longer “is this code good?”, but: what can this agent do, on whose behalf, and who approves it?

In July 2025 a Replit agent, working on a SaaStr project run by Jason Lemkin, deleted a production database despite an explicit code freeze. According to The Register, the agent also generated around 4,000 fictional records, reported false test results and claimed that restoring the data was impossible, which turned out to be untrue. The agent itself called what it did “a catastrophic error of judgement”.

The problem was not the model's intelligence. The problem was that the agent held permissions with no one's judgment in the loop.

The industry already has vocabulary for this. The OWASP Top 10 for LLM Applications 2025 describes the Excessive Agency risk and breaks it into three causes: excessive functionality, excessive permissions and excessive autonomy. One of the recommended controls is requiring human approval before high-impact actions. Willison calls the combination of three properties the “lethal trifecta”: access to private data, exposure to untrusted content and the ability to communicate externally. Meta proposed the Agents Rule of Two: an unsupervised agent should have at most two of three properties — processing untrustworthy input, access to sensitive data or systems, and the ability to change state or communicate externally. If it needs all three, it also needs a human in the loop.

How the GoatCMS harness module handles it

The harness module adds an AI assistant to the admin panel that works with application data. Its most interesting decisions are about what the assistant cannot do.

Risk according to OWASP LLM06The harness module's answer
Excessive functionalityeach exposed entity gets three generated tools: query_<entity>, open_<entity>_form and confirm_delete_<entity>; the agent does not execute code or arbitrary SQL
Excessive permissionseffective access is the conjunction of the logged-in user's role mask and the entity's harness module mask
Excessive autonomythe agent never writes or deletes data itself; it opens a form or a confirmation dialog, and a human makes the decision

AI is another user of the application, not a service account. The agent works with the permissions of the person talking to it. It will not see fields that person's role cannot read, even if the entity exposes them to the assistant. Nor will it see fields outside the list exposed to the assistant, even if the role can read them. Neither mask is enough on its own.

This decision lives in the application model, not in the prompt:

module:add --name=harness \
    --property:list:list="username,email" \
    --property:list:persist="role,username,email,phone,shipping_recipient,shipping_street,shipping_unit,shipping_postal_code,shipping_city,shipping_country,billing_recipient,billing_street,billing_unit,billing_postal_code,billing_city,billing_country"

The persist set, the fields the assistant may pre-fill in a form, deliberately leaves out password and email_verified_at. Even if the user's role is allowed to write the password, the agent cannot propose a value for that field. Nobody has to remember this during every review. The generator enforces it every time.

Reads are narrow and parameterized. The query_<entity> tool is read-only. Table and column names come from a generated registry and are validated, and values supplied by the model reach SQL only as query parameters. Filters support equality only, and results are capped by a row limit. A single conversation turn can run at most five rounds of read tools, so the model cannot loop forever.

State changes always go through a human. Frontend tools never run on the server. They turn the agent's request into a browser action: a pre-filled form or a delete confirmation dialog showing the record's real data. At most one such action can happen per turn. When the agent asks for one, the chat reply is a fixed server message, not text written by the model. So the model has no way to say “done, I deleted it” before a human has confirmed anything. In the Replit incident, the agent's false reports turned out to be one of the most dangerous parts.

No access does not reveal that data exists. If a record does not exist or none of its fields are readable, the preview is simply empty. Passing the ID of someone else's conversation behaves as if that conversation did not exist. It is the same pattern that was missing from the vulnerable orders endpoint above.

The rules “do not change data” and “do not invent field names or record IDs” are also in the system prompt. There, however, they are instructions for the model, not a security boundary. The boundary is code that executes only what the masks allow.

Judgment that cannot be automated

To be fair, we should say what this design does not solve.

Results of read tools are sent to the model provider as part of the conversation. Adding a field to the list set is therefore a decision to share it with an external AI provider. No generator will make that decision for the team.

Record data may also come from customers, for example from order notes. That is untrusted input that may try to steer the model's suggestions. This is exactly why every change ends in a form that a human sees and submits.

Finally, constraints have a cost. No ranges or sorting in filters and one action per turn make the assistant less “magical”. It is a deliberately boring design. Boring systems are easier to predict.

In this model, AI is the user's assistant, not the user's replacement. It prepares the work: finds records, fills in the form, shows what will be deleted. A human makes the decision. That is the whole thesis of this article in miniature: generating a proposal is cheap; approving it carries value because responsibility stands behind it.


Juniors: do not learn prompting instead of understanding

The most common advice for beginners today is “learn to prompt well”. It is a useful skill, but one you can master in weeks. Understanding systems takes years. And that understanding is what decides whether you can tell an AI that the generated code is wrong.

In January 2026, Anthropic researchers published an experiment with 52 mostly junior developers learning an unfamiliar asynchronous library, Trio. Half of them could use an AI assistant. On a comprehension quiz taken without AI, the assisted group averaged 50% and the group that coded by hand averaged 67%. The AI group was not statistically significantly faster. The largest gap was on debugging questions.

The more important result is a different one. Participants who asked AI about concepts and requested explanations scored 65% or more. Those who fully delegated writing the code scored below 40%. Same tool. Different way of using it.

A 2025 study by Microsoft Research and Carnegie Mellon, based on a survey of 319 knowledge workers, showed a similar mechanism: the more people trusted AI, the less critical thinking they applied. The more confident they were in their own abilities, the more they applied.

Lisanne Bainbridge's classic 1983 paper “Ironies of Automation” already describes this paradox. Automation leaves humans the hardest tasks: monitoring and intervening when something goes wrong. At the same time, it takes away the everyday practice through which they could build the competence to do so.

That is why the opening line of this article deserves to be challenged. Writing code is no longer the most valuable skill. But it is still the best way to learn how to judge code.

In practice:

  • First try to solve the problem yourself, then compare your solution with the AI's. The differences are your learning material.
  • Ask AI “why?” and “what could go wrong here?”, not just “write it”.
  • Regularly debug without an agent: stack traces, debugger, logs, profiler.
  • Learn the things you cannot see in a single file: data modeling, transactions and isolation levels, HTTP, authentication and authorization, logs, metrics and tracing.
  • Read public incident postmortems. They are condensed judgment from people who paid for their mistakes.
  • Follow Willison's rule: do not commit code you cannot explain.

For team leads the conclusion is symmetrical: have juniors review AI-generated changes together with a senior, not just generate more of them. And measure understanding, not lines of code.


Where this thesis might be wrong

It is worth testing our own assumptions.

Models are improving fast. Newer METR data suggests real speedups, and better models and AI review tools will catch more and more of the problems in this article, such as missing authorization or naive retries. That is true. But it moves judgment up a level rather than removing it. What counts as “correct” depends on business context, risk appetite and accountability, none of which live in the repository.

Fundamentals never went away. Saying they are “back” is a simplification. What changed is the price ratio. A good systems engineer was always valuable. What is new is that the difference between such an engineer and a fast code producer can no longer hide behind typing speed.

“Judgment” can become an excuse. A senior who blocks every PR because of “a feeling” is not a quality bottleneck, just a bottleneck. Judgment that cannot be explained and captured in a test, a constraint, a permission or an architectural decision does not scale and cannot be verified.


Responsibility does not compress

AI compresses the time it takes to write code. It does not compress responsibility for decisions.

When production is down at three in the morning, nobody asks which model generated the retry. They ask who approved it, and why.

That is why the best teams will not be the ones that generate the most code. They will be the ones that know best what to keep out of the system, and that capture that knowledge so it does not have to be rediscovered on every PR.

The cheaper code becomes, the more expensive good judgment gets.

Now a question for you: what was the most convincing yet wrong code an AI has generated for you? And how could you tell it was wrong? Stories like that teach more than benchmarks.


Sources

The economics of code and the human role

Productivity and code quality

Security and reliability

Agents, permissions and harness engineering

Learning and skill formation

GoatCMS