Azure DevOps Work Item Tool
Fetch, manage, and analyze Azure DevOps work items using tools azure-devops.
CLI Reference
tools azure-devops --workitem <id|ids> # Fetch work item(s) tools azure-devops --query <id|url|name> # Fetch query results (supports name matching) tools azure-devops --query <id> --download-workitems # Download all to files tools azure-devops --dashboard <id|url> # Get dashboard queries tools azure-devops --list # List cached items
Options
| Option | Description |
|---|---|
--format ai|md|json | Output format (default: ai) |
--force, --refresh | Bypass cache |
--state <states> | Filter by state (comma-separated) |
--severity <sev> | Filter by severity (comma-separated) |
--download-workitems | Download all items from query |
--category <name> | Save to tasks/<category>/ |
--task-folders | Save in tasks/<id>/ subfolder |
Output Paths
- •Tasks:
.claude/azure/tasks/→<id>-<Slug-Title>.md - •With
--category react19:.claude/azure/tasks/react19/<id>-<Slug>.md - •With
--task-folders:.claude/azure/tasks/<id>/<id>-<Slug>.md
Operations
Fetch Work Items
tools azure-devops --workitem 261575 tools azure-devops --workitem 261575,261576,261577 tools azure-devops --workitem 261575 --category react19 tools azure-devops --workitem 261575 --force
Fetch Query
The --query option supports three input formats:
- •Query ID (GUID):
d6e14134-9d22-4cbb-b897-b1514f888667 - •Full URL:
https://dev.azure.com/org/project/_queries/query/abc123 - •Query Name:
"Otevřené bugy"(fuzzy matching supported)
# By ID tools azure-devops --query d6e14134-9d22-4cbb-b897-b1514f888667 # By name (uses fuzzy matching to find the query) tools azure-devops --query "Open Bugs" tools azure-devops --query "Otevřené bugy" # With filters tools azure-devops --query <id> --state Active,Development tools azure-devops --query "Active Tasks" --download-workitems --category react19
Query Name Matching:
- •Exact matches are used immediately
- •Fuzzy matching finds the closest query name if no exact match
- •Shows alternatives if multiple similar queries exist
- •Query list is cached for 1 day for fast lookups
Analyze Work Items
When user says "analyze workitem/task X" or "analyze tasks from query Y":
- •
Fetch work item(s):
bashtools azure-devops --workitem <ids> --category <cat> --task-folders
- •
Read the generated
.mdfile for each work item - •
Spawn Explore agent (Task tool with
subagent_type: "Explore") for each:codeAnalyze codebase for Azure DevOps work item: **#{id}: {title}** State: {state} | Severity: {severity} **Description:** {description} **Comments:** {comments} Find: 1. Relevant code files/components for this issue 2. Current implementation and data flow 3. Required changes 4. Dependencies and related systems 5. Complexity assessment Return: files found, current implementation, recommended approach, considerations, complexity (Low/Medium/High) - •
Write
.analysis.mdnext to the work item file:- •Work item:
.claude/azure/tasks/261575-Title.md - •Analysis:
.claude/azure/tasks/261575-Title.analysis.md
- •Work item:
Analysis Document Format
# Analysis: #{id} - {title}
**Analyzed**: {timestamp}
**Work Item**: {path to .md file}
## Summary
{1-2 sentence findings summary}
## Relevant Code
- `path/file.ts` - {purpose}
## Current Implementation
{How current code works}
## Recommended Approach
{Step-by-step plan}
## Considerations
- {Risks/considerations}
## Complexity: {Low|Medium|High}
{Reasoning}
Examples
| User Request | Action |
|---|---|
| "Get workitem 261575" | tools azure-devops --workitem 261575 |
| "Show query results for X" | tools azure-devops --query X |
| "Show Open Bugs query" | tools azure-devops --query "Open Bugs" |
| "Fetch Otevřené bugy" | tools azure-devops --query "Otevřené bugy" |
| "Download React19 bugs" | tools azure-devops --query "React19 Bugs" --download-workitems --category react19 |
| "Analyze task 261575" | Fetch → Explore agent → Write .analysis.md |
| "Analyze all active bugs" | Fetch query with --download-workitems → Parallel Explore agents → Write .analysis.md files |
Creating Work Items
The --create command supports multiple modes for creating new work items.
CLI Reference
tools azure-devops --create -i # Interactive mode tools azure-devops --create --from-file <path> # From template file tools azure-devops --create <query-url> --type Bug # Generate template from query tools azure-devops --create <workitem-url> # Generate template from work item tools azure-devops --create --type Task --title X # Quick creation
Create Options
| Option | Description |
|---|---|
-i, --interactive | Interactive mode with step-by-step prompts |
--from-file <path> | Create from template JSON file |
--type <type> | Work item type (Bug, Task, User Story, etc.) |
--title <text> | Work item title (required for quick mode) |
--severity <sev> | Severity level |
--tags <tags> | Tags (comma-separated) |
--assignee <email> | Assignee email |
Creation Modes
1. Interactive Mode (-i)
Best for: Manual creation with full control over all fields.
tools azure-devops --create -i
Prompts for: type, title, description (via editor), severity, state, tags, assignee, parent link.
2. Template from Query
Best for: Creating work items that match patterns from existing items.
tools azure-devops --create "https://dev.azure.com/.../_queries/query/abc" --type Bug
This:
- •Analyzes work items from the query
- •Extracts common patterns (area paths, tags, severities used)
- •Generates a template with hints from analyzed items
- •Saves to
.claude/azure/tasks/created/template-<timestamp>.json
3. Template from Work Item
Best for: Cloning or creating similar work items.
tools azure-devops --create "https://dev.azure.com/.../_workitems/edit/12345"
This:
- •Fetches the source work item
- •Generates a template pre-filled with matching values
- •Keeps parent reference if source had one
- •Saves to
.claude/azure/tasks/created/template-<timestamp>.json
4. From Template File
Best for: LLM workflows where templates are prepared programmatically.
tools azure-devops --create --from-file ".claude/azure/tasks/created/template.json"
Template format:
{
"$schema": "azure-devops-workitem-v1",
"type": "Bug",
"fields": {
"title": "Error in checkout flow",
"description": "<p>Description here</p>",
"severity": "A - critical",
"tags": ["frontend", "checkout"],
"assignedTo": "user@example.com",
"areaPath": "Project\\Area",
"iterationPath": "Project\\Sprint1"
},
"relations": {
"parent": 12345
}
}
5. Quick Non-Interactive
Best for: Simple work items created from command line.
tools azure-devops --create --type Task --title "Fix login bug" tools azure-devops --create --type Bug --title "Error" --severity "A - critical" --tags "frontend,urgent"
LLM Workflow
When user asks to "create a work item" or "file a bug":
- •
Gather information - Ask for: type, title, description, severity (if bug)
- •
Choose mode based on context:
- •Have a template file? Use
--from-file - •Want to match existing patterns? Generate template from query first
- •Simple request? Use quick mode
--type X --title "Y" - •Complex with many fields? Use interactive mode
- •Have a template file? Use
- •
Create the work item:
bash# Quick creation tools azure-devops --create --type Bug --title "Error in checkout" --severity "B - high" # Or from template tools azure-devops --create --from-file template.json
- •
Report the result - Include the work item ID and URL in your response.
Examples
| User Request | Action |
|---|---|
| "Create a bug for the login issue" | --create --type Bug --title "Login issue" --severity "B - high" |
| "File a task to update docs" | --create --type Task --title "Update documentation" |
| "Create a bug like #12345" | --create <workitem-url> then --from-file template.json |
| "Help me create a detailed work item" | --create -i (interactive) |