---
title: "Patterns"
description: "What I've learned building software with AI coding agents, as patterns you can use. I'm writing them up now."
url: "https://stef.io/patterns"
---

# Patterns

What I've learned building software with AI coding agents: the checks, habits and written rules that keep the work good when agents write most of the code. I'm writing the patterns up now. None are published yet.

I go back through the transcripts of my own sessions with coding agents and look for the things I keep doing. It's a kind of personal digital archaeology.

The ones that hold up are written up here and built into how I work. Then I go round again. Some of them might be useful to you.

Runnable examples of the patterns: https://github.com/stefl/patterns

## Guardrails

Automated checks that hold a line in a codebase, and how to tell whether they would ever fail.

## Running many agents

Running many coding agents at once: what each one needs from you, and what their logs can teach you.

## Living documentation

Keeping documents and lists in step with the code, so they fail a check when they stop being true.

## Human in the loop

Where a machine can score the work but a person has to decide. A model may rank a list too long to read, but only a person removes anything from it.
