Prompt Mapping
Context Layers for AI Collaboration
AI assistants need layered context. Without it, they guess at system-level decisions from implementation-level prompts. Learn to provide context at the right level.
The Context Problem
"AI doesn't know what you know. When you ask for a button, AI doesn't know if it's for a banking app or a game. You must provide layered context."
Every prompt exists within a context hierarchy. Most developers only provide implementation-level context ("make this button purple") when AI needs system-level context ("this is a premium finance app targeting executives").
The Four Context Layers
System Context
The highest level—defines what the entire system is, its purpose, constraints, and invariants. This rarely changes.
Example Prompts
- "This is a cybersecurity portfolio with educational content"
- "We use Next.js 14, TypeScript, and Tailwind"
- "The aesthetic is premium, dark-mode, with subtle animations"
Architecture Level
Major components and their relationships. Data flow, module boundaries, integration points.
Example Prompts
- "Psychology lab pages follow this template structure"
- "Each strategist has legendaryBattles and strategicFrameworks arrays"
- "Mental models are organized into 5 layers"
Component Level
Individual feature or component scope. What does this specific piece do?
Example Prompts
- "Create a new mental model page for Gall's Law"
- "Add an interactive quiz to this page with 6 questions"
- "The overview tab should explain the core concept"
Implementation Level
Line-level code details. Specific syntax, exact values, micro-decisions.
Example Prompts
- "Use Framer Motion for the card hover animation"
- "Set the gradient colors from-purple-500 to-violet-500"
- "Add a 2-second delay before showing the result"
The Missing Context Problem
When you only provide L4 (implementation) context, AI guesses at L1-L3. It might build a button that looks great but violates your design system, breaks your architecture patterns, or contradicts system constraints it doesn't know about.
The Prompt Mapping Solution
Before prompting, ask: "What layer is this request?" Then provide context for that layer AND all layers above it. System context rarely changes. Architecture context changes per feature area. Component and implementation change frequently.