feat(pr-reviewer): read the repo's AGENTS.md and guideline docs before reviewing - #474
Draft
smolpaws wants to merge 1 commit into
Draft
feat(pr-reviewer): read the repo's AGENTS.md and guideline docs before reviewing#474smolpaws wants to merge 1 commit into
smolpaws wants to merge 1 commit into
Conversation
…e reviewing The PR reviewer did not reliably see a repository's own guidance. The cron automation clones the target repo into a workspace subdirectory, so its AGENTS.md is never loaded into the agent's context as an always-on repo skill; the reviewer had no instruction to read it either. Tell both reviewer prompt surfaces — the automation's _build_review_prompt and the /codereview plugin prompt — that they MUST read the repository's AGENTS.md (root + any nested one covering the changed files) plus other relevant docs (CONTRIBUTING.md, CLAUDE.md, .cursorrules, review/coding guidelines) and apply that guidance. This lets a repo steer reviews via AGENTS.md, matching how it steers working agents. Co-authored-by: smolpaws <engel@enyst.org>
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 does not reliably see a repository's own guidance (
AGENTS.md,contributing/coding guidelines). The cron automation clones the target repo into
a subdirectory of the workspace, so the SDK never loads that repo's
AGENTS.mdinto the agent's context as an always-on repo skill — and thereviewer prompt never told the agent to read it. So a repo's documented rules
(e.g. "endpoint access belongs in the client repo, not here") don't influence
the automated review.
Follow-up to the community request that agents respect per-repo guidance
(the
AGENTS.mdrepository-map work): reviews should honor the same docs thatsteer working agents.
Summary
repository's own guidance before reviewing:
skills/github-pr-reviewer/scripts/main.py,_build_review_prompt) — a new workflow step after checkout;/codereviewplugin prompt (plugins/pr-review/scripts/prompt.py).AGENTS.md(repo root + any nested one covering the changed files) plusother relevant docs when present (
CONTRIBUTING.md,CLAUDE.md,.cursorrules, review/coding guidelines) and apply that guidance.Issue Number
N/A — requested in the community
#generalthread on agents implementing inthe wrong repository (review-guidelines half).
How to Test
Unit tests:
python3 -m pytest tests/— 542 passed, 6 skipped;ruffclean.The new
test_prompt_instructs_reading_repo_guidanceasserts the plugin promptnow instructs reading
AGENTS.md/CONTRIBUTING.md. The automation change is aprompt-text addition (a new review-workflow step); no runtime behaviour beyond
what the agent reads during a review.
Video/Screenshots
N/A — prompt/guidance change, no UI surface.