Skip to content

Add GitHub Copilot instructions for repository#2352

Open
Copilot wants to merge 5 commits intotrunkfrom
copilot/setup-copilot-instructions
Open

Add GitHub Copilot instructions for repository#2352
Copilot wants to merge 5 commits intotrunkfrom
copilot/setup-copilot-instructions

Conversation

Copy link
Contributor

Copilot AI commented Jan 15, 2026

Configures GitHub Copilot coding agent instructions per best practices documentation.

Changes

  • Added .github/copilot-instructions.md which links to the existing AGENTS.md file.
  • Added .github/workflows/copilot-setup-steps.yml per docs.

The file complements the existing AGENTS.md by 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
    • Triggering command: /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

This section details on the original issue you should resolve

<issue_title>✨ Set up Copilot instructions</issue_title>
<issue_description>Configure instructions for this repository as documented in Best practices for Copilot coding agent in your repository.

</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ 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 changed the title [WIP] Set up Copilot instructions for repository Add GitHub Copilot instructions for repository Jan 15, 2026
Copilot AI requested a review from westonruter January 15, 2026 18:59
@adamsilverstein
Copy link
Member

I'm in favor of adding some agent guidelines, however maybe we should use the more generic AGENTS.md?

@westonruter
Copy link
Member

@adamsilverstein I initiated this PR due to Copilot prompting me to do so in #2346:

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

I defer to your expertise for the best way to do this.

We do already have an AGENTS.md introduced in #2193, so maybe Copilot is just not aware of it?

@westonruter
Copy link
Member

Ah, according to the PR description:

The file complements the existing AGENTS.md by providing Copilot-specific quick reference for common development tasks and coding standards.

@westonruter
Copy link
Member

I'm not sure why having something Copilot-specific is better.

@westonruter
Copy link
Member

@adamsilverstein
Copy link
Member

I'm not sure why having something Copilot-specific is better.

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.

Something which is Copilot specific is adding a copilot-setup-steps.yml workflow: https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment

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.

@adamsilverstein
Copy link
Member

Consider telling copilot about the recently released WordPress skills: https://github.com/WordPress/agent-skills

@westonruter
Copy link
Member

That was my main question when asking about using a more generic AGENTS.md.

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."

https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions#creating-custom-instructions

@westonruter
Copy link
Member

westonruter commented Feb 1, 2026

Maybe we just have a .github/copilot-instructions.md which links to AGENTS.md? This would get rid of the following blurb on Copilot PRs, I believe:

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

Update: Done in 1ea1a5b.

@westonruter westonruter added [Type] Documentation Documentation to be added or enhanced no milestone PRs that do not have a defined milestone for release skip changelog PRs that should not be mentioned in changelogs labels Feb 2, 2026
@westonruter
Copy link
Member

@westonruter westonruter marked this pull request as ready for review February 2, 2026 00:40
@github-actions
Copy link

github-actions bot commented Feb 2, 2026

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 props-bot label.

Unlinked Accounts

The 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.

Unlinked contributors: Copilot.

Co-authored-by: westonruter <[email protected]>
Co-authored-by: felixarntz <[email protected]>
Co-authored-by: adamsilverstein <[email protected]>

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).
Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member

Choose a reason for hiding this comment

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

Because Copilot nags if you don't have it, as seen in #2346

Copy link
Member

Choose a reason for hiding this comment

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

Or, heh, even this own PR.

Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no milestone PRs that do not have a defined milestone for release skip changelog PRs that should not be mentioned in changelogs [Type] Documentation Documentation to be added or enhanced

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Set up Copilot instructions

4 participants