Skip to content
ISSUE #35 Jan 31, 2026 10 MIN READ

The 3-Phase Method for Bulletproof Specs When You’re Not Starting From Scratch

Imagine this.

You hire a contractor to “update the bathroom.” You wave your hand vaguely at the space, mention something about “modern vibes,” and leave for work.

You come home to discover they’ve ripped out your vintage clawfoot tub—the one you specifically loved—and replaced it with a walk-in shower. They’ve chosen gray tiles. (Gray! When you’re clearly a warm terracotta person.) And oh, they’ve moved the toilet to a spot that now requires you to shimmy sideways to close the door.

“But you said you wanted it updated,” they say, genuinely confused.

Here’s the thing: they weren’t wrong. You did say that.

You just forgot to mention all the things living rent-free in your head—the constraints, the preferences, the “obviously don’t touch THAT” items you assumed were, well, obvious.

This is exactly what happens when you ask Claude Code to add a feature to your existing app.

.

.

.

The “Just Add This Feature” Trap

You’ve got a working application.

It’s not perfect, but it works. Now you want to add something—a new feature, a refactor, maybe squash a bug that’s been giving you side-eye for weeks.

So you fire up Claude Code and describe what you want in two or three sentences.

Claude gets to work. Files change. Functions appear. Code flows.

And then—record scratch—you realize it completely missed the point.

Not because Claude is bad at its job. But because you gave it the software equivalent of “update the bathroom.”

Your codebase has history.

Conventions. Edge cases you’ve already wrestled to the ground. Payment integrations that absolutely, positively cannot break (ferpetesake, the payments!). Claude needs to understand ALL of this before writing a single line of code.

This is where Claude Code spec-driven development comes in.

And honestly?

It’s transformed how I approach every feature request.

.

.

.

Why Spec-Driven Development Changes Everything

Here’s what most people do: describe the feature → let Claude code → discover problems → fix problems → discover MORE problems → question life choices.

Here’s what works: describe the feature → trigger clarifying questions → answer EVERY question → generate comprehensive specs → review specs → THEN code.

Infographic comparing two approaches to adding a feature like "WooCommerce". The top section, titled "THE WRONG WAY (aka "YOLO Mode")" in dark navy, shows a linear flowchart: "Add WooCommerce" leads to "Claude codes", which results in "Problems 🧠" (brain emoji) with a red cross icon. This is followed by a "Fix 🔧" (wrench emoji) step, then "MORE problems 🧠" with another red cross, another "Fix 🔧", and then "EVEN MORE" leading to "Question life 😖" (distressed emoji) with a final red cross. Below the flowchart, a safety orange pill-shaped callout with a red cross icon states "Time: ??? | Mass Confusion: YES". The bottom section, titled "THE RIGHT WAY (Spec-Driven Development)" in dark navy, shows a cyclical flowchart: "Add WooCommerce" leads to a loop of "Claude explores codebase 🦭" (seal emoji) -> "You answer questions ⌨️" (keyboard emoji) -> "Claude asks more 👀" (eyes emoji), with a note "(repeat until 95%)". This loop leads to a prominent box with a green checkmark icon: "Comprehensive Specs Generated 📄✅" (document emoji), which then leads to "THEN code ✅" (green checkmark). Below the flowchart, a dark navy pill-shaped callout with a green checkmark icon states "Time: Predictable | Surprises: Minimal". The background is a soft off-white, and clean lines and icons are used throughout.

The difference isn’t just efficiency (though yes, that too).

👉 The real magic is that Claude surfaces edge cases YOU haven’t thought about.

All those assumptions living in your head? Claude will ask about them. All those “obviously we’d handle it THIS way” decisions? Claude will make you choose explicitly.

It’s like having a brilliant—if occasionally pedantic—architect who refuses to pick up a hammer until every single detail is documented.

Let me show you exactly how this works.

.

.

.

The 3-Phase Method for Claude Code Spec-Driven Development

I’ve been refining this workflow for weeks, and it breaks down into three distinct phases.

(Stay with me—I promise this is more exciting than it sounds. Okay, maybe “exciting” is strong. But genuinely useful? HECK YES.)

Infographic titled "THE 3-PHASE METHOD AT A GLANCE" in dark navy text. It illustrates a three-phase process with a clean flowchart design.

Phase 1 is titled "PHASE 1: BUILD 🏗️" with a construction crane emoji. It consists of three vertical steps in dark navy-outlined boxes with light gray fills: "Describe task 📝 + Trigger Q&A 🗣️" (with a pencil and megaphone emoji), "Answer ALL questions 🧠" (with a brain emoji), and "Specs created 📜" (with a scroll emoji). An arrow points from the bottom of Phase 1 to the top of Phase 2.

