Agentic Engineering Patterns — Key Takeaways from Simon Willison’s Guide
8th March 2026
Simon Willison recently published an excellent guide on agentic engineering patterns. It collects practical lessons from building with AI coding agents. Here are the key takeaways that matter most for AI agent developers, distilled from his full guide.
The Core Insight
Writing code is cheap now, but bad code is still expensive. The guide isn’t about generating more code faster. It’s about building guardrails for quality into your agent workflows.
Key Patterns Worth Adopting
1. Red/Green TDD as a Default Agent Pattern
The prompt “Use red/green TDD” is a concise way to get much better results. Have your agent do three steps:
- Write the tests first.
- Confirm that they fail.
- Implement.
This prevents hallucinated or dead code and builds a regression suite. Consider making this part of your agent’s default workflow.
2. “First Run the Tests” as a Session Opener
Starting every agent session with “first run the tests” does three things:
- It teaches the agent that the test harness exists.
- It gives the agent a sense of project size.
- It puts the agent in a testing mindset.
This is a great pattern to embed in your agent’s initialization.
3. Agentic Manual Testing
Unit tests aren’t enough. Have agents test their own work manually with:
curlfor APIspython -cfor quick checks- browser automation tools (Playwright, Rodney, agent-browser) for web UIs
Manual testing catches bugs that automated tests miss.
4. Hoard Working Examples
Build a personal library of working code snippets, proofs-of-concept, and tools. These become useful inputs for agents. You can tell an agent to combine two existing working examples into something new. The recombination pattern is extremely effective.
5. Linear Walkthroughs to Understand Agent-Written Code
When you vibe-code a project, use agents to generate structured walkthroughs of the codebase. Tools like Showboat capture the agent’s exploration with real commands and outputs (not hallucinated summaries). This reduces cognitive debt.
6. Interactive Explanations
For complex algorithms, have agents build animated/interactive visualizations. This is a good way to truly understand what your agent built rather than treating it as a black box.
7. Never Inflict Unreviewed Code on Collaborators
The #1 anti-pattern is to dump agent-generated PRs without reviewing them yourself. Include evidence of testing (screenshots, manual test notes, small focused PRs).
8. Bias Toward Action — Prompt Anyway
When your instinct says “not worth the time,” start an async agent session anyway. The worst case is that you check the result later and discard it.
Most Actionable for Agent Development
| Pattern | How to Apply It |
|---|---|
| Red/green TDD built-in | Make your agent default to test-first development |
| “First run the tests” initialization | Have your agent discover and run existing tests at session start |
| Manual verification | Integrate curl, python -c, and browser automation — not just unit tests |
| Hoarding + recombination | Build a searchable library of working examples your agent can reference |
| Browser automation | Integrate Playwright/Rodney for agents building web UIs — visual verification catches what unit tests miss |
| Linear walkthroughs | Use agents to document agent-written code with real commands and outputs, not summaries |
| Small focused PRs | Break agent work into reviewable chunks with evidence of testing |
Bottom Line
The biggest shift is treating agents not as code generators but as junior developers who need process. Give them:
- TDD
- test suites to run
- manual verification tools
Then review their work before shipping. The patterns that make human teams productive make agent teams productive too.
Read the full guide: simonwillison.net/guides
More recent articles
- pi-durable, from the ground up - 20th October 2026
- Hermes Agent: The Self-Improving Story - 12th June 2026
- Claude Code Dynamic Workflows: Inside Out - 29th May 2026