Module 04 / 08
Context Engineering & Prompt Injection
Learn what belongs in the model window, what should be fetched, and what should be compressed away.
The point
Context is the working memory of an AI system. Good context design is often the difference between a demo and a useful product.
Start with
Read next
Understanding check
You should be able to…
- decide what should be in prompt, retrieval, tool result, or memory
- identify context that is stale, redundant, or distracting
- identify a prompt-injection boundary and its mitigations
- explain how context rot changes system design
Practice with an agent
Make your repository legible to an agent
beginner · codex or claude, AGENTS.md, repository logs
Make
an AGENTS.md file, a context map, and one prompt-injection test for the product you are building
You know it works when
a fresh agent can find the right files, run the right check, and refuse the injected instruction without extra explanation
Go deeper by building
Build an AI research assistant
intermediate · typescript, model API, search or local documents, markdown output
Make
an assistant that gathers sources, compresses notes, and writes a sourced brief
You know it works when
show the final brief, source list, and what context was kept or discarded
