Skip to content

Trimming design skill#96

Merged
nmetulev merged 13 commits into
stagingfrom
nm/cleanup-design-skill
May 27, 2026
Merged

Trimming design skill#96
nmetulev merged 13 commits into
stagingfrom
nm/cleanup-design-skill

Conversation

@nmetulev

Copy link
Copy Markdown
Member

No description provided.

nmetulev and others added 11 commits May 22, 2026 16:28
…tion

Rebuilt the skill from scratch using only public Microsoft Learn design
docs (learn.microsoft.com/en-us/windows/apps/design/) and the WinUI
Gallery (github.com/microsoft/WinUI-Gallery). Independent fresh-design
experiment confirmed both topic coverage and content density.

Structure (29 KB total, down from 73 KB):
- SKILL.md                              (always loaded)
- references/control-selection.md       (control/pattern picking)
- references/theme-accessibility.md     (brushes, theme dicts, HC, a11y)
- references/layout-review.md           (page design, responsive, typography)
- references/sources.md                 (public source URLs)

Inline runnable samples are deferred to winui-search.exe (already shipped
with the skill); exhaustive brush catalogues are deferred to Microsoft
Learn. Unique high-signal items preserved:
- WinUI 3 window-sizing rubric + GetDpiForWindow DllImport
- TextBox x:Bind TwoWay + UpdateSourceTrigger=PropertyChanged gotcha
- Attached-property C# setter pattern (vs object-initializer trap)
- Acrylic BackgroundSizing + ThemeShadow Translation/padding rules

Verification: line-overlap scan against windows-hivemind/windows-xaml
plugin shows 9 lines of accidental match across all 5 files, all of which
are syntactically-required XAML scaffolding tags and InitializeComponent()
— zero copyrightable content shared.

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

Grafted back from public Microsoft Learn sources after audit identified
high-value losses worth restoring:

SKILL.md:
- App-shape anchors table with Reference-App column (Settings, Terminal,
  File Explorer, Dev Home, Calculator)
- x:Bind static-method pattern for bool->Visibility, with explicit
  'never use Converter={x:Null}' runtime-crash warning
- Anti-patterns table replaces bullet list (13 rows, contrastive)

New reference:
- references/brushes-and-icons.md (12 KB): brush catalogue + IconElement
  taxonomy, sourced from learn.microsoft.com xaml-theme-resources and
  design/style/icons pages

Total skill now 43.7 KB (vs 51.5 KB original = 15% smaller, vs 29 KB
after the initial trim = + grafted high-value content).

Verified zero prose overlap with windows-xaml plugin via 8-gram shingle
scan (only shared content is learn.microsoft.com URL fragments).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
A 5-model review panel (Sonnet 4.6, GPT-5.4, GPT-5.3-Codex, Opus 4.6,
Opus 4.7) unanimously rated the skill USEFUL-BUT-OVERSIZED and asked for
roughly half cut. This commit delivers that, focused on the consensus
findings.

SKILL.md (15.5 -> 10.1 KB):
- Cut typography section, generic a11y checklist, generic MVVM bullets,
  control-choice bias table, review-output-format ceremony, and fast-
  triage table — all duplicated training data or process-theater
- Added: sidebar XAML skeleton (NavigationView + SettingsCard +
  ScrollViewer), Mica/SystemBackdrop wiring with the don't-paint-root
  trap, CommunityToolkit.WinUI.Controls.SettingsControls package note,
  PaneDisplayMode enumeration — all were gaps the panel flagged
- Promoted the high-signal landmines (x:Bind OneTime default, TextBox
  UpdateSourceTrigger, attached-property setters, Converter={x:Null},
  acrylic+ThemeShadow) into a dedicated 'XAML landmines' section

references/control-selection.md: DELETED (~90% duplicated SKILL.md;
unique custom-UI gate merged into anti-patterns)

references/sources.md: DELETED (bibliography agents can't click;
citations live inline in brushes-and-icons.md)

references/layout-review.md (4 -> 2.5 KB): kept page-planning template,
responsive-techniques table, state-coverage checklist, sidebar sizing
heuristics; cut typography (model knows the type ramp), spacing
duplication, navigation review, XAML binding duplication

references/theme-accessibility.md (6.2 -> 3.1 KB): lead with deep
ThemeDictionary patterns (ResourceKey redirect, runtime theme switching,
BasedOn discipline); generic a11y/keyboard/media checklists removed
(now in training)

