Skip to content

feat(ce-resolve-pr-feedback): tighten clustering to cross-round only#611

Merged
tmchow merged 1 commit intomainfrom
tmchow/clustering-review
Apr 20, 2026
Merged

feat(ce-resolve-pr-feedback): tighten clustering to cross-round only#611
tmchow merged 1 commit intomainfrom
tmchow/clustering-review

Conversation

@tmchow
Copy link
Copy Markdown
Collaborator

@tmchow tmchow commented Apr 20, 2026

Summary

Clustering in ce-resolve-pr-feedback now requires cross-round evidence before it activates. The volume-only trigger (3+ new comments) is removed, and the cross_invocation signal is paired with a cheap spatial-overlap precheck so an unrelated resolved thread no longer pays for full category analysis.

Why this changes

The prior design let cluster analysis fire from either (a) 3+ new comments in one review round, or (b) the script reporting any mix of resolved and unresolved threads. In practice, single-round clusters usually bailed as "coincidental" after already paying full categorization and broader-area read costs. The cross-invocation gate was broad enough that a PR with one ancient unrelated resolved thread plus one new unrelated thread would still enter analysis.

Clustering now only activates when reviewers have flagged the same area across multiple rounds. That is the evidence shape where "investigate siblings for the same issue" (the correct-but-incomplete mode) earns its keep.

Gate logic

Trigger Before After
3+ new comments, no prior review round Fires Skipped
cross_invocation.signal true, no path overlap with resolved threads Fires Skipped (new precheck)
cross_invocation.signal true, new thread shares file or directory subtree with a resolved thread Fires Fires

The spatial-overlap precheck compares paths only. No category inference, no LLM calls, so the false-positive tax is cut off before full categorization runs. Only inline review_threads with file paths participate; pr_comments and review_bodies are always dispatched individually regardless of clustering.

Resolver agent

ce-pr-comment-resolver's cluster-mode workflow drops the single-round branch. <prior-resolutions> is now mandatory in every cluster brief, so the three cross-round assessment modes (band-aid / correct-but-incomplete / sound-and-independent) are the only paths left. The systemic and coincidental single-round modes are removed.

Tradeoff, noted explicitly

First-round reviewer feedback that happens to point at a shared abstraction opportunity (e.g., "these 4 comments all want the same helper") is now handled as individual fixes instead of a coordinated cluster. This is the intentional tradeoff: the dispatch-coordination value of single-round clustering was judged to be outweighed by the scope-creep risk of LLM-driven holistic refactors on thin evidence. The skill body calls this out so the decision can be revisited if the failure appears in practice.


Compound Engineering
Claude Code

…ound evidence for clustering

Drop single-round clustering and tighten the cross-invocation gate with a
cheap spatial-overlap precheck. New-only groups no longer trigger
cluster analysis; a cluster must contain at least one previously-resolved
thread. The precheck compares paths only — no LLM calls — so the
cross_invocation.signal false-positive tax is cut off before full
categorization runs.

Resolver agent drops the systemic/coincidental (single-round) assessment
branch. Cluster briefs always represent a cross-invocation cluster, so
<prior-resolutions> is mandatory and the three cross-round modes
(band-aid / correct-but-incomplete / sound-and-independent) are the only
ones left.

Rationale: single-round clustering typically bailed as "coincidental"
after paying full categorization and broader-area read costs. First-round
"one helper fits all" opportunities are intentionally handled as
individual fixes until repeated reviewer evidence promotes the pattern.
@tmchow tmchow merged commit 2dd0a6e into main Apr 20, 2026
2 checks passed
This was referenced Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant