← Catalog

@jwayong/pi-azure-devops

Azure DevOps integration for Pi coding agent — work items, pipelines, repos, test plans, and more

Extension

Install

Install with PiG

pig install npm:@jwayong/pi-azure-devops

Install with Pi

pi install npm:@jwayong/pi-azure-devops
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "skills": [
    "./skills"
  ],
  "prompts": [
    "./prompts"
  ],
  "extensions": [
    "./dist/extension/index.js"
  ]
}

README

Written by the package's publisher, shown as published in version 0.5.0 (README.md). PiG does not review it.

@jwayong/pi-azure-devops

Azure DevOps integration for Pi coding agent — work items, pipelines, repos, test plans, and more.

Install

pi install npm:@jwayong/pi-azure-devops

Or try without installing:

pi -e npm:@jwayong/pi-azure-devops

Features

  • 52 tools — work items, boards, sprints, repos, pull requests, pipelines, test plans, and more
  • Dual auth — PAT (ADO_PAT) or Azure CLI (az) with auto-detect
  • Dual config — environment variables or .pi/settings.json
  • Safety model — open / confirm / readonly (default: confirm)
  • Mock mode — work offline with fixture data (ADO_MOCK=1)
  • Autocomplete — #1234 work item ID completion
  • Skill — ado-workitems with WIQL, board, sprint, capacity, and pipeline reference
  • 13 prompt templates — triage, status reports, batch create, review history, sprint health, sprint planning, board review, PR review, PR creator, pipeline status, deploy, test status, test runner
  • ~870 tests — comprehensive coverage, all offline

What's Included

AreaToolsReadWrite
Work ItemsCRUD, comments, links, revisions, WIQL queries64
TeamsList teams1—
BoardsList boards, get/set board columns21
SprintsList iterations, get/set sprint assignments21
CapacityGet/set team member capacity11
ReposList/get repos, list branches3—
Pull RequestsList/get PRs, threads, commits, create/update, comment, vote44
PoliciesList policies, get evaluations2—
PipelinesList/get pipelines, list/get runs, artifacts, logs, timeline, run/cancel/retry73
Test PlansList/get plans, suites, cases, points, runs; create runs, update results82
ConfigDoctor (health check)1—

Quick Start

1. Set environment variables

export ADO_ORG_URL="https://dev.azure.com/myorg"
export ADO_PROJECT="MyProject"
export ADO_PAT="your-personal-access-token"

Or configure in .pi/settings.json:

{
  "ado": {
    "orgUrl": "https://dev.azure.com/myorg",
    "project": "MyProject",
    "authMethod": "pat",
    "safetyLevel": "confirm"
  }
}

2. Verify connection

> Use the ado_doctor tool to check my ADO configuration

3. Use it

> Query all active bugs assigned to me
> Create a user story titled "Implement login page" with description "..."
> Update work item #1234 state to Closed

4. Use prompt templates

Type / in the prompt editor to see available templates:

CommandDescription
/ado-triage [filter]Triage untriaged work items — suggest priority, area, iteration, assignee
/ado-status-report [group-by]Generate a status report grouped by state, assignee, iteration, or type
/ado-create-batch <items>Batch-create work items from a structured list
/ado-review-history <id>Review revision history with a chronological narrative
/ado-sprint-health [team]Sprint health check — status, capacity, burndown
/ado-plan-sprint <sprint|next>Sprint planning — propose work assignment based on capacity
/ado-board-review <board> [team]Board review — analyze setup and suggest improvements
/ado-pipeline-status [pipeline-id]Pipeline health check — recent runs, failure analysis
/ado-deploy <pipeline-id> [branch]Deployment pipeline with pre-deploy safety checks
/ado-test-status [run-id]Test run status report — pass/fail rates, failure analysis
/ado-test-runner [plan-id]Create and manage a test run — select plan/suite, record results

Examples:

/ado-triage AND [System.WorkItemType] = 'Bug'
/ado-status-report assignee
/ado-create-batch - Bug: Fix crash [priority:1]  - Task: Update docs
/ado-review-history 1234
/ado-sprint-health Engineering
/ado-plan-sprint next
/ado-board-review Stories Engineering

Authentication

MethodSetupBest for
PATSet ADO_PAT env varPersonal use, CI
Azure CLIRun az loginEnterprise, Entra ID, managed identity

Auto-detect: tries Azure CLI first, falls back to PAT.

Safety Levels

LevelBehavior
openNo confirmation on mutations
confirm (default)User confirms before create/update/comment/link operations
readonlyMutation tools blocked entirely

Set via ADO_SAFETY_LEVEL env var or ado.safetyLevel in settings.

Tools Reference

Read Tools

