From e84638ce8a4dd6e3b293499308412956e36acb64 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Sun, 8 Feb 2026 14:22:33 -0600 Subject: [PATCH 1/5] Improve vmr-codeflow-status SKILL.md structure - Expand trigger description with flow status and missing backflow keywords - Add Two Modes section with decision table (PR analysis vs flow health) - Add inline anti-pattern warning about -PRNumber vs -CheckMissing - Split 'What the Script Does' into PR Analysis vs Flow Health modes - Add inline warnings: Unknown health, aka.ms redirect behavior - Add net11 trigger phrase to When to Use examples --- .github/skills/vmr-codeflow-status/SKILL.md | 30 ++++++++++++++++----- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/skills/vmr-codeflow-status/SKILL.md b/.github/skills/vmr-codeflow-status/SKILL.md index 11a5d424e26ad4..d8ffe70fe4efbe 100644 --- a/.github/skills/vmr-codeflow-status/SKILL.md +++ b/.github/skills/vmr-codeflow-status/SKILL.md @@ -1,6 +1,6 @@ --- name: vmr-codeflow-status -description: Analyze VMR codeflow PR status for dotnet repositories. Use when investigating stale codeflow PRs, checking if fixes have flowed through the VMR pipeline, or debugging dependency update issues in PRs authored by dotnet-maestro[bot]. +description: Analyze VMR codeflow PR status for dotnet repositories. Use when investigating stale codeflow PRs, checking if fixes have flowed through the VMR pipeline, debugging dependency update issues in PRs authored by dotnet-maestro[bot], checking overall flow status for a repo, or diagnosing why backflow PRs are missing or blocked. --- # VMR Codeflow Status @@ -22,7 +22,17 @@ Use this skill when: - A PR has a Maestro staleness warning ("codeflow cannot continue") or conflict - You need to understand what manual commits would be lost if a codeflow PR is closed - You want to check the overall state of flow for a repo (backflow and forward flow health) -- Asked questions like "is this codeflow PR up to date", "has the runtime revert reached this PR", "why is the codeflow blocked", "what is the state of flow for the sdk" +- You need to know why backflow PRs are missing or when the last VMR build published +- Asked questions like "is this codeflow PR up to date", "has the runtime revert reached this PR", "why is the codeflow blocked", "what is the state of flow for the sdk", "what's the flow status for net11" + +## Two Modes + +| Mode | Use When | Required Params | +|------|----------|-----------------| +| **PR analysis** | Investigating a specific codeflow PR | `-PRNumber` (and optionally `-Repository`) | +| **Flow health** (`-CheckMissing`) | Checking overall repo flow status | `-Repository` `-CheckMissing` (and optionally `-Branch`) | + +> ⚠️ **Common mistake**: Don't use `-PRNumber` and `-CheckMissing` together — they are separate modes. `-CheckMissing` scans all branches, not a specific PR. ## Quick Start @@ -56,17 +66,25 @@ Use this skill when: ## What the Script Does +### PR Analysis Mode (default) 1. **Parses PR metadata** — Extracts VMR commit, subscription ID, build info from PR body 2. **Validates snapshot** — Cross-references PR body commit against branch commit messages to detect stale metadata 3. **Checks VMR freshness** — Compares PR's VMR snapshot against current VMR branch HEAD 4. **Shows pending forward flow** — For behind backflow PRs, finds open forward flow PRs that would close part of the gap 5. **Detects staleness & conflicts** — Finds Maestro "codeflow cannot continue" warnings and "Conflict detected" messages with file lists and resolve commands 6. **Analyzes PR commits** — Categorizes as auto-updates vs manual commits -7. **Traces fixes** (optional) — Checks if a specific fix has flowed through VMR → codeflow PR +7. **Traces fixes** (with `-TraceFix`) — Checks if a specific fix has flowed through VMR → codeflow PR 8. **Recommends actions** — Suggests force trigger, close/reopen, merge as-is, resolve conflicts, or wait -9. **Checks for missing backflow** (optional) — Finds branches where a backflow PR should exist but doesn't -10. **Scans forward flow** (optional) — Checks open forward flow PRs into `dotnet/dotnet` for staleness and conflicts -11. **Checks official build freshness** (optional) — When missing backflow is detected, queries `aka.ms` shortlinks to check when the last successful VMR build was published, helping diagnose whether Maestro is stuck or the VMR build is broken + +### Flow Health Mode (`-CheckMissing`) +1. **Checks official build freshness** — Queries `aka.ms` shortlinks for latest published VMR build dates per channel +2. **Scans backflow PRs** — Finds branches where a backflow PR should exist but doesn't, and checks health of open PRs (conflict/staleness/resolved status) +3. **Scans forward flow** — Checks open forward flow PRs into `dotnet/dotnet` for staleness and conflicts +4. **Produces summary** — Counts healthy/blocked/missing PRs across both directions + +> ❌ **Never assume "Unknown" health means healthy.** When `gh` API calls fail (auth, rate limiting), the script returns "Unknown" status — this is explicitly excluded from healthy/covered counts. + +> ⚠️ **aka.ms redirect behavior**: 301 = valid product URL (→ ci.dot.net). 302 = invalid URL (→ Bing). The script only accepts 301. ## Interpreting Results From e9c5ac055999ba2ad80ee9069f2c3e4d4ec5e272 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Sun, 8 Feb 2026 14:28:13 -0600 Subject: [PATCH 2/5] Address review: grammar, -Repository default, -Branch clarification --- .github/skills/vmr-codeflow-status/SKILL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/skills/vmr-codeflow-status/SKILL.md b/.github/skills/vmr-codeflow-status/SKILL.md index d8ffe70fe4efbe..b1bad4b00a7279 100644 --- a/.github/skills/vmr-codeflow-status/SKILL.md +++ b/.github/skills/vmr-codeflow-status/SKILL.md @@ -22,7 +22,7 @@ Use this skill when: - A PR has a Maestro staleness warning ("codeflow cannot continue") or conflict - You need to understand what manual commits would be lost if a codeflow PR is closed - You want to check the overall state of flow for a repo (backflow and forward flow health) -- You need to know why backflow PRs are missing or when the last VMR build published +- You need to know why backflow PRs are missing or when the last VMR build was published - Asked questions like "is this codeflow PR up to date", "has the runtime revert reached this PR", "why is the codeflow blocked", "what is the state of flow for the sdk", "what's the flow status for net11" ## Two Modes @@ -30,9 +30,9 @@ Use this skill when: | Mode | Use When | Required Params | |------|----------|-----------------| | **PR analysis** | Investigating a specific codeflow PR | `-PRNumber` (and optionally `-Repository`) | -| **Flow health** (`-CheckMissing`) | Checking overall repo flow status | `-Repository` `-CheckMissing` (and optionally `-Branch`) | +| **Flow health** (`-CheckMissing`) | Checking overall repo flow status | `-CheckMissing` (optional: `-Repository`, `-Branch`) | -> ⚠️ **Common mistake**: Don't use `-PRNumber` and `-CheckMissing` together — they are separate modes. `-CheckMissing` scans all branches, not a specific PR. +> ⚠️ **Common mistake**: Don't use `-PRNumber` and `-CheckMissing` together — they are separate modes. `-CheckMissing` by default scans all branches (unless `-Branch` is provided), not a specific PR. ## Quick Start From 74d5587a7ef0d8fb03310e1f4de8e923278cd2d8 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Sun, 8 Feb 2026 15:55:31 -0600 Subject: [PATCH 3/5] Add critical anti-patterns: no PR approval, no branch switching --- .github/skills/vmr-codeflow-status/SKILL.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/skills/vmr-codeflow-status/SKILL.md b/.github/skills/vmr-codeflow-status/SKILL.md index b1bad4b00a7279..02bf7989f5fc1c 100644 --- a/.github/skills/vmr-codeflow-status/SKILL.md +++ b/.github/skills/vmr-codeflow-status/SKILL.md @@ -9,6 +9,9 @@ Analyze the health of VMR codeflow PRs in both directions: - **Backflow**: `dotnet/dotnet` → product repos (e.g., `dotnet/sdk`) - **Forward flow**: product repos → `dotnet/dotnet` +> 🚨 **NEVER** use `gh pr review --approve` or `--request-changes`. Only `--comment` is allowed. Approval and blocking are human-only actions. +> 🚨 **NEVER** run `git checkout`, `git stash`, or `gh pr checkout`. You are always on the correct branch. Use `gh pr diff` to see changes. + ## Prerequisites - **GitHub CLI (`gh`)** — must be installed and authenticated (`gh auth login`) From ad649867b3981fa3ba6bbf44d3b2a1c08305cb77 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Sun, 8 Feb 2026 15:57:31 -0600 Subject: [PATCH 4/5] Remove branch switching prohibition from analysis skills (too restrictive) --- .github/skills/vmr-codeflow-status/SKILL.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/skills/vmr-codeflow-status/SKILL.md b/.github/skills/vmr-codeflow-status/SKILL.md index 02bf7989f5fc1c..6ab3d936cefebe 100644 --- a/.github/skills/vmr-codeflow-status/SKILL.md +++ b/.github/skills/vmr-codeflow-status/SKILL.md @@ -10,7 +10,6 @@ Analyze the health of VMR codeflow PRs in both directions: - **Forward flow**: product repos → `dotnet/dotnet` > 🚨 **NEVER** use `gh pr review --approve` or `--request-changes`. Only `--comment` is allowed. Approval and blocking are human-only actions. -> 🚨 **NEVER** run `git checkout`, `git stash`, or `gh pr checkout`. You are always on the correct branch. Use `gh pr diff` to see changes. ## Prerequisites From 8973e4532030c32fff6d662bb84a282d7144e74e Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Sun, 8 Feb 2026 16:00:22 -0600 Subject: [PATCH 5/5] Fix wording: CheckMissing branch discovery, aka.ms redirect precision, grammar --- .github/skills/vmr-codeflow-status/SKILL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/skills/vmr-codeflow-status/SKILL.md b/.github/skills/vmr-codeflow-status/SKILL.md index 6ab3d936cefebe..7da69a157c9c96 100644 --- a/.github/skills/vmr-codeflow-status/SKILL.md +++ b/.github/skills/vmr-codeflow-status/SKILL.md @@ -25,7 +25,7 @@ Use this skill when: - You need to understand what manual commits would be lost if a codeflow PR is closed - You want to check the overall state of flow for a repo (backflow and forward flow health) - You need to know why backflow PRs are missing or when the last VMR build was published -- Asked questions like "is this codeflow PR up to date", "has the runtime revert reached this PR", "why is the codeflow blocked", "what is the state of flow for the sdk", "what's the flow status for net11" +- You're asked questions like "is this codeflow PR up to date", "has the runtime revert reached this PR", "why is the codeflow blocked", "what is the state of flow for the sdk", "what's the flow status for net11" ## Two Modes @@ -34,7 +34,7 @@ Use this skill when: | **PR analysis** | Investigating a specific codeflow PR | `-PRNumber` (and optionally `-Repository`) | | **Flow health** (`-CheckMissing`) | Checking overall repo flow status | `-CheckMissing` (optional: `-Repository`, `-Branch`) | -> ⚠️ **Common mistake**: Don't use `-PRNumber` and `-CheckMissing` together — they are separate modes. `-CheckMissing` by default scans all branches (unless `-Branch` is provided), not a specific PR. +> ⚠️ **Common mistake**: Don't use `-PRNumber` and `-CheckMissing` together — they are separate modes. `-CheckMissing` scans branches discovered from open and recent backflow PRs (unless `-Branch` is provided), not a specific PR. ## Quick Start @@ -86,7 +86,7 @@ Use this skill when: > ❌ **Never assume "Unknown" health means healthy.** When `gh` API calls fail (auth, rate limiting), the script returns "Unknown" status — this is explicitly excluded from healthy/covered counts. -> ⚠️ **aka.ms redirect behavior**: 301 = valid product URL (→ ci.dot.net). 302 = invalid URL (→ Bing). The script only accepts 301. +> ⚠️ **aka.ms redirect behavior**: 301 is expected and treated as a valid product URL (→ ci.dot.net). Non-301 redirects (often 302, which goes to Bing) indicate an invalid URL. The script only accepts 301. ## Interpreting Results