Back to essays Design patterns after AI

Design patterns after AI

Which patterns survive the shift to AI-assisted development? Which need to evolve?

Why patterns may matter even more when humans and agents share a codebase

Design patterns were never primarily about saving keystrokes.

They were ways of recognizing recurring problems, capturing solutions that had worked repeatedly, and giving those solutions names.

That last part matters more than it may appear.

A pattern is not only an implementation technique.

It is also a language.

When an experienced developer sees something called a Strategy, Adapter, Observer or Repository, they already have a mental model of what that code is probably trying to do.

They have not read the implementation yet, but they are no longer starting from zero.

They know roughly:

  • what problem is being addressed;
  • what responsibilities are likely separated;
  • how the pieces probably interact;
  • what kind of change the structure is intended to make easier;
  • and what trade-offs may come with it.

That shared understanding has always been one of the most valuable properties of design patterns.

AI does not remove that value.

It gives us another reason to care about it.

Implementation was never the hardest part

There is an obvious argument against design patterns in an AI-assisted world.

If an agent can implement a Factory, Strategy, Adapter or Visitor in seconds, why should developers spend much time learning patterns?

The implementation is cheap now.

That part is true.

But it confuses knowing how to implement a pattern with knowing why the pattern exists and whether it belongs here.

Those are very different skills.

AI can generate the structure.

Someone still has to understand the problem well enough to decide whether that structure is appropriate.

And as implementation becomes cheaper, that judgment becomes proportionally more important.

The question shifts from:

Can I implement this pattern?

toward:

Is this the problem this pattern is supposed to solve?

And then:

Is the cost of introducing it justified in this context?

That was always the more important question. AI simply makes the distinction harder to ignore.

Patterns compress understanding

Imagine opening an unfamiliar codebase.

Without recognizable structure, you have to investigate.

You read classes, trace dependencies, follow calls, inspect interfaces, find where responsibilities live and gradually reconstruct the original developer's thinking.

That costs cognitive capacity.

A familiar pattern gives you a shortcut — not a shortcut in implementation, but a shortcut in understanding.

You can temporarily treat part of the system as known.

You don't need to understand every line before moving on.

The pattern gives you a compressed representation of the intent.

That lets you preserve your mental effort for the parts of the system that actually require investigation.

This is one of the reasons patterns have always helped teams work together.

And now the team may include AI agents.

AI agents have the same investigation problem

A coding agent entering an unfamiliar repository also needs to build a model of the system.

It has to discover:

  • where responsibilities live;
  • which dependencies matter;
  • what existing conventions are;
  • where similar behavior already exists;
  • whether something should be extended or duplicated;
  • and how a new change fits the existing structure.

All of that consumes context.

And context is still a constraint.

If an agent spends most of its available context reconstructing a confusing codebase, that is capacity it cannot spend on the actual problem.

Investigation competes with reasoning.

Exploration competes with implementation.

Noise competes with useful context.

A recognizable pattern can reduce that cost.

If the agent can identify a familiar structure, it can make reasonable first-order assumptions about intent and interaction without reading every implementation detail immediately.

That does not mean the agent should blindly trust the name.

It means the pattern gives it a better starting point.

In that sense, patterns can act as a form of context compression.

They turn:

Read everything before understanding anything.

into something closer to:

Recognize the structure, verify what matters, then spend attention where the uncertainty actually is.

That benefits humans and agents for essentially the same reason.

Shared language matters more when authorship becomes mixed

Software development has always been collaborative.

One developer writes something. Another developer needs to change it later.

The second developer needs to reconstruct enough of the first developer's intent to continue the work safely.

AI changes the actors, not the underlying problem.

Today the chain may look like:

  • a human continues an agent's implementation;
  • an agent modifies code written by a human;
  • one agent continues work created by another agent;
  • a reviewer needs to understand code produced largely by an autonomous system.

The need for efficient transfer of intent does not disappear.

It increases.

Patterns give those different actors common reference points.

A human can tell an agent:

Use a Strategy here.

The agent has a strong prior for what that means.

An agent can produce an implementation that follows a recognizable Adapter structure, and a human reviewing it does not have to reconstruct the intention solely from individual lines of code.

The pattern becomes part of the communication protocol.

That is useful in any collaborative system.

This also helps human-in-the-loop remain practical

