inspect: align judge prompt with single-consolidating-judge model · Entire
Inspect: Align Judge Prompt with Single-Consolidating-Judge Model
4b0238a→main·
dipree·1mo ago·2 files·+16 added/-13 removed
Reframe composeSynthesisPrompt from 'final reviewer adjudicating N agents' to 'the judge consolidating N inspector reports': update the header, the 'Inspector reports:' label, and the instruction opener to the inspector/judge terminology. No structural change to the minimal verdict + actionable-findings output.
Sessions
b42cbc9345e4View transcript
?\ Checkout the hand off doc that I just added.Pi·Opus 4.8·1 step
Changes
2
cmd/entire/cli/review
Msynthesis_prompt.go+12/-9
Msynthesis_prompt_test.go+4/-4
12 unmodified lines
13
14
15
16
17
16
17
18
19
19
20
21
22
23
24
22
25
26
27
28
10 unmodified lines
39
40
41
39
42
43
41
44
45
46
47
4 unmodified lines
52
53
54
52
55
56
57
58
59
60
61
59
62
63
64
65
6 unmodified lines
72
73
74
72
75
76
77
78
12 unmodified lines
reviewtypes "github.com/entireio/cli/cmd/entire/cli/review/types"
// composeSynthesisPrompt builds the LLM prompt asking the provider to
// synthesize a unified verdict across N agent reviews. Format:
// composeSynthesisPrompt builds the LLM prompt asking the single judge to
// consolidate the N inspector reports into one verdict. Format:
//
// You reviewed the same code change with N agents. Here are their reports:
// You are the judge for this code review. N inspectors independently
// reviewed the same change.
//
// Inspector reports:
//
// ─── claude-code ───
// <narrative from agent's AssistantText events, joined>
// <narrative from the inspector's AssistantText events, joined>
//
// ─── codex ───
// <narrative>
// The judge writes a verdict and only the findings that matter, proportional // to the change. // // Agents with no usable narrative (empty AssistantText) are filtered out // Inspectors with no usable narrative (empty AssistantText) are filtered out // upstream by usableAgentRuns, so the header count and the body are both // scoped to agents that produced narrative output. SynthesisSink already // scoped to inspectors that produced narrative output. SynthesisSink already // guards on len(usable) >= 2 before calling, so the empty case won't reach // the LLM in production. func composeSynthesisPrompt(summary reviewtypes.RunSummary, perRunPrompt string, profileName string, task string) string { 4 unmodified lines
var b strings.Builder
fmt.Fprintf(&b, "You reviewed the same code change with %d agents. You are the final reviewer; critically adjudicate their reports instead of blindly summarizing.\n", len(usable)) fmt.Fprintf(&b, "You are the judge for this code review. %d inspectors independently reviewed the same change.\n", len(usable)) if profileName != "" { fmt.Fprintf(&b, "Review profile: %s\n", profileName) } if strings.TrimSpace(task) != "" { fmt.Fprintf(&b, "Canonical task: %s\n", strings.TrimSpace(task)) } b.WriteString("\nHere are their reports:\n") b.WriteString("\nInspector reports:\n")
for _, run := range usable { narrative := joinAssistantText(run.Buffer) 6 unmodified lines
}
b.WriteString(` Critically evaluate the worker reports — judge, don't summarize. Consolidate the inspector reports into one verdict — judge critically, don't just summarize.
- Keep only findings backed by concrete evidence (file, function, behavior, test, or diff detail).
- Drop unsupported or speculative claims. Merge duplicates. Resolve contradictions on the merits. `)
Mcmd/entire/cli/review/synthesis_prompt.go+12/-9
183 unmodified lines
184
185
186
187
188
187
188
189
190
191
8 unmodified lines
200
201
202
203
204
203
204
205
206
183 unmodified lines
}
}
// TestComposeSynthesisPrompt_AgentCountInHeader verifies the agent count
// in the header reflects only agents with usable narratives.
// TestComposeSynthesisPrompt_AgentCountInHeader verifies the inspector count
// in the header reflects only inspectors with usable narratives.
func TestComposeSynthesisPrompt_AgentCountInHeader(t *testing.T) {
t.Parallel()
summary := makeSummaryWithNarratives([]struct {
8 unmodified lines
prompt := review.ExposedComposeSynthesisPrompt(summary, "")
if !strings.Contains(prompt, "2 agents") {
t.Errorf("header should say '2 agents' (agent-c excluded), got:\n%s", prompt)
}
if !strings.Contains(prompt, "2 inspectors") {
t.Errorf("header should say '2 inspectors' (agent-c excluded), got:\n%s", prompt)
}
}