Skip to content

feat(docs): Add AGENTS.md and Copilot instructions#3121

Merged
google-oss-prow[bot] merged 4 commits intokubeflow:masterfrom
andreyvelich:agents-md
Jan 26, 2026
Merged

feat(docs): Add AGENTS.md and Copilot instructions#3121
google-oss-prow[bot] merged 4 commits intokubeflow:masterfrom
andreyvelich:agents-md

Conversation

@andreyvelich
Copy link
Member

I added the AGENTS.md and Copilot instructions to make our code review more useful.

Copilot instructions are mostly inspired by the Goose project, let's see if that will help us.

/cc @astefanutti @kramaranya @tenzen-y @franciscojavierarceo @akshaychitneni @jaiakash @Electronic-Waste @osamaahmed17

@google-oss-prow
Copy link

@andreyvelich: GitHub didn't allow me to request PR reviews from the following users: osamaahmed17.

Note that only kubeflow members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

I added the AGENTS.md and Copilot instructions to make our code review more useful.

Copilot instructions are mostly inspired by the Goose project, let's see if that will help us.

/cc @astefanutti @kramaranya @tenzen-y @franciscojavierarceo @akshaychitneni @jaiakash @Electronic-Waste @osamaahmed17

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Contributor

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 introduces documentation to guide AI agents and improve code review effectiveness. It establishes development conventions, repository structure, and review guidelines for both automated tools and human contributors.

Changes:

  • Added comprehensive agent guidelines covering behavior policies, development workflow, and coding standards
  • Added Copilot-specific review instructions to focus on high-confidence, actionable feedback
  • Documented repository structure, tooling, and testing requirements across Go, Python, and Rust

Reviewed changes

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

File Description
AGENTS.md Provides comprehensive guidelines for AI agents and contributors, including repository structure, development workflow, and language-specific coding standards
.github/copilot-instructions.md Defines code review philosophy and priorities for GitHub Copilot to ensure focused, high-confidence feedback

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

AGENTS.md Outdated
Agents must NOT:

- Bypass tests or linters
- Introduce dependencies without updating `go.mod` (Go) or `pyproject.toml` (Python) or `cargo.toml` (Rust)
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

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

Corrected filename 'cargo.toml' to 'Cargo.toml' - Rust uses capitalized Cargo.toml as the standard manifest filename.

Suggested change
- Introduce dependencies without updating `go.mod` (Go) or `pyproject.toml` (Python) or `cargo.toml` (Rust)
- Introduce dependencies without updating `go.mod` (Go) or `pyproject.toml` (Python) or `Cargo.toml` (Rust)

Copilot uses AI. Check for mistakes.
AGENTS.md Outdated

- File names must have `*_test.go` postfix
- Use dictionary to define test cases
- Test functions must have the same name as
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

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

Incomplete sentence - appears to be cut off mid-thought. Should specify what test functions must have the same name as (likely 'the function being tested').

Suggested change
- Test functions must have the same name as
- Test functions must have the same name as the function being tested, prefixed with `Test`

Copilot uses AI. Check for mistakes.
Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>
@coveralls
Copy link

coveralls commented Jan 24, 2026

Pull Request Test Coverage Report for Build 21365977695

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 51.131%

Totals Coverage Status
Change from base Build 21288221172: 0.0%
Covered Lines: 1243
Relevant Lines: 2431

💛 - Coveralls

Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>
@osamaahmed17
Copy link

@andreyvelich: GitHub didn't allow me to request PR reviews from the following users: osamaahmed17.

Note that only kubeflow members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

@andreyvelich , is it possible for you to add me as a Kubeflow member?

@google-oss-prow
Copy link

@osamaahmed17: changing LGTM is restricted to collaborators

Details

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@andreyvelich
Copy link
Member Author

@andreyvelich , is it possible for you to add me as a Kubeflow member?

@osamaahmed17 Sure, please create PR to add yourself to the Kubeflow org: https://github.com/kubeflow/internal-acls
I am happy to sponsor it.

AI agents should:

- Make atomic, minimal, and reversible changes.
- Prefer local analysis (e.g. `make generate`, `make fmt`, `make test`, `make test-python`) before proposing commits.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we mention about scanning for vulnerabilities in the generated code or dependencies introduced?


- 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
Copy link
Contributor

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

- Match import patterns from neighboring files
- Preserve existing logging and error-handling conventions
- Understand the plugin architecture and extension framework before modifying runtime code
- Review CRD schemas in `pkg/apis/` before changing API structures
Copy link
Contributor

Choose a reason for hiding this comment

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

call out breaking api changes wherever required


- **CRD schemas** (`pkg/apis/trainer/v1alpha1`): Changes require careful review
- Adding fields: Use `+optional` marker and provide defaults
- Removing/renaming fields: Requires API version bump and migration plan
Copy link
Contributor

Choose a reason for hiding this comment

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

Should mention using CEL validation whenever applicable - https://kubernetes.io/docs/reference/using-api/cel/

Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>
Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>
@andreyvelich
Copy link
Member Author

Thanks for review @akshaychitneni!
Updated the docs.

Copy link
Member

@jaiakash jaiakash left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Copy link
Member Author

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andreyvelich

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot added the lgtm label Jan 26, 2026
@google-oss-prow google-oss-prow bot merged commit e0e033f into kubeflow:master Jan 26, 2026
33 checks passed
@google-oss-prow google-oss-prow bot added this to the v2.2 milestone Jan 26, 2026
@andreyvelich andreyvelich deleted the agents-md branch January 26, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants