Agentic Coding: A Pattern Language
Agentic coding is a software development practice in which developers delegate substantial parts of discovery, specification, implementation, and verification to AI agents. The relevant question is therefore not only what these systems can generate, but how their use should be organised, supervised, and constrained in real development settings.
This page presents nine patterns for structuring this work. The motivation for a pattern language is practical: similar failure modes recur across non-trivial, long-lived codebases, especially when generation becomes cheap but supervision, review, verification, and rollback remain costly. Under these conditions, the engineering problem shifts from generation to control.
The patterns are intended as a compact vocabulary for recurring workflow decisions in supervised human-AI development. They should be read neither as a fixed methodology nor as evidence-backed guarantees of improvement, but as recurrent responses to recurrent problems.
The longer argument, including the underlying failure modes and the rationale for a pattern language, is set out in the article Towards a Pattern Language for Agentic Coding.
Pattern Catalog
The current set includes the following nine patterns:
- Agent-Assisted Discovery.
Use the agent first to map the relevant subsystem, constraints, dependencies, and terminology before requesting changes. - Specification-Driven Development.
State the task in terms of goals, constraints, context, and acceptance criteria rather than relying on imperative prompting alone. - Plan-Driven Task Decomposition.
Translate the specification into an ordered set of small tasks with explicit dependencies, scoped context, and verification points. - Incremental Execution.
Carry out approved work in small, independently verifiable steps rather than large entangled change sets. - Role-Based Development & Subagents.
Separate exploration, implementation, and review across roles or sessions with structured handoff. - Memory & Context Management.
Treat context as a controlled input and externalise durable project knowledge into reusable artefacts. - Verification-First Engineering.
Design each step around independent checks that can falsify plausible but incorrect output. - Rollback & Reversibility.
Preserve recovery paths through checkpoints, isolated branches, or other mechanisms that keep undo cheap. - Cleanup & Hygiene.
Make cleanup explicit so repositories remain reviewable, maintainable, and free of agent-produced residue.
| # | Pattern | Focus |
|---|---|---|
| 1 | Agent-Assisted Discovery | Codebase and problem discovery before implementation |
| 2 | Specification-Driven Development | Declarative task framing and acceptance criteria |
| 3 | Plan-Driven Task Decomposition | Task sequencing, boundaries, and dependencies |
| 4 | Incremental Execution | Small-step implementation and local validation |
| 5 | Role-Based Development & Subagents | Role separation, specialization, and handoff |
| 6 | Memory & Context Management | Context scoping and durable project memory |
| 7 | Verification-First Engineering | Independent checks and falsification loops |
| 8 | Rollback & Reversibility | Recovery paths and cheap reversal of bad states |
| 9 | Cleanup & Hygiene | Repository cleanliness and post-task maintainability |