compound-engineering-plugin icon indicating copy to clipboard operation
compound-engineering-plugin copied to clipboard

feat(code-review): add thematic triage grouping

Open jblwilliams opened this issue 6 months ago • 6 comments

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, and grouping: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 avatar May 20 '26 16:05 jblwilliams

@jblwilliams I'd like to see a few examples of output if you can provide it.

tmchow avatar May 21 '26 00:05 tmchow

@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.

jblwilliams avatar May 23 '26 20:05 jblwilliams

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 avatar May 24 '26 22:05 tmchow

@tmchow sounds good. any work in progress branch you have that I can look at/follow?

jblwilliams avatar May 29 '26 00:05 jblwilliams

@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 avatar May 30 '26 22:05 tmchow

@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

jblwilliams avatar Jun 10 '26 21:06 jblwilliams

nice work @jblwilliams

tmchow avatar Jun 12 '26 04:06 tmchow

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.

tmchow avatar Jun 12 '26 19:06 tmchow

Amazing, appreciate your help to get it merged! Agree with Option B on the feedback.

jblwilliams avatar Jun 13 '26 17:06 jblwilliams