Skip to content

Load repo-local PR review criteria from base ref#99

Merged
gontzess merged 7 commits into
mainfrom
gontzess/pr-review-layered-prompts
Jun 18, 2026
Merged

Load repo-local PR review criteria from base ref#99
gontzess merged 7 commits into
mainfrom
gontzess/pr-review-layered-prompts

Conversation

@gontzess

@gontzess gontzess commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Why

The PR reviewer needs repo-specific guidance without loading PR-head review criteria as trusted instructions. We also tested the structured-output publisher path and found it was not viable on a real connector PR: the direct-publishing variant completed quickly and produced usable review output, while the restricted structured-output variant did not produce review output within the normal operating window.

What this changes

This loads .claude/skills/ci-review.md from the trusted PR base SHA through the GitHub Contents API, validates it as plain markdown, and appends it to the reviewer prompt as data. Missing or invalid criteria remain advisory and are surfaced in the review summary.

The reviewer keeps the current live direct-publishing posture, with Skill and Task available for review quality and GitHub comment/review tools available for posting. The prompt still requires a stale-head check before posting, full-diff security/correctness review, explicit dependency-manifest review, and criteria-status reporting.

The structured JSON publisher path was removed after benchmark testing because it did not complete review generation in the tested real PR, even with an extended timeout.

Merge order: this can merge before criteria rollout. Repos without the criteria file continue to use the base and built-in mixin prompts.

Validation:

  • python3 -B -m unittest discover -s .github/actions/pr-review/scripts -p 'test_*.py'
  • action YAML parse
  • git diff --check

@gontzess gontzess marked this pull request as ready for review June 17, 2026 17:50
@gontzess gontzess requested a review from a team June 17, 2026 17:50
@gontzess gontzess enabled auto-merge (squash) June 17, 2026 21:20
@gontzess gontzess merged commit f73a104 into main Jun 18, 2026
2 checks passed
@gontzess gontzess deleted the gontzess/pr-review-layered-prompts branch June 18, 2026 00:27
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.

2 participants