-
Notifications
You must be signed in to change notification settings - Fork 890
feat(docs): Add AGENTS.md and Copilot instructions #3121
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # GitHub Copilot Code Review Instructions | ||
|
|
||
| ## Review Philosophy | ||
|
|
||
| - Only comment when you have HIGH CONFIDENCE (>80%) that an issue exists | ||
| - Be concise: one sentence per comment when possible | ||
| - Focus on actionable feedback, not observations | ||
| - When reviewing text, only comment on clarity issues if the text is genuinely confusing or could lead to errors. | ||
| "Could be clearer" is not the same as "is confusing" - stay silent unless HIGH confidence it will cause problems | ||
|
|
||
| ## Priority Areas (Review These) | ||
|
|
||
| ### Security & Safety | ||
|
|
||
| - Unsafe code blocks without justification | ||
| - Command injection risks (shell commands, user input) | ||
| - Path traversal vulnerabilities | ||
| - Credential exposure or hardcoded secrets | ||
| - Missing input validation on external data | ||
| - Improper error handling that could leak sensitive info | ||
|
|
||
| ### Correctness Issues | ||
|
|
||
| - Logic errors that could cause panics or incorrect behavior | ||
| - Resource leaks (files, connections, memory) | ||
| - Off-by-one errors or boundary conditions | ||
| - Optional types that don't need to be optional | ||
| - Booleans that should default to false but are set as optional | ||
| - Overly defensive code that adds unnecessary checks | ||
| - Unnecessary comments that just restate what the code already shows (remove them) | ||
|
|
||
| ### Architecture & Patterns | ||
|
|
||
| - Code that violates existing patterns in the codebase | ||
| - Missing error handling | ||
| - Code that is not following [Effective Go](https://go.dev/doc/effective_go) best practices | ||
| - Violating [Kubernetes API guidelines](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api_changes.md) | ||
|
|
||
| ## Project-Specific Context | ||
|
|
||
| - See [AGENTS.md](../AGENTS.md) in the root directory for project guidelines and architecture decisions. | ||
|
|
||
| ## CI Pipeline Context | ||
|
|
||
| **Important**: You review PRs immediately, before CI completes. Do not flag issues that CI will catch. | ||
|
|
||
| ### What Our CI Checks | ||
|
|
||
| - `.github/workflows/test-go.yaml` - Code generation, linting, and tests for Go source code | ||
| - `.github/workflows/test-python.yaml` - unit and integration tests for Python source code | ||
| - `.github/workflows/test-rust.yaml` - unit and integration tests for Rust source code | ||
| - `.github/workflows/test-e2e.yaml` - e2e tests | ||
| - `.github/workflows/build-and-push-images.yaml` - build and push container images | ||
|
|
||
| ## Skip These (IMPORTANT) | ||
|
|
||
| Do not comment on: | ||
|
|
||
| - **Auto generated code** - CI handles this (make generate) | ||
| - **Style/formatting** - CI handles this (gofmt, black, prettier) | ||
| - **Test failures** - CI handles this (full test suite) | ||
| - **Missing dependencies** - CI handles this | ||
|
|
||
| ## Response Format | ||
|
|
||
| When you identify an issue: | ||
|
|
||
| 1. **State the problem** (1 sentence) | ||
| 2. **Why it matters** (1 sentence, only if not obvious) | ||
| 3. **Suggested fix** (code snippet or specific action) | ||
|
|
||
| ## When to Stay Silent | ||
|
|
||
| If you're uncertain whether something is an issue, don't comment. False positives create noise and reduce trust in the review process. | ||
Oops, something went wrong.
Oops, something went wrong.
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.
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 mention about python, rust as well