Code Factory
A way to build software with AI coding agents, where every change is tested first, reviewed by a second model and merged by a script.


What it does
Code Factory is Launch Astro's way of building software with AI coding agents. You say what you want built. Agents plan the work, break it into small pieces and build each one.
A piece only joins the main code after it clears three checks. It starts from a test that fails until the feature works. A reviewer model from a different AI company reads every change and sends it back until it's right. Then a script, not an agent, merges it, and only when every required check has passed.
It's for people who want software built by agents but can't review code themselves. You don't need to be a programmer to drive it. Routine build questions never reach you. You're asked only about product choices, spending or anything that can't be undone.
It grew out of about 4,000 agent sessions and more than 30,000 commits, and every Launch Astro project is built this way.
Code Factory holds a build method (docs/), the agent skills that run it (skills/), the scripts behind them (orchestration/) and a project template (template/).
There are two modes. In single mode, one agent owns one area of a repository and lands its work as a run of small pull requests (docs/SINGLE.md). In full mode, a director, an orchestrator and parallel build lanes take on a larger build. docs/FLEET.md sets the roles and docs/METHOD.md the mechanics.
Every piece starts as a ticket with a Section: line and numbered criteria. The lane writes a failing test first, then the code. Sol, a model from a different company than the builder's, reviews the pull request until it approves the exact head commit, at an effort set by the change's risk (docs/SOL-EFFORT.md). orchestration/trust-gate/trust-gate.sh passes on only the comments that trusted accounts wrote, and fails closed.
Merging is a script, orchestration/enqueue.mjs. It checks that every required check is green on the exact head and that the description has its Why:, Left undone: and Closes #n lines. Then it queues the pull request in GitHub's merge queue, or merges directly where a repository has no queue.
The template is a TypeScript project on Node 24 and pnpm 12.3.4 through corepack, with Vitest, oxlint, Prettier, commitlint and Husky hooks. corepack pnpm check runs template/scripts/check.mjs, every blocking gate in turn, cheapest first. One of them is a contamination gate that looks for private content (template/scripts/gate/sweep.py). CI runs the same check on every pull request and push to main, and gitleaks scans for secrets in the pre-commit hook and over the full history in CI.
Install it and start it
Install
brew install herdrFrom README.md at dc772f4
Start
corepack pnpm install && corepack pnpm checkFrom README.md at dc772f4
corepack pnpm inventoryFrom README.md at dc772f4