Skip to content

winui: window sizing rubric, screenshot validation, anti-self-delegation#84

Merged
nmetulev merged 9 commits into
microsoft:stagingfrom
nmetulev:winui/window-sizing-and-screenshot-validation
May 19, 2026
Merged

winui: window sizing rubric, screenshot validation, anti-self-delegation#84
nmetulev merged 9 commits into
microsoft:stagingfrom
nmetulev:winui/window-sizing-and-screenshot-validation

Conversation

@nmetulev
Copy link
Copy Markdown
Member

Three connected improvements to the WinUI dev skills, motivated by repeated failure modes I hit when building small apps.

1. winui-design — new Step 4: Size the Window to the App

WinUI 3 has no SizeToContent, so a Window that doesn't call AppWindow.Resize defaults to whatever Windows hands it (~1024×768) — which makes utilities and forms feel comically oversized vs. e.g. SwiftUI, which auto-fits.

Adds an 8-step reasoning rubric rather than a fixed lookup table:

  1. Inventory every row of the layout (don't just think about the "main" content)
  2. Estimate width from the widest row, not the average
  3. Sum heights row-by-row, including spacing
  4. Round up to the nearest 20 (rounding down is how content clips)
  5. Sanity-check against scale anchors (utility / form / multi-pane / editor)
  6. Compactness vs. clipping — pick clipping-free every time
  7. Aspect ratio follows the layout (don't default to landscape out of habit)
  8. Validate after running — capture a screenshot and look for clipped labels, cropped hero elements, right-edge truncation, footer overlap, unintended scrollbars; bump 40–80px and rebuild if any appear

Includes a worked example (focus timer → 460×860) and a named anti-pattern (the same app squeezed to 440×720, which clips "Long Break", crops the timer digits, and truncates the toggle label).

DPI-aware AppWindow.Resize snippet stays. Old "Step 4: Design Anti-Patterns" is renumbered to Step 5.

2. winui-ui-testing — new Step 3.5: Look at the Screenshots

Today the skill captures one final screenshot and never tells the agent to look at it. UIA assertions tell you whether an element exists and what its value is — they tell you nothing about how the app actually looks. Clipped labels, overlap, cramped layout, broken theming, off-screen flyouts: UIA happily reports PASS while the app is visually broken.

This change:

  • Adds a mandatory "Look at the Screenshots" step between "Run results" and "Fix and rerun".
  • Tells the agent to capture screenshots at multiple states (initial, post-interaction, per mode), not just at the end.
  • Tells the agent to view each PNG after the run (its view tool returns images as inspectable data).
  • Provides a concrete visual checklist (no truncation, hero elements fully visible, right-edge controls visible, no overlap, theming right, etc.).
  • Cross-references the sizing rubric for the most common fix (window too small → grow AppWindow.Resize).
  • Updates the test-script template to create a screenshots/ directory and capture intermediate states alongside the existing final shot.

3. winui-dev.agent.md — "Do The Work Yourself"

Repeatedly observed: a user explicitly invokes the winui-dev agent, and the agent's first action is to call the task tool to delegate the entire request to a fresh winui-dev sub-agent. This wastes a context window, hides progress from the user, and adds latency.

Adds an explicit prohibition against self-delegation at the top of the agent file, while still permitting narrow helpers (explore for unfamiliar codebases, rubber-duck for plan critique on non-trivial work). Includes a concrete check: "if you catch yourself about to call task with agent_type: winui:winui-dev, stop — you're the one who should be doing it."

Why bundle them

All three came out of the same end-to-end build session (a Pomodoro / focus timer app). Each one fixes a real failure mode I observed:

  • the agent delegated to itself → clutters context, hides progress
  • the resulting app launched at OS default size, then a follow-up landed too cramped → window sizing needs an explicit rubric
  • UIA tests passed while the cramped UI was visibly broken → needs screenshot review

Happy to split into three PRs if preferred.

nmetulev and others added 2 commits May 13, 2026 02:36
Three connected improvements to the WinUI dev skills, motivated by repeated failure modes when building small apps:

1. winui-design SKILL.md - new Step 4 'Size the Window to the App'
   WinUI 3 has no SizeToContent, so apps default to ~1024x768 regardless
   of content - which makes utilities feel oversized. Adds an 8-step
   reasoning rubric (inventory rows, derive widest-row width, sum heights,
   round up, sanity-check ranges, prefer compact-but-not-clipping,
   aspect-ratio follows content, validate after running) and a worked
   example. Old 'Step 4: Design Anti-Patterns' renumbered to Step 5.

2. winui-ui-testing SKILL.md - new Step 3.5 'Look at the Screenshots'
   UIA assertions can't see clipping, overlap, cramped layout, or theming
   bugs. Adds explicit guidance to capture screenshots at multiple states
   (initial, post-interaction, per mode), view them after each run, and
   apply a visual checklist. Test-script template now creates a
   screenshots/ directory and captures intermediate state, not just a
   single final shot.

3. winui-dev.agent.md - 'Do The Work Yourself' section
   Agents kept re-delegating user requests to a fresh winui-dev sub-agent,
   wasting context and hiding progress. Adds an explicit prohibition
   against self-delegation while still permitting narrow helpers (explore
   for unfamiliar codebases, rubber-duck for plan critique).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nmetulev nmetulev marked this pull request as draft May 13, 2026 09:39
@nmetulev

This comment was marked as outdated.

@nmetulev nmetulev changed the base branch from main to staging May 14, 2026 16:15
nmetulev and others added 5 commits May 14, 2026 09:15
…isleading fallback

The DPI-aware snippet in Step 4 had two real correctness issues that surfaced
in PR review and were confirmed by an empirical two-monitor test:

1. PInvoke.User32.GetDpiForWindow is a third-party NuGet not in the default
   WinUI 3 scaffold; agents copying the snippet hit "type or namespace
   PInvoke not found". Replace with a one-line [DllImport("user32.dll")] —
   no NuGet, no CsWin32 source-generator plumbing, works in the constructor.

2. SetTitleBar(AppTitleBar) referenced an XAML element the snippet never
   declares; orthogonal to sizing anyway. Removed.

Also drop the "Simpler fallback if PInvoke.User32 isn't available (ignores
DPI; fine for prototypes)" block — the empirical test showed AppWindow.Resize
takes physical pixels, so Resize(new SizeInt32(460, 860)) on a 1.25-scale
monitor (the default on many Windows laptops) produces only ~368x688 DIPs of
usable space and guarantees the clipping the rubric is designed to prevent.
The "fallback" was actively misleading. Replaced with a one-line "Why this
shape" explaining why XamlRoot.RasterizationScale (the managed WinUI 3 API)
isn't viable here (null in ctor, stale after AppWindow.Move).

Strengthened the "Pattern" header with the concrete failure mode so future
readers see why the DPI math is needed, not just that it's needed.

Also fixes a small bug in winui-dev.agent.md: "rubber-duck" was named as if
it were a real agent_type. Rephrased to "a general-purpose agent for a
rubber-duck critique" so the named agent_type is valid.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ecklist with winui-ui-testing

M2: The focus-timer walkthrough (460 x 860 derivation + 440 x 720 anti-pattern)
moves out of SKILL.md prose and into references/window-sizing-examples.md, with
SKILL.md keeping only a 1-line schematic of the rubric and a pointer to the
reference. Concrete worked numbers stay out of every loaded skill payload but
remain on-demand when an agent wants a full example to anchor against.

M6: Step 4 step 8's bulleted symptom list (5 bullets that were a strict subset
of the 9-item visual checklist in winui-ui-testing Step 3.5) collapses to a
1-paragraph pointer with inline symptom hints. The authoritative checklist
lives in winui-ui-testing, which is the skill that owns 'look at screenshots'.

