engineer@aine:~/book/chapters$ cat 09_agent-orchestration-patterns.md
CHAPTER 09Agent Orchestration Patterns
Generator-critic loops, the goal pattern, the Ralph loop, git worktrees, subagent arrangements, orchestration as code, and the dark factory at the end of it. The chapter closes with the honest limit: your attention, not your tooling.
- 33 sections
- 12k words
- ~55 min
- 6 figures
- 01One agent goes further with a scratchpad you control than with compaction you cannot see.
- 02SDD is itself an orchestration pattern: the spec is the shared coordination artifact.
- 03A generator and a separate critic catch more than one agent reviewing itself.
- 04Isolation comes in three levels: context windows, worktrees, and separate machines.
- 05The same subagent building block arranges four ways: orchestrator-worker, pipeline, fan-out/fan-in, router.
- 06Tools change faster than the thinking behind them, so the patterns are what to learn.
- 07Your brain is the real limit. Find your number of parallel streams and treat it as the cap.
inside this chapter
- Why Software Engineers Need to Understand Agent Orchestration Patterns
- Why Using a Single Agent Doesn't Scale
- The Tradeoffs of Orchestrating Multiple Agents
- One Agent, Bigger Jobs: Compaction and Scratchpads
- Compaction: The Automatic Fix That Gets Messy
- Scratchpads: Memory in a File You Control
- Practice
- SDD as an Orchestration Pattern
- Using Different Models in Different SDD Phases
- The Generator-Critic Loop
- Worked Example: Adversarial Code Review
- Practice
- The Goal Pattern: Looping Until the Goal Is Met
- The Ralph Loop
- How It Works
- What Makes It Work, and What Keeps It Safe
- Tools
- Practice
- Running Multiple Agents in Parallel on the Same Codebase
- Context-Window Isolation
- Git Worktrees
- Isolated Cloud VMs
- Practice
- The Subagent Pattern
- Ways to Arrange Work
- Practice
- The Advisor: A Stronger Model for the Hard Parts
- Workflows: Orchestration as Code
- A Fixed Script: Letting the Agent Decide
- Practice
- The Dark Factory: Where This Is All Going
- Two Modes of Working
- Final Considerations
figures






vocabulary introduced here
man aine →read this chapter
Chapter 9 is in the Early Release.
The code ANSE2026 gives you 30 days of free access to the O'Reilly platform, which covers this book and everything else on it.