agentleFS
kdoddy36615kdoddy36615/bug-reviewer/.claude/skills/ado-bug-lifecycle/SKILL.md

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.

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
  1. Distinctive:

    Before changing state, capture the existing assignee.

    line 15
  2. Very specific:

    If PREV_ASSIGNEE is empty (bug was Unassigned), the rollback should leave it unassigned — pass an empty string to --assigned-to.

    line 22
  3. Very specific:

    If multiple bugs are being picked up in a triage session, append to activeBugs rather than overwriting.

    line 52
  4. Distinctive:

    If a bug cannot be finished:

    line 60
  5. Very specific:

    After rollback, remove the bug from /tmp/bug-session-state.json.

    line 68
  6. Very specific:

    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 …

    line 83
  7. Very specific:

    Use email, not GUID, for --assigned-to.

    line 84

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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" }
  ]
}
EOF

If 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_ASSIGNEE first.
  • 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 session.
  • Use email, not GUID, for --assigned-to.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.