Skip to content

Commit 316625f

Browse files
committed
Clarify optional dotnet skills and bootstrap instructions
1 parent 73365d0 commit 316625f

File tree

4 files changed

+72
-1
lines changed

4 files changed

+72
-1
lines changed

TUTORIAL.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,24 @@ The intended flow is:
134134
- the framework-specific test skill handles xUnit, TUnit, or MSTest mechanics
135135
- after code changes, agents run the repo-defined quality pass: format, build, analyze, tests, coverage, and any configured extra gates
136136

137+
The baseline above is intentionally small.
137138
Add tool-specific .NET skills only when the repo standardizes on them:
138139

139140
<!-- MCAF:DOTNET-OPTIONAL-SKILLS-BEGIN -->
140-
- Generated during site build from current `mcaf-dotnet-*` folders in `skills/`.
141+
- `mcaf-dotnet-analyzer-config`
142+
- `mcaf-dotnet-archunitnet`
143+
- `mcaf-dotnet-code-analysis`
144+
- `mcaf-dotnet-codeql`
145+
- `mcaf-dotnet-coverlet`
146+
- `mcaf-dotnet-csharpier`
147+
- `mcaf-dotnet-format`
148+
- `mcaf-dotnet-meziantou-analyzer`
149+
- `mcaf-dotnet-netarchtest`
150+
- `mcaf-dotnet-reportgenerator`
151+
- `mcaf-dotnet-roslynator`
152+
- `mcaf-dotnet-semgrep`
153+
- `mcaf-dotnet-stryker`
154+
- `mcaf-dotnet-stylecop-analyzers`
141155
<!-- MCAF:DOTNET-OPTIONAL-SKILLS-END -->
142156

143157
### 4.1 Current Skill Catalog (Generated)

skills/mcaf-dotnet-coverlet/SKILL.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,26 @@ compatibility: "Requires a .NET test project or solution; respects the repo's `A
4545
3. Do not mix `coverlet.collector` and `coverlet.msbuild` in the same test project.
4646
4. Pair raw coverage collection with `ReportGenerator` only when humans need rendered reports.
4747

48+
## Bootstrap When Missing
49+
50+
If coverage is not configured yet:
51+
52+
1. Detect current state:
53+
- `rg -n "coverlet\\.(collector|msbuild)|CollectCoverage|XPlat Code Coverage" -g '*.csproj' -g '*.props' -g '*.targets' .`
54+
- `dotnet tool list --local`
55+
- `dotnet tool list --global`
56+
- `command -v coverlet`
57+
2. Install exactly one driver path:
58+
- VSTest collector: `dotnet add <test-project>.csproj package coverlet.collector`
59+
- MSBuild driver: `dotnet add <test-project>.csproj package coverlet.msbuild`
60+
- Console tool: `dotnet new tool-manifest` (if missing) and `dotnet tool install coverlet.console`
61+
3. Record one concrete local and CI command in `AGENTS.md`:
62+
- collector: `dotnet test <test-project>.csproj --collect:"XPlat Code Coverage"`
63+
- msbuild: `dotnet test <test-project>.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura`
64+
- console: `dotnet tool run coverlet <test-assembly.dll> --target "dotnet" --targetargs "test <test-project>.csproj --no-build"`
65+
4. Run the chosen command once and return `status: configured` or `status: improved`.
66+
5. If another coverage engine already owns coverage for this repo, return `status: not_applicable`.
67+
4868
## Deliver
4969

5070
- explicit coverage driver selection

skills/mcaf-dotnet-reportgenerator/SKILL.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,23 @@ compatibility: "Requires coverage artifacts such as Cobertura, OpenCover, or lco
4545
- badges
4646
4. Merge multiple reports only when the repo really needs a consolidated view.
4747

48+
## Bootstrap When Missing
49+
50+
If `ReportGenerator` is not configured yet:
51+
52+
1. Detect current state:
53+
- `rg --files -g '.config/dotnet-tools.json'`
54+
- `dotnet tool list --local`
55+
- `dotnet tool list --global`
56+
- `command -v reportgenerator`
57+
2. Prefer local tool installation for reproducible CI:
58+
- `dotnet new tool-manifest` (if missing)
59+
- `dotnet tool install dotnet-reportgenerator-globaltool`
60+
3. Add one explicit render command to `AGENTS.md` and CI, for example:
61+
- `dotnet tool run reportgenerator -reports:"**/coverage.cobertura.xml" -targetdir:"artifacts/coverage" -reporttypes:"HtmlSummary;Cobertura"`
62+
4. Run the report command once and return `status: configured` or `status: improved`.
63+
5. If raw coverage outputs are already sufficient and no rendered artifacts are needed, return `status: not_applicable`.
64+
4865
## Deliver
4966

5067
- readable coverage artifacts for humans and CI systems

skills/mcaf-dotnet-roslynator/SKILL.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,26 @@ compatibility: "Requires a .NET SDK-based repository; respects the repo's `AGENT
5151
- rebuild
5252
- rerun tests
5353

54+
## Bootstrap When Missing
55+
56+
If `Roslynator` is not configured yet:
57+
58+
1. Detect current state:
59+
- `rg -n "Roslynator\\.Analyzers" -g '*.csproj' .`
60+
- `rg --files -g '.config/dotnet-tools.json'`
61+
- `dotnet tool list --local`
62+
- `dotnet tool list --global`
63+
- `command -v roslynator`
64+
2. Choose the install path deliberately:
65+
- analyzer package: `dotnet add <project>.csproj package Roslynator.Analyzers`
66+
- optional CLI: `dotnet new tool-manifest` (if missing) and `dotnet tool install roslynator.dotnet.cli`
67+
3. Configure ownership in root `.editorconfig` so Roslynator does not fight SDK analyzers, StyleCop, or Meziantou.
68+
4. If the CLI is adopted, add exact commands in `AGENTS.md` and CI, such as:
69+
- `dotnet tool run roslynator analyze <solution-or-project>`
70+
- `dotnet tool run roslynator fix <solution-or-project>`
71+
5. Run `dotnet build <solution-or-project>` and the selected Roslynator command, then return `status: configured` or `status: improved`.
72+
6. If the repo wants only the current analyzer baseline and no Roslynator-specific CLI workflow, return `status: not_applicable`.
73+
5474
## Deliver
5575

5676
- Roslynator package or CLI setup that fits the repo

0 commit comments

Comments
 (0)