next-ticketlisted
Install: claude install-skill Markuysa/flightdeck
Requested: $ARGUMENTS
The queue lives in `docs/tickets/` — statuses are derived from git, never stored
elsewhere. See `docs/tickets/README.md` for the model.
## 0. Read the kill switch
Read `.claude/autopilot.json`.
- `maxInFlight` from that file is the limit for step 1, unless the request passed a
number, which wins.
- If this run was started by a routine or asked for **autopilot**, and `enabled` is
`false`, **stop immediately**. Say autopilot is off and that `/autopilot on` turns it
back on. Do not work the ticket anyway.
A human asking for one ticket directly in a session is not autopilot — serve that
whatever the flag says. The switch governs unattended execution, not the skill.
## 1. Check whether there is room
In flight = tickets whose branch `claude/NNN-*` exists while the file in main still says
`todo`. Count them (remote branches too, when a remote exists). At or above the limit —
**stop** and report what is in flight. This check is what keeps two runs from claiming
the same ticket.
## 2. Pick the next ticket
Ready = `status: todo` in main, every id in `depends` is `done` in main, and no
`claude/NNN-*` branch exists. Take the **lowest id** — the planner numbers tickets in
dependency order, so lowest-first is the intended sequence. Skip any ticket whose branch
carries `needs-attention`: a human must look at those before a retry.
## 3. Claim it by pushing the branch
```
git checkout main && git pull
git checkout -b claude/NNN-<slug>
git push -u origin