Different Rules for Different Parts of Your Codebase
Your tests need different guidance than your services. Path-based instructions let you give the AI context that matches where you're working.
Copilot has a centralized way of handling instructions. Global instructions go into .github/copilot-instructions.md. You can also have path-based instruction that use a glob. These go into .github/copilot/instructions/ and have special front matter:
applyTo: "**/*.ts"
Updated on Feb 5, 2026