diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..43c994c2 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md diff --git a/REVIEW.md b/REVIEW.md new file mode 100644 index 00000000..3280648f --- /dev/null +++ b/REVIEW.md @@ -0,0 +1,39 @@ +# Review instructions + +`AGENTS.md` holds this repository's rules, and `CLAUDE.md` imports it. This +file says how a review weighs them and what it leaves alone. It adds no rule. + +## Severity + +A review's own judgement of severity stands, with two changes: + +- A break of a rule under "Rules" or "Anti-Patterns" in `AGENTS.md` is + Important. These are build rules, and a mistake in them surfaces in a + consumer's build, far from the change. +- A remark on naming or on a comment's wording, and a suggestion to + restructure code that is correct, are Nit at most. + +## Always check + +- New behaviour has a test that asserts it, and no test is deleted or tagged + `manual` for the change to pass. +- A pull request that changes what a rule, a tool, Gazelle or CI does adds a + fragment to `changelog.d/`. A breaking change's fragment is under + `### Breaking — ` and states the edit a consumer has to make, and a + dependency bump that raises a compatibility floor is a breaking change. +- A change to a rule attribute, a provider or a Gazelle directive updates its + page under `docs/` in the same pull request. + +## Do not report + +- What `.github/workflows/ci.yml` already fails a pull request on: + `buildifier` and `gofmt` formatting, `go vet`, the docs build, and the + checks it runs from `tools/ci/`. +- A fixture source under `tests/` that is wrong on purpose, so that a rule + fails on it. Report one only when the test over it does not expect the + failure. + +## Evidence + +A finding about behaviour cites the `file:line` it rests on. A name or a +comment is not evidence of what the code does. diff --git a/changelog.d/claude-review-files.md b/changelog.d/claude-review-files.md new file mode 100644 index 00000000..9bd01db9 --- /dev/null +++ b/changelog.d/claude-review-files.md @@ -0,0 +1,11 @@ +### Added + +- **`CLAUDE.md` and `REVIEW.md`, the two files Claude Code Review reads.** + The review reads a repository's rules from `CLAUDE.md` and its review + instructions from `REVIEW.md`. This repository had neither: its rules are in + `AGENTS.md`. `CLAUDE.md` imports `AGENTS.md`, so the rules stay in one file. + `REVIEW.md` adds no rule. It makes a break of a rule in `AGENTS.md` + Important and a remark on naming a Nit at most, names the three things every + pull request is checked for (a test that asserts, a changelog fragment, the + page under `docs/`), and keeps a review off what `ci.yml` already fails on + and off fixture sources that are wrong on purpose.