ToolDescription
ado_doctorVerify configuration, auth, and connection health
ado_get_work_itemGet a single work item by ID
ado_query_work_itemsSearch work items using WIQL queries
ado_list_work_item_typesList valid work item types for the project
ado_get_work_item_commentsGet comments/discussion on a work item
ado_get_work_item_revisionsGet revision/change history for a work item
ado_list_teamsList teams in the project
ado_list_boardsList boards for a team
ado_get_boardGet board detail with columns and state mappings
ado_list_iterationsList sprints/iterations for a team
ado_get_iteration_work_itemsGet work items in a sprint
ado_get_capacityGet sprint capacity per member with totals
ado_list_reposList repositories in the project
ado_get_repoGet repository detail by ID or name
ado_list_branchesList branches for a repository
ado_list_pull_requestsList pull requests with optional filters
ado_get_pull_requestGet pull request detail
ado_get_pull_request_threadsGet comment threads on a pull request
ado_get_pull_request_commitsGet commits in a pull request
ado_list_policiesList policy configurations
ado_get_policy_evaluationsGet policy evaluation status for a PR
ado_list_pipelinesList YAML pipelines in the project
ado_get_pipelineGet pipeline detail by ID (YAML path, repo, folder)
ado_list_runsList pipeline runs with optional filters (pipeline, status, result, branch)
ado_get_runGet a single pipeline run detail
ado_get_run_artifactsGet artifacts produced by a pipeline run
ado_get_run_logsGet log entries for a pipeline run
ado_get_run_timelineGet stages/jobs/tasks timeline for a pipeline run
ado_list_test_plansList test plans in the project
ado_get_test_planGet test plan detail by ID
ado_list_test_suitesList test suites in a plan
ado_get_test_suiteGet test suite detail by ID
ado_list_test_casesList test cases in a suite
ado_list_test_pointsList test points with execution status
ado_list_test_runsList test runs with optional filters
ado_get_test_runGet test run detail with statistics

Write Tools (gated by safety level)

ToolDescription
ado_create_work_itemCreate a new work item (type, title, description, fields)
ado_update_work_itemUpdate fields on an existing work item
ado_add_work_item_commentAdd a comment to a work item
ado_manage_work_item_linksAdd or remove relation links between work items
ado_set_board_columnsReconfigure board columns
ado_set_iterationAdd or remove iteration to/from team
ado_set_capacitySet sprint capacity for team members
ado_create_pull_requestCreate a new pull request
ado_update_pull_requestUpdate title, description, or status of a PR
ado_add_pull_request_commentAdd a comment to a PR thread
ado_set_pull_request_voteSet vote on a PR (approve, reject, etc.)
ado_run_pipelineQueue/trigger a pipeline run
ado_cancel_runCancel an in-progress pipeline run
ado_retry_runRetry a failed pipeline run
ado_create_test_runCreate a test run from plan + suites
ado_update_test_resultsUpdate test case outcomes in a run

Prompt Templates

The package includes 13 prompt templates for common ADO workflows. They're automatically available after installing the package.

CommandDescriptionArguments
/ado-triageTriage untriaged work itemsOptional WIQL filter
/ado-status-reportGenerate a status reportstate, assignee, iteration, or type
/ado-create-batchBatch-create work itemsBullet list of items
/ado-review-historyReview revision historyWork item ID
/ado-sprint-healthSprint health check — burndown, capacity, at-risk itemsOptional team name
/ado-plan-sprintSprint planning with capacity-based assignmentSprint name or next
/ado-board-reviewBoard configuration analysis and suggestionsBoard ID, optional team
/ado-pr-reviewReview a PR — threads, policies, changes summaryPR ID, optional repository ID
/ado-pipeline-statusPipeline health check — recent runs, failures, duration trendsOptional pipeline ID
/ado-deployRun a deployment pipeline with pre-deploy safety checksPipeline ID, optional branch/params
/ado-pr-creatorCreate a PR — suggest title/description from branch contextRepository ID, source branch
/ado-test-statusTest run status report — pass/fail rates, failure detailsOptional run ID
/ado-test-runnerCreate and manage a test run — guided workflowOptional plan ID

Usage

Type /ado- in the prompt editor to see autocomplete suggestions. Each template expands into a step-by-step workflow that uses the ADO tools.

# Triage new bugs
/ado-triage AND [System.WorkItemType] = 'Bug'

# Status report grouped by assignee
/ado-status-report assignee

# Create multiple items at once
/ado-create-batch
- Bug: Fix payment timeout [priority:1, tags:payments;critical]
- Task: Write integration tests for checkout
- User Story: Add refund support

# Review what happened to work item #1234
/ado-review-history 1234

# Review pull request #42
/ado-pr-review 42

# Create a PR from feature branch
/ado-pr-creator repo-webapp feature/login

# Check pipeline health
/ado-pipeline-status 1

# Deploy with safety checks
/ado-deploy 2 release/v2

# Check test run status
/ado-test-status 501

# Create and manage a test run
/ado-test-runner 101

If you installed the package locally (e.g., pi -e ./), the templates are loaded from the prompts/ directory as declared in package.json.

Mock Mode

Work offline without ADO credentials:

ADO_MOCK=1 pi "Show me work item #101"

Or pass { mock: true } to any tool parameter.

Configuration Reference

Environment Variables

VariableDescription
ADO_ORG_URLOrganization URL
ADO_PROJECTDefault project
ADO_PATPersonal Access Token
ADO_AUTH_METHODpat, azure-cli, or auto (default: auto)
ADO_SAFETY_LEVELopen, confirm, or readonly (default: confirm)
ADO_MOCKSet to 1 to enable mock mode
ADO_TEAMDefault team name (for boards/iterations/capacity)
ADO_MAX_QUERY_RESULTSMax query results (default: 100)

Settings (ado key in .pi/settings.json)

KeyTypeDefaultDescription
orgUrlstring—Organization URL
projectstring—Default project
teamstring—Default team name
authMethodstring"auto"pat, azure-cli, or auto
safetyLevelstring"confirm"open, confirm, or readonly
defaultWorkItemTypestring"User Story"Default type for create
maxQueryResultsnumber100Max query results
autocompletebooleantrueEnable #id completion

Precedence: env vars → settings.json → defaults

Development

git clone https://github.com/jwayong/pi-azure-devops.git
cd pi-azure-devops
npm install
npm run build
npm test

# Test locally with pi
pi -e ./

Contributing

Contributions welcome! Please open an issue first to discuss what you'd like to change.

License

MIT