← Catalog

@patimweb/pi-azure-devops

Azure DevOps integration for pi coding agent — work items, boards, repos, pull requests, pipelines, and test plans

Extension

Install

Install with PiG

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

Install with Pi

pi install npm:@patimweb/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.

{
  "image": "https://raw.githubusercontent.com/Smotherer007/pi-azure-devops/main/screenshot.png",
  "skills": [
    "./skills"
  ],
  "prompts": [
    "./prompts"
  ],
  "extensions": [
    "./index.ts"
  ]
}

README

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

pi-azure-devops

Azure DevOps integration for the pi coding agent — work items, boards, repos, pull requests, pipelines, and test plans.

Forked from jwayong/pi-azure-devops and extended by Patrick Weppelmann with additional prompt templates, GitHub Actions CI/CD, auto-generated config template, and enhanced documentation.

All configuration is stored in ~/.pi/agent/pi-azure-devops.json — no environment variables needed.

Installation

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

Or from local path during development:

pi install /path/to/pi-azure-devops

Quick Start

  1. Create ~/.pi/agent/pi-azure-devops.json with your org, project, and PAT
  2. Run azure_devops_doctor to verify connectivity
  3. Start querying work items, repos, pipelines, etc.

Example Configuration

{
  "orgs": [
    {
      "name": "my-org",
      "url": "https://dev.azure.com/my-org",
      "projects": [
        {
          "name": "MyProject",
          "pat": "your-personal-access-token-here"
        }
      ]
    }
  ]
}

Multi-Org / Multi-Project

{
  "orgs": [
    {
      "name": "my-company",
      "url": "https://dev.azure.com/my-company",
      "projects": [
        { "name": "ProjectA", "pat": "token-for-project-a" },
        { "name": "ProjectB", "pat": "token-for-project-b" }
      ]
    },
    {
      "name": "client-xyz",
      "url": "https://dev.azure.com/client-xyz",
      "projects": [
        { "name": "ClientApp", "pat": "client-specific-token" }
      ]
    }
  ]
}

Tools

Work Items

ToolDescription
azure_devops_doctorVerify configuration and connection health
azure_devops_get_work_itemFetch a single work item by ID
azure_devops_query_work_itemsSearch work items using WIQL
azure_devops_list_work_item_typesList valid work item types
azure_devops_get_work_item_commentsGet discussion on a work item
azure_devops_get_work_item_revisionsGet revision history
azure_devops_create_work_itemCreate a new work item
azure_devops_update_work_itemUpdate fields on a work item
azure_devops_add_work_item_commentAdd a comment
azure_devops_manage_work_item_linksAdd or remove links

Boards & Sprints

ToolDescription
azure_devops_list_teamsList teams in the project
azure_devops_list_boardsList boards for a team
azure_devops_get_boardGet board detail (columns, WIP limits)
azure_devops_set_board_columnsReconfigure board columns
azure_devops_list_iterationsList sprints/iterations
azure_devops_get_iteration_work_itemsGet work items in a sprint
azure_devops_get_capacityGet sprint capacity
azure_devops_set_iterationAdd/remove sprint from team
azure_devops_set_capacitySet team member capacity

Repos & Pull Requests

ToolDescription
azure_devops_list_reposList repositories
azure_devops_get_repoGet repository details
azure_devops_list_branchesList branches
azure_devops_list_pull_requestsList pull requests
azure_devops_get_pull_requestGet PR details
azure_devops_get_pull_request_threadsGet PR comment threads
azure_devops_get_pull_request_commitsGet PR commits
azure_devops_list_policiesList branch/PR policies
azure_devops_get_policy_evaluationsCheck PR policy status
azure_devops_create_pull_requestCreate a pull request
azure_devops_update_pull_requestUpdate PR (title, status)
azure_devops_add_pull_request_commentComment on a PR
azure_devops_set_pull_request_voteVote on a PR
azure_devops_set_pull_request_autocompleteEnable/disable PR auto-complete
azure_devops_link_pr_work_itemsLink/unlink work items to a PR

Pipelines

ToolDescription
azure_devops_list_pipelinesList YAML pipelines
azure_devops_get_pipelineGet pipeline detail
azure_devops_list_runsList pipeline runs
azure_devops_get_runGet run detail
azure_devops_get_run_artifactsGet run artifacts
azure_devops_get_run_logsGet run logs
azure_devops_get_run_timelineGet stages/jobs/tasks timeline
azure_devops_run_pipelineQueue a pipeline run
azure_devops_cancel_runCancel a run
azure_devops_retry_runRetry a failed run

Test Plans

ToolDescription
azure_devops_list_test_plansList test plans
azure_devops_get_test_planGet test plan detail
azure_devops_list_test_suitesList test suites
azure_devops_get_test_suiteGet test suite detail
azure_devops_list_test_casesList test cases
azure_devops_list_test_pointsList test points
azure_devops_list_test_runsList test runs
azure_devops_get_test_runGet test run detail
azure_devops_create_test_runCreate a test run
azure_devops_update_test_resultsUpdate test outcomes

Commands / Prompt Templates

