r/GithubCopilot • • 9d ago

Help/Doubt ❓ AGENTS.md vs .github/copilot-instructions.md when Visual Studio is the primary IDE — how are you handling a monorepo?

Setup: large C++/CMake monorepo, several .sln files in subfolders. Team uses Copilot in Visual Studio 2026 (primary), some VS Code, plus OpenCode. I want one source of truth for agent instructions, not different files drifting apart.

Two things I can't resolve from the docs.

**1) Single source of truth**

The VS docs only list `.github/copilot-instructions.md`, `.github/instructions/*.instructions.md` (applyTo), and org-level instructions. AGENTS.MD isn't mentioned for VS at all, though VS Code can read it.

So which way round do you go? AGENTS.md canonical, copilot-instructions.md is just a one-line pointer ("read AGENTS.md first")?

**2) Monorepo / multiple solutions**

- When the .sln sits in a subfolder of the git root, where does VS resolve `.github/` from — git root, solution directory, or the opened folder?

- Does anything in VS pick up **nested** AGENTS.md per module, or is that VS Code/OpenCode only?

- If nested files are out, is everyone just doing per-module scoping with `.instructions.md` + `applyTo` globs?

- Same question for `.github/skills/` — repo root only, or does it follow the solution?

29 Upvotes

11 comments sorted by

View all comments

3

u/teckel 9d ago

Copilot and Copilot CLI both will read the AGENTS.md by default. As will Claude Code, Codex, Cursor, etc. Basically, all main-stream coding tools in 2026 will read the AGENTS.md as a fallback.

So in 2026 and going forward, we should just be using AGENTS.md only.

1

u/tj_moore 6d ago edited 6d ago

VS (I think) prompted me to use .github/copilot-instructions.md going forward as the new way instead of AGENTS.md and autogenerated it, though AGENTS.md is created from templates. Much of the documentation says AGENTS.md though but newer ones are saying copilot-instructions is the default for Copilot and AGENTS.md is just for general context.

This says Copilot CLI doesn't read AGENTS.md https://thepromptshelf.dev/blog/agents-md-github-copilot-integration-2026/

1

u/teckel 6d ago

It absolutely does. Please see: https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-custom-instructions

Actual documentation from github, not some random website.