Skip to content

Add MSBuild quality review agentic workflow#8365

Open
YuliiaKovalova wants to merge 3 commits into
mainfrom
ykovalova/msbuild-quality-review
Open

Add MSBuild quality review agentic workflow#8365
YuliiaKovalova wants to merge 3 commits into
mainfrom
ykovalova/msbuild-quality-review

Conversation

@YuliiaKovalova
Copy link
Copy Markdown
Contributor

Summary

Adds a weekly agentic workflow (msbuild-quality-review.md) that systematically reviews all .props and .targets files in the repository for MSBuild authoring quality issues.

What it does

  • Discovers all .props/.targets files, categorized by role (NuGet package extensions, SDK files, repo infra)
  • Reviews each file against 21 rules across 5 categories derived from dotnet/skills PR #669:
Category Rules
Target Authoring DependsOn chain overwrites, Returns vs Outputs, missing Inputs/Outputs, FileWrites registration, targets-in-props, missing OnError
Property Patterns Missing condition guards, unquoted conditions, semicolon property overwrites, hardcoded paths, missing trailing slashes
Item Management Include vs Update confusion, cross-product batching, generated files in source tree
Extension Points Missing Exists() guards, NuGet file name mismatches, CustomBefore/After overwrites, missing import guards, cross-platform paths
NuGet Layout buildTransitive forwarding, build/buildTransitive consistency
  • Classifies findings by severity (🔴 Error / 🟡 Warning / 🔵 Suggestion)
  • Creates issues with structured reports ([msbuild-quality] prefix, auto-expires in 7 days)
  • Optionally creates draft PRs for safe, high-confidence fixes (adding condition guards, quoting conditions, adding Exists() guards, fixing path separators)

Configuration

  • Schedule: Weekly + manual dispatch
  • Strict mode: Yes (all actions pinned, no write permissions in frontmatter)
  • Safe outputs: Max 1 issue + max 1 draft PR per run
  • Timeout: 30 minutes

Motivation

The testfx repo ships ~90 .props/.targets files in NuGet packages consumed by millions of developers. This workflow provides continuous quality monitoring against MSBuild canonical patterns, catching issues like:

  • Missing Exists() guards that break builds when files are absent
  • DependsOn overwrites that silently drop SDK targets
  • Unquoted conditions that fail with empty properties
  • Backslash-only paths that break on Linux/macOS

Test plan

Trigger manually via Actions tab to verify the workflow runs and produces a report.


This PR will be reverted after verifying the workflow.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Adds a weekly agentic workflow that reviews all .props and .targets
files for MSBuild authoring anti-patterns and correctness issues.

Checks 21 rules across 5 categories:
- Target authoring (DependsOn chains, Returns vs Outputs, FileWrites)
- Property patterns (condition guards, unquoted conditions, path normalization)
- Item management (Include/Remove/Update, cross-product batching)
- Extension points (Exists() guards, NuGet layout, import guards)
- NuGet build extension layout (buildTransitive forwarding, consistency)

Creates issues for findings and draft PRs for safe fixes (adding
condition guards, quoting conditions, Exists() guards, fixing paths).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 19, 2026 18:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new agentic workflow that periodically audits MSBuild .props and .targets files in the repository for authoring quality issues, classifies findings by severity, and optionally opens an issue or draft PR with results.

Changes:

  • New workflow source msbuild-quality-review.md defining the agent prompt, scheduling, safe outputs, and review rules.
  • New generated lock file msbuild-quality-review.lock.yml containing the compiled GitHub Actions workflow.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
.github/workflows/msbuild-quality-review.md Agent definition with frontmatter (schedule, safe outputs, tools) and a multi-phase review prompt covering 21 MSBuild rules.
.github/workflows/msbuild-quality-review.lock.yml Auto-generated compiled workflow YAML produced by gh aw compile.

Comment thread .github/workflows/msbuild-quality-review.md
Comment thread .github/workflows/msbuild-quality-review.md
Comment thread .github/workflows/msbuild-quality-review.md
Comment thread .github/workflows/msbuild-quality-review.md
Comment thread .github/workflows/msbuild-quality-review.md
@YuliiaKovalova YuliiaKovalova marked this pull request as ready for review May 19, 2026 18:47
@YuliiaKovalova YuliiaKovalova enabled auto-merge (squash) May 19, 2026 18:47
YuliiaKovalova and others added 2 commits May 19, 2026 20:48
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 19, 2026 18:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

Comment thread .github/workflows/msbuild-quality-review.md
Comment thread .github/workflows/msbuild-quality-review.md
Comment thread .github/workflows/msbuild-quality-review.md
Comment thread .github/workflows/msbuild-quality-review.md
Comment thread .github/workflows/msbuild-quality-review.md
Comment thread .github/workflows/msbuild-quality-review.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants