Explain Pull Request Score Tool
explain-pull-request-score-toolExplain why one specific pull request got the quality score and label Coderbuds gave it. Returns the receipts rather than a summary: the recorded score, its label, the size counts, every penalty that was applied with its point cost, the AI adjustment, and the stored breakdown. Use this when someone asks "why is #1186 marked poor" or wants to understand a low score on a PR they opened.
The score is structural: it starts at 100 and subtracts penalties for diff size, lines
changed, files changed, change complexity, focus, title/description quality and changes
spanning unrelated areas, then applies a bounded AI adjustment (at most ±20) for
readability, test coverage and security. It does not read CI results and does not run a
linter — never claim otherwise. Report only the factors this tool returns.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repository | Yes | The repository the pull request lives in, as "owner/name" (e.g. patchstack/saas) or a bare repository name. | |
| pull_request_number | Yes | The pull request number, e.g. 1186. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Link to the pull request. | |
| size | No | additions, deletions, total_changes, changed_files, lines_category, diff_characters. | |
| found | Yes | Whether Coderbuds is tracking this pull request. | |
| label | No | The label for that score: Elite, Excellent, Good, Average, Below Average, Needs Improvement, Poor. | |
| score | No | The recorded quality score out of 100. | |
| title | No | Pull request title. | |
| author | No | Who opened it. | |
| number | Yes | Pull request number. | |
| scored | Yes | Whether a quality score was recorded. | |
| status | No | Pull request status. | |
| factors | Yes | Human-readable receipts: each penalty applied and its point cost. | |
| message | No | Why the lookup failed, when found is false. | |
| category | No | How Coderbuds categorised the change (feature, bug-fix, dependency-update, …). | |
| repository | No | Full repository name. | |
| ai_adjustment | No | Points the AI review added or removed on top of the structural score. | |
| scoring_basis | Yes | What the score does and does not measure. Quote this rather than inventing criteria. | |
| recommendation | No | What would raise the score next time. | |
| objective_score | No | The structural score before any AI adjustment. | |
| not_scored_reason | No | Why there is no score, when scored is false — usually the PR was past the size limit for review. | |
| recorded_breakdown | No | The breakdown stored when the review ran. |