select
Explicit-only: pick the next `bd ready` bead via risk-first heuristics; verify dependency/readiness, add missing deps, then mark in progress and comment.
When & Why to Use This Skill
This Claude skill automates the preflight and selection process for task-based development workflows. By applying risk-first heuristics and evaluating factors like priority, blast radius, and technical dependencies, it ensures that the most critical and ready tasks are prioritized while maintaining strict scope control and environment readiness.
Use Cases
- Intelligent Task Prioritization: Automatically evaluates a backlog of tasks (beads) using a complex rubric of risk, hardness, and parallelism impact to select the most efficient next step.
- Dependency and Readiness Verification: Scans the repository for required infrastructure and scaffolding before starting work, automatically identifying or creating prerequisite tasks to prevent blockers.
- Workflow Guardrails and Scope Control: Enforces pre-work audits of the git working tree and clarifies 'done' criteria to ensure implementation remains focused and contained.
- Automated Status Management: Seamlessly transitions tasks and their parent epics to 'in_progress' status while providing detailed rationale for the selection to maintain project transparency.
| name | select |
|---|---|
| description | "Preflight bead work: verify beads are in use, confirm explicit start/continue, identify active bead or select next `bd ready`, clarify done criteria, and scope audit before marking `in_progress`." |
Select
Overview
Run the preflight for bead-based work: ensure beads apply, pick or confirm the active bead, clarify what "done" means, and contain scope before implementation.
Workflow
- Confirm explicit invocation to start or continue bead work; if unclear, ask.
- Check beads usage: run
rg --files -g '.beads/**' --hidden --no-ignore.- If no paths, do not use
bd; stop and ask for the correct workflow.
- If no paths, do not use
- Check active bead:
bd in_progress.- If exactly one, use it and skip selection.
- If multiple, ask which to proceed.
- If none active, select the next bead using the rubric below and mark
in_progress(work bead + epic if applicable). - Restate "done" in 1-2 sentences from the bead description/acceptance criteria.
- Clarify requirements until implementable; ask only judgment-call questions.
- Audit working tree for scope containment (
git status -sb,git diff); ignore unrelated diffs.
Selection rubric
- Feature-first: if any ready items are
feature, evaluate all ready features (bd show). - Type order (fallback):
task>bug>epic>chore. - Epic rule: only mark an
epicin_progresswhen you also mark a child beadin_progress. - Priority: P0 > P1 > P2 > P3 > P4.
- Risk: migrations, auth/security, infra, data loss/consistency, breaking API/CLI, perf regressions, ambiguous acceptance.
- Hardness: vague scope, multiple subsystems, unknown deps, heavy verification.
- Blast radius: widely used modules, shared config, CI/build pipeline, core user paths.
- Parallelism impact (balance with risk): prefer beads that unlock more blocked work or establish a contract/checkpoint when risk is in the same tier.
- Soft deps: if a ready bead has
tracks/relatedpointing to another ready bead, apply a soft penalty and prefer the tracked-first item. - Tie-break: priority -> strongest signals -> earliest in
bd ready. - Workstream diversity: only as a final tie-break and only if it increases parallelism (never if it reduces ready work).
- Readiness gate: never start a bead if required scaffolding or prerequisites are missing; add deps and restart selection.
Scoring notes (lightweight)
- Base score comes from the existing rubric (risk/hardness/blast/priority).
- Parallelism nudges (apply only within the same risk tier):
- Role: contract/checkpoint +2; integration +1; implementation +0.
- Unlock count: +1 per blocked bead unlocked (cap at +3).
- Soft deps: -2 if it tracks/relates another ready bead; 0 otherwise.
- Unlock count: count outgoing
blocksedges to non-ready beads.
Example rationale comment:
Selected first: contract bead in Backend API; unlocks 2 blocked items; lower risk tie with feature P1.
Selection workflow
- Run
bd readyand keep the returned order. - If any ready features exist,
bd show <id>for each and score (risk/hardness/blast/parallelism). - Otherwise,
bd show <id>for each ready item and score by type order, priority, and parallelism. - Extract from each bead comment (if present):
WorkstreamRole(contract/integration/checkpoint/implementation)Parallelism impact(unlock count)
- Weigh
tracks/relatededges: if a ready bead tracks/relates another ready bead, apply a soft penalty and prefer the tracked-first item. - Check readiness for the top candidate (repo-only):
- Confirm required scaffolding/infra exists in the repo (app skeleton, build config, migrations, auth setup, etc.).
- If something is missing, look for an existing prerequisite bead and link it first:
- Link:
bd dep add <candidate-id> <dep-id> -t blocks
- Link:
- Only create a new prerequisite bead if none exists:
- Create:
bd create "Scaffold: <thing>" --type=task --priority=<p> - Link:
bd dep add <candidate-id> <dep-id> -t blocks
- Create:
- Re-run
bd readyand restart selection if you added any deps.
- Pick the highest-scored ready bead after the readiness gate passes.
- If the pick is an
epic, resolve it to a concrete work bead:- Inspect the epic (
bd show <epic-id>) and pick a ready childtask/bug/choreto work on. - If no child bead is ready, create/unblock one and restart selection (only set the epic
in_progressalongside a started child bead).
- Inspect the epic (
- Mark the concrete work bead
in_progress:bd update <work-id> --status in_progress. - If
bd show <work-id>lists a parent epic, mark itin_progresstoo:bd update <epic-id> --status in_progress. - Comment rationale:
bd comments add <work-id> "Selected first: <short rationale>".
Output
- Print:
Selected <work-id>: <rationale>(includeepic <epic-id>if applicable; select a concrete work bead). - If
bd readyis empty, report "No ready work" and stop. - If deps were added, print:
Blocked <id> on <dep-ids>; re-run selection. - If an in-progress bead exists, report
Active <work-id>and proceed.