Add GitHub Copilot instructions for repository#2352
Conversation
Co-authored-by: westonruter <[email protected]>
|
I'm in favor of adding some agent guidelines, however maybe we should use the more generic AGENTS.md? |
|
@adamsilverstein I initiated this PR due to Copilot prompting me to do so in #2346:
I defer to your expertise for the best way to do this. We do already have an |
|
Ah, according to the PR description:
|
|
I'm not sure why having something Copilot-specific is better. |
|
Something which is Copilot specific is adding a |
That was my main question when asking about using a more generic AGENTS.md. I'm primarily using Claude code and have built local Claude.md files, but I generally am gitignoring them so copilot in github wouldn't see them. If I did commit them, my expectation is that copilot would find them, or else I would just link to them from the copilot instruction or agent.md.
Oh that is interesting, ideally Copilot would be capable of testing PRs while working on them and this might provide a way to provide the instructions to do just that. |
|
Consider telling copilot about the recently released WordPress skills: https://github.com/WordPress/agent-skills |
Ah, it looks like Copilot does respect this file in the end: "You can create one or more AGENTS.md files, stored anywhere within the repository. When Copilot is working, the nearest AGENTS.md file in the directory tree will take precedence over other agent instructions files. For more information, see the openai/agents.md repository." |
|
Maybe we just have a
Update: Done in 1ea1a5b. |
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @Copilot. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| @@ -0,0 +1 @@ | |||
| Please see [AGENTS.md](../AGENTS.md). | |||
There was a problem hiding this comment.
Why this? Copilot already supports AGENTS.md, it should get picked up automatically.
Providing copilot-instructions.md is an alternative, which of course GitHub will document first because it's theirs, but it's not needed.
There was a problem hiding this comment.
Because Copilot nags if you don't have it, as seen in #2346
There was a problem hiding this comment.
But where does it nag about it? I think we should validate whether it's actually not respecting our AGENTS.md file without having this extra copilot-instructions.md, or whether it's just that GitHub's nag is overly aggressive.
If the latter, then that would be annoying, but it shouldn't justify changing the configuration - because having a file just to say "look in the other file", when it already anyway looks in the other file, is pointless and possibly even confusing.
There was a problem hiding this comment.
It nags about it in the PR description:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
And I confirmed that AGENTS.md is respected: #2352 (comment)
I wanted to see if adding the file would suppress the nag.
There was a problem hiding this comment.
It's worth as a test, but even if it works, I don't think we should do it. That would be optimizing for the (apparently buggy) nag rather than actual AI behavior.
There was a problem hiding this comment.
It seems Copilot CLI isn't respecting AGENTS.md: github/copilot-cli#489
So having this additional pointer may be useful beyond suppressing a nag.
There was a problem hiding this comment.
Hmm, that's odd. I know in VS Code you can configure that for Copilot. So maybe there's a way to do it for Copilot running on GitHub too.
Configures GitHub Copilot coding agent instructions per best practices documentation.
Changes
.github/copilot-instructions.mdwhich links to the existingAGENTS.mdfile..github/workflows/copilot-setup-steps.ymlper docs.The file complements the existing
AGENTS.mdby providing Copilot-specific quick reference for common development tasks and coding standards.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
gh.io/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.