Phase 2 is titled "PHASE 2: REVIEW 🔍" with a magnifying glass emoji. It also has two vertical steps: "Fresh session 🔄 + Find problems 🕵️" (with a refresh icon and detective emoji), and "Prioritized issue list 📋" (with a clipboard emoji). An arrow points from the bottom of Phase 2 to the top of Phase 3.

Phase 3 is titled "PHASE 3: REFINE ✨" with a sparkle emoji. It has two vertical steps: "Fix critical issues 🔧 + More Q&A 🗣️" (with a wrench and megaphone emoji), and "Updated specs 🔄📜" (with a refresh icon and scroll emoji).

Below Phase 3, a large orange diamond-shaped box asks "Satisfied? 🤔" (with a thinking face emoji). A red arrow with a cross icon points from "Satisfied?" to a pill-shaped box on the left that says "Back to Phase 2" with a navy outline and gray fill, pointing back to Phase 2. A green arrow with a checkmark icon points from "Satisfied?" to a pill-shaped box on the right that says "Ready to implement! 🚀" (with a rocket emoji) and has a green outline and white fill, indicating the final step. All arrows and main text are in dark navy, with specific color accents for decision points.

.

.

.

Phase 1: Build Your Specs

This is where you go from “vague idea in your head” to “comprehensive document that leaves nothing to chance.”

Step 1: Describe the Task + Trigger the Magic Words

Here’s the prompt structure that makes everything work:

[Describe your task/feature in detail]

Based on the tasks above, write the specs at @notes/specs.md.

Use ASCII diagrams where necessary to illustrate the UI/UX.

Use the AskUserQuestion tool to Ask me clarifying questions until you are 95% confident you can complete this task successfully. For each question, add your recommendation (with reason why) below the options. This would help me in making a better decision.

That last paragraph? That’s the secret sauce.

“Ask me clarifying questions until you are 95% confident” tells Claude not to make assumptions. Not to guess. Not to fill in blanks with whatever seems reasonable.

Instead, Claude will ASK.

Claude Code terminal showing the initial prompt describing WooCommerce integration requirements and the instruction to use AskUserQuestion tool for clarifying questions until 95% confidence
The initial prompt triggering Claude’s question-asking mode

Step 2: Let Claude Explore First

Here’s something beautiful: Claude doesn’t immediately pepper you with questions.

First, it explores your codebase. It reads your existing implementation. It studies your patterns, your database schema, your webhook handlers.

In my WooCommerce integration project, Claude spent about 2 minutes analyzing the existing Stripe integration—36 tool uses, 97.5k tokens of context-gathering—before asking its first question.

Then the questions began:

Claude Code showing it explored the Stripe integration and now asks about WooCommerce Subscriptions plugin vs custom subscription handling, with three options and a recommendation
Claude explores codebase first, then asks its first clarifying question about subscription handling approach

Notice what’s happening here (and this is the part that made me unreasonably happy):

  • Claude presents clear options—not vague open-ended questions
  • Each option includes an explanation of implications
  • Claude adds its own recommendation with reasoning
  • You can select an option OR type something custom

That recommendation is EVERYTHING. You’re not making decisions in a vacuum. You’re evaluating Claude’s expert analysis against your own context.

Step 3: Keep Answering Until Claude Hits 95%

After your first answer, Claude asks another question. Then another.

Claude Code asking how recurring payments should be handled in WooCommerce mode, with options for WP Cron, manual invoices, or payment gateway handling
Second question about renewal payment flows with three implementation options

Each question builds on your previous answers. Claude’s understanding deepens with every response.

Claude Code asking about checkout experience in WooCommerce mode, with options for standard WooCommerce checkout, custom checkout with WC backend, or hybrid approach
Third question about checkout UX with three different approaches

“But wait,” you might be thinking. “Isn’t this just Plan Mode with extra steps?”

Ah. Good question. (I asked it too.)

Plan Mode asks one batch of questions, then starts planning.

This approach keeps questioning until Claude reaches genuine confidence. If something’s unclear—or conflicts with an earlier answer—Claude asks follow-up questions. It’s more thorough. Sometimes annoyingly so. But annoyingly thorough beats catastrophically incomplete every time.

Step 4: Review the Complete Q&A

By the end of my WooCommerce project, Claude had asked 15 different questions covering:

  • Subscription plugin choice
  • Renewal flow mechanics
  • Checkout experience
  • Payment mode switching
  • Migration strategy
  • Product mapping
  • Refund handling
  • Member portal UI
  • Day pass handling
  • Coupon systems
  • Settings location
  • Email notifications