Net: -11 / +50 (the +50 is the new on-demand reference file, not loaded by
default), with no change in covered guidance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…anti-self-delegation prose

Apply the Team Lead Test more aggressively across all three files.
Cuts redundant enforcement, scenario-specific filler, and restated rubric
positives. Preserves every operational imperative.

winui-dev.agent.md (anti-self-delegation): 11 → 2 lines. The two banned
sub-types collapse into one parenthetical; the scoped-helpers ✅ shrinks to
one clause; the redundant closing 'if you catch yourself' paragraph drops
(the rule above it already says it).

winui-ui-testing/SKILL.md (Step 3.5): 33 → ~16 lines. Drops the duplicate
script example (the State Screenshots block in the script template above
already shows the pattern), the 3-bullet 'what counts as a state' list
(one sentence covers it), and the 'How to view' paragraph (tool-agnostic:
the agent picks its own view tool). Visual checklist trimmed from 9 → 9
items but with one merged pair (right-edge + overlap kept as separate
bullets after all) and one new item added: 'Content uses the available
width — no asymmetric dead zones' covers the bug where content gets
pinned to one edge with empty space on the other.

winui-design/SKILL.md (Step 4): 76 → ~30 lines. The 8-step rubric collapses
to one paragraph + a sanity-check list — the formula Sigma(row heights)
forces enumeration without needing a dedicated 'inventory' step, 'widest
row' encodes max-not-average, and 'round up' speaks for itself. Drops the
aspect-ratio step (tall→portrait is obvious), the 'compactness vs clipping'
step (subsumed by 'round up — clipped is worse'), and the 6-bullet
Anti-patterns section (5 of 6 restated the rubric's positives; the one
novel trap — Width on root Grid clips, not sizes — folds into a one-line
note after the snippet). The 3-line 'Pattern — apply the size you derived'
intro collapses to one line. Snippet using-statement comments removed.
Closing line goes tool-agnostic: 'Validate visually after build via
winui-ui-testing Step 3.5' (no longer says 'capture a screenshot' — that's
a layering violation, design owns the rubric, testing owns the validation
mechanism). 'Iterate the size or layout' covers both grow-the-window and
fix-asymmetric-padding failure modes.

