Prerequisites
Before using Cross Repo Context, make sure you have:- Installed the Augment GitHub App and granted it access to both your primary repository and any external repositories you want to reference. See Install Augment GitHub App for setup instructions.
- Configured Augment Code Review for your repositories with review triggers enabled. See the Enterprise Setup Guide or Setup Guide for Other Plans.
- Added the Augment MCP server to your Code Review configuration. Navigate to MCP for Code Review and add
https://api.augmentcode.com/mcpas a remote MCP server. See MCP Servers for details.
Reviewing code that depends on external repositories
Many projects depend on code that lives in other repositories — SDKs, shared libraries, API contracts, or upstream services. By giving the code review agent visibility into those external codebases, it can provide more accurate and context-aware feedback. Cross Repo Context lets you declare external repositories that Augment Code Review should reference when reviewing pull requests. The code review agent can use external repos to:- Understand types and interfaces defined in external SDKs or libraries your code depends on
- Verify API compatibility by checking how external services define their contracts
- Validate integration patterns against the source of truth in another repository
- Catch breaking changes when your code relies on external contracts that may have changed
Configuring Cross Repo Context with AGENTS.md
Cross-repo context is configured through anAGENTS.md file at the root of your repository (<repo-root>/AGENTS.md). If you already have an AGENTS.md, add a cross-repo context section to it.
Example
The more detail you provide about each external repository, the faster and more efficient the agent’s cross-repo lookups will be.
Customizing the Lookup Instruction
The instruction block at the top of the example tells the code review agent how to use the external repos:
Read External Repository descriptions below and whenever the diff relates to or implements a listed repo, call augment_code_search tool…
This is just a starting point — you can customize it to fit your workflow, and the more specific you make it the more targeted the cross-repo lookups will be.
Best Practices
- Only add repos that are genuinely relevant. Stick to repos that define interfaces, types, or contracts your code directly depends on.
- Make sure the Augment GitHub App has access to all external repos. You can update repository access in your GitHub App settings.