Review context
review_contextBuild a review briefing for a branch or PR: rank changed files by churn and breakage, flag missing companion changes, and suggest reviewers.
Instructions
Review briefing for the changes in base..head (e.g. a branch or pull request): the changed files ranked by how often they changed and broke on base, files that usually change together with them but were left out (a forgotten test, config or caller), and who knows the changed files best as suggested reviewers. Merge commits are excluded.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | Target ref the changes would merge into, e.g. "main". | |
| days | No | Time window in days. | |
| head | No | Ref with the changes, e.g. a branch. | HEAD |
| repo | No | Repo name or path; defaults to the first configured repo. | |
| limit | No | Maximum number of results. | |
| exclude | No | Globs to leave out, as in file_hotspots. | |
| minDegree | No | Minimum coupling degree (percentage) for a missing companion. | |
| minShared | No | Minimum shared commits for a missing companion. | |
| halfLifeDays | No | For reviewers: a commit counts half as much for every this many days of age. | |
| maxFilesPerCommit | No | Skip history commits touching more files than this (bulk renames, formatting). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | ||
| head | Yes | ||
| repo | Yes | Name of the repository that was queried. | |
| files | Yes | Riskiest first: most fixes, then most changes on base. | |
| commits | Yes | Non-merge commits in base..head. | |
| additions | Yes | ||
| deletions | Yes | ||
| reviewers | Yes | Who knows the changed files best, excluding the change authors. | |
| truncated | Yes | True if base..head has more commits than were read. | |
| baseCommit | Yes | Full hash that "base" resolved to. | |
| headCommit | Yes | Full hash that "head" resolved to. | |
| windowDays | Yes | How far back the history of base was read. | |
| filesChanged | Yes | ||
| changeAuthors | Yes | Authors of base..head, left out of reviewers. | |
| scanTruncated | Yes | ||
| historyScanned | Yes | Commits on base read for history and ownership. | |
| missingCompanions | Yes | Files that usually change with the changed files but were left out. |