一键导入
next
Pick the next bead to work on. Shows ready tasks (no blockers), applies user preferences for ordering (priority, type, recency), and helps select work.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Pick the next bead to work on. Shows ready tasks (no blockers), applies user preferences for ordering (priority, type, recency), and helps select work.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Query an independent peer or a configurable local/OpenRouter review panel, with distinct quorum and evidence-backed consensus interpretation policies.
Safely coordinate bounded delegation while preserving observable outcome and acceptance-evidence pairs through one-writer execution, independent review, and parent validation. Explicit invocation only.
Detect whether a beads repository needs classic-to-Dolt migration or an in-place Dolt schema upgrade.
Migrate beads from classic SQLite/JSONL to Dolt, or safely upgrade an existing Dolt schema after a bd upgrade.
Read-only current-session and UTC-week token telemetry dashboard for Pi, Claude Code, Codex, and optional OpenRouter management analytics.
Read-only audit of Pi routing and configured second-opinion panel model IDs against the active Pi catalog and public live model metadata; reports when Pi or configured models merit review without editing config.
| name | next |
| description | Pick the next bead to work on. Shows ready tasks (no blockers), applies user preferences for ordering (priority, type, recency), and helps select work. |
| allowed-tools | Read,Bash(bd:*),Bash(~/.agents/skills/next/scripts/next-bd:*),Bash(~/.agents/skills/handoffs/scripts/list.sh:*),AskUserQuestion,mcp__jira__jira_get |
| model-tier | economy |
| model | haiku |
| effort | medium |
| version | 1.4.1 |
| author | flurdy |
Help select the next bead to work on based on readiness and user preferences.
Deciding between resuming a handoff and starting fresh? Run
/landscapefirst — its**Next:**line weighs last session's live thread against fresh ready work. This skill is the "start fresh" branch of that decision; it still runs its own handoff check (see Resume awareness) before marking a bead in_progress.
/next # Show ready beads as a ranked table (same as `list`)
/next list # Explicitly render the full ranked table, then ask which to pick
/next safe # Same but exclude services with in-progress beads
/next sprint # Same, enriched with Jira sprint and sorted by sprint bucket
/next task # Auto-pick the next most suitable task and start it
/next quick # Auto-pick an easy win (excludes busy services)
/next bug # Auto-pick the next most important bug and fix it
/next <bead-id> # Start working on specific bead
Find Ready Work
bd list --ready to get open, unblocked tasksin_progress beads (another session may be working on them)Rank by Suitability
Present Options
Start Work
# Show ready work as a ranked table
/next
# Explicitly render the full table (when a bare /next got over-interpreted)
/next list
# Show ready work, excluding services with in-progress beads
/next safe
# Show ready work, sorted by Jira sprint (active → future → no-sprint → no-Jira)
/next sprint
# Auto-pick and start the next most suitable task
/next task
# Auto-pick an easy win (excludes busy services)
/next quick
# Auto-pick the next most important bug and start fixing
/next bug
# Start a specific bead
/next mycode-abc
## Ready to Work (5 of 12 open)
| # | ID | Pri | Type | Labels | Title |
|---|------------|-----|---------|---------------------|--------------------------------|
| 1 | mycode-abc | P1 | bug | frontend | Fix login timeout issue |
| 2 | mycode-def | P2 | feature | backend, orders | Add export to CSV |
| 3 | mycode-ghi | P2 | task | auth | Update dependencies |
| 4 | mycode-jkl | P3 | feature | frontend, css | Dark mode toggle |
| 5 | mycode-mno | P3 | task | events, auth | Refactor auth service |
Currently in progress: mycode-xyz "Implement caching layer"
Which would you like to work on? (1-5, or specify ID, or "task" to auto-pick)
When invoked:
Get the ranked table using the next-bd script (handles ready list, blocked filtering, label fetching, and ranking in one command). Always invoke it through the portable shared install path so the command prefix is stable and allowlistable across harnesses:
~/.agents/skills/next/scripts/next-bd --in-progress
For safe and quick modes, add --avoid-busy to exclude beads whose labels overlap with in-progress beads:
~/.agents/skills/next/scripts/next-bd --in-progress --avoid-busy
This outputs a markdown table ranked by the priority algorithm, with labels included, blocked beads filtered out, and in-progress beads shown for awareness.
Parse command argument:
list: Render the full ranked table (see Listing Mode below), then ask user to pick. These are identical — list is just an explicit way to ask for the table when a bare /next has previously been over-interpreted as "auto-pick" or "summarise". Never auto-pick in this mode.safe: Show the script output with --avoid-busy, ask user to picksprint: Run sprint enrichment (see Sprint Mode below) and ask user to picktask: Auto-select top-ranked bead and start itquick: Auto-select an easy win task and start it (uses --avoid-busy)bug: Auto-select top-ranked bug and start it (see Bug Mode below)<bead-id>: Start that specific beadIf specific bead ID provided:
bd show <id>
Then run the handoff check (see Resume awareness below) before marking in_progress:
bd update <id> --status=in_progress
Otherwise, present the script output and ask user to choose
On selection:
bd showRun this only when committing to start a specific bead — /next <bead-id>, task, quick, bug, or a pick from the table — before bd update --status=in_progress. Never in Listing mode (/next / /next list mark nothing in_progress, so they must stay network-free and silent).
A prior session may have left a /wrap-up handoff that names this exact bead — its open threads and suggested next step are the warm-start context you'd otherwise resume without. Surface it, don't bury it.
Two-step so the common case (a fresh bead with no handoff) stays cheap — no network:
~/.agents/skills/handoffs/scripts/list.sh --bead <id>
Read the ---MATCHED-HANDOFFS--- section (current-repo, supersede-filtered, newest first). Empty → proceed straight to in_progress, say nothing. This is the usual path.~/.agents/skills/handoffs/scripts/list.sh --check-branches --bead <id>
If ---MATCHED-HANDOFFS--- is now empty, the work already shipped — proceed silently. Otherwise take the newest matched line.Matched line: {filename}|{date}|{time}|{slug}|{branch}|{exists}|{pr-state}|{pr-number}|{pr-url}.
When a live handoff remains, ask with AskUserQuestion before starting:
📥 A handoff
{slug}({date} {time}) covers{id}— load its context before starting?
Read ~/.claude/handoffs/{filename} and render it verbatim in a fenced block so it becomes resume context. If {exists}=Y and the recorded cwd differs from pwd, add **Switch directory:** cd {cwd}. If {exists}=N (worktree pruned) or the flow gets involved, point to /handoffs for the full worktree-recreation flow rather than reimplementing it here. Then mark the bead in_progress and continue.Keep it to one prompt. If bd/list.sh errors or there's no handoffs dir, proceed silently — the check is a courtesy, never a blocker.
list)/next with no auto-pick argument — and the explicit /next list — must show the table, not a prose summary of it. The next-bd output arrives inside a Bash tool result that the UI collapses to a few lines, so do not rely on the user seeing it there.
When listing:
next-bd script.Pick a number, a bead ID, or type task/bug/quick to auto-pick.Listing mode never marks anything in_progress. It only selects work once the user replies.
Rank ready beads in this order (first match wins):
| Rank | Criteria |
|---|---|
| 1 | Any P0 issue (any type) |
| 2 | P1 bug |
| 3 | P2 bug |
| 4 | P1 feature or task |
| 5 | P1 epic |
| 6 | P2 feature or task |
| 7 | P3 bug, feature, or task |
| 8 | P2 epic |
| 9 | P3 epic |
| 10 | Any other non-P4 issue |
Important: P4 items are backlog/future work and must NEVER be auto-picked. Always use --priority-max=3 to exclude them. Only show P4 items if user explicitly requests them.
When /next quick is used, prefer:
When /next sprint is used, enrich each ready bead with its Jira ticket + sprint, then render one table sorted by sprint bucket.
~/.agents/skills/next/scripts/next-bd --json
Empty array [] means nothing ready — render _No ready beads. Run /triage to add work._ and stop.
For each bead, scan title for the first match of [A-Z]+-\d+. If no match, the bead has no Jira link. Title-only is sufficient for the default flow.
If any keys were found, single JQL call. customfield_10020 is Jira Cloud's sprint field.
mcp__jira__jira_get
path: /rest/api/3/search/jql
queryParams:
jql: key in ({comma-separated keys})
fields: summary,status,issuetype,priority,customfield_10020
maxResults: 100
jq: issues[*].{key: key, status: fields.status.name, type: fields.issuetype.name, jiraPriority: fields.priority.name, sprint: fields.customfield_10020}
For each ticket's sprint array, pick the active sprint (first with state=="active"); else the earliest future sprint (lowest startDate with state=="future"); else treat as no-sprint.
state=="active". Multiple active sprints (cross-team boards) sort by sprint name / ID ascending.state=="future", ordered by startDate ascending.[A-Z]+-\d+ in title.Within each bucket, preserve the next-bd rank order.
## Ready by Sprint ({total} beads)
| # | ID | Pri | Type | Jira | Sprint | Status | Title |
|---|----|-----|------|------|--------|--------|-------|
| 1 | mycode-agf | P1 | task | [AB-1088](https://yourorg.atlassian.net/browse/AB-1088) | 31 (active) | In Progress | Replace event attribution wiring... |
| 2 | mycode-6ic | P2 | task | [AB-1424](https://yourorg.atlassian.net/browse/AB-1424) | 32 (future) | Backlog | Make analytics client stateless... |
| 3 | mycode-y8p | P2 | bug | — | — | — | Auth0 postLogin race... |
# is a continuous index for the picker.Jira column: markdown link [KEY](https://yourorg.atlassian.net/browse/KEY). — if no key.Sprint column: number + state suffix only (31 (active), 32 (future)). Strip the project prefix from sprint names like "PROJ Sprint 31". For descriptive sprint names without an obvious number, keep the full name. — for no-sprint and no-Jira beads.Status column: Jira status. — for no-Jira beads._Jira unavailable: {error}. Showing beads in rank order without sprint info.__All ready beads in {sprint name}._Same prompt as default mode (1-N, bead ID, or task/bug/quick to auto-pick). For sprint task/sprint bug/sprint quick, prefer the top-ranked match in the active sprint, falling back to the next bucket if empty.
When /next bug is used:
Filter to open bugs only (excluding P4 backlog):
bd list --ready --type=bug --priority-max=3
Rank by priority: P0 > P1 > P2 > P3 (highest priority bug first, P4 excluded)
Auto-select and start the top-ranked bug
Continue fixing bugs if the completed bug was minor:
A bug is considered minor if:
Continue to next bug automatically when:
Stop and ask user when: