Originally published at jduncan.io.
Two weeks ago in My Dark Factory Reinvented Sprint Planning, I killed my single-threaded TypeScript orchestrator after an admission pass stalled the Node.js event loop and tripped its own health check. Instead of re-designing it in node I decided to re-implement it in golang and implement lessons learned from the ground up. Earlier today in The Cobra Effect in Autonomous Software Factories, I put a name on the Go v2 rewrite (Wedgwood) and walked through four proxy metrics we had to tear out and rebuild.
Now let's open the doors and walk the entire factory floor, station by station, from a raw issue to a live release.
The nuance
Back in January, Dan Shapiro published The Five Levels: from Spicy Autocomplete to the Dark Factory, borrowing the NHTSA self-driving scale to map coding automation. It runs from Level 0 manual coding ("not a character hits the disk without your approval") and Level 2 pair programming, past Level 3 ("Your life is diffs.") and Level 4 (writing specs, building skills, and checking tests 12 hours later), all the way to Level 5: the Dark Factory.
Shapiro borrowed the phrase from Fanuc's lights-out robot plants. At Level 5, your pipeline stops looking like a developer tool and becomes "a black box that turns specs into software," dark "because it's a place where humans are neither needed nor welcome."
Wedgwood will ultimately be that Level 5 dark factory. Specs go in; verified releases come out without a human writing code or reviewing diffs.
But while I'm building it, I'm going to make sure I know where all of the light switches are.
Most "autonomous coding agent" demos skip straight to pretending they're lights-out while running one generalist loop with a bash tool and a prayer. Leave that unattended on three real codebases and you get duplicated fixes, bloated diffs, silent loops, and green PRs that break main.
The difference between a coding agent and a software factory isn't a smarter model. It's specialized stations, isolated execution, and a hard validation gate at every handoff. That structure is how you earn the right to turn the lights off.
Wedgwood isn't a turnkey SaaS product, and I don't pretend it's magic. It's an operational lab running on my closet-shelf hardware right now across three active repositories (wedgwood itself, calamus, and acetag). Every station in that diagram exists because an earlier version broke without it, and every light switch is wired in on purpose: inspectable Room say transcripts, 100% Pyrometer trace capture, manual CD gates where a repo wants them, and break-glass operator alerts when bounded QA retries burn out.
Why Josiah Wedgwood?
In 1769, Josiah Wedgwood opened Etruria Works in Staffordshire, England, turning solo artisan pottery into the world's first modern factory. Long before assembly lines showed up in car plants, Wedgwood broke pottery down into specialized stations: throwing, casting, decorating, glazing, and firing.
Two other details from Etruria map almost one-for-one onto how software factories survive contact with reality:
- Kilns and saggers: Potters didn't toss bare clay into an open coal fire. They packed pieces inside heavy protective clay boxes called saggers before stacking them inside towering brick bottle kilns, keeping direct flames and debris off the work. Our agents work inside isolated container worktree pods, and finished branches get fired inside a deterministic CI/CD kiln.
- The pyrometer: Mercury thermometers boiled away above 1,000°C kiln heat, so firing fine stoneware was mostly guesswork until 1782, when Wedgwood invented a clay-shrinkage pyrometer (earning his election as a Fellow of the Royal Society in 1783). You can't run a reliable factory on vibes.
Wedgwood measured heat with baked clay in 1782; we measure agent runs with 100% trace telemetry in 2026.
The architecture in plain English
Before walking the five stations, it helps to see the moving parts underneath. I built Wedgwood v2 to be boring to run on a single closet shelf:
- One Go
supervisorbinary: Owns the REST/WebSocket API, PostgreSQL 17 state engine, cron and quota scheduler, SHA-256 artifact store, and an embedded React 19 web UI. No message broker, no ORM, no microservice sprawl. -
hostdworker daemons: Run across my fleet. Since Inside my Dark Factory hardware stack: 48 Agent Pods on 2019 Mini-PCs, that closet grew to five Linux Podman nodes at 12 slots each (60 container slots) plus two native builder nodes (macOS arm64with Xcode andWindows amd64) for platform builds. - One in-pod binary (
podrunner/say): Mounted into every container to bridge thesaychat protocol and translate output fromclaude,codex,antigravity, andopencodeinto uniform telemetry frames.
Every agent runs inside a Room, which is just a persisted WebSocket thread where agents talk to each other and to the state machine via say.
I also kept pod scheduling behind a narrow PodSpec and PodEvent boundary (internal/hostlink) on purpose. Today hostd handles Podman containers and native builders across my closet shelf, and in the near future I plan to add a Kubernetes backend so Wedgwood can schedule pods onto a cluster instead of hostd without rewriting the workflow engine.
1. Intake and triage
Three raw inputs feed the front door of the factory: human Specs and issues, the repository's .wedgwood contract, and automated Loops (more on those below).
When you stack multiple automated bug filers onto one repo, they file the same underlying flaw from different angles. Instead of waking up an engineer for every single ticket, open work lands in a backlog. On a schedule or on demand, the sprint-planner pod wakes up with read-only repo access, reads up to 30 of the oldest open issues together, closes duplicates, wires prerequisites, and emits a focused Sprint Batch.
The .wedgwood file at each repo root tells the factory how to build, cache, test, and deploy that codebase without hardcoding repo trivia into prompts:
{ "version": 1, "image": "apps.tail73a9d1.ts.net:5000/wedgwood/stack-go:latest", "build_caches": [ { "name": "gomod", "mount_path": "/go/pkg/mod" }, { "name": "gobuild", "mount_path": "/go/cache" } ], "ci": { "timeout_minutes": 20, "steps": [ { "name": "go", "image": "apps.tail73a9d1.ts.net:5000/wedgwood/stack-go:latest", "command": "with-pg sh -c 'sqlc diff -f internal/db/sqlc.yaml && make fmt-check && go vet ./... && staticcheck ./... && go test -race -timeout 15m ./...'" } ] } } Validation gate (Scope and De-dup): Duplicates drop on the floor, prerequisites become explicit edges, and only a coherent batch moves into planning.
2. The planning room
Once a sprint batch starts, the supervisor opens a Planning Room with two distinct personas:
- PM (
Scope): Intentionally code-free. The PM can't grep the repo; it reads the issue batch and the project's in-DB Wiki, asks the Architect how things behave today, and owns product trade-offs and user-visibledone_whenoutcomes. - Architect (
Design): Has read-only repository access. It checks codebase conventions, proposes the technical seam, and drafts the execution DAG (Directed Acyclic Graph).
Either agent can issue a formal object if a ticket is unworkable or missing data. If the other agrees, the Planning Room closes and rejects the issues back with an explanation instead of burning engineering slots on a bad spec.
When both send approve, Go code takes over before a single builder pod boots:
{ "name": "webhook-sender", "intent": "Implement webhook dispatcher with exponential backoff", "model_class": 4, "files": ["internal/alerts/webhook.go", "internal/alerts/webhook_test.go"], "done_when": "Alerts deliver via POST with 3 retries on 5xx and unit tests pass", "check": "go test ./internal/alerts/...", "depends_on": ["alert-schema"], "max_send_backs": 3 } Validation gate (Consensus + Code DAG): Both agents must approve, and deterministic Go validation runs two checks: Draft 2020-12 JSON Schema bounds (model_class 1 to 5, required done_when and check) plus a topological sort proving the graph is acyclic with valid depends_on targets and project issue IDs.
3. The engineering floor
With a verified DAG in hand, the supervisor opens the Engineering Room, boots a Tech Lead (DISPATCH · AUDIT · MERGE), and spawns Wave 1 engineer pods in parallel.
Each engineer gets its own isolated copy-on-write git worktree pod (Pod A and Pod B in Wave 1). Neither pod can stomp on the other's files, and Pod C in Wave 2 stays parked until both Wave 1 nodes actually merge and their worktrees are pruned.
When an engineer finishes, it runs its node-local check command and sends done with its branch and commit SHA. The Tech Lead audits the diff against the contract and either merges it into main or issues a send-back with a concrete defect list (capped at 3 send-backs by default; if branches collide on merge, the Tech Lead requests a dedicated conflict-repair engineer).
Validation gate (Adversarial Review): Local check pass plus a separate Tech Lead diff audit.
4. The kiln
Notice the terracotta box around station 4 in the graphic. There's a reason it says ZERO LLM · 100% MACHINE.
Once the Engineering Room merges the final DAG node, LLMs step off the stage. CI executes every step declared in .wedgwood in parallel (unit tests, sqlc diff, staticcheck, TypeScript tsc, Linux/macOS/Windows builds, and headless browser E2E suites) inside clean containers. On a green CI run, hostd collects declared artifacts, computes SHA-256 digests, and streams them to the supervisor.
Next comes staged CD (Dev -> Stg -> Prod), protected by a commit-SHA no-op guard so unchanged commits never trigger redundant deploys. On Wedgwood itself, a green run compiles nine cross-platform binaries and updates the live apps server automatically.
If CI or CD fails, the factory doesn't silently skip it or ask a human on the first hiccup. A bounded qa-engineer repair loop wakes up with the exact failing log tail: up to 5 attempts on CI and 3 attempts on CD. Burn through that budget, and the run turns red and fires a webhook and Web Push alert (! Human).
Validation gate (Deterministic Firing): Strict pass/fail machine execution with bounded QA repair.
5. Shipped and learning
A green kiln run cuts a versioned Release, attaches SHA-256 verified Artifacts, updates the Live App, and closes the Engineering Room.
Running right underneath that release is The Pyrometer: 100% run trace capture. Every harness turn, tool call, say message, /proc CPU liveness sample, latency sample, and error counter lands in PostgreSQL (telemetry_frames and pod_metrics), mapped to the exact model class, reviewer, and commit SHA. You don't want to walk the factory floor on every shift. You just want to flip a switch and see every weld the second something starts smoking.
Validation gate (Telemetry & Signals): 100% run trace plus live golden signals.
The closed feedback loop
Shipping code is only half the cycle. Along the bottom of the diagram, four post-ship loops watch the factory and feed new issues straight back into Station 1:
- Docs Wiki:
tech-writerandlead-tech-writerpods update the project's in-DB wiki after changes land, keeping the code-free PM grounded in what the system actually does today. - Telemetry and Dreamer: Anomaly-triggered
telemetryanalysts inspect messy runs (clean first-pass runs skip the analyst pod completely so it stops inventing busywork), while the daily Dreamer scans across rooms to catch multi-run patterns and file concrete prompt or harness fixes. - Code Review: A cursor-based walk through each repository flags dead code, high cyclomatic complexity, and missing side-by-side tests without stalling the control plane.
- SRE Monitor: Scheduled
.wedgwoodgolden-signal checks run against live environments and map latency or error regressions directly back to the commit that introduced them.
Every failure or regression becomes tomorrow's scoped sprint ticket. This is some of the most actively investigated work right now. As I type this, wedgwood is working on a PRD that updates the Code Review algorithm substantially.
The laws under the hood
Back in Six Agentic Development Rules That Survived 2026, I wrote down the principles that held up after months of running unattended code agents. In Wedgwood, those distilled down to the three factory laws in the diagram, plus a fourth we earned the hard way this week:
- Humans define done; machines verify it. If you can't write a deterministic
checkand a concretedone_when, an unattended pod has no business touching it. - Adversarial review replaces blind trust. PM checks Architect, Tech Lead checks Engineer, deterministic CI checks Tech Lead, and SRE checks production.
- Multi-harness and quota-paced by default. Planning DAGs never hardcode a vendor or model name. Nodes ask for capability Classes 1 to 5, and Wedgwood's router spreads load across
claude,codex,antigravity, andopencodebased on remaining weekly quota. Scheduled background loops stay inside their class and pace evenly toward the end of the week (with a Go Plaid2xswitch when you want to burn spare quota fast before reset), while urgent runs can escalate up a class when a pool hits 100%. - We measure what we want to improve. An autonomous fleet optimizes proxy metrics literally, without human common sense. As I dug into in The Cobra Effect in Autonomous Software Factories, loose proxies rewarded rubber-stamp reviewers and bloated specs until we bound every internal scorecard directly to downstream truth like
ci_first_pass, reviewer attribution, and diff shape.
We stopped asking one model to be every department.
We built a floor where every department checks the last one.
So what?
You don't need five mini-PCs in a closet or a custom Go supervisor to steal the parts of Wedgwood that actually move the needle:
- Put a deterministic gate between agent judgment and
main. Never let the same context window that wrote the code decide whether the code shipped cleanly. - Separate planning from execution. Keep product judgment away from implementation rabbit holes, and verify the plan's shape in code before spawning parallel workers.
- Capture the trace so the harness can heal itself. Models get swapped every few weeks; the telemetry showing where your specs, prompts, and CI checks waste turns is the asset that compounds.

