C# QA Gate
Canonical procedure for the Phase D final quality gate that every C# change must pass before completion is reported.
When to Use This Skill
Use this skill when:
csharp-typed-engineer is about to declare a change complete.
- An executor has finished applying a planned batch and must verify zero regressions in the single gate run against the baseline captured in Phase A (the
Phase 0 baseline).
- A reviewer needs to confirm the toolchain was actually run and produced a clean pass.
Required Inputs
Before invoking this gate, the agent must have:
- a baseline record produced in Phase A (the plan's
Phase 0 baseline), containing analyzer findings and compiler/nullable diagnostics for the in-scope files and the MSTest pass/fail status and per-file coverage status of one test run,
- the exact list of touched production and test files,
- a clean working tree (all planned edits committed to the working copy).
Toolchain Execution Sequence
Run the full toolchain in this exact order. If any step fails or modifies files, fix the issue and restart from step 1. Do not stop the loop until all four steps complete without errors in a single pass.
dotnet tool run csharpier .
msbuild <solution>.sln /t:Build /p:Configuration=Debug /p:Platform="Any CPU" /p:EnableNETAnalyzers=true /p:EnforceCodeStyleInBuild=true
msbuild <solution>.sln /t:Build /p:Configuration=Debug /p:Platform="Any CPU" /p:Nullable=enable /p:TreatWarningsAsErrors=true
vstest.console.exe <test-assembly-paths> /EnableCodeCoverage
If the environment prevents running any tool, stop and report the change as unverified. Do not declare completion.
Delta Requirements (Zero-Regression Hard Gate)
Compare the final results to the Phase A baseline (the Phase 0 baseline), reading test and coverage results from the single gate run. All of the following must hold:
- Analyzer delta: 0 new findings across the repository.
- Compiler / nullable delta: 0 new diagnostics across the repository.
- MSTest delta: zero failures in the single gate run and 0 new failing tests against the baseline.
- Per-file coverage delta: every changed file meets the coverage thresholds, read from the single gate run, and coverage for every touched file is greater than or equal to the baseline for that file; a new file has no pre-change run and is judged against the thresholds. New behavior is tested.
- Overall coverage delta (when the repo enforces it): overall coverage is greater than or equal to the baseline.
- New modules, classes, or methods: coverage >= 90% for each new unit introduced in the batch.
If any delta check fails, the agent must revert or fix immediately and rerun the full toolchain. Do not proceed to reporting until all deltas are clean.
Required Reporting Block
Every completion response must include the following sections:
- Scope — exact file list touched in this change.
- Baseline — analyzer, compiler/nullable, MSTest, and coverage status recorded in Phase A.
- Plan — design and test-strategy summary, referencing the approved plan.
- Diffs — patch-style or full-file replacements for scoped files only.
- QA Gate Results — analyzer and compiler/nullable deltas, failing-tests delta from the single gate run, per-file coverage delta against the baseline and the thresholds, and overall coverage delta when applicable. If any step could not be run, mark the corresponding line unverified and state why.
Evidence Storage
Persist toolchain output according to evidence-and-timestamp-conventions:
- store baseline outputs (static and
Phase 0 baseline test-suite) under <FEATURE>/evidence/baseline/<timestamp>/,
- store post-change outputs under
<FEATURE>/evidence/qa-gates/<timestamp>/,
- use ISO-8601 UTC timestamps in folder names.
This location is canonical per evidence-and-timestamp-conventions and is not overridable.
See .agents/skills/evidence-and-timestamp-conventions/SKILL.md for the canonical evidence path authority.
The evidence paths must be referenced in the agent's completion message to satisfy the SubagentStop completion-artifact gate.
Prohibited Shortcuts
- Do not disable, skip, or narrow any step of the toolchain to reach a clean result.
- Do not add analyzer suppressions,
#pragma warning disable, #nullable disable, or test [Ignore] attributes to suppress new findings introduced by the change.
- Do not report success based on partial or targeted runs. A focused run of one test file to debug a specific failure is debugging only; it is never a gate or evidence, and the final gate is the single gate run.
1---2name: csharp-qa-gate-123description: Final QA gate for C# changes. Runs CSharpier, .NET analyzers, nullable analysis, and MSTest; compares static results and the tests and coverage of the single gate run to the Phase A baseline (the `Phase 0 baseline`), enforces zero-regression deltas, and reports before completion.4metadata:5 source: https://skillmd.com/skills/drmoisan/csharp-qa-gate-126---78# C# QA Gate910Canonical procedure for the Phase D final quality gate that every C# change must pass before completion is reported.1112## When to Use This Skill1314Use this skill when:1516- `csharp-typed-engineer` is about to declare a change complete.17- An executor has finished applying a planned batch and must verify zero regressions in the single gate run against the baseline captured in Phase A (the `Phase 0 baseline`).18- A reviewer needs to confirm the toolchain was actually run and produced a clean pass.1920## Required Inputs2122Before invoking this gate, the agent must have:2324- a baseline record produced in Phase A (the plan's `Phase 0 baseline`), containing analyzer findings and compiler/nullable diagnostics for the in-scope files and the MSTest pass/fail status and per-file coverage status of one test run,25- the exact list of touched production and test files,26- a clean working tree (all planned edits committed to the working copy).2728## Toolchain Execution Sequence2930Run the full toolchain in this exact order. If any step fails or modifies files, fix the issue and restart from step 1. Do not stop the loop until all four steps complete without errors in a single pass.31321. `dotnet tool run csharpier .`332. `msbuild <solution>.sln /t:Build /p:Configuration=Debug /p:Platform="Any CPU" /p:EnableNETAnalyzers=true /p:EnforceCodeStyleInBuild=true`343. `msbuild <solution>.sln /t:Build /p:Configuration=Debug /p:Platform="Any CPU" /p:Nullable=enable /p:TreatWarningsAsErrors=true`354. `vstest.console.exe <test-assembly-paths> /EnableCodeCoverage`3637If the environment prevents running any tool, stop and report the change as **unverified**. Do not declare completion.3839## Delta Requirements (Zero-Regression Hard Gate)4041Compare the final results to the Phase A baseline (the `Phase 0 baseline`), reading test and coverage results from the single gate run. All of the following must hold:4243- **Analyzer delta**: 0 new findings across the repository.44- **Compiler / nullable delta**: 0 new diagnostics across the repository.45- **MSTest delta**: zero failures in the single gate run and 0 new failing tests against the baseline.46- **Per-file coverage delta**: every changed file meets the coverage thresholds, read from the single gate run, and coverage for every touched file is greater than or equal to the baseline for that file; a new file has no pre-change run and is judged against the thresholds. New behavior is tested.47- **Overall coverage delta** (when the repo enforces it): overall coverage is greater than or equal to the baseline.48- **New modules, classes, or methods**: coverage >= 90% for each new unit introduced in the batch.4950If any delta check fails, the agent must revert or fix immediately and rerun the full toolchain. Do not proceed to reporting until all deltas are clean.5152## Required Reporting Block5354Every completion response must include the following sections:55561. **Scope** — exact file list touched in this change.572. **Baseline** — analyzer, compiler/nullable, MSTest, and coverage status recorded in Phase A.583. **Plan** — design and test-strategy summary, referencing the approved plan.594. **Diffs** — patch-style or full-file replacements for scoped files only.605. **QA Gate Results** — analyzer and compiler/nullable deltas, failing-tests delta from the single gate run, per-file coverage delta against the baseline and the thresholds, and overall coverage delta when applicable. If any step could not be run, mark the corresponding line **unverified** and state why.6162## Evidence Storage6364Persist toolchain output according to `evidence-and-timestamp-conventions`:6566- store baseline outputs (static and `Phase 0 baseline` test-suite) under `<FEATURE>/evidence/baseline/<timestamp>/`,67- store post-change outputs under `<FEATURE>/evidence/qa-gates/<timestamp>/`,68- use ISO-8601 UTC timestamps in folder names.6970This location is canonical per evidence-and-timestamp-conventions and is not overridable.71See `.agents/skills/evidence-and-timestamp-conventions/SKILL.md` for the canonical evidence path authority.7273The evidence paths must be referenced in the agent's completion message to satisfy the `SubagentStop` completion-artifact gate.7475## Prohibited Shortcuts7677- Do not disable, skip, or narrow any step of the toolchain to reach a clean result.78- Do not add analyzer suppressions, `#pragma warning disable`, `#nullable disable`, or test `[Ignore]` attributes to suppress new findings introduced by the change.79- Do not report success based on partial or targeted runs. A focused run of one test file to debug a specific failure is debugging only; it is never a gate or evidence, and the final gate is the single gate run.