Build health

From microsoft/vscode-team-kit · View interactive version

Build health is an AI agent skill from the GitHub repository microsoft/vscode-team-kit. Analyze VS Code rolling build health on Azure DevOps. Use when: the rolling build is red right now, you need a report for the last 100 builds, you need to identify the commit range that broke the build, you are on build champ duty, or you need a build health report.

How to use this skill

Skill file

Build Health

Quickly diagnose the VS Code rolling build on Azure DevOps. By default it covers both pipelines that build main, and analyzes each on its own:

This skill has two modes:

  1. Fix the build if it is red right now by finding where the red streak started and identifying the compare range from last green to first red.
  2. Analyze and present the last 100 builds in a predictable report file.

The report file is the primary artifact. Generate it first, summarize what it shows, and only then ask whether the user wants heuristic culprit analysis.

When to Use

Output Contract

Always produce a markdown report file before presenting conclusions.

The report must contain these sections. Each one has a row or a ### Pipeline <id> subsection per pipeline:

Use the chat reply to summarize the report, not to replace it.

Prerequisites

Shared Setup

The scripts live inside this skill directory at <skill-dir>/scripts/. Always invoke them by absolute path. Derive <skill-dir> from the absolute path of this SKILL.md.

Use these defaults unless the user asks for something else:

OUT_DIR=/tmp/build-health
REPORT_FILE="$OUT_DIR/build-health-report.md"

1. Fetch Build Data

Run the fetch script from this skill directory. It downloads builds, timelines for failed builds, and log tails for failing test/compile tasks — all in parallel batches.

bash <skill-dir>/scripts/fetch-builds.sh --count 100 --out "$OUT_DIR"

Options:

Run this in a terminal with mode=sync and a generous timeout (e.g. 300000ms). The script needs network access, so request unsandboxed execution if sandboxing is enabled.

2. Analyze the Data

Once the data is downloaded, always generate the markdown report file first:

node <skill-dir>/scripts/analyze-builds.mjs "$OUT_DIR" --format markdown --report "$REPORT_FILE"

This runs entirely offline against the downloaded data and produces a predictable artifact that the user can open and consume directly.

If you need a terminal-friendly version for yourself while working, optionally run:

node <skill-dir>/scripts/analyze-builds.mjs "$OUT_DIR" --format text

The markdown report includes:

  1. Per-build status — Each build with pass/fail, failure reasons, error excerpts, and commit links
  2. Break/fix transitions — When the build went red, when it recovered, how long each incident lasted
  3. Error details — Actual error messages from test logs (not just "exited with code 1")
  4. Commit links — GitHub compare URLs between the last green and first red build
  5. Summary — Overall success rate, top failure reasons, current build status

Workflow 1: Build Is Red Right Now

  1. Fetch the last 100 builds and generate the markdown report file.
  2. Read the report first. Do not guess the culprit yet.
  3. Summarize these points in chat:
  1. If the oldest build in the current report is already red, fetch a larger window before attempting commit-range analysis.
  2. Only after the summary, ask the user whether they want culprit analysis across the compare range.

Use language like:

I generated /tmp/build-health/build-health-report.md. The current red incident starts at build X, the dominant failure pattern is Y, and the compare range is Z. Do you want me to continue with heuristic culprit analysis across that compare range?

If the user says yes to culprit analysis

Treat culprit analysis as reasoned triage, not as fact.

  1. Start from the compare range in the report.
  2. Cross-check the first error and dominant failure pattern.
  3. Distinguish likely code regressions from likely infra failures.
  4. If the evidence points to code, rank the most likely suspect commits and explain why each one matches the failure pattern.
  5. If the evidence points to infra, say that clearly and avoid inventing a culprit commit.

Keep the output explicit that this is heuristic reasoning.

Workflow 2: Analyze The Last 100 Builds

  1. Fetch the last 100 builds and generate the markdown report file.
  2. Use the report to summarize:
  1. Point the user to the report path and call out the most useful sections.

In this mode, do not jump into culprit analysis unless the user asks for it.

4. Common Failure Patterns

| Pattern | Typical Error | Action |

|---------|--------------|--------|

| Electron Tests failing on one platform | Test assertion or timeout | Check if the failing test was touched in recent commits |

| Electron Tests failing on ALL platforms | Could not fetch releases from update server | Update server issue — usually self-resolves |

| Linux Alpine (ARM64) | Install dependencies timeout | Agent pool saturation — wait or escalate to infra |

| Remote Tests timing out | The task has timed out after Data Loss tests | Remote test infra issue |

| Copilot sanity tests | AssertionError: ok(provider) | Copilot extension registration issue — check recent copilot extension changes |

| Publish Build | Retry failures | Artifact upload infra issue |

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.