Skip to content

Remove winmd-cli; point skills at winapp find-api - #192

Merged
Nikola Metulev (nmetulev) merged 6 commits into
stagingfrom
jay/remove-winmd
Sep 25, 2026
Merged

Nikola Metulev (nmetulev) merged 6 commits into
stagingfrom
jay/remove-winmd

Conversation

@Jaylyn-Barbee

Copy link
Copy Markdown
Contributor

Description

The WinRT/.NET metadata indexer has been ported to WinApp CLI and ships as winapp find-api in 0.7. Keeping a second implementation here would leave two copies of the same lookup drifting apart, so winmd-cli is removed outright and the skills now delegate to the CLI.

Removed

  • src/tools/winmd-cli/ in full — 23 files, including winmd.csproj.
  • Its build step from scripts/build-tools.ps1, pr-validation.yml, and the 1ES compliance template.
  • Its dependabot nuget entry, and its options in the issue form and PR template.
  • The Native AOT section of the pr-review tool-correctness dimension — no AOT-published project remains in the repo.

Added winapp find-api guidance

Skill What it now does
winui-design New "Verify the API before you bind to it" section — search, members, check-property, enums, batching, and --project vs --project-dir scoping
winui-dev-workflow Verify API surface after adding a package, before writing code
winui-code-review Ground an API mismatch in the restored project's own references
winui-wpf-migration Confirm each WinUI replacement exists with the expected members

Every command surface was taken from winapp find-api --help on 0.7.1, not from memory.

Version minimum: skills now require WinApp CLI 0.7+ (was 0.6+), since that is where find-api ships. Updated in winui-setup, winui-dev-workflow, BuildAndRun.ps1, both agent files, and README.md.

Nothing referenced winmd, so nothing broke

Checked before deleting:

  • No project or solution referenced winmd.csproj; no ProjectReference to it.
  • Nothing invoked winmd.exe — every remaining hit was prose.
  • cgmanifest.json and THIRD_PARTY_NOTICES.md listed only analyzer dependencies, so neither needed a change.
  • Three stale rationales in the winui-analyzer docs/props named winmd-cli as the reason Directory.Build.props is subtree-scoped. Reworded generically; the scoping decision itself still stands.

The only surviving winmd mentions are the .winmd metadata file format that find-api reads, and the historical 0.1.0 changelog entry.

Related Issue

Type of Change

  • 💥 Breaking change (skill API, agent config, plugin layout)
  • 🔧 Config / build / CI

Affected area

  • Agent (plugins/winui/agents/, plugins/winui/agent-plugin/com.github.copilot/agents/)
  • Skill: winui-design, winui-dev-workflow, winui-code-review, winui-wpf-migration, winui-setup
  • Tool: removed winmd-cli
  • Repo-level docs / governance

Checklist

  • Tested locally on Windows (build + agent invocation if applicable)
  • If a skill changed: SKILL.md frontmatter still valid; cross-references to other skills still resolve
  • If a .ps1 script changed: tested under default RemoteSigned execution policy
  • If a CLI command or agent invocation changed: README.md updated
  • If user-facing: added a bullet to ## [Unreleased] in CHANGELOG.md
  • Did not edit any version field in plugins/winui/agent-plugin/plugin.json, .github/plugin/marketplace.json, or .claude-plugin/marketplace.json

Microsoft.WindowsAppSDK.Analyzers source was not changed, so the committed DLL payload is untouched and the provenance check is unaffected.

Validation

  • ./scripts/build-tools.ps1 -SkipPayloadRefresh — analyzer builds, 47/47 tests pass.
  • Edited YAML (dependabot.yml, pr-validation.yml, build.yaml, bug-report.yml) parses.
  • build-tools.ps1 and BuildAndRun.ps1 pass PowerShell AST parsing.
  • Both copies of winui-dev.agent.md are byte-identical — the drift check passes.
  • Analyzer .targets blobs are identical in git (7f90b96), so analyzer-targets-sync passes.
  • All skill frontmatter descriptions well under the length limit.

Additional Notes

This PR is blocked by a pre-existing gate, not by its own changes. Hotfix #179 landed on main and was never back-merged, so staging is 2 commits behind and staging-up-to-date-with-main will fail on any feature PR until a backmerge/* → staging PR lands (as a merge commit, per CONTRIBUTING.md).

