Skip to content

Add GitHub Copilot instructions to help contributors working with the template #6207

@millsks

Description

@millsks

Description

I'd like to add AI coding agent instructions for GitHub Copilot to help contributors who use it get more accurate suggestions when working on this project. This would involve creating a .github/copilot-instructions.md file that explains the Cookiecutter template architecture, testing workflows, and project-specific conventions.

The file would document things like:

  • How this is a Cookiecutter template (not a standard Django app) with Jinja2 syntax in {{cookiecutter.project_slug}}/
  • The template rendering flow and hook system
  • Testing workflows (template tests vs generated project tests)
  • Docker commands and dependency management patterns
  • Common patterns for adding optional features

I'd also add a brief note in CONTRIBUTING.md letting contributors know the file exists for those who want to use it.

Important: This would have zero impact on the project itself. The .github/copilot-instructions.md file:

  • Only affects GitHub Copilot users who have it enabled
  • Is completely ignored by all other tools, CI/CD, and the template generation process
  • Does not get copied to generated projects (since it's not in {{cookiecutter.project_slug}}/)
  • Doesn't change any project structure, code, or functionality

For contributors who don't use Copilot, they won't even notice it's there.

Rationale

This project has a unique architecture that can be confusing at first. It's a Cookiecutter template with Jinja2 syntax, conditional file generation through hooks, and a complex testing setup that validates different configuration combinations. When using AI coding assistants without this context, they often suggest changes that break template syntax or don't account for the hook system.

By providing this context upfront, Copilot can give more helpful suggestions that respect the template architecture. For example, it would know to preserve Jinja2 syntax when editing files, understand the difference between template tests and generated project tests, and follow the established patterns for adding optional features.

This is a low-effort enhancement that improves the developer experience for Copilot users without affecting anyone else. The instructions also serve as informal documentation of the project's architecture and conventions, which could be useful reference material even for those reading it directly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions