Interactively create a new Task work item as a child of an existing User Story in Azure DevOps.
Creates Azure DevOps Task work items as children of existing User Stories interactively.
/plugin marketplace add charlesjones-dev/claude-code-plugins-dev/plugin install ai-ado@claude-code-plugins-devInteractively create a new Task work item as a child of an existing User Story in Azure DevOps using the organization's configured conventions and guidelines.
CRITICAL: This command MUST NOT accept any arguments. If the user provided any text, task titles, descriptions, IDs, or other arguments after this command (e.g., /ado-create-task "My Task" or /ado-create-task 123), you MUST COMPLETELY IGNORE them. Do NOT use any task titles, descriptions, IDs, or other arguments that appear in the user's message. You MUST ONLY gather requirements through the interactive prompts as specified below.
BEFORE DOING ANYTHING ELSE: Validate Azure DevOps configuration in CLAUDE.md, then begin gathering task information. DO NOT skip these steps even if the user provided arguments after the command.
This command creates a Task work item following the organization's Azure DevOps conventions defined in CLAUDE.md.
Before proceeding with task creation, verify that Azure DevOps configuration exists:
Use the Read tool to read CLAUDE.md from the project root
If the file doesn't exist OR doesn't contain an "## Azure DevOps" section:
❌ Azure DevOps configuration not found
CLAUDE.md does not contain Azure DevOps configuration.
Please run /ado-init first to configure Azure DevOps settings for this project.
The /ado-init command will:
- Configure your organization, project, and team
- Set up Area Path and Iteration Path defaults
- Define naming conventions and work item guidelines
- Optionally configure the Azure DevOps MCP server
If Azure DevOps section exists:
IMPORTANT:
Collect task details from the user. The user can choose between AI-powered generation or manual input.
Step 0 - Choose Input Method:
Simply output the following text as your response message and STOP (DO NOT call any tools):
"Would you like to use AI to generate the Task title, or provide it manually?
Options:
Please respond with 'AI' or 'Manual'."
Wait for the user's response before proceeding.
If user chooses 'AI' (or similar affirmative response):
Step AI-0 - Get Parent User Story ID:
Simply output the following text as your response message and STOP (DO NOT call any tools):
"What is the ID of the parent User Story for this Task?
(This is the numeric ID of the User Story work item that will contain this task. You can find this in Azure DevOps or from the output of /ado-create-story)"
Wait for the user's next message with the parent story ID before proceeding.
Step AI-1 - Get Description Prompt:
Simply output the following text as your response message and STOP:
"Please provide a description of what this Task should accomplish. I'll use this to generate an appropriate task title.
(Describe the specific work to be done. Examples: 'implement the login API endpoint', 'test authentication flows', 'create database migration for users table')"
Wait for the user's description, then:
Step AI-2 - Confirm Generated Title:
Display the generated title and ask for confirmation:
"I've generated the following title based on your description:
Title: [GENERATED_TITLE]
Would you like to use this title, or would you prefer to provide your own? (Type 'yes' to use this title, or provide an alternative title)"
Wait for response:
Step AI-3 - Hour Estimate:
Simply output the following text as your response message and STOP:
"What is the hour estimate for this Task?
(This value will be set for both 'Original Estimate' and 'Remaining Work' fields. Provide a numeric value in hours.)"
Wait for the user's next message with the hour estimate before proceeding to Phase 3.
If user chooses 'Manual':
Step 1 - Parent User Story ID:
Simply output the following text as your response message and STOP (DO NOT call any tools):
"What is the ID of the parent User Story for this Task?
(This is the numeric ID of the User Story work item that will contain this task. You can find this in Azure DevOps or from the output of /ado-create-story)"
Wait for the user's next message with the parent story ID before proceeding.
Step 2 - Task Title:
After receiving the parent story ID, simply output the following text as your response message and STOP (DO NOT call any tools):
"What is the title for this Task?
(Use a simple, descriptive title focused on the work to be done. Examples: 'Development for user login functionality', 'QA testing for authentication', 'Deploy to staging environment')"
Wait for the user's next message with the task title before proceeding.
Step 3 - Hour Estimate:
After receiving the task title, simply output the following text as your response message and STOP (DO NOT call any tools):
"What is the hour estimate for this Task?
(This value will be set for both 'Original Estimate' and 'Remaining Work' fields. Provide a numeric value in hours.)"
Wait for the user's next message with the hour estimate before proceeding.
IMPORTANT:
Using the configuration from Phase 1 and the information from Phase 2, create the task work item:
Tasks should have minimal description as per Azure DevOps conventions:
<p>Task for [STORY_TITLE]. See parent User Story for details.</p>First, retrieve the parent User Story to get its title using wit_get_work_item MCP tool:
id: The parent story ID provided by userproject: Use the project name from Phase 1 configurationUse the wit_add_child_work_items MCP tool with the following parameters:
parentId: The parent story ID provided by user (as number, not string)project: Use the project name from Phase 1 configurationworkItemType: "Task"items: Array containing a single item object with:
title: User-provided titledescription: HTML-formatted description referencing parent storyformat: "Html"areaPath: Area Path from configurationiterationPath: Iteration Path from configurationAfter the task is created, use the wit_update_work_item MCP tool to set hour estimates:
id: The ID of the newly created task (from the response of wit_add_child_work_items)updates: Array containing:
{"op": "add", "path": "/fields/Microsoft.VSTS.Scheduling.OriginalEstimate", "value": "[HOUR_ESTIMATE]"}{"op": "add", "path": "/fields/Microsoft.VSTS.Scheduling.RemainingWork", "value": "[HOUR_ESTIMATE]"}Wait for all MCP tool responses
IMPORTANT:
After successful task creation, display a comprehensive success message:
✓ Task created successfully!
Task Details:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 ID: [TASK_ID]
📋 Title: [TASK_TITLE]
📖 Parent User Story: [PARENT_STORY_ID]
📂 Project: [PROJECT_NAME]
📍 Area Path: [AREA_PATH]
🔄 Iteration Path: [ITERATION_PATH]
⏱️ Original Estimate: [HOURS] hours
⏱️ Remaining Work: [HOURS] hours
✨ State: New
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Next Steps:
1. Assign the task to a team member in Azure DevOps
2. Update progress and completed work as the task progresses
3. Create additional tasks for the story if needed
💡 To create another task for the same story:
/ado-create-task
(Parent User Story ID: [PARENT_STORY_ID])
🔗 View in Azure DevOps:
https://dev.azure.com/[ORGANIZATION]/[PROJECT]/_workitems/edit/[TASK_ID]
Replace placeholders with actual values from the created task and configuration.
DO NOT:
DO:
If the MCP tool returns an error: