| description | argument-hint | |
|---|---|---|
Fetch Azure DevOps ticket and create project directory |
|
You are setting up a new project directory based on an Azure DevOps work item.
-
Fetch the Azure DevOps work item using the command:
az boards work-item show --id {TICKET_ID} --output json -
Parse and extract the following information from the ticket:
- Title
- Description
- Acceptance criteria
- Priority
- State/Status
- Assigned to
- Comments (discussion history)
- Pull request references
- Related work items (links to other tickets)
- Attachments (URLs to screenshots or other files)
- Any custom fields that contain relevant information
-
Determine the target directory path:
- If PATH is provided, use it as the parent directory
- If PATH is NOT provided, determine the default path by running:
Then appenddirname $(git rev-parse --show-toplevel)/TicketContextto create the full parent path - Create the TicketContext directory if it doesn't exist
-
Create a new directory at the determined path with this naming format:
{PATH}/{TICKET_ID}_{TICKET_TITLE_IN_SNAKE_CASE}Where:
TICKET_IDis the numeric work item IDTICKET_TITLE_IN_SNAKE_CASEis the ticket title converted to snake_case (lowercase with underscores)
-
Inside the new directory, create a
README.mdfile that includes:- Ticket ID and title
- Link to the Azure DevOps ticket
- Description
- Acceptance criteria
- Priority and status
- Any relevant comments or discussion points
- Links to related tickets
- Links to attachments/screenshots
- References to any mentioned PRs
-
Display a summary of:
- The directory path that was created
- Key ticket information
- Next steps or important considerations from the ticket
- Ensure the directory name is valid (replace invalid filesystem characters)
- Truncate the title if it's too long (max 50 characters recommended)
- If PATH is not provided and not in a git repository, inform the user and ask them to provide a PATH
- If the determined path doesn't exist, create parent directories automatically (including TicketContext)
- Handle errors gracefully if the Azure CLI is not authenticated or the ticket doesn't exist
Note that
dirname $(git rev-parse --show-toplevel)is suited for working with a worktrees setup adjust for a traditional workflow.