Most developers waste hours with AI because they prompt wrong.
They open Claude or ChatGPT and type: "Build me a full stack app."
Then AI gives something generic. They hate it. They start over. They waste a day.
The problem is not the AI. The problem is the prompt.
Here is the exact prompting process I follow for every project — small or large — that gets AI to build exactly what I want, the first time.
The Core Idea — AI is Your Junior Developer
Stop thinking of AI as a magic box. Think of it as a smart junior developer sitting next to you.
A junior developer cannot read your mind. If you say "build me an app", they will build something random. But if you say "build me a course listing page that shows title, instructor name, price, and a buy button — here is the exact JSON it should receive" — they will nail it.
AI works exactly the same way. The more specific you are, the better the output.
Phase 1 — Project Setup Prompts
Before writing any feature code, use these prompts to set up the foundation.
Prompt 1 — Project Overview
Use this first. Always. Tell AI exactly what you are building.
I am building [PROJECT NAME].
It is a [TYPE OF APP — web app / mobile app / CLI tool / etc].
The main users are [WHO USES IT].
The core problem it solves is [ONE SENTENCE].
Tech stack:
- Frontend: [Next.js / React Native / etc]
- Backend: [ASP.NET Core / Node.js / etc]
- Database: [PostgreSQL / MongoDB / etc]
- Auth: [Clerk / NextAuth / Supabase / etc]
Do not write any code yet. Just confirm you understand the project.Why "do not write code yet"? Because AI loves to jump ahead. You want it to understand first, build second.
Prompt 2 — Folder Structure
Based on the project I described, suggest a clean folder structure.
Rules:
- Monorepo with separate apps/ folder for web and mobile if needed
- Shared types in a packages/types folder
- Keep it simple — no over-engineering
- Use [Next.js App Router / Pages Router] conventions
Show me only the folder structure. No code yet.Prompt 3 — Shared Infrastructure
Set up the following shared infrastructure. Do not build any features yet.
1. Database connection with [Prisma / Drizzle / EF Core]
2. Base API client for frontend with error handling
3. Auth middleware that protects routes
4. Shared TypeScript types folder
5. Environment variables setup with .env.example
One file at a time. Start with database connection only."One file at a time" is critical. If you say "do all of this", AI will rush and make mistakes.
Phase 2 — Feature Prompts (The Vertical Slice Loop)
Now you build one feature at a time. For every single feature, use these 4 prompts in order.
Prompt 4 — The Contract
I am building the [FEATURE NAME] feature.
Before writing any code, define the API contract.
The API should return:
- [Describe what data you need]
Write the TypeScript interface and the API endpoint definition only.
No database code. No UI code. Just the contract.Example for a Course Listing feature:
I am building the Course Listing feature.
Before writing any code, define the API contract.
The endpoint is GET /api/courses
It should return a list of courses. Each course has:
- id (number)
- title (string)
- instructor name (string)
- thumbnail URL (string)
- price (number)
- rating (decimal)
- total students (number)
Write the TypeScript interface only. No other code.Prompt 5 — The Database + API
Now build the backend for the [FEATURE NAME] feature.
Use the contract we defined above.
Steps:
1. Create the database schema / migration for this feature only
2. Build the service layer with the database query
3. Build the API controller / route handler
4. Make sure GET /api/[endpoint] returns exactly the JSON from our contract
Do it one step at a time. Start with the database schema only.Prompt 6 — The Mock UI
Now build the frontend UI for [FEATURE NAME].
Rules:
- Use hardcoded mock data matching our contract — do NOT call the API yet
- Focus only on design — layout, spacing, colors, hover states
- Make it look production quality
- Use [Tailwind / CSS Modules / styled-components]
The mock data to use:
[paste your JSON contract here]
Build the component only. No API calls. No React Query. Just the UI with fake data.Prompt 7 — Connect and Lock
Now connect the [FEATURE NAME] UI to the real API.
Steps:
1. Replace hardcoded mock data with a React Query / SWR hook
2. Call GET /api/[endpoint]
3. Handle loading state
4. Handle error state
5. Run the linter
6. Make sure it builds with zero errors
Show me only the changes needed. Do not rewrite the whole component.When this compiles with zero errors — this feature is locked. Move to the next one.
Phase 3 — Large Project Prompts
When your project has 20+ features and multiple developers, use these additional prompts.
Prompt 8 — Feature Prioritization
Here is a list of all features for [PROJECT NAME]:
[paste your full feature list]
Sort them into three buckets:
1. Core — without these the app cannot function
2. Important — these make the app genuinely good
3. Nice to have — cut these if time runs short
Explain your reasoning for each bucket.Prompt 9 — Team Conflict Prevention
We have [NUMBER] developers working on this project simultaneously.
Features being built in parallel:
- Developer A: [feature]
- Developer B: [feature]
- Developer C: [feature]
Identify:
1. Which features share database tables
2. Which API endpoints might conflict
3. Which TypeScript types need to be in shared packages
4. What order should database migrations run
Give me a conflict prevention checklist.Prompt 10 — Daily Check-in Prompt
Use this every single morning before opening your code editor.
My project: [PROJECT NAME]
Current slice I am working on: [FEATURE NAME]
Current step I am on: [Contract / API / Mock UI / Connect]
What is the exact next thing I should do right now?
Give me one specific action, not a list.This eliminates the "I don't know what to work on" feeling completely.
Prompt 11 — Debugging Prompt
When something breaks, never say "it's not working". Use this instead:
I am working on [FEATURE NAME].
I am on Step [1/2/3/4] of the vertical slice loop.
The problem:
[describe exactly what is wrong]
What I expected:
[describe what should happen]
What is actually happening:
[describe what is happening]
The relevant code:
[paste the specific file or function — not your entire codebase]
Give me one fix at a time. Do not rewrite everything."Give me one fix at a time" is the most important line here. When AI rewrites everything, you lose track of what changed and why.
Prompt 12 — Code Review Prompt
Before locking any slice, run this:
Review this code for the [FEATURE NAME] feature.
Check for:
1. TypeScript errors or any use of 'any' type
2. Missing error handling
3. Security issues — SQL injection, exposed secrets, unprotected routes
4. Performance issues — unnecessary re-renders, N+1 queries
5. Anything that does not match our original contract
The code:
[paste the feature code]
Give me a prioritized list of issues. Critical first.The One Meta Prompt
If you take nothing else from this post, take this. Use it at the start of every single project:
For this entire project, follow these rules:
1. Never write more than one file at a time unless I explicitly ask
2. Always confirm you understand before writing code
3. When I say "build X", ask me what step we are on first
4. Never change code outside the file we are currently working on
5. If you are unsure about something, ask — do not guess
6. After every file you write, wait for my confirmation before continuing
Confirm you understand these rules.This single prompt eliminates 80 percent of the problems people have with AI coding assistants.
Quick Reference — All 12 Prompts
| Prompt | When to Use |
|---|---|
| 1 — Project Overview | Day 1, before anything |
| 2 — Folder Structure | Day 1, after overview |
| 3 — Shared Infrastructure | Day 1, before any feature |
| 4 — The Contract | Start of every feature |
| 5 — Database + API | After contract is agreed |
| 6 — Mock UI | After API is verified |
| 7 — Connect and Lock | Final step of every feature |
| 8 — Feature Prioritization | Large projects, day 1 |
| 9 — Team Conflict Prevention | Multiple developers |
| 10 — Daily Check-in | Every morning |
| 11 — Debugging | When something breaks |
| 12 — Code Review | Before locking any slice |
The Bottom Line
AI does not make you a better developer by writing code for you. It makes you a better developer by forcing you to think clearly about what you want before you ask for it.
The developer who can explain a feature precisely — the data shape, the behavior, the edge cases — will always get better output from AI than the developer who types "build me an app" and hopes for the best.
These prompts are not magic. They are just a framework for thinking clearly. The clearer you think, the better AI performs.
Moving to the Next Level: The "Vertical Slice" Framework
These prompts are designed to fit perfectly into a Vertical Slice Architecture workflow. If you want to understand why this step-by-step approach works so well and how it prevents integration nightmare, check out my comprehensive guide:
👉 Escaping Development Limbo: The "Vertical Slice" Framework