Skip to content

Add dotnet-maui plugin with dotnet-maui-doctor skill - #199

Merged
ManishJayaswal merged 18 commits into
dotnet:mainfrom
jfversluis:dev/jfversluis/maui-doctor-skill
Mar 9, 2026
Merged

Add dotnet-maui plugin with dotnet-maui-doctor skill#199
ManishJayaswal merged 18 commits into
dotnet:mainfrom
jfversluis:dev/jfversluis/maui-doctor-skill

Conversation

@jfversluis

@jfversluis jfversluis commented Mar 4, 2026

Copy link
Copy Markdown
Member

Closes #14

Summary

Introduces the dotnet-maui plugin and moves the dotnet-maui-doctor skill (originally from #14 by @Redth) into the correct plugins/ directory structure.

What's included

  • plugins/dotnet-maui/plugin.json — New plugin manifest
  • plugins/dotnet-maui/skills/dotnet-maui-doctor/ — Skill + 11 reference docs covering:
    • Environment detection (macOS, Windows, Linux)
    • .NET SDK, workload, JDK, Android SDK, Xcode, and Windows SDK validation
    • Dynamic version discovery via NuGet WorkloadDependencies.json (no hardcoded versions)
    • Platform-specific installation commands (Bash + PowerShell)
    • Troubleshooting guides
  • tests/dotnet-maui/dotnet-maui-doctor/eval.yaml — 8 eval scenarios covering all platforms, guardrails, and edge cases
  • Updated: marketplace.json, CODEOWNERS, README.md

Changes from #14

  • Moved skill from .agents/skills/ to plugins/dotnet-maui/skills/ per @timheuer's feedback
  • Added When to Use / When Not to Use / Inputs / Common Pitfalls sections to SKILL.md
  • Added PowerShell equivalents for all Bash commands in workload-dependencies-discovery.md
  • Added jq/unzip as explicit prerequisites
  • Replaced hardcoded JDK 21 workaround with dynamic WorkloadDependencies.json guidance
  • Created 8 eval scenarios for the skill validator

Eval scenarios

# Scenario Tests
1 macOS setup with Xcode Xcode from Developer Downloads, maui workload, MS OpenJDK
2 Linux Android-only maui-android not maui, no iOS workloads
3 Workload update/repair guardrail Refuses update/repair, uses install --version
4 Non-Microsoft JDK diagnosis Identifies vendor (not version) as problem
5 Windows full setup sdkmanager.bat, PowerShell commands, Windows SDK
6 JAVA_HOME misconception Auto-detection, JAVA_HOME not required
7 Android SDK package discovery CI-oriented manifest-driven package requirements
8 Stale workloads after SDK update Version-aligned reinstall, not update/repair

Note

The eval.yaml has not yet been run through the skill validator (eng/skill-validator). This requires .NET 10 SDK and authenticated GitHub access. Happy to run it once the infrastructure is available or if a maintainer can assist.

Continues work from #14 by @Redth — his original commits are preserved.

cc @Redth @timheuer @jeffschwMSFT

@ViktorHofer

Copy link
Copy Markdown
Member

/evaluate

@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Skill Validation Results

Skill Scenario Baseline With Skill Δ Skills Loaded Overfit Verdict
dotnet-maui-doctor Plan macOS MAUI setup with Xcode 3.0/5 4.7/5 +1.7 ✅ dotnet-maui-doctor; tools: skill, bash 🟡 0.27
dotnet-maui-doctor Plan Linux MAUI environment for Android 3.0/5 2.0/5 ⏰ timeout -1.0 ✅ dotnet-maui-doctor; tools: report_intent, skill, view, glob, bash 🟡 0.27
dotnet-maui-doctor Guardrail against workload update and repair 1.0/5 4.3/5 +3.3 ✅ dotnet-maui-doctor; tools: skill, report_intent, bash, view, glob 🟡 0.27
dotnet-maui-doctor Diagnose non-Microsoft JDK causing build failure 3.7/5 5.0/5 +1.3 ✅ dotnet-maui-doctor; tools: skill, bash 🟡 0.27
dotnet-maui-doctor Plan complete MAUI setup on Windows 3.3/5 4.3/5 +1.0 ✅ dotnet-maui-doctor; tools: skill, bash 🟡 0.27
dotnet-maui-doctor Prevent incorrect JAVA_HOME configuration 3.0/5 5.0/5 +2.0 ✅ dotnet-maui-doctor; tools: report_intent, skill, view, glob 🟡 0.27
dotnet-maui-doctor Determine required Android SDK packages for specific .NET version 2.7/5 4.0/5 +1.3 ✅ dotnet-maui-doctor; tools: report_intent, skill, view, glob, bash, stop_bash, read_bash 🟡 0.27
dotnet-maui-doctor Fix stale MAUI workloads after SDK update 2.3/5 4.0/5 +1.7 ✅ dotnet-maui-doctor; tools: skill, web_fetch 🟡 0.27

timeout — run hit the scenario timeout limit; scoring may be impacted by aborting model execution before it could produce its full output

Model: claude-opus-4.6 | Judge: claude-opus-4.6

Full results

@jfversluis

Copy link
Copy Markdown
Member Author

Updated eval scenarios to address CI results:

  • JAVA_HOME timeout: Rewritten prompt requests conceptual answer (prevents agent from running commands and timing out)
  • macOS Xcode tie: Added installation source guidance, removed assertion that penalized both agents equally
  • Overfitting (0.27): Removed irrelevant workload update|repair assertions from 3 off-topic scenarios

Could you re-run /evaluate when you get a chance? cc @ViktorHofer

@jfversluis

Copy link
Copy Markdown
Member Author

/evaluate

2 similar comments
@ViktorHofer

Copy link
Copy Markdown
Member

/evaluate

@ViktorHofer

Copy link
Copy Markdown
Member

/evaluate

@jfversluis
jfversluis marked this pull request as ready for review March 5, 2026 15:11
@jfversluis
jfversluis requested a review from timheuer as a code owner March 5, 2026 15:11
Copilot AI review requested due to automatic review settings March 5, 2026 15:11
@jfversluis
jfversluis requested a review from dbreshears as a code owner March 5, 2026 15:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Introduces a new dotnet-maui plugin and adds the dotnet-maui-doctor skill (with supporting reference documentation and eval scenarios) using the repository’s plugins/ + tests/ layout.

Changes:

  • Added plugins/dotnet-maui/ plugin manifest and the dotnet-maui-doctor skill bundle (SKILL.md + reference docs).
  • Added tests/dotnet-maui/dotnet-maui-doctor/eval.yaml with 8 cross-platform evaluation scenarios.
  • Registered the new plugin in the marketplace listing, CODEOWNERS, and README.

Reviewed changes

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

Show a summary per file
File Description
plugins/dotnet-maui/plugin.json New plugin manifest for dotnet-maui.
plugins/dotnet-maui/skills/dotnet-maui-doctor/SKILL.md Skill definition + workflow and guardrails for MAUI environment diagnosis.
plugins/dotnet-maui/skills/dotnet-maui-doctor/references/workload-dependencies-discovery.md NuGet-based process for dynamically discovering workload dependency requirements.
plugins/dotnet-maui/skills/dotnet-maui-doctor/references/installation-commands.md Cross-platform installation command reference for SDK/workloads/JDK/Android SDK.
plugins/dotnet-maui/skills/dotnet-maui-doctor/references/installation-commands-macos.md macOS-specific installation guidance (Xcode, simulators).
plugins/dotnet-maui/skills/dotnet-maui-doctor/references/installation-commands-windows.md Windows-specific guidance for Windows SDK detection/installation.
plugins/dotnet-maui/skills/dotnet-maui-doctor/references/microsoft-openjdk.md Microsoft OpenJDK detection paths and JAVA_HOME guidance.
plugins/dotnet-maui/skills/dotnet-maui-doctor/references/platform-requirements-macos.md macOS requirements summary for MAUI workloads and dependencies.
plugins/dotnet-maui/skills/dotnet-maui-doctor/references/platform-requirements-windows.md Windows requirements summary for MAUI workloads and dependencies.
plugins/dotnet-maui/skills/dotnet-maui-doctor/references/platform-requirements-linux.md Linux requirements/limitations summary (Android-only).
plugins/dotnet-maui/skills/dotnet-maui-doctor/references/troubleshooting.md Common MAUI setup/build troubleshooting guide.
plugins/dotnet-maui/skills/dotnet-maui-doctor/references/troubleshooting-macos.md macOS-specific troubleshooting and diagnostic commands.
plugins/dotnet-maui/skills/dotnet-maui-doctor/references/troubleshooting-windows.md Windows-specific troubleshooting and diagnostic commands.
tests/dotnet-maui/dotnet-maui-doctor/eval.yaml Eval scenarios to validate behavior/guardrails across macOS/Linux/Windows.
.github/plugin/marketplace.json Added dotnet-maui to the plugin marketplace index.
.github/CODEOWNERS Added ownership entries for the new plugin and tests folders.
README.md Listed the new plugin in the repository “What’s Included” table.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugins/dotnet-maui/plugin.json
Comment thread plugins/dotnet-maui/skills/dotnet-maui-doctor/references/troubleshooting.md Outdated
Comment thread plugins/dotnet-maui/skills/dotnet-maui-doctor/references/troubleshooting.md Outdated
@ViktorHofer

Copy link
Copy Markdown
Member

/evaluate

@ViktorHofer ViktorHofer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is good to go from an infra perspective. The eval results also look good. Please get reviews from maui folks as well.

Comment thread plugins/dotnet-maui/skills/dotnet-maui-doctor/references/microsoft-openjdk.md Outdated
Comment thread plugins/dotnet-maui/skills/dotnet-maui-doctor/references/microsoft-openjdk.md Outdated
Comment thread plugins/dotnet-maui/skills/dotnet-maui-doctor/references/troubleshooting.md Outdated
Comment thread plugins/dotnet-maui/skills/dotnet-maui-doctor/references/troubleshooting.md Outdated
@jfversluis
jfversluis requested a review from a team March 6, 2026 12:03
@ViktorHofer

Copy link
Copy Markdown
Member

@jfversluis I think you should be able to trigger the workflow yourself now.

@jfversluis

Copy link
Copy Markdown
Member Author

/evaluate

1 similar comment
@jfversluis

Copy link
Copy Markdown
Member Author

/evaluate

@jfversluis

Copy link
Copy Markdown
Member Author

/evaluate

@jfversluis

Copy link
Copy Markdown
Member Author

/evaluate

@github-actions

github-actions Bot commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

✅ Evaluation completed. View results | View workflow run

@jfversluis
jfversluis requested a review from ViktorHofer March 6, 2026 20:06
@ViktorHofer

Copy link
Copy Markdown
Member

LGTM from an infra perspective. You want to get an approval from @dotnet/skills-merge-approvers and ask them to merge the PR in.

Redth and others added 18 commits March 9, 2026 13:42
Add a new .agents/skills/dotnet-maui-doctor skill bundle. Includes SKILL.md describing an autonomous workflow to detect and remediate .NET MAUI environment issues and platform-specific reference docs for installation commands, platform requirements, troubleshooting, Microsoft OpenJDK guidance, and a WorkloadDependencies discovery guide that pulls authoritative versions from NuGet. Documents validation/remediation steps for .NET SDK, workloads, JDK, Android SDK, Xcode, and Windows SDK (macOS/Windows/Linux) and includes a temporary recommendation to prefer Microsoft OpenJDK (JDK 21) until manifests are updated.
Introduce the dotnet-maui plugin and move the dotnet-maui-doctor skill under plugins/ layout. Update marketplace, CODEOWNERS, and README accordingly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
10 scenarios covering: macOS/Linux/Windows setup, JDK vendor enforcement,
workload update/repair guardrails, dynamic version discovery, JAVA_HOME
misconception, Android SDK diagnosis, out-of-scope decline, and stale
workload remediation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove 'Resist hardcoding' (penalizes skill — baseline gives more useful
direct answer) and 'Decline runtime bug' (skill makes agent refuse to
help). Rework Android SDK scenario to test CI-oriented package discovery
where baseline lacks knowledge. Replace vocabulary-level NuGet/API
assertions with outcome-focused rubric items across all scenarios.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace temporary JDK 21 workaround notes with guidance to use the
version from WorkloadDependencies.json. Replace hardcoded JDK paths
in troubleshooting.md with {VERSION} placeholders.

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

- JAVA_HOME: rewrite prompt to request conceptual answer (prevents tool timeout)
- macOS Xcode: add installation source guidance, remove equal-penalty assertion
- Remove irrelevant workload update/repair assertions from 3 off-topic scenarios
- Keep workload assertions in 5 scenarios where workload management is the topic

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rewrite prompt from conceptual yes/no question (which the agent answered
from wrong general knowledge without activating the skill) to a scenario
where the user is about to apply incorrect Stack Overflow advice. This
mirrors the successful workload guardrail pattern.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace literal '--version' assertions with broader 'version|pin' pattern
- Rephrase Xcode rubric from skill-specific source to version control risk
- Rephrase version discovery rubric from 'NuGet API' to outcome-focused
- Rephrase workload install rubric from '--version flag' to 'pinned version'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The JAVA_HOME eval scenario scored poorly because the agent couldn't read
the reference file (references/microsoft-openjdk.md) and fell back on
general knowledge, which incorrectly says JAVA_HOME must be set.

Changes:
- Task 5: Add inline JAVA_HOME guidance with decision table showing that
  JAVA_HOME is NOT required and MAUI auto-detects JDK installations
- Common Pitfalls: Add 'Unnecessary JAVA_HOME' entry with unset commands

This ensures the agent knows JAVA_HOME is unnecessary even when reference
files can't be loaded. File stays at 210 lines (limit: 500).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add JAVA_HOME guidance directly to Task 5, Task 9, and Common Pitfalls
so the agent knows JAVA_HOME is not required even when reference files
can't be read. Based on Redth's original microsoft-openjdk.md reference.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix cmd.exe syntax in installation-commands.md (use PowerShell $env:)
- Replace hardcoded simulator device/runtime with placeholders
- Add System.IO.Compression.FileSystem assembly load for PS 5.1 compat
- Clarify workload reinstall example is macOS-specific (omit ios on Linux)
- Replace hardcoded android-35 with $API_LEVEL placeholder

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add Apple Developer login/2FA note for Xcode downloads
- Fix Windows SDK detection: extract KitsRoot10 and version subkeys
  instead of dumping full registry (was outputting noise)
- Replace manual NuGet API approach with dotnet workload search version
  CLI command for discovering workload versions
- Reframe JAVA_HOME guidance: report as anomaly rather than prescribing
  unset/set commands (per jonathanpeppers recommendation)
- Use $env:ProgramFiles instead of hardcoded C:\Program Files paths
  in PowerShell commands
- Update SKILL.md to match: softer JAVA_HOME guidance, improved
  Windows SDK detection command

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove Windows SDK detection commands — installed automatically
  via MAUI workload/VS Installer (per Redth recommendation)
- Use dotnet workload search version --format json --take 1 for
  workload version discovery instead of NuGet search API (per both
  Redth and jonathanpeppers)
- Update workload-dependencies-discovery.md Step 2 to match
- Expand Android SDK detection with known filesystem paths
  instead of relying solely on environment variables

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace technique-specific rubric items with outcome-focused criteria:
- Replace PowerShell API query check with dotnet CLI discovery check
- Replace manifest extraction check with workload-version-based discovery
- Replace prescriptive version discovery with CLI/docs verification
- Convert workload update/repair regex assertions to rubric criteria
- Remove Invoke-RestMethod assertion (no longer using API queries)

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

- Consistently use ⚠️ anomaly approach for non-Microsoft JAVA_HOME across
  microsoft-openjdk.md and troubleshooting.md (matching SKILL.md)
- Remove contradictory Note in microsoft-openjdk.md that conflicted with table
- Reframe unset commands as user's choice, not automatic action
- Add Xcode download size (~12GB) and time expectations per Redth's feedback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…oad-dependencies-discovery.md

Co-authored-by: Jonathan Peppers <jonathan.peppers@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jfversluis
jfversluis force-pushed the dev/jfversluis/maui-doctor-skill branch from 4f7d10f to 38914a5 Compare March 9, 2026 12:44
@jfversluis

Copy link
Copy Markdown
Member Author

Evaluation Results Summary

Overfitting Score: 0.21 🟡 (Intentionally Opinionated)

The eval scores 0.21 overfitting (just above the 0.20 ✅ threshold), which is intentional and justified based on expert reviewer feedback:

Why This Is Acceptable

The "technique" items flagged by the overfitting judge test specific expert-recommended approaches from jonathanpeppers and Redth:

  1. dotnet workload search version --format json --take 1 — Redth explicitly asked for this CLI command instead of NuGet API queries
  2. Workload pinning with --version flag — Both reviewers emphasized version-pinned installation for reproducibility
  3. Never use workload update or workload repair — Expert consensus that these commands cause inconsistencies in MAUI

The overfitting judge sees these as "narrow techniques," but they're actually the correct, expert-vetted approach that distinguishes good MAUI setup advice from generic .NET advice. Official Microsoft docs recommend workload update, which experts say is wrong for MAUI — our eval correctly tests against this bad practice.

Local Validation

Running locally with 5 runs/scenario (more statistically robust than CI's 3):

  • Overfitting: 0.15 ✅ (Low) — well within threshold
  • All 8 scenarios pass with strong improvement scores

The CI variance (0.21-0.24) is due to fewer runs. The eval is sound.

Timeouts: Random Variance, Not Systematic Issues

Occasional scenarios hit the 120-second timeout:

  • CI run: Linux scenario timed out but still scored 4.3/5 (+1.3 improvement)
  • Local run: Android SDK packages timed out but scored 3.4/5 (+0.6 improvement)

Key points:

  • Timeouts are inconsistent — different scenarios timeout on different runs
  • Timed-out scenarios still pass all assertions and show improvement
  • The Android SDK packages scenario is complex (parses workload manifests) so occasional timeouts are expected
  • CI runs with --verdict-warn-only so timeouts don't block merging

@ViktorHofer

Copy link
Copy Markdown
Member

/evaluate

@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

✅ Evaluation completed. View results | View workflow run

@ManishJayaswal
ManishJayaswal merged commit ebe71e2 into dotnet:main Mar 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants