Burn down a GitHub issue backlog hands-off with a FLEET of N parallel workers — each drives one issue through `implement-issue` → `merge-pr`, then takes the next, so N stay in flight. The orchestrator ABOVE those skills: ordering, NON-overlapping areas per worker, CI waits, verified merge state (workers idle at "PR ready" without landing). Triggers: "implement issues small first then medium with 3 agents", "burn down the backlog", "run the auto-dev loop", "spin up a fleet of agents to clear o...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Auto Dev?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/phmatray-auto-dev)
---
name: auto-dev
description: >-
Burn down a GitHub issue backlog hands-off with a FLEET of N parallel workers — each drives one
issue through `implement-issue` → `merge-pr`, then takes the next, so N stay in flight. The
orchestrator ABOVE those skills: ordering, NON-overlapping areas per worker, CI waits, verified
merge state (workers idle at "PR ready" without landing). Triggers: "implement issues small first
then medium with 3 agents", "burn down the backlog", "run the auto-dev loop", "spin up a fleet of
agents to clear open issues", « vide le backlog avec 3 agents ». Does NOT apply to building ONE
issue (implement-issue), landing ONE PR (merge-pr), or filing ONE issue (create-issue).
license: MIT
compatibility: >-
Requires an authenticated gh CLI with push/merge rights, or a glab CLI on GitLab, or the az
CLI + azure-devops extension on Azure DevOps (#753); git; and a harness whose Agent tool spawns
background sub-agents with a `model` parameter and can message (`SendMessage`) and stop them.
Drives create-issue / implement-issue / merge-pr and reads the committed repo profile
(.claude/skills/repo-profile.md) generated by init. Its measurement scripts need python3.
metadata:
author: Philippe Matray
suite: tagout
---
# auto-dev — a continuous fleet that implements and merges issues
## What this does
`implement-issue` makes one planned issue into a ready PR; `merge-pr` lands one PR. **auto-dev
supervises them at scale**: N background workers each own one issue end-to-end (`implement-issue <N>` →
`merge-pr <PR>`); the moment a worker's PR merges it's retired and a fresh worker is dispatched onto the
next queued issue — so N issues stay in flight without you babysitting.
The value is the orchestration a naive "run them in a loop" lacks:
- **Conflict avoidance** — each concurrent worker gets an issue in a *different* code area, so branches rarely collide.
- **Ordering** — small self-contained issues first (fast wins, fewer conflicts), then medium. L/XL and manual-QA excluded by default.
- **Mandatory merge** — workers love to stop at "PR ready" (half a job). auto-dev verifies the *real* merge state on the tracker on every signal and re-drives any worker that stalled.
- **Off-scope capture** — a worker that trips over an unrelated bug fixes it inline only under `implement-issue`'s carve-out (local to a file its PR already modifies *and* small, in its own commit) and otherwise files it via `create-issue` rather than dropping it, against the shared filing bar ([`../_shared/filing-bar.md`](../_shared/filing-bar.md)) so a fleet of N workers doesn't file at N different standards. The backlog stays truthful *and* drainable (#410).
- **Lifecycle hygiene** — finished agents are shut down; a state file survives restarts so the fleet is resumable.
## Autonomy contract
The user starts this and walks away — they watch a backlog drain, they don't approve each step. Run
**hands-off**: pick the reasonable default, state it, keep going. Stop only for genuine blockers:
- The tracker is unauthenticated (`"<kit>/scripts/tracker.sh" auth` fails), `tracker.capable` answers anything but `capable` for auto-dev, or you lack push/merge rights.
- **No eligible issues** (queue empty after filtering) — report the backlog drained.
- A worker's honest hard blocker (tests it can't green, a both-sides-rewrote-the-same-logic conflict, a required approval it can't self-give). Surface it; don't force a merge.
Never fake progress: a checkbox, a "ready" flip, or a merge claims work is *done* — back each with
evidence, as the child skills require. The **squash-merge is the only irreversible act** — it happens
only through `merge-pr` on a green, mergeable PR, never via an `--admin` override here.
## Inputs
- **Concurrency `N`** — workers at once. Default **3** (3–4 is the sweet spot; more = more contention and more areas to keep disjoint).
- **Ordering** — default effort small→medium. Honor whatever the user said.
- **Eligible set** — default: open issues that (a) carry an implementation plan, (b) are code tasks (not manual "QA"/"verify by hand"), (c) are within the effort ceiling (default ≤ medium). Honor narrowing ("only `studio` issues", "labeled `priority: high`").
- **Heartbeat** — normally launched *via* `loop` in dynamic mode, so the loop's self-paced wakeup is the heartbeat. If invoked directly, arm your own wakeup.
- **Model tier** — default **tiered, not all-Opus** (see Token economics): cheapest capable model for mechanical/docs, mid for typical bugs, top reserved for cross-cutting/hard work + failure-escalation. The single biggest cost lever. Honor an override ("everything on Opus", "Sonnet for all").
## How it works
```
┌─────────────────────── auto-dev (you, the supervisor) ───────────────────────┐
│ state file: queue (small→medium), in-flight slots, completed, filed │
│ on every signal → reconcile vs GitHub → end-merged + refill → keep N running │
└───────────────────────────────────────────────────────────────────────────────┘
│ dispatch (area-isolated) ▲ structured report / idle notification
▼ │
Worker A ─ implement-issue → [ready] ⇢ FRESH sub-agent ─ merge-pr ─ report ┐
Worker B ─ implement-issue → merge-pr ─ report ─┤ N background agents, one issue each,
Worker C ─ implement-issue → merge-pr ─ report ─┘ retired on merge, replaced from the queue
```
Workers are **background sub-agents spawned with the Agent tool**. Communicate via their structured
reports — a sub-agent's final message *is* its report, delivered to you when it returns — via idle
notifications, and by `SendMessage` to one still running; **never read their raw transcript files**
(`<proj>/<your-session>/subagents/agent-*.jsonl`) — a worker's output is a huge log that will blow
your context. Rely on the report + GitHub ground truth.
## Checklist
Track these as todos. Steps 4–6 are the long-running supervision loop.
1. **Preconditions & profile** — `"<kit>/scripts/tracker.sh" auth` works and `tracker.capable` answers `capable` for auto-dev; load the repo profile via `init`.
2. **Build the work queue** — survey open issues, filter to eligible, order small→medium, persist a state file.
3. **Dispatch the first N workers** — area-isolated, using the worker-prompt contract.
4. **Supervise (loop)** — on every report / idle notification: reconcile against the tracker, re-drive any merge stalled at "ready", retire merged workers, refill slots from the queue; **re-survey the backlog (Step 2) when the cadence decision says so**.
5. **Heartbeat** — keep a self-paced wakeup armed (via `loop`) as the safety net; poll CI only while actively driving a merge.
6. **Stop & recap** — when the queue drains (or the user stops), let the last workers finish, then close with the shared recap shape: merged PRs, filed follow-ups, anything blocked.
Resume-safe: the state file is the source of truth for a re-run (or `loop` re-fire) to reconstruct the
fleet from. It is not, by itself, proof against double-dispatching an issue whose record it lost — Step
3's dispatch-time guard is what closes that gap by checking live GitHub state (not the "live GitHub
state" of `scripts/reconcile.sh`, which never maps a PR back to the issue it closes) immediately before
every dispatch, first batch or refill.
---
## How to read this skill
**One step file at a time, when you reach it — never all up front.** You are the session that pays
most for what loads here: the supervisor re-reads its whole context on every turn of a run that
lasts hundreds of them ([references/token-economics.md](references/token-economics.md) § *Session
length*), and every compaction or `loop` re-fire loads this file again. So the step bodies live
under `references/steps/`, and what loads with the skill is the contract above plus the gotchas
below. Open a step when its checklist item starts; after a compaction, re-read the state file, then
only the step you are in — Step 4 while supervising, Step 3 before a dispatch.
> **Paths in this skill.** `scripts/…` means this skill's own directory (`skills/auto-dev/` from the
> kit root); the worker prompts are the kit's `commands/auto-dev-worker.md` and
> `commands/auto-dev-merge.md`. A sub-agent invokes them as the `auto-dev-worker` / `auto-dev-merge`
> command (skill `tagout:auto-dev-worker` when the kit is installed as a plugin, or the
> un-namespaced form the runtime resolves) — verify the form once before dispatching a fleet
> against it.
- Before the first dispatch — [`references/steps/00-run-the-fleet-cheap.md`](references/steps/00-run-the-fleet-cheap.md) · Token economics: the levers, the model-tier table, the measuring scripts · rationale in [`references/token-economics.md`](references/token-economics.md)
- Step 1 — [`references/steps/01-preconditions-and-profile.md`](references/steps/01-preconditions-and-profile.md)
- Step 2 — [`references/steps/02-build-the-work-queue.md`](references/steps/02-build-the-work-queue.md) · reads [`_shared/untrusted-input-boundary.md`](../_shared/untrusted-input-boundary.md)
- Step 3 — [`references/steps/03-dispatch-the-workers.md`](references/steps/03-dispatch-the-workers.md) · the three dispatch-time guards, the worker-prompt contract, who waits on CI · reads [`_shared/untrusted-input-boundary.md`](../_shared/untrusted-input-boundary.md), `_shared/open-pr.md` §1
- Step 4 — [`references/steps/04-supervise.md`](references/steps/04-supervise.md) · what to do with every report shape · reads [`_shared/guard-invocation.md`](../_shared/guard-invocation.md)
- Step 5 — [`references/steps/05-heartbeat.md`](references/steps/05-heartbeat.md)
- Step 6 — [`references/steps/06-stop-and-recap.md`](references/steps/06-stop-and-recap.md) · reads [`_shared/recap.md`](../_shared/recap.md) with its [Boundary findings block](../_shared/recap.md#the-boundary-findings-block), [`_shared/filing-bar.md`](../_shared/filing-bar.md), [`references/retro-taxonomy.md`](references/retro-taxonomy.md)
---
## Large issues (L/XL)
By default L/XL stay out of the fleet — they run long, touch many areas (conflict magnets), and often
deserve a human's go-ahead. When a worker *files* a high-priority large issue (e.g. a production outage
it found), **surface it** rather than silently auto-assigning; if the user says "prioritize it,"
dispatch it — optionally as a temporary extra worker, then converge back to N by skipping the next slot
that frees. Hold the line at N unless told otherwise.
## Gotchas (hard-won)
- **"Ready" is not "merged."** Throughput is gated on actually *landing* PRs; the #1 stall is idling at ready. Verify merge state on the tracker on every signal; re-drive or take over.
- **A worker idling at "ready" is usually YOUR bug, not its judgement.** If you dispatched phase 2 while CI was still pending, the sub-agent had no winning move — it backgrounded a watch, ended its turn, and returned a deferral. Wait for CI yourself first (`scripts/wait-ci.sh`), then dispatch. Cost five lost workers in one run before it was diagnosed; the fix took merges to 17–55 s. See Step 3.
- **Don't read a worker's transcript** — it overflows your context. Use its structured report + the tracker (`scripts/reconcile.sh`).
- **One area per concurrent worker** — the entire conflict strategy. If the next-queued issue shares an area with an in-flight one, skip down to a disjoint area (note the reorder).
- **A worktree destroyed mid-run does not fail — it silently becomes the user's checkout** (#469). The worktree home `.claude/worktrees/` sits inside the main checkout, so when a tree is `rm -rf`ed and re-created (shape B) git's upward discovery walks out of it and `git rev-parse --show-toplevel` answers the PARENT, exit 0, no warning; only a pruned admin record with the directory surviving (shape A) fails loudly. Measured 2026-09-05 on a journal-backfill run: the worker for #447 lost its tree mid-run and kept going in the main checkout; the only thing that caught it was `assert_branch` refusing the commit, by luck (HEAD there was `main`), with the wrong diagnosis. `git worktree prune` skips locked trees and the three locked siblings survived — that is the lead; the sweeper was NOT identified. The shared guard now refuses a guarded write from a relocated tree by name (`assert_worktree_live`), so a worker's alertness is no longer the only thing standing there.
- **A background sub-agent inherits the supervisor's cwd — it does not get one of its own** (#314, #412). A supervisor running in a worktree that dispatches without Step 3's `isolation: "worktree"` puts every worker in that SAME tree: nothing in `survey.sh` or `reconcile.sh` can see this, because neither queries a worktree or maps a PR back to one — a worker's own good judgement is the only thing that ever caught it. Always pass `isolation: "worktree"` on both spawns (Step 3); a worker that somehow lands without it is refused by the first-act toplevel assertion before it edits anything.
- **`mergeable=UNKNOWN` is normal right after `main` moves** — GitHub recomputes; it resolves to CLEAN once the branch syncs. Not a blocker.
- **Retire finished slots** once their PR merges — stop the sub-agent only if it is still running; a returned one is already gone. The fresh replacement starts clean.
- **File off-scope work unless the carve-out admits it** — a finding that is local to a file the PR already modifies *and* small is fixed inline in its own commit (`commands/auto-dev-worker.md`'s off-scope protocol, from `implement-issue`); anything else is filed, which keeps both the diff and the issue's scope clean (#410).
- **A run without a `lessons` block is a run that was not finished.** Step 6's cost accounting is a ledger; the `lessons:` block is what turns the run's own evidence — the decision-events log, every worker's `DETAIL:` line — into candidates the *next* run benefits from. Skipping it because the queue drained cleanly is exactly the run most likely to have a `tool-economy` or `steering` lesson sitting unexamined in the log.
- **A held `deps=` row is not a stalled issue.** `parent(N)`, `blocked_by=#n` and `assigned` are the frontier rule doing its job, not a survey that failed to classify something. Don't dispatch one to "unstick" it: a parent's body is a tracking list no worker can execute, a blocked child would build against an interface that has not landed, and an assigned issue belongs to a human. The first two clear themselves — the row comes back as `QUEUE`, or as `SKIP` if it never had a plan — but a parent stays held for as long as it is a parent.
- **Plans drive eligibility, effort labels drive ordering** — no plan → not eligible (seed one with `create-issue` if the user insists); manual-QA → skip with a noted reason.
- **The state file's *In flight* list is not proof an issue is unclaimed** — a compaction, a session restart, or a non-resuming `loop` re-fire can land between "dispatch" and "record," losing the record while the worker keeps running (#248). Run Step 3's dispatch-time guard before *every* dispatch (first batch or refill), not just when the state file looks stale.