Back to Msbuild

mt-migration plugin

plugins/mt-migration/README.md

18.9.63.2 KB
Original Source

mt-migration plugin

A GitHub Copilot plugin that bundles the MSBuild multithreaded task migration playbook plus an MT-specific PR reviewer.

Use this on any repository that authors MSBuild tasks consuming the IMultiThreadableTask / TaskEnvironment / [MSBuildMultiThreadableTask] API surface from Microsoft.Build.Framework — currently dotnet/msbuild, dotnet/sdk, and downstream task assemblies (NuGet, EF, ASP.NET Core, etc.).

Contents

mt-migration/
├── plugin.json
├── skills/
│   └── multithreaded-task-migration/
│       └── SKILL.md         # The 7 deadly sins, ToolTask hazards, helper patterns, test patterns, sign-off checklist
└── agents/
    └── mt-migration-reviewer.agent.md   # MT-specific PR reviewer that follows call chains end-to-end

What it does

ComponentWhen invokedWhat it does
multithreaded-task-migration skillAuthor migrating a taskStep-by-step migration recipe + compatibility red-team checklist. Distilled from ~50 merged migration PRs across dotnet/msbuild and dotnet/sdk.
mt-migration-reviewer agentReviewing an MT migration PRDelegates the 24-dimension general review to the host repo's expert reviewer (if any), then layers MT-specific findings on top. Mandatorily traces every call chain from Execute() to leaves and reports hazards by chain, not by file. Verifies tests are not theater.

The reviewer is deliberately complementary to a generic code reviewer: it does not re-explain migration steps, does not redo style/perf/naming review, and will not flag a clean attribute-only migration as needing a concurrency test if the call-chain audit comes back clean.

Installing

As a local plugin (from a clone of this repo)

sh
# from a GitHub Copilot session
/plugin install file://$(pwd)/plugins/mt-migration

Publish this plugin folder to a small standalone repo (e.g. your-org/mt-migration-plugin) and install from there. The plugin contains no hard-coded references to dotnet/msbuild repo-local filesystem paths — only to the public Microsoft.Build.Framework API surface (with source links for reference) — so it works on any task-authoring repo unchanged.

sh
/plugin install github:your-org/mt-migration-plugin

Relationship to the in-repo skill

This plugin is the single, canonical home of the MT migration skill. It is not duplicated under .github/skills/ in dotnet/msbuild — install the plugin to use it locally. The skill-validator workflow in dotnet/msbuild only scans .github/skills/ and .github/agents/, so the plugin lives outside that scope and is not subject to it.

Updating the skill from PR experience

The skill's "deadly sins" and call-chain hazard table grow as new defect classes are found in merged migrations. To contribute:

  1. Find a defect that was caught in PR review and would have been missed by the existing skill.
  2. Add a sin / hazard / pattern with a real-world citation (PR + line range).
  3. Update skills/multithreaded-task-migration/SKILL.md.
  4. Keep the agent file slim — it should keep delegating to the skill rather than absorbing the rules itself.