Skip to content

Stop stating template-specific facts as Reactor invariants - #1138

Merged
Alexandre Zollinger Chohfi (azchohfi) merged 3 commits into
microsoft:mainfrom
azchohfi:azchohfi-reactor-skill-packaging-neutral
Aug 27, 2026
Merged

Alexandre Zollinger Chohfi (azchohfi) merged 3 commits into
microsoft:mainfrom
azchohfi:azchohfi-reactor-skill-packaging-neutral

Conversation

@azchohfi

@azchohfi Alexandre Zollinger Chohfi (azchohfi) commented Aug 27, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

reactor-getting-started/SKILL.md states template-specific facts as if they were invariants of Reactor. The headline case:

WindowsPackageType MUST be None (unpackaged, no App.xaml).

That is a property of the current dotnet new reactorapp template, not of Reactor. The practical effect is that an agent handed a packaged Reactor project edits it back to unpackaged, because the skill tells it to. Adding <WindowsPackageType>None</WindowsPackageType> to a project that has a Package.appxmanifest silently drops its package identity — and the build still succeeds, so nothing surfaces the mistake.

This matters now that packaged Reactor templates are being added in microsoft/WindowsAppSDK#6620: with this line in place, that template change cannot land on its own.

Approach

This PR does not flip the mandate to "packaged". The shipped template is still unpackaged, and a skill that contradicts its own template causes the same class of failure in the other direction. Instead the skill stops mandating a mode at all: it describes both shapes, and tells the agent to keep whatever the scaffold produced.

That is correct against today's template and against a packaged one, so there is no ordering dependency with #6620.

Packaging semantics, verified experimentally

Both shapes built from a clean tree on the same SDK:

csproj MSIX artifacts produced Result
WindowsPackageType absent + EnableMsixTooling=true AppxManifest.xml, resources.pri, *.build.appxrecipe packaged
WindowsPackageType=None + EnableMsixTooling=true none unpackaged

Two conclusions, both reflected in the wording:

  • None overrides EnableMsixTooling — a project with both builds unpackaged.
  • WindowsPackageType=MSIX is not required. Omitting the property entirely yields a packaged app off the default, and that is the shape #6620's own template uses (EnableMsixTooling=true, no WindowsPackageType). Wording that made MSIX mandatory would have described that scaffold as broken.

Neither mode is signalled by one property alone. Package.appxmanifest is the discriminator — app.manifest is not, since it also appears in unpackaged projects (e.g. tests/startup_perf/BlankWinUI3).

Also: the same defect, one sentence away

The same paragraph asserts:

The .csproj does not enable implicit usings

True for dotnet new reactorapp; false for #6620, which sets <ImplicitUsings>enable</ImplicitUsings> — its App.cs opens with six usings rather than seven, dropping using System;. The sentence's own example misfires too: an agent told to add using System.Linq; finds it already in scope.

Reworded to be template-neutral, so it needs no follow-up when #6620 lands. The adjacent "exactly two source files" claim is dropped for the same reason — a packaged scaffold additionally emits Package.appxmanifest, app.manifest and Assets\.

Why this is worth doing

Measured on the win-dev-skills benchmark harness, comparing unpackaged and packaged Reactor arms on identical scenarios:

Arm n project subscore mean
Reactor unpackaged 6 4, 5, 5, 5, 6, 7 5.33
Reactor packaged 2 8, 8 8.00
WinUI/XAML (reference) 2 9, 10 9.50

Every packaged observation sits above the entire unpackaged range. On the one clean same-run pair the total score moved 72 → 75, with the whole delta coming from project 5 → 8.

The reverse failure is also observed: in a trial where the agent ignored the scaffold and hand-authored a packaged-looking .csproj, the result would not launch — winapp run reported "The manifest contains a placeholder for the executable but no .exe files were found in the input folder". Guidance that disagrees with the template is what produces that outcome.

Scope

One file, docs only. No code, no template, no behaviour change.