There is an uncomfortable consequence of faster code generation.

Humans can no longer realistically maintain ownership by reading every generated line with the same attention they once gave manually written code.

Code volume can grow much faster than human review capacity.

If human-in-the-loop means:

A human must manually reconstruct every implementation decision made by the agent,

then the model stops scaling quickly.

That makes comprehensible structure more important.

Clear patterns, good names, explicit boundaries, small responsibilities and consistent architecture make it easier for a human to understand what happened at the intent level before deciding where deeper inspection is necessary.

Patterns are not enough by themselves.

But they are one of the tools that allow humans to stay meaningfully involved without becoming a throughput bottleneck.

Human-in-the-loop should not mean human-in-every-line.

Patterns are guardrails, but only one kind

There is another reason patterns remain useful with AI-generated code.

Without strong constraints, agents can generate code that works locally while degrading the system globally.

Long methods.

Large files.

Duplicated implementations.

Inconsistent abstractions.

Hidden coupling.

Several different solutions to the same recurring problem.

This can happen very quickly because code generation is cheap.

Recognizable patterns can provide one type of guardrail.

They can help communicate:

This is how we solve this class of problem in this system.

But patterns are not enough.

Clean code matters.

Architectural boundaries matter.

Tests matter.

Naming matters.

Domain structure matters.

Team conventions matter.

A pattern is part of the toolbox, not the toolbox itself.

Misused patterns can be worse than no pattern

There is a danger here.

A shared language only works when the words mean approximately the same thing to everyone.

If something is called a Repository but behaves completely differently from the expected pattern, the name can create false confidence.

That is dangerous for developers.

It is also dangerous for agents.

A human or agent may infer intent from the familiar name and skip investigation that would have revealed the inconsistency.

The answer is not to stop using pattern language.

The answer is to treat pattern recognition as evidence, not proof.

Agents can actually help here.

A capable agent does not have to trust the name blindly. It can inspect enough of the implementation to verify whether the structure really behaves as expected.

The same principle applies to humans.

Patterns accelerate understanding.

They do not eliminate judgment.

The problem should choose the pattern

This is where pattern thinking often goes wrong.

Someone learns a new pattern and starts looking for places to apply it.

The direction has been reversed.

The business problem, product need and technical reality should create the pressure that makes a particular pattern useful.

Not the other way around.

I do not give any credit to a codebase merely because it contains many patterns.

If those patterns introduce indirection, abstraction and cognitive overhead without solving problems that matter, they are simply overengineering with better vocabulary.

There is no universally correct catalogue to apply.

Context still decides.

What are we building?

How long will it live?

How often will this behavior change?

What kind of variation actually exists?

How many people or agents will work on it?

What does the additional abstraction buy us?

What does it cost?

The pattern is a potential solution.

It is not the starting point.

AI does not make pattern knowledge obsolete

If anything, AI moves developers toward the part of pattern knowledge that always mattered most.

Less:

How do I type this implementation?

More:

What structure best fits this problem?

As agents take more responsibility for implementation, developers increasingly operate at the level of:

  • architecture;
  • system boundaries;
  • constraints;
  • trade-offs;
  • review;
  • intent.

Those are precisely the areas where understanding patterns deeply matters.

Knowing the syntax of a pattern may become less valuable.

Knowing its forces, consequences and appropriate context does not.

The durable part of design patterns

AI will change implementation practices.

Models will get better.

Context windows will grow.

Agents will investigate repositories more efficiently.

The exact economics of context usage may look very different several years from now.

But the underlying collaborative problem remains.

One actor creates something.

Another actor needs to understand it and continue the work.

Efficient communication of intent remains valuable.

That actor may be a human.

It may be an AI agent.

It may be another agent entirely.

Patterns remain one of the strongest tools we have for compressing recurring engineering knowledge into a shared language.

They matter after AI for essentially the same reason they mattered before AI:

because software does not end when one implementation is finished.

Someone — or something — has to understand what comes next.

Closing principle

Design patterns are not valuable because they make code sophisticated.

They are valuable when they make a recurring problem easier to understand and solve.

AI makes implementation cheaper.

It does not make communication, judgment or maintainability irrelevant.

If anything, systems that are built faster need even better ways of preserving intent.

The tools may change.

The implementers may change.

The need for a shared language does not.