Skip to content
cccskills
FreePublished on GitHub

wfa-avalonia-ui

Phase D of a WinForms-to-Avalonia migration: build the Avalonia UI shell with composition, MVVM state and commands, responsive XAML, accessibility, localization boundaries, and behavior-focused unit/Headless tests. Use only when an explicit migration is ready to port Forms or when the orchestrator routes here. Prefer this over control-by-control ports.

The English summary is being prepared. Showing the original description.

See how to install

Files included (4)

  • SKILL.md4.4 KB
  • references/control-mapping.md1.2 KB
  • references/modernization.md1.2 KB
  • references/mvvm-patterns.md1.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Phase D — Avalonia UI shell

Present Phase B/C capabilities through a bindable Avalonia shell. Code-behind is limited to control-only gestures and host interaction adapters. Business flow lives in ViewModels/workflows.

Read MVVM patterns for responsibility boundaries, control mapping only while translating legacy interaction semantics, and modernization for the completion checklist.

Preconditions

  • Core APIs and platform abstractions available (fakes OK)
  • Phase A command catalog for the main window

Workflow

1. Host and composition

  • Avalonia App + entry
  • Composition root builds services, ViewModels, main window
  • Constructor injection over new inside Views

2. Commands and state

  • Map the command catalog to ICommand / async commands
  • INotifyPropertyChanged (or small base / toolkit)
  • Eliminate field-by-field Refresh() as the primary sync

3. Layout and accessibility

Derive workflow zones from Phase A contracts. Use responsive panels, stable constraints, and appropriate scrolling; avoid absolute positioning for normal controls. Preserve accessible names, focus order, keyboard navigation, and visible focus.

4. Bindings

  • Use compiled bindings and x:DataType; document any deliberate exception
  • Stable automation ids and accessible names for interaction surfaces

5. Collections and editing, when present

  • Observable item projections when the product displays collections
  • Edits route through application commands and reproject derived state
  • Context actions bind to the same command semantics as other entry points

6. Shortcuts

  • Prefer declared key bindings
  • Do not intercept editing/navigation gestures from the focused control
  • Document intentional gesture changes

7. Secondary surfaces, when present

  • Dedicated View + ViewModel per cohesive surface
  • Window service shows/focuses; does not build large control trees

8. Localization

  • External resources for UI strings
  • Presentation-layer localization manager
  • Core free of UI culture for algorithms

9. State decomposition, when complexity grows

If the main VM bloats early, introduce a typed state aggregate and workflow collaborators only when evidence justifies them; full decomposition patterns are Phase G.

10. Tests

ProjectContent
Avalonia unitVM/commands/services — no Headless attributes
Avalonia Headlessseparate project; behavior-focused UI

Early modernization (do not defer forever)

  1. Composition root
  2. Observable VM; kill pervasive Refresh
  3. Real command surfaces (no hidden shims)
  4. Awaited async commands
  5. Injected boundary adapters discovered in Phase B/C
  6. Secondary surfaces as XAML+VM when present

Corrections seen in practice

  • A state change or option must have the same semantics across every affected view and command.
  • Layout is part of behavior: verify the supported default, wide, narrow, scaling, and localization states.
  • Group controls by product task rather than by implementation type.
  • Numeric inputs need explicit empty, range, increment, and validation semantics from the contract.
  • Window gestures must not steal input from the focused editor/control.
  • Do not use source-text XAML tests or accidentally start the desktop app from unit tests.
  • Reuse application services instead of reimplementing rules in individual windows.

Verification layers

  1. ViewModel tests
  2. Headless interactions, focus, accessibility, localization, and responsive-state behavior
  3. Executable smoke on every supported target environment

Deliverables

  • App runs with composition root
  • Phase A workflows are reachable through commands and bindings
  • Bindings-driven UI
  • Accessibility and responsive layout contracts verified
  • Unit + Headless coverage for critical paths

Handoff

  • Parity/cutover → wfa-parity-verify
  • Product evolution → wfa-post-port-evolve
  • God VM / security / isolation → wfa-harden-decompose

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.

The English summary is being prepared. Showing the original description.

tautcony/ChapterTool113Updated Oct 14, 2026

Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.

The English summary is being prepared. Showing the original description.

tautcony/ChapterTool113Updated Oct 14, 2026

Archive multiple completed changes at once. Use when archiving several parallel changes.

The English summary is being prepared. Showing the original description.

tautcony/ChapterTool113Updated Oct 14, 2026

Continue working on an OpenSpec change by creating the next artifact. Use when the user wants to progress their change, create the next artifact, or continue their workflow.

The English summary is being prepared. Showing the original description.

tautcony/ChapterTool113Updated Oct 14, 2026

Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.

The English summary is being prepared. Showing the original description.

tautcony/ChapterTool113Updated Oct 14, 2026

Fast-forward through OpenSpec artifact creation. Use when the user wants to quickly create all artifacts needed for implementation without stepping through each one individually.

The English summary is being prepared. Showing the original description.

tautcony/ChapterTool113Updated Oct 14, 2026

See all skills by tautcony

Report a problem with this skill