The skill states 'WindowsPackageType MUST be None' as if it were an invariant of
Reactor, but it is a property of the current dotnet new reactorapp template. An
agent handed a packaged Reactor project therefore edits it back to unpackaged;
adding WindowsPackageType=None to a project with a Package.appxmanifest silently
drops its package identity while the build still succeeds, so nothing surfaces
the mistake.

Stop mandating a packaging mode. Describe both shapes, tell the agent to keep
whatever the scaffold produced, and warn about the downgrade. This is correct
against the current unpackaged template and against a packaged one, so it does
not have to land in lockstep with a template change.

Also drops the adjacent 'exactly two source files' claim, which is false for a
packaged scaffold and would contradict the same change.
Review follow-up. The packaging-neutral rewrite named `EnableMsixTooling` as
the packaged marker and told the agent never to set `WindowsPackageType`.
Both were wrong in ways that matter:

- `EnableMsixTooling` only enables the single-project MSIX tooling. A project
  with `WindowsPackageType=None` *and* `EnableMsixTooling=true` builds
  unpackaged -- `None` wins. Verified live: that combination emits no
  `AppxManifest.xml` / `resources.pri` / `.build.appxrecipe`, while the same
  csproj with the property absent emits all three.
- Packaged does not require `WindowsPackageType=MSIX`. Omitting the property
  entirely also yields a packaged app off the default, which is what the
  templates in microsoft/WindowsAppSDK#6620 do. Mandating `MSIX` would have
  described that scaffold as broken.
- "Don't set `WindowsPackageType` yourself" contradicted
  `docs/guide/packaging.md`, which tells you to set it to `MSIX` -- and this
  skill routes readers to that guide two paragraphs later.

Both shapes are now described with the property precedence stated, and the
rule is scoped to the actual hazard (don't flip the mode of a project you
didn't scaffold) rather than to the property. `Package.appxmanifest` stays
the discriminator; it is true today and after #6620, so neither change waits
on the other.

Also drops `app.manifest` as a packaged marker -- the repo's only one belongs
to an unpackaged project (`tests/startup_perf/BlankWinUI3`) -- and the
present-tense claim about a packaged template's file list.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 784c77a5-bfd2-40f4-96a5-ce447df7c3e2
@azchohfi Alexandre Zollinger Chohfi (azchohfi) changed the title Make reactor-getting-started packaging-neutral Stop stating template-specific facts as Reactor invariants Aug 27, 2026
Companion to the packaging fix in 525efc2, same defect class: a property of
`dotnet new reactorapp` stated as a property of Reactor.

The skill claimed the `.csproj` does **not** enable implicit usings. That is
true of the shipped template, which sets no `ImplicitUsings` property, and
false of the templates in microsoft/WindowsAppSDK#6620 --
`ReactorBlankApp/ProjectTemplate.csproj` sets `<ImplicitUsings>enable</ImplicitUsings>`.

The divergence is observable in the scaffolded source: #6620's `App.cs` opens
with six usings and no `using System;`, against the seven in
`tools/Templates/templates/WinUIApp-CSharp/App.cs:1-7`, which leads with it.
That also made the sentence's own worked example misfire, since `System.Linq`
is in the implicit set -- an agent told to add `using System.Linq;` before
`.Select(...)` finds it already in scope.

Reworded so it holds for both: `App.cs` keeps its `using` block and that is
still where you add namespaces, with a note that some templates enable
implicit usings. The "seven-line using block" count in "Starting a new app"
goes with it, for the same reason.

The *Required imports* list is left as-is -- spelling `using System;` out
explicitly is redundant under implicit usings, not wrong.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 784c77a5-bfd2-40f4-96a5-ce447df7c3e2
@azchohfi
Alexandre Zollinger Chohfi (azchohfi) merged commit 0bfae8c into microsoft:main Aug 27, 2026
17 checks passed
@azchohfi
Alexandre Zollinger Chohfi (azchohfi) deleted the azchohfi-reactor-skill-packaging-neutral branch August 27, 2026 06:13
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.

1 participant