You want the GitHub Copilot coding agent to follow project-specific conventions (coding style, testing requirements, folder structure) on every task it performs in a repository. What should you create?
Correct Answer: B
The correct configuration is .github/copilot-instructions.md. GitHub defines this file as the repository-wide custom-instructions mechanism for providing persistent project-specific guidance to Copilot. Instructions stored there are automatically incorporated when Copilot works in the repository, making the file appropriate for conventions that should apply repeatedly, such as coding standards, architectural expectations, preferred test frameworks, build and validation commands, repository layout, and required implementation patterns.
This is particularly important for a coding agent because the instructions establish persistent SDLC context rather than relying on developers to repeat requirements in every issue or prompt. GitHub explicitly describes repository instructions as a way to tell Copilot how to understand, build, test, and validate repository changes.
CODEOWNERS controls ownership and review assignment rather than Copilot behavior. A .copilotignore file is not the repository-wide custom-instructions mechanism, and agents.yml is not the prescribed file for persistent repository conventions.
Study Guide Reference Topics: Prepare agent architecture and SDLC processes; repository-level agent instructions; persistent development conventions; automated build and test guidance.