Load repo-local PR review criteria from base ref#99
Merged
Conversation
ggreer
approved these changes
Jun 18, 2026
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.
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.mdfrom 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
SkillandTaskavailable 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'git diff --check