Practise Context Engineering one question at a time. Answer out loud or in writing, get graded, and see exactly what you missed.
What is context engineering, and how does it differ from prompt engineering?
Context engineering designs everything a model receives during a task, whereas prompt engineering focuses on the words in one request. Context can include instructions, conversation history and summaries. It can also include source files, tests and documentation. Tool results can land there too.
A strong prompt cannot fix missing or misleading context. If the model cannot see the current interface or a project rule, it must guess. Context engineering puts the right information in front of the model at the right time, and removes noise that could distract the model.
Context engineering also decides how context is retrieved, ordered and kept current. It covers what carries over between sessions too. Prompt writing is one part of the larger job of building a reliable information environment for the assistant.
Missed:
“Basically they're a README written for the AI. You put a CLAUDE.md or an AGENTS.md at the root of the repo with the things the assistant would otherwise have to guess, or that I'd keep retyping: how to build and run the tests, where things live, and the conventions we follow, like using our own logger instead of console.log. The tool picks the file up on its own at the start of every session, so each conversation starts from the same baseline instead of me pasting that context in every time. The thing I'd watch is size. It gets loaded on every request, so I keep it short, and for anything long I link to the existing docs instead of copying them into the file.”
Knew itThey have the core idea: a repo-root file the assistant loads automatically so setup, conventions and build/test steps don't get retyped each session. Missing: safety limits, definition of done, and never putting secrets in the file.
Missed: Didn't mention they also set safety limits and the expected definition of done
Missed: Didn't mention never putting secrets in these files
Get your own answers graded
Sign up free. Your account comes with 50 credits for grading, and it remembers what you missed.
What it covers
All 49 questions
Context engineering foundations
What context engineering is, how it differs from prompt engineering, what a context window is and why managing it still matters as windows grow.
- What is context engineering, and how does it differ from prompt engineering?
- What is a context window, and why does it matter when working with AI coding tools?
- Explain the "show, don't tell" prompt pattern for code tasks. Pro
- Context windows keep growing, so why does context management still matter? Pro
Instruction file basics
What instruction files like CLAUDE.md are for, what belongs in them, why they stay lean, and when guidance goes in rules, docs or the prompt instead.
- What are instruction files such as CLAUDE.md or AGENTS.md, and what problem do they solve?
- What kinds of information belong in a project instruction file, and what should stay out?
- Why is it important to keep rules files lean?
- How do you decide whether guidance belongs in a rules file, project docs, or the prompt? Pro
Rules across tools and scopes
AGENTS.md, Cursor rules and Copilot instructions, layering by scope, resolving conflicts between layers, and keeping rules from going stale or drifting.
- What is AGENTS.md, and how does it relate to tool-specific files like CLAUDE.md? Pro
- How do instruction files layer across global, project, and directory scope, and what belongs at each level? Pro
- How does Cursor's rules system work, and how does it differ from the legacy .cursorrules file? Pro
- How do you customize GitHub Copilot's behavior for a specific repository? Pro
- How do instruction files go stale, and how do you keep them trustworthy? Pro
- Instruction layers can conflict. How do you design precedence and hygiene so they do not fight? Pro
- Your team uses several AI tools with different instruction file formats. How do you avoid duplicated, drifting rules? Pro
AI-legible codebases
How READMEs, typed interfaces, module size, naming and tests make a repository easy for an agent to understand and change correctly.
- What does it mean for a repository to be AI-legible?
- How does a good README help an AI coding assistant? Pro
- How do typed interfaces make a codebase easier for agents to work with? Pro
- How do module size and naming conventions affect agent effectiveness? Pro
- How can a test suite serve as documentation for agents, and what makes tests good context? Pro
Token budgets and caching
What consumes tokens in an agent session, how to audit and budget that use, and how prompt caching shapes the order of context.
Long sessions, compaction and subagents
When to start a fresh session, how compaction works and fails, using subagents to keep the main context small, and keeping a long task coherent across sessions, summaries and agent handoffs.
- When should you start a fresh session instead of continuing a long conversation with a coding agent? Pro
- What is context compaction, and what are its tradeoffs? Pro
- How do subagents help with context management? Pro
- What are common compaction failure modes, and how do you engineer around them? Pro
- How do you architect context handoffs in a multi-agent system? Pro
- How do you keep a long-horizon agent task coherent across multiple sessions and compactions? Pro
Code search and retrieval
Repo maps, grep versus semantic search, the cost of a semantic index, and staged retrieval for an agent in a large unfamiliar repository.
- What is a repo map, and how does a tool like Aider use one? Pro
- Compare grep-based exploration with semantic code search for coding agents. Pro
- What are the tradeoffs of maintaining a semantic index of your codebase? Pro
- Design a retrieval approach for an agent dropped into a large unfamiliar repository. Pro
MCP, tools and skills
MCP servers, tool design without context bloat, current library docs and llms.txt, and packaging workflows as skills with progressive disclosure.
- What is the Model Context Protocol (MCP), and why is it relevant to development workflows? Pro
- What is llms.txt, and how does it help agents consume documentation? Pro
- What are practical ways to give a coding agent access to up-to-date library documentation? Pro
- What kinds of MCP servers are most useful in day-to-day development? Pro
- What are custom commands and skills, and when should you create one? Pro
- What is progressive disclosure in agent context design, and how do skills implement it? Pro
- How does MCP tool design affect agent performance, and how do you prevent tool definitions from bloating context? Pro
Secrets and context security
Keeping secrets out of agent context, context poisoning, and prompt injection through instruction files, retrieved content and MCP servers.
- Why must secrets never appear in instruction files or other agent context, and what belongs there instead? Pro
- What is context poisoning, and how does it show up in practice? Pro
- What does thorough secrets hygiene look like in an agentic workflow, beyond keeping keys out of rules files? Pro
- How are instruction files, retrieved content, and MCP servers an attack surface, and what mitigations exist? Pro
Governance and measuring impact
Managing shared context across teams and monorepos, evaluating whether context changes help, and prioritizing context investment by its return.
- How should a team manage shared context files in version control? Pro
- What context strategies work best in a large monorepo? Pro
- Design a context governance model for a multi-team monorepo adopting coding agents at scale. Pro
- How would you build an evaluation harness to measure whether context changes help your agents? Pro
- An organization wants to invest seriously in context engineering. How do you prioritize efforts and measure return? Pro
All questions
Showing of 49What is context engineering, and how does it differ from prompt engineering?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Context engineering designs everything a model receives during a task, whereas prompt engineering focuses on the words in one request. Context can include instructions, conversation history and summaries. It can also include source files, tests and documentation. Tool results can land there too.
A strong prompt cannot fix missing or misleading context. If the model cannot see the current interface or a project rule, it must guess. Context engineering puts the right information in front of the model at the right time, and removes noise that could distract the model.
Context engineering also decides how context is retrieved, ordered and kept current. It covers what carries over between sessions too. Prompt writing is one part of the larger job of building a reliable information environment for the assistant.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What are instruction files such as CLAUDE.md or AGENTS.md, and what problem do they solve?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Instruction files hold standing guidance for a coding assistant. They describe the repository layout, the build and test commands, and the coding conventions. They also set safety limits and the expected definition of done. Tools load them automatically at the project or directory scope.
They solve the problem of repeating stable facts in every prompt. Without them, each session may guess how to run tests or which helper to use.
Keep them short and specific, link to longer docs instead of copying them, and never put secrets in them.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What kinds of information belong in a project instruction file, and what should stay out?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Put in stable facts that affect many tasks:
- important directories
- standard commands
- architectural boundaries
- naming rules
- approved libraries
- any dangerous action that needs approval
Add a short definition of done, such as running focused tests and reporting any failures.
- Leave out secrets, credentials and customer data.
- Leave out temporary task details and long tutorials too. Point to a trusted document instead of copying it.
- Skip vague advice such as "write good code", because it gives the model nothing to act on.
- Drop rules that tools or linters already enforce, unless the assistant needs them to choose an approach.
A useful file is a small map and policy guide, not a complete project handbook.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is a context window, and why does it matter when working with AI coding tools?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
A context window is the amount of text and other tokenized information a model can consider in one request. It holds:
- the prompt
- the instructions
- the prior conversation
- source files
- tool output
- the model's own response
Every model has a limit. When the window fills, older content may be removed or summarized, and important details can be lost. Even before the limit, too much unrelated material can make the model overlook the right fact.
Give the assistant current, relevant sources instead of a repository dump. For long tasks, record decisions and progress in a compact handoff. Careful context selection improves accuracy, cost, and speed.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
In a typical coding agent session, what actually consumes context tokens?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Nearly everything the agent reads or writes consumes tokens:
- Standing text: system and project instructions, and the tool definitions.
- The conversation: your messages, earlier replies, and any summaries.
- What the agent reads: source files, search results, and documentation.
- What tools return: command output, error logs, and diffs.
Repeated content can be charged and processed again unless caching applies. Large test logs, generated files and broad searches fill the window fast without adding much value. Ask for focused output, open only the relevant file sections, and filter noisy command results.
Keep standing rules lean, because they appear in many requests. When a task changes direction, start a fresh session instead of carrying unrelated history. Watching tokens saves money, and it also keeps the model's attention on the evidence that matters.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Why is it important to keep rules files lean?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Rules files are loaded often, so every unnecessary paragraph uses context on many requests. Long files also make important guidance harder to notice. Conflicting or overly detailed rules can cause the assistant to follow the wrong instruction, or to spend time reconciling advice that does not apply.
Keep only stable, high-impact facts that change how work should be done.
- Use clear commands, short examples, and links to deeper documentation.
- Move subsystem guidance into scoped files when the tool supports them.
- Remove rules that a formatter, type checker, or test already enforces.
- Review the file after repeated agent mistakes and after architecture changes.
Lean rules reduce cost, improve attention, and are easier for people to keep accurate.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What does it mean for a repository to be AI-legible?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
An AI-legible repository makes its structure and intent easy for an assistant to discover. It has:
- clear names
- small focused modules
- typed interfaces
- current docs
- reliable tests
- standard commands
Important behavior is written down instead of living only in team memory.
In such a repository, an agent can find the owning module and inspect a nearby example. It can run one documented test command and understand what success means. Hidden setup and duplicate patterns force it to guess. Vague names and stale docs do the same.
Improve legibility by making boundaries explicit, removing dead code and documenting unusual decisions. Keep examples current. The goal is to make project knowledge visible and verifiable, which helps human developers too.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
How does a good README help an AI coding assistant?
What is AGENTS.md, and how does it relate to tool-specific files like CLAUDE.md?
When should you start a fresh session instead of continuing a long conversation with a coding agent?
What is the Model Context Protocol (MCP), and why is it relevant to development workflows?
Why must secrets never appear in instruction files or other agent context, and what belongs there instead?
Explain the "show, don't tell" prompt pattern for code tasks.
How do instruction files layer across global, project, and directory scope, and what belongs at each level?
How does Cursor's rules system work, and how does it differ from the legacy .cursorrules file?
How do you customize GitHub Copilot's behavior for a specific repository?
What is context compaction, and what are its tradeoffs?
How do subagents help with context management?
What is a repo map, and how does a tool like Aider use one?
Compare grep-based exploration with semantic code search for coding agents.
What is llms.txt, and how does it help agents consume documentation?
What are practical ways to give a coding agent access to up-to-date library documentation?
What kinds of MCP servers are most useful in day-to-day development?
What are custom commands and skills, and when should you create one?
How do typed interfaces make a codebase easier for agents to work with?
How do module size and naming conventions affect agent effectiveness?
What is context poisoning, and how does it show up in practice?
How do instruction files go stale, and how do you keep them trustworthy?
How should a team manage shared context files in version control?
How do you decide whether guidance belongs in a rules file, project docs, or the prompt?
Context windows keep growing, so why does context management still matter?
What is progressive disclosure in agent context design, and how do skills implement it?
How can a test suite serve as documentation for agents, and what makes tests good context?
What context strategies work best in a large monorepo?
How do you audit and budget token consumption in an agent session?
How does MCP tool design affect agent performance, and how do you prevent tool definitions from bloating context?
How does prompt caching interact with how you arrange context?
Instruction layers can conflict. How do you design precedence and hygiene so they do not fight?
What are the tradeoffs of maintaining a semantic index of your codebase?
Design a retrieval approach for an agent dropped into a large unfamiliar repository.
What does thorough secrets hygiene look like in an agentic workflow, beyond keeping keys out of rules files?
What are common compaction failure modes, and how do you engineer around them?
Your team uses several AI tools with different instruction file formats. How do you avoid duplicated, drifting rules?
Design a context governance model for a multi-team monorepo adopting coding agents at scale.
How would you build an evaluation harness to measure whether context changes help your agents?
How are instruction files, retrieved content, and MCP servers an attack surface, and what mitigations exist?
How do you architect context handoffs in a multi-agent system?
How do you keep a long-horizon agent task coherent across multiple sessions and compactions?
An organization wants to invest seriously in context engineering. How do you prioritize efforts and measure return?
This answer is part of Pro.
The full written answer, with the trade-offs and follow-ups an interviewer will probe.
No matches
Try a different filter or search term.
Context Engineering in pictures.
A quick recap of Context Engineering in 30 short animated pictures, one idea at a time. About 7 min to get the whole topic back in your head before you walk in. Pause any picture, slow it down, or step through it.
Pro The first chapter is free to play. The other 28 pictures come with Pro.
Context Engineering cheatsheet
- The context window01
- Rules & prompts02
- Rules files by tool03
- Long sessions & subagents04
- Finding the right code05
- Docs, MCP & skills06
- AI-legible code07
- Rules for teams & monorepos08
- Secrets & prompt injection09
- Cost, caching & evals10
- The model11
- + 5 more inside
This picture is part of Pro. The first chapter is free to play; the other 28 pictures come with Pro.
Get Pro · $10/mo Already Pro? Sign in42 of 49 Context Engineering answers are in Pro.
Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.
- Full answers + code
- AI explanations, simpler or deeper
- 1,000 AI credits / month
- Cancel anytime
Change topic
Pick a different technology or stack. Your current topic stays put until you choose a new one.
MEAN
MongoDB, Express, Angular, Node.jsMERN
MongoDB, Express, React, Node.jsDjango
Python Full-Stack DevelopmentRuby on Rails
Convention over ConfigurationServerless on AWS
Serverless Architecture on AWSInterviewers also test these - they're common to every stack, whichever one you picked above.
Flutter Mobile
Flutter Cross-Platform Mobile DevelopmentInterviewers also test these - they're common to every stack, whichever one you picked above.
Spring Boot
Enterprise Java Development.NET
Microsoft EcosystemVue
Vue.js, Vite, TypeScript, Tailwind, Node.jsGo Backend
Golang, gRPC, PostgreSQL, Redis, RabbitMQInterviewers also test these - they're common to every stack, whichever one you picked above.
FastAPI
Python, FastAPI, SQLAlchemy, PostgreSQLReact Native
React, TypeScript, Redux, FirebaseiOS Native
Swift, SwiftUI, UIKit, FirebaseAndroid Native
Java, Jetpack Compose, FirebaseDevOps / Platform
Docker, Kubernetes, Terraform, CI/CDInterviewers also test these - they're common to every stack, whichever one you picked above.
AI Engineer
LLMs, RAG, Agents, EvalsAI-Powered Developer
Claude Code, Copilot, Agentic WorkflowsCore SWE Interview Prep
Data structures, algorithms, OS, concurrency, networking, gitInterviewers also test these - they're common to every stack, whichever one you picked above.
Interviewers also test these - they're common to every stack, whichever one you picked above.