/beads-workflow:triage-beads [--dry-run] [--status <list>] [--label <label>]from beads-workflow
Autonomously sweeps and triages all open beads (bd tasks) by reconciling each against git history, test results, and blocker status. Closes satisfied items with cited evidence, parks blocked ones with a playbook, and surfaces human-only decisions.
Ships in beads-workflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Sweep every open bead and do the triage a careful engineer does by hand: figure out which are secretly already done, which are stuck on something you can't provide, and which genuinely need JT. JT's complaint is that beads pile up and rot — this skill exists to keep the backlog honest without asking him to grind through the whole list one at a time.
Optional flags: $ARGUMENTS
Codex: if the invocation text above is not populated, use the text after the
skill name. If none is available, run with no flags (full sweep, writes
enabled). The bundled-script path shown below resolves under Claude Code;
wherever it appears, substitute the directory containing this SKILL.md.
Parse the flags:
--dry-run — reconcile and classify everything, print the full report, but
make zero writes (no closes, no comments). Use this for the first run in
an unfamiliar repo, or any time JT wants to preview the plan before acting.--status <list> — override which statuses to sweep (default
open,in_progress,blocked). Comma-separated.--label <label> — scope the sweep to one label.Never trust the bead's own text, and never close on assumption. A bead is a claim written in the past. Your job is to check that claim against the repo as it is now. Every close must cite what you actually checked. If you cannot cite evidence, you do not close — you leave it open. This is the difference between triage and vandalism.
Run the collector. It enumerates every non-frozen open bead and — the one piece of bookkeeping worth doing deterministically — resolves each bead's dependencies to their current status, so you get "this bead's blocker has since closed" for free instead of re-deriving it once per open bead.
SKILL_DIR="${CLAUDE_SKILL_DIR}"
bash "$SKILL_DIR/scripts/collect-open-beads.sh" > /tmp/triage-worklist.json
Codex: SKILL_DIR is the directory containing this SKILL.md; substitute it for
the token above. Re-assign SKILL_DIR in each block you run — shell state does
not persist between them.
Read /tmp/triage-worklist.json. Each bead carries: id, title,
description, status, priority, type, parent, days_since_update,
comment_count, and deps with every dependency's live status plus
all_blocking_deps_closed. Beads are sorted highest-priority-and-stalest first.
frozen_skipped counts deferred/pinned beads left untouched on purpose —
report that number so JT knows they exist, but do not triage them; they are
frozen by his choice.
For every bead, gather evidence before deciding anything. Pull the bead's own
acceptance criteria first — bd show <id> --json if the description in the
worklist is truncated or you need comments (bd comments <id>). Then check
reality with whichever of these the bead's claims call for:
git log --all --oneline --grep="<id>" and
git log --all --oneline -S "<distinctive-string-from-AC>". A commit that
implements the AC is strong evidence — capture its SHA.bash tests/run-all.sh is the repo-wide gate; read its summary,
not just the exit code (a SKIP is not a pass).X --version (or inspect the lockfile / manifest) and compare. If the
environment already reports ≥ N, the bead is satisfied by the environment.Reconciliation is read-only except for beads writes. Running the project's test suites is expected. Never run migrations, deploys, or any state-mutating command to "prove" a bead — if proving it requires mutating something, that is a signal to PARK or SURFACE, not to act.
Close only with cited evidence in --reason. The legitimate cases:
| Case | What the --reason must cite |
|---|---|
| Satisfied by environment | The command + its output, e.g. node --version → v22.3.0 ≥ required v20. |
| Blocker closed → AC now met | The closed dep id and the current-code/test evidence that the AC is genuinely met now — not just "blocker closed". |
| Verified done by passing tests | The test command + pass count you actually ran, e.g. tests/foo.test.mjs → 14 passed. |
| Superseded / duplicated / obsolete | The bead/commit/PR that replaced it. Record the relationship with bd supersede <id> --with <new> (which closes <id> itself) or bd duplicate <id> --of <canonical> so the link survives — use these instead of a bare bd close. For an obsolete bead with no replacement, bd close with the reason it no longer applies. |
Close:
bd close <id> -r "<evidence: what you checked and what it showed>"
For an epic: it is done only when all its children are closed and its own
AC holds. Check children (bd show <id> --children or the worklist parent
field) before closing an epic.
If you find yourself wanting to close but can only cite the bead's own text or a guess — stop. That is UNTOUCHED, or SURFACE if a human needs to weigh in.
A drive that must be mounted, a service that must be running, a credential only JT has, hardware that must be attached. Do not close these — they are real work, just not runnable right now. Leave the bead open and add a ready-to-run playbook comment so the next run (human or agent) can execute it the moment the resource appears:
bd comment <id> "TRIAGE PLAYBOOK
Gate: <the exact command that confirms the resource is available, and the exact
output that means 'go'>. e.g. ls /Volumes/Archive && echo READY
Once the gate passes, run:
1. <exact step>
2. <exact step>
3. <verify: exact command + expected result>"
Idempotency: before adding a playbook, check bd comments <id> — if a
TRIAGE PLAYBOOK comment is already there and still accurate, leave it. Do not
stack duplicate playbooks every time the skill runs.
Design, UX, scope, or priority tradeoffs. Anything where the "right" answer is a judgment call about what JT wants, not a fact about the repo. Do not act and do not guess. Collect it for the report with a crisp recommendation and the specific question. Recommendation ≠ decision: you are handing him a starting point, not choosing for him.
Not enough evidence to close, no external gate, no decision needed — just open work that is still open. Leave it exactly as is and count it. Most beads on a healthy backlog land here; that is fine. Do not manufacture a reason to touch a bead.
If triage turns up new work (a bug, a follow-up, a missing test), file it and link it per this repo's bd convention:
bd create "<title>" --description="<context>" -p <0-4> --deps discovered-from:<id> --json
Always end with this structured report — both a machine-readable block and a short human summary. This is the deliverable JT reads instead of the full backlog.
{
"closed": [ { "id": "...", "case": "env|blocker|tests|superseded", "reason": "<evidence cited>" } ],
"parked": [ { "id": "...", "gate": "<the gate command>", "playbook_added": true } ],
"needs_decision": [ { "id": "...", "recommendation": "<your call>", "question": "<the specific ask>" } ],
"untouched": <count>,
"frozen_skipped": <count of deferred/pinned left alone>,
"dry_run": <true|false>
}
Then, in prose: lead with the counts (closed N, parked M, needs-decision K, untouched J), then list only the needs_decision items in full — those are the
only ones that need JT's eyes. If --dry-run, say so plainly and note that
nothing was written.
bd close/bd comment/bd create and the
relationship links above, change nothing. Running tests is allowed; mutating
state to "prove" a bead is not.--json, link discovered work with
discovered-from, and leave deferred/pinned beads alone.What SKILL.md sets; muted values are Claude Code's defaults
When open beads have accumulated and need triage: closing ones reality already satisfies, parking ones gated on an external resource, and surfacing ones that need a human decision. Runs safely on a schedule.
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub jtsternberg/claude-plugins --plugin beads-workflow4 skills in this plugin
/fix-findings-beads-tasksFix a list of issues one-by-one, each with its own beads task, commit, and push/tackle-epicWork on an epic from beads until completion, then create a PR/tripwire-scanMatch a change-set against the tripwire anchors that parked beads (bd issues) declare, and surface each parked bead whose watched code you're about to change — the edit-time warning that `bd ready` can't give, because it only fires when someone asks for work, never when you touch the file a bead warns about. Use when reviewing or creating a PR, before finishing a change, or when asked to "check tripwires", "scan for tripwires", or "what parked beads touch this change". A parked bead plants a `tripwire-paths:` line naming where its knowledge bites; this scans your diff against those anchors and reports each hit as bead-id → matched file → the bead's one-line why. Safe and read-only.