Files
MyAiConfiguration/shared/skills/reviews/wpf-review/evals/evals.json
T
Julian Lechner f5d8f6f11b
CI / CI configuration security checks (push) Successful in 3s
CI / Capabilities and shell quality (push) Successful in 14s
CI / Python tests and compilation (push) Successful in 26s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 14s
CI / PowerShell tests on Ubuntu (push) Successful in 1m4s
CI / Installed client configuration smoke tests (push) Successful in 33s
CI / Bash integration and installation guards (push) Successful in 1m1s
feat(skills): reworked skills and rules
2026-11-18 14:17:49 +01:00

58 lines
5.5 KiB
JSON

{
"skill_name": "wpf-review",
"evals": [
{
"id": 1,
"prompt": "Review this WPF change:\n\n```csharp\npublic class CustomersViewModel : INotifyPropertyChanged\n{\n public List<Customer> Customers { get; } = new();\n private string _filter;\n public string Filter { get => _filter; set { _filter = value; } }\n\n public ICommand RefreshCommand => new RelayCommand(async () =>\n {\n var data = await Task.Run(() => _service.Load());\n Customers.Clear();\n Customers.AddRange(data);\n });\n public event PropertyChangedEventHandler PropertyChanged;\n}\n```\n```xml\n<TextBox Text=\"{Binding Filtr, UpdateSourceTrigger=PropertyChanged}\"/>\n<ListBox ItemsSource=\"{Binding Customers}\"/>\n<Button Content=\"Refresh\" Command=\"{Binding RefreshCommand}\"/>\n```",
"expected_output": "Should trace bindings and change notification: the binding path Filtr is misspelled (silent binding failure), the Filter setter does not raise PropertyChanged, and List<T> does not notify the ListBox of Clear/AddRange (should be ObservableCollection or replaced with notification). Should review the command: async void lambda with no exception handling, no enablement/CanExecute to prevent concurrent refresh, no cancellation, and the command creates a new instance on every get. Should report with view/binding path and user-visible impact and recommend focused WPF verification (e.g. binding error output).",
"assertions": [
"Flags the misspelled binding path Filtr as a silent binding failure",
"Flags that the Filter setter does not raise PropertyChanged",
"Flags that List<Customer> does not notify the ListBox of changes and suggests ObservableCollection or equivalent",
"Flags missing exception handling in the asynchronous command",
"Flags that the Refresh command can run concurrently without enablement control",
"Describes the user-visible impact of each finding",
"Recommends focused verification such as checking binding errors in the debug output"
],
"files": []
},
{
"id": 2,
"prompt": "Review this dialog code-behind:\n\n```csharp\npublic partial class OrderDetailWindow : Window\n{\n public OrderDetailWindow(OrderViewModel vm, IEventBus bus)\n {\n InitializeComponent();\n DataContext = vm;\n bus.OrderUpdated += OnOrderUpdated;\n _timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(5) };\n _timer.Tick += (_, _) => vm.Reload();\n _timer.Start();\n }\n private void OnOrderUpdated(object s, OrderEvent e) => StatusText.Text = e.Status;\n}\n```\n`IEventBus` is an application-wide singleton and raises events from background threads. The window is opened many times per session.",
"expected_output": "Should check view lifetime and subscriptions: the window subscribes to a singleton event and never unsubscribes, so closed windows remain referenced (leak, stale handlers). The DispatcherTimer is never stopped, keeping the window alive and reloading after close. OnOrderUpdated updates a UI element from a background thread, violating UI-thread affinity (cross-thread exception). Should recommend unsubscribing and stopping the timer on Closed, and marshaling to the Dispatcher. Report with lifecycle path and user-visible impact.",
"assertions": [
"Flags the event bus subscription that is never removed as a memory leak or stale reference",
"Flags the DispatcherTimer that is never stopped after the window closes",
"Flags updating StatusText from a background thread as a UI-thread affinity violation",
"Recommends unsubscribing and stopping the timer when the window closes",
"Recommends marshaling the update to the Dispatcher or UI thread",
"Describes user-visible impact such as growing memory or crashes after repeated openings"
],
"files": []
},
{
"id": 3,
"prompt": "WPF review: the diff only adds `AutomationProperties.Name=\"Search customers\"` to an existing icon-only search `Button` in `CustomersView.xaml`. Should we also migrate the whole app to MVVM Toolkit source generators and switch to .NET 9 while we're at it?",
"expected_output": "The change is a correct accessibility improvement. Should confirm it with no concrete defects. Should not give framework-wide advice unrelated to the diff, such as migrating to MVVM Toolkit or upgrading .NET. May recommend focused verification such as checking the name with an accessibility inspector or screen reader.",
"assertions": [
"States that the AutomationProperties.Name addition is appropriate or has no defects",
"Does not recommend migrating to MVVM Toolkit source generators as part of this review",
"Does not recommend upgrading to .NET 9 as part of this review",
"Recommends focused verification such as an accessibility inspector or screen reader check"
],
"files": []
},
{
"id": 4,
"prompt": "WPF review of this diff.\n\n```diff\n # src/app/orders/orders.component.ts\n- orders = this.store.selectSignal(selectOrders);\n+ readonly orders = this.store.selectSignal(selectOrders);\n```",
"expected_output": "The diff is an Angular component, not WPF, XAML, or MVVM desktop code. Should state that wpf-review is out of scope and report no WPF findings.",
"assertions": [
"States that the diff is Angular, not WPF or XAML",
"Reports no WPF findings",
"Does not apply WPF binding, dispatcher, or XAML advice"
],
"files": []
}
]
}