Net for default-loaded payloads: -58 lines on top of the previous M2+M6
commit, total PR addition shrinks from +176 to +88 lines (-50%).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…validation user-opt-in

The reference file was 47 lines of one focus-timer instantiation of a
2-line formula. An LLM agent given the formula can derive any layout
without seeing a worked example first — 'see one, do one' is human
pedagogy, not LLM pedagogy. A single example also risks anchoring
toward focus-timer-shaped solutions.

Drop the file, drop the references-table row, drop the trailing 'See
references/...' sentence in Step 4. The rubric stands on its own.

Also reframe the Step 4 closing line: instead of prescribing
'validate visually after build' (which would auto-trigger the
ui-testing pipeline — spawn the app, capture UIA, take screenshots,
run the checklist), make it user-opt-in: 'If the user asks for UI
validation, see winui-ui-testing Step 3.5'. This matches the policy
already stated in winui-dev.agent.md that the user might ask for
ui-testing 'if desired only'. The ui-testing skill is expensive to
run; it shouldn't be the default follow-up to every window-sizing
exercise.

Net: -49 lines of repo (47 file + 2 default-loaded payload), no loss
of operational guidance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nmetulev nmetulev marked this pull request as ready for review May 19, 2026 23:11
@nmetulev nmetulev merged commit 44a15e4 into microsoft:staging May 19, 2026
12 checks passed
This was referenced May 20, 2026
nmetulev added a commit that referenced this pull request May 20, 2026
* run pr-validation on staging prs

