/next (bro)
All mechanics live in the bro CLI. This skill is policy only.
bro flow next computes the queue from bd ready, claims the top item
atomically, and surfaces what it deliberately skipped.
Prereq: bro on PATH or npx -y @broject/bro@0, bd init done.
The loop
bro flow next → claims the top ready bead, prints the work order
implement → branch, code, tests — verify like CI
PR → gh pr create (ready — /next owns the merge; drafts are for merge=human flows) → bro review act status → bro review act merge
bd close <id> → reason = the PR that landed it
bro flow next → repeat until "backlog empty"
If the backlog exists, it was already confirmed — never ask "should I
continue?" between items. The queue is the approval.
What next never claims
- Human gates — beads titled
HUMAN GATE … surface as gate: lines.
Ask the user once per gate; their verdict is the result. Everything
else proceeds without waiting on the gate.
- Epics — surface as
epic: lines. Decompose into beads first
(bd create children), don't implement an epic directly.
- Molecule steps — beads whose
parent is a molecule belong to
bro flow convoy; the flat queue doesn't steal them. Epic children carry
a parent too but stay claimable — bro flow next checks the parent's
type, not just the field.
- Foreign-scope beads — ids outside this checkout's
issue_prefix
are never claimed; they surface as foreign: N when the shared db
carries other projects' work. scope = "all" in a plan opts out.
- Global beads — user-level beads live in a separate store
(
bro store init --global, bro task list --global).
bro flow next --global runs the same pipeline against that store
explicitly; project output never mixes them in.
- Coordination primitives —
gt:slot-labeled beads (merge-queue
semaphores) are excluded inside bd ready itself; a semaphore is
never work.
Plans
bro plan run next.toml drives the same selection from a validated plan —
limit (batch size), order (priority|oldest|newest), [filters]
(types, max_priority, title match, labels — the declared scope: only
beads carrying one of those labels are claimable, unlabeled and
other-labeled work stays untouched), claim = false for a dry run,
gates = "allow" to pre-authorize claiming HUMAN GATE beads,
scope = "all" to lift project scoping, and scope = "global" (or
bro flow next --global) to schedule from the user-level store. Batching
is for parallel execution (one claimed bead per worktree/agent); a
claimed gate still means a human decides — the plan was the go-ahead,
not the verdict. The authoring schema is schemas/plans/next.schema.json
— bro plan describe next prints it (the example as a TOML template).
Policy
- One bead, one PR — unless several items are trivially the same
change. Debt batches are the exception, not the rule.
- The gate decides done —
bro review act status green before merge,
bro review act merge to land it, branches deleted after.
- Stuck ≠ skipped — if an item can't proceed, say why (blocker,
missing access, ambiguity), leave it open, and move to the next bead.
Never silently drop it:
bd update <id> --notes "<why>" records it.
idle vs gated — state: idle means the backlog is truly
empty: report and stop. state: gated means open items remain but
none are claimable (gates/epics/mol steps) — report what's blocking
and stop for the human, don't call it done. Don't manufacture work.
1---23name: next4description: "Use when the user says 'work the backlog', 'clean the queue', invokes /next, or sets a /goal over open beads — the autonomous backlog loop. Thin wrapper over the bro CLI: `bro flow next` is the scheduler as code — it claims the top ready bead and emits the work order. Requires `bro` (npx -y @broject/bro@0) and bd."5metadata:6 source: https://skillmd.com/skills/theplenkov/next7---89# /next (bro)1011**All mechanics live in the `bro` CLI.** This skill is policy only.12`bro flow next` computes the queue from `bd ready`, claims the top item13atomically, and surfaces what it deliberately skipped.1415Prereq: `bro` on PATH or `npx -y @broject/bro@0`, `bd init` done.1617## The loop1819```text20bro flow next → claims the top ready bead, prints the work order21 implement → branch, code, tests — verify like CI22 PR → gh pr create (ready — /next owns the merge; drafts are for merge=human flows) → bro review act status → bro review act merge23 bd close <id> → reason = the PR that landed it24 bro flow next → repeat until "backlog empty"25```2627If the backlog exists, it was already confirmed — **never ask "should I28continue?" between items.** The queue is the approval.2930## What `next` never claims3132- **Human gates** — beads titled `HUMAN GATE …` surface as `gate:` lines.33 Ask the user once per gate; their verdict is the result. Everything34 else proceeds without waiting on the gate.35- **Epics** — surface as `epic:` lines. Decompose into beads first36 (`bd create` children), don't implement an epic directly.37- **Molecule steps** — beads whose `parent` is a molecule belong to38 `bro flow convoy`; the flat queue doesn't steal them. Epic children carry39 a `parent` too but stay claimable — `bro flow next` checks the parent's40 type, not just the field.41- **Foreign-scope beads** — ids outside this checkout's `issue_prefix`42 are never claimed; they surface as `foreign: N` when the shared db43 carries other projects' work. `scope = "all"` in a plan opts out.44- **Global beads** — user-level beads live in a separate store45 (`bro store init --global`, `bro task list --global`).46 `bro flow next --global` runs the same pipeline against that store47 explicitly; project output never mixes them in.48- **Coordination primitives** — `gt:slot`-labeled beads (merge-queue49 semaphores) are excluded inside `bd ready` itself; a semaphore is50 never work.5152## Plans5354`bro plan run next.toml` drives the same selection from a validated plan —55`limit` (batch size), `order` (priority|oldest|newest), `[filters]`56(types, max_priority, title match, `labels` — the declared scope: only57beads carrying one of those labels are claimable, unlabeled and58other-labeled work stays untouched), `claim = false` for a dry run,59`gates = "allow"` to pre-authorize claiming HUMAN GATE beads,60`scope = "all"` to lift project scoping, and `scope = "global"` (or61`bro flow next --global`) to schedule from the user-level store. Batching62is for parallel execution (one claimed bead per worktree/agent); a63claimed gate still means a human decides — the plan was the go-ahead,64not the verdict. The authoring schema is `schemas/plans/next.schema.json`65— `bro plan describe next` prints it (the example as a TOML template).6667## Policy6869- **One bead, one PR** — unless several items are trivially the same70 change. Debt batches are the exception, not the rule.71- **The gate decides done** — `bro review act status` green before merge,72 `bro review act merge` to land it, branches deleted after.73- **Stuck ≠ skipped** — if an item can't proceed, say why (blocker,74 missing access, ambiguity), leave it open, and move to the next bead.75 Never silently drop it: `bd update <id> --notes "<why>"` records it.76- **`idle` vs `gated`** — `state: idle` means the backlog is truly77 empty: report and stop. `state: gated` means open items remain but78 none are claimable (gates/epics/mol steps) — report what's blocking79 and stop for the human, don't call it done. Don't manufacture work.