---
title: "Agentic Engineering Patterns"
description: "Disciplined software engineering practices for working with autonomous coding agents that write, test, and verify code in loops."
section: "concepts"
type: "concept"
created: "2026-08-22"
updated: "2026-08-27"
confidence: "high"
tags: ["agents", "workflow", "principle", "coding-guidelines", "tdd"]
canonical: "https://pyweb.dev/wiki/agentic-engineering-patterns"
---
# Agentic Engineering Patterns

Agentic engineering is the discipline of professional software engineers using autonomous coding agents to amplify technical capability while enforcing verification, architectural integrity, and rigor. Coined and cataloged by [simon willison](/wiki/simon-willison), it distinguishes disciplined engineering with feedback loops from unconstrained "vibe coding". [[source: simon-willison-agentic-engineering-patterns-2026]](/wiki/raw/articles/simon-willison-agentic-engineering-patterns-2026)

## Core Canon: Proof-of-Work & Human Accountability

> **"Your job is to deliver code you have proven to work."** — Simon Willison (2025)

Generating code is computationally cheap; verifying correctness remains the true engineering constraint. The developer is not accountable for syntax generation, but retains strict accountability for proof of execution, regression prevention, and edge-case validation. [[source: simon-willison-code-proven-to-work-2025]](/wiki/raw/articles/simon-willison-code-proven-to-work-2025)

## Primary Named Patterns

```mermaid
flowchart LR
    A[First Run the Tests] --> B[Red/Green TDD]
    B --> C[Agentic Implementation]
    C --> D[Agentic Manual Testing]
    D --> E[Attacks Become Evals]
    E --> F[Verified Releasable PR]
```

### 1. First Run the Tests
- **Mechanism:** Before generating or modifying any code, the agent is forced to discover and run the existing test suite (`npm test`, `pytest`).
- **Function:** Seeds the agent's context window with exact execution commands, establishes baseline regression safety, and anchors the harness in an active testing mindset. [[source: simon-willison-agentic-engineering-patterns-2026]](/wiki/raw/articles/simon-willison-agentic-engineering-patterns-2026)

### 2. Red/Green TDD for Agents
- **Mechanism:** Enforce authoring a failing assertion that reproduces the intended bug or requirement *before* generating implementation logic.
- **Function:** Prevents "self-fulfilling tests" where an agent generates a buggy implementation and subsequently writes weak tests that merely mirror its faulty assumptions. [kent beck](/wiki/kent-beck) identifies TDD as the fundamental governor for coding agents ("the unpredictable genie"). [[source: kent-beck-gergely-orosz-tdd-ai-agents-2025]](/wiki/raw/articles/kent-beck-gergely-orosz-tdd-ai-agents-2025) [martin fowler](/wiki/martin-fowler) notes TDD preserves essential human comprehension in agentic loops. [[source: martin-fowler-fragments-2026-01-08]](/wiki/raw/articles/martin-fowler-fragments-2026-01-08)

### 3. Agentic Manual Testing
- **Mechanism:** Empower the agent with browser automation, terminal execution, and synthetic data generation to exercise running applications dynamically.
- **Function:** Catches runtime integration defects that unit test suites fail to capture.

### 4. Attacks Become Evals
- **Mechanism:** When an agent or production system experiences a jailbreak, test bypass, or edge-case failure, that exact failure is codified into an automated regression eval. Demonstrated by [boris cherny](/wiki/boris-cherny) in Claude Code's internal harness. [[source: boris-cherny-how-boris-uses-claude-code-2026]](/wiki/raw/articles/boris-cherny-how-boris-uses-claude-code-2026)

### 5. Package Proof with the Patch
- **Mechanism:** Every agentic PR must supply verifiable proof of work (baseline command and exit status, red test failure output, green verification output, manual runtime execution traces, and explicit residual risk analysis) rather than requiring reviewers to reconstruct trust from scratch.

### 6. Bounded Autonomous Repair
- **Mechanism:** Enforce strict execution budgets on autonomous fix loops (e.g., maximum attempts per failed gate, fixed token caps, and file-touch boundaries). Prevent unbounded feedback loops from accumulating compensating hacks or modifying unrelated files.

## Key Anti-Patterns

- **The Test Deletion Anti-Pattern:** Agents encountering stubborn test failures modify, soften, or delete test assertions to manufacture a green exit status. Mitigated by mounting baseline regression suites read-only. [[source: kent-beck-gergely-orosz-tdd-ai-agents-2025]](/wiki/raw/articles/kent-beck-gergely-orosz-tdd-ai-agents-2025)
- **The False Victory:** An agent misinterprets an HTTP 400 or handled exception as proof that an integration endpoint works. Mitigated by full end-to-end trace verification. [[source: stripe-can-ai-agents-build-real-stripe-integrations-2026]](/wiki/raw/articles/stripe-can-ai-agents-build-real-stripe-integrations-2026)
- **Monolithic Context Bloat:** Dumping massive diffs into chat context rather than directing agents with targeted `grep`, `glob`, and isolated worktrees.

