← Back to Blog

Why Spec Driven Development

Part 1: The Three Problems

AI Agents LLMs Best Practices

Problem #1: Misalignment (The Root Problem)

The Communication Gap: We think the developer (or agent) knows what we want. They build it at lightning speed—only to deliver something completely off the mark.

The most common failure in software development is misalignment.

This is just as true in the AI age. There is still a communication gap, except now it's between us and the agent. If the agent doesn't truly understand what we want, it will build the wrong thing — only much faster.

The Solution: A Shared Language

The fix starts with establishing a shared language — one that is used by everyone involved: business stakeholders, developers, and the codebase itself.

This idea comes from Domain-Driven Design (DDD), where it's called Ubiquitous Language. The goal is simple: a word used in a business meeting should mean the exact same thing in the product requirements, the database schema, and the source code.

When everyone uses the same words to mean the same things, misunderstandings between business and engineering disappear.

"With a ubiquitous language, conversations among developers and expressions of the code are all derived from the same domain model."
— Eric Evans, Domain-Driven Design

Why a Shared Language Matters Even More With AI Agents

A shared language doesn't just reduce confusion — it directly improves how well agents work:


Problem #2: Silent Failures (Aligned but Bad Output)

The Feedback Void: Even when we and the agent agree on what to build, it can still produce poor results. Without knowing if the code compiles, runs, or breaks tests, the agent is flying blind.

Without feedback on whether the code actually works — does it compile? does it run? do the tests pass? — the agent has no way to self-correct.

The Solution: Tight Feedback Loops

We need to give the agent access to real feedback mechanisms:


Problem #3: Accelerating Software Entropy

The Speed Trap: Because agents can write code incredibly fast, they also accelerate the decay of the codebase. Complexity accumulates at an unprecedented rate.

What used to take months of messy manual coding can now happen in days. When codebase complexity grows faster than humans can review it, the system becomes unmaintainable.

The Solution: Intentional Code Design

This requires a fundamental shift in how we approach AI-powered development — we need to start caring about code design as a first-class priority.

Speed without structure leads to a codebase that is frozen and impossible to change. The solution is not to slow down, but to build with clean boundaries and modular design from the start.


Summary

Solving three compounding problems:

# Compounding Problem Engineered Solution
1 Misalignment
The agent builds the wrong thing
Shared Language
A ubiquitous vocabulary across the team, specs, and codebase
2 Silent Failures
The agent has no way to verify its work
Feedback Loops
Type safety, runtime observability, and automated E2E tests
3 Software Entropy
Complexity scales faster than human review
Intentional Code Design
Treating architecture and code design as clean-room priorities

The pattern is the same in each case: give the agent clarity before it starts, and give it signal after it acts. Do both, and agents stop being a liability and start being a force multiplier.