ado-bug-lifecycle
Skill0 starsChanged 6 months agoMITView on GitHub
Pick up or abandon an ADO bug — store the previous assignee, transition state to Active or back to New, and write/restore the session state file used for resume. Use when the user says "pick up bug X", "take bug X", "abandon bug X", "rollback bug X", or when the orchestrator transitions a bug at the start or end of work.
In this repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ado-bug-querySkill
- ado-pr-createSkill
- bug-captureSkill
- bug-reviewer-runSkill
- bug-triage-sessionSkill
- storyblok-bugfix-storySkill
- storyblok-component-pushSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Before changing state, capture the existing assignee.
- Very specific: line 22
If PREV_ASSIGNEE is empty (bug was Unassigned), the rollback should leave it unassigned — pass an empty string to --assigned-to.
- Very specific: line 52
If multiple bugs are being picked up in a triage session, append to activeBugs rather than overwriting.
- Distinctive: line 60
If a bug cannot be finished:
- Very specific: line 68
After rollback, remove the bug from /tmp/bug-session-state.json.
- Very specific: line 83
Every Active pickup ends in a PR or a rollback: If you set a bug to Active and the work doesn't ship, roll it back before ending the …
- Very specific: line 84
Use email, not GUID, for --assigned-to.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Azure DevOps — Bug Lifecycle
Owns state transitions on ADO work items. Every bug set to Active must end in either a merged PR or an explicit rollback to New — no orphans.
Hard rule — store PREV_ASSIGNEE first
Before changing state, capture the existing assignee. You need it to roll back cleanly.
PREV_ASSIGNEE=$(az boards work-item show --id <WORK_ITEM_ID> --output json \
| jq -r '.fields."System.AssignedTo".uniqueName // ""')If PREV_ASSIGNEE is empty (bug was Unassigned), the rollback should leave it unassigned — pass an empty string to --assigned-to.
Pick up — set Active and assign to self
az boards work-item update --id <WORK_ITEM_ID> \
--state "Active" \
--assigned-to "$AZURE_ASSIGNEE_EMAIL"--assigned-to accepts email or display name. Email is more reliable. Do not pass a GUID.
Write session state — immediately after pickup
This protects against session token limits or crashes mid-session.
cat > /tmp/bug-session-state.json <<EOF
{
"activeBugs": [
{ "id": <WORK_ITEM_ID>, "prevAssignee": "$PREV_ASSIGNEE" }
]
}
EOFIf multiple bugs are being picked up in a triage session, append to activeBugs rather than overwriting.
On session resume: the orchestrator (bug-triage-session) reads this file first and either finishes or rolls back any in-progress bug before starting new work.
Abandon / rollback — restore state and assignee
If a bug cannot be finished:
az boards work-item update --id <WORK_ITEM_ID> \
--state "New" \
--assigned-to "$PREV_ASSIGNEE"After rollback, remove the bug from /tmp/bug-session-state.json.
Valid states
New, Active, Resolved, Closed. The triage flow only ever transitions between New and Active — Resolved/Closed are set by the team after PR merge.
Custom fields (rare) use --fields "FieldName=value" — space-separated key=value pairs.
Hard rules
- Never change state without storing
PREV_ASSIGNEEfirst. - Every Active pickup ends in a PR or a rollback. If you set a bug to
Activeand the work doesn't ship, roll it back before ending the session. - Use email, not GUID, for
--assigned-to.
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.

