Context Engineering

Design theory for prompts, memory, and context lifecycle — treat the attention budget as a finite resource.

Overview
All readers — the shift from prompt engineering to context engineering — why an agent's attention budget is a finite resource and how the three pillars (prompt, memory, context lifecycle) compose
Prompt Design
Agent system authors — the static skeleton: finding the right altitude, structuring instructions the model can actually parse, using examples as the primary steering tool, and ordering prompt blocks so caching helps
Memory Design
Agent system authors — what survives outside the window: a taxonomy of memory types, when to write vs. when to recall, structured notes as durable planning state, and how memory invalidates
Compaction
Agent system authors — the operation that replaces window content with a more compact form: spectrum, triggers, preservation, custom-instruction tuning, design extensions, measurement, and a cross-framework reference
Cache Point Design
Agent system authors — how to design an agent for high cache hit rate: the block model first, then eight design moves for placing the 4 breakpoints, and finally the cache consequences of compaction design. Companion to the compaction page
Context Management
Agent system authors — the runtime discipline: attention budgets, the compaction spectrum, just-in-time context loading, progressive disclosure, and sub-agents as a context-engineering tool
Case Study: Claude's Design Prompt
Agent system authors — a close reading of Anthropic's ~340-line Claude design-agent system prompt: naming every design move worth learning from, grouped into seven design domains
From Case to Paradigm
Agent system authors — a 10-step method distilled from the case study, followed by the elevation from single-prompt design to composed architectures: same invariants, different assembly