The Revolution Befor AI: The Declarative Revolution, and How We Should Program From Now On
Before LLMs, programming quietly shifted from imperative scripts to declarative clarity. This hidden evolution—containers, infra-as-code, components—set the stage for AI to finally read, reason, and collaborate with our code.

When I first started building websites, everything was manual. Spin up a VM, install packages, configure Apache, set up networking—line by line, hoping I didn’t miss a step. It worked, but it was fragile.
Then Docker came along. Suddenly, I could package everything into one neat container. Docker Compose made it even better—I could describe my whole stack in a single YAML file. Kubernetes took it further by orchestrating all the moving parts for me. And when Terraform arrived, it felt like magic: I wasn’t scripting servers anymore, I was declaring what I wanted, and the system figured out the rest.
At the time, I just appreciated the convenience. What I didn’t realize was that I was stepping into a world perfectly suited for AI.
Why Declarative Thinking Matters
Declarative tools like Docker, Kubernetes, and Terraform flip the script. Instead of telling machines how to do something, we describe the end state. The system takes responsibility for figuring out the steps to get there.
Take infrastructure. Back in the old days, I’d write long bash scripts: install Postgres, configure users, set up storage, open the right ports, and hope I hadn’t missed a detail. Every line was an instruction tied to a particular OS, version, or runtime. For an AI trying to understand this, it’s like reading a recipe where half the ingredients are hidden between the lines—you need deep contextual knowledge just to interpret what’s happening.
With Terraform, I can instead declare:
resource "aws_db_instance" "mydb" {
engine = "postgres"
instance_class = "db.t3.micro"
allocated_storage = 20
}
That snippet is compact but unambiguous. It says, “I want a Postgres database of this size and type.” AI doesn’t need to parse ten steps of installation logic—it just sees the goal. Because declarative code describes what something is rather than how to do it, it maps naturally onto how AI models understand text: as patterns, relationships, and outcomes.
The same is true in UI. In the old CSS days, I’d have a spaghetti of selectors, nested rules, and overrides—difficult for me to reason about, and almost impossible for an AI to modify without breaking something. But with Tailwind, I can write:
<button className="bg-blue-600 rounded-lg hover:bg-blue-700">
Submit
</button>
Every class is atomic, precise, and predictable. Change bg-blue-600
to bg-green-600
, and the background color only changes—no side effects lurking elsewhere. For an AI, this is huge: it can confidently generate changes knowing the outcome is deterministic.
This is why declarative paradigms are so AI-friendly. They reduce ambiguity, eliminate hidden state, and separate intent from implementation. Instead of reverse-engineering “what the human really meant” from dozens of imperative steps, AI can work directly with clear, human-readable declarations of the desired outcome.
Writing Code That AI Can Understand
Over the years, I’ve noticed that the practices making my code easier for teammates also make it easier for AI. Some practical shifts stand out:
- Vertical slice architecture: Organizing by features instead of layers gives both humans and AI self-contained units of meaning.
llms.txt
files: Just likerobots.txt
tells crawlers what to do,llms.txt
gives AI a roadmap for your project.- AI-actionable docs: Instead of vague “configure the DB,” I now write: “set
DATABASE_URL=postgres://user:pass@host/db
.” Instead of writingclick this link
in the document, we can writerun curl -XPOST ...
so AI doesn’t guess—it executes. - Composable components: Smaller, reusable parts reduce the chances of AI (or me) breaking things when making changes.
Toward a Shared Language Between Humans and AI
Looking back, I realize Docker, Compose, K8s, and Terraform weren’t just conveniences. They were rewiring how I think about code. Declarative, modular, predictable—exactly the qualities that make AI collaboration possible.
The shift is bigger than tools. It’s about our role. We’re no longer just code writers. We’re system architects, orchestrating intelligent collaboration between humans and machines.
That’s the real “declarative revolution.” It’s not just how we deploy apps or style UIs—it’s a new way of thinking about programming itself. A shared language between us and AI.
And once you see it that way, it’s hard not to imagine what the next decade of coding will look like.