MCAF: .NET
Trigger On
- writing, reviewing, debugging, or refactoring C# or .NET code
- deciding which .NET skill should be used for a task
- modernizing a .NET codebase while keeping language and runtime compatibility
- verifying .NET changes with analyzers, formatting, tests, and coverage
Value
- produce a concrete project delta: code, docs, config, tests, CI, or review artifact
- reduce ambiguity through explicit planning, verification, and final validation skills
- leave reusable project context so future tasks are faster and safer
Do Not Use For
- non-.NET repositories
- a single-tool task where one exact .NET tool skill already covers the whole request
Inputs
- the nearest
AGENTS.md - solution and project files
Directory.Build.*files- the repo-root
.editorconfigand any nested.editorconfigfiles that apply - target
TFM,LangVersion, SDK version, test packages, and analyzer packages
Quick Start
- Read the nearest
AGENTS.mdand confirm scope and constraints. - Run this skill's
Workflowthrough theRalph Loopuntil outcomes are acceptable. - Return the
Required Result Formatwith concrete artifacts and verification evidence.
Workflow
- Detect the real stack before changing code or commands:
TFMorTFMs- explicit
LangVersionor the default implied by the SDK and target framework - test framework: xUnit, TUnit, or MSTest
- runner model:
VSTestorMicrosoft.Testing.Platform - installed analyzers, formatters, coverage tools, and architecture-test libraries
- Route framework mechanics through exactly one matching test skill:
mcaf-dotnet-xunitmcaf-dotnet-tunitmcaf-dotnet-mstest
- Route quality and policy through the matching skill:
mcaf-dotnet-quality-cimcaf-dotnet-analyzer-configmcaf-dotnet-complexity- tool-specific skills such as
mcaf-dotnet-format,mcaf-dotnet-roslynator,mcaf-dotnet-stylecop-analyzers,mcaf-dotnet-meziantou-analyzer,mcaf-dotnet-coverlet,mcaf-dotnet-reportgenerator,mcaf-dotnet-resharper-clt,mcaf-dotnet-netarchtest,mcaf-dotnet-archunitnet,mcaf-dotnet-codeql,mcaf-dotnet-csharpier, andmcaf-dotnet-stryker
- Route design and structure through:
mcaf-solid-maintainabilityfor SOLID, SRP, cohesion, and maintainability limitsmcaf-architecture-overviewwhen system or module boundaries, contracts, or architecture docs need workmcaf-dotnet-featureswhen modern C# feature selection or language-version compatibility matters
- Write or review code using the newest stable C# features the repo actually supports.
- After any .NET code change, run the repo-defined post-change quality pass from narrow to broad:
formatbuildanalyze- focused
test - broader
test coverageand report generation when configured- extra configured gates such as Roslynator, StyleCop, Meziantou, ReSharper CLT, NetArchTest, ArchUnitNET, CodeQL, CSharpier, or Stryker
- If the repo does not define these commands clearly, tighten
AGENTS.mdbefore continuing so later agents stop guessing. - Do not introduce preview language features unless the repo explicitly opts into preview in project or MSBuild settings.
Bootstrap When Missing
When a requested .NET gate or tool is missing in this repo, do not stop at "not configured":
- Detect whether the tool is already present in project files, tool manifests, or CI.
- If the tool is optional and repo policy is unclear, ask whether to enable it as a default gate.
- If approved or already required by policy, install and wire it through the matching tool skill.
- Update
AGENTS.mdso future agents have exact commands and stop guessing. - Run one verify pass and return
status: configuredorstatus: improved. - If the tool is intentionally out of scope for this repo, return
status: not_applicablewith reason and route.
Deliver
- .NET changes that use the right framework and tool skills
- version-compatible modern C# code
- a completed post-change verification pass, not only green tests
Validate
- only the skills relevant to the current .NET task were opened
VSTestandMicrosoft.Testing.Platformassumptions were not mixed- the language features used are supported by the repo's real
TFMandLangVersion - format, analyzers, tests, and any configured extra gates were all considered before completion
Ralph Loop
Use the Ralph Loop for every task, including docs, architecture, testing, and tooling work.
- Plan first (mandatory):
- analyze current state
- define target outcome, constraints, and risks
- write a detailed execution plan
- list final validation skills to run at the end, with order and reason
- Execute one planned step and produce a concrete delta.
- Review the result and capture findings with actionable next fixes.
- Apply fixes in small batches and rerun the relevant checks or review steps.
- Update the plan after each iteration.
- Repeat until outcomes are acceptable or only explicit exceptions remain.
- If a dependency is missing, bootstrap it or return
status: not_applicablewith explicit reason and fallback path.
Required Result Format
status:complete|clean|improved|configured|not_applicable|blockedplan: concise plan and current iteration stepactions_taken: concrete changes madevalidation_skills: final skills run, or skipped with reasonsverification: commands, checks, or review evidence summaryremaining: top unresolved items ornone
For setup-only requests with no execution, return status: configured and exact next commands.
Load References
- read
references/skill-routing.mdfirst - read
references/task-flow.mdwhen the task includes implementation, refactoring, or review
Example Requests
- "Work on this .NET feature and use the right skills."
- "Which .NET skills should open for this repo?"
- "Refactor this C# code and run the full quality pass after."