feat(resolve-pr-feedback): add cross-invocation cluster analysis#480
Merged
Conversation
Replace the dead verify-loop re-entry gate with a cross-invocation awareness signal. The get-pr-comments script now includes resolved threads in its output, enabling the skill to detect multi-round review patterns and cluster new feedback with previously-resolved threads. The resolver agent gains a three-mode assessment for cross-invocation clusters: band-aid (redo prior fixes), correct-but-incomplete (investigate sibling code), and sound-and-independent (context only). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1083b2f614
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…jection The resolved_threads envelope stripped comment text, but the skill needs the first comment body to assign concern categories during clustering. Without it, cross-invocation clusters would misclassify prior threads. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…efficiency Reduce review thread fetch from 100 to 50 (PRs with 50+ active threads are extraordinary) and per-thread comments from 50 to 10 (most threads have 1-5 comments, and the resolver agent reads the source file directly). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
Author
Addressed in 9c2f5bf: added |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
get-pr-commentsscript's jq filter to include resolved threads in a newcross_invocationenvelope — zero additional GraphQL callsWhat changed
get-pr-commentsscript — The jq filter now also selects resolved threads (isResolved == true), sorted by recency, limited to the last 10. Outputs across_invocationobject withsignal(boolean: resolved + unresolved both exist) andresolved_threadsarray. Existing output keys are unchanged.SKILL.md — The cluster gate table replaces "Verify-loop re-entry" with "Cross-invocation" (
cross_invocation.signal == true). When the signal fires, resolved threads are included in category assignment and spatial grouping alongside new threads. Cluster briefs gain a<prior-resolutions>element. A dispatch boundary rule ensures resolved threads participate in clustering but are never individually re-dispatched. The verify loop is simplified to rely on the cross-invocation signal for re-entry detection.pr-comment-resolver agent — Cluster mode now parses
<prior-resolutions>and uses a three-mode assessment when prior resolutions are present. The "correct but incomplete" mode is the highest-value case: prior fixes were right but reveal a broader pattern in untouched sibling code. A new example demonstrates this mode.Motivation
The verify-loop re-entry gate was architecturally dead — it required new threads to appear between push and verify, but automated reviewers post minutes later while verify runs seconds after push. This left the volume gate (3+ items) as the only working trigger for cluster analysis, missing the exact scenario clustering was designed for: recurring feedback about the same problem class across multiple rounds with 1-2 threads each.
Test plan
bun test— 534 tests passbun run release:validate— metadata in synccross_invocationenvelope appears in script outputPost-Deploy Monitoring & Validation
No additional operational monitoring required — this changes skill orchestration content (markdown instructions and a jq filter), not runtime infrastructure.
🤖 Generated with Claude Code