Add GitHub Copilot instructions #6208
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add a .github/copilot-instructions.md file that gives GitHub Copilot useful background about this repository as a Cookiecutter template. The guidance will explain that the code under {{cookiecutter.project_slug}}/ uses Jinja2, outline how the template is rendered and how hooks can add or remove files, and call out the difference between tests run against the template and tests run in generated projects. It will also include notes on the common Docker commands, dependency workflows, and recommended patterns for implementing optional features. Finally, add a short pointer in CONTRIBUTING.md so contributors know the guidance exists.
This is documentation only. It will not change code, CI, or the files that end up in generated projects, and it only affects users who enable Copilot or who read the file directly.
Checklist:
Rationale
The repository uses a templating system and hook scripts that are easy to misunderstand. Without that context, AI code suggestions and some contributor edits can accidentally break Jinja2 syntax or ignore the hook and testing conventions. Providing clear, repo-specific instructions helps Copilot offer safer, more accurate suggestions and helps contributors avoid common mistakes. This is a small, low-risk improvement that makes the project easier to work with for people who use Copilot, and it doubles as a handy reference for anyone learning the template structure.
Resolves #6207