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.
- 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
epic in_progress when you also mark a child bead in_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/related pointing 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
blocks edges 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 ready and 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):
Workstream
Role (contract/integration/checkpoint/implementation)
Parallelism impact (unlock count)
- Weigh
tracks/related edges: 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
- 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
- Re-run
bd ready and 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 child task/bug/chore to work on.
- If no child bead is ready, create/unblock one and restart selection (only set the epic
in_progress alongside a started child bead).
- Mark the concrete work bead
in_progress: bd update <work-id> --status in_progress.
- If
bd show <work-id> lists a parent epic, mark it in_progress too: bd update <epic-id> --status in_progress.
- Comment rationale:
bd comments add <work-id> "Selected first: <short rationale>".
Output
- Print:
Selected <work-id>: <rationale> (include epic <epic-id> if applicable; select a concrete work bead).
- If
bd ready is 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.
1---
2name: select
3description: "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`."
4metadata:
5 source: https://skillmd.com/skills/majiayu000/select
6---
7
8# Select
9
10## Overview
11Run the preflight for bead-based work: ensure beads apply, pick or confirm the active bead, clarify what "done" means, and contain scope before implementation.
12
13## Workflow
141. Confirm explicit invocation to start or continue bead work; if unclear, ask.
152. Check beads usage: run `rg --files -g '.beads/**' --hidden --no-ignore`.
16 - If no paths, do not use `bd`; stop and ask for the correct workflow.
173. Check active bead: `bd in_progress`.
18 - If exactly one, use it and skip selection.
19 - If multiple, ask which to proceed.
204. If none active, select the next bead using the rubric below and mark `in_progress` (work bead + epic if applicable).
215. Restate "done" in 1-2 sentences from the bead description/acceptance criteria.
226. Clarify requirements until implementable; ask only judgment-call questions.
237. Audit working tree for scope containment (`git status -sb`, `git diff`); ignore unrelated diffs.
24
25## Selection rubric
26- Feature-first: if any ready items are `feature`, evaluate all ready features (`bd show`).
27- Type order (fallback): `task` > `bug` > `epic` > `chore`.
28- Epic rule: only mark an `epic` `in_progress` when you also mark a child bead `in_progress`.
29- Priority: P0 > P1 > P2 > P3 > P4.
30- Risk: migrations, auth/security, infra, data loss/consistency, breaking API/CLI, perf regressions, ambiguous acceptance.
31- Hardness: vague scope, multiple subsystems, unknown deps, heavy verification.
32- Blast radius: widely used modules, shared config, CI/build pipeline, core user paths.
33- Parallelism impact (balance with risk): prefer beads that unlock more blocked work or establish a contract/checkpoint when risk is in the same tier.
34- Soft deps: if a ready bead has `tracks`/`related` pointing to another ready bead, apply a soft penalty and prefer the tracked-first item.
35- Tie-break: priority -> strongest signals -> earliest in `bd ready`.
36- Workstream diversity: only as a final tie-break and only if it increases parallelism (never if it reduces ready work).
37- Readiness gate: never start a bead if required scaffolding or prerequisites are missing; add deps and restart selection.
38
39## Scoring notes (lightweight)
40- Base score comes from the existing rubric (risk/hardness/blast/priority).
41- Parallelism nudges (apply only within the same risk tier):
42 - Role: contract/checkpoint +2; integration +1; implementation +0.
43 - Unlock count: +1 per blocked bead unlocked (cap at +3).
44 - Soft deps: -2 if it tracks/relates another ready bead; 0 otherwise.
45- Unlock count: count outgoing `blocks` edges to non-ready beads.
46
47Example rationale comment:
48```
49Selected first: contract bead in Backend API; unlocks 2 blocked items; lower risk tie with feature P1.
50```
51
52## Selection workflow
531. Run `bd ready` and keep the returned order.
542. If any ready features exist, `bd show <id>` for each and score (risk/hardness/blast/parallelism).
553. Otherwise, `bd show <id>` for each ready item and score by type order, priority, and parallelism.
564. Extract from each bead comment (if present):
57 - `Workstream`
58 - `Role` (contract/integration/checkpoint/implementation)
59 - `Parallelism impact` (unlock count)
605. Weigh `tracks`/`related` edges: if a ready bead tracks/relates another ready bead, apply a soft penalty and prefer the tracked-first item.
616. Check readiness for the top candidate (repo-only):
62 - Confirm required scaffolding/infra exists in the repo (app skeleton, build config, migrations, auth setup, etc.).
63 - If something is missing, look for an existing prerequisite bead and link it first:
64 - Link: `bd dep add <candidate-id> <dep-id> -t blocks`
65 - Only create a new prerequisite bead if none exists:
66 - Create: `bd create "Scaffold: <thing>" --type=task --priority=<p>`
67 - Link: `bd dep add <candidate-id> <dep-id> -t blocks`
68 - Re-run `bd ready` and restart selection if you added any deps.
697. Pick the highest-scored ready bead after the readiness gate passes.
708. If the pick is an `epic`, resolve it to a concrete work bead:
71 - Inspect the epic (`bd show <epic-id>`) and pick a ready child `task`/`bug`/`chore` to work on.
72 - If no child bead is ready, create/unblock one and restart selection (only set the epic `in_progress` alongside a started child bead).
739. Mark the concrete work bead `in_progress`: `bd update <work-id> --status in_progress`.
7410. If `bd show <work-id>` lists a parent epic, mark it `in_progress` too: `bd update <epic-id> --status in_progress`.
7511. Comment rationale: `bd comments add <work-id> "Selected first: <short rationale>"`.
76
77## Output
78- Print: `Selected <work-id>: <rationale>` (include `epic <epic-id>` if applicable; select a concrete work bead).
79- If `bd ready` is empty, report "No ready work" and stop.
80- If deps were added, print: `Blocked <id> on <dep-ids>; re-run selection`.
81- If an in-progress bead exists, report `Active <work-id>` and proceed.