<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Riley</title>
    <description>The latest articles on DEV Community by Riley (@rillus).</description>
    <link>https://dev.to/rillus</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F429895%2Fe154eeb1-bde6-4cbd-ac5d-2203666ab2bb.jpeg</url>
      <title>DEV Community: Riley</title>
      <link>https://dev.to/rillus</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rillus"/>
    <language>en</language>
    <item>
      <title>AI Specification Driven Development</title>
      <dc:creator>Riley</dc:creator>
      <pubDate>Wed, 26 Nov 2025 02:02:12 +0000</pubDate>
      <link>https://dev.to/rillus/ai-specification-driven-development-4n93</link>
      <guid>https://dev.to/rillus/ai-specification-driven-development-4n93</guid>
      <description>&lt;p&gt;Back in October I stood in front of a room of engineers at John Lewis' head office and delivered my presentation on Specification Driven Development. After the talk, lots of people still had questions, so I promised I would share the full playbook. This is that write-up: the hands-on guide to &lt;em&gt;AI Specification Driven Development&lt;/em&gt; (SDD) that I lean on every day.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why move beyond vibe coding?
&lt;/h2&gt;

&lt;p&gt;I adore the thrill of tossing a single line at Claude and watching a prototype appear. You probably do too. But once the project grows beyond a weekend hack, vibe coding fights back:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Natural language is powerful&lt;/strong&gt; yet quickly tilts into ambiguity when there are multiple contributors (or Future You revisiting the repo six months later).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context drifts fast&lt;/strong&gt; because AI assistants forget or get confused, or you start working on the next problem in the current chat, or start a new chat without providing the story so far.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bugs compound&lt;/strong&gt; when there is no shared definition of done.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Future iterations stall&lt;/strong&gt; without a durable artefact to brief the next change.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;SDD fixes that by keeping the spec front and centre, with AI acting as a focused co-pilot rather than an excitable gremlin.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Anchor the work in a PRD
&lt;/h2&gt;

&lt;p&gt;Everything starts with a lightweight Product Requirements Document (PRD). Mine capture the &lt;strong&gt;why&lt;/strong&gt; and the &lt;strong&gt;what&lt;/strong&gt; in plain Markdown:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Overview and metadata (owner, status, links)&lt;/li&gt;
&lt;li&gt;Goals, success metrics, and guardrails&lt;/li&gt;
&lt;li&gt;Target audience and user stories&lt;/li&gt;
&lt;li&gt;Functional scope, non-goals, and dependencies&lt;/li&gt;
&lt;li&gt;Design notes and constraints&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Kick it off yourself or let the assistant draft a first pass:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Create a PRD for a Scrabble scorekeeper web app. Players enter their words, tag double/triple letter or word scores, and the app tracks scores for up to four players."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpyuudjhwq0o6d3s2fs2x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpyuudjhwq0o6d3s2fs2x.png" alt="Slide introducing the PRD as a single source of truth" width="800" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Revisit the PRD whenever you feel the work wobble. It is the north star and it lives beside the code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Embrace the five core principles
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Own it&lt;/strong&gt; - AI augments; it does not absolve. You are accountable for the quality.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review it&lt;/strong&gt; - Treat outputs as a junior engineer's draft. Challenge assumptions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validate it&lt;/strong&gt; - Write tests, run tests, do the quick manual poke.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Slice it&lt;/strong&gt; - Smaller tasks mean clearer prompts and fewer hallucinations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaborate on it&lt;/strong&gt; - Pairing, async reviews, and show-and-tell keep the team in sync.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Slip on any of these and you drift straight back to vibe town.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Warm up your model with rules
&lt;/h2&gt;

&lt;p&gt;LLMs behave best when steeped in your team's culture. I store house rules right in the assistant configuration so every session starts on the same footing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Coding standards and architectural preferences (TypeScript strict mode, commit pattern, lint rules)&lt;/li&gt;
&lt;li&gt;Tooling expectations ("Use TDD by default", "Prefer absolute paths", naming conventions)&lt;/li&gt;
&lt;li&gt;Domain vocabulary and clarifications (acronyms, disambiguation of terms, accessibility commitments)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even better, update these rule files after every significant project. Claude Code, Cursor, whatever you use - they all improve when you train them with your context.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn9agnbfckkzqswzul1tw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn9agnbfckkzqswzul1tw.png" alt="Slide summarising the Big PLP Copilot instructions blind test" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Choose the right workflow
&lt;/h2&gt;

