Skip to content

Commit b8147de

Browse files
committed
Standardize bootstrap blocks across dotnet skills
1 parent 7985393 commit b8147de

4 files changed

Lines changed: 28 additions & 2 deletions

File tree

skills/mcaf-dotnet-analyzer-config/SKILL.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,19 @@ compatibility: "Requires a .NET SDK-based repository; respects the repo's `AGENT
4848
5. Keep bulk switches such as `EnableNETAnalyzers` in MSBuild files, not in `.editorconfig`.
4949
6. Treat `.globalconfig` as an exceptional case, not the normal repo setup.
5050

51+
## Bootstrap When Missing
52+
53+
If analyzer configuration is requested but not structured yet:
54+
55+
1. Detect current state:
56+
- `rg --files -g '.editorconfig' -g '.globalconfig'`
57+
- `rg -n "EnableNETAnalyzers|AnalysisLevel|AnalysisMode" -g '*.csproj' -g 'Directory.Build.*' .`
58+
2. Create or normalize one repo-root `.editorconfig` with `root = true`.
59+
3. Move rule severity into `.editorconfig` and keep bulk analyzer switches in project or MSBuild config.
60+
4. Add nested `.editorconfig` files only when a subtree really needs different scoped policy.
61+
5. Run `dotnet build <solution-or-project>` and return `status: configured` or `status: improved`.
62+
6. If the repo intentionally uses another documented analyzer-config ownership model, return `status: not_applicable`.
63+
5164
## Deliver
5265

5366
- one explicit analyzer configuration ownership model

skills/mcaf-dotnet-features/SKILL.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,19 @@ compatibility: "Requires a C# or .NET repository; respects explicit `LangVersion
5353
- `mcaf-solid-maintainability`
5454
8. After feature-driven refactors, run the repo's .NET quality pass through `mcaf-dotnet`.
5555

56+
## Bootstrap When Missing
57+
58+
If the requested C# feature depends on SDK or language support the repo does not have yet:
59+
60+
1. Detect current state:
61+
- `dotnet --list-sdks`
62+
- `rg -n "<TargetFramework>|<LangVersion>|<TargetFrameworks>" -g '*.csproj' -g 'Directory.Build.*' .`
63+
2. Confirm whether the repo wants to stay on the current stable language level or intentionally upgrade.
64+
3. If the feature requires a newer supported SDK or target framework, upgrade the repo toolchain deliberately instead of relying on the local machine by accident.
65+
4. If the repo needs explicit `LangVersion`, record it in project or shared MSBuild config.
66+
5. Run `dotnet build <solution-or-project>` after the feature or toolchain change and return `status: configured` or `status: improved`.
67+
6. If the repo intentionally stays below the required language level, return `status: not_applicable`.
68+
5669
## Deliver
5770

5871
- modern C# code that fits the repo's real language version

skills/mcaf-dotnet-quality-ci/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ compatibility: "Requires a .NET solution or project; may update `AGENTS.md`, CI
8282
- architecture/security skills such as `mcaf-dotnet-netarchtest`, `mcaf-dotnet-archunitnet`, `mcaf-dotnet-codeql`, and `mcaf-dotnet-semgrep`
8383
8. Avoid overlapping tools with conflicting ownership. If you add an opinionated formatter, define whether it replaces or complements `dotnet format`.
8484

85-
## Bootstrap When A Gate Is Missing
85+
## Bootstrap When Missing
8686

8787
If a quality gate is requested but not configured, use this activation path:
8888

skills/mcaf-dotnet/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ compatibility: "Requires a .NET solution or project; respects root and local `AG
7171
7. If the repo does not define these commands clearly, tighten `AGENTS.md` before continuing so later agents stop guessing.
7272
8. Do not introduce preview language features unless the repo explicitly opts into preview in project or MSBuild settings.
7373

74-
## Bootstrap Policy For Inactive Tools
74+
## Bootstrap When Missing
7575

7676
When a requested .NET gate or tool is missing in this repo, do not stop at "not configured":
7777

0 commit comments

Comments
 (0)