Claude Code showing the first half of all Q&A interactions, including questions about subscription handling, renewals, checkout, payment modes, migration, and product mapping
First half of the complete Q&A session—eight questions answered
Claude Code showing the second half of Q&A interactions plus a summary of all 15 requirements gathered from the conversation
Second half of Q&A plus the requirements summary Claude compiled

Every edge case I hadn’t considered? Surfaced as a question.

Every architectural decision that could bite me later? Addressed before a single line of code.

👉 This is the core of Claude Code spec-driven development: front-loading decisions instead of discovering them mid-implementation.

Step 5: Watch Your Specs Materialize

Once Claude hit 95% confidence, it summarized everything and started writing:

Claude Code displaying the summary of all 15 requirements gathered, including subscription handling, renewal flow, checkout, mode switch, migration, and more
Claude’s confidence summary showing 15 requirements before writing specs

The result? A 2,068-line specification document with:

  • Architecture decisions (documented!)
  • Database schema changes (planned!)
  • State machines for subscriptions (visualized!)
  • ASCII diagrams for UI mockups (actually helpful!)
  • Detailed flow documentation (comprehensive!)
  • Edge case handling (the stuff that usually bites you)
Claude Code showing the created specs.md file with 2068 lines, including specification summary, key architecture decisions, and a table of major sections
Specs created—2068 lines covering architecture, checkout flow, renewals, and more
Claude Code showing more details of the specs including major sections table and list of ASCII diagrams included
Specs include ASCII diagrams for architecture, checkout flow, state machines, and UI mockups

Two thousand lines might sound excessive. It’s not. It’s every decision you’d otherwise make on the fly—except now they’re documented, reviewable, and consistent.

Bonus Step: Split Large Specs

Quick practical note: if your specs exceed ~1,500 lines, split them.

Claude’s file reading has a 25k token limit. Large files cause problems during implementation. The fix is simple:

This specs file is too big. Please split it into 3 parts. 
Keep the original file as the index file that links to the 3 parts.
Claude Code terminal showing user request to split specs into 3 parts with original file as index
Asking Claude to split the large specs file into manageable parts

Claude reorganizes everything into digestible chunks:

Claude Code showing the split result: specs.md as index (~130 lines) linking to three parts covering architecture, flows, and features
Result—four files total with specs.md as navigation hub linking to three focused documents

Now you have:

  • specs.md — Index file (~130 lines)
  • specs-part1-architecture.md — Sections 1-5 (~490 lines)
  • specs-part2-flows.md — Sections 6-10 (~470 lines)
  • specs-part3-features.md — Sections 11-20 (~530 lines)

Each part fits comfortably within context limits.

Crisis averted.

.

.

.

Phase 2: Review Your Specs

Here’s where most people stop.

(Don’t be most people.)

Your specs might be comprehensive, but they could still contain conflicts, gaps, or requirements that are—how do I put this diplomatically—completely impossible to implement.

Step 6: Start Fresh and Ask Claude to Critique

Start a new session. Fresh context. Then ask Claude to review its own work with skeptical eyes:

Read the `notes/specs.md`, analyze the codebase and tell me what could be 
the potential problems with this specs. 

Let's look at it from different angles and try to consider every edge cases.

Use ASCII diagrams to illustrate if needed. Don't edit anything yet. 
Let's focus on analysis.
Claude Code terminal showing the review prompt asking Claude to analyze specs for potential problems and edge cases
The review prompt—fresh session, analysis-only mode

That last line—”Don’t edit anything yet”—is important. You want analysis first. Changes second. Mixing them leads to chaos.

Step 7: Receive Your Brutally Honest Analysis

Claude reads the specs, re-explores your codebase, and delivers feedback that might sting a little:

Claude Code showing analysis results with first identified problem about data synchronization and dual source of truth conflicts, with ASCII diagram
Claude identifies Problem #1—dual source of truth conflicts during mode transitions

The analysis includes ASCII diagrams showing exactly where problems would occur:

Claude Code showing payment token lifecycle issues with ASCII diagram illustrating three scenarios: card expiration, token deletion, and gateway changes
Problem #2—payment token lifecycle gaps with three failure scenarios illustrated

In my project, Claude found 14 potential issues, organized by severity:

Claude Code showing summary table of critical issues to address, organized by priority from P0-Critical to P3-Low with issue descriptions and impacts
The full prioritized issue list—P0 Critical down to P3 Lo

P0 – Critical (the “oh no” tier):

  • Race condition in renewal processing → Double charges 😱
  • Token deletion not detected → Failed renewals
  • Mode switch with active Stripe subs → Billing confusion

P1 – High (the “definitely fix this” tier):

  • Proration + coupon calculation undefined → Financial errors
  • Guest checkout for subscriptions → Broken flow
  • 3D Secure on unattended renewals → Payment failures

