Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
a6b5722
Add Find data model POCOs
sundaramramaswamy May 20, 2026
a60da16
Add stub scenario catalogue
sundaramramaswamy May 20, 2026
cbb9a4a
Add DataLoader and Notes for Find
sundaramramaswamy May 20, 2026
793afea
Add SampleCatalogue build-time extractor
sundaramramaswamy May 20, 2026
2767eb8
Add BM25 search engine for Find
sundaramramaswamy May 20, 2026
a49731a
Wire find/get/list CLI commands
sundaramramaswamy May 20, 2026
ae8842c
Add unit tests for Find subsystem
sundaramramaswamy May 20, 2026
d8c2ffe
Wire scenarios.json as embedded resource
sundaramramaswamy May 20, 2026
98e6263
Expand synonym + phrase maps to full spec
sundaramramaswamy May 29, 2026
1a5304c
Expand pitfall notes to 28 entries
sundaramramaswamy May 29, 2026
4f33311
Add 6 text scenarios (P0)
sundaramramaswamy May 29, 2026
3861b47
Add 10 layout scenarios (P0)
sundaramramaswamy May 29, 2026
d3f47bd
Add 6 button scenarios (P0)
sundaramramaswamy May 29, 2026
21f6a2d
Add 6 form scenarios (P0)
sundaramramaswamy May 29, 2026
e107fe7
Add 6 list scenarios (P0)
sundaramramaswamy May 29, 2026
0cfe60e
Add 10 input scenarios (P0)
sundaramramaswamy May 29, 2026
e35a28f
Add 15 hook scenarios (P0)
sundaramramaswamy May 29, 2026
de7760b
Port 4 remaining recipes to scenarios
sundaramramaswamy May 29, 2026
10a9de5
Remove legacy reactor-recipes references
sundaramramaswamy May 29, 2026
03f3961
Update skill file for scenario catalogue
sundaramramaswamy May 29, 2026
07be9f2
Regen scenarios.json (64 scenarios)
sundaramramaswamy May 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 19 additions & 20 deletions plugins/reactor/skills/reactor-recipes/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
---
name: reactor-recipes
description: "Paste-ready single-file Reactor recipes indexed by intent — list with add/delete/toggle, sidebar navigation between pages, form with validation + submit gating, async fetch with loading/error/data states, themed Win11 card surface. Use a recipe instead of synthesizing from prose: copy, adjust, ship."
description: "Intent-first map into the Reactor scenario catalogue — list add/delete/toggle, sidebar navigation, validation and submit gating forms, async fetch states, card surfaces, and canvas positioning. Prefer the scenario source under samples/scenarios/ over legacy recipe files."
---

## How to use this skill

Each recipe is a complete, compilable single-file program. **Copy the file's body directly into your project**; don't synthesize the pattern from scratch. The recipes use real Reactor APIs only — no pseudocode.
The primary source is now the **scenario catalogue** under `samples/scenarios/`. Each scenario folder contains a compilable single-file app in `Scenario.cs`; copy the matching scenario and adapt it instead of synthesizing from prose.

The full recipe content is in `references/<name>.cs`. Read just the recipe(s) that match your intent.
The old `references/` folder no longer contains the legacy recipe `.cs` files. It only keeps markdown docs such as `references/index.md` and `references/animated-list.md`.

## Intent → recipe map
## Intent → scenario map

| Intent | Recipe | APIs used |
| Intent | Scenario source | APIs used |
|---|---|---|
| Add / remove / toggle items in a list | `references/list-add-delete.cs` | `UseReducer`, `WithKey`, `Command` |
| Animate list insert / move / remove | `references/animated-list.md` | `Animations.Animate`, `AnimationKind`, `IReactorKeyed`, `UseReducedMotion` |
| Sidebar navigation between pages | `references/sidebar-nav.cs` | `UseNavigation`, `NavigationView`, `NavigationHost`, `WithNavigation` |
| Form with validation + submit gating | `references/form-with-validation.cs` | `UseValidationContext`, `FormField`, `Validate.*`, `ShowWhen` |
| Fetch data with loading / error / data states | `references/async-fetch-list.cs` | `UseResource`, `AsyncValue<T>.Match` |
| Themed Win11 card surface | `references/themed-card.cs` | `Theme.*` tokens, `Border`, `FlexColumn`, `.Padding`, `.CornerRadius`, `.WithBorder` |
| Absolute positioning with Canvas | `references/canvas-positioning.cs` | `Canvas`, `.Canvas(left, top)`, `.CenterAt`, shapes |
| Add / remove / toggle items in a list | `samples/scenarios/lists/list-add-delete-toggle/Scenario.cs` | `UseReducer`, `WithKey`, `Command` |
| Animate list insert / move / remove | `samples/apps/animated-list-demo/` | `Animations.Animate`, `AnimationKind`, `IReactorKeyed`, `UseReducedMotion` |
| Sidebar navigation between pages | `samples/scenarios/navigation/sidebar-nav/Scenario.cs` | `UseNavigation`, `NavigationView`, `NavigationHost`, `WithNavigation` |
| Form with validation + submit gating | `samples/scenarios/forms/form-validation-context/Scenario.cs` and `samples/scenarios/forms/form-submit-gating/Scenario.cs` | `UseValidationContext`, `FormField`, `Validate.*`, `ShowWhen` |
| Fetch data with loading / error / data states | `samples/scenarios/hooks/async-fetch-list/Scenario.cs` | `UseResource`, `AsyncValue<T>.Match` |
| Themed Win11 card surface | `samples/scenarios/layout/card-surface/Scenario.cs` | `Theme.*` tokens, `Border`, `FlexColumn`, `.Padding`, `.CornerRadius`, `.WithBorder` |
| Absolute positioning with Canvas | `samples/scenarios/layout/canvas-positioning/Scenario.cs` | `Canvas`, `.Canvas(left, top)`, `.CenterAt`, shapes |

See `references/index.md` for the full index.
See `samples/scenarios/README.md` for the catalogue contract and `samples/scenarios/_generated/scenarios.json` for the generated index.

## Recipe contract
## Scenario contract

A good recipe:
A good scenario:
- Compiles standalone (`dotnet run` works against the file).
- Targets one intent — no kitchen-sink demos.
- Stays under ~120 lines including imports and `ReactorApp.Run` shell.
- Uses real Reactor APIs only.
- Stays concise, with real Reactor APIs only.
- Comments only the *non-obvious*.

## Adapting a recipe
## Adapting a scenario

The recipes use `#:package Microsoft.UI.Reactor@0.0.0-local` (selfhost default). Replace the version with whatever you depend on outside the source clone.
Scenarios use `#:package Microsoft.UI.Reactor@0.0.0-local` (selfhost default). Replace the version with whatever you depend on outside the source clone.

If you need analyzer coverage (`REACTOR_DSL_001` and friends), promote the recipe to a `.csproj` — single-file `.cs` builds don't load analyzers. See `reactor-getting-started` for the `.csproj` template.
If you need analyzer coverage (`REACTOR_DSL_001` and friends), promote the scenario to a `.csproj` — single-file `.cs` builds don't load analyzers. See `reactor-getting-started` for the `.csproj` template.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading