Skip to content

feat(pr-review): extract review rubric to files, 4-lens restructure#73

Merged
Troublor merged 2 commits into
mainfrom
troublor/feat/pr-review-rubric-files
Jun 30, 2026
Merged

feat(pr-review): extract review rubric to files, 4-lens restructure#73
Troublor merged 2 commits into
mainfrom
troublor/feat/pr-review-rubric-files

Conversation

@Troublor

Copy link
Copy Markdown
Collaborator

Summary

Refactors the shared claude-pr-review action so the review rubric is maintainable and the review agent stays at a structural altitude.

  • Extract the rubric to a sibling rubric.md, injected into the prompt at compose time (cat into GITHUB_OUTPUT, same mechanism as the existing orchestration var). The rubric is now edited and reviewed as prose instead of a YAML block scalar with heredoc-avoidance hacks. No change to what the agent receives at the always-loaded layer.
  • Restructure the 8 priority items + the 6-item "also check" list into 4 leverage-ordered lensesdesign & data structures, correctness & safety, surface stewardship, change & operate — so the reviewer reasons by mode instead of keyword-matching a flat checklist (the documented cause of nit avalanches). Every prior check is preserved, just folded under a higher-altitude header.
  • Add rubric-detail.md for conditional, line-level checks (persistence/crash-consistency, unit-safety, test & perf surface). It's staged into $GITHUB_WORKSPACE/.claude-review/ and the rubric routes the agent to read it on demand, only for the areas a given diff touches — true progressive disclosure, kept out of the always-loaded prompt.

The posting-contract phases and severity scale stay inline (they carry ${{ github.* }} interpolations / are posting mechanics, not rubric content). Scope is limited to this action; the README's stale mega-agents action paths are a separate bug to fix in a follow-up.

Test plan

  • This PR is self-dogfooding: documentation's own claude.yml runs pr-review via the local action path, so the modified action reviews this very PR. A green review run exercises the compose injection (rubric.md), the workspace staging (rubric-detail.md), and the new 4-lens prompt end to end.
  • action.yml validated locally: composite run-script passes bash -n; block-scalar indentation and the rubric/orchestration multiline GITHUB_OUTPUT emits are consistent.
  • Confirmed no review check was dropped relative to the previous inline rubric (incl. unsafe/SAFETY, concurrency hazards, public-API rationale, framework-convention respect).

This PR was generated by an automated agent.

…lenses

Move the inline review rubric out of the action.yml prompt block into a
sibling rubric.md, injected at compose time, so it can be edited and reviewed
as prose instead of a YAML block scalar. Restructure the eight priority items
plus the also-check list into four leverage-ordered lenses (design & data
structures, correctness & safety, surface stewardship, change & operate) to
keep the reviewer at a structural altitude and curb nit avalanches.

Add rubric-detail.md for conditional line-level checks (persistence,
unit-safety, test/perf surface), staged into the workspace and read on demand
only for the areas a diff touches. No existing checks are dropped.
@Troublor Troublor added the agent label Jun 30, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean.

  • Reviewed the claude-pr-review action refactor: rubric extraction into rubric.md, 4-lens restructure, and on-demand rubric-detail.md staged into the workspace .claude-review/ directory.
  • Verified all prior rubric items (data structures, design, correctness, complexity, breakage, tests, naming, style; plus unsafe/SAFETY, errors, concurrency, public-API rationale, framework conventions, logging, doc proximity, duplication) map into the new lenses or Do NOT flag - nothing dropped.
  • Compose mechanics mirror the existing orchestration pattern (set -euo pipefail, randomized heredoc delim, action-path source); action inputs are unchanged, so callers are unaffected.
  • Title follows Conventional Commits; description explains what and why with a self-dogfood test plan.
  • No new actionable findings.
  • Still open from earlier reviews: none.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review update

  • Reviewed incremental changes since prior review (commit c43023a): prettier formatting on rubric.md and rubric-detail.md — added blank lines between headers and content, plus italics asterisk-to-underscore conversion.
  • Per the rubric, formatting owned by the repo formatter is not a review concern.
  • No new actionable findings. Re-review verdict matches prior round: clean.
  • Still open from earlier reviews: none.

@Troublor Troublor merged commit b90904a into main Jun 30, 2026
9 checks passed
@Troublor Troublor deleted the troublor/feat/pr-review-rubric-files branch June 30, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant