microsoft / microsoft/microsoft-ui-xaml
[WinUI OSS] Improve agentic Build Experience
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
## Summary
Make "clone the repo and build it" work unattended for an AI coding agent.
## Context
From a clean clone an agent has no root-level guidance for the build, cannot complete a first run unless initialization has already happened, and cannot trust the result: `Build.cmd` can exit `0` after a build that failed, so a caller checking only the exit code continues against stale binaries.
Guidance is published as `AGENTS.md`, the cross-provider standard read by Copilot, Codex, Cursor, Gemini CLI, Jules, Devin, Aider, Windsurf, Zed and Junie, so the repo needs no per-vendor instruction file. `.github/copilot-instructions.md` is retained because Copilot reads it as well.
`Build.cmd`, `init.cmd`, `initrun.ps1` and `scripts/init/` are maintained by the build owners and sit on the critical path of official builds, so this work calls them rather than changing them.
## Work to do
- Add `AGENTS.md` at the repo root as canonical agent guidance.
- Add `.github/copilot-instructions.md` linking to it.
- Add a build skill under `.github/skills/build/` covering targets, flags and troubleshooting.
- Add a build wrapper that initializes on first use and derives the real build result from existing failure markers and binary log output.
- Treat missing packages or tools as a build failure rather than a code error, since a partial restore is reported without an MSBuild error code and can otherwise exit `0`.
- Add tests against a stub repository so they run in seconds rather than requiring a full build.
- Keep internal tooling, feeds, hosts and credentials out of public guidance.
## Definition of done
- An agent given only the repo can initialize and build without human help.
- A failed build is reported as a failure, including when the script exits `0` and when a crash produces no binary log.
- A build that fails for missing packages or tools is reported as a failure and directs the caller to initialize.
- The change is additive: no existing file modified, no build script touched.
- Public content remains safe and actionable.
- Tests cover exit codes, initialization, argument forwarding and paths containing spaces.
Contributor guide
Assessment
This issue has not been assessed yet.