Patterns
Tier 2

Patterns

The patterns that hold up when many agents run for months: delegation, isolation, orchestration, routing, memory, loops, and shipping without breaking things.

16 articles87 min total

Start reading →

Agents

  1. Anatomy of an agentWhat a specialist agent is on disk: a definition, a package with a CLI, a registry row, state it doesn't own, and one clear scope.5 min read
  2. Write the spec before the codeA short spec for a new agent, PRDs whose user stories become the test contract, and an intent gate that checks the build matches the ask.6 min read
  3. Sub-agents and delegationWhen to delegate, foreground vs background, what the prompt must carry, timeouts that actually kill, and naming the model tier on every lane.6 min read
  4. Worktree isolation: the hard lessonWhy parallel agents need their own git worktrees, the incidents that proved it, and the machine-enforced fix that replaced a prose rule.6 min read
  5. Orchestration: delegate down, verify upOne agent talks to the human, specialists do the work, and nothing reaches the human until it has been checked.5 min read
  6. Model routing: the right model for the workRoute by work type and blast radius, not habit. Model tiers, effort as a second dial, and when to add an off-plan model.5 min read
  7. Agent memory you ownThree layers of memory in plain files, the read, write, synthesize habit, and when to graduate to a database.5 min read

Loops and schedules

  1. Schedules as a heartbeatScheduled jobs are the system's pulse. Built-in options first, then cron vs launchd, staggered timing, and output that only speaks when something changed.6 min read
  2. The loops doctrineEvery future obligation becomes a machine loop with an off switch: cron, watcher, session loop or a dated one-shot.6 min read
  3. Watchers: condition until it firesA watcher checks one condition on a cadence, pings once when it is true, then stops. Expiry is mandatory. Here's how to build one.5 min read

Shipping

  1. Root cause first, never bandaidsDiagnose, fix the process, backfill, add a regression guard, then patch the symptom. In that order, with three real incidents.5 min read
  2. Ship to prod: review the product, not the diffPR, gates, merge, deploy, smoke test prod, then tell the human what to click. Plus the gate that decides when 'done' is actually true.5 min read
  3. The one-shot pipelineScaffold, lock intent, brief with ground truth, build in isolation, verify against stories, ship, log. Which steps machines enforce and which are still prose.6 min read
  4. The self-healing loopA scout reads the system's own failures and ranks fixes, a human approves, and isolated agents ship them with a failing test first.5 min read

Running the org

  1. Projects vs. todosA project has a goal, an end state and an artifact. Everything else is a todo. The rule that keeps a registry honest.4 min read
  2. Write the rules down, then enforce themA charter for a multi-agent system, and why every rule that matters eventually needs a hook, a gate or a detector.7 min read