Spaces:
Chris4K
/
Paused

Aksel Joonas Reedi commited on
Commit
b292d83
Β·
unverified Β·
1 Parent(s): 1f3fd90

ci: add REVIEW.md for tunable Claude reviews (#104)

Browse files

* ci: add REVIEW.md and inject it into the review prompt

REVIEW.md is a repo-root freeform instructions file that gets prepended
to the review prompt as highest-priority guidance. Lets maintainers tune
severity calibration, nit caps, skip lists, and repo-specific must-checks
by editing one file instead of the workflow YAML.

Mirrors the pattern used by the managed Anthropic Code Review product so
we keep the same levers on our self-hosted Actions setup.

* review: add merge-bias, pushback norms, and What-I-checked summary

Insights from the Latent Space 'harness engineering' interview: review
agents should default to merge, not block; 🟑/🟣 are informational not
required; author pushback without a fix is legitimate for non-Important
findings; repeated disagreement is a signal REVIEW.md is missing a rule.

Also adds a 'What I checked' bullet list to the summary shape so even
clean LGTM reviews surface the coverage the reviewer actually applied.

* review: rename severity markers to P0/P1/P2

Replace πŸ”΄ Important / 🟑 Nit / 🟣 Pre-existing with plain P0/P1/P2
labels throughout REVIEW.md and the workflow prompt. Matches the
priority scheme from the Latent Space harness-engineering interview
and reads cleaner in terminal-rendered GitHub diffs.

* review: swap merge-bias for rigor; require deep investigation + merge verdict

Maintainer feedback: default-bias-merge was borrowed from a closed AI-loop
context (Ryan's harness) where the PR author is also an agent and merge-and-
iterate is cheap. For an open-source repo taking one-shot external PRs with
a small maintainer team, the risk flips: false negatives ship bugs, false
positives cost one contributor round trip. Rigor is the correct default.

Three concrete changes:
- 'Default bias: rigor' replaces 'default bias: merge'. Hold the line on P0
even under contributor pushback. P1/P2 still accept deferral silently.
- New 'Investigate before posting' section requires reading callers and
callees (not just the diff), tracing routing/auth chains end-to-end, and
checking established patterns before flagging divergence.
- Summary now carries an explicit 'Verdict: ready to merge / changes
requested / needs discussion' so the maintainer sees the call at a
glance.

* review: add Dependency PRs rubric to catch supply-chain bait

Empirical test against the current open-PR queue surfaced a false-negative:
a bot PR (orbisai0security, #96) titled 'upgrade authlib to 1.6.9 for
CVE-2026-27962' actually bumps 1.6.5 β†’ 1.7.0 in the lockfile, the CVE
isn't in NVD, and the bump silently introduces a new transitive dep
(joserfc). Existing REVIEW.md rules are routing/auth/agent-loop centric
and would LGTM it.

New 'Dependency PRs' section requires: CVE verification against NVD or
GH Advisory DB, title-version ↔ lockfile-diff match, justification for
any new transitive dep, and P0 framing-flag when a dep-only PR claims a
code-behavior fix.

* review: trim REVIEW.md β€” drop enumerations, tighten P1 cap to 3

- Remove 'What counts as P0 in this repo' enumeration: P0 is implicitly
for Claude to figure out from context, not a static checklist.
- Remove 'Always check' repo-specific enumeration: same rationale. The
rigor + investigate-before-posting framing carries the weight.
- Remove 'Anything CI already enforces' block under 'Do not report':
rigor framing plus the skip-paths list already covers it.
- Drop 'If you cannot invest the depth to verify, do not post the
finding' tail from Investigate-before-posting (implicit in rigor).
- Drop routing/effort/caching citation expansion from Verification bar
(implicit in generic citation rule).
- Drop the concrete What-I-checked example from Summary shape.
- Drop 'one paragraph of context at most' from Summary shape.
- Tighten P1 cap from 5 to 3.

* review: compress dep-PR section to one paragraph, drop test-nag example

Dep-PR rubric was carrying four bulleted cases that amounted to one idea:
claims in the PR body must match the diff, new deps need justification,
lying framing is P0. Collapsed to a single paragraph.

Also drops 'Consider adding a test' from the speculative examples β€” that
heuristic tends to manufacture P1s rather than filter noise.

2 files changed +168 -12
Files changed (2)
.github/workflows/claude-review.yml+33-12
REVIEW.mdAdded+135