* winui-search: batched CLI, background refresh, ranking + Gallery/Toolkit fetch upgrades (#83)

* winui-search: batched CLI, background refresh, ranking + Gallery/Toolkit fetch upgrades

* fix comments

* fix time

* fix comments

* change verions back

* fix local pr review

---------

Co-authored-by: Nikola Metulev <nmetulev@users.noreply.github.com>

* deps: Bump coverlet.collector from 10.0.0 to 10.0.1 (#87)

---
updated-dependencies:
- dependency-name: coverlet.collector
  dependency-version: 10.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nikola Metulev <nmetulev@users.noreply.github.com>

* winui: window sizing rubric, screenshot validation, anti-self-delegation (#84)

* winui: window sizing rubric, screenshot validation, anti-self-delegation

Three connected improvements to the WinUI dev skills, motivated by repeated failure modes when building small apps:

1. winui-design SKILL.md - new Step 4 'Size the Window to the App'
   WinUI 3 has no SizeToContent, so apps default to ~1024x768 regardless
   of content - which makes utilities feel oversized. Adds an 8-step
   reasoning rubric (inventory rows, derive widest-row width, sum heights,
   round up, sanity-check ranges, prefer compact-but-not-clipping,
   aspect-ratio follows content, validate after running) and a worked
   example. Old 'Step 4: Design Anti-Patterns' renumbered to Step 5.

2. winui-ui-testing SKILL.md - new Step 3.5 'Look at the Screenshots'
   UIA assertions can't see clipping, overlap, cramped layout, or theming
   bugs. Adds explicit guidance to capture screenshots at multiple states
   (initial, post-interaction, per mode), view them after each run, and
   apply a visual checklist. Test-script template now creates a
   screenshots/ directory and captures intermediate state, not just a
   single final shot.

3. winui-dev.agent.md - 'Do The Work Yourself' section
   Agents kept re-delegating user requests to a fresh winui-dev sub-agent,
   wasting context and hiding progress. Adds an explicit prohibition
   against self-delegation while still permitting narrow helpers (explore
   for unfamiliar codebases, rubber-duck for plan critique).

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

* winui-design: replace PInvoke.User32 with framework DllImport; drop misleading fallback

The DPI-aware snippet in Step 4 had two real correctness issues that surfaced
in PR review and were confirmed by an empirical two-monitor test:

1. PInvoke.User32.GetDpiForWindow is a third-party NuGet not in the default
   WinUI 3 scaffold; agents copying the snippet hit "type or namespace
   PInvoke not found". Replace with a one-line [DllImport("user32.dll")] —
   no NuGet, no CsWin32 source-generator plumbing, works in the constructor.

2. SetTitleBar(AppTitleBar) referenced an XAML element the snippet never
   declares; orthogonal to sizing anyway. Removed.

Also drop the "Simpler fallback if PInvoke.User32 isn't available (ignores
DPI; fine for prototypes)" block — the empirical test showed AppWindow.Resize
takes physical pixels, so Resize(new SizeInt32(460, 860)) on a 1.25-scale
monitor (the default on many Windows laptops) produces only ~368x688 DIPs of
usable space and guarantees the clipping the rubric is designed to prevent.
The "fallback" was actively misleading. Replaced with a one-line "Why this
shape" explaining why XamlRoot.RasterizationScale (the managed WinUI 3 API)
isn't viable here (null in ctor, stale after AppWindow.Move).

Strengthened the "Pattern" header with the concrete failure mode so future
readers see why the DPI math is needed, not just that it's needed.

Also fixes a small bug in winui-dev.agent.md: "rubber-duck" was named as if
it were a real agent_type. Rephrased to "a general-purpose agent for a
rubber-duck critique" so the named agent_type is valid.

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

* winui-design: extract worked example to references/, dedupe visual checklist with winui-ui-testing

M2: The focus-timer walkthrough (460 x 860 derivation + 440 x 720 anti-pattern)
moves out of SKILL.md prose and into references/window-sizing-examples.md, with
SKILL.md keeping only a 1-line schematic of the rubric and a pointer to the
reference. Concrete worked numbers stay out of every loaded skill payload but
remain on-demand when an agent wants a full example to anchor against.

M6: Step 4 step 8's bulleted symptom list (5 bullets that were a strict subset
of the 9-item visual checklist in winui-ui-testing Step 3.5) collapses to a
1-paragraph pointer with inline symptom hints. The authoritative checklist
lives in winui-ui-testing, which is the skill that owns 'look at screenshots'.

Net: -11 / +50 (the +50 is the new on-demand reference file, not loaded by
default), with no change in covered guidance.

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

* winui: ultra-lean rewrite of window-sizing + screenshot-validation + anti-self-delegation prose

Apply the Team Lead Test more aggressively across all three files.
Cuts redundant enforcement, scenario-specific filler, and restated rubric
positives. Preserves every operational imperative.

winui-dev.agent.md (anti-self-delegation): 11 → 2 lines. The two banned
sub-types collapse into one parenthetical; the scoped-helpers ✅ shrinks to
one clause; the redundant closing 'if you catch yourself' paragraph drops
(the rule above it already says it).

winui-ui-testing/SKILL.md (Step 3.5): 33 → ~16 lines. Drops the duplicate
script example (the State Screenshots block in the script template above
already shows the pattern), the 3-bullet 'what counts as a state' list
(one sentence covers it), and the 'How to view' paragraph (tool-agnostic:
the agent picks its own view tool). Visual checklist trimmed from 9 → 9
items but with one merged pair (right-edge + overlap kept as separate
bullets after all) and one new item added: 'Content uses the available
width — no asymmetric dead zones' covers the bug where content gets
pinned to one edge with empty space on the other.

winui-design/SKILL.md (Step 4): 76 → ~30 lines. The 8-step rubric collapses
to one paragraph + a sanity-check list — the formula Sigma(row heights)
forces enumeration without needing a dedicated 'inventory' step, 'widest
row' encodes max-not-average, and 'round up' speaks for itself. Drops the
aspect-ratio step (tall→portrait is obvious), the 'compactness vs clipping'
step (subsumed by 'round up — clipped is worse'), and the 6-bullet
Anti-patterns section (5 of 6 restated the rubric's positives; the one
novel trap — Width on root Grid clips, not sizes — folds into a one-line
note after the snippet). The 3-line 'Pattern — apply the size you derived'
intro collapses to one line. Snippet using-statement comments removed.
Closing line goes tool-agnostic: 'Validate visually after build via
winui-ui-testing Step 3.5' (no longer says 'capture a screenshot' — that's
a layering violation, design owns the rubric, testing owns the validation
mechanism). 'Iterate the size or layout' covers both grow-the-window and
fix-asymmetric-padding failure modes.

