Repository navigation
docs: add the files Claude Code Review reads - #419
Open
aronstrandberg wants to merge 3 commits into
Open
aronstrandberg wants to merge 3 commits into
aronstrandberg wants to merge 3 commits into
Conversation
Claude Code Review now runs on this repository's pull requests. It reads a repository's rules from CLAUDE.md and its review instructions from REVIEW.md, and there was neither: the rules are in AGENTS.md. CLAUDE.md imports AGENTS.md, so the rules stay in one file and every version of Claude Code reads them too. REVIEW.md adds no rule. It says which findings count as Important, lists the three checks a pull request gets from AGENTS.md and CONTRIBUTING.md (a test that asserts, a changelog fragment, the docs page), and keeps a review off what CI already fails on, lockfiles and fixture sources that are wrong on purpose. The review reads REVIEW.md from the default branch, never from a pull request, so it takes effect once merged.
The first review of this file found four places where it took more away than it meant to. "Reserve Important for" two kinds of finding capped every other kind, security findings among them. The review's own judgement of severity now stands, with one kind raised (a break of a rule in AGENTS.md) and one lowered (naming, comment wording, restructuring of correct code). The exemption from the changelog fragment covered every dependency bump, though a bump that raises a compatibility floor is a breaking change with a fragment of its own. It now covers a bump that changes nothing for a consumer. Lockfiles are out of "Do not report": here they are the default compiler's pin and the fixtures the npm reader is tested against. "The checks under tools/ci/" included check_tools_lock.sh, which runs on a release tag and not on a pull request. The bullet now names what ci.yml fails a pull request on. Fixture sources are skipped only under tests/ and only where the test over them expects the failure. e2e/ and examples/ hold working examples.
Member
Author
|
@claude review |
REVIEW.md asked every pull request for a fragment and listed one exception, a dependency bump. A list of exceptions is never complete: the release workflow's own pull request, which rewrites .bcr/source.json and nothing else, would get a finding it cannot satisfy. The check now names when a fragment is due: when the pull request changes what a rule, a tool, Gazelle or CI does. A bump of a development dependency and the BCR metadata update change none of those. A bump that raises a compatibility floor is still a breaking change with a fragment.
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add
CLAUDE.mdandREVIEW.md, the two files Claude Code Review reads, so that its reviews here know the rules inAGENTS.mdand stay off what CI already checks and off fixtures that are wrong on purpose.CLAUDE.mdonly importsAGENTS.md, andREVIEW.mdadds no rule of its own.Claude Fable 5.2, max
Why. Claude Code Review has run on this repository's pull requests since 1 December. It takes a repository's rules from
CLAUDE.mdand its review instructions fromREVIEW.md(Customize Code Review). Neither file existed here: the rules are inAGENTS.md, and the service's documentation namesCLAUDE.mdonly.CLAUDE.mdis one line,@AGENTS.md, the import the Claude Code documentation gives for a repository whose rules live inAGENTS.md(Share one file with other coding tools). The rules stay in one file. Claude Code versions that do not readAGENTS.mdby themselves get the rules through it too.REVIEW.mdhas four short sections, each taken from what the repository already says:AGENTS.mdis Important. A remark on naming or a comment's wording, and a suggestion to restructure code that is correct, are Nit at most.manual(AGENTS.md, Testing); achangelog.d/fragment when the pull request changes what a rule, a tool, Gazelle or CI does, under### Breakingwith the consumer's edit for a break (CONTRIBUTING.md); and the page underdocs/for a public API change (CONTRIBUTING.md). The last two are there because the review does not readCONTRIBUTING.md. The fragment is asked for by what a pull request changes, so a bump of a development dependency and the release workflow's.bcr/update need none, which is whatmaindoes today..github/workflows/ci.ymlalready fails a pull request on, and a fixture source undertests/that is wrong on purpose, unless the test over it does not expect the failure.file:lineit rests on.It caps no nits. Lockfiles stay in scope: here they are the default compiler's pin and the fixtures the npm reader is tested against.
When it takes effect. The review reads
REVIEW.mdfrom the default branch, never from a pull request's own changes. So this PR is reviewed without it, and later ones with it.mainhas a branch protection rule, which the service requires before it honours exclusions and lowered severities from the file.Checked.
bazel test //tools/changelog/...passes,bazel run //tools/changelogprints the entry, andtools/ci/check_retired_names.shpasses. The three files are Markdown, and nothing builds from them.