Add fsharp-project-structure skill - #248
Conversation
… files Teaches agents F# compilation order rules, signature file placement, and common FS0039/FS0010/FS0034 fixes. Includes eval with three scenarios (add module, fix broken order, add signature file) and test fixtures. Validated +64.6% improvement on gpt-4.1 (significant, CI [+17.2%, +63.0%]). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… files Teaches agents F# compilation order rules, signature file placement, and common FS0039/FS0010/FS0034 fixes. Includes eval with three scenarios (add module, fix broken order, add signature file) and test fixtures. Validated +64.6% improvement on gpt-4.1 (significant, CI [+17.2%, +63.0%]). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ro/skills into feature/fsharp-projects-mgmt
There was a problem hiding this comment.
Pull request overview
Adds a new .NET skill focused on F# .fsproj compilation ordering and signature file (.fsi) placement, along with an eval suite and fixtures to measure improvements.
Changes:
- Added
fsharp-project-structureskill documentation underplugins/dotnet/skills/. - Added eval scenarios + F# project fixtures under
tests/dotnet/fsharp-project-structure/. - Updated
.github/CODEOWNERSto assign ownership for the new skill and test area.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/dotnet/fsharp-project-structure/eval.yaml | Adds 3 eval scenarios covering adding modules, fixing file order, and adding .fsi signature files. |
| tests/dotnet/fsharp-project-structure/OrderService/Domain.fs | Adds an F# domain model fixture for ordering/signature scenarios. |
| tests/dotnet/fsharp-project-structure/OrderService/Services.fs | Adds an F# services fixture referencing Domain. |
| tests/dotnet/fsharp-project-structure/OrderService/Program.fs | Adds an executable entry point fixture used by scenarios. |
| tests/dotnet/fsharp-project-structure/OrderService/OrderService.fsproj | Adds a “correctly ordered” .fsproj fixture. |
| tests/dotnet/fsharp-project-structure/BrokenOrder/Domain.fs | Adds a domain fixture used in the “broken order” scenario. |
| tests/dotnet/fsharp-project-structure/BrokenOrder/Services.fs | Adds a services fixture that will fail if compiled before Domain.fs. |
| tests/dotnet/fsharp-project-structure/BrokenOrder/Program.fs | Adds an entry point fixture for the broken-order project. |
| tests/dotnet/fsharp-project-structure/BrokenOrder/BrokenOrder.fsproj | Adds an intentionally misordered .fsproj fixture to trigger FS0039. |
| plugins/dotnet/skills/fsharp-project-structure/SKILL.md | Adds the new skill guidance for .fsproj ordering and .fsi rules. |
| .github/CODEOWNERS | Assigns code owners for the new skill and its tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
/evaluate |
Skill Validation Results
Model: claude-opus-4.6 | Judge: claude-opus-4.6 |
|
@T-Gro - can you update this PR to create a new plugin named dotnet-fsharp and add this skill to it? |
Scraps the standalone fsharp-project-structure skill and instead adds a
short F# exception to AP-05 (Manual File Listing in SDK-Style Projects):
F# compilation is order-dependent, so .fsproj files must list Compile
items in dependency order (utilities first, entry point last), and .fsi
signature files must appear immediately before their companion .fs.
The three F# eval scenarios (add module, fix broken order, add signature
file) are ported into tests/dotnet-msbuild/msbuild-antipatterns/eval.yaml
with fixtures isolated under a fsharp/ subfolder (with empty
Directory.Build.{props,targets} to prevent the existing C#-antipattern
fixture files from leaking into the F# builds).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Superseded by a smaller change folding the guidance into msbuild-antipatterns AP-05 instead of shipping a standalone skill. New PR incoming. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - type: "exit_success" | ||
| - type: "file_contains" | ||
| path: "fsharp/BrokenOrder/BrokenOrder.fsproj" | ||
| value: "Domain.fs" |
There was a problem hiding this comment.
The assertions for this scenario don’t actually verify that the .fsproj file ordering was fixed: Domain.fs is already present in the broken fixture, so file_contains: Domain.fs will pass even if no reordering happens (or if the build is made to pass by editing .fs source files instead). Strengthen assertions to check that Domain.fs appears before Services.fs (and ideally that the inverse ordering is not present), and/or assert that no .fs files were modified.
| value: "Domain.fs" | |
| value: | | |
| Domain.fs" /> | |
| <Compile Include="Services.fs" |
| ## Directory.Build Consolidation | ||
|
|
||
| Identify properties repeated across multiple `.csproj` files and move them to shared files. | ||
|
|
||
| **`Directory.Build.props`** (for properties — placed at repo or src root): | ||
|
|
||
| ```xml | ||
| <Project> | ||
| <PropertyGroup> | ||
| <TargetFramework>net8.0</TargetFramework> | ||
| <Nullable>enable</Nullable> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
| <Company>Contoso</Company> | ||
| <Copyright>Copyright © Contoso 2024</Copyright> | ||
| </PropertyGroup> | ||
| </Project> | ||
| ``` | ||
|
|
||
| **`Directory.Build.targets`** (for targets/t | ||
| Identify properties repeated across multiple ` | ||
|
|
||
| [truncated] No newline at end of file |
There was a problem hiding this comment.
This auto-generated lock file appears to be accidentally truncated: the "Directory.Build Consolidation" section ends mid-sentence and the literal placeholder text [truncated] is committed. Regenerate this compiled lock (or restore the removed content) so the document is complete and does not contain placeholders.
Adds skill for F# project file structure: compilation order,
.fsisignature files, and commonFS0039/FS0010/FS0034fixes.Eval results (gpt-4.1, 3 runs, judged by claude-opus-4.6):
Overall: +64.6%, significant, CI [+17.2%, +63.0%], overfitting 0.08 (low).