references/brushes-and-icons.md: trimmed the Smoke section (one brush,
ContentDialog applies it automatically)

Verified zero prose overlap with the windows-xaml plugin via 8-gram
shingle scan (only shared content is XAML scaffolding tokens and
learn.microsoft.com URL fragments).

Independent verification (Opus 4.7, blind to panel recs): verdict USEFUL,
trim successful, sidebar skeleton + SettingsCard package note + Mica
wiring + window-sizing DPI code each materially change generated output.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Feedback from real usage: agent-generated WinUI apps all look 'samey' —
same NavigationView Left + system grey Mica + default accent + grey
cards, regardless of app purpose. Diagnosed as ~60% skill bias (anchors
exclusively to Microsoft first-party apps, bans the moves that create
identity) and ~40% platform (Fluent is consistency by design).

Minimal middle-ground intervention, ~800 bytes:

1. Anchors table: added one row (media/canvas/hero — no NavView) and
   non-Microsoft reference apps in every row (Slack, VS Code, Outlook,
   GitHub Desktop, Spotify, Clipchamp). Three of six rows still anchor
   on NavigationView — this isn't anti-NavView, just not exclusively.

2. New short section 'Before reaching for defaults — one identity beat':
   forces ONE backdrop+accent decision before coding. Names overriding
   SystemAccentColor and tinted DesktopAcrylicBackdrop as on-pattern
   (Microsoft's own apps do this). Explicit permission to skip for
   utilities so we don't over-engineer brand identity for a calculator.

3. Anti-patterns table: replaced first two rows with two new ones that
   bless silhouette variety and brand customisation. Doesn't add new
   rows, doesn't remove the substantive bans below.

No new files, no new references, no worked code (agent knows syntax
once told the pattern is on-pattern — the unlock is permission).

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

SKILL.md contradicted itself: a whole section tells the agent to
front-load winui-search.exe lookups *before* writing XAML, then handed
them a baked-in NavigationView + SettingsCard skeleton that pre-empted
the search. That skeleton was the proximate cause of the 'every app
looks like Settings' feedback — it's always-loaded into context.

Verified the tool returns rich samples for both ('gallery-navigationview-1'
for the shell + 'toolkit-settingsexpander-*' for the cards), so the
skeleton is fully redundant.

Skill teaches decisions; tool provides samples. Restore that boundary.

PaneDisplayMode guidance dropped with the snippet — also redundant with
gallery-navigationview-1's full sample which shows all four modes.

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

Full audit of remaining over-specific examples after the sidebar-skeleton
removal. Seven biasing items found, six fixed (one was acceptable API
description in brushes-and-icons.md and was left alone).

SKILL.md:
- Mica wiring section: dropped 'MicaBackdrop { Kind = Base }' headline code
  (it's the default — showing it as 'the example' undoes the identity beat
  two paragraphs up). Replaced with a 3-option bullet list matching the
  identity-beat choices: Mica, tinted Acrylic, no backdrop.
- Window-sizing DPI snippet: replaced literal '460 * scale, 860 * scale'
  (a portrait sidebar-shaped utility window) with widthDip/heightDip
  placeholders so the agent derives values from the rubric.
- Anti-pattern 'Centered floating card on empty background': re-scoped
  to the actual bug (tiny island on oversized window). The previous
  framing banned hero/welcome/empty-state surfaces, which are legitimate.
- Anti-pattern '50/50 split → fixed sidebar 280-360 px': removed the
  Shell-prescriptive correction. Now reads 'stable size for structural
  pane, flexible for content — only if a structural pane is part of the
  silhouette at all'.

references/layout-review.md:
- Page-planning silhouette list: aligned with SKILL.md anchors table
  (added canvas-hero, dense-grid; removed redundant 'tabs', 'menu+command').
- DELETED 'Sidebar / content sizing rules of thumb' section entirely.
  It was Shell-specific (OpenPaneLength, settings cards, 'matches Windows
  Settings') sitting in a generic responsive-review reference. Same kind
  of bias as the deleted sidebar skeleton; winui-search owns those values.

references/theme-accessibility.md:
- ThemeDictionary example renamed 'CardBackgroundBrush' to 'AppSurfaceBrush'
  so the example doesn't quietly assume cards are the surface vocabulary.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Validated all 5 landmines against authoritative sources (Microsoft Learn, the in-repo WinUI analyzer's own RULES.md, and a built-and-run WinUI 3 test app). Four needed corrections:

* TextBox UpdateSourceTrigger: dropped the 'silently breaks UI Automation set-value' framing. WinUI 3 TextBox does not implement IValueProvider (uses ITextProvider2). Replaced with the real concern: VM is stale until LostFocus, breaking UIA keyboard-simulation tests (WinAppDriver SendKeys, etc.).

* Attached-property initializer: changed 'compiles, does nothing' to the truth — does not compile (CS0117). 'Button' has no 'AutomationProperties' instance member; it's a static accessor class. This matches the in-repo WUI2030 analyzer rule, which already says 'Doesn't compile' — SKILL.md was internally inconsistent.

* Converter={x:Null}: clarified this hits {x:Bind} specifically (compiles, then LookupConverter(\\\) returns null, NullReferenceException at activation). Added the actual error string from WUI2012 so agents can recognize it in crash logs.

* Acrylic + ThemeShadow: BackgroundSizing=InnerBorderEdge IS the default — old text implied you had to add it. Translation=0,0,32 is the recommended popup elevation, not a hard requirement (tooltips use 16, dialogs use 128). Removed the '>=12 px parent padding' rule — fabricated, not in any MS doc; replaced with the real non-popup gotcha (must populate ThemeShadow.Receivers).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…lay / Input)

