Lightweight Approach to Spec-Driven Development with AI Agents
AI coding agents, without any doubt, accelerate software development. Tools like Claude Code and Codex are increasingly capable of implementing entire features, writing tests, and reviewing code. But the better these agents become at writing code, the more important another question becomes:
How do we make sure they are building the right thing?
Simply prompting an AI agent to “build an application that does X” might produce impressive results. However, it often leaves too many decisions to the agent. Product assumptions, architectural choices, and implementation details become mixed together, sometimes without anyone explicitly acknowledging them.
I have been experimenting with a lightweight form of Spec-Driven Development (SDD) to address this problem.
My approach is intentionally pragmatic. I don’t want to spend weeks writing specifications before seeing working software. At the same time, I want enough structure to guide AI agents effectively, maintain consistency, and keep important decisions under human control.
The result is a workflow built around a handful of Markdown files, iterative conversations with AI agents, and a development process that gradually transitions from sequential foundation work to parallel feature implementation.
Here’s how it works.
1. Start with Product Vision, Not Code
Every project starts with a simple document:
0-vision.md
Before thinking about frameworks, databases, or implementation details, I want to understand the product itself. Some of the questions I try to answer include:
- What is the domain or core idea?
- What problem are we trying to solve?
- What value should the product deliver?
- Who are the intended users?
- How are others solving similar problems?
- What could make this product different?
- What potential unique selling points could it offer?
At this stage, the document doesn’t need to be perfect or comprehensive. Its purpose is to establish a direction. I usually write down my initial thoughts, assumptions, and ideas in plain language. The important thing is that I start by describing what I want to achieve and why, rather than jumping directly into how it should be implemented. This distinction becomes particularly important when working with AI agents. Without a clear product vision, agents tend to fill in the gaps themselves. And while their assumptions might be reasonable, they aren’t necessarily aligned with what I actually want to build.
2. Let AI Turn the Vision into Research and Requirements
Once I have an initial vision, I hand it over to an AI agent, usually Claude or Codex. I ask it to analyze the vision and produce two additional documents:
1-research.md
2-requirements.md
The research document explores the problem space in more detail. Depending on the project, this might include existing solutions, competitor approaches, common patterns, technical possibilities, and potential differentiation opportunities. The requirements document translates the vision and research into more concrete product requirements. I don’t consider either document finished just because an AI generated it. Instead, I read through both, challenge assumptions, correct misunderstandings, and use the agent to refine the content. This usually involves a bit of back-and-forth until I feel the documents accurately reflect the product I want to build.
AI is useful here because it accelerates the process of exploring ideas and structuring information. But it doesn’t replace product judgment. One particularly important aspect of the requirements document is prioritization.
I distinguish between Must-have requirements and Nice-to-have requirements. This makes it clear which capabilities are essential for the product and which are optional or can be introduced in later iterations. Every requirement also gets a unique identifier, such as REQ-001, REQ-002, and so on. These identifiers allow me to reference requirements consistently throughout the entire development process — from MVP scoping and architecture to implementation, testing, and code reviews.
For example:
ID | Requirement | Priority |
REQ-001 | Users can register with email and password | MUST |
REQ-002 | Users can reset their password | MUST |
REQ-003 | Users can sign in with Google | Nice-to-have |
For customer projects, requirements and their priorities should be reviewed and agreed upon together with the customer. AI can suggest priorities and explain trade-offs, but the final decision about what matters most should be made by the people responsible for the product.
This creates a requirements document that isn’t just a descriptive artifact. It becomes a traceable reference point for everything that follows.
3. Give the Agents a Shared Project Context
Once the initial documentation is in place, I update the repository’s AGENTS.md file.
This file acts as a central entry point for AI coding agents. I tell the agents where the project documentation lives and explain that the documents are numbered and collectively describe the project context. The numbering is intentional.
For example:
docs/
├── 0-vision.md
├── 1-research.md
├── 2-requirements.md
├── 3-mvp.md
├── 4-architecture.md
├── 5-implementation-notes.md
└── 6-test-report.md
Each document contributes a different perspective, moving from high-level product intent toward concrete implementation and verification. This doesn’t mean that every document must always be loaded into every agent’s context. But agents should know these documents exist, understand their purpose, and consult the relevant ones before making decisions. I also use AGENTS.md to define general implementation guidelines.
Depending on the project, these might cover:
- Preferred programming languages and frameworks
- Architectural and programming paradigms
- Coding conventions
- Testing expectations
- General implementation principles
This is where I establish the technical boundaries within which agents are expected to work. I want the agents to have enough freedom to make sensible local implementation decisions without constantly asking for permission. But I don’t want them to silently introduce a new framework, change architectural direction, or make significant product decisions on their own.
The goal is to provide guidance without micromanaging every implementation detail.
4. Define the MVP Before Designing the Architecture
With the vision, research, and prioritized requirements available, I ask an AI agent to help define the Minimum Viable Product.
The result goes into:
3-mvp.md
The goal is to identify the smallest meaningful scope that delivers actual value.
This is another iterative step.
The agent proposes an MVP based on the existing documents. I review it, question assumptions, remove unnecessary functionality, and adjust priorities. Sometimes the initial proposal is too ambitious. Sometimes it misses an essential capability. A little conversational ping-pong usually helps find the right balance. The distinction between MUST-have and Nice-to-have requirements is especially useful here. It helps identify essential capabilities while keeping optional functionality out of the initial scope.
I also explicitly reference the original requirement IDs in the MVP document. For example, an MVP feature might reference REQ-001 and REQ-002, making it immediately clear which product requirements it addresses. This prevents the MVP from becoming an independent feature wishlist. Instead, it represents a deliberate selection of requirements that together provide a useful first version of the product. It also establishes traceability that agents can use later to understand why a feature exists and how it relates to the overall product goals.
At this point, I want a reasonably clear answer to one question:
What exactly are we going to build first, and what are we intentionally leaving out?
Only after answering that question do I move toward architecture.
5. Establish a High-Level Architecture
Next, I ask an AI agent to propose a high-level architecture based on the existing product documentation and the agreed MVP.
The result is documented in:
4-architecture.md
I deliberately focus on a coarse-grained architecture rather than attempting to design every class, function, or module in advance. The document should describe the important structural decisions, such as:
- Major components and their responsibilities
- General application architecture
- Key module boundaries
- External integrations
- Database systems and persistence
- Relevant infrastructure considerations
- Important technical constraints
The purpose is to establish a shared technical direction before implementation begins. As with the previous documents, I review the proposal and work through the important decisions with the agent. This is especially valuable because architectural mistakes can become expensive once several agents start implementing features independently. I want a stable enough foundation to support development, but I don’t want to overengineer a product that hasn’t even reached its first working version.
The architecture should guide implementation, not attempt to predict every detail of it.
6. Build the Foundation Sequentially
Once the MVP and architecture have been reviewed, I move into implementation. Instead of immediately launching multiple agents to build different parts of the application, I start with the first relevant topic from the MVP. I ask an agent to select the next logical piece of work and implement it according to the existing documentation. During this initial phase, I prefer sequential development. The reason is simple: early implementation work often establishes patterns that everything else will build upon.
Project structure, shared abstractions, database access, error handling, testing conventions, and integration patterns are all easier to establish consistently when they aren’t being independently invented by several agents at the same time. That doesn’t mean the foundation needs to be completed in isolation from actual product functionality. Ideally, the foundation emerges while implementing the first meaningful vertical slices of the MVP. I want to reach a point where the project has enough structure and established conventions for other agents to extend it safely.
During development, I ask the agent to record implementation decisions in:
5-implementation-notes.md
This provides a record of decisions that weren’t fully specified in the architecture document. For example, an agent might need to choose a particular library, establish an internal pattern, or make a technical trade-off. Not every minor coding decision needs to be documented. The focus is on decisions that might matter to future development or explain why something was implemented in a particular way. This is particularly useful when another agent takes over later. Instead of having to infer every previous decision from the codebase, it can refer to the implementation notes.
7. Verify the Implementation Through Tests
Testing is a first-class part of the workflow.
I ask the agent to verify the implementation and document the results in:
6-test-report.md
The purpose isn’t simply to claim that tests exist.
I want visibility into what has actually been verified. Depending on the project, this can include unit tests, integration tests, end-to-end tests, and other relevant quality checks.
The report should make clear which tests were executed, whether they passed, what functionality they cover. The requirement identifiers introduced earlier become particularly valuable at this stage. By referencing the relevant requirement IDs in test reports, I can trace implemented functionality back to its original specification and see which requirements are covered by tests. Ideally, this creates a chain of traceability: Requirement → MVP Feature → Implementation → Test → Pull Request
This also helps distinguish between tests merely existing and tests actually validating the intended functionality. A large number of passing tests doesn’t necessarily mean the product behaves correctly. What matters is whether the tests verify that the implementation fulfills the requirements.
8. Transition to Parallel Feature Development
Once the foundation is stable enough, I change the development strategy.
Instead of implementing everything sequentially, I want to take advantage of multiple AI agents working in parallel.
The idea is to assign separate, reasonably independent features to different agents, each working in its own Git branch.
For example:
main
├── feature/authentication
├── feature/dashboard
└── feature/notifications
Each agent receives the relevant project context, a clearly defined task, and references to the requirements that the feature is supposed to fulfill. It implements the feature end-to-end, including the necessary application logic, integration, and tests. I prefer this vertical approach that spans technical layers such as frontend, backend, and database.
An agent responsible for an entire feature has a clearer functional goal and can verify that the pieces work together. Of course, parallelization introduces new challenges. Multiple agents might modify shared files, introduce incompatible assumptions, or independently invent patterns that should be consistent across the application.
That’s why I don’t want to parallelize too early.
The foundation and architecture should provide enough common structure to minimize overlapping work. And features need to be selected with their dependencies in mind.
Parallel development is most effective when the agents can work independently without constantly stepping on each other’s changes.
9. Review Every Feature Before Merging
Every completed feature should result in a pull request. I don’t want code generated by an implementation agent to go directly into the main branch without an independent review. My intended process has two review stages.
A separate review agent examines the pull request. Its job is to look for problems such as:
- Incorrect or incomplete implementation of requirements
- Architectural inconsistencies
- Unnecessary complexity
- Security or reliability concerns
- Missing tests
- Regressions or unintended changes
The requirement references also play an important role here. The review agent can compare the implementation directly against the original requirements and MVP scope instead of evaluating the code in isolation. It can verify whether the referenced requirements have been addressed, whether the expected behavior is covered by tests, and whether the implementation introduces functionality outside the agreed scope. Code can be clean and technically correct while still implementing the wrong behavior. A dedicated review agent adds an independent perspective, even though it isn’t a full substitute for human judgment.
After the automated review, I do a higher-level review myself. I don’t necessarily need to inspect every line of code in detail. Instead, I focus on whether the feature delivers the intended behavior, whether the implementation makes sense within the overall product, and whether there are any important concerns the AI review may have missed.
Once the pull request passes the relevant checks and reviews, it can be merged into the main branch. The next feature can then build on the updated foundation.
10. Keep the Process Lightweight
One of the most important goals of this workflow is to avoid replacing the complexity of software development with the complexity of managing AI agents. I don’t want dozens of mandatory documents, elaborate approval hierarchies, or a separate planning ceremony for every small change. The initial documentation provides shared context. The prioritized requirements define what’s essential and what’s optional. The MVP defines the intended scope. The architecture provides technical direction. Implementation notes capture relevant decisions. Tests and reviews provide verification.
And requirement references connect these elements, allowing both humans and agents to trace functionality from its original purpose to its implementation. Everything else should remain as simple as possible. As projects grow and more agents work in parallel, some refinements might become useful. For example, implementation notes and test reports could become feature-specific rather than having every agent edit the same shared Markdown files. But I would introduce such changes when necessary rather than making them mandatory from day one.
The same applies to specifications themselves.
They should be living documents, not immutable contracts. When implementation reveals new information, I want to be able to update the relevant documentation deliberately and transparently.
11. Human Decisions, AI Execution
The underlying philosophy is straightforward.
I want to use AI agents to accelerate the parts of software development they are good at, while keeping the most important decisions under human control. AI can help research a domain, explore possible solutions, structure requirements, propose architectures, implement features, write tests, and review pull requests.
But deciding what the product should accomplish, which trade-offs are acceptable, and when something is good enough still requires judgment. This is particularly important in customer projects, where product priorities and scope need to reflect the customer’s actual goals rather than an agent’s assumptions. For me, Spec-Driven Development isn’t about writing exhaustive specifications before allowing anyone to touch the code. It’s about providing enough shared context to make AI-assisted development predictable, coherent, and reviewable. And it’s about ensuring that increased implementation speed doesn’t come at the expense of product direction or maintainability.
Let humans define the direction, let AI agents accelerate the execution, and use specifications, tests, and reviews to keep the two aligned.
The real benefit of AI-assisted software development isn’t just writing code faster.
It’s being able to move from an idea to working software more efficiently, without losing control over what you’re actually building.
12. Conclusion
And the MVP is only the beginning. Once the first version delivers value, I can repeat the same steps to incrementally extend the product: revisit and refine requirements, prioritize the next set of features, adjust the scope, evolve the architecture where necessary, and let agents implement, test, and review the next increment. Each iteration builds on a working product rather than starting from scratch. This creates a continuous cycle of delivering value, learning from feedback, and improving the product until it gradually reaches its broader vision. Instead of treating the final product as one large delivery, the goal is to deliver meaningful value in every iteration.

Comments
Post a Comment