Context Engineering

Context Engineering is a technical discipline focused on systematically designing and optimizing the context provided to AI models — including codebase structure, commit history, design intent, and domain knowledge.
If prompt engineering is the craft of "how to write a single question well," context engineering sits one layer above it. It is the work of designing "what to show the AI, in what order, and how much."
Anthropic's 2026 report introduces a concept called "Repository Intelligence" — the ability of an AI agent to work with an understanding of the relationships and intent of an entire repository, rather than at the level of individual lines of code. Achieving this makes the quality and structure of the context passed to the agent critically important.
Concretely, this involves design decisions such as the following:
- Which files to include in the context, and which to exclude
- How to communicate project rules (coding conventions, architectural policies)
- How to narrow down past change history to the portions relevant to the current task
- How to compress information to maximize its density within the constraints of the context window
Claude Code's CLAUDE.md and Rules files, and OpenClaw's long-term memory feature, are all examples of context engineering in practice — mechanisms by which developers structure project-specific knowledge and pass it to the AI.
The phase of refining how prompts are written is over. We have entered the phase of designing "the environment itself in which the AI works."
Articles covering this term
- What is Context Engineering? The New Paradigm in LLM Development and Its Evolution from Prompt EngineeringContext Engineering is a design approach for dynamically assembling optimal information for LLM apps. Covers differences from prompt engineering, context window components, and RAG/agent implementation patterns.
- What is Harness Engineering? A Design Method to Structurally Prevent AI Agent ErrorsHarness Engineering is a method to structurally prevent AI agent errors from recurring using documents, tools, and constraints. Learn concepts, components, and practical steps.
- What is AI Grounding? An Implementation Guide to Fact Verification and Improving LLM Answer Accuracy with Web SearchAI grounding anchors LLM responses to authoritative sources. Learn how RAG and web search reduce hallucinations, plus implementation steps for enterprise deployment.
- What is AI-Native UI? The Design Philosophy of Generative AI Dynamically Creating ScreensExplore AI-native UI: where forms and menus are replaced by AI-generated interfaces. Learn core concepts, design patterns, and real-world business applications.
Related Terms

System Prompt
A system prompt is an instruction given to an LLM before the start of a conversation with a user, de

AI Red Teaming (AI Red Teaming)
An evaluation method that systematically tests AI system vulnerabilities from an attacker's perspect

Grounding
A technique that cross-references LLM outputs with external data sources and search results to gener

Synthetic Data
Training data generated by AI. It is used to supplement the lack of real data and to train and evalu



