Pre-flight fit check for a change you are about to open as a pull request. Pass the
additions, deletions, and changed-file counts of your working diff and Coderbuds
answers whether the change fits how this team ships: a verdict with reasons, the
team's own merged-PR size norms (median/p75) and merge time by size category, and the
current review-queue pressure. Pass `repository` and that queue is scoped to it —
human-authored open pull requests on the repo you are working in, not every repo the
team owns, because "review one of these first" is only actionable if you are near
them.
Four verdicts, and only two of them ask anything of you. `fits` — go. `fits_at_edge` —
over the standard but inside its tolerance, which is stated for the record and needs
no action, because changes this close to the line merge like changes under it.
`caution` — meaningfully over; weigh the guidance. `split_required` — effectively
unreviewable; split it.
Coderbuds applies its own opinionated standard (on by default, teams can opt out):
changes well above the standard size get at least a caution regardless of what the
team's historical norms would allow — reported as team_norms.target_total_changes.
Also pass `review_goals`: the distinct outcomes a reviewer must approve in this
change. Describe outcomes, not implementation layers — an API, UI, migration, tests,
and docs that deliver one behavior are one review goal. One goal fits. Two prompt a
caution to confirm they really must ship atomically. Three or more require a split.
This is the scope-coherence standard: a small diff can still be hard to review when
it bundles unrelated decisions. If multiple goals truly cannot ship separately, use
`scope_rationale` to preserve that context and record the decision after the check.
Best results: pass `numstat`, the raw output of `git diff --numstat <base>...`. Coderbuds
then works out the split from the file paths itself — tests, documentation, generated
files (lockfiles, snapshots, minified bundles) and binary assets are identified and
discounted, so the verdict judges the CODE a reviewer actually has to read. 400 lines
of blog post and 400 lines of business logic are not the same review, and without the
paths there is no way to tell them apart.
Failing that, declare the split yourself: test_lines (changed lines living in test
files, e.g. from `git diff --shortstat -- tests/`) and moved_lines (code relocated
without behavioral change, e.g. an extraction refactor) are subtracted from the
verdict, because a raw count punishes test coverage and double-counts refactors.
Report these honestly; they are recorded with the check and visible to the team.
Do the same for files with test_files and moved_files. A rename sweep, codemod, or
file-move refactor touches a lot of files with almost nothing to read in each, and the
file count is judged separately from the line count — so without these a mechanical
change is called oversized on file count alone. `git diff --shortstat -M` and
`git diff --summary` will tell you how many of the changed files were renames.
When the verdict is not "fits", say what you did about it with `record-change-fit-decision`
— including when you proceed anyway. Overriding is allowed; overriding silently is what
leaves the standard unable to learn it is in the wrong place.