-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add Copilot instructions to validate change notes #20667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Added a validation guide for query-pack change notes, including file naming conventions, frontmatter requirements, and examples of valid and invalid entries.
Added a validation guide for library-pack change notes, including file naming conventions, frontmatter requirements, and examples of valid and invalid entries.
There was a problem hiding this 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 adds validation instructions for change note files in both query-packs and library-packs to enable Copilot to provide automated feedback during code reviews.
- Introduces standardized validation guidelines for change note file names, frontmatter structure, and content format
- Defines category-specific rules for query-pack and library-pack change notes
- Provides clear examples of valid and invalid change note patterns
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/instructions/query-pack-change-notes.instructions.md |
Defines validation rules for query-pack change notes including file naming, required frontmatter categories (breaking, deprecated, newQuery, queryMetadata, majorAnalysis, minorAnalysis, fix), and content formatting requirements |
.github/instructions/library-pack-change-notes.instructions.md |
Defines validation rules for library-pack change notes with library-specific categories (breaking, deprecated, feature, majorAnalysis, minorAnalysis, fix) and identical file naming and formatting requirements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @esbena suggested, I think it's better to not repeat information already contained in change-notes.md, and just direct Copilot to reading that file, which lowers the probability we need to touch up these files. What I think is very valuable in these files though are the invalid examples, and what exactly is a library vs a query pack change note (as indicated by the applyTo field). For the query pack kind, I'd either specify it here or make it clearer in the change-notes.md file and let Copilot pick that up from there.
Another suggestion: we should probably specify a few more style guidelines in the change-notes.md file. Where it says
For consistency, change notes should use American English.
we can also add
They should be fully formed paragraphs, starting with a capital letter, correctly punctuated and ending with a period.
|
I strongly agree that if we can keep the specifications in one place then we should, to reduce the burden of updating it in two places in future. A bit off topic so feel free to ignore this: another thing that we could specify more clearly (though this should probably go in the markdown guide) is how to refer to queries: I see both |
@redsun82 @owen-mc, I considered referring Copilot to Consider the following screenshots of a file-naming violation:
Another reason for this approach is that |
|
Given the feedback above about duplicating
And yet...
Perhaps the instructions or |
|
For the sake of argument, I tested the reverse: I inlined the
All in all, it doesn't seem to make much of a difference whether the change-note guidelines are embedded directly into the Copilot instructions or elsewhere. The results seem subpar and inconsistent. |
|
Thanks for doing that testing. That is disappointing. Do you think it is worth merging the PR anyway, in the hope that copilot will improve in future? We could also give this as feedback so that people working on copilot could look into why it isn't performing well in this situation. |
I do, since it could still be helpful at least some of the time. And, as you said, it will likely improve. Additionally, since it doesn't make much difference where the instructions live, it makes sense to not repeat ourselves. I'll adjust the PR to keep them in |
Move and consolidate change-note validation guidance into docs/change-notes.md, removing the separate query- and library-pack instruction files. Add a generic .github/instructions/change-notes.instructions.md (applyTo: "**/change-notes/*.md") that tells reviewers to ensure change notes follow the docs and to leave clear review comments and code suggestions when they do not.
@owen-mc, I've learned that Copilot Code Review does not support this ☝️ . To quote:
Given that, since we don't wish to duplicate information, perhaps it would be best to keep the information in |


This pull request introduces two new instruction files that provide validation guides for change notes in library-packs and query-packs. These guides follow the format, required frontmatter, and content of Markdown change-note files as defined by the
docs/change-notes.mdguide. The only difference is that Copilot can act on these guides to provide actionable suggestions if it detects a violation in a change note.