Self-hosted software factory. Issues in, agents out, learning after merge.
The Factory image is the engine. factory-config is the program it runs (pipeline.yaml + agents/*/agent.md). Product work happens in your product repos. Secrets stay in Factory Settings.
flowchart TD
issue[Labeled GitHub issue] --> listed[Work listed]
listed --> queue[User queues or schedules]
queue --> engine[Factory dispatcher]
engine --> fetch[Fetch factory-config default branch]
fetch --> pin[Pin that SHA on the work item]
pin --> read[Read pipeline.yaml and agents at that SHA]
read --> loop[Run agents against the product repo]
loop --> productPr[Merge the product PR]
productPr --> learn[Monitor opens a PR on factory-config]
learn --> argue[Review argues on that PR]
argue --> merged[Merge updates the default branch]
merged --> next[Next issue fetches the new SHA]
Labeling an issue only lists it under Work (status listed). Queue puts it on the factory backlog (chevron: start now if a slot is free, or schedule for later); the dispatcher starts work up to maxConcurrentRuns. A work item keeps the config SHA it started with until it finishes. A learn PR changes the next run only after it merges.
Set the config repo URL in Settings → Factory config (or FACTORY_CONFIG_REPO env). Default dogfood repo: https://github.com/akoskm/factory-config
cp .env.example .env
docker compose up --buildOpen http://localhost:3000 (password from ADMIN_PASSWORD).
docker compose up postgres temporal temporal-ui -d
npm install
npm run db:migrate
npm run devUI with HMR: http://localhost:5173 (proxies /api to :3000).
- Create a project pointed at this repo
- Add a GitHub source with label
factory - In Settings, confirm Factory config points at
https://github.com/akoskm/factory-config - Set Cursor API key
- Label an issue
factory— it appears under Work as listed (not auto-started) - On the row: Queue (chevron: Queue and start, Schedule…)