feat(agents): pr-reviewer, a CodeRabbit-like review of published PRs as the review-bot fallback (#1447) - #1458
Merged
Merged
Conversation
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: dlrivada/Encina/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
dlrivada
enabled auto-merge (squash)
September 27, 2026 14:25
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.
Fixes #1447
Summary
Introduces the
pr-revieweragent, a read-only, CodeRabbit/Copilot-like reviewer that evaluates published pull requests against repository standards. It operates post-publish, usinggh pr diffto analyze changes againstAGENTS.md,CLAUDE.md, thepath_instructionsin.coderabbit.yaml, and the linked issue's acceptance criteria. The agent produces a structured report (artifacts/pr-review/<pr>.md) containing a summary, walkthrough, detailed findings withfile:linereferences and severity levels, a per-criterion check against the linked issue, a security review (secrets, personal data, injection, fail-closed gates), and lessons learned. It uses Sonnet by default, escalating to Opus only when the spawn request justifies it.pr-reviewernever posts to GitHub; the orchestrator handles publishing. The existingadversarial-reviewerretains its pre-push, brief-based role.Changes
New Files:
.claude/agents/pr-reviewer.md: Agent definition including system prompt, tool usage, and output format..claude/agents/lessons/pr-reviewer.md: Accumulated lessons for the agent.docs/plans/pr-reviewer-implementation-plan-1447.md: Implementation plan.docs/knowledge/issues/1447.md: Knowledge record documenting dry-run evidence and decisions.Edited Files:
.claude/hooks/block-worker-spawn.ps1: Updated spawn allowlist to includepr-reviewer..claude/hooks/enforce-path-ownership.ps1: Restricted write access toartifacts/pr-review/**; wired to both Write/Edit and Bash/PowerShell matchers to prevent shell-based writes outside the allowed path..claude/hooks/block-worker-publish.ps1and.claude/hooks/no-background-specialists.ps1: Updated comments to reflect the new agent's non-publishing role..claude/hooks/tests/Test-Hooks.ps1: Added regression tests for path-ownership enforcement (including Bash/PowerShell matcher cases) and updated frontmatter self-check to includepr-reviewerandsite-stewardforblock-worker-publish..claude/agents/README.md: Addedpr-reviewerto the agent documentation..claude/skills/pr-cycle/SKILL.md: Updated workflow to spawnpr-reviewerwhen CodeRabbit is rate-limited or skips a PR; clarified thatadversarial-reviewerremains for gate, CI-workflow, and script PRs.docs/engineering/ai-task-routing.mdanddocs/engineering/AI-DEVELOPMENT-MODEL.md: Updated agent tables to includepr-reviewer(viadocs-writer).Evidence: dry runs versus CodeRabbit
Dry runs were performed following the agent definition, as the new spawn allowlist is live only after merge.
PR fix(security): log the error code instead of EncinaError.Message in EF Core, Marten and GraphQL (#1328) #1397:
pr-reviewer(recorded as a lesson).PR fix(messaging): register EF Core and MongoDB messaging patterns through the shared helper (#1333) #1399:
file:linereferences and test evidence. Marked one PR claim (a CRAP figure) as "not verified" instead of accepting it blindly.Details are documented in the knowledge record (
docs/knowledge/issues/1447.md).Verification
Test-Hooks.ps1: 729 test cases executed, 0 failed..ps1file.knowledge-records --check: OK.Review
enforce-path-ownershipwas initially wired only on the Write/Edit matcher, allowing a shell command to write outsideartifacts/pr-review/**. Fixed by also wiring the Bash/PowerShell matcher (consistent withsite-steward), with 2 regression test cases added.Test-Hooksfrontmatter self-check did not namesite-stewardorpr-reviewerforblock-worker-publish. Fixed by adding them to the check.Cross-cutting checklist (ADR-018)
Tooling-only change (Claude Code agent and hooks); none of the 12 functions apply.