Skip to content

Add GitHub Copilot instruction files for repository context#144

Open
Copilot wants to merge 3 commits intomainfrom
copilot/setup-ai-agent-instruction-files
Open

Add GitHub Copilot instruction files for repository context#144
Copilot wants to merge 3 commits intomainfrom
copilot/setup-ai-agent-instruction-files

Conversation

Copy link

Copilot AI commented Jan 17, 2026

Configures GitHub Copilot with repository-specific conventions and patterns following GitHub's custom instructions format.

Files Added

  • .github/copilot-instructions.md - Repository-wide context: Go 1.24.4/Kubebuilder v4 operator, build/test commands, project structure, controller patterns
  • .github/instructions/go.instructions.md - Go conventions: error handling, imports, concurrency, testing with Ginkgo/Gomega (applies to **/*.go)
  • .github/instructions/kubernetes.instructions.md - Controller patterns: reconciliation loops, CRD design, RBAC, external resource management (applies to internal/controller/**/*.go, api/**/*_types.go)
  • .github/instructions/test.instructions.md - Test organization: BDD structure, mocking with uber/mock, envtest patterns (applies to **/*_test.go, test/**/*.go)

Instructions use frontmatter with glob patterns for path-specific targeting. References kept generic to avoid maintenance burden from path changes.

Original prompt

Set up AI agent instruction files following GitHub best practices


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Set up AI agent instruction files following GitHub best practices Add GitHub Copilot instruction files for repository context Jan 17, 2026
Copilot AI and others added 3 commits January 17, 2026 13:21
Co-authored-by: UnstoppableMango <20211602+UnstoppableMango@users.noreply.github.com>
Co-authored-by: UnstoppableMango <20211602+UnstoppableMango@users.noreply.github.com>
@UnstoppableMango UnstoppableMango force-pushed the copilot/setup-ai-agent-instruction-files branch from a26237e to 58fb8e6 Compare January 17, 2026 19:21
@UnstoppableMango UnstoppableMango marked this pull request as ready for review January 17, 2026 19:24
Copilot AI review requested due to automatic review settings January 17, 2026 19:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds GitHub Copilot instruction files to provide context-aware guidance when using Copilot within this Kubernetes operator repository. The instructions follow GitHub's custom instructions format with frontmatter-based path targeting.

Changes:

  • Added repository-wide Copilot instructions defining the project context, build commands, and development workflow
  • Added Go-specific coding conventions and best practices applicable to all Go files
  • Added Kubernetes controller and API design patterns for controller and CRD files
  • Added test framework instructions for Ginkgo/Gomega-based testing with mocking patterns

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
.github/copilot-instructions.md Defines project overview, Go 1.24.4/Kubebuilder v4 context, make commands, project structure, and testing approach
.github/instructions/go.instructions.md Specifies Go conventions for all .go files including error handling, imports, concurrency, and documentation
.github/instructions/kubernetes.instructions.md Details controller reconciliation patterns, CRD design, RBAC, and external resource management for controller and API files
.github/instructions/test.instructions.md Describes Ginkgo/Gomega testing patterns, mocking with uber/mock, and envtest usage for all test files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants