/adev:bugfix-loopfrom adev
Self-re-invoking loop that drains eligible P2/P3 bugs from the issue board unattended, one bug per turn, using /adev:debug --auto for each attempt. Supports priority bounds, worktree isolation, auto-commit, and GitHub sync.
Ships in adev. 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.
Announce at start: "I'm using the adev:bugfix-loop skill to drain eligible bugs from the board."
--max-bugs <N>: caps bugs attempted across the whole run (across all self-re-invoked turns). Default: unbounded — the loop drains until no eligible bug remains or --max-turns is hit.--max-turns <N>: caps self-re-invocation turns. Default: 20 — a conservative bound preventing an unbounded run when neither flag is set.--github-sync: enables the tracker-provider-bridge's inbound pull before each bug selection and outbound writeback after each attempt (tracker-provider-bridge.spec.md). Inbound sync runs once per turn in Step 0, before the status/budget guard; outbound writeback runs once per completed attempt in Step 4. Both degrade gracefully (never error the loop) when GitHub or gh is unreachable — see Failure Modes below.--resume [--resume-run-id <id>] (internal): used only by this skill's own self-re-invocation, mirroring /adev:build --resume. Not intended for direct user invocation. --resume-run-id is always passed explicitly by the re-invocation call — the skill always knows its own run_id from the turn that just completed. A manual --resume without --resume-run-id falls back to adev bugfix-loop latest (the rare case of a manual --resume after a crash where the exact run_id wasn't captured).--worktree-per-bug: default OFF. When set, each bug's claim, /adev:debug --auto attempt (Step 4), and any resulting commit happen inside a dedicated adev-managed worktree (adev worktree add --slug bugfix-<issue-id> --base <ref>) instead of the shared working tree — isolating each bug's diff from every other bug's in-flight changes (spec BEH-3).--auto-commit: default OFF. When set (with or without --worktree-per-bug), a FIXED verdict triggers Step 4.5's commit/push/PR automation (spec BEH-4). Without either --worktree-per-bug or --auto-commit, Step 4.5 is skipped entirely and behavior is unchanged from before this capability existed.--max-priority <P0-P4>: caps the priority band Step 2 selects from. Default: P3 (covering P2/P3, identical to today's hardcoded behavior). The full P0-P4 range is accepted — P0/P1 are a deliberate, explicit operator opt-in (BEH-9), not rejected the way they were before the eligibility-floor amendment shipped. Validated fail-fast at Step 0, before any bug selection (BEH-10); malformed values (anything other than P0-P4) halt the run with INVALID_PRIORITY_BOUND. BEH-7's unconditional module-exclusion floor (reserved safety tags, always enforced) is unaffected by this flag at any value, including P0 — it is the actual, non-configurable safety boundary, not the priority band.--epic <id>: restricts Step 2's selection to <id> and its tiered children (<id>.N) for the whole run. Default: unscoped (candidates drawn from the entire board, today's behavior). Persisted on the run state at create time (adev-plugin-j2ev.1) and re-passed on every self-re-invocation exactly like --max-priority/--worktree-per-bug/etc. — see Step 2 and Step 6.Load Skill Extensions:
adev skill-ext load --skill bugfix-loop
The following skill extension instructions apply to this invocation (source: installed domain extensions and/or project-level overrides). If the output is __NONE__, continue normally.
Resolves the run (fresh, resumed, or manual-recovery), validates --max-priority, checks branch freshness, and runs the --github-sync inbound pull.
Conditional loading: Read
<ADEV_ROOT>/skills/bugfix-loop/references/steps/step-0-resolve-the-run.mdfor the full instructions. Do not act on this section from the summary above.
Checks the status guard and per-turn budget before selecting a bug.
Conditional loading: Read
<ADEV_ROOT>/skills/bugfix-loop/references/steps/step-1-turn-guard.mdfor the full instructions. Do not act on this section from the summary above.
Selects the next eligible bug via adev issues next, bounded by the resolved priority band.
Conditional loading: Read
<ADEV_ROOT>/skills/bugfix-loop/references/steps/step-2-select-a-bug.mdfor the full instructions. Do not act on this section from the summary above.
Claims the selected bug (optionally inside a per-bug worktree), retrying up to 3 times on contention.
Conditional loading: Read
<ADEV_ROOT>/skills/bugfix-loop/references/steps/step-3-claim.mdfor the full instructions. Do not act on this section from the summary above.
Invokes /adev:debug --auto for the claimed bug, records the AttemptRecord, and releases the claim.
Conditional loading: Read
<ADEV_ROOT>/skills/bugfix-loop/references/steps/step-4-attempt.mdfor the full instructions. Do not act on this section from the summary above.
For FIXED verdicts when --worktree-per-bug or --auto-commit was passed, commits the fix and opens a PR.
Conditional loading: Read
<ADEV_ROOT>/skills/bugfix-loop/references/steps/step-4.5-commit-and-pr.mdfor the full instructions. Do not act on this section from the summary above.
Prints the running summary table and the final ADEV-BUGFIXLOOP: token, on a terminal turn only.
Conditional loading: Read
<ADEV_ROOT>/skills/bugfix-loop/references/steps/step-5-finish.mdfor the full instructions. Do not act on this section from the summary above.
Tears down any per-bug worktree, then self-re-invokes /adev:bugfix-loop --resume with the original flags, on a non-terminal turn only.
Conditional loading: Read
<ADEV_ROOT>/skills/bugfix-loop/references/steps/step-6-self-reinvoke.mdfor the full instructions. Do not act on this section from the summary above.
| Condition | Behavior |
|---|---|
Issue board unreachable / tasks.backend misconfigured | Halt immediately on the first turn, no retry; adev bugfix-loop finish --status blocked, then the BLOCKED token |
| Claim fails 3 times in one turn (contention) | Turn ends without an attempt, still counts toward --max-turns (Step 3), self-re-invokes normally |
/adev:debug --auto crashes | Treated as PARKED, claim released, loop continues |
--github-sync set, GitHub/gh unreachable during inbound sync | Degrades to local-board-only candidates this turn, no error; bounded to 5 consecutive degraded turns before degraded_sync_note is set and gateCheck() stops being called for the rest of the run (tracker-provider-bridge.spec.md Error Propagation) |
--github-sync set, GitHub/gh unreachable during outbound writeback | That attempt's comment post is skipped and logged; local state (AttemptRecord, WorkItem) is unaffected, not retried automatically within the run |
Never:
/adev:debug's own ADEV-DEBUG: FIXED tokenadev issues next/adev:debug --auto crashes — always releaseADEV-BUGFIXLOOP: token anywhere but the literal last line of output--github-sync degraded — local-board-only operation is the correct degrade path, not a stop conditionreferences/steps/step-0-resolve-the-run.md (opens in a new tab)references/steps/step-1-turn-guard.md (opens in a new tab)references/steps/step-2-select-a-bug.md (opens in a new tab)references/steps/step-3-claim.md (opens in a new tab)references/steps/step-4-attempt.md (opens in a new tab)references/steps/step-4.5-commit-and-pr.md (opens in a new tab)references/steps/step-5-finish.md (opens in a new tab)references/steps/step-6-self-reinvoke.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub agentic-development/adev-plugin --plugin adev31 skills in this plugin
/assessadev:assessAssess codebase readiness for agentic development. Scans the codebase using static file inspection and outputs maturity scores across 8 structural dimensions (raw mode) or 11 dimensions (adev mode). Use when you want to evaluate how well-suited a codebase is for AI-assisted development, identify improvement areas, or track progress over time./brainstormadev:brainstormExplore a feature idea interactively and produce a Feature Charter. Validates against constitution and existing charters. Use before building any new feature or module, when the user mentions a new capability, or says 'let us build X'./Other plugins' skills for the same job