bugs-next
Skill3 starsChanged 19 days agoMITView on GitHub
Recommends which bug to fix next based on the backlog's bugs-open.md severities, the Recommended fix order, and whether a fix is already in progress, then asks for user confirmation. Returns the confirmed Bug ID to the caller — does NOT start a branch or attempt a fix. TRIGGER when the user asks which bug to fix next, what to work on from the bug backlog, or for a next-bug recommendation. This is the bug-family counterpart to features-next.
- Commits and pushes
In this repository17 other files it gives its agents.
- backlog-cycleSkill
- backlog-forecastSkill
- backlog-importSkill
- backlog-reportSkill
- bug-fixSkill
- bug-reportSkill
- bugs-archiveSkill
- bugs-statusSkill
- bugs-triageSkill
- decision-recordSkill
- feature-developmentSkill
- feature-planSkill
- features-archiveSkill
- features-nextSkill
- features-statusSkill
- features-triageSkill
- gitflowSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 5 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 43
Read <backlog>/bugs-open.md in full.
- Distinctive: line 68
If the table has zero actionable rows, tell the user the bug backlog is clear and stop.
- Very specific: line 75
Tier 0 — In Progress bonus: Add +1000 if in_progress is true.
- Very specific: line 86
Tier 2 — Environment bonus: Add +20 if environment is anything other than local (deployed, prod, both, …) — a bug hitting the deployed …
- Very specific: line 90
Tier 3 — Recommended fix order bonus: Add +10 if the bug appears in the ## Recommended fix order list, and record its position (1 = first) …
- Very specific: line 94
Tier 4 — No schema change bonus: Add +5 if schema is false — no migration to write, sequence, and coordinate.
- Very specific: line 133
If AskUserQuestion is not available in the current context (e.g.
- Distinctive: line 140
Use the AskUserQuestion tool with a single question:
- Distinctive: line 156
If the user selects "Cancel", stop and return without a Bug ID.
- Distinctive: line 160
After the user confirms, output the confirmed bug's id as the final line in this exact format so the caller can extract it:
- Very specific: line 171
Always read the full <backlog>/bugs-open.md before scoring — never guess which bug is next from memory.
- Very specific: line 173
Do not invoke bug-fix, gitflow, or any other skill.
- Distinctive: line 191
Never substitute an autonomous-operation instruction for step 5's confirmation — the scoring produces a *recommendation*, not a licence to …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Recommend the next bug to fix and return the confirmed Bug ID to the
caller. Mirrors features-next: score, present, confirm via a mandatory
AskUserQuestion, return an ID line.
<backlog> is docs/backlog unless .backlog-kit.toml sets [paths] backlog_dir.
Input: Optional Bug ID (e.g. BUG-004) to skip the recommendation
step and jump straight to confirmation for that bug.
Script
scripts/rank_bugs.py owns steps 2-3's mechanical work — collecting
Open/In Progress rows and applying the fixed point-tier scoring
(In Progress > Severity > deployed (not local-only) environment > fix-order position >
no schema change) with its tie-breaks. Run it and use its output for
steps 2-4 rather than re-deriving the ranking by hand (run it from this
skill's base directory):
python3 scripts/rank_bugs.py <repo-root>Pass --select BUG-NNN to resolve one specific bug directly instead of
ranking (for the skill's own optional input, or a step-5 "Other"
free-text answer). Add --json for the raw structured data. The script
never calls AskUserQuestion and never returns a final decision —
step 5's mandatory confirmation is still this skill's job.
Steps
1. Read bugs-open.md
Read <backlog>/bugs-open.md in full. If it doesn't
exist, there's no backlog to recommend from — tell the user to run
bug-report first, and stop.
2. Collect actionable bugs
From the ## Bug List table, collect every row whose Status is
⬜ Open or 🔶 In Progress. Skip ✅ Fixed, 🚫 Won't fix, and
❓ Cannot reproduce. For each collected row record:
id— theBug IDcolumn value (e.g.BUG-004; the cell is the link[BUG-004](bugs/BUG-004.md)— take the link text)severity—S1/S2/S3/S4area— theAreacolumn valueenvironment— theEnvironmentcolumn value (localis the only value that means "not deployed"; the backlog's legend defines the others, e.g.deployed/prod/both)in_progress—trueif Status is🔶 In Progress(abug-fixrun started this and was interrupted before archiving), elsefalseschema—trueif the bug's details file<backlog>/bugs/BUG-NNN.mdhas a- **Schema change:** yesline (the fix needs a schema migration or equivalent change), elsefalse(defaultfalse; alsofalseif the file is missing — surface that as a warning pointing atbugs-status)summary— theSummarycolumn text
If the table has zero actionable rows, tell the user the bug backlog is clear and stop.
3. Score and rank
Apply in order (higher = more urgent):
Tier 0 — In Progress bonus. Add +1000 if in_progress is true. This
dominates every other tier, so an interrupted bug-fix run is always
resumed before a new bug is started — real work is already sitting on a
fix/* branch for it.
Tier 1 — Severity.
- S1 → 400
- S2 → 300
- S3 → 200
- S4 → 100
Tier 2 — Environment bonus. Add +20 if environment is anything other
than local (deployed, prod, both, …) — a bug hitting the deployed
stack is hurting users right now.
Tier 3 — Recommended fix order bonus. Add +10 if the bug appears in
the ## Recommended fix order list, and record its position (1 = first)
for the tie-break.
Tier 4 — No schema change bonus. Add +5 if schema is false — no
migration to write, sequence, and coordinate.
Select the highest-scoring bug. Break ties, in order:
- Earlier position in
## Recommended fix orderwins (a bug with a position beats one without). - Otherwise the lower
BUG-NNNnumber wins.
Because Tier 1 (100–400) dominates Tier 3 (10), the fix-order list only breaks ties within a severity tier — it never overrides an explicit severity difference. Tier 0 (1000) is the one exception that outranks severity.
4. Present the recommendation
## Recommended Next Bug
**BUG-NNN — <title>**
<summary>
**Severity:** <S?> **Area:** <area> **Environment:** <env> **Schema fix:** <yes/no>
**Why this bug:**
- <if in_progress: "🔶 Already in progress — a bug-fix run started this; resuming beats starting a new one" as the first bullet, always>
- <tier reason, e.g. "S1 — auth bypass, blocks release" or "S2, reproduces on the deployed stack">
- <position in the recommended fix order, if listed>Also show the top 3 runners-up (by score) with a one-line reason each, if there are that many actionable bugs.
5. Ask for user confirmation
Mandatory and unconditional — it must always reach the user, never be
auto-answered, even under an "Auto Mode" or similar autonomous-operation
instruction. Which bug gets fixed next commits a fix/* branch and
potentially a long automated run — that is always the user's call.
If AskUserQuestion is not available in the current context (e.g. this
skill was invoked from inside a spawned/backgrounded subagent), do not
fall back to the top-scored pick. Stop, end the response without a
BUG_ID: line, and say plainly that confirmation could not be obtained
because AskUserQuestion was unavailable. The caller must re-invoke from
a context that has it (see bug-fix's Phase 0).
Use the AskUserQuestion tool with a single question:
- Question: "Fix
BUG-NNNnext?" (or "Resume fixingBUG-NNN?" ifin_progress) - Options (≤4 total — the recommendation plus up to 3 runners-up from
step 4; use one slot for "Cancel", dropping the lowest runner-up if all
4 slots would otherwise be full):
- "Yes, fix
BUG-NNN" (or "Yes, resumeBUG-NNN") - "
BUG-<runner-up 1>" — one-line reason - "
BUG-<runner-up 2>" (if present) - "Cancel" — stop here
- "Yes, fix
The tool's built-in "Other" choice already lets the user type any Bug ID directly, including one not shortlisted — don't add a "choose a different bug" option.
If the user selects "Cancel", stop and return without a Bug ID.
6. Return the confirmed Bug ID
After the user confirms, output the confirmed bug's id as the final line in this exact format so the caller can extract it:
BUG_ID: BUG-NNNGuardrails
- Always read the full
<backlog>/bugs-open.mdbefore scoring — never guess which bug is next from memory. - Do not invoke
bug-fix,gitflow, or any other skill. This skill only recommends, confirms, and returns the ID. The caller decides what's next. - Resolving a bug by ID: whenever a specific Bug ID is available —
the skill's input, or a free-text "Other" answer in step 5 — look it up
directly as the row in
bugs-open.mdwhoseBug IDcolumn matches, rather than re-running the scoring pass. If it's the input, skip steps 2–4 and go straight to step 5 with that bug pre-selected (still confirm). If it's a step-5 "Other" answer, treat it as the final selection — but only once it resolves to a real⬜ Open/🔶 In Progressrow; if it matches nothing, or matches a✅ Fixed/🚫/❓row, report the mismatch and ask again. - A bug already
✅ Fixed,🚫 Won't fix, or❓ Cannot reproducemust never be recommended. - A
🔶 In Progressbug is always preferred over any⬜ Openone, regardless of severity — hence Tier 0's dominant score. If more than one is🔶 In Progress, Tier 0 puts all of them ahead of every open bug and Tiers 1–4 pick among just that set. - Never substitute an autonomous-operation instruction for step 5's confirmation — the scoring produces a recommendation, not a licence to skip asking.
- Never run
git commit,git pushor open a PR.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

