| `28-gas-town.prose` | Multi-agent orchestration ("Kubernetes for agents") with 7 worker roles, patrols, convoys, and GUPP propulsion |
| `29-captains-chair.prose` | Full captain's chair pattern: coordinating agent dispatches subagents for all work, with parallel research, critic review cycles, and checkpoint validation |
The architect-by-simulation pattern is for designing systems by "implementing" them through reasoning. Instead of writing code, each phase produces specification documents that the next phase builds upon.
**Key principles:**
1.**Thinking/deduction framework**: "Implement" means reasoning through design decisions
2.**Serial pipeline with handoffs**: Each phase reads previous phase's output
3.**Persistent architect**: Maintains master plan and synthesizes learnings
4.**User checkpoint**: Get plan approval BEFORE executing the pipeline
5.**Simulation as implementation**: The spec IS the deliverable
```prose
# The core pattern
agent architect:
model: opus
persist: true
prompt: "Design by simulating implementation"
# Create master plan with phases
let plan = session: architect
prompt: "Break feature into design phases"
# User reviews the plan BEFORE the pipeline runs
input user_approval: "User reviews plan and approves"
# Execute phases serially with handoffs
for phase_name, index in phases:
let handoff = session: phase-executor
prompt: "Execute phase {index}"
context: previous_handoffs
# Architect synthesizes after each phase
resume: architect
prompt: "Synthesize learnings from phase {index}"
context: handoff
# Synthesize all handoffs into final spec
output spec = session: architect
prompt: "Synthesize all handoffs into final spec"
```
See example 39 for the full implementation.
## The Captain's Chair Pattern
The captain's chair is an orchestration paradigm where a coordinating agent (the "captain") dispatches specialized subagents for all execution. The captain never writes code directly—only plans, coordinates, and validates.
**Key principles:**
1.**Context isolation**: Subagents receive targeted context, not everything
2.**Parallel execution**: Multiple subagents work concurrently where possible
3.**Continuous criticism**: Critic agents review plans and outputs mid-stream
4.**80/20 planning**: 80% effort on planning, 20% on execution oversight
5.**Checkpoint validation**: User approval at key decision points
```prose
# The core pattern
agent captain:
model: opus
prompt: "Coordinate but never execute directly"
agent executor:
model: sonnet
prompt: "Execute assigned tasks precisely"
agent critic:
model: sonnet
prompt: "Review work and find issues"
# Captain plans
let plan = session: captain
prompt: "Break down this task"
# Parallel execution with criticism
parallel:
work = session: executor
context: plan
review = session: critic
context: plan
# Captain validates
output result = session: captain
prompt: "Validate and integrate"
context: { work, review }
```
See examples 29-31 for full implementations.
## The Recursive Language Model Pattern
Recursive Language Models (RLMs) are a paradigm for handling inputs far beyond context limits. The key insight: treat the prompt as an external environment that the LLM can symbolically interact with, chunk, and recursively process.
**Why RLMs matter:**
- Base LLMs degrade rapidly on long contexts ("context rot")
- RLMs maintain performance on inputs 2 orders of magnitude beyond context limits
- On quadratic-complexity tasks, base models get <0.1%whileRLMsachieve58%
**Key patterns:**
1.**Self-refinement**: Recursive improvement until quality threshold