DEV Community

nomad4tech
nomad4tech

Posted on

SOLID was written for this moment

If You dont write code - who you are?

aq9cmj

Everyone is talking about prompts. About token budgets. About cognitive surface. But I think we're still looking at the wrong unit.

The unit is the interface boundary. Always was.


Back before any of this existed

Back when I was writing SQL scripts and mappers by hand, I already had this principle baked into how I worked: every module should know only its contract. Not where the data came from. Not where it goes. Just: here's input, here's output, here's the guarantee.

Think of it like a bakery. The baker doesn't care if the flour came from the warehouse or yesterday's leftover stock. Doesn't care where the bread ends up - the store shelf, a restaurant, a catering order. He just bakes. His job is defined by its boundaries, not by the full supply chain.

That's how I tried to design every system. Each module gets a clear spec. It does its one job. It exposes a clean interface. It knows nothing about its neighbors' internals.


Why it worked then

The benefits were practical and immediate:

  • Easier to test - validate each piece in isolation
  • Easier to mock - swap out any dependency without touching the rest
  • Easier to hand off - a new developer can own a module without understanding the whole system
  • Easier to explain - narrow scope means clear documentation
  • Easier to replace - swap implementations without breaking contracts

Different developers could work on different modules in parallel. The system remained understandable even as it grew. Each piece was small enough to reason about, flexible enough to move.

This was the goal before generative AI existed. Before vibe-coding was a word. Before anyone was talking about agents.

aq9e6n


What changed with LLMs

The developer is now Claude Code, Cursor, or whatever agent you're using.

And here's the thing - a senior AI developer needs exactly what a senior human developer needs: a clear spec, a narrow scope, and no hidden dependencies.

The same reasons this worked with human developers make it work with agents. The principles didn't change. The developer did.

Principle With AI
Easier to test Generated code lives in one small module - trivial to test without touching the rest
Easier to mock Try different implementations, swap models, experiment freely - the contract holds
Easier to hand off Drop 5 files into context instead of scanning an entire repo. The model gets exactly what it needs, nothing more
Easier to explain A narrow module is a narrow prompt. Less ambiguity, fewer hallucinations
Easier to replace If the generated code doesn't fit - throw it away and regenerate. The interface survives

aq9d56
A well-isolated module with a clean interface can be handed to an agent with a minimal prompt and a clear contract. The agent doesn't need to understand your entire codebase. It needs to understand this boundary - what comes in, what goes out, what the guarantee is.

The rest of the system doesn't care how that module was built. The interface is the guarantee.


The real shift

We're not developers anymore. We're architects.

The generative AI is our senior dev. Our job is to design the factory floor - the contracts, the flows, the boundaries, the guarantees. Not to run the machines.

This is a mindset shift, not just a workflow change. When you stop thinking "how do I write this code" and start thinking "how do I design this boundary so that anyone - or anything - can implement it correctly", the whole game changes.

Your value is no longer in writing the implementation. It's in designing a system where every implementation slot is small, clear, and replaceable.

aq9dju


The founding fathers weren't early. They were right.

SOLID didn't become obsolete with generative AI and vibe-coding.

It became urgent.

Robert Martin wrote about single responsibility, open/closed design, dependency inversion - principles that make systems maintainable, modular, and understandable. At the time, these were best practices for teams of human developers.

Turns out they're also the exact principles that make a system agent-friendly.

Small responsibilities. Clean interfaces. No hidden coupling. Contracts over implementations.

If you haven't revisited Uncle Bob lately, maybe now is the time. Not because the principles are new. Because we finally have a use case that makes their value undeniable.

Bob


The prompt is not the unit of architecture. The interface boundary is.
It always was.

Top comments (0)