Giving AI the Full Picture
8.1: AI Thinks Vertically, You Think Horizontally
This is the mental model that explains most AI failures:
AI can only go vertical -- straight down from your prompt to implementation. It builds top-to-bottom, one thing at a time, powerfully.
You control the horizontal -- the landscape of your system. Existing patterns, constraints, integrations, history, future plans.
YOU
|
Patterns ---- History ---- | ---- Constraints ---- Future
|
| AI goes straight down
v from wherever you place itWhen AI builds the wrong thing, the question isn't "why is AI broken?" It's "what horizontal context did I miss?"
8.2: Without vs. With Context
Without your context:
Prompt: "Add login"
AI implements a generic login form.
Wrong patterns. Wrong auth provider.
Doesn't integrate with your system.With your context:
Prompt: "Add login. We use JWT with refresh tokens.
Integrate with our SSO provider via AuthService.ts.
Rate limit to 5 attempts/minute. Log to audit service.
Follow the pattern in src/pages/signup.tsx."
AI implements login that fits your system perfectly.The difference is entirely in the horizontal context you provided.
8.3: The Horizontal Checklist
Before every significant prompt, run through this list:
| Category | Ask Yourself |
|---|---|
| Integrations | "This connects to [existing system]" |
| Patterns | "Follow the pattern in [file]" |
| Constraints | "Cannot use [limitation]" |
| History | "We use X because [reason]" |
| Future | "Must support [planned feature] later" |
| Domain | "Users typically [behavior]" |
| Environment | "In prod we use [difference from dev]" |
You don't need all seven for every prompt. But for anything substantial, check at least integrations, patterns, and constraints.
8.4: The Context Window is Precious
AI can only "see" a limited amount at once. Use it wisely:
| Do | Don't |
|---|---|
| Reference specific files by path | Dump your entire codebase |
| Quote the relevant 20 lines | Paste 500 lines of schema |
| Summarize long discussions | Expect AI to remember everything |
| Start fresh when polluted | Fight with stale context |
Pointing AI to the 3 relevant files works better than showing it 30 files. More context isn't always better -- relevant context is.
8.5: When to Start a New Chat
A fresh context often works better than trying to fix a polluted one. Start new when:
- After shipping a feature -- clean slate for next task
- AI keeps repeating the same mistake -- it's stuck in a loop
- You switched to unrelated work -- old context will confuse
- Responses get confused or repetitive -- context window is full
When starting fresh, bring context efficiently:
"Read user rules. Read @src/services/AuthService.ts.
In our last session, we decided:
1. JWT for auth (not sessions)
2. Refresh tokens in httpOnly cookies
3. 15 min access token expiry
Now implement token refresh."8.6: Signs of Context Problems
| Symptom | Cause | Fix |
|---|---|---|
| AI contradicts earlier decisions | Context too long | Start fresh, summarize decisions |
| AI forgets file structure | Too much noise | Only include relevant files |
| Responses repeat themselves | Context limit hit | New chat |
| Wrong patterns used | Old code polluting | Fresh context with current code |
| AI "doesn't get it" | Missing horizontal context | Add integrations, patterns, constraints |
8.7: The Brainlift Connection
Your Brainlift from Module 2 is horizontal context -- specifically, the context that AI cannot possibly have on its own. Always include it when starting a new feature. It's the difference between generic AI output and code that actually fits your project.