Overlap: nmetulev-winapp-0-7-migration performs this same removal as part of a much broader 0.7 migration that also deletes winui-analyzer, removes BuildAndRun.ps1, and rewrites the UI-testing skill. Whichever merges second will hit conflicts — worth deciding sequencing before merge.

The WinRT/.NET metadata indexer has been ported to WinApp CLI and ships as
`winapp find-api` in 0.7. Keeping a second copy in this repo would leave two
implementations of the same lookup drifting apart, so the in-repo tool is
removed outright and the skills now delegate to the CLI.

Removed:
- src/tools/winmd-cli/ in full (23 files, including winmd.csproj).
- Its build step from scripts/build-tools.ps1, pr-validation.yml, and the
  1ES compliance template.
- Its dependabot nuget entry, issue-form and PR-template options.
- The Native AOT section of the pr-review tool-correctness dimension; no
  AOT-published project remains in the repo.

Added `winapp find-api` guidance to winui-design (search, members,
check-property, enums, batching, project scoping), winui-dev-workflow
(verify after adding a package), winui-code-review (ground an API mismatch
in the restored project), and winui-wpf-migration (confirm each WinUI
replacement). Command surfaces were taken from `winapp find-api --help`
on 0.7.1, not from memory.

Skills now require WinApp CLI 0.7+, since that is where find-api ships.

Nothing referenced winmd.csproj or invoked winmd.exe, so no build wiring
broke. cgmanifest.json and THIRD_PARTY_NOTICES.md listed only analyzer
dependencies and needed no change. Analyzer build and 47 tests pass; the
committed analyzer payload is untouched, so CI provenance is unaffected.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 718332eb-3493-407b-ac09-e5b35c60c9c5

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.

Copilot review overview

🟡 Changes recommended

Four unresolved documentation and guidance findings remain, covering changelog headings, README version references, find-api filtering guidance, and payload-build documentation.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Low severity

Open (2)
What changed in this PR

Removes the redundant winmd-cli and updates WinUI skills to use winapp find-api from WinApp CLI 0.7+.

Changes:

  • Deletes the obsolete CLI and its build, CI, dependency, and template integrations.
  • Adds project-scoped API verification guidance to WinUI skills and agents.
  • Updates documentation, review guidance, and changelog references.
File Description
src/​tools/​winui-analyzer/​README.md Removes obsolete CLI references.
src/​tools/​winui-analyzer/​Directory.Build.props Generalizes project-scoping rationale.
src/​tools/​winmd-cli/​XmlDocParser.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​WinMdTypeInfo.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​WinMdParser.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​WinMdParameterInfo.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​WinMdMemberInfo.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​winmd.csproj Deletes the obsolete project.
src/​tools/​winmd-cli/​TypeKind.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​SimpleTypeProvider.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​Scoring.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​ScoredMatch.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​README.md Deletes obsolete CLI documentation.
src/​tools/​winmd-cli/​QueryEngine.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​ProjectPackageRef.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​ProjectManifest.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​Program.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​PackageWithWinMd.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​NuGetResolver.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​NsSearchResult.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​MemberKind.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​JsonHelper.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​JsonContext.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​CustomAttributeTypeProvider.cs Deletes obsolete CLI source.
src/​tools/​winmd-cli/​CliArgs.cs Deletes obsolete CLI source.
scripts/​build-tools.ps1 Removes obsolete CLI build steps.
README.md Updates tooling and requirements documentation.
plugins/​winui/​agents/​winui-dev.agent.md Updates CLI requirements and API guidance.
plugins/​winui/​agent-plugin/​skills/​winui-wpf-migration/​SKILL.md Adds API verification guidance.
plugins/​winui/​agent-plugin/​skills/​winui-setup/​SKILL.md Raises the CLI minimum to 0.7.
plugins/​winui/​agent-plugin/​skills/​winui-dev-workflow/​SKILL.md Adds post-restore API verification.
plugins/​winui/​agent-plugin/​skills/​winui-dev-workflow/​BuildAndRun.ps1 Raises the CLI version requirement.
plugins/​winui/​agent-plugin/​skills/​winui-design/​SKILL.md Adds find-api guidance.
plugins/​winui/​agent-plugin/​skills/​winui-code-review/​SKILL.md Adds grounded API verification.
plugins/​winui/​agent-plugin/​com.github.copilot/​agents/​winui-dev.agent.md Mirrors agent guidance updates.
CHANGELOG.md Documents the removal and migration.
.pipelines/​templates/​build.yaml Updates build labeling.
.github/​workflows/​pr-validation.yml Removes the obsolete CLI build.
.github/​skills/​pr-review/​SKILL.md Removes obsolete tool references.
.github/​skills/​pr-review/​dimensions/​tool-correctness.md Removes obsolete AOT guidance.
.github/​skills/​pr-review/​dimensions/​skill-tool-boundary.md Updates API-tool guidance.
.github/​skills/​pr-review/​dimensions/​skill-content.md Updates CLI documentation guidance.
.github/​skills/​pr-review/​dimensions/​docs-and-manifests.md Removes obsolete README references.
.github/​skills/​pr-review/​dimensions/​_shared-contract.md Updates tooling examples.
.github/​PULL_REQUEST_TEMPLATE.md Removes the obsolete tool option.
.github/​ISSUE_TEMPLATE/​bug-report.yml Removes the obsolete tool option.
.github/​dependabot.yml Removes obsolete NuGet monitoring.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread CHANGELOG.md Resolved
Comment thread README.md Resolved
CHANGELOG: the new bullet created a second `### Removed` ahead of the
template's existing empty one. Moved the bullet into the existing section so
the Unreleased block keeps one heading per category in template order.