Benchmark on this branch showed agents reaching for CommunityToolkit DataGrid for tabular scenarios. Root cause: the clean-room rewrite dropped the three short 'requirement -> platform control' mapping sentences that main branch had, so nothing in SKILL.md was steering agents away from cross-framework instincts (WPF DataGrid, web <select>, HTML date input).

Re-add them as a compact 'Reach-for-this control map' section with a tighter framing line. The tabular bullet now explicitly calls out the anti-pattern by package name (CommunityToolkit.WinUI.Controls.DataGrid) and the concrete reason agents should not reach for it (column bindings can't use x:Bind), and redirects to ListView + Grid-based ItemTemplate + header Grid above. Closes the regression vs main without restoring the full deleted control-selection.md reference.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ive-action rule, search discoverability)

Three surgical additions based on a comparative benchmark run against main:

* Feedback bullet in the Reach-for-this control map (ContentDialog / Flyout / TeachingTip / InfoBar / AppNotification). Mirrors main; addresses ContentDialog and InfoBar regressions observed on this branch where agents were not picking the right feedback surface.

* Anti-patterns row for destructive actions without confirmation. This is a pre-existing gap on BOTH branches — the benchmark's 'delete with confirmation dialog' requirement was failing 4/4 trials on main and nm alike. Net new improvement, not a regression fix.

* One sentence after the winui-search quick-start naming the integration-pattern categories the tool covers (file pickers, Share, JumpList, drag-drop, app lifecycle, dialogs) and stating the don't-interleave rule explicitly. Agents were burning extra tool calls rediscovering scope of the search tool.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Test branch for benchmark experiment: does the 'Before reaching for
defaults' section produce any visible difference in generated app
identity? Compare against nm/cleanup-design-skill (control) and
nm/exp-push-identity (stronger prescription).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nmetulev nmetulev changed the base branch from main to staging May 26, 2026 05:15
Comment thread plugins/winui/skills/winui-design/SKILL.md Outdated
@nmetulev nmetulev merged commit e101d88 into staging May 27, 2026
12 checks passed
@nmetulev nmetulev deleted the nm/cleanup-design-skill branch May 27, 2026 17:24
@nmetulev nmetulev mentioned this pull request Jun 25, 2026
nmetulev added a commit that referenced this pull request Jun 25, 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>

* Back-merge main into staging after 0.3.1 (+ backmerge/* CI fix) (#92)

* 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>

* Trimming design skill (#96)

* winui-design: clean-room rewrite from public sources, ~60% size reduction

Rebuilt the skill from scratch using only public Microsoft Learn design
docs (learn.microsoft.com/en-us/windows/apps/design/) and the WinUI
Gallery (github.com/microsoft/WinUI-Gallery). Independent fresh-design
experiment confirmed both topic coverage and content density.

Structure (29 KB total, down from 73 KB):
- SKILL.md                              (always loaded)
- references/control-selection.md       (control/pattern picking)
- references/theme-accessibility.md     (brushes, theme dicts, HC, a11y)
- references/layout-review.md           (page design, responsive, typography)
- references/sources.md                 (public source URLs)

Inline runnable samples are deferred to winui-search.exe (already shipped
with the skill); exhaustive brush catalogues are deferred to Microsoft
Learn. Unique high-signal items preserved:
- WinUI 3 window-sizing rubric + GetDpiForWindow DllImport
- TextBox x:Bind TwoWay + UpdateSourceTrigger=PropertyChanged gotcha
- Attached-property C# setter pattern (vs object-initializer trap)
- Acrylic BackgroundSizing + ThemeShadow Translation/padding rules

Verification: line-overlap scan against windows-hivemind/windows-xaml
plugin shows 9 lines of accidental match across all 5 files, all of which
are syntactically-required XAML scaffolding tags and InitializeComponent()
— zero copyrightable content shared.

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

* winui-design: re-graft 3 SKILL.md items + add brushes-and-icons reference

Grafted back from public Microsoft Learn sources after audit identified
high-value losses worth restoring:

SKILL.md:
- App-shape anchors table with Reference-App column (Settings, Terminal,
  File Explorer, Dev Home, Calculator)
- x:Bind static-method pattern for bool->Visibility, with explicit
  'never use Converter={x:Null}' runtime-crash warning
- Anti-patterns table replaces bullet list (13 rows, contrastive)

New reference:
- references/brushes-and-icons.md (12 KB): brush catalogue + IconElement
  taxonomy, sourced from learn.microsoft.com xaml-theme-resources and
  design/style/icons pages

Total skill now 43.7 KB (vs 51.5 KB original = 15% smaller, vs 29 KB
after the initial trim = + grafted high-value content).

Verified zero prose overlap with windows-xaml plugin via 8-gram shingle
scan (only shared content is learn.microsoft.com URL fragments).

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

* winui-design: trim skill ~36% after 5-model review panel

A 5-model review panel (Sonnet 4.6, GPT-5.4, GPT-5.3-Codex, Opus 4.6,
Opus 4.7) unanimously rated the skill USEFUL-BUT-OVERSIZED and asked for
roughly half cut. This commit delivers that, focused on the consensus
findings.

SKILL.md (15.5 -> 10.1 KB):
- Cut typography section, generic a11y checklist, generic MVVM bullets,
  control-choice bias table, review-output-format ceremony, and fast-
  triage table — all duplicated training data or process-theater
- Added: sidebar XAML skeleton (NavigationView + SettingsCard +
  ScrollViewer), Mica/SystemBackdrop wiring with the don't-paint-root
  trap, CommunityToolkit.WinUI.Controls.SettingsControls package note,
  PaneDisplayMode enumeration — all were gaps the panel flagged
- Promoted the high-signal landmines (x:Bind OneTime default, TextBox
  UpdateSourceTrigger, attached-property setters, Converter={x:Null},
  acrylic+ThemeShadow) into a dedicated 'XAML landmines' section

references/control-selection.md: DELETED (~90% duplicated SKILL.md;
unique custom-UI gate merged into anti-patterns)

references/sources.md: DELETED (bibliography agents can't click;
citations live inline in brushes-and-icons.md)

references/layout-review.md (4 -> 2.5 KB): kept page-planning template,
responsive-techniques table, state-coverage checklist, sidebar sizing
heuristics; cut typography (model knows the type ramp), spacing
duplication, navigation review, XAML binding duplication

references/theme-accessibility.md (6.2 -> 3.1 KB): lead with deep
ThemeDictionary patterns (ResourceKey redirect, runtime theme switching,
BasedOn discipline); generic a11y/keyboard/media checklists removed
(now in training)

references/brushes-and-icons.md: trimmed the Smoke section (one brush,
ContentDialog applies it automatically)

Verified zero prose overlap with the windows-xaml plugin via 8-gram
shingle scan (only shared content is XAML scaffolding tokens and
learn.microsoft.com URL fragments).

Independent verification (Opus 4.7, blind to panel recs): verdict USEFUL,
trim successful, sidebar skeleton + SettingsCard package note + Mica
wiring + window-sizing DPI code each materially change generated output.

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

* winui-design: add identity-beat nudge to break NavView-grey-cards reflex

Feedback from real usage: agent-generated WinUI apps all look 'samey' —
same NavigationView Left + system grey Mica + default accent + grey
cards, regardless of app purpose. Diagnosed as ~60% skill bias (anchors
exclusively to Microsoft first-party apps, bans the moves that create
identity) and ~40% platform (Fluent is consistency by design).

Minimal middle-ground intervention, ~800 bytes:

1. Anchors table: added one row (media/canvas/hero — no NavView) and
   non-Microsoft reference apps in every row (Slack, VS Code, Outlook,
   GitHub Desktop, Spotify, Clipchamp). Three of six rows still anchor
   on NavigationView — this isn't anti-NavView, just not exclusively.

2. New short section 'Before reaching for defaults — one identity beat':
   forces ONE backdrop+accent decision before coding. Names overriding
   SystemAccentColor and tinted DesktopAcrylicBackdrop as on-pattern
   (Microsoft's own apps do this). Explicit permission to skip for
   utilities so we don't over-engineer brand identity for a calculator.

3. Anti-patterns table: replaced first two rows with two new ones that
   bless silhouette variety and brand customisation. Doesn't add new
   rows, doesn't remove the substantive bans below.

No new files, no new references, no worked code (agent knows syntax
once told the pattern is on-pattern — the unlock is permission).

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

* winui-design: drop baked-in sidebar skeleton — winui-search owns examples

SKILL.md contradicted itself: a whole section tells the agent to
front-load winui-search.exe lookups *before* writing XAML, then handed
them a baked-in NavigationView + SettingsCard skeleton that pre-empted
the search. That skeleton was the proximate cause of the 'every app
looks like Settings' feedback — it's always-loaded into context.

Verified the tool returns rich samples for both ('gallery-navigationview-1'
for the shell + 'toolkit-settingsexpander-*' for the cards), so the
skeleton is fully redundant.

Skill teaches decisions; tool provides samples. Restore that boundary.

PaneDisplayMode guidance dropped with the snippet — also redundant with
gallery-navigationview-1's full sample which shows all four modes.

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

* winui-design: shape-neutral pass — remove silhouette bias from generic guidance

Full audit of remaining over-specific examples after the sidebar-skeleton
removal. Seven biasing items found, six fixed (one was acceptable API
description in brushes-and-icons.md and was left alone).

SKILL.md:
- Mica wiring section: dropped 'MicaBackdrop { Kind = Base }' headline code
  (it's the default — showing it as 'the example' undoes the identity beat
  two paragraphs up). Replaced with a 3-option bullet list matching the
  identity-beat choices: Mica, tinted Acrylic, no backdrop.
- Window-sizing DPI snippet: replaced literal '460 * scale, 860 * scale'
  (a portrait sidebar-shaped utility window) with widthDip/heightDip
  placeholders so the agent derives values from the rubric.
- Anti-pattern 'Centered floating card on empty background': re-scoped
  to the actual bug (tiny island on oversized window). The previous
  framing banned hero/welcome/empty-state surfaces, which are legitimate.
- Anti-pattern '50/50 split → fixed sidebar 280-360 px': removed the
  Shell-prescriptive correction. Now reads 'stable size for structural
  pane, flexible for content — only if a structural pane is part of the
  silhouette at all'.

references/layout-review.md:
- Page-planning silhouette list: aligned with SKILL.md anchors table
  (added canvas-hero, dense-grid; removed redundant 'tabs', 'menu+command').
- DELETED 'Sidebar / content sizing rules of thumb' section entirely.
  It was Shell-specific (OpenPaneLength, settings cards, 'matches Windows
  Settings') sitting in a generic responsive-review reference. Same kind
  of bias as the deleted sidebar skeleton; winui-search owns those values.

references/theme-accessibility.md:
- ThemeDictionary example renamed 'CardBackgroundBrush' to 'AppSurfaceBrush'
  so the example doesn't quietly assume cards are the surface vocabulary.

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

* winui-design: correct XAML landmines section against analyzer + MS Learn

Validated all 5 landmines against authoritative sources (Microsoft Learn, the in-repo WinUI analyzer's own RULES.md, and a built-and-run WinUI 3 test app). Four needed corrections:

* TextBox UpdateSourceTrigger: dropped the 'silently breaks UI Automation set-value' framing. WinUI 3 TextBox does not implement IValueProvider (uses ITextProvider2). Replaced with the real concern: VM is stale until LostFocus, breaking UIA keyboard-simulation tests (WinAppDriver SendKeys, etc.).

* Attached-property initializer: changed 'compiles, does nothing' to the truth — does not compile (CS0117). 'Button' has no 'AutomationProperties' instance member; it's a static accessor class. This matches the in-repo WUI2030 analyzer rule, which already says 'Doesn't compile' — SKILL.md was internally inconsistent.

* Converter={x:Null}: clarified this hits {x:Bind} specifically (compiles, then LookupConverter(\\\) returns null, NullReferenceException at activation). Added the actual error string from WUI2012 so agents can recognize it in crash logs.

* Acrylic + ThemeShadow: BackgroundSizing=InnerBorderEdge IS the default — old text implied you had to add it. Translation=0,0,32 is the recommended popup elevation, not a hard requirement (tooltips use 16, dialogs use 128). Removed the '>=12 px parent padding' rule — fabricated, not in any MS doc; replaced with the real non-popup gotcha (must populate ThemeShadow.Receivers).

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

* winui-design: regraft control-mapping bullets (Navigation / Data display / Input)

Benchmark on this branch showed agents reaching for CommunityToolkit DataGrid for tabular scenarios. Root cause: the clean-room rewrite dropped the three short 'requirement -> platform control' mapping sentences that main branch had, so nothing in SKILL.md was steering agents away from cross-framework instincts (WPF DataGrid, web <select>, HTML date input).

Re-add them as a compact 'Reach-for-this control map' section with a tighter framing line. The tabular bullet now explicitly calls out the anti-pattern by package name (CommunityToolkit.WinUI.Controls.DataGrid) and the concrete reason agents should not reach for it (column bindings can't use x:Bind), and redirects to ListView + Grid-based ItemTemplate + header Grid above. Closes the regression vs main without restoring the full deleted control-selection.md reference.

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

* winui-design: close benchmark-identified gaps (Feedback row, destructive-action rule, search discoverability)

Three surgical additions based on a comparative benchmark run against main:

* Feedback bullet in the Reach-for-this control map (ContentDialog / Flyout / TeachingTip / InfoBar / AppNotification). Mirrors main; addresses ContentDialog and InfoBar regressions observed on this branch where agents were not picking the right feedback surface.

* Anti-patterns row for destructive actions without confirmation. This is a pre-existing gap on BOTH branches — the benchmark's 'delete with confirmation dialog' requirement was failing 4/4 trials on main and nm alike. Net new improvement, not a regression fix.

* One sentence after the winui-search quick-start naming the integration-pattern categories the tool covers (file pickers, Share, JumpList, drag-drop, app lifecycle, dialogs) and stating the don't-interleave rule explicitly. Agents were burning extra tool calls rediscovering scope of the search tool.

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

* winui-design: experiment — remove 'identity beat' section

Test branch for benchmark experiment: does the 'Before reaching for
defaults' section produce any visible difference in generated app
identity? Compare against nm/cleanup-design-skill (control) and
nm/exp-push-identity (stronger prescription).

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

* trim

* Apply suggestion from @niels9001

---------

Co-authored-by: Nikola Metulev <711864+nmetulev@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>

* ci(deps): bump actions/checkout from 6 to 7 (#113)

Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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>

* adding .gitattributes (#110)

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

* deps: Bump Microsoft.NET.Test.Sdk from 18.5.1 to 18.6.0 (#106)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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>

* Add native OpenClaw support for the winui plugin (#114)

* Add native OpenClaw plugin support for winui

Adds openclaw.plugin.json, package.json, and a no-op plugin entry point so the winui skills load as a native OpenClaw plugin (format: openclaw). Verified all 8 winui skills load ready with no plugin issues on OpenClaw 2026.6.10. Resolves #107.

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

* docs: document OpenClaw install in README

Adds an OpenClaw install block to the per-host setup options, covering the no-pre-registration marketplace install and a local-clone path, with a note that OpenClaw maps skills (not agents).

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

* docs: add CHANGELOG entry for OpenClaw support

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

---------

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

* Release 0.4.0

* Apply suggestions from code review

Co-authored-by: Nikola Metulev <nmetulev@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>
Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Dinah Xiaoman G <116714259+DinahK-2SO@users.noreply.github.com>
Co-authored-by: Jaylyn Barbee <51131738+Jaylyn-Barbee@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.

2 participants