Skip to content

Update Copilot instructions based on PR feedback analysis#37636

Merged
AndriySvyryd merged 6 commits intomainfrom
copilot/update-copilot-instructions-file
Feb 5, 2026
Merged

Update Copilot instructions based on PR feedback analysis#37636
AndriySvyryd merged 6 commits intomainfrom
copilot/update-copilot-instructions-file

Conversation

Copy link
Contributor

Copilot AI commented Feb 5, 2026

  • Study PRs submitted by @copilot in this repo (including older PRs before Revert incorrect resource file DependentUpon changes #37518)
  • Analyze comments and feedback on Copilot PRs
  • Identify common problems that could be avoided
  • Update .github/copilot-instructions.md with findings
  • Run code review and address feedback
  • Address PR review comments

Changes Made

Based on reviewer feedback:

  • Removed overly specific Code Refactoring subsection (lines 145-147) - these parsing-specific guidelines are not common enough
  • Moved "After implementing a fix, review the surrounding code for similar patterns" to Implementation Guidelines section
  • Removed "PRs targeting release/* or feature/* branches require special permission" line
  • Simplified package version hardcoding guideline to unconditional "NEVER hardcode"
  • Changed pattern matching guideline from switch statements to switch expressions

Additional Analysis (PRs older than #37518)

Examined PRs: #37495, #37456, #37437, #37397, #37394, #37392, #37389, #37387, #37302, #37303, #37287, #37101

Key patterns found that reinforce existing instructions:

  • Remove unnecessary comments (multiple PRs)
  • Use var for local variables
  • Use is null / is not null pattern matching
  • Use using blocks with assertions inside in tests
  • Split large tests into focused tests
  • Reuse existing test fixtures instead of creating new classes
  • Reference correct issue numbers in test regions/classes

Additional Analysis (PRs older than #37101)

Examined PRs: #37056, #37054, #37052, #37020, #37019, #36986, #36772, #36771, #36751, #36750, #36717, #36671, #36670, #36669, #36668, #36667, #36666, #36665, #36651, #36650, #36649, #36648

Key patterns found that reinforce existing instructions:

These patterns are already covered by existing instructions (minimal comments, pattern matching, following existing test patterns, not adding unnecessary code). No additional instructions needed.

Original prompt

Study all the PRs submitted by @copilot in this repo and the comments on them, extract common problems that could be avoided if the instructions file had additional/different instructions.
Update the .github/copilot-instructions.md file based on the findings of the research


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 5, 2026 17:12
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Copilot instructions based on PR feedback Update Copilot instructions based on PR feedback analysis Feb 5, 2026
Copy link
Member

@AndriySvyryd AndriySvyryd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Also examine PRs older than #37518

…nalysis to Implementation Guidelines

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 5, 2026

@copilot Also examine PRs older than #37518

Examined older Copilot PRs (#37495, #37456, #37437, #37397, #37394, #37392, #37389, #37387, #37302, #37303, #37287, #37101). The main patterns found reinforce existing instructions - removing unnecessary comments, using var, using is null/is not null, using using blocks in tests, splitting large tests, and reusing test fixtures. No additional instructions needed beyond what's already covered.

@AndriySvyryd
Copy link
Member

@copilot Also examine PRs older than #37101

Copy link
Contributor Author

Copilot AI commented Feb 5, 2026

@copilot Also examine PRs older than #37101

Examined additional older Copilot PRs: #37056, #37054, #37052, #37020, #37019, #36986, #36772, #36771, #36751, #36750, #36717, #36671, #36670, #36669, #36668, #36667, #36666, #36665, #36651, #36650, #36649, #36648.

Key patterns found reinforce existing instructions:

These patterns are already covered by existing instructions (minimal comments, pattern matching, following existing test patterns, not adding unnecessary code). No additional instructions needed.

@AndriySvyryd AndriySvyryd marked this pull request as ready for review February 5, 2026 17:30
@AndriySvyryd AndriySvyryd requested a review from a team as a code owner February 5, 2026 17:30
Copilot AI review requested due to automatic review settings February 5, 2026 17:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the GitHub Copilot instructions file based on feedback analysis from previous Copilot-submitted PRs. The goal is to improve future Copilot PR quality by addressing common issues and patterns identified through systematic review of PRs #37495, #37456, #37437, and many others going back to #36648.

Changes:

  • Enhanced comment guidelines to explicitly emphasize minimal comments and self-explanatory code
  • Clarified pattern matching guidelines with concrete examples
  • Added cross-platform testing and dotnet-ef tool testing guidelines
  • Added new "Dependency and Version Management" section with proper version property usage
  • Added implementation guideline to review surrounding code for similar patterns
  • Added comprehensive "Pull Request Guidelines" section with servicing PR template

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndriySvyryd it's important to keep in mind that too much instructions is also a a problem, as it eats up the context window. I'm not sure what a good balance here is - we'll figure this out as we go along.

…ideline

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
@AndriySvyryd AndriySvyryd enabled auto-merge (squash) February 5, 2026 18:07
@AndriySvyryd AndriySvyryd merged commit f4f5226 into main Feb 5, 2026
10 checks passed
@AndriySvyryd AndriySvyryd deleted the copilot/update-copilot-instructions-file branch February 5, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants