Interactively create a new User Story work item as a child of an existing Feature in Azure DevOps.
Creates Azure DevOps User Stories as children of Features using interactive prompts.
/plugin marketplace add charlesjones-dev/claude-code-plugins-dev/plugin install ai-ado@claude-code-plugins-devInteractively create a new User Story work item as a child of an existing Feature 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, story titles, descriptions, IDs, or other arguments after this command (e.g., /ado-create-story "My Story" or /ado-create-story 123), you MUST COMPLETELY IGNORE them. Do NOT use any story 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 user story information. DO NOT skip these steps even if the user provided arguments after the command.
This command creates a User Story work item following the organization's Azure DevOps conventions defined in CLAUDE.md.
Before proceeding with user story 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 user story 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 User Story details, or provide them 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 Feature ID:
Simply output the following text as your response message and STOP (DO NOT call any tools):
"What is the ID of the parent Feature for this User Story?
(This is the numeric ID of the Feature work item that will contain this story. You can find this in Azure DevOps or from the output of /ado-create-feature)"
Wait for the user's next message with the parent feature ID before proceeding.
Step AI-1 - Get Description Prompt:
Simply output the following text as your response message and STOP:
"Please provide a description or overview of what this User Story should accomplish. I'll use this to generate a professional title, persona statement, background information, and acceptance criteria.
(Provide as much context as you'd like - the more detail you provide, the better the generated content will be.)"
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 - Confirm Generated Persona Statement:
Display the generated persona statement and ask for confirmation:
"I've generated the following user persona statement:
Persona Statement: [GENERATED_PERSONA]
Would you like to use this persona statement, or would you prefer to provide your own? (Type 'yes' to use this statement, or provide an alternative)"
Wait for response:
Step AI-4 - Confirm Generated Background:
Display the generated background and ask for confirmation:
"I've generated the following background information:
Background: [GENERATED_BACKGROUND]
Would you like to use this background information, or would you prefer to provide your own? (Type 'yes' to use this background, 'none' to skip background, or provide alternative background information)"
Wait for response:
Step AI-5 - Confirm Generated Acceptance Criteria:
Display the generated acceptance criteria and ask for confirmation:
"I've generated the following acceptance criteria:
Acceptance Criteria: [GENERATED_CRITERIA]
Would you like to use these acceptance criteria, or would you prefer to provide your own? (Type 'yes' to use these criteria, or provide alternative acceptance criteria)"
Wait for response:
Step AI-6 - Story Points:
Simply output the following text as your response message and STOP:
"What is the Story Points estimate for this User Story?
(Use Fibonacci sequence values: 1, 2, 3, 5, 8, 13, 21, etc.)"
Wait for the user's next message with story points before proceeding to Phase 3.
If user chooses 'Manual':
Step 1 - Parent Feature ID:
Simply output the following text as your response message and STOP (DO NOT call any tools):
"What is the ID of the parent Feature for this User Story?
(This is the numeric ID of the Feature work item that will contain this story. You can find this in Azure DevOps or from the output of /ado-create-feature)"
Wait for the user's next message with the parent feature ID before proceeding.
Step 2 - Story Title:
After receiving the parent feature ID, simply output the following text as your response message and STOP (DO NOT call any tools):
"What is the title for this User Story?
(Based on your naming convention, use an appropriate format. For decimal notation, use: '1.1: Story Name', '2.1: Story Name', etc.)"
Wait for the user's next message with the story title before proceeding.
Step 3 - User Persona Statement:
After receiving the story title, simply output the following text as your response message and STOP (DO NOT call any tools):
"What is the user persona statement for this story?
(Format: 'As a [role], I want to [action] so that [benefit]' Example: 'As a website visitor, I want to log in with my email and password so that I can access my personalized dashboard.')"
Wait for the user's next message with the persona statement before proceeding.
Step 4 - Background Information:
After receiving the persona statement, simply output the following text as your response message and STOP (DO NOT call any tools):
"What background information should be included for this story?
(Provide relevant context, technical details, or constraints. Use bullet points for clarity. Type 'none' to skip.)"
Wait for the user's next message with background information (or 'none') before proceeding.
Step 5 - Acceptance Criteria:
After receiving the background information, simply output the following text as your response message and STOP (DO NOT call any tools):
"What are the acceptance criteria for this story?
(Use 'Given, When, Then' format. Provide multiple scenarios if needed. Keep criteria concise for QA testers. Example: Given a registered user with valid credentials When they enter email and password on the login page Then they should be authenticated and redirected to dashboard)"
Wait for the user's next message with acceptance criteria before proceeding.
Step 6 - Story Points:
After receiving the acceptance criteria, simply output the following text as your response message and STOP (DO NOT call any tools):
"What is the Story Points estimate for this User Story?
(Use Fibonacci sequence values: 1, 2, 3, 5, 8, 13, 21, etc.)"
Wait for the user's next message with story points before proceeding.
IMPORTANT:
Using the configuration from Phase 1 and the information from Phase 2, create the user story work item:
Build the description in HTML format (WITHOUT acceptance criteria):
<p> tags<p><strong>Background:</strong></p><ul> and <li> tagsFormat the acceptance criteria in HTML format:
<br/> tags or bullet list format with <ul> and <li> tagsUse the wit_add_child_work_items MCP tool with the following parameters:
parentId: The parent feature ID provided by user (as number, not string)project: Use the project name from Phase 1 configurationworkItemType: "User Story"items: Array containing a single item object with:
title: User-provided titledescription: HTML-formatted description from step 1 (persona + background only)format: "Html"areaPath: Area Path from configurationiterationPath: Iteration Path from configurationAfter the user story is created, use the wit_update_work_item MCP tool to set both Story Points AND Acceptance Criteria:
id: The ID of the newly created user story (from the response of wit_add_child_work_items)updates: Array containing two update operations:
{"op": "add", "path": "/fields/Microsoft.VSTS.Scheduling.StoryPoints", "value": "[STORY_POINTS_VALUE]"}{"op": "add", "path": "/fields/Microsoft.VSTS.Common.AcceptanceCriteria", "value": "[HTML_FORMATTED_ACCEPTANCE_CRITERIA]"}Wait for both MCP tool responses
IMPORTANT:
After successful user story creation, display a comprehensive success message:
✓ User Story created successfully!
User Story Details:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 ID: [STORY_ID]
📋 Title: [STORY_TITLE]
👤 Parent Feature: [PARENT_FEATURE_ID]
📂 Project: [PROJECT_NAME]
📍 Area Path: [AREA_PATH]
🔄 Iteration Path: [ITERATION_PATH]
⭐ Story Points: [STORY_POINTS]
✨ State: New
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Next Steps:
1. Create Task work items under this User Story using /ado-create-task
2. Review the story in Azure DevOps web interface
3. Assign team members and refine estimates as needed
💡 To create a task for this story:
/ado-create-task
(You'll be prompted for parent User Story ID: [STORY_ID])
🔗 View in Azure DevOps:
https://dev.azure.com/[ORGANIZATION]/[PROJECT]/_workitems/edit/[STORY_ID]
Replace placeholders with actual values from the created story and configuration.
DO NOT:
DO:
If the MCP tool returns an error: