The Three-Layer Workflow

Table of content

Most people use the same AI tool for everything. Big prompts, let it figure things out, hope for the best. This produces inconsistent results and wastes tokens on simple tasks.

The solution: match your tool to the task. Andrej Karpathy breaks his coding time into three distinct layers. Harper Reed structures work into discrete phases. Both approaches share the same insight: different tools for different jobs.

Karpathy’s three layers

LayerUsageToolPurpose
Tab completion75%Cursor, CopilotLine-by-line coding, boilerplate
Agentic tools20%Claude Code, CodexMulti-file changes, refactors
Reasoning models5%o3, Claude with extended thinkingArchitecture, algorithms, debugging

The percentages are rough guides, not rules. But they shift how you think about which tool to reach for.

Layer 1: Tab completion (75%)

This is where most coding happens. You write code and comments. The AI completes lines and suggests obvious patterns. You stay in control.

Best for:

Why it dominates: Higher bandwidth than prompting. Writing // fetch user from database and return 404 if not found then letting tab complete the implementation is faster than explaining it in a chat window.

Layer 2: Agentic tools (20%)

Claude Code, Cursor Composer, Aider. Describe what you want, the AI reads your codebase, proposes changes across multiple files. You review and iterate.

Best for:

The trade-off: Agents tend to overcomplicate abstractions, over-use try/catch, and lack stylistic consistency. Review everything.

Layer 3: Reasoning models (5%)

Reserved for when you’re genuinely stuck. Architecture decisions, algorithms you don’t understand, bugs that make no sense.

Best for:

How to use it: Load all context. Ask for approaches, not code. Evaluate options. Then implement with Layer 1 or 2.

Harper Reed’s discrete phases

Reed structures AI-assisted development into three sequential phases:

PhaseToolOutputTime
BrainstormGPT-4oRefined spec~15 min
PlanReasoning modelImplementation steps~15 min
ExecuteClaude Code / AiderWorking codeVaries

His summary: “Brainstorm spec, then plan a plan, then execute using LLM codegen. Discrete loops.”

Phase 1: Brainstorm

Chat with a conversational model to develop requirements. The magic prompt:

“Ask me one question at a time so we can develop a thorough, step-by-step spec for this idea.”

Output: spec.md containing clear requirements.

Phase 2: Plan

Feed the spec to a reasoning model. Ask it to break the work into small, testable steps. Each step builds on previous steps. No orphaned code.

Output: prompt_plan.md containing sequential prompts for execution.

Phase 3: Execute

Follow the plan sequentially. Paste each prompt, run the code, verify, move to the next step.

Why phases shouldn’t bleed together

Mixing phasesResult
Brainstorm while executingScope creep, lost direction
Skip planning“Over your skis” — losing control mid-implementation
Plan without brainstormingBuilding the wrong thing
Execute without contextLLM generates “ridiculous things” unrelated to requirements

Poor planning makes execution chaotic and expensive. The upfront time is always recovered in avoided rework.

Tool selection by layer

TaskLayerTool
Write a function1Tab completion
Add logging across codebase2Claude Code
Design database schema3Reasoning model
Fix a typo1Tab completion
Implement new API endpoint2Claude Code
Debug race condition3Reasoning model
Rename variable across files2Claude Code
Choose between Redis and Memcached3Reasoning model

When in doubt: start with the lower layer. Escalate only when stuck.

The hero’s journey for beginners

Reed’s progression for newcomers:

StageToolWhat you learn
1CopilotHow AI completions work
2Claude web (copy-paste)Manual but educational
3Cursor/ContinueEditor integration
4Full agentsClaude Code, Aider

Don’t skip stages. Jumping straight to agents is “annoying and weird.” Each stage builds intuition for the next.

Critical tips:

Common mistakes mixing layers

MistakeWhy it failsFix
Using agents for simple editsSlower, expensive, over-engineered resultsTab complete instead
Tab completing architecture decisionsNo exploration of alternativesUse reasoning model
Reasoning model for implementationOverkill, worse at actual codeAgent or tab complete
One tool for everythingWrong fit for most tasksMatch tool to task
Vibe coding production codeCan’t debug what you don’t understandUse layers appropriately

The pattern: tools optimized for one thing do that thing well. General-purpose usage produces mediocre results.

Getting started progression

Week 1-2: Tab completion only

Week 3-4: Add planning

Month 2: Introduce agents

Ongoing: Reasoning when stuck

The mental model

Simple task? → Tab completion (Layer 1)
Multi-file change? → Agent (Layer 2)
Genuinely stuck? → Reasoning model (Layer 3)
New project? → Brainstorm → Plan → Execute

Know which layer you’re in. Know which phase you’re in. Mixing them is where things go sideways.


Next: Plan Mode in Claude Code

Topics: ai-coding workflow ai-agents