8. Giving AI the Full Picture
MODULE 8

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 it

When 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:

CategoryAsk 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:

DoDon't
Reference specific files by pathDump your entire codebase
Quote the relevant 20 linesPaste 500 lines of schema
Summarize long discussionsExpect AI to remember everything
Start fresh when pollutedFight with stale context
Selective context beats total 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

SymptomCauseFix
AI contradicts earlier decisionsContext too longStart fresh, summarize decisions
AI forgets file structureToo much noiseOnly include relevant files
Responses repeat themselvesContext limit hitNew chat
Wrong patterns usedOld code pollutingFresh context with current code
AI "doesn't get it"Missing horizontal contextAdd 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.

🧠
Module Checkpoint
Test your understanding -- try to answer from memory before looking
When AI builds the wrong thing, what should you ask first?

What does 'horizontal context' mean?

When should you start a new chat?

Is more context always better?