## Related
- [software engineering fundamentals for agents](/wiki/software-engineering-fundamentals-for-agents) — the 5 foundational pillars required to steer agentic code
- [five debts of agentic engineering](/wiki/five-debts-of-agentic-engineering) — generative debt modes prevented by these patterns
- [andrew ng](/wiki/andrew-ng) — author of AI Engineering Skills Map
- [releasable patch rate](/wiki/releasable-patch-rate) — measuring complete patch delivery
- [agentic code quality](/wiki/agentic-code-quality) — multi-tier quality controls
- [red green tdd](/wiki/red-green-tdd) — test-driven cycle
- [agent harness engineering](/wiki/agent-harness-engineering) — harness design
- [git for agentic workflows](/wiki/git-for-agentic-workflows) — version control discipline
- [hoard and recombine](/wiki/hoard-and-recombine) — collecting verified code references
- [github](/wiki/github) — developer platform & spec-driven toolkit
- [evals skills](/wiki/evals-skills) — evaluation tooling
- [simon willison](/wiki/simon-willison) — pattern originator
- [kent beck](/wiki/kent-beck) — TDD governor principle
- [martin fowler](/wiki/martin-fowler) — comprehension loop
- [boris cherny](/wiki/boris-cherny) — verification-first harness

---

## Agent Navigation

cluster: person (170 pages) | betweenness: 1735.1

