Frontispiece · why a pattern library

The reasoning behind the gf.cx specimen book

Why patterns

Source · Dan, 2026-06-20

"made-with, favicon, is the new-base-tablestakes … patterns are the way out of this drift."

The rest of this site is thirty-odd concrete patterns — recipes, traps, disciplines, UX primitives lifted from building the gf.cx portfolio. This page is the why: what a pattern is, where the idea comes from, and why we keep a library of them at all. The short version is that a pattern is a named move for a problem that keeps coming back — and naming the move is what lets it travel between projects, between people, and now between us and the agents we build with.

What a pattern is

The AI Pattern Book puts the definition plainly: when the same kind of move keeps working on a problem that keeps coming back, that move earns a name. Not a rule to follow blindly — a principle you still apply with judgement — but a name, so you can point at it, reuse it, and recognise it in the wild.

"When the same kind of move keeps working on a problem that keeps coming back, that move deserves a name."

Everything downstream flows from the name. A named move can be catalogued. A catalogued move can be searched, cited, taught, and — the part that matters most here — requested precisely.

The lineage

The idea isn't new, and it didn't start in software. It starts with a building architect and arrives, fifty years later, at how we direct language models.

  1. 1977
    Christopher Alexander · A Pattern Language
    An architect catalogues 253 recurring "design moves" for towns and buildings — a courtyard that lives, a window seat, a six-foot balcony. The insight: good design is a vocabulary of solutions that connect to one another, not a set of one-off inventions.
  2. 1994
    The Gang of Four · Design Patterns
    Gamma, Helm, Johnson & Vlissides carry Alexander's idea into code — 23 reusable object-oriented solutions (Singleton, Observer, Visitor…). Each entry has the same skeleton: context, problem, forces, solution, consequences. A pattern becomes a structured thing, not just a name.
  3. 2026
    Directing AI agents
    Pattern vocabulary stops being a convenience for humans and becomes the interface to the machine. "Apply Decomposition" lands more definitively than "break this into smaller pieces," because the agent understands the structure the name carries. The clearer the description, the better the output.

Why it matters more now

For fifty years a pattern's payoff was mostly on the reader's side — you recognised the move and saved yourself the rediscovery. The AI Pattern Book's sharper claim is that the payoff has moved to the instruction side. When you direct an agent, precise pattern language does the work that a paragraph of hand-waving can't:

"The vocabulary does the work."AI Pattern Book · what are design patterns

This is not theory for us — it's the operating reality of how this portfolio ships. Surfaces get built by handing an agent a pattern-structured plan and executing it task-by-task; the agent evaluates its own output against the named move, spots where it drifted, and corrects — often without a human in the loop. A library of named moves is therefore two things at once: documentation for future-Dan, and a shared vocabulary that makes the agent's output land the first time. The page you're reading was itself assembled that way.

How ours differ

The Gang of Four catalogued the internal structure of code. This library catalogues the moves of shipping surfaces — the deploy mechanics, the Cloudflare gotchas, the UX primitives, the disciplines that keep a portfolio from drifting apart. Same instinct, different domain.

 Gang of Four (1994)patterns.gf.cx
DomainObject-oriented code structureOperating a live web portfolio
A typical entryObserver — decouple a subject from its dependentsBASE_URL one-line swap — one constant, one edit on bind day
ReaderA developer writing a classFuture-Dan, a collaborator — and the agent building the next surface
The enemyCoupling & rigidityDrift — surfaces quietly falling out of sync

The shared skeleton survives the jump. Every entry here carries the same load-bearing parts the Gang of Four used and the AI Pattern Book still recommends — context, problem, forces, solution, consequences — dressed in this book's own headings: Source · The problem · The shape · When it breaks · Reusable elements · Reference.

The one rule

A pattern only earns a page after it has paid for itself on a real surface at least once. The library isn't a wish-list of good ideas — it's a record of moves that already worked, written down the moment they recurred so the next build starts correct instead of getting fixed later. That's the whole game: each named move raises the floor, and the floor rises every time a surface ships. Patterns are how we climb out of drift instead of hand-patching it forever.

Reference

Framing source
aipatternbook.com · What are design patterns — the definition, the Alexander→GoF lineage, and the "vocabulary does the work" thesis this page builds on.
Origin (1977)
Christopher Alexander, A Pattern Language — 253 design moves for the built environment; the source of the whole idea.
Origin (1994)
Gamma, Helm, Johnson & Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software — 23 patterns; the context/problem/forces/solution/consequences skeleton this book reuses.
Our stance
Dan, 2026-06-20 — "patterns are the way out of this drift." Operating patterns, not code patterns; each earns its page only after paying for itself on a live surface.
In use / example
Every entry in the catalogue — see surface assembled from patterns for a whole subdomain built from the library in one session.