Blog post
Architecture Became Real When AI Made Me Faster
Why architectural patterns stop feeling theoretical when AI accelerates implementation faster than review.
Architecture Became Real When AI Made Me Faster
For a long time, architectural patterns felt like something serious teams discussed after the product was already real.
Clean Architecture. Hexagonal Architecture. Domain-Driven Design. Ports and adapters. Application layers. Domain boundaries.
I understood the words, but part of me still saw the ceremony.
When you are trying to ship, every layer can look like friction. Every abstraction can look like one more file to open. Every boundary can feel like a tax paid before the system has earned it.
AI changed that feeling for me.
Not because AI made architecture less necessary. The opposite happened.
AI made implementation faster than my ability to review it. That is when architecture stopped feeling theoretical.
Speed creates pressure
When code is slow to write, friction acts as a natural brake. You think before creating five new files because creating five new files takes effort.
With AI, that brake disappears.
An agent can add a route, a database query, a helper, a component, a test, and a new abstraction in one pass. It can produce a plausible implementation before I have fully decided where the responsibility should live.
That speed is useful. It is also dangerous.
Because architectural drift becomes cheaper too.
A small shortcut appears in one place. Then a similar shortcut appears somewhere else. Then the agent copies the pattern because it now exists in the codebase. Soon the system has a shape, but not necessarily the shape I intended.
This is where architecture becomes practical.
Patterns are not the point. Boundaries are.
The useful question is not whether a system is "properly" Clean, Hexagonal, or Domain-Driven.
The useful question is simpler:
Where would a mistake be expensive?
If a wrong tenant scope could expose data, that boundary matters.
If authorization rules are scattered across route handlers, that boundary matters.
If database code decides business policy because it is convenient, that boundary matters.
If UI components invent their own interpretation of state, permissions, or lifecycle, that boundary matters.
Architecture becomes real at the points where crossing a line has consequences.
The tenant example
An early version of a SaaS can get away with passing tenantId through parameters.
It works. The tests pass. The feature ships.
But eventually the question changes from "does this query return the right data?" to "is it impossible for this code path to return the wrong tenant's data?"
That is a different standard.
At that point, tenant scope is not just another argument. It becomes part of a trusted request context. It should be established server-side, validated, carried deliberately, and made hard to forge.
That may sound like architecture ceremony when the app is small.
It stops sounding like ceremony when the alternative is hoping every future route, action, repository, and AI-generated patch remembers the same rule.
Why AI makes this more important
AI agents are pattern amplifiers.
If the codebase has clear boundaries, agents can follow them.
If the codebase has ambiguous boundaries, agents will often make the ambiguity worse. They will copy whatever nearby code appears to work. They will reuse shortcuts. They will create plausible implementations that are locally correct and globally wrong.
That means architecture is not just about human maintainability anymore. It is also about making the codebase legible to the tools that help build it.
A good boundary teaches the agent where a decision belongs.
A weak boundary invites the agent to decide again.
The pragmatic version
I do not need architecture to be pure.
I need it to reduce fragility where fragility is expensive.
That means:
- application use cases own workflows;
- domain code owns rules that should not depend on the framework;
- infrastructure code owns database and external system details;
- request context carries identity and trust;
- routes and components deliver behavior, but do not invent the model;
- tests protect the boundaries, not just the happy path.
This is not about drawing layers for their own sake. It is about making the system harder to accidentally corrupt.
The realization
AI did not make architecture obsolete.
It made architectural weakness easier to produce at scale.
That is why patterns became useful to me only when they stopped being ideals and started becoming guardrails.
The question is not whether an architecture pattern is fashionable.
The question is whether it prevents the kind of mistake that speed makes more likely.
Continue exploring
Follow the same line of thought through themes, tags, or a broader local search across the archive.
Keep following the thread.
Working Is Not a Quality Metric
Why producing working code faster with AI raises the stakes on architectural quality, and why passing tests is not the same as having sound boundaries.
Tenant Is Trust, Not Data
Why tenant scope cannot be treated as a field that flows through the system, and what it means to establish it as a trust boundary instead.
When a SaaS Stops Being About Features
Why building a real multi-tenant SaaS stops being a feature problem and becomes a problem of trust boundaries, guarantees, and responsibility placement.