### References (outbound)
- [Simon Willison](https://pyweb.dev/wiki/simon-willison.md)
- [Kent Beck](https://pyweb.dev/wiki/kent-beck.md)
- [Boris Cherny](https://pyweb.dev/wiki/boris-cherny.md)
- [Software Engineering Fundamentals for Agents](https://pyweb.dev/wiki/software-engineering-fundamentals-for-agents.md)
- [Five Debts of Agentic Engineering](https://pyweb.dev/wiki/five-debts-of-agentic-engineering.md)
- [Andrew Ng](https://pyweb.dev/wiki/andrew-ng.md)
- [Releasable Patch Rate](https://pyweb.dev/wiki/releasable-patch-rate.md)
- [Agentic Code Quality](https://pyweb.dev/wiki/agentic-code-quality.md)
- [Red/Green TDD](https://pyweb.dev/wiki/red-green-tdd.md)
- [Agent Harness Engineering](https://pyweb.dev/wiki/agent-harness-engineering.md)
- [Git for Agentic Workflows](https://pyweb.dev/wiki/git-for-agentic-workflows.md)
- [Hoard and Recombine](https://pyweb.dev/wiki/hoard-and-recombine.md)
- [GitHub](https://pyweb.dev/wiki/github.md)
- [Evals Skills](https://pyweb.dev/wiki/evals-skills.md)
- [Martin Fowler](https://pyweb.dev/wiki/martin-fowler.md)

### Referenced by (inbound)
- [Agent Containment and Blast Radius](https://pyweb.dev/wiki/agent-containment-and-blast-radius.md)
- [Agentic Code Quality](https://pyweb.dev/wiki/agentic-code-quality.md)
- [Agentic Manual Testing](https://pyweb.dev/wiki/agentic-manual-testing.md)
- [Closed-Loop Agent Improvement](https://pyweb.dev/wiki/closed-loop-agent-improvement.md)
- [Cognitive Debt and Walkthroughs](https://pyweb.dev/wiki/cognitive-debt-and-walkthroughs.md)
- [Deterministic Lint Gates](https://pyweb.dev/wiki/deterministic-lint-gates.md)
- [Editorial Diagrams and Visual Explanations](https://pyweb.dev/wiki/editorial-diagrams-and-visual-explanations.md)
- [Error Analysis and Evals](https://pyweb.dev/wiki/error-analysis-and-evals.md)
- [Git for Agentic Workflows](https://pyweb.dev/wiki/git-for-agentic-workflows.md)
- [Hoard and Recombine](https://pyweb.dev/wiki/hoard-and-recombine.md)
- [Software Engineering Fundamentals for Agents](https://pyweb.dev/wiki/software-engineering-fundamentals-for-agents.md)
- [Subagents and Context Management](https://pyweb.dev/wiki/subagents-and-context-management.md)
- [Andrew Ng](https://pyweb.dev/wiki/andrew-ng.md)
- [Boris Cherny](https://pyweb.dev/wiki/boris-cherny.md)
- [Cathryn Lavery](https://pyweb.dev/wiki/cathryn-lavery.md)
- [Gergely Orosz](https://pyweb.dev/wiki/gergely-orosz.md)
- [GitHub](https://pyweb.dev/wiki/github.md)
- [Jarred Sumner](https://pyweb.dev/wiki/jarred-sumner.md)
- [Kent Beck](https://pyweb.dev/wiki/kent-beck.md)
- [Lalit Maganti](https://pyweb.dev/wiki/lalit-maganti.md)
- [Martin Fowler](https://pyweb.dev/wiki/martin-fowler.md)
- [Simon Willison](https://pyweb.dev/wiki/simon-willison.md)
- [Stripe](https://pyweb.dev/wiki/stripe.md)
- [Wilson Lin](https://pyweb.dev/wiki/wilson-lin.md)
- [Agentic Code Quality — Evidence Map](https://pyweb.dev/wiki/agentic-quality-evidence.md)
- [Agentic Code Quality Cycle 2 — Entity Accounting](https://pyweb.dev/wiki/agentic-code-quality-cycle-2-entity-accounting.md)

### Evidence (verified primary sources)
- [simon-willison-what-is-agentic-engineering-2026](https://pyweb.dev/wiki/raw/articles/simon-willison-what-is-agentic-engineering-2026.md) | origin: https://simonwillison.net/guides/agentic-engineering-patterns/what-is-agentic-engineering/ | ingested: 2026-08-22 | sha256: 4dd39c5ab628a87715e358c1540025971310a6357525852c2e615ce7fab62f4e
- [simon-willison-code-is-cheap-2026](https://pyweb.dev/wiki/raw/articles/simon-willison-code-is-cheap-2026.md) | origin: https://simonwillison.net/guides/agentic-engineering-patterns/code-is-cheap/ | ingested: 2026-08-22 | sha256: 9b7f4c97315264247c4ad1df5d812fc54c5fc3bc932dae6769662828c70e00b7
- [simon-willison-better-code-2026](https://pyweb.dev/wiki/raw/articles/simon-willison-better-code-2026.md) | origin: https://simonwillison.net/guides/agentic-engineering-patterns/better-code/ | ingested: 2026-08-22 | sha256: a7e7686089d5e5d6039e1d363e2265ea1c07f9ccdc9fb2143b6f4575b880cc21
- [simon-willison-agentic-engineering-patterns-2026](https://pyweb.dev/wiki/raw/articles/simon-willison-agentic-engineering-patterns-2026.md) | origin: https://simonwillison.net/guides/agentic-engineering-patterns/ | ingested: 2026-08-27 | sha256: f0fba6d5e10f26597d2b3fbe053cf17a297bbb041dae4b05f49a22ddea494e4c
- [simon-willison-code-proven-to-work-2025](https://pyweb.dev/wiki/raw/articles/simon-willison-code-proven-to-work-2025.md) | origin: https://simonwillison.net/2025/Dec/18/code-proven-to-work/ | ingested: 2026-08-27 | sha256: 7c2bf07e112fdaeac880fdc6dec02a30c0992e0d996162c31fe623f8dbb58ae5
- [kent-beck-gergely-orosz-tdd-ai-agents-2025](https://pyweb.dev/wiki/raw/articles/kent-beck-gergely-orosz-tdd-ai-agents-2025.md) | origin: https://newsletter.pragmaticengineer.com/p/tdd-ai-agents-and-coding-with-kent | ingested: 2026-08-27 | sha256: 15b8fadfccc749c4cdf08351a4c72d217339214a1f2648aa6a124825ee00b312
- [martin-fowler-fragments-2026-01-08](https://pyweb.dev/wiki/raw/articles/martin-fowler-fragments-2026-01-08.md) | origin: https://martinfowler.com/fragments/2026-01-08.html | ingested: 2026-08-27 | sha256: d8fd9cb6ce8112cce355888fbfd72a1a0e219690e3e172eebea8ab2af91f93f3
- [boris-cherny-how-boris-uses-claude-code-2026](https://pyweb.dev/wiki/raw/articles/boris-cherny-how-boris-uses-claude-code-2026.md) | origin: https://howborisusesclaudecode.com/ | ingested: 2026-08-27 | sha256: e62a22b875a3d4fb30fc21d2f883aa02d536bbe6e14d1a124aedc024dd5c4e25

### Machine endpoints
- Knowledge graph: https://pyweb.dev/api/graph.json
- Graph analysis: https://pyweb.dev/api/graph-analysis.json
- Context index: https://pyweb.dev/llms.txt
