Start now →

AI Coding Tip 008 — Use Spec-Driven Development with AI

By Maximiliano Contieri · Published February 27, 2026 · 4 min read · Source: Level Up Coding
DeFiAI & Crypto
AI Coding Tip 008 — Use Spec-Driven Development with AI

Learn guided by the domain

TL;DR: Use AI to understand requirements and build a shared mental model while you write the code.

Common Mistake ❌

You jump directly to code generation with a vague, wishful prompt.

The AI appears to understand your specific business logic, but it comes across as condescending.

The problem creates a spaghetti mess that is difficult to maintain later.

The AI is not a magic button for lazy people. It is a senior pair programmer and a learning companion.

You follow the Spec-Driven Development trend and work in a Taylorist cascading way, falling into analysis paralysis and unrealistic plans.

Problems Addressed 😔

Hallucinations: The AI guesses details when you don’t provide specific context.

Technical Debt: You build complex systems that collapse under logical errors and don’t simulate the real-world MAPPER.

Context Fragmentation: The AI loses track of your goals in long sessions.

Logic Drift: The code “works”. Yet it doesn’t solve the actual problem.

How to Do It 🛠️

Ask the AI to interview you.

You state the high-level idea and have the AI ask questions to uncover edge cases.

Work together in learning mode. Dave Farley tells us to be experts at learning.

Draft a spec.md file. You and the AI collaborate on a document that defines the architecture, data models, and goals.

Use the Plan Mode.

Keep the AI in a read-only environment to explore your codebase and verify the plan as you execute it.

Plan as you go with the goal in mind without making assumptions about a rigid roadmap.

Always validate the bijection against the real-world requirements.

Turn the live spec into a simple checklist of atomic implementation steps.

The backlog will grow and shrink as you learn the domain. It is a live artifact.

Set up a persistent context while you learn.

Create a .md file to store project rules that the AI cannot guess.

Benefits 🎯

You learn about the domain faster because the AI can serve as an encyclopedic mentor.

You stay proudly accountable for the architecture.

You eliminate boilerplate while maintaining system stability.

You close the Human 30% gap by focusing on system coordination.

Context 🧠

These tools are high-velocity coders, but they are very innocent.

They perform best when you instruct with a clear mission and modular instructions.

This “waterfall in 15 minutes” way favors you and the AI to be on the same page before you trigger the first code diff.

Prompt Reference 📝

Bad Prompt:

Build me a task management app with React and Node.

Create a behavior specification and a Gantt project

Good Prompt:

You are a Senior Software Engineer. I want to build a task app

Ask me 10 clarifying questions about the architecture, security,
and data model.

After I answer, help me draft a spec.md.

Let's build it together with TDD and contract tests.

Considerations ⚠️

AI can write bugs with complete conviction.

You must review every change.

Type 📝

[X] Semi-Automatic

Tags 🏷️

Level 🔋

[X] Intermediate

Related Tips 🔗

Use CLAUDE.md for project memory.

Set up MCP servers for live documentation.

Run parallel agents for large refactors.

Conclusion 🏁

You should invest 15 minutes in planning with the AI instead of rushing. It will save you hours of debugging.

Use the copilot to improve your design with your approval, and let it handle the hard accidental typing.

More Information ℹ️

https://medium.com/media/9b2a002e26bc2856fb5d3fcbfa5f9738/href

Also Known As 🎭

Spec-Driven Development

Waterfall in 15 Minutes

Vibe Coding with Discipline

Disclaimer 📢

The views expressed here are my own.

I am a human who writes as best as possible for other humans.

I use AI proofreading tools to improve some texts.

I welcome constructive criticism and dialogue.

I shape these insights through 30 years in the software industry, 25 years of teaching, and writing over 500 articles and a book.

This article is part of the AI Coding Tip series.

AI Coding Tips


AI Coding Tip 008 — Use Spec-Driven Development with AI was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.

This article was originally published on Level Up Coding and is republished here under RSS syndication for informational purposes. All rights and intellectual property remain with the original author. If you are the author and wish to have this article removed, please contact us at [email protected].

NexaPay — Accept Card Payments, Receive Crypto

No KYC · Instant Settlement · Visa, Mastercard, Apple Pay, Google Pay

Get Started →