← use cases · triage
Parallel bug triage across a codebase
Point the Mayor at src/, let it file one task per bug, and run a fleet of agents to fix them at once.
who it's for
Maintainers with a backlog of small, independent defects that would take a person a week to grind through by hand.
the problem
Bug backlogs are embarrassingly parallel — most fixes touch different files and never conflict — yet they get worked one at a time because there is no safe way to run twenty coding agents against the same repo without them tripping over each other.
how brat does it
- 1
brat mayor ask "analyse src/ and file a task for every bug you find" — the Mayor reads the tree and files one task per defect into a convoy.
- 2
brat witness run spawns an agent session per queued task; each agent gets its own actor directory so two can never race the same key.
- 3
TTL lock leases serialise the rare case where two fixes touch the same file; everything else runs fully parallel.
- 4
The Refinery lands the passing branches through your CI in order, applying your configured rebase/squash/merge policy.
the outcome
A week of independent fixes collapses into one supervised fleet run, with every task, session, lock, and merge recorded in the append-only WAL so you can see exactly what each agent did.