Software factories are all the rage, so I decided to join the bandwagon and model mine on the magical world of Harry Potter.
McGonagall drafts the tasks. Harry builds them. Hermione and Moody review the code from the other model family. Ron keeps goal on CI, and Snape is first on any alert. Voldemort designs the big projects, and the house-elves clean up overnight. I'm the Headmaster, which mostly means making the calls they bring back to my office.
Over the summer I averaged about 90 GitHub contributions a week. Since the factory went live in October, it's been about 380.

My public GitHub contribution graph on 22 November 2026. The jump starts the week the factory went live.What I mean by a software factory
For me, a software factory is the whole path from an ask to a reviewed PR, run by agents. I set the outcome and make the calls. The agents do the work, and nothing moves on until it's been checked.
It's built in three layers.
- Layer oneWritten downEvery desk's job is written down in a plain file: how to do it and what done looks like.
- Layer twoLoops that start on their ownThose jobs run in loops that start on their own, so building, review, and fixes don't wait for me to move them along.
- Layer threeAnd the loops learnWhat a reviewer catches becomes a lesson the next build reads, so the same mistake shouldn't cost me twice.
Scripts handle messages, worktrees, checks, and watching for changes. Models handle the parts that need judgment. Each task starts fresh with only the context it needs, and no agent reviews its own work.
Work comes in through whichever door is nearest: my own words, a label on an issue or a PR, or a message in our team chat. New tickets get sorted into build it, split it, ask me, or leave it for later. When an agent hits a real question, it writes down the options and the one it would pick, parks that one task, and everything else keeps moving.
In a factory, code stops being something I write by hand and becomes what the factory produces: the intent goes in as a written spec, agents turn it into changes, and checks decide whether each change is good enough to move on.
The Marauder's Map
This is how work moves through the castle, footprints and all. The trail follows an ask from my words to a watched merge. A small task takes the short way to Harry, and a big one goes through a design and a plan first. Pick a trail to follow, or tap any room to see who works there. The rooms alongside handle messages, memory, data and alerts, model choices, and cleanup. They're the supporting cast rather than another approval step on every task.
The Marauder's MapFrom my ask to a watched mergeThe Order of the Agents roster
Chief of Staff · PlansMcGonagallTurns what I ask for into work the factory can do. A small ask she just answers, a clear change becomes one task, and a big one becomes a project with a design and milestones. Tickets from my teammates go through her too. She hands each task to Harry, decides what happens next after every review, and brings me only what needs me.
Systems Architect · PlansVoldemortDesigns the biggest projects, on the most capable model I have. Hermione and Moody review his designs, and I approve them. He's the most powerful wizard in the castle, so he designs and never touches the code.
Senior Engineer · BuildsHarryBuilds the code, a few tasks at a time. He fixes what the reviewers find, opens the PR, and looks after it until it merges: failing checks, conflicts, and my teammates' comments all come back to him.
Staff Engineer · BuildsHermioneReviews what Harry builds, with a different model family than the one that wrote it. She starts fresh every time, runs the tests herself, and nothing goes out without her pass. She also fact-checks what the review bots say.
Security Reviewer · BuildsMoodyReviews code written by Claude, my own sessions included, security first. Nothing gets pushed without a pass from the other model family. He brings constant vigilance and trusts nothing he hasn't checked himself. My teammates can ask him for a review too.
Release Engineer · WatchesRonWatches CI, deploys, and releases, and sorts every change into routine or needs-me. When a build breaks he calls it real, flaky, or infra, and he keeps an eye on each merge for a day after it lands. He writes the morning PR lineup and the weekly scoreboard. He kept goal at school, which fits watching everything coming at the hoops.
Patrol · WatchesThe Marauder's MapWatches every PR and check, wakes Ron when something changes, and declares mischief managed once a merged task has landed.
Data Analyst · WatchesSnapeAnswers questions with data, and shows the query behind every number. When an alert pages the team he's on it first with what broke and why, he remembers how each alert has behaved before, and he brings back a fix when someone on call asks for one. His potions book is full of corrections to the official recipe, the attitude I want from whoever reads my data.
Knowledge Manager · Keeps houseDumbledore's portraitReviews the day each weeknight and keeps the factory's memory up to date: what every desk knows, and why each rule exists.
Model Keeper · Keeps houseOllivanderFits each desk with the right model the way he fits wands, and moves a desk to another one when its model is down. Costlier moves wait for me.
Cleanup · Keeps houseThe house-elvesEvery night they clear out what's gone stale, so the factory doesn't fill up with old messages, logs, and drafts. Like the real ones, they work while the castle sleeps.There are scripts behind the desks too. The Owl Post carries messages and Gringotts handles backups. Neither needs a model.
The Pensieve
The Pensieve is the context lake of my software factory: one pool of memory every desk dips into, instead of each starting from scratch. Two kinds of memory feed it: a knowledge folder that people write, and a table of facts that scripts and accepted lessons write. One selector picks from both for each run. The table lives in a SQLite file with full-text search. When a session ends, a hook stores a short, scrubbed extract of what was asked and answered, never the tool output.
- The knowledge folderPeople write it.
- The table of factsScripts and accepted lessons write it.
- Session extractsA hook stores one when a session ends: short and scrubbed, never the tool output.
- Every runOne selector picks what the run needs. A new session starts from a short digest and its last checkpoint.
- ReviewsHermione and Moody get the facts about the files a change touches, numbered and marked as data.
- DesignsWhoever writes a design, and both reviewers, get the same facts for the repos it touches.
On a private repo, a review or a design gets the facts for what it touches, and checks each against the code before leaning on it.
Each weeknightDumbledore's portraitReviews the day for anything a desk had to look up twice. His additions apply on their own. His edits and removals wait for me.
Every nightThe house-elvesClear out what no desk uses anymore. Everything they remove goes to a bin first.
It keeps one current fact per subject. When a fact changes, the old one stays in the bowl with its dates, so yesterday's answer never passes for today's. A new session starts from a short digest and its last checkpoint instead of hours of history.
Each weeknight, Dumbledore's portrait reviews the day for anything a desk had to look up twice and writes memory fixes. His additions apply on their own with a note to me. His edits and removals wait for me.
The lake reaches the reviews too. When Hermione or Moody reviews a change to one of my private repos, they get the facts about the files it touches, numbered and marked as data, never instructions. A fact can be stale, so they check it against the code before a finding leans on it, and cite its number when one does. Whoever writes a design, and both reviewers who check it, get the same facts for the repos the project touches. Public repos never get them.
The Pensieve also remembers why the factory is the way it is. Every check, lesson, and line in a reviewer's brief links back to the mistake that caused it. I can ask why a rule exists, whether the mistake it was meant to stop ever came back, and which rules nothing has needed in months.
A lake goes stale if nobody tends it. Every night the house-elves clear out what's no longer useful: old owls, session extracts, logs, finished run folders, drafts nobody started, and facts no desk uses anymore. Facts past their expiry date are retired but kept with their dates. The elves follow fixed rules, everything they remove goes to a bin first, and the record of what was approved and reviewed is never touched.
The Great Hall
The Great Hall is a small web page on my machine that shows the whole factory in one place: a card for every desk, a list of what's waiting on me, and a feed of everything the factory did in the last two days. From there I can open any desk to see its recent work, ask it a question, or handle a small decision without going back to the terminal.


Each desk's page also has a conversation box, so I can ask Ron why a build stopped, hand Harry a task, or send Moody a PR to review, and the answer lands right there. The page only queues what I send, and the factory's own jobs carry it out through the same checks as everywhere else. The page itself never merges or deploys anything.
Closing thoughts
The biggest change is what I no longer chase. Scripts do the watching. An approved milestone starts its own tasks, fix rounds start on their own, and the lowest-risk changes merge without me. A broken build reaches me already called real, flaky, or infra. Teammates get a review without waiting for someone's afternoon to free up.
Review the factory, not the code. When a change comes out wrong, the quick fix is to patch the code and move on. That fixes one PR, and the next build makes the same mistake, because nothing about the factory changed. So I ask why the factory let it through and fix that instead: a job file that never said what done looks like, a check nobody wrote, a reviewer never told what to look for. That fix lands on every build after it. Most of my factory was built this way, one escaped mistake at a time. Its newest upgrades come down the same line as any other project: designed, reviewed, built, and checked by the factory itself.
The time the factory gives back goes to impact: deciding what each change is for, what evidence would show it worked, and what that evidence actually supports. The factory can help run the measurement, but that last call is still mine. I wrote about how we measure it in Measuring the Impact of Engineering Work.

