AgentSkillsCN

azure-devops-workflow

Azure DevOps 工作项状态、转换规则以及分支命名规范。适用于领取工作项、创建分支、变更工作项状态,或将 PR 与工作项关联时使用。触发条件:领取、分配、分支命名、工作项状态、进行中、等待合并、前序任务、待办事项列表。

SKILL.md
--- frontmatter
name: azure-devops-workflow
description: "Azure DevOps work item states, transitions, and branch naming conventions. Use when picking up work items, creating branches, changing work item state, or linking PRs to work items. Triggers on: pick up, assign, branch naming, work item state, In Progress, Awaiting Merge, predecessor, backlog."

Azure DevOps Workflow

Work Item Types

TypePurpose
Product Backlog Item (PBI)Deliverable feature or change
SpikeTime-boxed investigation

Both follow the same workflow states.

Work Item States

code
New → Ready → In Progress → Awaiting Merge → Merged → Done
                  ↓
              Blocked
StateDescriptionAssignment
NewNot yet refinedUnassigned
ReadyAvailable to pick upUnassigned
In ProgressActively worked onAssigned
BlockedExternal dependencyRemains assigned
Awaiting MergePR createdRemains assigned
MergedPR mergedRemains assigned
DoneReleasedRemains assigned

Valid Transitions

Picking up: ReadyIn Progress (normal), NewIn Progress (unusual), BlockedIn Progress (resuming)

During development: In ProgressBlocked, In ProgressAwaiting Merge

Cannot pick up: Items in Awaiting Merge, Merged, or Done

Branch Naming

Format: backlog/{workitem_id}-{short-description}

  • Lowercase, hyphen-separated, 3-5 words
  • Remove repository hints: [interest_accrual] Add Xbacklog/12345-add-x

Hotfix Branch Naming

Format: hotfix/{workitem_id}-{short-description}

  • Same naming rules as backlog branches
  • Branch from main (not from a feature branch)
  • Used only when user explicitly requests a hotfix (e.g., "this is a hotfix", "production emergency")
  • Never auto-detected from Azure DevOps fields

Workflow Types

WorkflowCoder AgentReview ModeBranch PrefixDefault Commit Type
TDDCoderStandardbacklog/feat
One-shotCoderStandardbacklog/feat
Bug-fixCoderRegression + minimalitybacklog/fix
RefactoringCoderBehaviour preservationbacklog/refactor
ChoreCoderLightweightbacklog/chore
HotfixCoderExpedited (security + regression)hotfix/fix

Repository Hints

Work item titles may include [repository_name] prefix. Verify current working directory matches before starting.

Predecessor Validation

Before picking up, check Predecessor links. Warn if any predecessor is not in Merged or Done:

code
⚠️ Incomplete predecessors:
| ID | Title | State | Assigned To |

PR Linking

Link using AB#12345 or full URL. Creates bidirectional link.

Default Branch

Check for main first, fall back to master:

bash
git fetch origin
git rev-parse --verify origin/main >/dev/null 2>&1 && DEFAULT="main" || DEFAULT="master"
git checkout $DEFAULT && git pull origin $DEFAULT
git checkout -b backlog/{id}-{description}

MCP Domains

  • core — Project/team info
  • work — Iterations, backlogs
  • work-items — Work item CRUD
  • repositories — Git, branches, PRs

Use batch tools for multiple updates.