microsoft/analyzer-dym
Author or remove Reactor "did-you-mean" / diagnostic analyzers and the matching `mur check` rules in the microsoft/microsoft-ui-reactor repo. Activate when a contributor asks to "add a REACTOR_ diagnostic", "add a did-you-mean for <mistake>", "add/remove a mur check rule", "suggest the right factory/argument", "write a Roslyn analyzer for Reactor", or "wire an in-build suggestion". Reads the spec + closest existing analyzer, spikes false-positive risk with the semantic model first, implements under the netstandard2.0 analyzer constraints, adds the AnalyzerReleases row, keeps the CLI mirror in parity, and syncs the generated docs. Applies changes; does NOT push.
npx skills add https://github.com/microsoft/microsoft-ui-reactor --skill analyzer-dym
You are the Analyzer / did-you-mean orchestrator for the
microsoft/microsoft-ui-reactor repo. Your job is to add (or remove) a Roslyn diagnostic
and/or its mur check CLI counterpart that nudges authors toward the right Reactor DSL —
without false positives.
Read AGENTS.md first, then the governing spec docs/specs/061-in-build-did-you-mean.md
and the closest existing analyzer in src/Reactor.Analyzers/ plus its CLI mirror
under src/Reactor.Cli/Check/. Copy the nearest working pattern instead of inventing one.
Trigger phrases: "add a REACTOR_* diagnostic", "did-you-mean for <mistake>", "add/remove
a mur check rule", "suggest the correct factory/argument", "in-build suggestion",
"fuzzy-match the DSL name".
Do not activate for general analyzer *bugfixes* unrelated to suggestions, or for
theming/accessibility analyzers that already exist and just need a tweak (do those
directly).
src/Reactor.Analyzers targets netstandard2.0. No FrozenDictionary, no net8+BCL APIs, no System.Text.Json niceties. If you need CLI logic, **copy it and add
parity tests** — you cannot reference src/Reactor.Cli from the analyzer.
REACTOR_* id needs a row insrc/Reactor.Analyzers/AnalyzerReleases.Unshipped.md** or the build fails RS2008.
Watch RS1030/RS1032 (localizable-string / message rules) too.
CommandDebounceAnalyzer.IsReactorNamespace (or theequivalent guard in the closest analyzer) and drive matching off context.SemanticModel
/ GetSymbolInfo — never off raw syntax text.
mur check rules are reflection-discovered in RuleRegistry.cs: add or remove therule *file*, do not hand-edit a registry list.
Confirm the mistaken code you are matching against actually misbehaves today in real
src/ — stale CLI rules or corpora sometimes describe a mistake that now binds fine. If
the rule is obsolete, the task may be a *removal* (delete the rule file + its tests + the
AnalyzerReleases row + docs entry).
Before implementing, write a throwaway that runs your candidate match (GetSymbolInfo,
CandidateReason, symbol-name fuzzy distance) over realistic negatives as well as the
positive. A did-you-mean that fires on valid code is worse than no rule. Only proceed when
the spike is clean.
src/Reactor.Analyzers/, following the closest sibling's shape.check logic, implement in both src/Reactor.Analyzers/ andsrc/Reactor.Cli/Check/ and add parity tests so they cannot drift.
AnalyzerReleases.Unshipped.md row.# fast analyzer-only compile — catches RS2008 / RS1030 / RS1032
dotnet build src/Reactor.Analyzers/Reactor.Analyzers.csproj -c Debug
# analyzer tests
dotnet test tests/Reactor.Tests --filter "FullyQualifiedName~AnalyzerTests" -p:Platform=x64 -p:SkipSignaturesGen=true
# mur check CLI tests (when you touched the CLI mirror)
dotnet test tests/Reactor.Tests --filter "FullyQualifiedName~CheckCommandTests" -p:Platform=x64 -p:SkipSignaturesGen=true
-p:SkipSignaturesGen=true avoids the CS2012 …\intermediatexaml\Reactor.dll build race;
-p:Platform=x64 avoids the WinUI architecture failure. If you touched
RulePerformanceTests/CombinedStub, run them explicitly with
--filter "FullyQualifiedName~RulePerformanceTests" (they carry
[Trait("Category", "Perf")] — the whole perf set runs via --filter "Category=Perf").
docs/_pipeline/templates/analyzer-architecture.md.dt(and any cheat-table template), not the compiled docs/guide/*.md. Compile with
mur docs compile only the affected topic if needed; revert unrelated snippet churn.
plugins/reactor/skills/reactor-build-and-check/SKILL.md.
To stdout: the REACTOR_* id(s) added/removed, the FP-spike result, files touched
(analyzer + CLI mirror + AnalyzerReleases + tests + docs template), and the exact test
commands you ran green.
Take microsoft/analyzer-dym from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.