Context engineering: the skill that replaced prompt engineering
Jump to section
A year ago I spent half of every training showing people the 'magic' prompt phrasings. 'Act as a senior engineer.' 'Think step by step.' 'Take a deep breath.' They worked — a little. Nobody cares about those tricks anymore, because they stopped making a difference. The models are good enough now that the exact words barely matter.
What matters is context. Whether the AI gets the right files, the project's conventions, the architecture, and the constraints — or not. This is called context engineering, and in 2026 it's the skill that separates the people AI actually speeds up from the ones still complaining that 'it just generates garbage.'
Why prompt wording stopped mattering
Prompt engineering was born when models were fragile. A badly worded question meant a bad answer, so it paid to polish every word. But the models moved on. Today's agent understands what you want even if you type it sloppily — as long as it has enough information to do it right.
And here's the crux. When an agent fails, it's rarely because you phrased it wrong. It's almost always because it didn't know your code. It didn't know you have a custom error handler and shouldn't write try/except. It didn't know you pin a specific library version. It didn't know a nearly identical function already lives three folders over. A cleverer prompt won't fix that — what's missing is information, not instructions.
Prompt engineering was about HOW you ask. Context engineering is about WHAT the AI knows when you ask. The second one now decides 90% of the outcome.
What 'context' actually means for a coding agent
Context isn't just the text of your prompt. It's everything the agent has in its context window the moment it starts working. And it comes in several layers that are easy to overlook.
- Relevant files — the specific sources the change touches, plus the ones they depend on
- Project conventions — the instruction file (CLAUDE.md, rules), code style, naming, patterns
- Architecture — how the layers talk to each other, where the boundaries are, who owns what
- Prior decisions — why it's built this way and not another (ADRs, comments, history)
- Constraints — what must not change, which versions, which security and performance requirements
When the agent is missing one of these layers, it fills the gap with a guess. And a capable model's guess looks completely confident — which is exactly what makes it dangerous. The code passes review because it 'looks right,' and the problem only surfaces in production.
Concrete tactics that work
1. Curate files, don't flood
The most common mistake is dumping in 'everything, just in case.' Ten files when three are relevant isn't more context — it's more noise. The model has to find the signal amid the clutter, and its attention gets diluted. Give it exactly the files the task needs and let it pull the rest itself.
2. Keep a project instruction file
CLAUDE.md (or an equivalent rules file) is the cheapest context engineering there is. You write the conventions once and the agent has them in every session. Stack, commands, naming, 'always do X, never Y.' Keep it lean — a few dozen real rules, not a hundred-page manual nobody follows anyway.
# CLAUDE.md — the context the agent needs
## Stack
Django 5.2, Django Ninja, PostgreSQL
## Conventions
- Global ObjectDoesNotExist handler — no try/except boilerplate
- select_related/prefetch_related on every queryset with relations
- All API URLs end with a trailing slash (/)
## Never
- Don't touch migrations that are already deployed
- Don't add dependencies without approval3. Use retrieval and MCP for live data
Static context isn't enough when the agent needs the current state — the database schema, a library's docs, tickets, error history. MCP servers and retrieval tools let it pull that information when it needs it, instead of you predicting it and pasting it into the prompt. Context becomes dynamic: the agent fetches what it's missing.
4. Scope the task tightly
'Redo auth' is bad context because it's a badly bounded task. 'Rewrite the login endpoint in auth/views.py to JWT, keep the existing signature, run the tests in auth/tests.py' gives the agent clear boundaries. The sharper the scope, the less room for guessing — and the fewer unwanted changes in files it was never supposed to touch.
Before a complex task, have the agent describe in plan mode how it intends to do it and which files it will touch. You'll see whether it has the right context before it writes a single line. A bad plan means missing context, not a bad prompt.
Common ways to get it wrong
- Too much irrelevant context — flooding with noise that buries the signal
- Stale context — a session dragged over from a previous task, old files, dead approaches
- Missing constraints — the agent doesn't know what it can't change, so it changes it; doesn't know versions, so it uses the wrong API
- Assuming the model 'knows' your project — it doesn't, until you show it
Stale context is the sneakiest. By the time you're on the third task in the same session, the agent is carrying baggage from the first two — files that are no longer relevant and dead ends that actively hurt the next attempt. New task? New session. A clean context almost always beats a bloated one.
A practical workflow
Once you break context engineering into a routine, it stops being a mysterious skill and becomes a handful of steps you do almost automatically.
- 1. Bound the task — one clear change, not 'fix everything'
- 2. Pick the files it actually touches and add them to context
- 3. Confirm the conventions and constraints live in the instruction file
- 4. Have the agent describe its plan and check it has the right picture
- 5. Let it work with a feedback loop — run tests, fix failures
- 6. Clear the session before the next unrelated task
Next time the agent generates garbage, don't reach for a reworded prompt. Ask: 'What does it not know about my project?' The answer is almost always the missing piece.
Context engineering isn't hype or another buzzword. It's simply moving your attention from how you talk to the AI to what you give it to work with. I teach this discipline at my workshops on teams' real code — because once you get it, you stop fighting the prompt and start actually steering the AI.
Karel Čech
Developer and AI consultant. I help technical teams adopt AI in their daily workflow — from workshops to long-term strategies.
LinkedIn →Stay ahead with AI insights
Practical tips on AI for dev teams. No spam, unsubscribe anytime.
Liked this post? Dive deeper with our course:
Related posts
Spec-Driven Development with AI: Plan First, Then Let the Agent Build
Vibe coding is great for prototypes. But for production work, something else wins: write a clear spec, let the agent implement against it, and verify at the right checkpoints.
Local LLMs on your own hardware: a practical 2026 guide
Open-weight models have matured enough that they often just work for everyday dev tasks. No token bill, no code leaving for a vendor. Here's when self-hosting makes sense — and when it doesn't.
Debugging with AI: 4 techniques that save hours every day
AI sees the entire stacktrace at once and reads without assumptions. Most developers don't use it for debugging — and they're missing the biggest time savings.
Ready to start?
Start a free course or explore training options for your team.
Book a free consultation