CodingIdeas.ai
← Browse ideas

Plan-First Methodology

The Architect Prompt

Stop asking AI to "write the code." The top vibe coding communities — r/vibecoding and r/ChatGPTCoding — have converged on a Plan-First approach: clarify first, architect second, execute third. The result is fewer hallucinations, tighter scope, and code that actually ships.

Why most AI coding sessions fail

When you ask an AI to "build me an invoice app," it hallucinates scope, picks the wrong stack, and produces code you'll delete in 20 minutes. Andrej Karpathy calls the real skill context engineering — filling the AI's context window with exactly the right information at each step. The bottleneck has shifted: clear intent and structured context now matter more than fast typing.

1

Clarify

Before writing a single line — align intent

Paste this into Claude or ChatGPT with your idea filled in. The AI asks you 5–7 questions before producing anything. This single step eliminates 80% of the hallucinations that kill vibe coding sessions.

ROLE Act as a Senior Full-Stack Engineer and Product Manager. You think in systems before you write a single line of code. TASK I want to build: [your idea] Ask me 5–7 clarifying questions before producing anything. Cover: - Must-have vs nice-to-have features for V1 - My skill level and preferred tools (Cursor / Windsurf / Claude Code) - Integrations I already have access to - What "done" means for the first version - Any hard constraints (solo, weekend build, zero budget) - Anything ambiguous that could cause you to hallucinate later ⚠️ Do NOT start planning or writing code until I answer. Wait.
2

Architect

After you answer — generate the technical spec

Once you've answered the clarifying questions, the AI produces a full Technical Specification and a phased MVP Plan. This becomes the shared context for everything that follows.

Now produce: 1. TECHNICAL SPECIFICATION System architecture (use → for data flow) Core data model and key entities External APIs and integration points 2. MVP PLAN in three phases: SETUP — environment, file structure, auth, database schema Done when: a blank app is deployed and I can log in. CORE FEATURES — minimum set that delivers value to one user Done when: one user completes the full workflow unassisted. STRETCH GOALS — post-launch additions, not required for V1 3. BLOCKER ANALYSIS Flag: API limits, auth complexity, scope risks, top failure modes
2.5

Create Context File

Before opening your IDE — lock the context

This is the step most vibe coders skip — and why their sessions drift after 30 minutes. Karpathy calls it context engineering: filling the AI's context window with exactly the right information at every step. A context file does that automatically. Start a fresh IDE session for each phase — long threads cause model drift.

"Based on everything we've discussed, generate a CLAUDE.md file that captures: - Tech stack and versions (exact) - Folder structure and file naming conventions - Coding rules: what to always do, what to never do - MVP scope boundaries — features explicitly out of scope for V1 - The phased build plan as a checklist I will paste this at the top of every new IDE session. Keep it under 150 lines — dense, not verbose."

⚠️ Start a fresh chat in Cursor / Windsurf / Claude Code for each phase (SETUP, CORE FEATURES, STRETCH). Paste the context file at the top every time. Fresh sessions + context file = consistent output across the whole build.

3

Execute

In Cursor or Windsurf — one task at a time

One task per prompt — never batch steps. Verify it works before moving on. After each step, run the Critique Loop. This is the quality gate that stops technical debt compounding.

EXECUTE PROMPT (paste for each step): "Referencing our MVP Plan, implement [Step Name] now. Rules: - One task only. Stop when done. Do not move to the next step. - Keep all files modular. Max 200 lines per file — split if larger. - Inline comments for non-obvious logic only. - Output: file paths and code changes only. No explanations unless I ask." CRITIQUE LOOP (run after every step — before moving on): "Review what you just built as a senior engineer doing a PR review. Check for: - Security: auth gaps, input validation, injection risks, exposed secrets - Performance: N+1 queries, missing indexes, unbounded loops - Edge cases: empty states, concurrent requests, network failures - Debt: anything painful to refactor in 3 months Fix all critical issues. List what you changed."

Every idea on this site includes an Architect Prompt

Pre-filled with the idea's tech stack, architecture pattern, core features, V1 scope boundaries, and known pitfalls. One click — paste straight into Claude or Cursor.

Browse ideas and get your prompt →

FAQ

How is this different from just asking AI to write the code?

Standard prompts ask the AI to immediately produce code. The Architect Prompt first asks clarifying questions, then produces a structured spec, then creates a context file before the first line is written, then executes one task at a time with a quality gate after each step. It matches how senior engineers actually work.

Which AI tools work best with this methodology?

Steps 1 and 2 work best in Claude or ChatGPT (long context, strong at specs and planning). Step 2.5 generates your CLAUDE.md or .cursorrules file. Step 3 works best in Cursor, Windsurf, or Claude Code where the AI can read and write files directly.

What is context engineering?

A term Andrej Karpathy advocates for — the practice of filling the AI's context window with exactly the right information at each step: the spec, the plan, the constraints, the coding conventions. The context file (Step 2.5) is how you do this systematically across every session.

Why start a fresh session for each phase?

AI models drift in long conversations — they start making assumptions based on earlier context that no longer applies. Starting fresh for SETUP, CORE FEATURES, and STRETCH GOALS, and pasting your context file each time, keeps the model grounded to the plan rather than the thread history.

What is the Critique Loop?

After each build step, you ask the AI to review its own output as a senior engineer doing a PR review — checking for security gaps, performance traps, missing edge cases, and anything painful to refactor later. It's the quality gate that stops technical debt from compounding across the build.

Is "Architect Prompt" an official term?

Not formally. The r/vibecoding and r/ChatGPTCoding communities use variations of this pattern under different names — "Plan-First", "context engineering", "Senior Architect Mode". CodingIdeas.ai uses Architect Prompt as the unified label for this 4-step methodology.

Methodology synthesised from r/vibecoding, r/ChatGPTCoding, Andrej Karpathy's context engineering writing, and the Senior Architect Mode prompt pattern from the Windsurf/Cursor community.