Repository navigation
chore: baseline for agent-assisted review (AGENTS.md, REVIEW.md, make verify) - #181
Draft
dg-dayhaysoos wants to merge 7 commits into
Draft
dg-dayhaysoos wants to merge 7 commits into
dg-dayhaysoos wants to merge 7 commits into
Conversation
AGENTS.md lists what the project guarantees and the test that enforces each guarantee, how to check a change, and where a coding agent's authority ends. CLAUDE.md imports it so Claude Code loads it. REVIEW.md is the rubric a review applies: rules with IDs and default severities, what not to raise, the fields every finding carries, and how the rubric changes. An agent's review is advisory; a person decides whether to merge. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
CONTRIBUTING asks contributors to run `make readmes`, and `make readmes-check` exists, but no workflow ran it, so a stale generated README was caught by nothing. Run it in the lint job, which the required "All checks" rollup already waits on. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
`make dev` skips the type check, the lockstep check and the README check, and `make check` skips the tests, so no local command said what CI's lint, lockstep and test jobs would say. `make verify` runs format, lint, types, lockstep, READMEs, the manifest check and the test suite; `make verify-fast` leaves the suite out. Each failure is a finding with a file, a line, a rule and, where there is one, the command that fixes it. `ARGS="--json"` prints the report as one JSON document on stdout (docs/contracts/verify.schema.json), which is the form a coding agent reads between fix attempts. A check's status comes from its command's exit code, so output the script can't parse is still a failure. tests/unit/test_verify.py holds the script's commands against .github/workflows/test.yml, and fails when a package's tests are missing from the workflow's hand-kept pytest list. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Contributor
|
This PR adds or modifies If this is a new flow, please make sure you actually need See existing workflows in this repo for safe usage examples, or contact the AppSec team. |
…label A review opens with a count by severity. A second review covers only what changed, does not repeat a posted finding, reports a repeated mistake once, and stops raising findings after three rounds. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The API-key rule read as a ban on the flag. Its test only checks that shipped text never shows a key on a command line, and the root --api-key option exists. A reviewer given the old wording raised a blocker against that option. Also name the tests behind the agent-hint, agent-detection and trust rules, narrow the stdout rule to what the stream test checks, and say that a rule with no test named is held by review. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
SCOPE-1 asked for a split of any diff over 800 changed lines, and AGENTS.md asked for pull requests "small enough to read in one sitting". The 800 had no measurement behind it: the median pull request written by a person in this repository is larger than that, and a replay of the reviewer spent one of its ten findings on SCOPE-1 for a change of 847 lines. SCOPE-1 is now about purpose alone, and says that size is not a finding. A reviewer is told to read the whole diff and every file it changes, however large the change is. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
3 of 5 tasks
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.
Summary
A first step toward automated code review in this repo. It adds no reviewer and gives no agent any new authority. It writes down what a change is judged against, and gives people and coding agents one command that says what CI will say.
The repo's deterministic checks are already strong (contract tests for help parity, stream discipline, the manifest, import budget, the dependency allowlist). What was missing was the written standard a reviewer applies, and a local command that matches CI.
Changes
AGENTS.md(and a one-lineCLAUDE.mdthat imports it): what the project guarantees and the test that enforces each guarantee, how to check a change, and where a coding agent's authority ends. Each guarantee is stated as its test checks it and no wider.REVIEW.md: the review rubric. An agent's review is advisory; a person decides whether to merge.pre-existinglabel for a problem the PR did not introduce.SCOPE-1is about a PR with more than one purpose; size is not a finding.make verify/make verify-fast(scripts/verify.py): format, lint, types, lockstep, generated READMEs, the manifest check and the test suite in one command.make verify ARGS="--json"prints one JSON document on stdout, described bydocs/contracts/verify.schema.json.tests/unit/test_verify.py: besides the parsers, it holds the script's commands against.github/workflows/test.yml, and fails when a package's tests are missing from the workflow's hand-kept pytest list.make readmes-check. Nothing ran it before, so a stale generated README was caught by nothing.make verify, and asks for the change's risk and how to revert it.make verify.For reviewers
AGENTS.md, and inREVIEW.mdthe default severities, the ten-finding cap and the three-round limit on re-review.pre-existinglabel and the two new PR template sections follow Anthropic's write-up of its own process, How the Claude Code team does code review.make verifydoes not cover the package build, the lowest-dependency install or the npm launcher jobs.AGENTS.mdsays so.Test plan
make verifypasses locally (macOS, Python 3.14), including the full test suitemake verify ARGS="--json"output parses and validates against the schema30bb79a, 65 of 65 check runs, across Linux, macOS, Windows and Python 3.10 to 3.14Risk
Low. Nothing in a shipped package changes. The one change that can fail someone else's PR is the new
make readmes-checkstep in the lint job, which fails when a generated README is stale;make readmesfixes it.How to revert
Reverting this PR is enough. Nothing here is released to users.
Related issues
None.
🤖 Generated with Claude Code