GitHub Copilot implements a three-layer context system to make coding agents more effective. Layer 1 uses a repo-level `.github/copilot-instructions.md` file for project-wide rules like coding conventions and security defaults. Layer 2 uses path-specific instruction files in `.github/instructions/` with `applyTo` frontmatter to target specific file types. Layer 3 introduces custom `.agent.md` files that define specialized personas with scoped tool access and MCP server connections. GitHub's analysis of 2,500+ custom instruction files found that effective agent setups give agents specific personas, exact commands, defined boundaries, and output examples. Pre-configured partner agents (JFrog, MongoDB, PagerDuty, Terraform) are also available with MCP integrations, working across VS Code, JetBrains, Eclipse, and Xcode.
Table of contents
An open-source alternative to Claude (18k+ stars)!The three layers of context that make coding agents actually usefulSort: