Duun is a software factory: teams of AI agents take issues from Linear and GitHub through plan, build, test and review to merged pull requests, with people approving what matters. Workflows are graphs of agent, human and decision steps, edited in chat or on a canvas. Each run gets its own sandboxed worktree, a visible cost estimate, a live cost meter and hard spend caps. It ships as a web app, an Electron desktop app, a React Native companion app, a CLI and a public REST API with typed SDKs.
The problem
Duun is for engineering teams that want coding agents working through the real backlog. The spec names four people: an engineering lead who wants overnight runs with evidence she can check, an engineer who wants to hand off bugs and sometimes take over, a PM who approves plans but never opens a terminal, and an admin who needs roles, budgets and an audit trail.
A coding agent in a terminal serves none of them well. It stops when the laptop closes and works one task at a time. It says “done” whether or not the pull request merged or CI passed. Nobody sees the spend until the bill arrives.
What we built
A team connects Linear and GitHub and sets up a factory: a versioned workflow drawn as a graph of agent steps, decisions and human gates, edited in chat or on a canvas. When an issue moves to Ready, a run starts. It gets its own worktree in a sandbox, an agent profile such as builder or tester, and the coding-agent CLI the team picked.
Plans, risky commands and merges become asks in the Inbox, each approved with one key. Fleet shows every running agent’s terminal side by side. Every run shows a cost estimate, a live meter and hard caps.
Underneath:
- Temporal workers run the factory engine.
- A run succeeds only when Duun has observed the evidence its workflow requires, such as CI on the final commit and the merge. Evidence an agent merely reports never counts.
- Postgres with row-level security on every table.
- Built-in prompts stay on the server, and a CI step checks that none leak to clients.
- One API serves five clients: web, Electron desktop, an Expo companion app, the
duunCLI and a public REST API with TypeScript and Python SDKs.
How we built it
We wrote the spec first: a 27-document product and engineering pack, plus 33 architecture decision records that override it where they differ. An interactive reference app in Storybook is the visual spec, and agents port screens from it rather than redesign them.
Agents did most of the building, guided by one AGENTS.md file. Each works in its own git worktree, and heavy checks run in throwaway containers on a dedicated build machine with no secrets inside.
Every change passes CI: typecheck, lint, a secret scan, unit tests, agent evaluations, Playwright end-to-end tests and accessibility scans.
A person owns the risky paths. When a reviewer agent read every PR, about 40% of agent PRs needed fixes, and the misses that mattered were security bugs. Now any PR touching auth, permissions, migrations, secrets, webhook signatures, prompts or CI waits for the code owner’s approval. The rest merges on green CI and is audited afterwards.
What was hard
The merge queue became the bottleneck. One broken PR failed every queue group stacked behind it. Over three hours on November 18 that meant 143 failed groups against 22 green. We wrote an ejector that dequeues an entry only when the failures point at it, and split CI into tiers: smoke tests in the queue, every suite every three hours, and a release gate.
Parallel agents collided on migrations. Numbered migrations clashed whenever two PRs added one, and the migrator could silently skip an older migration deployed after a newer one. We moved to timestamped migrations applied by name.
“Done” had to mean done. An early version of the engine marked a run succeeded as soon as the merge call returned. We added an unverified state and an evidence table, so success always means proof.
By the numbers
- 680 merged pull requests, 616 of them into
main - 618 commits on
main, 588 of them co-authored by Claude - 7 apps and 16 packages in one monorepo
- 535 test files, including 84 Playwright end-to-end specs
- 33 architecture decision records
- All 680 pull requests merged between November 16 and 19, 2026
Where it is now
Duun is in early access, onboarding engineering teams in small batches from a work-email list at duun.ai. The API, CLI and SDKs entered developer preview on November 15 and may change before general availability. Production releases go out daily, only for commits a full green CI run covers.
Next on the roadmap: taking the API out of preview, more factory templates, and running factories in a customer’s own cloud.



