Skip to content

Instantly share code, notes, and snippets.

@alexgwolff
Created September 25, 2025 22:58
Show Gist options
  • Select an option

  • Save alexgwolff/ded064e02373d11f40753a87d1b33fce to your computer and use it in GitHub Desktop.

Select an option

Save alexgwolff/ded064e02373d11f40753a87d1b33fce to your computer and use it in GitHub Desktop.

Create Azure DevOps User Story

Description

Creates a new User Story work item in Azure DevOps with predefined settings, automatic iteration detection, intelligent assignee resolution, and proper Markdown formatting.

MCP Server: Azure DevOps MCP

Primary Tools:

  • mcp__AzureDevOps__wit_create_work_item - Create work items
  • mcp__AzureDevOps__work_list_team_iterations - Get current iteration
  • mcp__AzureDevOps__core_get_identity_ids - Resolve user identities

Usage

/create-us <context> [assignee]

Parameters

  • <context>: Brief description or requirements for the user story
  • [assignee] (optional): Name, email, or unique name of the person to assign. If not provided, will be assigned to the authenticated user.

Prompt Template

Create an Azure DevOps User Story work item with the following configuration:

Steps:

  1. First, get the current iteration:

    • Use mcp__AzureDevOps__work_list_team_iterations with:
      • project: "EMR"
      • team: "Architecture and Innovation"
      • timeframe: "current"
    • Extract the iteration path from the response
  2. Determine the assignee:

    • If [assignee] parameter is provided:
      • Use mcp__AzureDevOps__core_get_identity_ids with:
        • searchFilter: "[assignee value]"
      • Extract the identity information from the response
    • If no assignee provided:
  3. Then create the work item using mcp__AzureDevOps__wit_create_work_item:

Parameters:

  • project: "EMR"
  • workItemType: "User Story"
  • fields: Array containing:
    • {"name": "System.Title", "value": "[Generated title based on context]"}
    • {"name": "System.AssignedTo", "value": "[Identity from step 2]"}
    • {"name": "System.AreaPath", "value": "EMR\\Architecture and Innovation\\Cross-Cutting Concerns"}
    • {"name": "System.IterationPath", "value": "[Path from step 1]"}
    • {"name": "System.Description", "value": "[Formatted markdown description]", "format": "Markdown"}

Description Format: Format the provided context using this User Story template in Markdown format:

**As a** software [engineer/architect]

**I want** to [activity/functionality]

**So that** [business value/benefit]

**Additional Context:**

{{context}}

---

_🤖 This User Story was generated with AI assistance and may require review for accuracy and completeness._

Important: When creating the work item, ensure to:

  • Set the format field to "Markdown" for the description field
  • Use proper Markdown syntax in the description content

Examples

Example 1: Default assignee

/create-us authentication system for patient portal

Would create a User Story assigned to [email protected] (default) with Markdown description:

**As a** software architect

**I want** to implement an authentication system for the patient portal

**So that** patients can securely access their medical information

**Additional Context:**

authentication system for patient portal

---

_🤖 This User Story was generated with AI assistance and may require review for accuracy and completeness._

Example 2: Custom assignee

/create-us update the project to use Node@20 "John Doe"

Would create a User Story assigned to John Doe (after resolving identity) with Markdown description:

**As a** software engineer

**I want** to update the project to use Node@20

**So that** we can take advantage of the latest features and improvements

**Additional Context:**

update the project to use Node@20

---

_🤖 This User Story was generated with AI assistance and may require review for accuracy and completeness._

Example 3: Usage flow

The command will:

  1. Get current iteration: EMR\Ranger\Ranger.4
  2. Resolve assignee identity (if provided)
  3. Create work item with proper Markdown formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment