From dotnet-dnceng
Analyze VMR codeflow health using maestro MCP tools and GitHub MCP tools. USE FOR: investigating stale codeflow PRs, checking if fixes have flowed through the VMR pipeline, debugging dependency update issues, checking overall flow status for a repo, diagnosing why backflow PRs are missing or blocked, subscription health, build freshness, URLs containing dotnet-maestro or "Source code updates from dotnet/dotnet". DO NOT USE FOR: CI build failures (use ci-analysis skill), code review (use code-review skill), general PR investigation without codeflow context, tracing whether a specific commit/PR has reached another repo (use flow-tracing skill). INVOKES: maestro and GitHub MCP tools, flow-health.cs script.
npx claudepluginhub lewing/agent-plugins --plugin dotnet-dncengThis skill uses the workspace's default tool permissions.
Analyze VMR codeflow PR health using **scripts** for data collection and **MCP tools** for enrichment and remediation. For single-PR analysis, `Get-CodeflowStatus.ps1` does comprehensive data collection (VMR commit comparison, forward flow discovery, staleness detection); maestro MCP tools provide subscription triggering and build freshness. For repo-wide flow health, `flow-health.cs` handles b...
Monitors PR health on recurring schedules: merge conflicts, CI/CD failures in GitHub Actions/Buildkite/Vercel/Fly.io, review comment triage/resolution, merge readiness. One-shot triage mode.
Performs repo-wide or PR diff readiness sweeps dispatching parallel agents across security (shieldkit), tests (testkit), codebase (lenskit), evolution (timewarp), and instructions (alignkit) for synthesized reports.
Displays GitHub PR dashboard in terminal with status, CI/CD progress bars, bot comments, file changes, and merge options including squash/rebase.
Share bugs, ideas, or general feedback.
Analyze VMR codeflow PR health using scripts for data collection and MCP tools for enrichment and remediation. For single-PR analysis, Get-CodeflowStatus.ps1 does comprehensive data collection (VMR commit comparison, forward flow discovery, staleness detection); maestro MCP tools provide subscription triggering and build freshness. For repo-wide flow health, flow-health.cs handles batch GitHub scanning in parallel.
๐จ NEVER use
gh pr review --approveor--request-changes. Only--commentis allowed.
Use this skill when:
dotnet-maestro[bot]) is stale or failing and you need to understand whygh) โ must be installed and authenticated. Required by flow-health.cs.For "is the backflow healthy for repo X on branch Y?" โ use PR Analysis (Get-CodeflowStatus.ps1 -Repository -Branch). The script finds the open backflow PR (if any), compares VMR commits, discovers forward flow, and extracts warnings โ all in one call.
For "what's the flow status across all repos?" or multi-repo/multi-branch scanning โ use the Codeflow Overview (MCP tools for subscription health + build freshness across many repos simultaneously).
For investigating a specific PR โ use PR Analysis (Get-CodeflowStatus.ps1 -PRNumber). If no open PR exists, the script reports this; use MCP tools to check the subscription state.
[branch] Source code updates from dotnet/dotnet[branch] Source code updates from dotnet/<repo>main into the PR branch does NOT resolve staleness โ it only fixes git conflicts. The only resolutions are: merge the PR as-is, close it, or force trigger the subscription.dotnet/dotnet). See vmr-codeflow-reference.md for details.Users refer to channels with shorthand. .NET major = year โ 2015 (2026 โ .NET 11, 2025 โ .NET 10).
| User says | Resolve to | Example exact channel name |
|---|---|---|
net11 | Filter channels for 11.0 | .NET 11.0.1xx SDK |
11.0.1xx | Use directly | .NET 11.0.1xx SDK |
net10 3xx | Version 10, band 3 | .NET 10.0.3xx SDK |
release/10.0.3xx | Strip release/ โ 10.0.3xx | .NET 10.0.3xx SDK |
main | Current dev (major = year โ 2015, band = 1xx) | .NET 11.0.1xx SDK |
โ ๏ธ Channel filter requires an exact substring match. Use the full channel name (e.g.,
.NET 11.0.1xx SDK) when filtering codeflow PRs or subscriptions. Partial names like.NET 11.0may not match.
The 1xx band has full source-build with runtime forward flow. 2xx/3xx bands consume runtime as prebuilts โ missing runtime forward flow on these bands is expected, not broken. See vmr-codeflow-reference.md for the full band table.
| Question | Mode | Approach |
|---|---|---|
| "What's the flow status for X?" | Codeflow overview | Codeflow statuses โ subscription health with validate โ build freshness |
| "Is backflow healthy for X on Y?" | PR analysis | Get-CodeflowStatus.ps1 -Repository -Branch โ read output โ MCP enrichment |
| "Why is this PR stale/blocked?" | PR analysis | Get-CodeflowStatus.ps1 -PrUrl โ read output โ MCP enrichment |
| "What's the flow status across all repos?" | Codeflow overview | Codeflow statuses for each repo โ subscription health + build freshness |
| "Full flow health report for X" | Flow health | flow-health.cs script for batch GitHub scanning + maestro enrichment |
When the user asks "what codeflow PRs are active?" or "what's the flow status?", start with codeflow statuses for the target repo/branch โ one call shows per-mapping forward flow and backflow status with active PRs and build staleness. Then drill into problems with subscription health and scripts.
๐จ Trust "commits behind", don't trust "builds behind". Subscription health returns two kinds of staleness numbers โ "N commits behind" is real commit distance (trust it, report it directly) and "~N builds behind" (note the
~prefix) is a meaningless BAR build ID delta that overstates staleness by 10x-300x. For any stale entry showing~builds behind, compute the real commit distance yourself (see Step 5).
For any repo or the VMR, get codeflow statuses for the repo and branch (defaults to dotnet/dotnet on main). This returns per-mapping forward flow and backflow status in one call โ active PRs, build staleness, and subscription details. Use this as the initial triage to identify which mappings need investigation before drilling into subscription health.
๐ก When to skip Step 0: If you already have a specific PR URL or subscription ID, go directly to PR Analysis or subscription health. Codeflow statuses is for "what's the overall picture?" questions.
Check subscription health for the target repository. This shows which subscriptions are stale and which are current. Entries showing "N commits behind" (no ~) have real commit distances โ use those directly. Entries showing "~N builds behind" (with ~) need commit distance computation in Step 5.
Use the validate option to enable cross-validation โ this checks subscription state against GitHub PR state, detects state oscillation patterns, and traces source-manifest commits. Always use validate when investigating stuck subscriptions.
โ ๏ธ Output includes ALL subscriptions (all branches and channels). For a version-specific query like "net11 status", filter the results for channels containing your target version (e.g.,
11.0) and the relevant branch (mainfor current dev).
Before drilling into backflow problems, check for open forward flow PRs from the product repo into dotnet/dotnet. An open forward flow PR is the #1 cause of backflow staleness โ if forward flow is pending, backflow is blocked by design.
If codeflow statuses (Step 0) shows a forward flow subscription with failures or high commit distance, investigate:
Failed or state oscillation (e.g., repeating ApplyingUpdates โ MergingPullRequest โ ApplyingUpdates). State oscillation means Maestro keeps retrying but something prevents completion.LastAppliedBuildId). Use validate on subscription health to detect this automatically.๐จ Forward flow bookkeeping bug: When a forward flow subscription shows "N builds behind" with consecutive failures but GitHub shows PRs merging successfully, this is a known Maestro issue where
LastAppliedBuildIddoesn't update after merge. The subscription is stuck in an infinite retry loop. Remedy: force-trigger the subscription โ this resets Maestro's state by creating a fresh PR branch.
List all codeflow PRs currently tracked by Maestro, optionally filtering by channel name.
โ ๏ธ Output is large (200+ PRs across all repos). Filter by
channelNameparameter (use exact name like.NET 11.0.1xx SDK), or grep/search the output for your target repo.
For subscriptions that are stale โ whether they have a stuck PR or no PR at all:
For stale entries showing "~N builds behind", request commit details when checking subscription health. This returns the actual commit count and recent commit metadata (SHA, message, author, date) โ no manual GitHub API calls needed.
Report the commit count as "N commits behind". Use the recent commit list to explain what is behind (e.g., "3 commits behind โ latest: Fix NuGet restore race condition").
Use GitHub PR details to check state, comments, and merge status for any PRs flagged as problematic.
When asked about flow health across "all repos" or a major version (e.g., "net11 status"), check the core product repos. Subscription health calls are independent โ run them in parallel.
Core repos: dotnet/runtime, dotnet/sdk, dotnet/aspnetcore, dotnet/roslyn, dotnet/efcore, dotnet/winforms, dotnet/wpf, dotnet/msbuild
Branch names differ across repos โ runtime/aspnetcore use release/X.0, sdk uses release/X.0.Nxx, msbuild uses vsNN.N, roslyn uses release/devNN.0 (VS major = .NET major + 8). Current dev is main for all. See vmr-codeflow-reference.md for the full table.
When asked about a major version, check all branches โ don't ask for clarification. Present a consolidated cross-repo summary.
๐จ Script-first. Always run
Get-CodeflowStatus.ps1first. It produces a[CODEFLOW_SUMMARY]JSON block with VMR commit comparison, forward flow discovery, and staleness detection that cannot be replicated by individual MCP calls. Do NOT re-query the same data via MCP tools โ read and interpret the script output.
# Analyze a specific PR by number
./scripts/Get-CodeflowStatus.ps1 -Repository "dotnet/runtime" -PRNumber 12345
# Check if a PR exists for a repo/branch (finds the open backflow PR)
./scripts/Get-CodeflowStatus.ps1 -Repository "dotnet/runtime" -Branch "main"
# Check for missing PRs across all branches
./scripts/Get-CodeflowStatus.ps1 -Repository "dotnet/runtime" -CheckMissing
The script outputs a [CODEFLOW_SUMMARY] JSON block followed by a text summary. Parse the JSON โ it contains:
status: MERGED / CLOSED / NO-OP / IN_PROGRESS / STALE / ACTIVEvmrComparison.aheadBy: How many VMR commits behind (the real staleness number)forwardFlow.prs[]: All open forward flow PRs with their statewarnings[]: Maestro staleness and conflict warnings extracted from PR commentssubscription.id: For use with MCP remediation toolsbuild.id: BAR build ID for triggering๐จ The script already collected PR metadata, VMR commit distances, forward flow PRs, and Maestro warnings. Do NOT re-query this data. Instead:
Read the [CODEFLOW_SUMMARY] JSON and extract key facts:
vmrComparison.aheadBy = how far behind (this is VMR commits, NOT builds)forwardFlow.prs = what's blocking backflow (open forward flow = blocked by design)warnings = staleness/conflict details from Maestro commentscommits.mergeCommitDetails = merge commits on the PR (who merged main and when โ note: merging main does NOT resolve staleness)status = overall PR health classificationUse MCP tools only for enrichment the script can't provide:
Synthesize script data + MCP enrichment into a diagnosis and recommendation.
๐ก No open PR? If
-Repository/-Branchfinds no open backflow PR, the script reports this. Look up the tracked PR for the subscription to check Maestro's view, then check the most recently merged matching PR. A missing PR with a healthy subscription means flow is working normally.
To check if a specific fix has reached the PR:
src/source-manifest.json from the VMR at the PR's snapshot commit โ find the product repo's commitShaFlow health scanning uses a hybrid approach: the flow-health.cs script handles batch GitHub API calls in parallel, while maestro MCP tools provide subscription and build freshness data.
๐ก Why a script for flow health? Scanning all branches requires 10-30+ parallel GitHub API calls (PR searches, body fetches, VMR HEAD lookups, commit comparisons). The script fires these in parallel using
Task.Run; sequential MCP calls would be prohibitively slow.
# Scan all branches for a repo
dotnet ./scripts/flow-health.cs -- dotnet/sdk
# Scan a specific branch only
dotnet ./scripts/flow-health.cs -- dotnet/sdk --branch main
The script outputs structured JSON with:
backflow.branches[]: Per-branch status (healthy/stale/conflict/missing/up-to-date/released-preview), PR numbers, VMR commit mapping, ahead-by counts, CI status (ciStatus: green/red/pending/none, ciFailedCount/ciTotalCount when red)backflow.summary: Counts of healthy/upToDate/blocked/missing branchesforwardFlow.prs[]: Open forward flow PRs with health statusforwardFlow.summary: Counts of healthy/stale/conflicted forward PRsAfter the script runs, enrich with maestro data:
Build freshness: For each vmrBranch found in the script output, check build freshness with the channel short name to verify official VMR builds are healthy.
Subscription health: For branches with status: "missing", check subscription health for the target repository to diagnose why โ is the subscription stuck, disabled, or is the channel frozen?
Update history: For stuck subscriptions, check the subscription's update history to see the timeline โ when was the last successful application? Was there a failed attempt?
Tracked PRs: Cross-reference script results with the codeflow PR list to see Maestro's view of tracked PRs โ the script sees GitHub state while Maestro may have a different picture.
Latest builds: For stuck subscriptions, find the latest build to get the buildId needed for triggering.
Combine script output (GitHub PR state) + MCP data (Maestro health) to produce the diagnosis:
missing AND build freshness is stale โ VMR build failure (not a Maestro issue)missing but builds are fresh โ Maestro is stuck, suggest triggeringstatus: "conflict" โ suggest darc vmr resolve-conflict๐จ Always report CI status for open PRs. A "healthy" PR with red CI is NOT healthy โ CI failure is a problem regardless of codeflow state. A stale PR with red CI is stale because CI is failing. Report
ciStatusfrom the script output in every PR row.
| ciStatus | Meaning | Action |
|---|---|---|
green | All checks passing | PR is mergeable if no conflicts |
red | CI failures (ciFailedCount/ciTotalCount) | Always flag this โ even on "healthy" PRs. Suggest ci-analysis for deeper investigation. |
pending | Checks still running | Wait for completion |
none | No checks found | Unusual โ may be freshly pushed |
maestro-stuck: Subscription enabled, but last applied build is older than latest โ Maestro isn't processing. Trigger the subscription to remediate.subscription-disabled: Subscription turned off โ intentional or oversightchannel-frozen: Latest build is Released โ no action needed (preview shipped)subscription-missing: No subscription exists โ expected for shipped previewsCheck subscription history to understand failure timelines. Key patterns: one-off ApplyingUpdates failures are normal retry; alternating failures spanning weeks indicate systemic problems (conflict, CI, blocked forward flow). Long gaps mean disabled subscription or no new builds. See vmr-codeflow-reference.md for the full pattern catalog.
โ Never assume "Unknown" means healthy. API failures produce Unknown status โ exclude from positive counts.
Check isCodeflowPR first โ if the PR isn't from dotnet-maestro[bot], skip codeflow advice.
| State | Action |
|---|---|
| MERGED | Mention Maestro will create new PR if VMR has newer content |
| CLOSED | Suggest triggering subscription if ID available |
| NO-OP | Recommend closing/merging to clear state |
| IN_PROGRESS | Wait, then check back |
| STALE | Check warnings for what's blocking |
| ACTIVE | Check freshness and warnings for nuance |
| Action | When |
|---|---|
| Trigger subscription | PR was closed or no PR exists for an enabled subscription |
| Trigger with source repo + channel | Provide source repository URL and channel name to auto-resolve latest build (eliminates manual build lookup) |
| Force-trigger subscription | Bookkeeping bug โ subscription shows failures but PRs merge. Force-trigger overwrites the existing PR branch with fresh content, resetting Maestro's state |
| Check subscription history | Diagnosing when a subscription got stuck or failed |
| Check backflow status for a VMR build | Understanding which product repos received a VMR build |
| Bypass cache after action | After triggering, verify state changed using noCache |
๐ก Smart trigger: When triggering a subscription, you can provide the source repository and channel name instead of looking up the latest build ID manually. The MCP server resolves the latest build automatically.
๐ก Force trigger: Force-trigger overwrites the existing PR branch with fresh content. Use this when the subscription has a bookkeeping bug (consecutive failures but PRs merge) or when the tracked PR is in a broken state. Force-trigger is available via MCP.
darc vmr resolve-conflict --subscription <subscription-id> # Resolve conflicts locally
When multiple repos are missing backflow simultaneously, the root cause is usually VMR build failures, not Maestro:
dnceng-public/public pipeline 278 for failuresdotnet/dotnet issues with [Operational Issue] label