Chapter 11: Context engineering for software development
Introduces software development as a domain where dependable AI assistance depends on context flowing across the development lifecycle, not just stronger models.
After this chapter you will be able to
- Reliable lifecycle context flow. Explain why stronger foundation models alone are insufficient for AI-assisted software development: repository state, architectural constraints, test signals, and operational metadata must flow reliably across lifecycle stages.
- Software development abstraction shift. Explain how AI-assisted coding extends the progression from machine instructions to high-level languages and natural language interfaces. Distinguish Software 1.0, 2.0, and 3.0, and describe the resulting shift in developers’ work.
- Human-led development and automation. Explain that people interpret requirements, make design decisions, and carry out development work, while automation follows predefined procedures.
- Inline autocomplete suggestions. Describe how autocomplete tools present LLM-generated code suggestions as provisional ghost text at the cursor.
- Local cues and context limits. Explain how comments and variable names could steer autocomplete, and why its speed benefit did not give it a holistic view of the project.
- Dialogue over local completion. Explain how conversational copilots let developers ask questions about code and express intent in natural language, enabling responses about specific snippets and proposals for larger portions of a result.
- Developer supplied context. Explain why Stage 2 conversational tools remained mostly reactive: developers still had to supply relevant code or errors or direct the model to the pertinent codebase areas.
- Repository-aware IDE context. Explain how AI-native IDEs differ from editors with AI extensions: they index the repository and use features such as RAG to bring relevant files into the model’s prompt.
- Coding agent task execution. Explain how a coding agent differs from a question-answering assistant: given a developer objective, it can use tools to carry out a bounded, multi-step coding task in the IDE or through a CLI.
- Coding agent context sources. Explain why intentional context engineering becomes part of a coding-agent workflow and identify the kinds of context the section names.
- Parallel sessions and subagents. Describe how Stage 5 work can span parallel agent sessions, each with its own working context, while subagents isolate context for delegated subtasks within a session.
- Context orchestration across agents. Explain why Stage 5 depends on splitting work, routing context, coordinating partial results, and preserving state so specialized agents have what they need for their subtasks.
- Bounded autonomy and developer oversight. Explain how the developer’s role changes as coding systems gain autonomy and how the surrounding context layer defines a safe operating envelope.
- Context continuity across stages. Explain why extending AI support beyond coding requires relevant information to survive across lifecycle stages and reach the right human or agent when needed.
- Conditional lifecycle acceleration. Explain why the shorter phase durations shown for an agentic SDLC are possibilities rather than guarantees, and state the conditions that make faster loops credible.
- Repeatable SDLC engineering routines. Explain how agent skills make an AI agent’s work more consistent across the SDLC than ad hoc prompting, while allowing different stages to use different contexts and quality gates.
- Lifecycle commands and skills. Describe how lifecycle-oriented agent commands activate skills for defining, planning, building, assessing, reviewing, simplifying, and shipping software.
- Repository instruction artifacts. Explain how instruction artifacts provide coding agents with durable, repository-specific guidance, including project workflows and boundaries.
- External documentation retrieval tradeoff. Explain why generic RAG is often a poor default for public software documentation and when internal RAG is a better fit.
- MCP roles in development. Explain how MCP servers move coding agents beyond isolated code generation by connecting them to engineering tools and data. Describe their two SDLC roles—supplying context and enabling actions—with examples of each.
- Curated coding agent memory. Explain why coding agents need memory across sessions and distinguish durable project knowledge worth retaining from information that should stay out of long-term memory.
- Versioned prompt context assets. Explain how teams can replace one-off prompts for recurring software development tasks with reusable templates that can be evaluated and improved over time.
- Specification as durable context. Explain why SDD uses a specification rather than a series of disposable prompts, and describe how that specification guides work beyond initial code generation.
- Three specification relationships. Distinguish spec-first, spec-anchored, and spec-as-source by what happens to the specification after initial implementation and how it relates to the codebase.
- Coding Agent Working Context. Explain why long coding sessions require context management and what a coding agent should retain or offload.
- Context Editing And Continuity. Distinguish clearing stale results, compacting an interaction, and persisting reusable information, using the coding-agent examples in the section.
- Repository Digest Tradeoffs. Justify when a whole-repository digest is useful and why targeted repository exploration is usually preferable for everyday coding.
- Focused context for development tasks. Explain how orchestration splits software development work across agents, gives each task relevant context, and merges results into the main workflow. Describe why this is preferable to putting an entire repository and transcript into one agent.
- Checks on coding-agent context. Justify why checks on a coding agent must reach its context, rather than stopping at the model, generated code, or passing tests.
- Artifact and Process Evaluation. Explain why evaluating a coding agent requires checking both its final code and the path it took, including the context and workflow it used.
- Eval-Driven Development Workflow. Describe how eval-driven development uses defined tasks and evals to guide incremental improvements to coding-agent behavior.
- Three Evaluation Metric Categories. Distinguish deterministic, qualitative, and LLM-as-judge metrics using the coding-agent example in this section.
- Causal visibility into changes. Explain that observability should identify the context and actions behind an AI-assisted change and track what happened when the change reached review, CI, or production.
- Combined observability layer. Justify why teams often build an observability layer over coding agents and describe the sources it combines.
- Task-scoped context access. Explain how teams limit the information a coding agent receives by approving context sources and supplying only the data needed for its current task.
- Credential-defined agent boundaries. Distinguish the access inherited by a locally run agent from the separately governed identity recommended for an autonomous cloud agent.
- Staged authority for actions. Describe how permissions and approvals should change as a coding agent moves from exploration to modification and high-impact actions.
- Maintenance of development context assets. Explain why teams should maintain the context assets that guide coding agents as engineering artifacts, with ownership, version control, review, and removal rules.
- Health of agent development tools. Explain why operations should check the tools coding agents use during development and what happens when those tools cannot provide working or current context.
- Controlled workflow comparison. Explain why all seven examples implement the same backlog-scoring feature: keeping the task constant makes differences in workflow, artifacts, and discipline attributable to the toolchain and context pattern.
- Staged Spec Kit workflow. Trace how the Spec Kit example moves from capturing intent and resolving ambiguity through planning, task breakdown, and consistency checks before implementation.
- Durable development context artifacts. Explain what the specification, plan, and task list each record in the backlog-scoring example and why keeping them separate helps the agent workflow.
- Three sources of coding context. Describe what the public skill pack, local files, and user prompt each contribute to the backlog-assistant example.
- Skills as staged workflow assets. Explain why this example uses skill commands across development stages instead of one all-at-once coding prompt.
- Four coding guidelines. Explain how the four guidelines address common pitfalls in LLM-based coding.
- Automatic Python rule application. Describe how the example makes the guidelines available to Cursor’s agent when it edits Python code.
- Current documentation for coding. Explain why repository access alone may not be enough when Codex uses fast-moving libraries, and how Context7 helps.
- Documentation guided implementation workflow. Trace the example workflow from retrieving FastAPI documentation before editing through updating the implementation and tests, then running and fixing tests. Describe the distinct context supplied by the repository, Context7, and the test suite.
- Superpowers workflow sequence. Describe how Superpowers uses specialized skills to structure development, from brainstorming a design through an implementation plan before writing source code.
- Structured coding workflow. Explain how Open GSD acts as a structured workflow layer for a coding agent such as Antigravity, turning ad-hoc requests into development stages.
- Workspace-based project state. Describe where Open GSD keeps project state and what kinds of files it maintains during development.
- Specialized agent task division. Explain how BMAD isolates context through specialized roles, including what each role focuses on and the artifacts named for the product manager, architect, and developer.
- Workflow artifacts as context anchors. Explain how the hands-on workflows shape development context by prioritizing different artifacts and routines, and why choosing one also determines what a team reviews and maintains.
- Task coordination and workflow choice. Apply the section's selection principle to distinguish when lightweight instructions, a spec-driven workflow, or multi-agent orchestration is warranted.
What it builds on
- Defining context engineering (chapter 1) · Introduces context engineering as a discipline.
- The anatomy of a skill (chapter 2) · The basic structure of an agent skill.
- Best practices for designing agent skills (chapter 2) · The earlier discussion of designing agent skills.
- Instruction artifacts in coding agents (chapter 2) · Introduces instruction artifacts in coding agents.
- Retrieval-augmented generation (chapter 3) · the basic idea of a RAG pipeline
- Model context protocol (chapter 4) · The introduction of MCP as a way for agents to access external tools and data.
- Memory (chapter 5) · the concept of memory in an agent
- Memory writing (chapter 5) · the idea of writing information to memory
Section by section
Introduction
Introduces software development as a domain where dependable AI assistance depends on context flowing across the development lifecycle, not just stronger models.
- Reliable lifecycle context flow: Explain why stronger foundation models alone are insufficient for AI-assisted software development: repository state, architectural constraints, test signals, and operational metadata must flow reliably across lifecycle stages.
Why it matters: It explains why context engineering matters even as coding models improve. - Evolution of coding assistance: Describe the progression named here from inline autocomplete and conversational copilots to autonomous coding agents and multi-agent systems spanning the SDLC.
Why it matters: This progression frames why development context now needs to support work beyond a single coding interaction.
Key terms: repository state, architectural constraints, test signals, operational metadata, software development lifecycle (SDLC), inline autocomplete, conversational copilots, autonomous coding agents, multi-agent development systems
11.1 AI-assisted coding
Introduces AI-assisted coding as a shift toward directing software development through natural language and context.
- Software development abstraction shift: Explain how AI-assisted coding extends the progression from machine instructions to high-level languages and natural language interfaces. Distinguish Software 1.0, 2.0, and 3.0, and describe the resulting shift in developers’ work.
Why it matters: It explains why the context supplied to AI becomes part of a developer’s work.
Key terms: Software 1.0, Software 2.0, Software 3.0, natural language, context engineering
11.1.1 Stage 0: traditional development
This section defines traditional development as human-led work supported by predefined automation and tools that do not understand code intent.
- Human-led development and automation: Explain that people interpret requirements, make design decisions, and carry out development work, while automation follows predefined procedures.
Why it matters: It establishes the human-led baseline against which later stages of AI-assisted coding are compared. - Limits of conventional coding tools: Describe why IDEs, terminal emulators, and basic autocomplete can be useful without understanding code intent.
Why it matters: It clarifies the limit of conventional tool assistance in this stage.
Key terms: traditional stage, developer, automation, predefined procedures, integrated development environments (IDEs), terminal emulators, basic autocomplete, static analysis, semantic understanding
11.1.2 Stage 1: autocomplete
This section describes the first stage of AI-assisted coding: inline LLM code completion that developers could steer locally but that had little awareness of the wider project.
- Inline autocomplete suggestions: Describe how autocomplete tools present LLM-generated code suggestions as provisional ghost text at the cursor.
Why it matters: It identifies what made this early form of AI coding assistance visible and useful during editing. - Local cues and context limits: Explain how comments and variable names could steer autocomplete, and why its speed benefit did not give it a holistic view of the project.
Why it matters: It distinguishes useful local code completion from project-wide understanding.
Key terms: LLM-based code completion, ghost text interface, inline code suggestions, prompt engineering, project architecture, active file
11.1.3 Stage 2: conversational copilots
Stage 2 shifts AI-assisted coding from autocomplete to dialogue while leaving the developer responsible for supplying relevant context.
- Dialogue over local completion: Explain how conversational copilots let developers ask questions about code and express intent in natural language, enabling responses about specific snippets and proposals for larger portions of a result.
Why it matters: This distinguishes a conversational copilot from an autocomplete tool. - Developer supplied context: Explain why Stage 2 conversational tools remained mostly reactive: developers still had to supply relevant code or errors or direct the model to the pertinent codebase areas.
Why it matters: A chat interface did not remove the developer’s responsibility for bringing the right code and errors into the conversation.
Key terms: conversational copilots, dialogue, natural language, mostly reactive, relevant code, codebase
11.1.4 Stage 3: AI-native IDEs
This section explains how AI-native IDEs bring repository-aware context and natural-language interaction directly into the development workspace.
- Repository-aware IDE context: Explain how AI-native IDEs differ from editors with AI extensions: they index the repository and use features such as RAG to bring relevant files into the model’s prompt.
Why it matters: It explains why an AI-native IDE can work with codebase context rather than relying only on code the developer manually supplies. - Prompt-first workspace interaction: Describe how developers interact with an AI-native IDE through natural-language prompts in the workspace, including ways to point it to specific resources.
Why it matters: It shows how developers can supply specific context without leaving the workspace.
Key terms: AI-native IDEs, index the entire repository, RAG, context engineering, natural language prompts, global chat sidebars, inline command bars, @ symbol
11.1.5 Stage 4: coding agents
This section explains how coding agents take on multi-step development tasks and why their work makes context engineering part of the development workflow.
- Coding agent task execution: Explain how a coding agent differs from a question-answering assistant: given a developer objective, it can use tools to carry out a bounded, multi-step coding task in the IDE or through a CLI.
Why it matters: The ability to act across multiple steps changes what developers can delegate to an AI tool. - Vibe coding delegation: Describe the division of work called vibe coding and why the section associates it with coding agents rather than earlier conversational copilots.
Why it matters: It illustrates how multi-step agent capabilities change the developer's role without removing developer review. - Coding agent context sources: Explain why intentional context engineering becomes part of a coding-agent workflow and identify the kinds of context the section names.
Why it matters: Agent work depends on more than a developer's prompt, so its development context must be managed intentionally.
Key terms: coding agent, IDE, CLI-based agents, tools, vibe coding, conversational copilots, intentional context engineering, managed context, repository, tool outputs
11.1.6 Stage 5: agentic systems
Stage 5 extends AI-assisted coding across parallel agent sessions and delegated subagents, making context orchestration and bounded autonomy essential.
- Parallel sessions and subagents: Describe how Stage 5 work can span parallel agent sessions, each with its own working context, while subagents isolate context for delegated subtasks within a session.
Why it matters: This explains how agentic coding can handle work across multiple modules without treating every task as one shared conversation. - Context orchestration across agents: Explain why Stage 5 depends on splitting work, routing context, coordinating partial results, and preserving state so specialized agents have what they need for their subtasks.
Why it matters: Running agents concurrently is not enough; their work and context must be coordinated. - Bounded autonomy and developer oversight: Explain how the developer’s role changes as coding systems gain autonomy and how the surrounding context layer defines a safe operating envelope.
Why it matters: Greater agent autonomy increases the need for explicit limits and human oversight.
Key terms: agent sessions, working context, subagents, delegated subtask, orchestration, route context, partial results, preserve state, boundaries, unrestricted autonomy
11.2 AI-driven software development lifecycle
The section explains how an AI-driven software lifecycle depends on context flowing across stages, and why its faster feedback loops require clear scope, reliable verification, and human review.
- Context continuity across stages: Explain why extending AI support beyond coding requires relevant information to survive across lifecycle stages and reach the right human or agent when needed.
Why it matters: Without continuity, each stage has to reconstruct understanding instead of building on earlier work. - Conditional lifecycle acceleration: Explain why the shorter phase durations shown for an agentic SDLC are possibilities rather than guarantees, and state the conditions that make faster loops credible.
Why it matters: A faster early phase is not a faster lifecycle if its mistakes create downstream rework. - Shifting planning and design work: Describe how requirements, planning, and architecture work can change in an agentic lifecycle, from developer intent expressed in natural language to technical plans and coordinated agent review.
Why it matters: AI assistance changes how a development task is formulated and reviewed before code is written. - Verification and human checkpoints: Trace how implementation and testing form a feedback loop, and describe where human involvement remains important.
Why it matters: Automated correction loops do not remove the need for human judgment at key decisions.
Key terms: context continuity, managed context, SDLC, agentic SDLC, feedback loops, rework, intent expression, technical plan, architecture agent, critic agent
11.3 Context engineering applied to software development
Introduces how the following subsections will apply the context engineering stack to software development.
11.3.1 Agent skills for the SDLC
This section explains how agent skills provide repeatable routines across the software development lifecycle and how teams can adopt and verify them.
- Repeatable SDLC engineering routines: Explain how agent skills make an AI agent’s work more consistent across the SDLC than ad hoc prompting, while allowing different stages to use different contexts and quality gates.
Why it matters: Repeatable routines help teams apply the right guidance and checks at each stage of development. - Lifecycle commands and skills: Describe how lifecycle-oriented agent commands activate skills for defining, planning, building, assessing, reviewing, simplifying, and shipping software.
Why it matters: The lifecycle mapping shows how a team can invoke appropriate skills as work moves from an idea toward production. - Skill verification before adoption: State what a team must check before trusting an agent skill in daily development work.
Why it matters: A reusable routine is only valuable if it activates appropriately and works safely on actual tasks. - Public and custom skill choices: Distinguish when public skill catalogs provide a starting point and when a team should invest in custom skills for its SDLC workflow.
Why it matters: Choosing between existing and custom skills helps teams gain reuse without losing project-specific controls.
Key terms: agent skills, SKILL.md, SDLC, quality gates, agent commands, specifications, acceptance criteria, TDD, review, CI/CD
11.3.2 Instruction artifacts in coding agents
This section explains how versioned instruction artifacts give coding agents repository-specific guidance and how shared and tool-specific artifact conventions coexist.
- Repository instruction artifacts: Explain how instruction artifacts provide coding agents with durable, repository-specific guidance, including project workflows and boundaries.
Why it matters: A coding agent needs project-specific instructions, not just generic model behavior. - Shared and tool-specific conventions: Distinguish the shared role of AGENTS.md from tool-specific instruction artifacts, and explain why artifact names and locations should not be treated as fixed standards.
Why it matters: The distinction helps teams share common guidance without assuming every coding agent uses the same files.
Key terms: instruction artifacts, versioned files, operational context, AGENTS.md, CLAUDE.md, agent-specific instruction artifacts
11.3.3 External knowledge for software development
This section explains why coding agents often use documentation-specific tools for fast-changing external knowledge, while internal RAG remains useful for private corpora.
- External documentation retrieval tradeoff: Explain why generic RAG is often a poor default for public software documentation and when internal RAG is a better fit.
Why it matters: The kind of documentation determines whether an extra retrieval pipeline helps or gets in the way. - Versioned documentation tool options: Describe how Context7 and Context Hub provide documentation to coding agents, including Context Hub’s persistent annotations.
Why it matters: These tools illustrate ways to give agents version-aware references without making a generic RAG pipeline the default. - Broad and focused knowledge search: Distinguish Exa MCP Server’s broad ecosystem search from Ref MCP’s documentation-focused search.
Why it matters: The choice depends on whether an agent needs wider ecosystem evidence or focused documentation lookup.
Key terms: external knowledge, generic RAG pipelines, documentation-specific tools, internal RAG, Context7, Context Hub, chub, local annotations, Exa MCP Server, Ref MCP
11.3.4 MCP servers for the SDLC
Explains how MCP servers let coding agents use engineering tools and data throughout the SDLC, both to gather context and to take action.
- MCP roles in development: Explain how MCP servers move coding agents beyond isolated code generation by connecting them to engineering tools and data. Describe their two SDLC roles—supplying context and enabling actions—with examples of each.
Why it matters: This distinction shows why an MCP-connected coding agent can participate in development work rather than only produce code.
Key terms: MCP servers, SDLC, context, engineering environment
11.3.5 Memory for coding agents
This section explains how coding-agent memory should preserve useful project knowledge across sessions and what factors guide a team's choice of memory approach.
- Curated coding agent memory: Explain why coding agents need memory across sessions and distinguish durable project knowledge worth retaining from information that should stay out of long-term memory.
Why it matters: Curated memory helps an agent reuse project knowledge without carrying forward noise or sensitive information. - Memory approach selection factors: State the factors this section gives for choosing among memory approaches for coding agents.
Why it matters: The best memory approach depends on what the team needs it to do.
Key terms: memory, continuity across sessions, curated project knowledge, long-term memory, tool integration, portability, coding-specific recall
11.3.6 Reusable prompts as context assets
This section explains how reusable, versioned prompt libraries make AI-assisted software development more consistent.
- Versioned prompt context assets: Explain how teams can replace one-off prompts for recurring software development tasks with reusable templates that can be evaluated and improved over time.
Why it matters: Reusable prompts give teams a consistent starting point that they can evaluate and refine. - Role-specific prompt organization: Describe how a software development prompt library can be organized by specialized SDLC roles and how teams choose frameworks and techniques for those roles.
Why it matters: Role-specific templates let a team standardize prompts without assuming one prompt design fits every task.
Key terms: reusable prompt library, prompt templates, versioned context assets, specialized SDLC roles, prompting framework, prompting techniques
11.3.7 Specification-driven development
This section explains how specification-driven development makes a specification the central context for AI-assisted software work, distinguishes three levels of use, and recommends adopting them progressively.
- Specification as durable context: Explain why SDD uses a specification rather than a series of disposable prompts, and describe how that specification guides work beyond initial code generation.
Why it matters: A stable specification helps an agent and a team carry the same intent through multiple development activities. - Three specification relationships: Distinguish spec-first, spec-anchored, and spec-as-source by what happens to the specification after initial implementation and how it relates to the codebase.
Why it matters: These levels clarify whether a spec is a one-time input, a maintained reference, or the ongoing source of truth. - Progressive SDD adoption: Justify the section’s recommended progression through the SDD levels, including the conditions for adopting spec-as-source.
Why it matters: The most demanding SDD level is useful only when a team can sustain its workflow and justify its cost.
Key terms: specification-driven development, SDD, specification, primary context artifact, prompt-first workflow, spec-first, spec-anchored, spec-as-source, source of truth, progressive adoption
11.3.8 Context management for coding agents
This section explains how coding agents keep useful context within token limits and when repository digests are worth using.
- Coding Agent Working Context: Explain why long coding sessions require context management and what a coding agent should retain or offload.
Why it matters: This is the reason coding agents must choose what to keep close at hand. - Context Editing And Continuity: Distinguish clearing stale results, compacting an interaction, and persisting reusable information, using the coding-agent examples in the section.
Why it matters: The distinction explains how an agent can make room for new work without losing the decisions needed to continue. - Compact Repository Structural Maps: Describe how Aider's repository map gives an agent codebase awareness without loading every file.
Why it matters: A structural overview helps an agent find where to inspect more deeply without spending tokens on every file. - Repository Digest Tradeoffs: Justify when a whole-repository digest is useful and why targeted repository exploration is usually preferable for everyday coding.
Why it matters: Choosing between a digest and direct exploration affects token cost and how closely the agent works from the actual source.
Key terms: context management, context window, working set, context editing, compaction, auto memory, pruning, continuation context, repository map, symbols
11.3.9 Context orchestration for coding agents
This section explains how coding-agent orchestration divides software development work among agents with focused contexts and compares ways tools and frameworks put that approach into practice.
- Focused context for development tasks: Explain how orchestration splits software development work across agents, gives each task relevant context, and merges results into the main workflow. Describe why this is preferable to putting an entire repository and transcript into one agent.
Why it matters: Focused context helps agents handle work spanning files, roles, or development phases without crowding every task into one session. - Coding agent context separation: Describe how Claude Code and OpenCode use specialized agents or subagents to keep development tasks in distinct contexts, including Claude Code’s lead-and-teammate model.
Why it matters: These tools show what task-focused orchestration looks like in coding-agent products. - Framework orchestration priorities: Distinguish the priorities of the four open-source orchestration projects described: BMAD Method, OpenAgents Control, Open GSD, and Superpowers.
Why it matters: The contrast shows that an orchestration layer can shape roles, approvals, continuity, or development discipline—not just delegate tasks.
Key terms: context orchestration, focused context, SDLC phases, subagents, agent teams, primary agents, context windows, BMAD Method, OpenAgents Control, Open GSD
11.4 Cross-cutting concerns for software development
Explains why software-development agents need cross-cutting safeguards that examine their context, not just their generated code.
- Cross-cutting context concerns: Explain that context sources, management, and orchestration are not sufficient on their own for real-world coding agents; evaluation, observability, governance, and operations cut across those layers.
Why it matters: It frames these concerns as requirements across the whole coding-agent system, rather than additions to one layer. - Checks on coding-agent context: Justify why checks on a coding agent must reach its context, rather than stopping at the model, generated code, or passing tests.
Why it matters: A coding agent can produce code that passes tests while relying on the wrong specification or outdated architecture information.
Key terms: context sources, context management, context orchestration, evaluation, observability, governance, coding agent, SDLC, context layer, green test suite
11.4.1 Evaluation
This section explains how to evaluate coding agents’ results and processes, use evals to guide development, and interpret coding-agent benchmarks.
- Artifact and Process Evaluation: Explain why evaluating a coding agent requires checking both its final code and the path it took, including the context and workflow it used.
Why it matters: A passing test suite cannot by itself show that an agent used the right context or followed the project’s workflow. - Eval-Driven Development Workflow: Describe how eval-driven development uses defined tasks and evals to guide incremental improvements to coding-agent behavior.
Why it matters: Defining what success looks like before assessing an agent makes improvements more controlled and regressions easier to spot. - Three Evaluation Metric Categories: Distinguish deterministic, qualitative, and LLM-as-judge metrics using the coding-agent example in this section.
Why it matters: These checks answer different questions, so combining them gives a broader assessment of an agent’s patch. - Repository and Terminal Benchmarks: Explain what coding-agent benchmarks test beyond isolated code generation and distinguish the tasks emphasized by SWE-bench and Terminal-Bench.
Why it matters: Benchmark results reflect an agent’s ability to work with a repository or environment, not just generate a plausible snippet.
Key terms: final artifact, path, context traces, tool-call logs, eval-driven development, EDD, evals, regressions, deterministic metrics, qualitative metrics
11.4.2 Observability
This section explains how teams can trace AI-assisted code changes back to their context and actions, then connect those changes to review, delivery, and production outcomes.
- Causal visibility into changes: Explain that observability should identify the context and actions behind an AI-assisted change and track what happened when the change reached review, CI, or production.
Why it matters: Tracing causes and outcomes helps teams tell reliable context patterns from ones that create hidden rework. - Development observability signals: Describe the kinds of evidence an observability layer should capture: context and active instructions, agent actions, cost and latency, review and rework, and later defects or incidents.
Why it matters: These signals let a team examine the development process alongside the quality and cost of its results. - Combined observability layer: Justify why teams often build an observability layer over coding agents and describe the sources it combines.
Why it matters: Combining these records gives teams a fuller view than a coding tool’s dashboard can provide on its own.
Key terms: observability, causality, context patterns, hidden rework, context traces, tool-call and command logs, active instruction artifacts, cost and latency, review and rework signals, defect and incident correlation
11.4.3 Governance
This section translates governance principles into controls over coding agents’ context, credentials, actions, and accountability.
- Task-scoped context access: Explain how teams limit the information a coding agent receives by approving context sources and supplying only the data needed for its current task.
Why it matters: Limiting context reduces the exposure of proprietary code and sensitive data. - Credential-defined agent boundaries: Distinguish the access inherited by a locally run agent from the separately governed identity recommended for an autonomous cloud agent.
Why it matters: A prompt asking an agent to stay within bounds does not replace enforceable credential permissions. - Staged authority for actions: Describe how permissions and approvals should change as a coding agent moves from exploration to modification and high-impact actions.
Why it matters: The consequences of reading code differ from those of changing or deploying it, so permissions should reflect the action. - Accountable context assets: Explain how teams make the context governing a coding agent’s work traceable and reviewable.
Why it matters: Traceable context lets a team account for the rules and information behind an important software change.
Key terms: context sources, sensitive data, minimum repository, document, or production data, identity, agent credentials, role-based access control, staged authority, repository-scoped permissions, approval gates, engineering assets
11.4.4 Operations
The section explains how operational routines keep coding agents’ development context and tools current and reliable.
- Maintenance of development context assets: Explain why teams should maintain the context assets that guide coding agents as engineering artifacts, with ownership, version control, review, and removal rules.
Why it matters: Maintained guidance reduces the chance that an agent follows outdated development practices. - Health of agent development tools: Explain why operations should check the tools coding agents use during development and what happens when those tools cannot provide working or current context.
Why it matters: Checking tool health helps prevent agents from guessing when they should be testing or consulting current sources.
Key terms: context assets, maintained engineering artifacts, version control, removal rules, tool health, development workflow, MCP servers, weaker context
11.5 Hands-on
The section introduces seven implementations of one backlog-scoring feature so readers can compare how context engineering patterns shape development workflows.
- Controlled workflow comparison: Explain why all seven examples implement the same backlog-scoring feature: keeping the task constant makes differences in workflow, artifacts, and discipline attributable to the toolchain and context pattern.
Why it matters: A common task lets you compare the approaches rather than the features they build.
Key terms: backlog-scoring feature, toolchain, context pattern
11.5.1 SDD with Spec Kit
Shows how Spec Kit uses a staged, specification-driven workflow and durable artifacts to provide context for a coding agent.
- Staged Spec Kit workflow: Trace how the Spec Kit example moves from capturing intent and resolving ambiguity through planning, task breakdown, and consistency checks before implementation.
Why it matters: The sequence keeps implementation tied to clarified intent and a checked plan. - Durable development context artifacts: Explain what the specification, plan, and task list each record in the backlog-scoring example and why keeping them separate helps the agent workflow.
Why it matters: Separate, reusable artifacts make the coding agent’s work easier to review and revise.
Key terms: Spec Kit, SDD workflow, consistency, specification, plan, task list, durable artifacts, central context asset
11.5.2 Claude Code with agent skills
Shows how Claude Code combines agent skills, local files, and a user prompt to make a coding task a staged SDLC workflow.
- Three sources of coding context: Describe what the public skill pack, local files, and user prompt each contribute to the backlog-assistant example.
Why it matters: Separating these roles makes it easier to see where a coding agent gets its task, constraints, and workflow. - Skills as staged workflow assets: Explain why this example uses skill commands across development stages instead of one all-at-once coding prompt.
Why it matters: The staged sequence is the example's reason for using skills rather than relying on one broad request.
Key terms: agent skills, public skill pack, CLAUDE.md, agent-skills-workflow.md, user prompt, executable context assets, staged SDLC workflow, skill commands
11.5.3 Cursor with instructions
Shows how Cursor instruction rules guide a coding agent toward deliberate, minimal, scoped, and verifiable changes.
- Four coding guidelines: Explain how the four guidelines address common pitfalls in LLM-based coding.
Why it matters: These guidelines turn common coding-agent failure modes into explicit expectations for its work. - Automatic Python rule application: Describe how the example makes the guidelines available to Cursor’s agent when it edits Python code.
Why it matters: The file-matching rule explains how these instructions reach the agent during the example coding task.
Key terms: Think before coding, Simplicity first, Surgical changes, Goal-driven execution, custom rule file, .cursor/rules/karpathy-guidelines.mdc, .py glob
11.5.4 Codex with Context7
This hands-on example shows how Codex can combine repository context, current library documentation from Context7, and test feedback while implementing code.
- Current documentation for coding: Explain why repository access alone may not be enough when Codex uses fast-moving libraries, and how Context7 helps.
Why it matters: Current library documentation can help Codex avoid relying on stale information while working in a project. - Documentation guided implementation workflow: Trace the example workflow from retrieving FastAPI documentation before editing through updating the implementation and tests, then running and fixing tests. Describe the distinct context supplied by the repository, Context7, and the test suite.
Why it matters: The workflow connects project details and current technical guidance with feedback from running the code.
Key terms: Codex, Context7, version-specific documentation, repository context, external technical knowledge, execution feedback, test suite
11.5.5 OpenCode with Superpowers
Shows how Superpowers structures an OpenCode coding workflow around design and planning before source code.
- Superpowers workflow sequence: Describe how Superpowers uses specialized skills to structure development, from brainstorming a design through an implementation plan before writing source code.
Why it matters: The sequence keeps design and planning explicit before implementation begins. - OpenCode plugin location: State where the project specifies the Superpowers plugin location for OpenCode.
Why it matters: OpenCode needs the project configuration to locate the plugin.
Key terms: Superpowers, superpowers/brainstorming, superpowers/writing-plans, superpowers/test-driven-development, docs/superpowers/specs/, docs/superpowers/plans/, OpenCode, plugin, opencode.json
11.5.6 Antigravity with Open GSD
Shows how Open GSD gives an existing coding agent a staged development workflow and keeps its project state in workspace files.
- Structured coding workflow: Explain how Open GSD acts as a structured workflow layer for a coding agent such as Antigravity, turning ad-hoc requests into development stages.
Why it matters: The commands give the agent a development process rather than leaving each request ad hoc. - Workspace-based project state: Describe where Open GSD keeps project state and what kinds of files it maintains during development.
Why it matters: These workspace files make the workflow's plans and current state available as the agent moves through development.
Key terms: Open GSD, Antigravity, structured workflow layer, .planning/, REQUIREMENTS.md, ROADMAP.md, STATE.md, .planning/phases/
11.5.7 Specialized agents with the BMAD Method
This section shows how the BMAD Method organizes a coding workspace and isolates context by assigning work to specialized agents.
- BMAD workspace directory roles: Distinguish the purpose of _bmad/ from _bmad-output/ and identify where agent roles are defined.
Why it matters: The directory split makes it clear which files configure the agents and which files record their work. - Specialized agent task division: Explain how BMAD isolates context through specialized roles, including what each role focuses on and the artifacts named for the product manager, architect, and developer.
Why it matters: The role assignments are the section’s concrete example of context isolation in a multi-agent coding workflow.
Key terms: _bmad/, _bmad-output/, _bmad/agents/, role decomposition, context isolation, product manager, architect, developer, reviewer
11.5.8 Comparing the hands-on workflows
The section compares hands-on coding workflows by the context artifacts they prioritize and the coordination costs that justify using them.
- Workflow artifacts as context anchors: Explain how the hands-on workflows shape development context by prioritizing different artifacts and routines, and why choosing one also determines what a team reviews and maintains.
Why it matters: Comparing the artifact each workflow prioritizes helps a team see the ongoing commitment behind its tool choice. - Task coordination and workflow choice: Apply the section's selection principle to distinguish when lightweight instructions, a spec-driven workflow, or multi-agent orchestration is warranted.
Why it matters: Matching structure to coordination cost avoids unnecessary overhead while preserving intent and reviewability when work grows complex.
Key terms: source of truth, specification, skill, rule file, memory store, coordination cost, documentation-grounded agent, spec-driven workflow, multi-agent orchestration, context boundaries
11.6 Summary
Concepts explained in this chapter
- agent orchestrationAgentic orchestration coordinates an agent's actions, tools, and execution steps toward a task.
- specificationA description of the requirements, intended behavior, interfaces, and constraints that a software system is expected to satisfy.
- agent skillA reusable set of instructions and resources that extends an agent's capabilities for a specialized workflow.
- evaluationEvaluation is the structured testing and measurement of an AI system's behavior and performance.
- specification-driven developmentSpec-driven development is a software development approach in which a specification guides planning, task breakdown, and implementation.
- context managementContext management is the shaping of context through selecting, writing, compressing, and isolating information before model consumption.
- compactionA process that summarizes an agent conversation and discards lengthy details while preserving high-level task information.
- context editingThe removal or modification of information in an agent’s active context to manage its contents and size.
- evaluation-driven developmentA software engineering paradigm that makes evaluations the proactive driver of development.
- context engineeringContext engineering is the discipline of selecting, organizing, and updating information supplied to a model in an appropriate form and at an appropriate time.
- continuityContinuity is the preservation of relevant state and information across interaction turns, sessions, or workflow steps.
- AI governanceGovernance comprises the structures, processes, policies, and controls that direct how AI systems are developed and operated.
- observabilityObservability is the ability to understand a system's internal behavior through signals such as logs, traces, and metrics.
- context sourceA context source is a source of information supplied to an AI model for interpreting or executing a task.
- instruction fileA project-specific document or configuration that gives operational instructions to an AI agent.
- memoryInformation retained across interactions or steps so an AI system can use it later.
- MCP serverAn MCP server is a software component that exposes capabilities or information to AI applications through the Model Context Protocol.
- AGENTS.mdA portable Markdown file that provides project-specific instructions for AI coding agents.
- LLM-as-a-judgeAn evaluator is a component that assesses outcomes against specified criteria or metrics.
- ReActReAct is an agent reasoning pattern that alternates between internal reasoning and external actions such as tool invocation.
- promptA prompt is an input supplied to a language model to elicit a response or guide its behavior.
- prompt engineeringPrompt engineering is the practice of designing and refining inputs to a language model to influence the quality and character of its output.
- AI agentAn AI agent is a system that pursues goals by interpreting tasks, planning actions, using resources, and adapting its behavior with limited human intervention.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