Would I have caught all these myself?

Honestly? Maybe half. And probably not until they caused real problems with real users and real money.

👉 Having Claude review its own specs is like getting a code review before the code exists.

.

.

.

Phase 3: Refine Your Specs

Now you have a prioritized list of issues. Time to fix them—but not by guessing.

Step 8: Address Issues With Another Round of Questions

Ask Claude to fix the critical issues, but trigger the questioning mode AGAIN:

Let's address all the P0 and P1 issues.

Update the specs file.

Use the AskUserQuestion tool to Ask me clarifying questions until you are 95% confident you can complete this task successfully. For each question, add your recommendation (with reason why) below the options.
Claude Code terminal showing request to address all P0 and P1 issues with AskUserQuestion tool enabled
Requesting fixes for critical and high-priority issues with question-asking enabled

Fixing these issues requires MORE decisions. Should you block mode switches entirely? Allow mixed modes temporarily? Auto-cancel subscriptions?

Claude asks:

Claude Code asking what should happen during mode switch with active Stripe subscriptions, with three options: block switch, auto-cancel, or allow mixed mode
Question about mode switch behavior—block, auto-cancel, or allow mixed mode
Claude Code asking how proration and coupon calculation should work during plan upgrades, with three options for handling discounts
Question about proration and coupon math during plan changes

Each answer shapes the solution. After this round, Claude updates the specs with concrete, specific fixes:

Claude Code showing summary of spec updates with P0 and P1 issues fixed, including solutions for renewal race condition, token deletion, mode switch, proration, guest checkout, and 3D Secure
All P0 and P1 issues addressed with specific solutions and file locations

P0 Fixes:

  • Renewal Race Condition → Database row locking with SELECT FOR UPDATE
  • Token Deletion → Pre-renewal validation 7 and 3 days before renewal
  • Mode Switch Danger → Block switching if ANY active Stripe subscriptions exist

P1 Fixes:

  • Proration + Coupon → Calculate from actual paid amounts, keep coupon on upgraded plan
  • Guest Checkout → Force account creation for subscription products
  • 3D Secure → Request off-session exemption, fallback to email payment link

You can repeat Phase 2 and Phase 3 as many times as needed. Review, refine, review, refine—until you’re genuinely confident in your specs.

Infographic titled "THE REVIEW-REFINE CYCLE (Repeat as Needed)" showing a flowchart. The process begins with a box labeled "PHASE 2: REVIEW 🔍" with the text "Find all problems". An arrow points down to a diamond-shaped decision box that asks "Issues Found? 🤔". Two arrows emerge from this decision box. The left arrow, labeled "YES ❌", points to a box labeled "PHASE 3: REFINE 🔧" with the text "Fix issues with Q&A". An arrow from this "PHASE 3" box loops back up to the top, pointing to the "PHASE 2: REVIEW" box, with the text "(back to review)" next to the loop. The right arrow from the decision box, labeled "NO ✅", points to a final orange box labeled "DONE! 🚀" with the text "Specs are bulletproof. Ready for implementation.". The flowchart demonstrates an iterative cycle of reviewing and refining until a final, approved state is reached.

.

.

.

The Method, Summarized

Because I know you’re going to want to reference this later:

Phase 1: Build Specs

  1. Describe what you want + add the AskUserQuestion trigger
  2. Let Claude explore your codebase first
  3. Answer every clarifying question
  4. Review the generated specs
  5. Split large specs into parts (if needed)

Phase 2: Review Specs 6. Start a new session 7. Ask Claude to find problems (analysis only—no edits)

Phase 3: Refine Specs 8. Fix critical issues with another round of questions 9. Repeat Phases 2-3 until satisfied

YOU decide when specs are ready.

Not Claude.

You.

.

.

.

What About Implementation?

Ah. Yes.

You have these beautiful, bulletproof specs. Now what?

You could tell Claude to implement everything in one go. But for specs this comprehensive, that approach has problems:

  • Claude might skip features (context limits are real)
  • Long implementations drift from the plan
  • Details get forgotten mid-stream

The solution?

Claude Code’s task management system—which breaks large specs into trackable tasks, maintains progress across sessions, and ensures nothing slips through the cracks.

That’s next week’s issue.

(Consider this a cliffhanger. I regret nothing.)

Nathan Onn

Freelance web developer. Since 2012 he’s built WordPress plugins, internal tools, and AI-powered apps. He writes The Art of Vibe Coding, a practical newsletter that helps indie builders ship faster with AI—calmly.

Join the Conversation

Leave a Comment

Your email address will not be published. Required fields are marked with an asterisk (*).

Enjoyed this post? Get similar insights weekly.