Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.github/workflows/*.lock.yml linguist-generated=true
.github/workflows/*.lock.yml linguist-generated=true
# gh aw compile doesn't recognize "## agent:" markers that end in CRLF, so keep its sources LF on Windows.
.github/workflows/**/*.md text eol=lf
54 changes: 27 additions & 27 deletions .github/workflows/pr-review-command.lock.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/pr-review-command.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Re-reviews a pull request with two reviewers on different models when someone comments /review on it.
description: Reviews a pull request with two reviewers on different models when someone comments /review on it.

on:
slash_command:
Expand All @@ -21,6 +21,6 @@ imports:
timeout-minutes: 40
---

# PR re-review
# PR review

Review pull request #${{ github.event.issue.number }} in ${{ github.repository }} again, following the steps below. It has probably changed since the last review: focus on what's new, and don't repeat earlier comments that were already addressed.
Review pull request #${{ github.event.issue.number }} in ${{ github.repository }}, following the steps below. If it was reviewed before, it has probably changed since: focus on what's new, and don't repeat earlier comments that were already addressed.
2,057 changes: 0 additions & 2,057 deletions .github/workflows/pr-review.lock.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/pr-review.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/shared/pr-review.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# Shared by pr-review.md (automatic) and pr-review-command.md (/review comment).
# Imported by pr-review-command.md, which runs when someone comments /review on a PR.
# A lead agent runs two independent reviewers on different models, cross-checks
# what only one of them found, and posts the merged result.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ To hide the bulk reformat commit from `git blame`, run `git config blame.ignoreR

## AI PR review

`pr-review.md` and `pr-review-command.md` in `.github/workflows/` are an AI reviewer written as [GitHub Agentic Workflows](https://github.github.com/gh-aw/). It reviews each PR when it's opened or marked ready for review, and commenting `/review` on a PR runs it again, including on drafts. It only comments; it never approves or blocks.
`pr-review-command.md` in `.github/workflows/` is an AI reviewer written as [GitHub Agentic Workflows](https://github.github.com/gh-aw/). It only runs when you comment `/review` on a PR (drafts included), so it never uses premium requests on its own. It only comments; it never approves or blocks.

- How it works (`shared/pr-review.md`): two reviewers on different models (`claude-reviewer`, `gpt-reviewer`) review the PR independently. A lead agent merges their findings, asks each reviewer to check what only the other found, verifies disputes against the code, and posts the result with a *Review context and counts* table. `Consensus reached: False` or a low confidence score means the round deserves a second look; comment `/review` to retry.
- The review criteria live in `.github/agents/pr-reviewer.agent.md`, which is also available in the repo's Agents tab. The sub-agents' task and output format are in `shared/pr-reviewer-subagent.md`.
- Models are pinned: the lead's in `pr-review.md` and `pr-review-command.md`, the reviewers' in the `## agent:` blocks of `shared/pr-review.md`.
- Models are pinned: the lead's in `pr-review-command.md`, the reviewers' in the `## agent:` blocks of `shared/pr-review.md`.
- The agent always uses the instructions on `main`, not the PR's copy, so a PR can't rewrite its own reviewer. A PR that changes the reviewer is still reviewed by the old version; test the change with `/review` after merging.
- Edit the `.md` files, then run `gh aw compile` (needs `gh extension install github/gh-aw`) to regenerate the `.lock.yml` files GitHub actually runs.
- It runs Copilot with the `COPILOT_GITHUB_TOKEN` repository secret: a fine-grained personal access token with the **Copilot Requests** permission. Each run uses Copilot premium requests for three models (the lead and two reviewers). Only users with write access trigger it.
Loading