A capable coding model can still perform poorly when it receives the wrong context. Too little information forces it to guess. Too much consumes attention, increases cost and allows stale or irrelevant material to displace the facts that matter. In an enterprise repository, context must also respect ownership, permissions and source authority.
Context engineering treats this as a systems problem rather than a prompting trick. It determines what an agent should know, where that knowledge comes from, when it should be retrieved and how its quality can be evaluated. The result is a deliberate information architecture spanning repository instructions, task specifications, code search, documentation and tool output.
This course gives participants practical methods for improving agent performance while keeping context concise, current and auditable.
Learning Outcomes
Upon completion of this course, participants will be able to:
- Diagnose context-related failure modes in coding-agent workflows
- Design layered project instructions for repositories and teams
- Identify authoritative sources for architecture, standards and domain knowledge
- Build targeted retrieval across code, documentation and development systems
- Compress long-running context without losing decisions or constraints
- Apply permissions and provenance to retrieved information
- Evaluate whether context improves task outcomes rather than merely increasing token use
- Establish a maintainable context strategy for an enterprise engineering team
Course Outline
Context as an Engineering System
- From prompt engineering to context engineering
- Model instructions, task context, retrieved knowledge and tool observations
- Attention limits despite large context windows
- Failure modes caused by missing, stale, conflicting and excessive information
- The relationship between context quality, reliability, latency and cost
- Defining ownership for shared context assets
Mapping Enterprise Codebase Knowledge
- Repository structure, service boundaries and dependency maps
- Architecture decisions, conventions and domain terminology
- Source code, tests, schemas and deployment configuration as evidence
- Identifying authoritative and secondary documentation
- Knowledge distributed across issues, wikis and operational systems
- Building an inventory without duplicating every source
Designing Project Instructions
- Global, organisational, repository and directory-level instructions
- Separating stable principles from task-specific direction
- Coding standards, commands, quality gates and prohibited changes
- Using examples and references instead of long prose
- Resolving conflicting instructions and inherited rules
- Testing instructions against representative development tasks
Constructing Task Context
- Goals, non-goals, constraints and acceptance criteria
- Asking an agent to investigate before selecting context
- Referencing files, symbols, tests and prior decisions precisely
- Supplying examples that reveal intended behaviour
- Distinguishing evidence from assumptions and suggestions
- Keeping task packets small enough for review
Retrieval for Code and Documentation
- Lexical, semantic and symbol-aware code search
- Chunking code without destroying structural meaning
- Hybrid retrieval across repositories and documentation
- Query expansion using dependencies, call graphs and ownership
- Ranking by relevance, authority, freshness and permission
- Returning citations and navigable source references
Managing Long-Running Context
- Working memory, task state and durable project knowledge
- Summarising exploration while preserving key evidence
- Recording decisions, unresolved questions and rejected approaches
- Compaction strategies for extended agent sessions
- Detecting context drift after code or requirements change
- Restarting with a clean context when repair is no longer reliable
Security and Information Boundaries
- Permission-aware retrieval and user-context propagation
- Preventing confidential code from crossing projects or jurisdictions
- Treating retrieved documents and tool output as untrusted content
- Indirect prompt injection through issues, comments and documentation
- Redacting secrets and sensitive operational information
- Auditing which sources influenced an agent action
Evaluating Context Quality
- Building tasks that expose context strengths and weaknesses
- Comparing minimal, retrieved and full-repository context
- Measuring task success, unsupported assumptions, rework and token use
- Detecting retrieval that is plausible but not useful
- Capturing production failures as context regression tests
- Managing context assets as versioned engineering artefacts
Practical Capstone
- Map the knowledge needed for a change in a multi-service repository
- Create layered project and task instructions
- Configure targeted code and documentation retrieval
- Apply source authority and permission controls
- Compare outcomes against a poorly constructed context baseline
- Present a maintainable context architecture and evaluation plan
Intended audience
This course is designed for software developers, technical leads, architects, developer-experience engineers and platform teams supporting AI-assisted development across substantial or complex codebases. It is particularly useful for organisations where agents must work with internal standards, multiple repositories and restricted information.
Prerequisites
Those attending this course should meet the following:
- Professional software development experience
- Familiarity with Git and large codebase navigation
- Basic experience using an AI coding assistant or agent
- Understanding of software architecture and automated testing
