Add GitHub Copilot instruction files for repository context#144
Open
Add GitHub Copilot instruction files for repository context#144
Conversation
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
Co-authored-by: UnstoppableMango <20211602+UnstoppableMango@users.noreply.github.com>
Co-authored-by: UnstoppableMango <20211602+UnstoppableMango@users.noreply.github.com>
a26237e to
58fb8e6
Compare
UnstoppableMango
approved these changes
Jan 17, 2026
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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 tointernal/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
💡 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.