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 seems to understand your specific business logic, but is condescending with you.
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 failing 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 π·οΈ
- Complexity
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 βΉοΈ
Kent Beck Critizing Spec-Driven Development
Start with a clear path (specs before code)
Break work into small, iterative chunks
Provide extensive context and guidance
Choose the right model (and use multiple when needed)
Leverage AI coding across the lifecycle
Keep a human in the loop - verify, test, and review everything
Commit often and use version control as a safety net. Never commit code you canβt explain.
Customize the AIβs behavior with rules and examples
Embrace testing and automation as force multipliers
Continuously learn and adapt (AI amplifies your skills)
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.
Top comments (0)