Name Description Size Coverage
check_reviewed.py Print the link to the latest AI review if it already covers --commit. Lets the workflow skip running the model again on a commit that hasn't changed. Prints nothing if there's no AI review of that commit yet. Usage: check_reviewed.py --repo OWNER/NAME --pr NUMBER --commit SHA 905 -
common.py GitHub helpers shared by the AI review scripts. 2668 -
gather_context.py Collect what the AI review reads about a pull request into a directory. Runs before the model, with a read-only token, so the model needs no GitHub access. The diff is taken at --commit, the head commit from the workflow's event, so it matches the code checked out for the model even if someone pushes during the run. pr.md title, author, branches, description diff.patch the changes, file by file files.json the changed files and their patches (used again to post the review) comments.md the conversation, reviews and inline review comments so far, with earlier AI reviews and their findings marked as such since-last-review.md how the pull request's diff changed since the last AI review, without the base branch's changes, so a follow-up review can cover only the author's tickets.md the issues the pull request is linked to, then other issues and pull requests its title or description mentions, as context (Jira tickets are ignored for now) notes.json what was left out for size, for the review's footer Usage: gather_context.py --repo OWNER/NAME --pr NUMBER --commit SHA --out DIR 14219 -
load_guidance.py Match review-context.toml against the changed files and load the guidance. Follows bugbug's review helper (bugbug/tools/code_review/review_context.py): the rules are parsed and validated by bugbug's schema module, rules run in priority order, and each file is loaded once however many rules match it. Only the matched guidance reaches the model, so it never reads the rules itself. The guidance comes from the default branch commit the workflow runs on, never from the pull request. Bugzilla, review and patch predicates never match here: a GitHub pull request has no Bugzilla bug or Phabricator metadata. Needs bugbug's review_context_schema.py on PYTHONPATH. Usage: load_guidance.py --repo OWNER/NAME --ref SHA --config review-context.toml --files files.json --out guidance.md 5653 -
post_review.py Post the model's review findings to the pull request as one GitHub review. A finding becomes an inline comment when its lines are in the diff; GitHub rejects the whole review otherwise, so the rest are listed in the review body. Follow-ups reply to earlier AI findings that later commits tried to address, saying whether they're fixed, and resolve the thread of each one that is. The review body lists them with links, so the summary needn't describe those changes. Only unresolved threads started by an earlier AI review are touched, whatever the follow-up asks for. If the pull request's head has moved past the reviewed commit, nothing is posted and a comment says so: the findings may no longer apply. Usage: post_review.py --repo OWNER/NAME --pr NUMBER --commit SHA --review review.json --files files.json [--run-url URL] [--dry-run] 11769 -
prompt.md 5745 -
README.md # AI code review 12581 -