-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Add Env Setup to Copilot Instructions #53785
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
Conversation
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 a new prerequisite instruction to the Copilot instructions file that directs Copilot to run the azsdk_verify_setup tool before executing other MCP tools to verify the user's development environment setup.
Key changes:
- Added a new prerequisite bullet point instructing Copilot to always run the
azsdk_verify_setuptool before other tools - Positioned this instruction at the top of the Prerequisites section for visibility
m-redding
left a comment
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.
This lgtm
| This repo contains Azure SDKs for various Azure services and tools that generate them. | ||
|
|
||
| ## Prerequisites | ||
| - Always run the [`azsdk_verify_setup`](../eng/common/instructions/azsdk-tools/verify-setup.instructions.md) tool to check the user's development environment setup for using SDK MCP tools. DO NOT PROCEED with running other tools before completing this step. Only skip for queries that don't need tools. |
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.
I think you'll have to use an absolute link to pass the pipeline
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.
The LLM seems to perform better with the relative link than if I linked to a web page, and I noticed some repos are currently using relative links 🤔 (example from rest-api-specs with check package readiness https://github.com/Azure/azure-rest-api-specs/blob/main/.github/copilot-instructions.md#release-readiness-of-sdk-and-information-about-the-release-pipeline )
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.
Ohh that's interesting, but that does make sense to me since copilot likes when things are available in the same workspace. It looks like the verify links is an eng/common check. I'm not totally sure where the requirement comes from, but maybe we could revisit
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.
@weshaggard for feedback on the link check.
I have seen in some repos the CI fails and in some it doesn't.
FYI the check is in place because our guidelines say that we should always use absolute paths
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.
Yes our link checker ensures links are absolute because most of them get published to docs sites outside of our repo.
However for instructions @jeo02 found a workaround which is to use a link like #file:../eng/common/instructions/azsdk-tools/verify-setup-instructions.md as our link checker sees that as a anchor link but it appears to still be resolved correctly by the LLM.
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.
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.
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.
#file:path would only work if the file your trying to refer is in the same directory which is not the case here unfortunately. I believe in the copilot instructions in rest-api-specs we still use the relative path to refer to instructions under common/instructions.
GitHub links are hit or miss as it is up to copilot to follow it in the moment whereas relative links will add the whole file referenced to the end of the copilot instructions. (You can see this in the Copilot Logs)
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.
Ok if we need to use relative links in these MD files we can either override the link checking or opt-out these instructions from link checking.
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.
I've got PR Azure/azure-sdk-tools#12863 which will disable these link guidelines for instruction files. For now, we can by-pass this check and merge this PR.



Azure/azure-sdk-tools#12592
Example of implicitly running this tool before running a different requested tool

Explicit invokation
