# Spec-Driven Development Starts With the Customer > Spec-driven development lets coding agents build from a written spec. Here is the layer most specs skip, the customer evidence, and how to add it. --- [Skip to main content](#main-content)Opinion # Spec-Driven Development Starts With the Customer Spec-driven development lets coding agents build from a written spec. Here is the layer most specs skip, the customer evidence, and how to add it. **Matej Stefanik**Dec 1, 2026 · 5 min read [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fclosedloop.sh%2Fblog%2Fspec-driven-development)Copy link On this page - [What spec-driven development is](#what-spec-driven-development-is) - [The four layers of a spec](#the-four-layers-of-a-spec) - [How to add the evidence layer](#how-to-add-the-evidence-layer) - [Spec-driven development pitfalls](#spec-driven-development-pitfalls) - [Where ClosedLoop AI fits](#where-closedloop-ai-fits) [AI Coding](https://closedloop.sh/tag/AI+coding)[Product Builders](https://closedloop.sh/tag/product+builders)[Customer Conversations](https://closedloop.sh/tag/customer+conversations)Key takeaways - Spec-driven development means writing a structured specification first and letting a coding agent build and check its work against it - A good spec has four layers, evidence, requirements, design and tasks, and most spec-driven workflows start at the second - Without the evidence layer, an agent builds the wrong thing precisely, quickly and with passing tests - Add the customer's words, who is affected and the outcome to every spec, and both the agent and the reviewer can check the change against the need Spec-driven development has become one of the most discussed ideas in AI-assisted software, and it deserves the attention. The premise is simple: before a coding agent writes anything, someone writes a structured specification of what should be built. The agent builds against the spec, checks its own work against the spec, and the spec lives next to the code as the source of truth. It is worth remembering what a spec cannot do on its own. In September 1999, NASA lost the Mars Climate Orbiter as it arrived at Mars. The interface specification called for thruster data in metric units. One team's software produced it in imperial units anyway, another team's software read the numbers as metric, and the small navigation discrepancies this caused during the cruise were noticed but never resolved. The spacecraft flew too low into the Martian atmosphere and was never heard from again. The specification was precise. What failed was the connection between the document, the software and the reality it was meant to describe. Coding agents make that lesson more urgent. An agent follows a spec more faithfully than any human team ever did, which means a precise spec for the wrong problem now ships faster than ever. ## What spec-driven development is In **spec-driven development**, the specification is the primary artifact and the code is generated from it. A typical flow looks like this: - Write the spec: what the change must do, how it fits the system, how to verify it. - Break the spec into tasks the agent can take one at a time. - Let the agent implement each task and test it against the spec. - Review the result against the spec as well as the code. - Keep the spec versioned with the code, and update it when the behavior changes. It works because agents are excellent at following explicit instructions and poor at guessing intent. A spec turns intent into instructions. ## The four layers of a spec Layer Answers Example Evidence Why build this, and for whom? "Month-end export takes us a whole day" (14 finance customers, with quotes and links) Requirements What must it do? Exports MUST run in the background; MUST NOT change the CSV format Design How does it fit the system? A job queue, a progress endpoint, an email on completion Tasks What are the steps? Add the job, add the endpoint, add the email, add the tests Most spec-driven workflows start at the requirements layer. The evidence is assumed, or lives in someone's head, or in a ticket that says "customers want faster exports". That is the layer an agent cannot recover on its own, and the one a reviewer needs most when deciding whether a perfectly tested change was the right change. A spec without evidence "Add bulk export" Requirements guessed from the ticket title Tests prove the code matches the spec Nobody can say whether customers got what they needed A spec that starts with the customer "Month-end export takes finance teams a whole day" Requirements derived from what 14 customers described Tests prove the code matches the spec The reviewer checks the change against the customers' words ## How to add the evidence layer - **Quote the customer.**Two or three sentences in their own words, with links to the calls or tickets they came from. - **Say who is affected.**How many customers, which segment, and the revenue behind them. - **Name the outcome.**The metric this should move and the target, so success means more than "merged". - **Include real examples.**An anonymized slice of the data your customers have catches edge cases no invented example will. - **List what nobody asked for.**Agents love to add features. A line that says "customers did not ask for XLSX" keeps the change small. Most of this belongs in the PRD that feeds the spec; our guide to [writing a PRD your coding agent can build from](https://closedloop.sh/blog/how-to-write-a-prd)covers the format, including the requirement words that remove guessing. ## Spec-driven development pitfalls - **Specs that drift from the code.**A spec nobody updates becomes fiction. Change the spec in the same pull request as the behavior. - **Specs that are too big.**A spec for a quarter of work is a waterfall plan with a new name. Keep each spec small enough to ship in days. - **Specs with no feedback after release.**The spec said what should happen. Check what happened with the customers who asked. - **Specs written from memory.**The most common failure, and the one this whole post is about. Speed without context is the theme of our earlier piece on [Cursor and the right thing to build](https://closedloop.sh/blog/cursor-ai-coding-speed-without-product-context), and it is where AI agents for product managers earn their keep. ## Where ClosedLoop AI fits ClosedLoop AI supplies the layer most specs skip. It reads the calls, tickets and chats behind each problem, then drafts the business case, PRD and technical spec from that evidence, quotes and revenue included, for you to tighten and approve. Through [MCP](https://closedloop.sh/mcp-server), the same evidence reaches Claude Code or Cursor while the agent works, so it can look up which customers hit the problem and what they said, instead of guessing from a ticket title. The spec stays precise, and now it stays connected to reality. [See ClosedLoop AI inside your coding agent](https://closedloop.sh/mcp-server)or [book a demo](https://closedloop.sh/demo). Matej Stefanik CPO and co-founder of ClosedLoop AI. 20 years building and bringing products to market, from development and management to marketing. [More about ClosedLoop AI →](https://closedloop.sh/) ### Get insights like this in your inbox Product insights delivered weekly. No spam. Unsubscribe anytime. Leave this field blank Subscribe Related ## More you might find useful [Opinion Nov 24, 2026 ### Continuous Discovery When Everyone Ships Daily Continuous discovery habits for teams that ship every day: a weekly rhythm, what to read, how to keep the opportunity tree current, and wher… 5 min read →](https://closedloop.sh/blog/continuous-discovery)[Guide Nov 19, 2026 ### How to Write a PRD Your Coding Agent Can Build From (Template) How to write a PRD a coding agent can build from: the sections that matter, requirement words that remove guessing, and a PRD template you c… 5 min read →](https://closedloop.sh/blog/how-to-write-a-prd)[Opinion Oct 29, 2026 ### Product Engineer vs Product Manager vs Product Builder: Who Owns the Outcome? What a product engineer does, how the role differs from a product manager, and why both are merging into the product builder, who owns one m… 11 min read →](https://closedloop.sh/blog/product-engineer-vs-product-manager-vs-product-builder)[Browse all articles →](https://closedloop.sh/blog) --- ## More Information - Website: https://closedloop.sh - Documentation: /docs - Pricing: https://closedloop.sh/pricing - Contact: https://closedloop.sh/contact