RFC: patch size analysis prompt

Ian Rogers <[email protected]> Wed, 10 Jun 2026 15:40:27 -0700
Newsgroups dev.linux.lists.sashiko
Message-ID <CAP-5=fWmn9+LT-4VeAm6JwTM=FB071w-Oa2QXDROLK7VDXcfow@mail.gmail.com>
Hi,

I sent an RFC PR to add patch size analysis to Chris Mason's prompts:
https://github.com/masoncl/review-prompts/pull/73

The proposed prompts aren't subsystem specific but maybe they should be?

The prompt itself:
1) Shows what a decomposition analysis for a patch should look like.
2) Categorizes the patch size, ignoring small ones.
3) Recommends decomposition when multiple subsystems are involved, or
when bug fixes, features and refactorings are mixed together.
4) Establishes an 80% rule: if any of the decomposed patches is sized
at 80% of the original patch's size, then the original patch was
appropriately sized.

Using the prompt locally I find the feedback useful and the approach
doesn't feel specific to the perf subsystem I largely work in. I could
imagine that if someone is say dropping a new device driver, getting
feedback to break that apart may be unwelcome. Perhaps people have
extra advice on how to determine if a patch is appropriately sized. I
think the feedback would be useful for both reviewers and
contributors. For reviewers it would let them know if asking for
decomposition was reasonable. For contributors it would give them
quick feedback that their code should be broken apart to make it
easier to review. However, these are just my thoughts and the RFC and
this email is intended for others to provide theirs.

Thanks,
Ian