// agreement
copilot-instructions.md
How Copilot should behave on this repo.
For GitHub Copilot CLI users
Custom instructions tell Copilot how to behave. They do not tell Copilot what is in your repo. Maguyva indexes the codebase and serves it back over MCP, so GitHub Copilot CLI edits like it has already read the code.
Free tier: 3 repos, 50K indexed lines, no card.
Use instructions for behavior. Use Maguyva for current codebase facts.Four ideas. Each one does one job.
// agreement
How Copilot should behave on this repo.
// transport
How Copilot reaches for external tools and context.
// codebase
The MCP server that returns grounded repo facts.
// who pays
Agents don’t pay seats. See pricing
# .github/copilot-instructions.md
- Prefer the existing module boundaries.
- Run the repo test command before you propose a merge.
- Do not invent file paths. Ask before you create a new package.Persistent instructions belong in .github/copilot-instructions.md. It is the right place for:
That file was never a queryable index of the repo. It tells Copilot how to work. It does not tell Copilot what is there.
Four failure modes Copilot cannot fix from a markdown file.
Telling Copilot how to behave does not tell it which class owns parseConfig, or which package actually implements the public API. The first edit on an unfamiliar tree is a guess at file structure.
An instructions block describing last quarter’s auth flow is confidently wrong the day someone splits the session store. Copilot will prefer the file you committed over the code that shipped.
“What imports this?” is a graph question. Instructions cannot list every caller, and you would not want them to.
Stuffing more of the repo into instructions trades reasoning tokens for a stale snapshot. Past a few KB you are paying for a worse map.
Copilot already thinks in instructions and tools.
copilot-instructions.md
agreement
how Copilot behaves
MCP
the channel
how it reaches
Maguyva
codebase facts
what it sees
Custom instructions tell Copilot how to behave.
Maguyva gives Copilot a queryable map of the code.
Ask the map before you accept the diff.
// workflow 01
copilot> how does normalizePhoneNumber handle E.164? semantic::query("normalize phone E.164") src/util/phone.ts:88 normalizePhoneNumber() ← real impl test/util/phone.spec.ts:14 jest.mock(...) ← stub → Copilot opens the implementation, not the mock. [exit 0]
Names lie. Mocks shadow real code. Maguyva ranks the real implementation above the test mock.
// workflow 02
copilot> what calls QueueDispatcher.publish? graph::callers(QueueDispatcher.publish) 3 in src/billing/* 1 in src/audit/* 1 in src/notifications/* → The diff is grounded against real importers. [exit 0]
Cross-package call-sites surface inline. The diff is grounded against real importers, not Copilot’s grep.
// workflow 03
copilot> rename PaymentClient → BillingClient graph::callers(PaymentClient) 12 references across 7 packages graph::importers(src/payments/client.ts) 9 importers graph::extends(PaymentClient) 2 subclasses (RetryClient, MockClient) → Copilot proposes a migration with the file list inline. [exit 0]
Copilot asks Maguyva for dependents before it starts editing. The migration list comes back grounded in the actual graph, not Copilot’s recollection.
Three steps. Free tier: 3 repos, 50K indexed lines, no card.
// step 01
Pick one you already know, so you can grade the answers. Sign up free, connect GitHub, wait for the index.
// step 02
copilot mcp add --transport http --header "Authorization: Bearer mgv_xxxx" maguyva https://maguyva.tools/mcp~/.copilot/mcp-config.json
{
"mcpServers": {
"maguyva": {
"type": "http",
"url": "https://maguyva.tools/mcp",
"headers": {
"Authorization": "Bearer mgv_xxxx"
}
}
}
}// step 03
Do not start with the whole company. Ask one question whose answer you already know, then open the cited file.