Share via

GitHub Copilot Code Review on GitHub.com seems to ignore custom instructions and shared documentation guidance

An, Jessie (GE Appliances, Haier) 0 Reputation points
2026-03-23T01:57:03.68+00:00

Hello, I am trying to make GitHub Copilot Code Review on GitHub.com use repository-specific guidance, but it does not seem to follow it consistently.

What I am trying to do

I want Copilot Code Review to use shared documentation when reviewing pull requests. In my repository, I added guidance in .github/copilot-instructions.md telling Copilot to review and follow documents under doc/getting-started/.

Example instruction:

## Shared Documentation Guidance

The directory `doc/getting-started/` is provided from the `refrigeration.getting-started` repository as a Git submodule.

When working in this repository:

- Always review and follow the documents under `doc/getting-started/` before making changes.

- Treat `doc/getting-started/` as a source of truth for shared guidance, design context, and conventions.

- Before making recommendations or code changes based on `doc/getting-started/`, explicitly identify the relevant document path and summarize or quote the rule being applied.

- Do not modify files under `doc/getting-started/` from this repository unless the task is explicitly about updating the submodule reference.

- If there is a conflict between existing code assumptions and the documentation in `doc/getting-started/`, raise the discrepancy and follow the documented guidance unless instructed otherwise.

What I expected

I expected Copilot Code Review to:

  • consider the documents under doc/getting-started/
  • apply the rules from those documents during review
  • ideally mention the relevant document path or rule when making review comments

What I observe

Copilot review still produces the default review format and generic comments. It does not appear to explicitly use or cite the guidance from doc/getting-started/, even after I updated copilot-instructions.md.

I also tested this on a fork and on a development branch, but the behavior was the same.

Additional context

  • The shared documentation is included as a Git submodule under doc/getting-started/
  • I can get better behavior in Copilot Agent sessions by directly prompting it to read those files
  • The issue seems specific to GitHub.com Copilot Code Review

My question

Is this a current limitation of GitHub Copilot Code Review on GitHub.com?

More specifically:

  1. Does Copilot Code Review actually support .github/copilot-instructions.md reliably?
  2. Can it use documentation located in a Git submodule?
  3. Is there any supported way to make Code Review use repository documentation as a real source of truth?
  4. If not, is this only supported in Copilot Chat / Coding Agent sessions?

Any clarification or recommended workaround would be appreciated.Hello, I am trying to make GitHub Copilot Code Review on GitHub.com use repository-specific guidance, but it does not seem to follow it consistently.

What I am trying to do

I want Copilot Code Review to use shared documentation when reviewing pull requests.
In my repository, I added guidance in .github/copilot-instructions.md telling Copilot to review and follow documents under doc/getting-started/.

Example instruction:

## Shared Documentation Guidance
The directory `doc/getting-started/` is provided from the `refrigeration.getting-started` repository as a Git submodule.
When working in this repository:
- Always review and follow the documents under `doc/getting-started/` before making changes.
- Treat `doc/getting-started/` as a source of truth for shared guidance, design context, and conventions.
- Before making recommendations or code changes based on `doc/getting-started/`, explicitly identify the relevant document path and summarize or quote the rule being applied.
- Do not modify files under `doc/getting-started/` from this repository unless the task is explicitly about updating the submodule reference.
- If there is a conflict between existing code assumptions and the documentation in `doc/getting-started/`, raise the discrepancy and follow the documented guidance unless instructed otherwise.

What I expected

I expected Copilot Code Review to:

  • consider the documents under doc/getting-started/
  • apply the rules from those documents during review
  • ideally mention the relevant document path or rule when making review comments

What I observe

Copilot review still produces the default review format and generic comments.
It does not appear to explicitly use or cite the guidance from doc/getting-started/, even after I updated copilot-instructions.md.

I also tested this on a fork and on a development branch, but the behavior was the same.

