Repository navigation
ci(claude): give the PR reviewer project context and a change-aware lens - #52
Merged
Merged
Conversation
Replaces the generic /code-review plugin invocation with a project- specific prompt that reads CLAUDE.md and classifies each PR (ADR/RFC vs Rust code vs other), applying the right lens — design-coherence for ADRs, the hard security rules for crates/. The review is posted as a single GitHub PR review: a summary body plus inline comments anchored to file:line. - prompt: project-aware, threat-model/MANIFIESTO anchored, high-signal only (>= 80% confidence), no nitpicks. - claude_args: pin --model claude-sonnet-4-6 for deterministic reviews. - permissions: pull-requests read -> write, the minimum needed to post the review (still no contents write; fork PRs get a read-only token so cannot post — safe by default). - drops the generic code-review plugin and its marketplace; removes the installer's placeholder comments. Signed-off-by: Gonzalo Fleming <[email protected]>
This was referenced Jun 11, 2026
gonzafg2
added a commit
that referenced
this pull request
Jun 11, 2026
…ontext (#54) Root cause of the no-post / permission-denials problem: PR #52 removed the code-review plugin in favour of a pure prompt. But the plugin IS the posting mechanism — the canonical code-review workflow in the claude-code-action docs uses `plugins: code-review@claude-code-plugins` + `/code-review:code-review`. Without it, Claude has no tool to create inline review comments, so it tried gh (denied) and posted nothing. Restore the plugin, and keep the project-aware behaviour two ways the plugin already honours: - CLAUDE.md (read automatically by the plugin) for the review criteria; - --append-system-prompt for the ADR-vs-Rust change-aware lens. Net result is better than the original generic plugin: same robust posting, now with project context and a change-aware lens. Model stays pinned to claude-sonnet-4-6; pull-requests: write retained. Signed-off-by: Gonzalo Fleming <[email protected]>
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
Upgrades the
claude-code-review.ymlreviewer from the generic/code-reviewplugin to a project-specific, change-aware review.What changes
CLAUDE.mdand classifies each PR, then applies the right lens:docs/adr/,docs/rfcs/) → design-coherence review (does it weaken a MANIFIESTO commitment? sound decision? template followed? TBD references?). Does not hunt for bugs that don't exist.crates/) → the hard security rules (nounsafe, no unbounded pre-auth allocation, no legacy crypto, type-state intact, mandated log fields, key zeroization).claude-sonnet-4-6for deterministic reviews.pull-requests: read → write— the minimum needed to post a review.Why
The generic reviewer evaluated every PR as if hunting for code bugs, which is noise on the ADR PRs that are the entire current backlog (#46–#51). This makes the review evaluate against the MANIFIESTO and threat model — and it's already in place for when
crates/lands.Type of change
Security considerations
pull-requests: writeis an increase in surface, but the minimum needed to post a review; nocontents: write. On fork PRs, GitHub issues a read-only token under thepull_requesttrigger, so an external fork's review cannot post — safe by default. Suits the single-maintainer flow (branches in-repo).github.repositoryandpull_request.number(an integer) — no free-text user input reaches a shell, so no injection surface. Norun:blocks.Checklist
Notes for reviewers
This PR will be reviewed by the old generic reviewer (the new one only takes effect once merged). The first PR to get the new project-aware review will be the next one opened after merge.