Objective
Your mission
Analyze what context the AI had vs. didn't have in a previous build, and write an upfront context statement. Output: context_analysis.md.
You need: A project you've built with AI (any tool).
Time: 20 minutes.
Step 1: understand the context window (3 min)
The AI has a "context window" — like a desk. It can only work with what's on the desk.
What goes on the desk:
- Your messages (everything you type)
- Code the AI has generated in this session
- Files you've uploaded or referenced
- The AI's own outputs
What doesn't:
- Your project's other files (unless explicitly referenced)
- Your project's history (previous chats, previous builds)
- Your intentions (unless stated)
- Your project's specific conventions
Browser builders (Lovable, Bolt.new, v0): see the current project's code only. IDE agents (Cursor, Claude Code): see your entire codebase but need to be told which files are relevant.
The context-first principle
The single biggest improvement you can make to your vibe coding workflow: give context before asking for code. Every minute spent writing context saves 5 minutes of corrections. The AI isn't psychic — it can't know your tech stack, your conventions, or your preferences unless you tell it.
Step 2: analyze a previous build (7 min)
Think about a project you've built with AI. Analyze what the AI knew and didn't know.
Write in your file:
## Project Analyzed
[project name and what it does]
## What the AI Had Access To
- [e.g., chat messages describing the app]
- [e.g., code it generated during the session]
- [e.g., a screenshot I uploaded]
[list everything]
## What the AI Did NOT Have
- [e.g., my style preferences — I wanted a specific color scheme]
- [e.g., my tech stack decision — I wanted TypeScript not JavaScript]
- [e.g., my project history — decisions from a previous chat]
- [e.g., my API structure — endpoint URLs and data formats]
[list everything]
Step 3: write an upfront context statement (7 min)
Write everything you would tell the AI before asking it to build, to prevent wrong assumptions.
Write in your file:
## Upfront Context Statement
"This is a [project type] built with [framework + language]. Styling uses [CSS approach]. The backend is [backend]. Conventions: [patterns to follow]. The design uses [colors/styles]. The API is at [endpoint]. Do NOT [things to avoid]."
[Write your full statement — be specific to your project]
Step 4: compare (3 min)
Write in your file:
## Comparison
Corrections from the original build that could have been prevented by the upfront context:
1. [e.g., "The AI used JavaScript — I had to ask it to switch to TypeScript. The upfront context says 'TypeScript only.'"]
2. [e.g., "The AI used plain CSS — I had to ask for Tailwind. The upfront context says 'Tailwind CSS only.'"]
3. [list more if applicable]
How many correction rounds could have been saved? [number]
You wanted TypeScript and Tailwind, but the AI wrote JavaScript with plain CSS. What was most likely missing?
The AI only sees what's on its desk. Your stack, conventions and preferences don't exist for it until you state them, so give context before asking for code.