Additional context

  • The shared documentation is included as a Git submodule under doc/getting-started/
  • I can get better behavior in Copilot Agent sessions by directly prompting it to read those files
  • The issue seems specific to GitHub.com Copilot Code Review

My question

Is this a current limitation of GitHub Copilot Code Review on GitHub.com?

More specifically:

  1. Does Copilot Code Review actually support .github/copilot-instructions.md reliably?
  2. Can it use documentation located in a Git submodule?
  3. Is there any supported way to make Code Review use repository documentation as a real source of truth?
  4. If not, is this only supported in Copilot Chat / Coding Agent sessions?

Any clarification or recommended workaround would be appreciated.

Microsoft Copilot | Other
0 comments No comments

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-03-23T01:57:34.99+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The behavior described is a current limitation of how Copilot features work across products, and the context only documents reliable support for .github/copilot-instructions.md in Visual Studio and some IDE/extension scenarios, not in GitHub.com Code Review.

    Based on the available information, the questions can be answered as follows:

    1. Does Copilot Code Review on GitHub.com actually support .github/copilot-instructions.md reliably?
      The documented, reliable support for .github/copilot-instructions.md is for Copilot in IDEs such as Visual Studio and for inline/chat usage, where Copilot automatically reads the instructions file and applies it to suggestions and chat responses. The context does not document equivalent, reliable support for .github/copilot-instructions.md in GitHub.com Copilot Code Review. The observed behavior (generic comments, no explicit use of the instructions) is consistent with this limitation.
    2. Can it use documentation located in a Git submodule?
      The context does not document any support for Copilot Code Review on GitHub.com explicitly reading or prioritizing documentation from Git submodules. The only documented mechanisms for adding guidance are:
      • Instructions files such as .github/copilot-instructions.md and targeted *.instructions.md files, which are described for Visual Studio and IDE-based Copilot usage.
      • Agent mode and MCP-based tools, again in the context of IDEs and Copilot Chat, not GitHub.com reviews. There is no documented mechanism guaranteeing that GitHub.com Code Review will traverse and interpret submodule content as a first-class knowledge source.
    3. Is there any supported way to make Code Review use repository documentation as a real source of truth?
      The context documents supported ways to make Copilot use project documentation and conventions primarily in IDE/chat scenarios:
      • .github/copilot-instructions.md for global project guidance.
      • .github/instructions/*.instructions.md with applyTo patterns to scope guidance to specific files or folders.
      • Custom agents and MCP tools that can connect to style guides or other documentation.
      These mechanisms are explicitly described for Visual Studio Copilot Chat and agent mode, where the instructions files are attached as references and used to shape responses. The context does not state that GitHub.com Copilot Code Review consumes these instruction files or repository docs as a strict “source of truth” in the same way. A practical, supported workaround is to:
      • Use Copilot Chat / agent mode in Visual Studio (or other supported IDEs) where .github/copilot-instructions.md and *.instructions.md are honored and listed as references.
      • Store project rules and design guidance in those instruction files so that chat and code-generation behavior consistently follows them.
    4. If not, is this only supported in Copilot Chat / Coding Agent sessions?
      Yes, the documented behavior for:
      • Automatically loading .github/copilot-instructions.md and .github/instructions/*.instructions.md.
      • Applying them to responses.
      • Showing them in the “References” list.
      • Using custom agents that connect to style guides via MCP.
      is specific to Copilot Chat and agent mode in Visual Studio and similar IDE integrations. This is where repository-specific guidance is officially supported and visible as part of the context for responses.

    Given the documentation, the most reliable way to enforce repository documentation and shared guidance today is to:

    • Put the rules into .github/copilot-instructions.md and, if needed, more granular .github/instructions/*.instructions.md files with appropriate applyTo patterns.
    • Use Copilot Chat / agent mode in supported IDEs (for example, Visual Studio) for reviews and code changes that must follow those rules.
    • Treat GitHub.com Copilot Code Review as a more generic assistant that may not fully honor or cite those instruction files or submodule documentation.

    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.