forked from rook/rook
docs: add AGENTS.md
AI coding agents read a top-level `AGENTS.md` by convention, and Rook has no file at that path, so an agent entering this repository starts with no knowledge of its conventions. The result is predictable: unsigned commits, invalid commit prefixes, `pkg/apis` changes with no regenerated CRDs, AI attribution trailers that the AI guidelines ask contributors not to use, and pull request checklists with every box ticked. Add an `AGENTS.md` that maps the reader onto the contributor documentation instead of restating it, so that the two cannot come to disagree. What little it states inline is the policy that holds no matter what else the reader skips, such as signing off and disclosing AI assistance. Everything mechanical, and therefore liable to change, is a link. It also points at the pull request template, which GitHub supplies to anyone opening a pull request in a browser but not to a tool that submits a body directly, and which such a tool therefore has to be told to go and read. Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# AGENTS.md
|
||||
|
||||
Guidance for AI coding agents working in this repository.
|
||||
|
||||
This file is a map, not a rulebook. The contributor documentation is the authority, and everything
|
||||
below points into it rather than restating it, so that the two cannot disagree.
|
||||
|
||||
Read the [AI guidelines](Documentation/Contributing/ai-guidelines.md) first. Rook does not accept
|
||||
contributions that lack human oversight.
|
||||
|
||||
## Where the rules live
|
||||
|
||||
Read the relevant section of the
|
||||
[developer guide](Documentation/Contributing/development-flow.md) before making a change:
|
||||
|
||||
| To find out how to | Read |
|
||||
| ------------------ | ---- |
|
||||
| build, test, and lint, and what CI enforces | [Checks that gate a pull request](Documentation/Contributing/development-flow.md#checks-that-gate-a-pull-request) |
|
||||
| change anything under `pkg/apis` | [Generated Code and CRDs](Documentation/Contributing/development-flow.md#generated-code-and-crds) |
|
||||
| write a commit message | [Commit structure](Documentation/Contributing/development-flow.md#commit-structure) |
|
||||
| fill in the pull request checklist | [the pull request template](.github/PULL_REQUEST_TEMPLATE.md), which says what each item claims |
|
||||
| write tests | [Assertions](Documentation/Contributing/rook-test-framework.md#assertions) |
|
||||
|
||||
Two of these are easy to miss. Building or testing with a bare `go` command does not necessarily
|
||||
match what CI runs, so use `make`. Changing a godoc comment under `pkg/apis` counts as changing the
|
||||
API, because those comments become the CRD descriptions.
|
||||
|
||||
## Regardless of what else is read
|
||||
|
||||
* Sign off every commit with `git commit -s`. A bot enforces the DCO.
|
||||
* Open pull requests against `master`, from a branch in a fork. Rebase onto upstream; never merge
|
||||
upstream into a branch.
|
||||
* Opening a pull request non-interactively, such as by passing a body to `gh pr create`, skips the
|
||||
template that GitHub would otherwise supply. Read
|
||||
[the template](.github/PULL_REQUEST_TEMPLATE.md) and fill in its checklist regardless.
|
||||
* Disclose in the pull request description how AI tools assisted with the change.
|
||||
* Commit messages and review comments are the contributor's own reasoning to explain and own. Do
|
||||
not submit raw model output as either.
|
||||
* Discuss significant changes in an issue before writing code. Large AI-generated pull requests
|
||||
without prior design discussion will be rejected.
|
||||
Reference in New Issue
Block a user