Annotated version of 'Welcome to Gas Town'Term -- The Town
Here is the original blog post https://steve-yegge.medium.com/welcome-to-gas-town-4f25ee16dd04 by Steve Yegge
Annotated quotes from the post
The annotations work like this. If I can replace a concept directly inline in the quote with a link, I do that. If not, I add an annotation with further details afterwards.
Section 1 - What the heck is Gas Town?
Steve Yegge's AI adoption Chart
Section 2 - Gas Town Was No Secret
It will have to have multiple levels of agents supervising other agents,” I said.
“It will have a Merge Queue,” I said.
“It will orchestrate workflows ,” I said.
“It will have plugins and quality gates,” I said.
Section 3 - WARNING DANGER CAUTION
Gas Town is designed to scale up in three dimensions this year with (1) model cognition, (2) agents becoming more Gas Town-friendly, and(3) Gas Town and Beads making it into the training corpus for frontier models Even without all that, it’s already shocking that the agents use Beads and Gas Town so effortlessly. With zero training.
Section 4 - Gas Town 101
The Town: This is your HQ. Mine is ~/gt, and all my project rigs go beneath it: gastown, beads, wyvern, efrit, etc.. The town (Go binary gt) manages and orchestrates all the workers across all your rigs. You keep it in a separate repo, mostly for the configuration.
^ Term -- Rigs
Rigs: Each project (git repo) you put under Gas Town management is called a Rig. Some roles (Witness, Polecats, Refinery, Crew) are per-rig, while others (Mayor, Deacon, Dogs) are town-level roles. gt rig add and related commands manage your rig within the Gas Town harness. Rigs are easy to add and remove.
Does Work Level -- Rig
^ Term -- The Mayor
From blog post - gas town from clown show to v 1 Steve says:
I realized I just wanted someone to talk to, while the system was working. And perhaps, as occasion might demand, someone to yell at.
The Mayor abstraction turned out to be perfect. Mayors are there to get yelled at. A Mayor isn’t so distant, like some higher-level governor or executive, to whom yelling seems like it will go unheard. A city mayor is ostensibly someone who has your local interests at heart, so the mayor is who you yell at first. It’s a social custom going back centuries. As one famous and rather wise U.S. mayor put it a week ago, if your constituents aren’t yelling at you, it’s because they aren’t around at all, and you don’t want that.
Helps solve the agent problem - agents make you read too much.
^ Term -- Polecats
^ Term -- Refinery
Refinery: As soon as you start swarming workers, you run into the Merge Queue (MQ) problem. Your workers get into a monkey knife fight over rebasing/merging and it can get ugly. The baseline can change so much during a swarm that the final workers getting merged are trying to merge against an unrecognizable new head. They may need to completely reimagine their changes and reimplement them. This is the job of the Refinery: the engineer agent responsible for intelligently merging all changes, one at a time, to main. No work can be lost, though it is allowed to escalate.
^ Term -- The Witness
The Witness: Once you spin up enough Polecats, you realize you need an agent just to watch over them and help them get un-stuck. Gas Town's propulsion (GUPP) is effective, but still a bit flaky right now, and sometimes you will need to go hustle the polecats to get their MRs submitted, and then hustle the Refinery to deal with them. The Witness Patrol helps smooth this out so it's almost perfect for most runs.
^ Term -- The Deacon
Town level character
^ Term -- Dogs
Dogs: Inspired by Mick Herron’s MI5 “Dogs”, this is the Deacon’s personal crew. Unlike polecats, Dogs are town-level workers. They do things like maintenance (cleaning up stale branches, etc.) and occasional handyman work for the Deacon, such as running plugins.
^ Term -- Boot the Dog
^ Term -- The Crew
C-b n/p. The Crew are the direct replacements for whatever workflow you used to be using. It’s just a bunch of named claude code instances that can get mail and can sling work around. The crew are great for stuff like design work, where there is a lot of back-and-forth. They’re great. You’ll love your crew.^ Term -- Patrol
long strings of steps to follow, encoded as linked beads. Basically a workflow.
A Town level concept
Patrols are done by The Deacon and The Witness
General Notes
gt worktree command that they can use to grab their own clone of any rig and make a fix. But normally they work inside a single project.Section 5 - A Note About Mad Max Theming
Section 6 - Gastown Universal Propulsion Principle
Both Role Beads and Agent Beads (as well as Hooks) are examples of Pinned Beads”, meaning they float like yellow-sticky notes in the Beads data plane, and never get closed like regular issues (unless the identity goes away). They don’t show up in bd ready (ready work) and they’re treated specially in various other ways.
In Gas Town, an Agent is not a session. Sessions are ephemeral; they are the “cattle” in the Kubernetes pets vs cattle metaphor. Claude Code sessions are the cattle that Gas Town throws at persistent work. That work all lives in Beads, along with the persistent identities of the workers, and the Town Mail, the event system, and even the ephemeral orchestration, as we will see.
In Gas Town, an agent is a Bead, an identity with a singleton global address. It has some slots, including a pointer to its Role Bead (which has priming information etc. for that role), its mail inbox (all Beads), its Hook (also a Bead, used for GUPP), and some administrative stuff like orchestration state (labels and notes). The history of everything that agent has done is captured in Git, and in Beads.
So what is a Hook? Every Gas Town Worker has its own hook 🪝. It’s a special Pinned Bead, just for that agent, and it’s where you hang Molecules, which are Gas Town workflows.
Section 7 - The GUPP Nudge
Section 8 - Talking to your Dead Ancestors
/handoff ”, and disappear, and then the new worker will spin up and be like, “What? I don’t see shit.” You used to have to clumsily go figure out which session was the previous one, out of your last 40-odd sessions, all of which start with “let’s go”, because you have been doing the GUPP nudge manually. It was really awkward and almost not worth it.Section 9 - Molecular Expression of Work (MEOW)
Section 10 - Nondeterministic Idempotence
Section 11 - Wisps - Ephemeral Orchestration Beads
Section 12 - Patrols
Section 13 - Gas Town Plugins
Section 14 - Convoys
Real example: I often tell my Beads crew to sling the release molecule to a polecat. The polecat will walk through the 20-step release process, finish it off, and then I’ll be notified that the Convoy has landed/finished. Edit: Actually it’s even fancier, now. The polecat disappears while the molecule is waiting in Gate states, such as awaiting a GH Action or CI/CD. And then when the Gate bead triggers, Gas Town wakes up a polecat to continue the work.
Section 15 - Gas Town Workflow
Section 16 - Planning in Gas Town
I implemented a Formula for Jeffrey Emanuel’s Rule of Five which is the observation that if you make an LLM review something five times, with different focus areas each time though, it generates superior outcomes and artifacts. So you can take any workflow, cook it with the Rule of Five, and it will make each step get reviewed 4 times (the implementation counts as the first review).