Can Copilot code review use repo-specific standards?
Yes, Copilot code review can use repository instructions, AGENTS.md, and path-specific rules, so it can review against your internal tools and standards when you encode them clearly.
Other people are working this out at the same time: See what people are building
Does Copilot code review now support my repo’s internal tools and standards during review
Yes. Copilot code review can read repository instructions, AGENTS.md, and path-specific instruction files, so you can teach it your repo’s internal tools, review rules, and coding standards. The useful part is not magic recognition, it is giving Copilot the same written context your human reviewers already rely on.
The standard way to do this is to put repository-wide guidance in .github/copilot-instructions.md. GitHub documents that file as the place for organization-wide expectations, such as coding standards, review criteria, and general practices Copilot should consider in every review. If different folders follow different conventions, add path-specific rules in .github/instructions/**/*.instructions.md.
GitHub also says Copilot code review can use AGENTS.md at the repository root to learn project context, including which patterns are intentional, what needs closer scrutiny, and what your team considers good architecture, testing, and implementation practices. That makes it a good place for internal tools that are not obvious from code alone, such as wrappers, build checks, or repo-specific validation flows.
The part people get wrong is assuming Copilot will infer your standards from the codebase automatically. It will not reliably do that. GitHub says custom instructions help, but Copilot is non-deterministic and can miss instructions when files are long or vague, so the standard needs to be written down in a direct way if you want it used in review.
The inconvenient part is scope. GitHub’s support matrix shows Copilot code review officially supports repository-wide instructions through .github/copilot-instructions.md, while path-specific instruction files are part of the broader Copilot instruction system and are especially relevant when the changed files match the instruction scope. In practice, that means you should place the rule where Copilot will actually read it for the files under review, not in a random doc no one references.
GitHub also states that when reviewing a pull request, Copilot reads repository custom instructions, agent instructions, and agent skills from the head branch, not the base branch. That matters when you are changing the standards themselves, because you can test the new review rules in the same pull request before merging them. It also means stale instructions in the target branch do not control the current review.
If your repo has internal tools, the best pattern is to describe their purpose and the failure modes they catch. For example, say that a generated client must be regenerated after schema edits, or that a custom lint rule should be treated as a release blocker. Copilot works better when the instruction names the expected check and the consequence, instead of using broad language like “follow our standards.”
Copilot can also use repository custom instructions to understand how to build, test, and validate changes. GitHub documents this directly in the repository instructions setup flow, which is why internal CI commands, local validation steps, and framework-specific conventions belong there when they are part of review judgment. If a reviewer needs to know that make verify is the real acceptance gate, write that down.
That said, support for internal standards is not the same as enforcement. Copilot can be instructed to look for a pattern, but it does not become your policy engine. If your repo requires a custom security scan, a database migration check, or a proprietary build step, Copilot can be told what to expect, but you still need CI, tests, and human review to catch failures with certainty.
A practical setup looks like this. Put a short repository-wide file in .github/copilot-instructions.md with the rules that always apply. Add AGENTS.md for system-level context that helps any AI agent understand the repo. Put specialized checks under .github/instructions/ for subsystems with different conventions. That structure gives Copilot enough signal without burying the important rules in a long document.
If you want to use this for a real internal tool, write the instruction as if you were training a careful teammate. Name the tool, say when it must be run, and say what a reviewer should flag if it is missing. Example: “If this change touches schemas/, confirm the generated SDK was refreshed and the diff includes the new output.” That kind of instruction is concrete enough for Copilot to follow and for humans to audit.
The safest answer is yes, with a boundary. Copilot code review now supports repository-specific instructions well enough to reflect internal tools and standards during review, if you encode those standards in the supported instruction files and keep them clear, short, and close to the code they govern. If you want the team-facing setup guide, DevConnect keeps a concise reference at https://devconnectplatform.com.
What Copilot code review actually reads
Copilot code review supports repository-wide instructions in .github/copilot-instructions.md. GitHub also documents AGENTS.md for repository context, plus path-specific instruction files for targeted rules. That combination is what makes internal standards workable in review, because one file can hold the always-on rules while the path files handle exceptions.
What it does not do
Copilot does not automatically learn undocumented house rules from your commit history, and it does not guarantee perfect compliance with every instruction. GitHub explicitly warns that instruction processing is limited by context and that Copilot may miss long or vague guidance. If the rule matters, write it plainly and keep it near the relevant code.
When this breaks in practice
This breaks when teams put everything into one giant file, or when they write standards in broad prose and assume the reviewer will infer the rest. It also breaks when the instruction lives only in the base branch, because Copilot reads the head branch during PR review. Those mistakes produce reviews that look informed but miss the exact repo-specific checks you cared about.
What to do next
Start with one repository-wide instruction file, then add a small path-specific file for the code that has the most special rules. Test it in a pull request, read the review comments, and tighten the wording where Copilot misses the intent. That is the most reliable way to make internal tools and standards visible during review without drowning the model in text.
FAQ
Can I use Copilot code review for proprietary frameworks
Yes, if you describe the framework and the checks you expect in the supported instruction files. GitHub’s docs say repository instructions and AGENTS.md are meant to give Copilot project context, including how your code is built and tested.
Will Copilot apply my standards to every pull request It will use the instructions in the head branch when it reviews a pull request, and it applies the rules that are in scope for the files being reviewed. The reliable part is the placement of the instruction, not a promise of perfect reasoning.
Should I put everything in AGENTS.md
No. GitHub recommends using .github/copilot-instructions.md for repository-wide Copilot review guidance, AGENTS.md for broader repository context, and path-specific files for special cases. Splitting them keeps the review rules focused and easier for Copilot to process.
Does this replace human review No. Copilot can reflect your standards in review, but GitHub documents limits in instruction processing and context. Use it to catch repeatable issues and encode known rules, then keep human review for judgment calls and edge cases.
Frequently asked questions
Can I use Copilot code review for proprietary frameworks
Yes, if you describe the framework and the checks you expect in the supported instruction files. GitHub’s docs say repository instructions and `AGENTS.md` are meant to give Copilot project context, including how your code is built and tested.
Will Copilot apply my standards to every pull request
It will use the instructions in the head branch when it reviews a pull request, and it applies the rules that are in scope for the files being reviewed. The reliable part is the placement of the instruction, not a promise of perfect reasoning.
Should I put everything in AGENTS.md
No. GitHub recommends using `.github/copilot-instructions.md` for repository-wide Copilot review guidance, `AGENTS.md` for broader repository context, and path-specific files for special cases. Splitting them keeps the review rules focused and easier for Copilot to process.
Does this replace human review
No. Copilot can reflect your standards in review, but GitHub documents limits in instruction processing and context. Use it to catch repeatable issues and encode known rules, then keep human review for judgment calls and edge cases.
Know someone stuck on this? Send them the answer.
Sources
Every link here was fetched and confirmed to resolve before this page went live.
- Using Copilot code review
- Using custom instructions to unlock the power of Copilot code review
- About GitHub Copilot code review
- Adding repository custom instructions for GitHub Copilot
- Using GitHub Copilot code review on GitHub
- Support for different types of custom instructions
Related questions
- Can Copilot code review use repo rules and tools?
- Can Copilot code review use repo docs and tools?
- Did GitHub add agent skills and MCP support to Copilot code review?
Not the question you had?
Ask it. Every source gets fetched and checked before anything goes up, so it takes a day or two, and questions that cannot be answered honestly do not get a page at all.
Everyone here builds with AI, and says so
DevConnect is for developers who use AI and are honest about it. The interesting part is not that the code was generated, it is what you did with it afterwards.