Code review B: copilot-instructions.md — rewrite for IComparable-Extensions#138
Merged
Merged
Conversation
…ew group B) The file shipped verbatim from repo-template — every claim referred to 'this template' / '.NET 8.0 only' / 'empty project folders' / etc. GitHub Copilot reads this file when generating PR reviews and code suggestions, so the wrong context was steering every Copilot response on this repo. The replacement is grounded in the actual repo state: - Real repo type (NuGet-published library, not a template) - Real TFMs (src multi-targets net462→net10.0; tests cover the same plus net47x/net48x/net5/6/7/9) - Real public surface (the two IsBetween / IsInRange methods) - Real CI workflows and what each one does - The repo's actual coding conventions (Allman, file-scoped namespaces, multi-line argument lists, 3 blank lines between members, test naming pattern) - The canonical PublicAPI tracking via PublicApiAnalyzers - The pinned AssemblyVersion=1.0.0.0 binding-stability convention - The branch model (main / vNext / stack/<topic>) - Concrete 'don't' rules from real bugs (record + net462 IsExternalInit, async void rules, MA0006 string ==)
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the repo’s Copilot guidance from the inherited “repo-template” context to instructions aligned with Wolfgang.Extensions.IComparable as a real, NuGet-published, multi-targeted library, so automated reviews and code generation are grounded in the actual project shape and conventions.
Changes:
- Replaces the template-focused repository summary with the library’s real API surface, TFMs, and layout.
- Documents local build/test commands plus CI workflows and the
vNextstacking model. - Captures coding conventions and “don’ts” intended to prevent known multi-TFM/.NET Framework pitfalls.
All five Copilot findings on the copilot-instructions rewrite were valid. Fixed: 1. L16 Prerequisites — claimed .NET 10 SDK alone was sufficient. Reworked to enumerate the CI SDK matrix (3.1, 5/6/7/8/9 plus 10), call out the Windows .NET Framework targeting packs needed for the net47x/net48x test TFMs, and link to scripts/build-pr.ps1 for the Windows-job local mirror. 2. L25 'dotnet test -c Release --no-build' had no project argument. Updated to point at the test csproj explicitly. Same for the build commands — they now pass the slnx so dotnet doesn't fall back to directory auto-detection. 3. L72 referenced 'C:\Source\GitHub\CLAUDE.md'. Replaced with the actual in-repo authoritative sources: .editorconfig, Directory.Build.props, CONTRIBUTING.md (Code Quality Standards section). 4. L114 'Trust these instructions' paragraph had the same C:\Source\GitHub\CLAUDE.md reference. Replaced with the same in-repo file list. 5. L94 PublicApiAnalyzer paragraph implied it was always-active. Clarified that it activates per-src-project via the Exists() condition in Directory.Build.props, so until PublicAPI.Shipped.txt and PublicAPI.Unshipped.txt are committed alongside a csproj, the analyzer is dormant on that project. Added the activation recipe for new src projects.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the verbatim repo-template carry-over with instructions actually grounded in this repo.
The previous file told Copilot this was a template with no buildable projects targeting .NET 8.0 only. Copilot has been generating PR reviews from that wrong context. The new version reflects the real library state — multi-TFM, the two public extension methods, the canonical conventions, the vNext branch model, and concrete don'ts from real bugs (record + net462 IsExternalInit, etc.).
Doc-only change. Stacked on vNext (PR #129).