README: the requirements table was bumped to 0.7 but the setup walkthrough
still told users to accept >= 0.6.0 and described templates and project-mode
run as 0.6+ features. A user following those steps could land below the
version find-api needs. Updated lines 28, 29, 134, and 144.

Swept every tracked file for stale 0.6 CLI references; the only remaining
match is intentional sample output in winui-setup ("found 0.6.1 — will
upgrade").

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 718332eb-3493-407b-ac09-e5b35c60c9c5

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.

Copilot review overview

🟡 Changes recommended

Two documentation issues remain unresolved in the final review.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Low severity

Open (2)
Resolved since last review (2)

Comment thread .github/skills/pr-review/SKILL.md Resolved
Co-authored-by: Jaylyn-Barbee <51131738+Jaylyn-Barbee@users.noreply.github.com>

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.

Copilot review overview

🔵 Needs a closer look

The project-scoping guidance issue remains unresolved, along with the noted documentation prerequisite corrections.

Review effort: Lite
Findings: None

Resolved since last review (2)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Specify project scope for find-api example

plugins/​winui/​agent-plugin/​skills/​winui-code-review/​SKILL.md:12

This example omits the project scope even though the surrounding instruction promises answers from the app's restored references. When the review runs outside a project directory, find-api can fall back to the machine-wide SDK scope, so a type/member lookup may incorrectly validate an API that the app does not reference. Add --project-dir . (with an explicit project-root assumption) or --project <name> to make the example enforce the intended scope.

The code-review example ran `find-api` with no scope while the surrounding
text promised an answer from the app's restored references. Nothing in the
example enforced that, so a lookup run from the wrong directory could validate
an API the app does not reference.

- winui-code-review: scope the example with `--project-dir <app-project-dir>`
  and state the rule inline rather than deferring entirely to winui-design.
- winui-design: split the scoping bullet into the three distinct scopes
  (`--project-dir`, `--project <name>`, `--project sdk`), note that
  `--project-dir` defaults to the current directory, and say plainly that an
  `sdk` hit is not proof the app can use the API.
- winui-wpf-migration: scope the examples to the new WinUI project, which
  matters most here because the old WPF project usually sits beside it.
- winui-dev-workflow: scope the check-property example.
- winui-design: scope the inline control-map example that was still bare.

Every `winapp find-api` example in the skills now carries explicit scope.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 718332eb-3493-407b-ac09-e5b35c60c9c5

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.

Copilot review overview

🟢 Approval recommended

Only two non-blocking nit comments remain.

Review effort: Lite
Findings: None

@nmetulev
Nikola Metulev (nmetulev) merged commit 6b369d3 into staging Sep 25, 2026
12 checks passed
@nmetulev
Nikola Metulev (nmetulev) deleted the jay/remove-winmd branch September 25, 2026 20:36
This was referenced Sep 25, 2026
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.

4 participants