Commit Graph

28 Commits

Author SHA1 Message Date
YuliiaKovalova da5e63e878 [dotnet-msbuild] Fix AP-13/AP-14 false positives and add source-vs-packed layout guidance (#687)
* [dotnet-msbuild] Fix AP-13/AP-14 false positives and add source-vs-packed layout guidance

The msbuild-quality-review run on microsoft/testfx surfaced two confidently-stated
false positives that the maintainer rightly pushed back on:

1. The reviewer claimed unguarded `<Import>` forwarders in MSTest's NuGet
   `build/<tfm>/` folders point at non-existent paths under `buildTransitive/<tfm>/`.
   In reality those folders are produced at pack time by the `.nuspec` `<file
   target="...">` mappings, so the forwarders resolve correctly in every restored
   package.

2. The reviewer flagged backslashes in `<Import Project="...\...\...">` as a
   cross-platform 🔴 error. MSBuild's evaluator normalizes `\` to `/` on
   Unix-like systems via `FileUtilities.MaybeAdjustFilePath` /
   `ConvertToUnixSlashes` before resolving the path, so existing backslash-style
   imports work everywhere — confirmed by years of shipping MSTest to Linux/macOS
   users.

This change updates the rubric so the same false positives don't recur across
every consumer of the dotnet-msbuild plugin:

* `msbuild-antipatterns/SKILL.md` AP-13 — adds an explicit "NuGet package
  forwarders" exception and tells reviewers to consult `.nuspec` /
  `<PackagePath>` before flagging.
* `msbuild-antipatterns/SKILL.md` AP-14 — rewritten to distinguish where
  backslashes are a real bug (raw `<Exec>` shell strings, CDATA, non-MSBuild
  consumers — keep 🔴) from where they're only style (`<Import>` and other
  evaluator-routed paths — 🔵 with a cite to the MSBuild source).
* `extension-points/SKILL.md` — adds a "Source Tree vs Packed Layout" section
  documenting the three packaging mechanisms (.nuspec `<file>` mappings, csproj
  `<PackagePath>` metadata, SDK pack conventions) that legitimately reshape the
  layout, with the cross-check procedure reviewers must run before flagging
  "missing-file" imports.
* `agents/msbuild-code-review.agent.md` — Discovery now records the projected
  packed layout; Category 4 references the new AP-13/AP-14 nuances; new
  "Veracity gate" step downgrades or drops 🔴 findings that would imply
  currently-shipping CI is broken.

No fixtures change: the `tests/dotnet-msbuild/msbuild-antipatterns/eval.yaml`
rubric does not enumerate AP-13/AP-14 by id, and the F#-specific scenarios are
unaffected. Markdownlint passes on all edited files.

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

* Address PR review feedback

- extension-points: rewrite .nuspec example so the source file is genuinely shared (single buildTransitive/common/MyAdapter.props fan-out instead of three already-per-TFM sources); clarify <file target=> folder-vs-rename semantics.
- extension-points: replace semicolon-list PackagePath example with the unambiguous multi-<None> form, and note in prose that semicolon syntax is also supported. Avoids reader confusion noted in review.
- msbuild-antipatterns AP-13 cross-check: align search scope with extension-points (project directory AND any parent directory) so reviewers don't miss shared mono-repo nuspecs.

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

* AP-13: drop ../ link to extension-points to satisfy skill-validator

Skill-validator rejects file references that traverse out of the skill directory (parent-directory traversal). Replace the markdown link with a plain-text reference to the dotnet-msbuild/extension-points skill — the prose is still discoverable to humans and to the agent that loads the plugin, but no longer trips the validator.

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

* Address second round of PR review feedback

- AP-13: replace <tfm> placeholders inside XML attribute strings with concrete TFM examples (net8.0) so the snippets are valid copy-pasteable XML.
- AP-13 & extension-points: bound the .nuspec search to project directory + IMMEDIATE parent only (no unbounded walking); wording now identical in both docs.
- AP-14: add explicit text severity next to severity emoji (🔴 Error / 🔵 Style) for accessibility — screen readers and plain-text copies now convey severity without relying on color/emoji rendering.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-25 16:08:01 +00:00
Jan Krivanek 0724ccf8ac Update binlog mcp name (#684) 2026-05-22 13:48:09 +00:00
Jan Krivanek 1a6e78c9c6 Add binlog MCP usage to other msbuild skills/agents (#683)
* Add binlog MCP usage to other msbuild skills/agents

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-22 15:32:31 +02:00
YuliiaKovalova 5f1170152b Add MSBuild target authoring skills (target-authoring, property-patterns, item-management, extension-points) (#669)
* Add 4 MSBuild target authoring skills for dotnet-msbuild plugin

New skills:
- target-authoring: three-level target chain, DependsOn extension, naming conventions
- property-patterns: conditional defaults, composition, path normalization, TFM helpers
- item-management: Include/Remove/Update, batching, transforms, FileWrites registration
- extension-points: CustomBefore/After hooks, import gating, NuGet build extensions

Each skill includes eval.yaml tests with anti-pattern fixtures.

Closes #668

* Address Copilot review feedback

- target-authoring: Reword DO NOT USE clause to exclude only deep
  incremental-build diagnostics, not basic Inputs/Outputs usage
- property-patterns: Close unclosed XML elements in String Functions
  snippet (PropertyGroup, TargetFrameworkMoniker)
- extension-points: Add missing CustomAfterMySDK property definition
  to match the import at bottom of example

* Remove accidental pr-body.md file

* Fix wildcard import placeholder path and quote NormalizePath args

- extension-points: Use full MSBuildExtensionsPath expression and
  consistent Exists() casing in wildcard import example
- property-patterns: Quote property arguments in NormalizePath call

* Tune eval prompts to reduce overfitting

Rewrite all 4 eval prompts as natural developer problem descriptions
instead of skill-aligned checklists. Softens technique-prescriptive
rubric items. Result: overfitting scores drop from 0.15-0.31 to
0.06-0.08 (all green). property-patterns now passes eval.

* Fix Copilot review round 3: quote property function args, fix fixture

- property-patterns: Quote  in IsPathRooted call
- extension-points: Quote  in GetDirectoryNameOfFileAbove
- item-management fixture: Use literal semicolon instead of %3B in WriteLinesToFile

* Add harder multi-file eval scenarios for all 4 skills

Each skill now has a second scenario with multi-file setups containing
interacting bugs that require cross-file analysis:

- target-authoring: SDK .targets + Directory.Build.targets with 3 bugs
  (target redefinition, fragile BeforeTargets, duplicate DependsOn chain)
- property-patterns: nested Directory.Build.props with 5 bugs
  (import order, unconditional overwrite, unquoted condition, missing
  trailing slash, NoWarn overwrite)
- item-management: csproj with 5 interacting bugs (Include vs Update,
  cross-product batching, eval-time FileWrites, too-broad Remove glob)
- extension-points: Directory.Build.props/targets + NuGet package with
  6 bugs (inverted guard, late ImportByWildcard, CustomBefore overwrite,
  missing Exists guard, target name collision, internal target hook)

Timeouts increased to 180s for all scenarios.

* Fix review round 4: revert unintended README change, quote intrinsic call in condition

* Improve eval quality for 4 new MSBuild authoring skills

Eval improvements across target-authoring, property-patterns,
item-management, and extension-points skills:

- Rewrite prompts to describe observable symptoms without naming
  MSBuild concepts, inspired by real dotnet/msbuild and dotnet/sdk
  issues (msbuild#2470, #12894, #13056, #4109, sdk#43908)
- Broaden assertion regex patterns to test for diagnostic outcomes
  rather than skill-specific vocabulary
- Improve rubric items to test understanding and diagnosis flow
  (diagnosis -> root cause -> fix) instead of skill terminology
- Add task-completion 'fix it' scenario to each skill with
  file_contains assertions that verify the agent applied correct
  patterns (CompileDependsOn append, FileWrites, Exists guard, etc.)
- Remove leading 'Anti-pattern:', 'BUG N:' comments from fixture
  files that were giving away answers to the baseline agent, making
  scenarios more realistic and better at measuring skill value

Each skill now has 3 scenarios: basic review, hard multi-file review,
and a task-completion fix scenario. Total: 12 scenarios across 4 skills.

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

* Fix review comments: quote TFM intrinsic, fix PrivateAssets example

- property-patterns SKILL.md: Quote the GetTargetFrameworkIdentifier
  intrinsic call result in the Condition to match the 'always quote
  both sides' guidance and avoid brittle parse when empty
- item-management SKILL.md: Replace PackageReference Update on
  Microsoft.NETCore.App (not a real user-added item) with Include
  on Microsoft.CodeAnalysis.NetAnalyzers (a concrete analyzer package)

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

* Fix eval activation and timeouts based on eval run results

- Add MSBuild domain terms to prompts (e.g., 'MSBuild targets',
  'MSBuild property patterns', 'MSBuild item groups', 'MSBuild
  extension points') to improve skill activation rates — skills
  were NOT ACTIVATED in plugin mode due to prompts being too
  symptom-focused without domain keywords
- Increase timeouts: review scenarios 180s -> 240s, fix-it
  scenarios 180s -> 300s to avoid timeout-related scoring penalties
- Keep prompts symptom-driven but include enough domain context
  for the skill router to activate the correct skill

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

* Fix PR review comments and improve eval quality

Review comment fixes:
- TargetAuthoring.csproj: Replace %22/%3B URL encoding with XML
  escaping (&quot;/;) so generated C# code is valid
- target-authoring eval: Fix prompt referencing 'schema files' when
  fixture has endpoint definitions — now says 'endpoint list'
- property-patterns eval: Reword LangVersion rubric — unconditional
  assignment in .props IS overridable by csproj but prevents override
  from earlier imports and command-line properties
- extension-points eval: Add stronger activation terms to Fix scenario
  prompt (explicit mention of CustomBeforeMicrosoftCommonTargets)

Eval quality improvements based on CI results:
- Shorten target-authoring rubric items to reduce overfitting (was 0.30)
- Remove 'Focus on target authoring patterns' instruction from hard
  scenario prompt (was directing agent too specifically)

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

* Improve eval: increase timeout, add activation keywords, explicit fix instructions

- property-patterns 'Diagnose multi-level': timeout 240s -> 360s (was hitting limit at 249s)
- target-authoring 'Diagnose custom target': add CompileDependsOn/incremental build keywords for better skill activation
- property-patterns 'Fix': add 'edit ... directly' to prompt to encourage file edits
- target-authoring 'Fix': add 'edit ... directly' to prompt
- item-management 'Fix': add 'edit ... directly' to prompt

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

* Fix target-authoring skill description and eval prompts for plugin activation

The skill description said 'DO NOT USE FOR: deep incremental-build diagnostics'
which caused the plugin agent to skip it for scenarios about build regressions.
Clarified that the skill IS for diagnosing target authoring mistakes (missing
Inputs/Outputs, broken dependency chains) that cause full rebuilds.

Also updated eval prompts to use 'target authoring mistakes' framing and
increased Fix scenario timeout to 360s.

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

* Increase eval timeouts: extension-points NuGet (240->360s), item-management cascading (240->360s)

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

* Fix 3 fresh PR review comments + update eval prompts for target-authoring

- property-patterns/SKILL.md: add warning that TargetFramework-conditioned
  PropertyGroups must be in .targets not .props (empty in single-target .props)
- extension-points/SKILL.md: add Exists() guard to GetPathOfFileAbove Import
  to prevent build failure when no parent file is found
- target-authoring/SKILL.md: fix comment mismatch — validation target runs
  via dependency chain, not BeforeTargets; update comment accordingly
- target-authoring/eval.yaml: reframe 'Diagnose' and 'Fix' prompts to use
  'dependency chain' / 'authoring patterns' language (avoids routing to
  incremental-build skill which also claims Inputs/Outputs diagnostics)

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

* Improve skill descriptions for reliable plugin-mode activation

Add 'Only activate in MSBuild/.NET build context.' prefix to all 4 skills
for consistency with existing skills in the plugin.

Add explicit 'diagnosing and fixing' and 'reviewing' keywords to USE FOR
sections so the SDK selects these skills over the broader
msbuild-antipatterns skill when prompts ask to fix or review specific
item/extension/property/target patterns.

Add 'general MSBuild anti-pattern catalog (use msbuild-antipatterns)' to
DO NOT USE FOR sections to help the SDK disambiguate.

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

* Fix skill descriptions: shorten to under 1024-char SDK limit

All 4 new skills had descriptions exceeding the 1024-character maximum
enforced by the skill-validator check command. The Copilot SDK silently
ignores skills with over-length descriptions, causing 0% activation in
both isolated and plugin evaluation modes.

Shortened all 4 descriptions while preserving key activation keywords
(USE FOR / DO NOT USE FOR / 'Only activate in MSBuild/.NET build context').

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

* Address PR review comments

- target-authoring eval.yaml: fix prompt to say 'Outputs attribute' (not
  'Returns') since the fixture uses Outputs on a query target, which is
  the actual bug that causes MSBuild to skip re-execution
- property-patterns eval.yaml: reword prompt and rubric — the real issue
  is unconditional assignment breaking parent-child Directory.Build.props
  inheritance, not project files being unable to override properties
- extension-points SKILL.md: fix GetPathOfFileAbove example to factor
  the path into a property so Project= and Condition= use the same value
  consistently (avoiding the ..\\ vs ..\ discrepancy)
- CustomSdk.targets: add WriteLinesToFile to CoreCodeGen so it actually
  creates the .g.cs output files (prevents compilation failure in fixture)

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

* Fix property-patterns fixtures to match rubric claims

Scenario 1 (path merge bug):
- PropertyPatterns.csproj: add OutputPath using CustomOutputDir without a
  trailing separator, making the merge bug observable
  (artifacts\binPropertyPatterns\ instead of artifacts\bin\PropertyPatterns\)

Scenario 2 (multi-level hierarchy bugs):
- hard/Directory.Build.props: make LangVersion unconditional so it
  overwrites the child src/Directory.Build.props LangVersion=preview,
  matching the rubric claim about parent unconditional assignments
- hard/Directory.Build.props: add NoWarn=NU1702 (conditional default)
  so parent suppressions are visible but lost when the child's
  unconditional <NoWarn>CS1591;IDE0005</NoWarn> overwrites them after import

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-22 09:39:23 +00:00
Jan Krivanek e951d69ab9 dotnet-msbuild: move AITools.BinlogMcp source to dotnet-tools feed (#680)
The MCP package was relocated from the dotnet-eng public feed to the dotnet-tools public feed on dnceng. Update plugin.json --add-source URL and the SKILL.md fallback note accordingly.
2026-05-21 13:14:51 +02:00
Jan Krivanek dfc8aa786d dotnet-msbuild: register AITools.BinlogMcp and use it from binlog-failure-analysis (#673)
* dotnet-msbuild: register AITools.BinlogMcp and use it from binlog-failure-analysis

Adds the AITools.BinlogMcp MCP server (pulled via dnx from the dotnet-eng public NuGet feed, prerelease, no version pin) to the dotnet-msbuild plugin and rewrites the binlog-failure-analysis SKILL.md to lead with the MCP tools (binlog_overview, binlog_errors, binlog_search, binlog_items, binlog_properties, binlog_imports, binlog_nuget). The text-log replay workflow is kept as a fallback for environments without the MCP.

* Improve skills

* Reflect PR comments
2026-05-19 19:45:34 +02:00
Dan Moseley e7ec5a77a0 Fix markdownlint CI workflow (startup_failure since inception) (#629) 2026-05-08 08:33:08 +01:00
Copilot 2f9922e073 Remove LangVersion=latest from skill examples and test fixtures (#608)
* Initial plan

* Remove LangVersion=latest from skill docs and test fixtures

Per official C# docs, LangVersion should not be set to `latest` as
it causes builds to silently vary across machines with different SDKs.
Best practice is to omit LangVersion entirely and let the TFM determine
the correct C# version automatically.

- Update msbuild-modernization/SKILL.md: remove LangVersion=latest from
  example and add explicit guidance to omit LangVersion
- Update directory-build-organization/SKILL.md: remove from example
- Update directory-build-organization/references/multi-level-examples.md:
  remove from all 4 examples
- Update msbuild-antipatterns/SKILL.md: remove from AP-08 examples
- Remove LangVersion=latest from 11 test fixture project files

Agent-Logs-Url: https://github.com/dotnet/skills/sessions/7a3d2722-770b-4010-a6e8-70c92668ad4c

Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>

* Fix LangVersion guidance and stale eval rubric reference

Agent-Logs-Url: https://github.com/dotnet/skills/sessions/e89afcd8-7227-424b-9c8c-9ec0ce7113c2

Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>
2026-05-05 15:45:56 +02:00
Tomas Grosup a55227f030 Fold F# .fsproj ordering into msbuild-antipatterns AP-05 (#577)
* Add fsharp-project-structure skill for .fsproj file ordering and .fsi files

Teaches agents F# compilation order rules, signature file placement,
and common FS0039/FS0010/FS0034 fixes. Includes eval with three scenarios
(add module, fix broken order, add signature file) and test fixtures.

Validated +64.6% improvement on gpt-4.1 (significant, CI [+17.2%, +63.0%]).

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

* Add fsharp-project-structure skill for .fsproj file ordering and .fsi files

Teaches agents F# compilation order rules, signature file placement,
and common FS0039/FS0010/FS0034 fixes. Includes eval with three scenarios
(add module, fix broken order, add signature file) and test fixtures.

Validated +64.6% improvement on gpt-4.1 (significant, CI [+17.2%, +63.0%]).

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

* Update plugins/dotnet/skills/fsharp-project-structure/SKILL.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fold F# project-structure into msbuild-antipatterns AP-05

Scraps the standalone fsharp-project-structure skill and instead adds a
short F# exception to AP-05 (Manual File Listing in SDK-Style Projects):
F# compilation is order-dependent, so .fsproj files must list Compile
items in dependency order (utilities first, entry point last), and .fsi
signature files must appear immediately before their companion .fs.

The three F# eval scenarios (add module, fix broken order, add signature
file) are ported into tests/dotnet-msbuild/msbuild-antipatterns/eval.yaml
with fixtures isolated under a fsharp/ subfolder (with empty
Directory.Build.{props,targets} to prevent the existing C#-antipattern
fixture files from leaking into the F# builds).

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-27 15:07:18 +02:00
Jan Krivanek 05aeb657e6 Add license to agent files (#568) 2026-04-21 12:57:18 +00:00
Amaury Levé 51d29a086f Improve test skills (#428) 2026-03-30 15:08:33 +02:00
Viktor Hofer a895c226b3 Fix agents field in plugin.json to use explicit file paths (#419)
* Fix agents field in plugin.json to use explicit file paths

Claude Code's manifest validator rejects directory paths in the agents
field. Replace directory references with explicit .agent.md file paths
in all affected plugins (dotnet-diag, dotnet-msbuild, dotnet-template-engine).

Fixes https://github.com/dotnet/skills/issues/416

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

* Validate that agents paths are explicit files, not directories

Claude Code's manifest validator rejects directory paths in the agents
field. Update PluginValidator to error when an agent path resolves to a
directory, guiding authors to use explicit .agent.md file paths instead.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 08:36:20 +00:00
Copilot 6face98ff6 Change agents and skills fields in plugin.json to array format for Claude Code CLI compatibility (#407)
* Initial plan

* Remove agents string field from plugin.json and handle array format in parser

Claude Code CLI validates `agents` as array-of-strings per its plugin manifest
schema. Our plugin.json files had `"agents": "./agents/"` (a string), which
caused "agents: Invalid input" validation errors on install.

Remove the field from the 3 affected plugin.json files — agents are still
discovered by convention from the `agents/` directory. Also make ParsePluginJson
resilient to both string and array formats for forward-compatibility.

Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>

* Remove `agents` string field from plugin.json for Claude Code CLI compatibility

Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>

* Change agents field to array format in plugin.json, update validator to read array-first with string fallback

Plugin.json files now declare agents as an array of file paths:
  "agents": ["./agents/foo.agent.md", "./agents/bar.agent.md"]

ParsePluginJson reads the array first (preferred, Claude Code schema),
falls back to a string path (legacy). PluginInfo gains an AgentPaths
field. Validator and discovery use the array when present, else fall
back to directory-based convention.

Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>

* Simplify agents to directory-path array form ["./agents/"], handle directories in array entries

Per Copilot CLI spec, agents field values are "Path(s) to agent directories"
— no need to list individual files. Use ["./agents/"] to mirror how
skills uses "./skills/". Updated validator and discovery to handle both
directory and file entries in the array.

Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>

* Delete .nuget/nuget.exe

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Convert skills field to array format in plugin.json, update validator to handle both forms

Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>

* Align AgentPaths null checks to use { Count: > 0 } pattern for consistency

Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>

* Change `agents` and `skills` fields in plugin.json to array format for Claude Code CLI compatibility

Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>

* Delete .nuget/nuget.exe

* Consolidate SkillsPath/SkillPaths and AgentsPath/AgentPaths into single array fields

Remove dual string/array fields from PluginInfo. The parser now
normalizes legacy string values into single-element arrays, so all
downstream code uses only SkillPaths and AgentPaths (IReadOnlyList<string>).
This eliminates all array-vs-string fallback branching.

Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-20 10:27:28 +01:00
YuliiaKovalova 14346ff3b2 Enrich build-perf-diagnostics skill with MSBuild team and community insights (#342)
* Enrich build-perf-diagnostics skill with MSBuild team and community insights

Additions (pure knowledge, no MCP dependency):
- RAR: dotnet/msbuild#2015 context, DisableTransitiveProjectReferences, ReferenceOutputAssembly
- Copy tasks: SkipCopyUnchangedFiles, --artifacts-path, Copy batching (dotnet/msbuild#12884)
- Dev Drive (ReFS): copy-on-write + reduced Defender scans, OrchardCore 7257 Copy tasks benchmark
- Evaluation: NuGetSdkResolver 180-400ms overhead (dotnet/msbuild#4025), EnableDefaultItems
- NuGet: RestoreUseStaticGraphEvaluation (20s+ savings in large builds)
- Project graph shape: wide vs deep (40% faster clean, 20% faster incremental)
- MSBuild Server: MSBUILDUSESERVER=1 for CLI caching
- Inline task overhead: 1s vs 3ms (RoslynCodeTaskFactory vs compiled)
- Misleading ResolveProjectReferences time (dotnet/msbuild#3135)
- Incrementality anti-patterns (dotnet/msbuild#13206)
- Impact categorization (HIGH/MEDIUM/QUICK WINS)
- Quick Wins: expanded to 15 items (from 7)

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

* Fix minor issues from review comments

- Fix missing closing XML tag for CreateHardLinksForCopyFilesToOutputDirectoryIfPossible in Quick Wins checklist
- Clarify confusing Copy task batching wording per reviewer feedback

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

* Trim skill to reduce token overhead

Remove standalone sections (MSBuild Server, Inline Tasks,
ResolveProjectReferences, Incrementality Anti-patterns) that add
~1400 extra tokens without benefiting the evaluated scenario.
Consolidate Quick Wins checklist accordingly.

These sections can be contributed as separate skills in follow-up PRs.

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

* Add separate skills for MSBuild server, inline tasks, and ResolveProjectReferences

Extract content removed from build-perf-diagnostics into standalone skills
to keep each skill focused and avoid token budget bloat:

- msbuild-server: MSBUILDUSESERVER=1 for CLI incremental caching
- inline-task-overhead: RoslynCodeTaskFactory ~1s overhead vs ~3ms compiled
- resolve-project-references: misleading Target Performance Summary time
  (dotnet/msbuild#3135), guides users to Task Performance Summary instead

Incrementality anti-patterns content was not extracted as a separate skill
because the existing incremental-build skill already covers that area.

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

* Add github.com/dotnet/msbuild to known-domains.txt

Required by reference scanner for MSBuild issue links in
build-perf-diagnostics and resolve-project-references skills.

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

* Replace full dotnet/msbuild URLs with shorthand notation

The reference scanner reads known-domains.txt from upstream main,
not from the PR branch. Use shorthand 'dotnet/msbuild#NNNN' format
(consistent with the rest of the file) instead of full URLs.

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

* Address review comments and fix reference scanner errors

- Remove https://aka.ms/devdrive URLs that trigger reference scanner
- Soften unsourced benchmark claims (OrchardCore Copy tasks, 20s+
  restore savings, 40%/20% graph shape improvements) per reviewer
  feedback to use workload-dependent language instead

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

* Add eval tests for new skills; remove inline-task-overhead

Add eval.yaml and test fixtures for msbuild-server and
resolve-project-references skills:
- msbuild-server: tests CLI build perf scenario with developer report
- resolve-project-references: tests misleading target perf summary
  with multi-project setup and perf report

Remove inline-task-overhead skill: failed 3 evaluation iterations
(avg +2.7%) because the baseline LLM already knows about
RoslynCodeTaskFactory overhead — the skill doesn't add enough
unique value to meet the 10% improvement threshold.

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

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Address review comments

- Add caveat that DisableTransitiveProjectReferences may require
  adding direct references for consumed types
- Fix escaped quotes in Quick Wins RunAnalyzers checklist item
- Add OutputType=Exe and Main entry point to msbuild-server fixture
- Change 'solution' to 'project' in resolve-project-references report
- Trim trailing spaces in developer-report.md

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

* Restore accidentally removed known-domains.txt

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

* Fix remaining review comments

- Quote -flp argument in resolve-project-references bash example
  to handle semicolons in POSIX shells
- Format LibA/Class1.cs and LibB/Class1.cs across multiple lines
  for consistency with other test fixtures
- Rename msbuild-server/Program.cs to Calculator.cs to match content

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-17 15:55:44 +01:00
Jan Krivanek 7e7dabd343 [WIP] Improve msbuild skills descriptions (#384)
* Improve msbuild skills descriptions

* Improve descriptions
2026-03-17 14:30:58 +01:00
Dan Moseley d5bd687cf6 Fix msbuild spec conformance violations (#247)
- msbuild-antipatterns: Move AP-16 through AP-21 and checklist to
  references/additional-antipatterns.md (body: 384 lines, was 583)
- directory-build-organization: Replace cross-skill reference to
  ../msbuild-antipatterns/SKILL.md with local reference file
  references/targetframework-props-pitfall.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 14:15:50 +01:00
Viktor Hofer 887dafdbb4 Fix typos and grammar in msbuild.agent.md (#191)
* Fix typos and grammar in msbuild.agent.md

- Close unclosed backtick on #tool:web/fetch reference
- Fix 'help user to troubleshoot' -> 'help the user troubleshoot'
- Fix 'nor' -> 'or' (no preceding 'neither')
- Fix 'a sub-agents' -> 'sub-agents'

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

* Update plugins/dotnet-msbuild/agents/msbuild.agent.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update plugins/dotnet-msbuild/agents/msbuild.agent.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix incorrect skill reference in build-perf-baseline

Replace non-existent 'analyzer-performance' skill reference with
'build-perf-diagnostics' which contains the analyzer performance guidance.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-04 14:44:00 +01:00
Jared Parsons 4793aa27e9 Replace binlog mcp with replay to textlog (#162)
Co-authored-by: Jan Krivanek <jankrivanek@microsoft.com>
2026-03-02 21:32:23 +01:00
Viktor Hofer 29033c459d Reset plugin verisons to 0.1.0 (#145) 2026-02-28 08:38:03 +01:00
Viktor Hofer 24fa12656b Remove .mcp.json and mcpServers from plugin.json
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-27 20:19:46 +01:00
Viktor Hofer 7115c467d7 Move build.ps1 to agentic-workflows and update paths
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-27 20:19:46 +01:00
Viktor Hofer 2dacda5600 Remove AGENTS.md and README.md from dotnet-msbuild plugin
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-27 20:19:46 +01:00
Viktor Hofer 077ca9155f Remove prompts folder and distribution templates section
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-27 20:19:46 +01:00
Viktor Hofer 1e44eef4f1 Remove copilot-extension folder and all references
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-27 20:19:46 +01:00
Viktor Hofer 7d0a329aee Move agentic-workflows to repo root
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-27 20:19:46 +01:00
Viktor Hofer 6e2ad53e88 Move plugin tests out of plugins folder into a root tests/ folder 2026-02-27 20:19:46 +01:00
Viktor Hofer 0b249be6b6 Rename from components to plugins 2026-02-27 20:19:46 +01:00
Viktor Hofer 250b1c2bbc Rename src/ to plugins/ folder 2026-02-27 20:19:46 +01:00