Net for default-loaded payloads: -58 lines on top of the previous M2+M6
commit, total PR addition shrinks from +176 to +88 lines (-50%).

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

* winui-design: drop window-sizing-examples reference, make ui-testing validation user-opt-in

The reference file was 47 lines of one focus-timer instantiation of a
2-line formula. An LLM agent given the formula can derive any layout
without seeing a worked example first — 'see one, do one' is human
pedagogy, not LLM pedagogy. A single example also risks anchoring
toward focus-timer-shaped solutions.

Drop the file, drop the references-table row, drop the trailing 'See
references/...' sentence in Step 4. The rubric stands on its own.

Also reframe the Step 4 closing line: instead of prescribing
'validate visually after build' (which would auto-trigger the
ui-testing pipeline — spawn the app, capture UIA, take screenshots,
run the checklist), make it user-opt-in: 'If the user asks for UI
validation, see winui-ui-testing Step 3.5'. This matches the policy
already stated in winui-dev.agent.md that the user might ask for
ui-testing 'if desired only'. The ui-testing skill is expensive to
run; it shouldn't be the default follow-up to every window-sizing
exercise.

Net: -49 lines of repo (47 file + 2 default-loaded payload), no loss
of operational guidance.

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

---------

Co-authored-by: Nikola Metulev <711864+nmetulev@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Release 0.3.1

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Nikola Metulev <711864+nmetulev@users.noreply.github.com>
Co-authored-by: leileizhang <leilzh@microsoft.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nmetulev added a commit that referenced this pull request May 20, 2026
* Release 0.3.1 (#90)

* run pr-validation on staging prs

* winui-search: batched CLI, background refresh, ranking + Gallery/Toolkit fetch upgrades (#83)

* winui-search: batched CLI, background refresh, ranking + Gallery/Toolkit fetch upgrades

* fix comments

* fix time

* fix comments

* change verions back

* fix local pr review

---------

Co-authored-by: Nikola Metulev <nmetulev@users.noreply.github.com>

* deps: Bump coverlet.collector from 10.0.0 to 10.0.1 (#87)

---
updated-dependencies:
- dependency-name: coverlet.collector
  dependency-version: 10.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nikola Metulev <nmetulev@users.noreply.github.com>

* winui: window sizing rubric, screenshot validation, anti-self-delegation (#84)

* winui: window sizing rubric, screenshot validation, anti-self-delegation

Three connected improvements to the WinUI dev skills, motivated by repeated failure modes when building small apps:

1. winui-design SKILL.md - new Step 4 'Size the Window to the App'
   WinUI 3 has no SizeToContent, so apps default to ~1024x768 regardless
   of content - which makes utilities feel oversized. Adds an 8-step
   reasoning rubric (inventory rows, derive widest-row width, sum heights,
   round up, sanity-check ranges, prefer compact-but-not-clipping,
   aspect-ratio follows content, validate after running) and a worked
   example. Old 'Step 4: Design Anti-Patterns' renumbered to Step 5.

2. winui-ui-testing SKILL.md - new Step 3.5 'Look at the Screenshots'
   UIA assertions can't see clipping, overlap, cramped layout, or theming
   bugs. Adds explicit guidance to capture screenshots at multiple states
   (initial, post-interaction, per mode), view them after each run, and
   apply a visual checklist. Test-script template now creates a
   screenshots/ directory and captures intermediate state, not just a
   single final shot.

3. winui-dev.agent.md - 'Do The Work Yourself' section
   Agents kept re-delegating user requests to a fresh winui-dev sub-agent,
   wasting context and hiding progress. Adds an explicit prohibition
   against self-delegation while still permitting narrow helpers (explore
   for unfamiliar codebases, rubber-duck for plan critique).

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

* winui-design: replace PInvoke.User32 with framework DllImport; drop misleading fallback

The DPI-aware snippet in Step 4 had two real correctness issues that surfaced
in PR review and were confirmed by an empirical two-monitor test:

1. PInvoke.User32.GetDpiForWindow is a third-party NuGet not in the default
   WinUI 3 scaffold; agents copying the snippet hit "type or namespace
   PInvoke not found". Replace with a one-line [DllImport("user32.dll")] —
   no NuGet, no CsWin32 source-generator plumbing, works in the constructor.

2. SetTitleBar(AppTitleBar) referenced an XAML element the snippet never
   declares; orthogonal to sizing anyway. Removed.

Also drop the "Simpler fallback if PInvoke.User32 isn't available (ignores
DPI; fine for prototypes)" block — the empirical test showed AppWindow.Resize
takes physical pixels, so Resize(new SizeInt32(460, 860)) on a 1.25-scale
monitor (the default on many Windows laptops) produces only ~368x688 DIPs of
usable space and guarantees the clipping the rubric is designed to prevent.
The "fallback" was actively misleading. Replaced with a one-line "Why this
shape" explaining why XamlRoot.RasterizationScale (the managed WinUI 3 API)
isn't viable here (null in ctor, stale after AppWindow.Move).

Strengthened the "Pattern" header with the concrete failure mode so future
readers see why the DPI math is needed, not just that it's needed.

Also fixes a small bug in winui-dev.agent.md: "rubber-duck" was named as if
it were a real agent_type. Rephrased to "a general-purpose agent for a
rubber-duck critique" so the named agent_type is valid.

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

* winui-design: extract worked example to references/, dedupe visual checklist with winui-ui-testing

M2: The focus-timer walkthrough (460 x 860 derivation + 440 x 720 anti-pattern)
moves out of SKILL.md prose and into references/window-sizing-examples.md, with
SKILL.md keeping only a 1-line schematic of the rubric and a pointer to the
reference. Concrete worked numbers stay out of every loaded skill payload but
remain on-demand when an agent wants a full example to anchor against.

M6: Step 4 step 8's bulleted symptom list (5 bullets that were a strict subset
of the 9-item visual checklist in winui-ui-testing Step 3.5) collapses to a
1-paragraph pointer with inline symptom hints. The authoritative checklist
lives in winui-ui-testing, which is the skill that owns 'look at screenshots'.

Net: -11 / +50 (the +50 is the new on-demand reference file, not loaded by
default), with no change in covered guidance.

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

* winui: ultra-lean rewrite of window-sizing + screenshot-validation + anti-self-delegation prose

Apply the Team Lead Test more aggressively across all three files.
Cuts redundant enforcement, scenario-specific filler, and restated rubric
positives. Preserves every operational imperative.

winui-dev.agent.md (anti-self-delegation): 11 → 2 lines. The two banned
sub-types collapse into one parenthetical; the scoped-helpers ✅ shrinks to
one clause; the redundant closing 'if you catch yourself' paragraph drops
(the rule above it already says it).

winui-ui-testing/SKILL.md (Step 3.5): 33 → ~16 lines. Drops the duplicate
script example (the State Screenshots block in the script template above
already shows the pattern), the 3-bullet 'what counts as a state' list
(one sentence covers it), and the 'How to view' paragraph (tool-agnostic:
the agent picks its own view tool). Visual checklist trimmed from 9 → 9
items but with one merged pair (right-edge + overlap kept as separate
bullets after all) and one new item added: 'Content uses the available
width — no asymmetric dead zones' covers the bug where content gets
pinned to one edge with empty space on the other.

winui-design/SKILL.md (Step 4): 76 → ~30 lines. The 8-step rubric collapses
to one paragraph + a sanity-check list — the formula Sigma(row heights)
forces enumeration without needing a dedicated 'inventory' step, 'widest
row' encodes max-not-average, and 'round up' speaks for itself. Drops the
aspect-ratio step (tall→portrait is obvious), the 'compactness vs clipping'
step (subsumed by 'round up — clipped is worse'), and the 6-bullet
Anti-patterns section (5 of 6 restated the rubric's positives; the one
novel trap — Width on root Grid clips, not sizes — folds into a one-line
note after the snippet). The 3-line 'Pattern — apply the size you derived'
intro collapses to one line. Snippet using-statement comments removed.
Closing line goes tool-agnostic: 'Validate visually after build via
winui-ui-testing Step 3.5' (no longer says 'capture a screenshot' — that's
a layering violation, design owns the rubric, testing owns the validation
mechanism). 'Iterate the size or layout' covers both grow-the-window and
fix-asymmetric-padding failure modes.

Net for default-loaded payloads: -58 lines on top of the previous M2+M6
commit, total PR addition shrinks from +176 to +88 lines (-50%).

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

* winui-design: drop window-sizing-examples reference, make ui-testing validation user-opt-in

The reference file was 47 lines of one focus-timer instantiation of a
2-line formula. An LLM agent given the formula can derive any layout
without seeing a worked example first — 'see one, do one' is human
pedagogy, not LLM pedagogy. A single example also risks anchoring
toward focus-timer-shaped solutions.

Drop the file, drop the references-table row, drop the trailing 'See
references/...' sentence in Step 4. The rubric stands on its own.

Also reframe the Step 4 closing line: instead of prescribing
'validate visually after build' (which would auto-trigger the
ui-testing pipeline — spawn the app, capture UIA, take screenshots,
run the checklist), make it user-opt-in: 'If the user asks for UI
validation, see winui-ui-testing Step 3.5'. This matches the policy
already stated in winui-dev.agent.md that the user might ask for
ui-testing 'if desired only'. The ui-testing skill is expensive to
run; it shouldn't be the default follow-up to every window-sizing
exercise.

Net: -49 lines of repo (47 file + 2 default-loaded payload), no loss
of operational guidance.

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

---------

Co-authored-by: Nikola Metulev <711864+nmetulev@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Release 0.3.1

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Nikola Metulev <711864+nmetulev@users.noreply.github.com>
Co-authored-by: leileizhang <leilzh@microsoft.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* release: introduce backmerge/* convention and fix CI for back-merge PRs

- version-sync skips backmerge/* (legitimately carries main's version-bump
  commit forward into staging).
- staging-up-to-date now checks PR head contains every commit on main, not
  current staging — strictly stronger, and passes naturally for backmerge PRs
  (the chicken-and-egg before required staging to already contain main before
  the very PR that would bring it there could merge).
- Document backmerge/* branch convention in CONTRIBUTING.md and RELEASING.md.
- Update hotfix back-merge reminder issue body to use the new convention.

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

* ci: force re-run on backmerge/0.3.1 (stale check from pre-rename)

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Nikola Metulev <711864+nmetulev@users.noreply.github.com>
Co-authored-by: leileizhang <leilzh@microsoft.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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