What Is a Copilot Instructions File (copilot-instructions.md)?
A Copilot instructions file is a Markdown file, .github/copilot-instructions.md, that gives GitHub Copilot standing guidance for a repository. GitHub Copilot instructions in the file apply in chat, in the coding agent and in Copilot code review, so the team doesn’t repeat the same context in every prompt.
The file usually holds the project’s stack, build and test commands, coding standards and things to avoid. Teams can add path-scoped files for parts of the codebase and organization-wide instructions for every repository.
Instructions guide the assistant. Whether a review checks the same rules, and keeps them in step when the file changes, depends on the reviewer.
What Changed in Copilot Instructions Files in 2026
In 2026 the Copilot instructions file grew from one repository file into one of several overlapping instruction sources.
Instructions moved up to the organization. Organization custom instructions became generally available for Copilot Business and Enterprise and apply in chat, code review and the cloud agent (April 2, 2026, GitHub).
Review started reading the whole file. GitHub removed the 4,000-character limit on instruction files for Copilot code review (June 12, 2026, GitHub).
Review began reading the PR’s own branch. Copilot code review switched to reading instructions from the head branch of the PR and also began reading REVIEW.md, CLAUDE.md and GEMINI.md (July 17, 2026, GitHub).
Copilot files sit next to other agent files. A study of 2,853 repositories found copilot-instructions.md in 36.0% of them, behind CLAUDE.md at 45.9% and AGENTS.md at 39.5% (June 30, 2026, arXiv preprint).
Many files repeat what a linter already checks. A study of agent instruction files in 100 popular repositories found linter rules in 62% of them (June 14, 2026, arXiv preprint).
Central standards are still the exception. 41.7% of surveyed engineering leaders reported centralized AI coding standards (September 23, 2026, Qodo’s State of AI Code Quality report).
More files and more places that read them make the question of which copy is the source of truth harder, which is where Qodo’s take starts.
Where Copilot Instructions Files Live
GitHub supports several kinds of instruction files, and Copilot combines the ones that apply.
| File | Location | Applies to |
|---|---|---|
| Repository instructions | .github/copilot-instructions.md | The whole repository |
| Path-scoped instructions | .github/instructions/NAME.instructions.md with an applyTo pattern | Files that match the pattern |
| Agent instructions | AGENTS.md (the nearest file wins), or CLAUDE.md or GEMINI.md at the root | Copilot’s agent and code review |
| Organization instructions | Added by admins in organization settings | Every repository in the organization |
For Copilot Chat on GitHub.com, GitHub’s docs rank personal instructions first, then path-scoped, repository-wide, agent and organization instructions. Other Copilot features combine the files without a general order. A path-scoped file can use excludeAgent: "code-review" to keep its guidance out of review.
What to Put in a Copilot Instructions File
Short, specific instructions work best. Most good files cover four things:
- Project context: languages, frameworks and how the repository is laid out.
- Commands: how to build, test and lint.
- Standards that need judgment: domain naming, error handling, where business logic belongs.
- Things to avoid: deprecated libraries, patterns the team has retired.
Leave case style and formatting to the linter. The 2026 research found linter rules are the most common clutter in agent instruction files.
How Copilot Code Review Uses the File
Copilot code review uses custom instructions when the repository setting is on, which is the default. Since July 17, 2026, review reads the instructions from the PR’s head branch, so the version in the change under review is the one the reviewer follows.
The head-branch change means a PR can also edit the instructions its own reviewer reads. Teams that care about review consistency often put instruction files under CODEOWNERS so changes to them get human review. For the review feature itself, see GitHub Copilot code review.
Copilot Instructions File vs AGENTS.md
Both files tell an assistant how to work in a repository. copilot-instructions.md is GitHub Copilot’s own format, while AGENTS.md is a shared format read by many coding agents, Copilot included.
Repositories that use several assistants often keep both, and the content drifts apart. See AGENTS.md files and coding agent rules.
Qodo’s Take: An Instructions File Is a Start, Not a Source of Truth
An instructions file guides the assistant while it writes. The file is a good place to start a review rulebook, because the team has already written down what it cares about.
The file is a poor place to manage that rulebook over time, because files drift, copies multiply and nobody tracks which rule is still meant.
In Qodo’s enterprise evaluations, teams were surprised that deleting a rule in an instructions file didn’t remove it from review.
Choose Qodo if your teams keep rules in many instruction files and need one rulebook. Qodo imports the file’s rules into its Rules tab and picks up new rules from merged changes automatically. The Rules tab is the place to edit, retire and track rules, and a re-import picks up a file added later.
Qodo reviews pull requests in the Git provider, separate from Copilot. You shouldn’t review code with the same tool that wrote it, so the rules a team writes for its assistant are worth checking again in a separate review layer.
Qodo is the best AI code review platform to support Copilot instructions files because it imports the rules you already wrote in copilot-instructions.md, enriches them with severity and scope, and checks them on every PR from one Rules tab once Rule enforcement is on.
Qodo Imports Copilot-instructions.md and Other Agent Files
Rule enforcement, in Beta, imports rules from copilot-instructions.md, AGENTS.md, CLAUDE.md, GEMINI.md, .cursor/rules/, Skills folders and other files (last checked October 2026, Qodo’s docs). Imported rules get a category, severity, scope and examples. Organizations onboarded since September 30, 2026 get imported rules active straight away; older organizations see them as Pending first.
Qodo Adds New Rules Automatically, so Manage Changes in the Rules Tab
Qodo’s docs say: "Only new rules are added this way. Changes to or deletions of existing rules in these files aren’t reflected." Teams edit or deactivate those rules in the Rules tab, and re-import a repository to pick up a file added later (last checked October 2026, Qodo’s docs).
Qodo Scopes Rules to the Folder That Holds the File
A file in a subfolder, such as src/payments/AGENTS.md, applies only under that folder, and a root file applies to that repository only (Qodo’s docs). See custom rules for code review.
Qodo Example: The Rule That Wouldn’t Go Away
Context: a SaaS company with about 200 engineers keeps copilot-instructions.md files in dozens of repositories. The company’s developer experience lead imports them into Qodo so one Rules tab holds the team’s review rules.
Problem: months later, a developer deletes an old logging rule from one file, but Qodo keeps flagging it, because deleting a rule from the file doesn’t remove it from Qodo automatically.
How Qodo helped: the lead deactivates the rule in Qodo’s Rules tab, where imported rules are edited, retired and tracked.
Outcome: the stale findings stop, and the team agrees that rule changes start in the Rules tab and the files follow.
Ways to Use Copilot Instructions in Code Review
The table compares common ways to bring instruction-file rules into review. For tools that review agent PRs, see agentic code review tools for enterprise teams.
| Option | Where it runs | Limit | Best for |
|---|---|---|---|
| Copilot code review with instructions | GitHub PRs | Reads the PR’s head branch; GitHub only | Teams on Copilot and GitHub |
| Human review against the file | The PR | Depends on reviewers remembering the rules | Small teams |
| Linters in CI | CI | Rules only, no judgment | Formatting and case style |
| Qodo | The PR; imports work on GitHub, GitLab, Bitbucket Cloud and Azure DevOps | New rules sync from merged files, and the Rules tab manages edits; rule enforcement is Beta | Enterprise teams that need one rulebook from many instruction files |
Qodo features in this table were checked against Qodo’s documentation as of October 27, 2026.
FAQ
Choose Qodo to turn copilot-instructions.md, AGENTS.md, CLAUDE.md and other agent files into one rulebook checked on every pull request once Rule enforcement is on. Copilot code review also reads the file on GitHub. Pick a tool that tells you how it handles edits and deletions in the file after the first import.
In the .github folder at the root of the repository, as .github/copilot-instructions.md. Path-scoped files go in .github/instructions/ and end in .instructions.md.
Pick one place and make the others follow it. In Qodo, the Rules tab is the place to edit and retire imported rules, because edits and deletions in the original file aren’t applied automatically.
Either works as a starting point. What matters is that review reads them, that rules are scoped to the code they cover and that one owner manages changes.
Yes. The same written rules can steer the assistant while it writes and be checked on the PR. Keeping the review copy in one managed place stops the two from drifting apart.