&lt;h3&gt;
  
  
  New project workflow
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Draft the PRD.&lt;/li&gt;
&lt;li&gt;Identify features or components at a high level.&lt;/li&gt;
&lt;li&gt;Break them into phased, shippable tasks.&lt;/li&gt;
&lt;li&gt;Generate code plus tests for each slice.&lt;/li&gt;
&lt;li&gt;Review, iterate, ship, celebrate.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fehjyy9uo0zmxhqjvqr9d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fehjyy9uo0zmxhqjvqr9d.png" alt="Slide showing the workflow for new projects" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Existing project workflow
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Gather requirements from tickets, conversations, analytics, or even disgruntled Slack threads.&lt;/li&gt;
&lt;li&gt;Compose a contextual prompt that joins those requirements with the relevant code paths.&lt;/li&gt;
&lt;li&gt;Generate a Markdown specification with user stories, requirements, and Gherkin acceptance criteria.&lt;/li&gt;
&lt;li&gt;Break the work into deployable tasks (auto-tasking) whenever it exceeds a day, touches more than five files, or feels like greater than a 3 on the Fibonacci scale.&lt;/li&gt;
&lt;li&gt;Generate code and tests task by task, keeping feedback loops tight.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi764b8ifvsf1v035ychy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi764b8ifvsf1v035ychy.png" alt="Slide illustrating the workflow for adding features to existing projects" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every stage whispers the same mantra: &lt;em&gt;Slice it!&lt;/em&gt; Smaller changes are easier to review, test, and ship.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Craft the contextual prompt
&lt;/h2&gt;

&lt;p&gt;Here is the template I reach for when spinning up a spec:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I'd like you to create a markdown specification in `/documents` named `{{ticket_number}}.md`.
Use it to plan the functionality described in `{{ticket_description}}`.
Explore the existing codebase (especially `src/` and `components/`) to locate the right touchpoints.
Provide user stories, requirements, acceptance criteria in Gherkin, suggested files to modify, and any new files to create.
If the change would take more than a day, touch over five files, or score above 3 on Fibonacci complexity, break it into labelled subtasks that can be shipped independently.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run this once per change, store the output in version control, and treat it as the living brief.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Move from spec to code with discipline
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Ask the assistant to tackle the first task only, referencing the spec.&lt;/li&gt;
&lt;li&gt;Demand tests with every slice; run the suite locally (or in CI) before you nod yes.&lt;/li&gt;
&lt;li&gt;If the output wobbles, revert, refine the spec, and try again - or coach the model with explicit corrections.&lt;/li&gt;
&lt;li&gt;Keep humans in the loop: review diffs, annotate decisions, capture follow-up work.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is where SDD feels like pairing with an eager junior. You direct, it executes, and together you ship faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  Worked example: multiple Scrabble words in one turn
&lt;/h2&gt;

&lt;p&gt;Here is the exact prompt I used when extending the Scrabble app:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Create a spec in &lt;code&gt;/docs&lt;/code&gt; called &lt;code&gt;multiple-words.md&lt;/code&gt; for the feature: when a player adds a word that also creates other words (e.g. DIGS making TRACKS), score all words in that turn. Ensure the solution scales to many incidental words. If the work exceeds a day, touches more than five files, or scores above Fibonacci 3, split it into subtasks."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjkvbewsoj2ryqzcsuqrt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjkvbewsoj2ryqzcsuqrt.png" alt="Slide showing the resulting specification output" width="530" height="650"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The assistant produced user stories, requirements, and Gherkin scenarios, plus a sensible implementation outline. From there I:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Checked the plan against my mental model (and updated it where reality differed).&lt;/li&gt;
&lt;li&gt;Generated code for the first slice.&lt;/li&gt;
&lt;li&gt;Layered on UI tweaks and validation checks, running tests between each slice.&lt;/li&gt;
&lt;li&gt;Updated the spec as decisions shifted so future Riley can follow the breadcrumbs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Troubleshooting and continuous improvement
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Spot hallucinations early&lt;/strong&gt; by requesting smaller diffs and running lint or test suites after every change. Faster feedback, fewer surprises.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep specs evergreen&lt;/strong&gt;. Amend them when the plan pivots; never leave a stale document lurking in the repo.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Share learnings&lt;/strong&gt;. Drop standout prompts, scripts, or pitfalls into your team rule files so everyone levels up together.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;Specification Driven Development is spec-tacular! &lt;/p&gt;

&lt;p&gt;Turns AI from a magic trick into a repeatable method. Give your assistant the right guardrails, own the outputs, and you unlock predictable, maintainable software at pace. Everything is a spec; context is king; and if you experiment with this approach, tell me how it goes so we can compare notes over &lt;del&gt;coffee&lt;/del&gt; a seasonal sugary beverage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkylij95g6u9shlodraeq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkylij95g6u9shlodraeq.png" alt="Thank you" width="514" height="515"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>sdd</category>
      <category>programming</category>
      <category>promptengineering</category>
    </item>
  </channel>
</rss>