CommandDescription
/azure-devops-statusShow the current Azure DevOps connection status (org/project/team/safety)
/azure-devops-doctorCheck Azure DevOps configuration, auth, and connection health
/azure-devops-triage [filter]Triage untriaged work items
/azure-devops-status-report [group]Status report by state, assignee, etc.
/azure-devops-create-batch <items>Batch-create work items
/azure-devops-review-history <id>Review revision history
/azure-devops-sprint-health [team]Sprint health check
/azure-devops-plan-sprint <sprint|next>Sprint planning
/azure-devops-board-review <board> [team]Board configuration review
/azure-devops-pipeline-status [id]Pipeline health check
/azure-devops-deploy <id> [branch]Deployment with safety checks
/azure-devops-pr-review <id>Pull request review
/azure-devops-pr-creator <repo> <branch>Create a pull request
/azure-devops-test-status [run-id]Test run status report
/azure-devops-test-runner [plan-id]Create and manage a test run

Connection Status

On session start the extension shows the active connection in two places, both driven by src/status.ts:

  • Footer status line — ctx.ui.setStatus renders a compact green ✓ Azure DevOps · org/project · @team label (no safety level in the status line).
  • Persistent connection card — an entry rendered inside the transcript (via appendEntry + registerEntryRenderer) with the full connection details. It is not sent to the LLM and survives /reload.

Use /azure-devops-status to re-publish the connection card and refresh the footer at any time.

CommandBehavior
/azure-devops-statusRe-publish the connection card and update the footer status

Configuration

All settings are stored in ~/.pi/agent/pi-azure-devops.json.

KeyTypeDefaultDescription
orgsarray—List of org configurations
orgs[].namestring—Display name for the org
orgs[].urlstring—Org URL (e.g. https://dev.azure.com/myorg)
orgs[].safetyLevelstring—Safety level override for all projects in this org
orgs[].projectsarray—Projects in this org
orgs[].projects[].namestring—Project name
orgs[].projects[].patstring—Personal Access Token
orgs[].projects[].safetyLevelstring—Safety level override for this specific project
defaultOrgstringfirst orgDefault organization
defaultProjectstringfirst projectDefault project
defaultTeamstring—Default team
authMethodstring"auto""pat", "azure-cli", or "auto"
safetyLevelstring"confirm"Global default: "open", "confirm", or "readonly"
defaultWorkItemTypestring"User Story"Default type for creation
maxQueryResultsnumber100Max WIQL query results
autocompletebooleantrueEnable #id work item completion
mockbooleanfalseUse fixture data offline

Safety Levels

LevelBehavior
openNo confirmation on mutations
confirmUser confirms before create/update/delete
readonlyAll mutation tools blocked

Safety level is resolved with cascading overrides — the most specific setting wins:

project.safetyLevel  >  org.safetyLevel  >  global safetyLevel  >  default ("confirm")

Example: set "open" globally so most projects flow freely, then lock down production with "readonly" on a specific project:

{
  "safetyLevel": "open",
  "orgs": [{
    "name": "my-org",
    "url": "https://dev.azure.com/my-org",
    "projects": [
      { "name": "DevProject", "pat": "..." },
      { "name": "ProdProject", "pat": "...", "safetyLevel": "readonly" }
    ]
  }]
}

Architecture

The extension follows a modular architecture:

  • src/config/index.ts — Configuration management from pi-azure-devops.json
  • src/auth/ — PAT and Azure CLI authentication
  • src/tools/*.ts — 54 individual tool definitions
  • src/extension/index.ts — Extension entry point, tool registration, safety interceptor
  • src/status.ts — Connection status builders (footer label, connection card, status text)
  • src/utils/ — Connection factory, error handling, formatting
  • src/autocomplete/ — #id and @sprint autocomplete providers
  • src/safety/ — Mutation safety gates
  • src/mocks/ — Offline fixture data and mock handler
  • skills/ — Agent skill reference documentation
  • prompts/ — 14 prompt templates for common workflows

Extensions Made

This package is forked from jwayong/pi-azure-devops with the following additions:

  • index.ts entry point — Root-level entry point re-exporting the extension for pi package loading (was missing from original)
  • azure-devops-doctor prompt template — New /azure-devops-doctor command for connection health checks
  • GitHub Actions CI/CD — Continuous integration (typecheck, test, coverage) and automated semantic release workflows
  • azure_devops_doctor tool — Built-in but fully validated and documented

Requirements

  • Node.js 26+ (native TypeScript type stripping; CI also verifies Node 22)
  • pi coding agent 0.70.0+
  • Azure DevOps organization with PAT access

Dependencies

Publishing as a pi Package

To publish this extension to the pi package catalog:

  1. Ensure package.json has "keywords": ["pi-package"]
  2. Ensure package.json has a "pi" section declaring extensions, skills, and prompts
  3. Optionally add "image" or "video" preview URLs to the "pi" manifest
  4. Publish to npm: npm publish
  5. Users install with: pi install npm:@patimweb/pi-azure-devops

The package catalog auto-discovers packages with the pi-package keyword from npm.

CI/CD

Continuous Integration (.github/workflows/ci.yml)

Runs on every push and PR to main/master:

  • Matrix testing across Node.js 22 and 26
  • Unit tests (npm test) — native TypeScript via Node's type stripping

Automated Release (.github/workflows/release.yml)

Runs on pushes to main and next branches:

  • Builds the package (npm run build)
  • Runs semantic-release for automated versioning and npm publishing
  • Requires GITHUB_TOKEN and NPM_TOKEN secrets

License

MIT