Objective
Your mission
Map each type of context in a project to the most efficient delivery method and identify a past mistake to fix. Output: context_delivery_plan.md.
You need: A project you're building with AI (any tool).
Time: 20 minutes.
Step 1: learn the context hierarchy (5 min)
From most efficient to least efficient:
1. Context File — persistent, reusable context
- Use for: tech stack, conventions, file structure, project overview, Do NOT rules
- Why: written once, read automatically, available in every session
2. File References — existing code the AI should look at
- Use for: "Look at src/lib/supabase.ts" or "Follow the pattern in src/components/HabitCard.tsx"
- Why: in IDE tools, the AI reads the file directly — no need to paste. Sees current code, not outdated paste.
3. Chat — session-specific, one-time context
- Use for: what you're working on right now, current issues, specific corrections
- Why: fast, flexible, but consumes context window space and doesn't persist
4. Paste Inline — small code snippets or when file references aren't available
- Use for: small snippets (< 50 lines), error messages, specific functions
- Why: necessary in browser builders without file reference capabilities
The golden rule of context
Give the AI the minimum context it needs to make the right decisions — no more, no less. Too little: the AI guesses wrong. Too much: the AI's context window gets cluttered and it may miss the important parts.
Step 2: map your context types (10 min)
For your project, identify each type of context you need to deliver and choose the best method.
Write in your file:
## Context Delivery Plan
### 1. Tech Stack
Delivery method: [context file / chat / paste]
Content: [your tech stack details]
Why this method: [efficiency, accuracy, persistence reasoning]
### 2. Existing Code Patterns
Delivery method: [file reference / context file / paste]
Content: [which files to reference]
Why this method: [reasoning]
### 3. Current Task
Delivery method: [chat]
Content: [what you're working on now]
Why this method: [reasoning]
### 4. Small Code Snippet
Delivery method: [paste inline]
Content: [example snippet you'd paste]
Why this method: [reasoning]
### 5. Library Usage (e.g., Supabase, Stripe)
Delivery method: [file reference + brief description / context file]
Content: [your implementation file + description]
Why this method: [reasoning]
### 6. Error Messages
Delivery method: [paste inline in chat]
Content: [example error]
Why this method: [reasoning]
Step 3: identify a past mistake (5 min)
Think about how you've been delivering context. Identify one mistake and how you'll fix it.
Write in your file:
## Past Mistake
What I was doing: [e.g., "Pasting 200 lines of code in every new chat"]
Why it was wrong: [e.g., "Fills context window with info the AI could access via file references"]
How I'll fix it: [e.g., "Use file references in Cursor instead of pasting. Put key info in context file for browser builders."]
You're in Cursor and want the AI to follow the pattern in an existing component. How should you deliver that context?
In IDE tools a file reference lets the AI read the current code directly, without filling the chat with a paste that may already be out of date.