winappCli
AGENTS.md1.3k starsChanged 2 months agoMITView on GitHub
This file provides focused, actionable information to help an AI coding agent be immediately productive in this repo. Write for someone using winapp. Lead with the smallest command or input that demonstrates the behavior, then answer: what can I do, what do I type, what happens, and what action should I take if it fails. Describe observable behavior, not implementation machinery. Keep internal deliberation, review provenance, rejected alternatives, review rounds/IDs, resolved blockers, and defenses of the implementation out of user…
- Installs packages
Trending
More talk lately.about the whole repository
Who's talking about microsoft/winappCli
- openclaw/openclaw-windows-node“Seed v3 Colophon design system for OpenClaw Windows Hub”GitHub · Sep 10, 2026 · 1 reactions
- sudosubin/agents.nix“copilot-plugins.github.microsoft.winappcli: init at 0.7.1”GitHub · Oct 4, 2026
- P4suta/Snaply“build(deps): update all non-major dependencies”GitHub · Oct 4, 2026
- P4suta/TateYoko“build(deps): update all non-major dependencies”GitHub · Oct 4, 2026
- P4suta/typing-sound“build(deps): update all non-major dependencies”GitHub · Oct 4, 2026
The biggest 5 of 36 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 36
Talked about on GitHub and Bluesky (36 times).
On GitHub · 35
- Sep 10, 2026Seed v3 Colophon design system for OpenClaw Windows Hub — openclaw/openclaw-windows-node1 reaction · 4 comments
- Oct 4, 2026copilot-plugins.github.microsoft.winappcli: init at 0.7.1 — sudosubin/agents.nix0 reactions
- Oct 4, 2026build(deps): update all non-major dependencies — P4suta/Snaply0 reactions · 2 comments
- Oct 4, 2026build(deps): update all non-major dependencies — P4suta/TateYoko0 reactions · 2 comments
- Oct 4, 2026build(deps): update all non-major dependencies — P4suta/typing-sound0 reactions · 1 comment
30 more on GitHub
- Oct 4, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.7.0 to 0.7.1 — mirrorpulse/MirrorPulse0 reactions
- Oct 4, 2026agent-plugins.github.microsoft.winappcli: init at 0.7.1 — sudosubin/agents.nix0 reactions
- Oct 3, 2026Bump the windows-app-sdk group with 2 updates — lzvsrx/LZ-AGENT0 reactions
- Oct 3, 2026chore(deps-node): update dependency @microsoft/winappcli to v0.7.1 — scottlz0310/md-peruse0 reactions
- Oct 2, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.6.1 to 0.7.1 — Has-X/Registry0 reactions
- Oct 2, 2026Bump the dotnet-dependencies group with 6 updates — rhamenator/SimpleLoanCalculator0 reactions · 1 comment
- Oct 2, 2026chore(deps): update dependency microsoft.windows.sdk.buildtools.winapp to 0.7.1 — SheepReaper/nes-emulator-30 reactions
- Oct 2, 2026Update dependency Microsoft.Windows.SDK.BuildTools.WinApp to 0.7.1 - autoclosed — mfakane/azunyan0 reactions
- Oct 2, 2026fix(deps): update dependency microsoft.windows.sdk.buildtools.winapp to 0.7.1 — sebdanielsson/varys0 reactions
- Sep 26, 2026Bump the windows-app-sdk group with 2 updates — lzvsrx/LZ-AGENT0 reactions · 1 comment
- Sep 25, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.6.1 to 0.7.0 — Has-X/Registry0 reactions · 1 comment
- Sep 25, 2026Bump the dotnet-dependencies group with 6 updates — rhamenator/SimpleLoanCalculator0 reactions · 2 comments
- Sep 24, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.3.2 to 0.7.0 — trsdn/md2loop-windows0 reactions
- Sep 18, 2026Bump the dotnet-dependencies group with 6 updates — rhamenator/SimpleLoanCalculator0 reactions · 2 comments
- Sep 12, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.5.0 to 0.6.1 — jacob-krarup-madsen/WinForge0 reactions · 1 comment
- Sep 11, 2026Bump the dotnet-dependencies group with 6 updates — rhamenator/SimpleLoanCalculator0 reactions · 2 comments
- Sep 4, 2026UI 驱动三选一:winapp ui、FlaUI、UIAutomationClient — trytoreachpeak0/8005-test-lab0 reactions · 2 comments
- Sep 3, 2026refactor: migrate MSIX packaging/signing to Microsoft's winapp CLI — recregt/winsp0 reactions
- Sep 3, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.3.2 to 0.6.1 — trsdn/md2loop-windows0 reactions · 1 comment
- Sep 1, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.6.0 to 0.6.1 — onlytrisdev/chrome-native-adblock0 reactions
- Aug 28, 2026Bump the dotnet-dependencies group with 6 updates — rhamenator/SimpleLoanCalculator0 reactions · 2 comments
- Aug 21, 2026Bump the dotnet-dependencies group with 5 updates — rhamenator/SimpleLoanCalculator0 reactions · 2 comments
- Aug 19, 2026build(deps-dev): bump @microsoft/winappcli from 0.5.0 to 0.6.0 — baiyuscc13724-max/deepseek-harness-desktop0 reactions · 1 comment
- Aug 19, 2026fix(deps): update dependency microsoft.windows.sdk.buildtools.winapp to 0.6.1 — sebdanielsson/varys0 reactions
- Aug 18, 2026chore(deps): update dependency microsoft.windows.sdk.buildtools.winapp to 0.6.1 [automerge] — DevSecNinja/home-assistant-win-companion0 reactions
- Aug 14, 2026Bump Microsoft.Windows.SDK.BuildTools.WinApp from 0.3.1 to 0.6.0 — Has-X/Registry0 reactions · 1 comment
- Aug 14, 2026Bump the dotnet-dependencies group with 5 updates — rhamenator/SimpleLoanCalculator0 reactions · 2 comments
- Aug 9, 2026Add Windows WinApp computer provider — albert-zen/zen0 reactions
- Jul 2, 2026using winapp cii — peaceshi/Avalonia-NativeAOT-SingleFile0 reactions
- Feb 8, 2026Electron deployment: Add Windows packaging with Microsoft WinAppCli — ok-very/autoart0 reactions
On Bluesky · 1
- May 6, 2026Does winappcli help? github.com/microsoft/wi... — @drustheaxe.bsky.social0 likes and reposts · 1 reply
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository17 other files it gives its agents.
- llms.txtllms.txt
- code-qualitySkill
- pr-lifecycleSkill
- pr-reviewSkill
- spec-reviewSkill
- winapp-find-apiSkill
- winapp-find-uiSkill
- winapp-frameworksSkill
- winapp-identitySkill
- winapp-manifestSkill
- winapp-mauiSkill
- winapp-packageSkill
- winapp-sandboxSkill
- winapp-setupSkill
- winapp-signingSkill
- winapp-troubleshootSkill
- winapp-ui-automationSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
23 rules. About 0 are common, 7 are distinctive, and 16 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Write for someone using winapp.
- Distinctive: line 14
Keep internal deliberation, review provenance, rejected alternatives, review rounds/IDs, resolved blockers, and defenses of the …
- Distinctive: line 57
If any cannot be named, replace the unreleased behavior cleanly instead of preserving it with a shim.
- Very specific: line 140
If you need the pde-oss_Internal feed itself (the one CI restores from), it requires a token:
- Very specific: line 153
Do not fix this by adding a global package source — these tests run in %TEMP%, outside the repo, so a repo-local nuget.config never applies …
- Distinctive: line 190
When observable behavior changes, update only the surfaces that teach or expose that behavior.
- Very specific: line 203
Add a page under docs\ only when users need a new workflow or reference that does not fit an existing canonical page.
- Very specific: line 228
Create test.Tests.ps1 in the sample directory (Pester naming convention)
- Very specific: line 229
Use BeforeDiscovery for skip logic (prerequisite checks run at discovery time)
- Very specific: line 230
Import shared helpers in BeforeAll: Import-Module "$PSScriptRoot\..\SampleTestHelpers.psm1" -Force
- Very specific: line 234
Add the sample name to the matrix in .github/workflows/test-samples.yml
- Very specific: line 239
BeforeAll: Import SampleTestHelpers.psm1, install winapp, create temp directories. - Very specific: line 241
Itblocks: Use -Skip:$script:skip for prerequisite gating. - Very specific: line 272
Keep build-and-package and test-samples-result as top-level aggregate check names for branch protection.
- Very specific: line 319
Look at the docs\cli-schema.json for the full schema to know what the cli can do
- Very specific: line 325
Changing CLI commands/workflows: Update the relevant hand-written skill in plugins/winapp/skills/ if its workflow, examples, or …
- Very specific: line 326
After C# CLI changes: Run cd src/winapp-npm && npm run build to update npm package binaries.
- Very specific: line 338
Do not edit it directly; run scripts/build-cli.ps1 to regenerate it.
- Distinctive: line 394
Use the appropriate pattern for new code:
- Distinctive: line 407
Prefer one cohesive implementation over several wrappers that only forward to one another.
- Distinctive: line 411
Do not extract a method group merely because it uses only a few of a service's dependencies.
- Very specific: line 417
Use AppxManifestDocument for AppxManifest.xml operations — it provides typed access and namespace-aware queries
- Very specific: line 418
When adding new manifest manipulation, add methods to AppxManifestDocument rather than writing regex in consuming code
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent instructions for winapp
This file provides focused, actionable information to help an AI coding agent be immediately productive in this repo.
Audience contracts
User documentation
Write for someone using winapp. Lead with the smallest command or input that demonstrates the behavior, then answer: what can I do, what do I type, what happens, and what action should I take if it fails. Describe observable behavior, not implementation machinery.
Keep internal deliberation, review provenance, rejected alternatives, review rounds/IDs, resolved blockers, and defenses of the implementation out of user documentation. State each user-facing fact once on its canonical surface and link to it elsewhere instead of copying it.
Example: "After cloning a project with winapp.yaml, run winapp restore to
reinstall its pinned SDK packages and projections without changing versions. For
a .NET project without winapp.yaml, run dotnet restore instead."
Reviews and author communication
Assume the reader has no prior codebase or conversation context. A junior developer should understand each finding after one read. Use a plain title, then:
- What is wrong: the behavior or design defect.
- Show me: the smallest concrete command, input, tree, or code path, preferably as input -> actual result -> expected result.
- Why it matters: the user, build, or maintenance consequence.
- Smallest fix: the least-complex change that resolves it.
Define unavoidable jargon at first use. Put paths and lines in supporting detail, not in a title the reader must decode. If the issue cannot be demonstrated concretely, lower its confidence or drop it.
Example:
- What is wrong:
--setup-sdks nonefails instead of skipping SDK updates. - Show me:
winapp init --setup-sdks none-> exits nonzero in the package update loop; expected: succeeds without updating SDKs. - Why it matters: documented automation stops before initialization.
- Smallest fix: skip the package-update loop when the value is
none.
Compatibility boundary
Backward compatibility starts at the latest supported published release, not an earlier commit, review round, current PR implementation, or unreleased release work. Before adding or requesting an alias, fallback, migration path, legacy branch, or compatibility abstraction, name all three:
- The supported published version that contains the behavior.
- The public contract or persisted user data that depends on it.
- A real external consumer that would break.
If any cannot be named, replace the unreleased behavior cleanly instead of preserving it with a shim. The only exception is a preview contract the project has publicly committed to support.
Big picture
Two main components:
- src/winapp-CLI (C#/.NET): The native CLI implemented with System.CommandLine. Key files:
Program.cs,Commands/*.cs(e.g.,InitCommand.cs,PackageCommand.cs). Build withscripts/build-cli.ps1. - src/winapp-npm (Node): A thin Node wrapper/SDK and CLI (
cli.js) that forwards most commands to the native CLI. Key helpers:winapp-cli-utils.js,msix-utils.js,cpp-addon-utils.js. Install withnpm installinsidesrc/winapp-npm.
Developer workflows
# Build everything and generate autogenerated files
# You can pass -SkipTests, -SkipMsix, and/or -SkipNpm to speed up the build when those pieces are not needed
.\scripts\build-cli.ps1
# Or build directly with dotnet
dotnet build src/winapp-CLI/winapp.sln -c Debug
# Run native CLI in-tree
dotnet run --project src/winapp-CLI/WinApp.Cli/WinApp.Cli.csproj -- <args>
# Build the NuGet packages. -SkipCliPackage builds only the UI Automation libraries, which need
# no published CLI and so pack in seconds; without it the CLI tools package is built too and
# artifacts/cli must already hold an x64 + arm64 publish.
.\scripts\package-nuget.ps1 -SkipCliPackage
# Update npm package after CLI changes
cd src/winapp-npm && npm run build # builds C# CLI + copies to npm bin
cd src/winapp-npm && npm run build-copy-only # copies already-built Release binaries
# Node package development
cd src/winapp-npm && npm install
node cli.js help
# Always call the build script at the end to ensure everything builds and all autogenerated docs are generated
.\scripts\build-cli.ps1
# Produce packages first, then validate them without republishing or deleting artifacts.
# Keep artifacts\cli and artifacts\nuget from the same build and source revision.
.\scripts\build-cli.ps1 -SkipTests -SkipDocs
.\scripts\build-cli.ps1 -OnlyTests -UseExistingArtifactsRunning tests on a Microsoft corporate machine
api.nuget.org is not reachable from corp machines. Any test that downloads a package
(anything touching Microsoft.Windows.SDK.BuildTools, so most of PackageCommand,
SignCommand and MsixService coverage) fails with:
Failed to install Microsoft.Windows.SDK.BuildTools: The SSL connection could not be establishedThis is a known limitation, not a flaky test and not a transient outage. Do not dismiss a failure on these grounds and do not re-run hoping it passes.
NugetService resolves its package sources from the standard nuget.config hierarchy (rooted at
the working directory), so pointing it at a reachable mirror is a config change, not an
environment-variable override. Add a mirror of nuget.org to your user-level
%APPDATA%\NuGet\NuGet.Config — the corporate proxy works and needs no token:
<add key="azure-default" value="https://packagefeedproxy.microsoft.io/nuget/v3/index.json" protocolVersion="3" />The repo-root nuget.config deliberately declares no <packageSources>, so that user-level source
is inherited by both dotnet restore and the CLI's own package downloads.
The live-feed integration tests in NugetServiceTests pin themselves to an isolated config so they
can't inherit a machine that has nuget.org disabled. Point them at the same mirror:
$env:WINAPP_TEST_NUGET_SOURCE = 'https://packagefeedproxy.microsoft.io/nuget/v3/index.json'Confirm the mirror answers before spending time on a long run:
Invoke-RestMethod 'https://packagefeedproxy.microsoft.io/nuget/v3/index.json'If you need the pde-oss_Internal feed itself (the one CI restores from), it requires a token:
$t = azureauth aad --resource 499b84ac-1321-427f-aa17-267ca6975798 `
--client 872cd9fa-d31f-45e0-9eab-6e460a02d1f1 `
--tenant 72f988bf-86f1-41af-91ab-2d7cd011db47 --output token
$env:VSS_NUGET_ACCESSTOKEN = ($t | Select-Object -Last 1).Trim()End-to-end tests that shell out to dotnet add package Microsoft.WindowsAppSDK need that feed to be
a registered source. If nuget.org is disabled and no internal feed is registered, they fail with
[ERROR] - Failed to add Microsoft.WindowsAppSDK package reference.
Do not fix this by adding a global package source — these tests run in %TEMP%, outside the
repo, so a repo-local nuget.config never applies to them, and a machine-wide registration is a
persistent change to a shared dev box. Instead point APPDATA at a throwaway directory holding
the repo's own feed config, which scopes the whole thing to the session:
$feed = 'https://pkgs.dev.azure.com/microsoft/pde-oss/_packaging/pde-oss_Internal/nuget/v3/index.json'
# NuGet resolves its user-level config from %APPDATA%\NuGet\NuGet.Config, so redirecting APPDATA
# swaps in the repo's feed list without touching the real one.
$cfg = Join-Path $env:TEMP "winapp-nuget-$PID"
New-Item -ItemType Directory -Path "$cfg\NuGet" -Force | Out-Null
Copy-Item .pipelines\release-nuget.config "$cfg\NuGet\NuGet.Config"
$env:APPDATA = $cfg
# The Azure Artifacts credential provider needs the endpoint spelled out.
# VSS_NUGET_ACCESSTOKEN alone is NOT enough here - the service index returns 401 without this.
$env:VSS_NUGET_EXTERNAL_FEED_ENDPOINTS = @{
endpointCredentials = @(@{ endpoint = $feed; username = 'docker'; password = $env:VSS_NUGET_ACCESSTOKEN })
} | ConvertTo-Json -Compress -Depth 5.pipelines/release-nuget.config is the single source of truth for the feed URL — do not hardcode
it somewhere else. CI does the same thing less surgically, by copying that file over
%APPDATA%\NuGet\NuGet.Config on a throwaway agent.
Because APPDATA is redirected, run this in a dedicated shell and let it end with the run.
Note that the CLI's own package downloads read this same nuget.config hierarchy, so redirecting
APPDATA covers both them and anything that shells out to dotnet.
More generally: if something fails locally but passes in CI, the difference is configuration,
not luck. Check .pipelines/templates/build.yaml for the environment CI provides before
concluding a failure is environmental.
Update affected user-facing documentation
When observable behavior changes, update only the surfaces that teach or expose that behavior. Internal refactors do not require user documentation. Never use documentation to explain internal implementation details or review history. Choose affected surfaces from:
- docs\usage.md
- docs\guides\
- samples\
- plugins\winapp\skills\
- README.md
- .github\plugin\marketplace.json (and .claude-plugin\marketplace.json)
- plugins\winapp\com.github.copilot\agents\
Add a page under docs\ only when users need a new workflow or reference that
does not fit an existing canonical page.
Sample & guide testing
Each sample under samples/ has a self-contained Pester 5.x test file (test.Tests.ps1) that validates the corresponding guide workflow from scratch (Phase 1) and verifies the existing sample code still builds (Phase 2). Tests share infrastructure via samples/SampleTestHelpers.psm1.
Running sample & guide tests locally
# Run all sample tests
.\scripts\test-samples.ps1
# Run a specific sample
.\scripts\test-samples.ps1 -Samples dotnet-app
# Run with a locally built winapp npm tarball (package-npm.ps1 outputs to .\artifacts\)
.\scripts\test-samples.ps1 -WinappPath .\artifacts -Verbose
# Or pass a specific .tgz / a directory containing one (e.g., a CI artifact download)
.\scripts\test-samples.ps1 -WinappPath .\artifacts\npm -VerboseWriting a new sample & guide test
- Create
test.Tests.ps1in the sample directory (Pester naming convention) - Use
BeforeDiscoveryfor skip logic (prerequisite checks run at discovery time) - Import shared helpers in
BeforeAll:Import-Module "$PSScriptRoot\..\SampleTestHelpers.psm1" -Force - Accept
$WinappPathand$SkipCleanupparameters viaparam()block - Phase 1 (
Context): from-scratch guide workflow in a temp directory (scaffold, winapp init, build, cert, pack) - Phase 2 (
Context): quick build of existing sample code to verify freshness - Add the sample name to the matrix in
.github/workflows/test-samples.yml
Pester conventions for sample tests
BeforeDiscovery: Set$script:skipusing inlineGet-Commandchecks (no module import). Pester evaluates-Skip:$variableduring discovery, beforeBeforeAllruns.BeforeAll: ImportSampleTestHelpers.psm1, install winapp, create temp directories. Guard withif ($script:skip) { return }.AfterAll: Clean up temp directories usingRemove-TempTestDirectory.Itblocks: Use-Skip:$script:skipfor prerequisite gating. Use PesterShouldassertions (Should -Be 0,Should -Exist,Should -Not -BeNullOrEmpty). When all setup happens inBeforeAlland depends on the prerequisite, you may apply-Skip:$script:skipto the enclosingContextinstead.- Shared helpers:
Invoke-WinappCommand(throws on failure),Test-Prerequisite(returns bool),New-TempTestDirectory,Remove-TempTestDirectory,Install-WinappGlobal.
CI integration
Build and Package builds both CLI architectures and all packages together
with -SkipTests -SkipDocs. Keep full git history in build-artifacts so the
build number is calculated correctly. It uploads packages, then starts the full
test suite, documentation validation, UI E2E, and (on PRs) sample tests as
independent jobs. The test suite uses -OnlyTests -UseExistingArtifacts; it must
not republish or delete the downloaded CLI and NuGet packages.
CI runs -TestSuite Cli -CliShard 1, -TestSuite Cli -CliShard 2,
-TestSuite Auxiliary, and -TestSuite UIAutomation on separate runners, never
concurrently in one workspace. Together they cover the default All suite.
Auxiliary owns Node unit tests, analyzer tests/stand-down, and both Pester suites.
Both CLI shards prepare the Node CLI needed by integration tests, but do not
rerun Node unit tests.
scripts\test-cli-shard.ps1 partitions the CLI suite using a class predicate and
its exact complement: package-command tests versus all remaining tests. New tests
always enter one shard. Each invocation requires at least one executed test,
accounts for every discovered case in TRX (including intentional skips), and
checks its unique TRX/coverage outputs. Keep the combined
test-results artifact and union source-line coverage across reports; do not
average shard percentages or double-count shared source lines.
Sample & guide tests use the reusable .github/workflows/test-samples.yml
matrix with npm-package and nuget-packages from the same run. Manual sample
runs still build their own packages and support selecting one sample. Sample
results are uploaded as JUnit XML via Pester's TestResult configuration.
Keep build-and-package and test-samples-result as top-level aggregate check
names for branch protection. They must fail on failures, cancellations, and
unexpected skips, not just test failures. Metrics join package artifacts with
the validation job's TRX and coverage reports; never report zero tests just
because the packages were uploaded first. Publish combined test results even
when validation fails on main, but promote metrics to the main baseline only
after successful validation. Each job owns a distinct artifact name and
overwrites only that artifact on rerun; preserve other jobs' artifacts for
partial reruns. Fork PR code runs only with the PR's
token; the privileged comment workflow reads metrics as data, never executes it.
Where to look first
| Area | Key files |
| CLI commands | src/winapp-CLI/WinApp.Cli/Commands/*.cs |
| Services | src/winapp-CLI/WinApp.Cli/Services/*.cs |
| Node CLI | src/winapp-npm/cli.js, winapp-cli-utils.js |
| Config example | winapp.example.yaml |
| CLI schema | docs/cli-schema.json |
| Shipped agent skills | plugins/winapp/skills/ |
| Plugin (Copilot + Claude) | plugins/winapp/ |
| Copilot-specific plugin components | plugins/winapp/com.github.copilot/ |
| Plugin marketplaces | .github/plugin/marketplace.json, .claude-plugin/marketplace.json |
| Samples | samples/ (electron, cpp-app, dotnet-app, etc.) |
| ADO pipelines | .pipelines/ — see .pipelines/README.md |
Editing the ADO pipelines
Agent setup (.NET, Node, internal feeds and their auth) is shared via
.pipelines/templates/build-env.yaml. Change it there, not in each pipeline.
1ES release jobs cannot check out the repo, so any step inside a templateContext.type:
releaseJob job cannot call a .ps1 from the working tree. It can still share logic via a
YAML - template: reference, because templates are expanded at compile time — that is how
release.yml's Build-stage preflight and its Release_GitHub job share
templates/release-assets.yaml. Prefer that over
duplicating inline script between the two.
.pipelines/release.yml both ships releases (from rel/v*) and rehearses one weekly (from
main). Every publishing action is gated on startsWith(variables['Build.SourceBranch'],
'refs/heads/rel/v') — derived from the branch, not a parameter, because Azure DevOps compiles
scheduled and triggered runs with parameter defaults. If you add a publishing step, gate it the
same way, and write the condition as a positive test for rel/v* so it fails closed.
CLI command semantics
Look at the docs\cli-schema.json for the full schema to know what the cli can do
Quick change checklist
- Adding a new CLI command: Implement in C# under
Commands/, register inHostBuilderExtensions.cs, inject intoWinAppRootCommand, updatesrc/winapp-npm/cli.jsif needed. - Changing command descriptions: Edit the description string in the command's constructor.
- Changing CLI commands/workflows: Update the relevant hand-written skill in
plugins/winapp/skills/if its workflow, examples, or troubleshooting changed. - After C# CLI changes: Run
cd src/winapp-npm && npm run buildto update npm package binaries. - Updating package versions: Edit
winapp.example.yaml.
Integration points
- NuGet: Packages downloaded to NuGet global cache. Local
.winappfolder contains generated headers and libs only. - Build Tools: makeappx.exe, signtool.exe, makepri.exe, etc. Auto-downloaded by the
toolcommand or when commands that need them are invoked. - CppWinRT: Generated headers in
.winapp/generated/include. Response file at.cppwinrt.rsp.
Documentation and skill maintenance
docs/cli-schema.json is generated from the CLI by scripts/generate-llm-docs.ps1.
Do not edit it directly; run scripts/build-cli.ps1 to regenerate it.
The files under plugins/winapp/skills/ are the hand-authored, shipped plugin
skills shared by GitHub Copilot and Claude Code. Edit these files directly.
The single plugin under plugins/winapp/ conforms to the
Agent Plugins 1.0 specification:
plugins/winapp/
├── plugin.json # portable Agent Plugins 1.0 manifest ($schema + metadata only)
├── skills/<skill>/SKILL.md # portable Agent Skills (fixed location)
├── com.github.copilot/
│ └── agents/winapp.agent.md # Copilot-specific component
└── .claude-plugin/plugin.json # Claude Code manifest (Claude is not an Agent Plugins client)plugin.json uses the closed Agent Plugins schema, so it must contain only
$schema, name, version, description, author, homepage, repository,
license, keywords, and extensions. Component paths are auto-discovered and
must not be declared there — adding fields like agents or skills back to it
breaks schema conformance. Claude Code has no com.github.copilot/ awareness, so
.claude-plugin/plugin.json points its agents field at the same file rather than
duplicating it.
Both hosts are listed through their marketplaces (.github/plugin/marketplace.json,
.claude-plugin/marketplace.json). The repo-root plugin.json is deliberately kept in
the legacy Copilot manifest format (no $schema) so that
copilot plugin install microsoft/WinAppCli and the awesome-copilot listing keep
resolving the repo as a plugin; adding $schema there would make its nested
skills/agents paths unknown fields that clients must ignore.
generate-llm-docs.ps1 keeps every manifest's version field in sync with the CLI version.
scripts/validate-plugin-package.ps1 enforces all of the above: the closed manifest
schema, the plugin name constraints, SKILL.md presence and frontmatter for every
immediate child of skills/, the Copilot agent's location, the Claude agents pointer
resolving to a real file, and the repo-root shim staying legacy. It needs no build
output, so run it directly while editing plugin files:
.\scripts\validate-plugin-package.ps1validate-llm-docs.ps1 also invokes it, so CI fails on any conformance regression.
C# service architecture guidelines
File size limits
Line counts are signals to inspect cohesion, not extraction requirements. Around 500 lines is a useful prompt to check readability; around 800-1,000 lines deserves an explicit cohesion review. Never extract solely to hit a line target. Keep one cohesive implementation together when splitting it would create wrappers, indirection, or scattered state.
Service patterns
Use the appropriate pattern for new code:
| Pattern | When to use | Example |
| DI service | Stateful logic or logic with dependencies; a concrete class can be registered directly | PriService |
| Interface | Multiple implementations, an established contract, or a necessary substitution/test boundary | IPriService |
| Static helper | Pure functions, no DI needed | PeHelper, MrtAssetHelper |
| Data document | Wraps a file/data format with typed access | AppxManifestDocument |
| Partial class | Splitting a large service with tight internal coupling | MsixService.Runtime.cs |
Separation of concerns
- Organize around cohesive responsibilities, not one-caller layers.
- Prefer one cohesive implementation over several wrappers that only forward to one another.
- Extract shared logic when it creates a real reusable boundary or prevents meaningful duplication.
- Do not extract a method group merely because it uses only a few of a service's dependencies.
XML handling
- Use
XDocument/XElement(System.Xml.Linq) for structured XML manipulation — never regex - Regex is acceptable ONLY for: pre-parse placeholder replacement (
$targetnametoken$), raw text scanning before XML is valid - Use
AppxManifestDocumentfor AppxManifest.xml operations — it provides typed access and namespace-aware queries - When adding new manifest manipulation, add methods to
AppxManifestDocumentrather than writing regex in consuming code
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

