Context engineering
If prompt engineering answers "How do I phrase this question?", context engineering answers "What does the model need to know before I ask, and how do I maintain that knowledge throughout a session or project?"
Why it matters
Language models have no memory between sessions: every time a conversation starts, they begin from scratch. Without active context management, teams repeat instructions, the agent forgets previous decisions, and output quality degrades as the session progresses (what the Scrum Manager SDD manual calls context decay).
The context window also has a limit: the more instructions accumulate, the lower the probability that the model will follow each one individually. This phenomenon, known as the curse of instructions, makes context management a critical quality factor, not merely a matter of convenience.
Elements of context engineering
- Grounding: anchoring the model to verified sources of truth (project documents, repository code, and specs) to reduce hallucinations and align responses with the real context.
- Persistent instructions: rules and constraints that must apply to every interaction with the agent. For example: coding style, naming conventions, and security constraints.
- Selective memory: deciding which information from previous sessions should be retrieved and provided to the model in each new interaction, instead of accumulating everything.
- Priority hierarchy: when the context is long, specifying which instructions take precedence over others in case of conflict.
- Context windows by task type: different types of tasks (generating code, reviewing code, or writing documentation) need different contexts. Maintaining specialized contexts for each task type improves consistency.
Context engineering vs. prompt engineering
| Prompt engineering | Context engineering | |
|---|---|---|
| Scale | A single instruction | An entire project or session |
| Focus | How to phrase the question | What the model knows before answering |
| Time horizon | One-off | Persistent and evolving |
| Outcome | A better answer to a single question | Greater consistency over time |
Common mistake
Treating context as something provided at the start and never managed. An agent's context in a multi-session project needs active maintenance: updating the instructions as the project evolves, clearing out obsolete information, and periodically verifying that the agent is still operating on the correct assumptions. Outdated context produces outputs that are internally coherent but misaligned with the reality of the project.
See also
Want to advance in agility? You can search for course and exam calls or go at your own pace by becoming a member of the Agile Club. This membership includes exclusive resources, e-learning classrooms, and access to Skill Arena: a space to practice and measure your agile skills at your own pace.