Updates Azure DevOps work item with progress, comments, and status changes based on local development work.
Updates Azure DevOps work item with progress, comments, and status changes based on local development work.
/plugin marketplace add rafaelkamimura/claude-tools/plugin install rafaelkamimura-claude-tools@rafaelkamimura/claude-toolsUpdates Azure DevOps work item with progress, comments, and status changes based on local development work.
This command requires Azure DevOps MCP server to be installed and configured.
If not installed, follow: https://github.com/microsoft/azure-devops-mcp-server
Check if work item number was provided as argument.
If no work item number provided: Output: "Usage: /update-azure-task [work_item_number]
Example: /update-azure-task 12345" Exit command.
Use mcp__azuredevops__get_work_item tool (if available):
If tool not available: Output: "Azure DevOps MCP server not configured.
Install and configure following: /fetch-azure-task documentation" Exit command.
If work item not found: Output: "Work item [number] not found or access denied." Exit command.
Extract current state:
Use Bash tool to get current branch:
git branch --show-currentIf not in a git repository: Output: "Not in a git repository. Work item updates require git context." Exit command.
Use Bash tool to identify base branch:
for base in main master develop development staging; do git rev-parse --verify $base >/dev/null 2>&1 && echo $base && break; doneUse Bash tool to get recent commits for this branch:
git log --oneline [base_branch]..HEADUse Bash tool to get detailed commit info:
git log --format="%H|%s|%b|%ad" --date=short [base_branch]..HEADUse Bash tool to get change statistics:
git diff --stat [base_branch]..HEADUse Bash tool to find saved work item context:
ls -t .claude/azure-tasks/work-item-[ID].md 2>/dev/nullIf context file exists, use Read tool to read it.
Use Bash tool to find related task history:
ls -t .claude/task-history/*.md 2>/dev/null | head -1If task history exists, use Read tool to read it.
Compile update information:
Work Summary: Brief description of work completed based on:
Technical Changes:
Commit References:
Format update content:
## Development Update - [Current Date]
### Work Completed
[Summary of work done]
### Changes Made
- [N] commits pushed
- [N] files modified
- [N] files added
- [N] files deleted
### Commits
[List of commit hashes and messages]
### Branch
Branch: [branch_name]
### Files Changed
[Summary of file changes]
### Technical Details
[Additional technical context from commits]
Output: "## Work Item Update for #[ID]
Current State: [current status] Branch: [branch name] Commits: [N] commits ready to link
[Generated update summary]
What would you like to update?
Choose option (1-6):"
WAIT for user's choice.
Based on user's choice:
If option 1 (Add comment only):
Use mcp__azuredevops__add_work_item_comment tool:
If option 2 (Update to Active):
Use mcp__azuredevops__update_work_item tool:
If option 3 (Update to Resolved):
Use mcp__azuredevops__update_work_item tool:
Also add comment with resolution summary.
If option 4 (Update to Closed):
Output: "Are you sure you want to close work item #[ID]? This should only be done when work is fully complete and verified. (yes/no):" WAIT for confirmation.
If user confirms: Use mcp__azuredevops__update_work_item tool:
Also add comment with closure summary.
If user says no, return to options menu.
If option 5 (Comment + Status):
Output: "Select new status:
Choose status (1-3):" WAIT for status choice.
First add comment, then update status based on choice.
If option 6 (Custom):
Output: "Enter custom comment (or 'skip' to skip comment):" WAIT for comment input.
Output: "Enter new status (Active/Resolved/Closed) or 'skip' to keep current:" WAIT for status input.
Apply custom comment and/or status as provided.
Use mcp__azuredevops__get_work_item tool to fetch updated work item:
Display confirmation: Output: "Work item #[ID] updated successfully!
New Status: [updated status] Last Updated: [timestamp]
View in Azure DevOps: [work_item_url]"
Use Bash tool to append update to local history:
echo "## Update $(date '+%Y-%m-%d %H:%M:%S')\n[update summary]\n" >> .claude/azure-tasks/work-item-[ID].mdOutput: "Update recorded locally in: .claude/azure-tasks/work-item-[ID].md"
If work item ID not provided, attempt to detect from:
feature/AB#12345-description)AB#12345: commit message)Use Bash tool to check branch name:
git branch --show-current | grep -oE 'AB#[0-9]+'If found, use detected ID and confirm with user.
Automatically format commits as Azure DevOps links in comments:
[commit_hash] → Link to commit in Azure ReposSuggest status based on:
If work item was updated by someone else:
If PAT lacks update permissions:
If requested state change is invalid:
/fetch-azure-task [ID] → development → /commit → /update-azure-task [ID]
Works with:
/commit - Uses commit messages for update context/mr-draft - Can reference work item in MR/task-init - Can initialize from work item.claude/azure-tasks/