Skip to content

feat: add code review pipeline to rhdh-pr-review skill (v0.3.1)#37

Merged
schultzp2020 merged 1 commit into
mainfrom
feat/pr-review-consolidation
Jun 1, 2026
Merged

feat: add code review pipeline to rhdh-pr-review skill (v0.3.1)#37
schultzp2020 merged 1 commit into
mainfrom
feat/pr-review-consolidation

Conversation

@schultzp2020
Copy link
Copy Markdown
Collaborator

Summary

Consolidates the personal pr-review-github skill into rhdh-pr-review with a layered, forge-pluggable architecture.

Architecture

fetch-github.md ──→ review-code.md ──→ post-to-github.md
       │
       └──────────→ review-operator-pr.md

# Future:
fetch-gitlab.md ──→ review-code.md ──→ post-to-gitlab.md

Three layers, each with a single job:

  • Fetch (forge-specific): collects PR metadata, diff, linked issues, existing comments, CI status → context artifact
  • Analyze (agnostic): runs review perspectives, verifies findings → findings artifact
  • Post (forge-specific): maps findings to inline review comments → posts to forge

The analyze layer never calls forge-specific CLIs (except reading file contents at HEAD). Adding GitLab support later requires only fetch-gitlab.md + post-to-gitlab.md — no changes to the analysis workflow.

New files

File Purpose
scripts/fetch_pr_context.py Stdlib-only script: PR URL/number → JSON context artifact
workflows/fetch-github.md Documents script usage and context artifact contract
workflows/review-code.md Platform-agnostic analysis with soft perspective guidance
workflows/post-to-github.md Findings artifact → GitHub inline review via gh api
references/review-perspectives.md Example review perspectives and signal hints

Modified files

File Change
SKILL.md Rewritten as router with 4 routes + artifact contracts
workflows/review-operator-pr.md Phase 1 now consumes shared context artifact
skills/rhdh/SKILL.md Updated routing triggers + skills index
README.md Updated skill description

Design decisions

  • Review perspectives are soft guidance, not a fixed roster — the agent creates perspectives based on what matters for each PR
  • Findings are severity-ranked: medium+ findings get inline comments automatically, nits/low items are listed as one-line bullets for the user to cherry-pick
  • No double-confirmation: if the user approved findings in review-code.md, post-to-github.md does a brief confirm only
  • Follow-up reviews: top-level comment can be skipped when a prior review exists, but not a hard rule

Review process

  • Drafted all files
  • Ran skill-reviewer subagent — fixed all 4 medium issues, 4 low issues, applied 2 suggestions
  • Passed skill-maker Phase 5 audit checklist
  • All pre-commit hooks pass (ruff, markdownlint, pytest — 283 tests)

Consolidate the personal pr-review-github skill into rhdh-pr-review
with a layered architecture: fetch (forge-specific) -> analyze
(agnostic) -> post (forge-specific), alongside existing cluster
testing.

New files:
- workflows/fetch-github.md: GitHub PR context fetching
- workflows/review-code.md: platform-agnostic code analysis
- workflows/post-to-github.md: GitHub inline review posting
- references/review-perspectives.md: review perspective examples
- scripts/fetch_pr_context.py: stdlib-only fetch script

The analyze layer is forge-agnostic — adding GitLab support later
requires only fetch-gitlab.md and post-to-gitlab.md with no changes
to the analysis workflow.

Updated cross-references in rhdh orchestrator and README.
@schultzp2020 schultzp2020 merged commit c415a59 into main Jun 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant