feat(code-review): add thematic triage grouping
Summary
Adds optional thematic grouping to ce-code-review so related findings are easier to triage together instead of as one long flat list.
The existing severity tables and stable finding IDs stay as the source of truth, but reviews can now include a short Triage Groups section that explains which findings are related, why they matter as a theme, and what order they should be handled in.
Why
On larger reviews, the finding count can easily get into the double digits. A lot of those issues are often related, and one design decision or fix can resolve several of them at once. Grouping gives developers more context about the shape of the feedback so they do not have to work through 20 or 30 individual findings as if each one were independent.
Changes
- Adds grouping controls:
grouping:auto,grouping:off, andgrouping:always - Adds triage group output for interactive and headless review modes
- Keeps stable finding IDs consistent across groups, severity tables, and residual work
- Prunes group references after validation drops findings
- Updates the review output template and contract coverage
@jblwilliams I'd like to see a few examples of output if you can provide it.
@tmchow here is an example output of a review: https://gist.github.com/jblwilliams/43188df4885611ca97d41a85405e5a85
As a concrete example from this review in Group A, I was able to meaningfully have a follow-up discussion for managing sandbox permissions as a central theme instead of coming up on these different paper cuts piecemeal. That allows me to focus on designing a more robust solution because I can see all the potential issues that the current code could run into. Following this pattern helps think about code reviews as more architectural and that's where I like to spend a lot of my thought and focus in reviews now to understand classes of issues.
Thanks.
One thing to pause on is I'm doing a major change to ce-code-review so it'll no longer handle the auto fixing. I don't like the mixing of responsibilities and want it just to handle the review and report findings.
This will support more orchestrated flows better. So I'm gonna get that merged in first then have you rebase off that as I think your work here is useful.
@tmchow sounds good. any work in progress branch you have that I can look at/follow?
@tmchow sounds good. any work in progress branch you have that I can look at/follow?
https://github.com/EveryInc/compound-engineering-plugin/pull/881
@tmchow I rebased off of the latest changes and added a couple examples of a run on the same branch to illustrate the grouping. Let me know if there's anything else you would like me to update
Round 1 - https://gist.github.com/jblwilliams/1173750f8cd8c2e02c232863d7ea793e Round 2 - https://gist.github.com/jblwilliams/8179a8e9b59c4954c9392bede6950cca
nice work @jblwilliams
Thanks for this — to save you a review round-trip, I'm pushing the two triage_groups scope fixes (#1 and #2 from the review) directly to this branch rather than asking you to turn them around.
Resolving it as Option B: triage groups stay a triage lens over the full finding set (that's the "digest a 20-finding review into a handful of themes" value, and it matches the existing render rule that every referenced # appears in a severity table). The fix is to make the mode:agent contract explicit that groups are not an apply queue — callers must filter group members down to actionable_findings before applying — and to correct Stage 5 step 9b's "actionable findings span distinct concerns" to "findings span distinct concerns" so the trigger and the render rule agree.
Commit incoming on your branch. The non-blocking extraction suggestion from the review I'm leaving for a follow-up, per the original note.
Amazing, appreciate your help to get it merged! Agree with Option B on the feedback.