-
Notifications
You must be signed in to change notification settings - Fork 20
docs: add the copilot instruction #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add the copilot instruction #74
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
The purpose of this PR is to add a new documentation file containing copilot instructions to enhance our agent’s guidance.
- Adds a new file (.github/copilot-instructions.md) with comprehensive guidelines on repository structure, testing rules, domain knowledge, and breadcrumb protocol.
- Details instructions for maintaining consistency in code reviews and development workflows.
Comments suppressed due to low confidence (1)
.github/copilot-instructions.md:1
- [nitpick] Consider renaming the 'Overview' section or adding a dedicated 'Copilot Instructions' header to clearly distinguish the copilot-specific guidelines from general repository information.
# Overview
There was a problem hiding this 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 a new Copilot instruction document outlining agent behavior, repository conventions, testing protocols, and collaboration workflows.
- Introduces general rules, terminology, and repository directory structure.
- Defines testing guidelines, domain knowledge/specification references, and a breadcrumb collaboration protocol.
- Provides an example usage scenario and plan-structure guidelines for implementation tasks.
Comments suppressed due to low confidence (1)
.github/copilot-instructions.md:9
- [nitpick] Provide a brief explanation or example of the '@Terminal' annotation so it's clear how terminal commands should be formatted or executed.
+- Use @terminal when answering questions about Git.
| - `pkg/authtoken` folder contains the authentication sidecar code which has a provider model. | ||
| - `pkg/controller` folder contains most of the controllers for the member and hub agent. | ||
| - each sub folder is a controller for a specific resource of the same name in most cases. | ||
| - `pkg/metrics` folder contains all the metrics definitions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not true: this folder contains metrics for member agent and v1alpha1 placement metrics (should be deprecated?). The metrics for latest hub agent are in pkg/utils/controller/metrics.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Iooks like the new metrics should be moved here instead of buried deep in util dir. That file should only contain the metrics for our customized controller runtime
|
|
||
| - Use @terminal when answering questions about Git. | ||
| - If you're waiting for my confirmation ("OK"), proceed without further prompting. | ||
| - Follow the [Uber Go Style Guide](https://github.com/uber-go/guide/blob/master/style.md) if possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also include these?
https://go.dev/wiki/Style
checked the uber style, which only includes the Go Code Review Comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according to the copilot tips, this type of link might not even work. We probably need a MCP.
| - `pkg/controller` folder contains most of the controllers for the member and hub agent. | ||
| - each sub folder is a controller for a specific resource of the same name in most cases. | ||
| - `pkg/metrics` folder contains all the metrics definitions. | ||
| - `pkg/propertyprovider` folder contains the property provider code which is used to get the properties of a member cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to add the sub folders? Granted all we have at the moment is for azure so may not be necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the copilot should be able to guess by reading the code
|
|
||
| ## Domain Knowledge | ||
|
|
||
| Use the files in the `.github/.copilot/domain_knowledge/**/*` as a source of truth when it comes to domain knowledge. These files provide context in which the current solution operates. This folder contains information like entity relationships, workflows, and ubiquitous language. As the understanding of the domain grows, take the opportunity to update these files as needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .github/.copilot directory doesn't exist. Do we plan to utilize this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this is useful for the breadcrumb
|
|
||
| ## Specification Files | ||
|
|
||
| Use specifications from the `.github/.copilot/specifications` folder. Each folder under `specifications` groups similar specifications together. Always ask the user which specifications best apply for the current conversation context if you're not sure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
| └── main.spec.md | ||
| ``` | ||
|
|
||
| ## Breadcrumb Protocol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this how to utilize the copilot agent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one way and it changes every few weeks :)
Signed-off-by: Ryan Zhang <[email protected]>
accept comments Co-authored-by: Arvind Thirumurugan <[email protected]> Signed-off-by: Ryan Zhang <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Ryan Zhang <[email protected]>
Co-authored-by: Wantong <[email protected]> Co-authored-by: Britania Rodriguez Reyes <[email protected]> Signed-off-by: Ryan Zhang <[email protected]>
1b646d1 to
cd9fb46
Compare
Description of your changes
add the copilot instruction to make our agent even more smart
Fixes #
I have:
make reviewableto ensure this PR is ready for review.How has this code been tested
Special notes for your reviewer