Review profiles with master adjudication#1312
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 5 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit bc13a81. Configure here.
There was a problem hiding this comment.
Pull request overview
This PR redesigns the experimental entire review command around named review profiles with fan-out to multiple worker agents and mandatory master adjudication (for multi-worker profiles), replacing the legacy per-agent review config and removing the old migration flow.
Changes:
- Introduces
review_profiles+review_default_profilesettings, including worker-levelagentaliases andmodelhints, plus a profilemasterused for final adjudication. - Updates
entire reviewCLI surface (--profile, positional profile name,--configure,--prompt, and--agenttargeting a single worker). - Implements profile-native master synthesis via a new
AgentSynthesisProvider, and threads--modelinto Claude/Codex/Gemini review runner argv.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/architecture/review-command.md | Updates architecture documentation for profile-based review and master adjudication. |
| cmd/entire/cli/settings/settings.go | Adds settings schema/types for review profiles and default profile; keeps legacy fields for parsing. |
| cmd/entire/cli/root.go | Updates root command comment to reflect profiles. |
| cmd/entire/cli/review/types/sink.go | Extends per-run metadata to include display name vs registry name and model. |
| cmd/entire/cli/review/types/reviewer.go | Extends RunConfig with profile/task/model context for profile-based prompts and runs. |
| cmd/entire/cli/review/synthesis_sink.go | Adds agent-backed master synthesis provider and auto/adjudication-mode wiring. |
| cmd/entire/cli/review/synthesis_prompt.go | Updates synthesis prompt to an adjudication-style “final report” with rules and sections. |
| cmd/entire/cli/review/run.go | Records worker display name vs registry agent name and model in RunSummary; forwards events under display name. |
| cmd/entire/cli/review/run_multi.go | Propagates agent registry name and model through multi-run state and summaries. |
| cmd/entire/cli/review/prompt.go | Composes worker prompts from skills + profile name + canonical task + per-agent/per-run instructions. |
| cmd/entire/cli/review/profile.go | New profile resolution/default-task logic, worker/master selection, and preference persistence helpers. |
| cmd/entire/cli/review/picker.go | Adds guided setup flow and profile-aware editing; introduces master selection and model picking. |
| cmd/entire/cli/review/migration.go | Removes legacy migration flow from project settings to clone preferences. |
| cmd/entire/cli/review/migration_test.go | Removes tests for the deleted migration flow. |
| cmd/entire/cli/review/marker_fallback.go | Updates terminology/docs for “no adapter yet” manual fallback flow. |
| cmd/entire/cli/review/manifest.go | Improves manifest/session matching for worker aliases and model hints. |
| cmd/entire/cli/review/fix.go | Updates fix-agent choice derivation to pull from profiles (including master) and dedupe aliases. |
| cmd/entire/cli/review/export_test.go | Updates test export wrapper for changed synthesis prompt signature. |
| cmd/entire/cli/review/cmd.go | Rebuilds entire review command flow: profile resolution, guided setup, fan-out, and master synthesis. |
| cmd/entire/cli/review/cmd_test.go | Updates command tests for profile fan-out behavior and --prompt flow. |
| cmd/entire/cli/review_context_test.go | Updates review-context test settings to the new profile schema. |
| cmd/entire/cli/review_bridge.go | Removes legacy synthesis provider wiring; keeps reviewer wiring to avoid import cycles. |
| cmd/entire/cli/labs.go | Updates labs/experimental command summary text. |
| cmd/entire/cli/integration_test/review_test.go | Updates integration tests to configure reviews via profiles. |
| cmd/entire/cli/agent/geminicli/reviewer.go | Threads model hint into Gemini review runner command. |
| cmd/entire/cli/agent/codex/reviewer.go | Threads model hint into Codex review runner argv while keeping stdin ordering. |
| cmd/entire/cli/agent/claudecode/reviewer.go | Threads model hint into Claude review runner argv. |
- Preserve profile task/master_model when saving from --edit - Route empty/placeholder profiles through first-run setup - Skip re-review confirm in non-interactive runs instead of erroring - Treat 'start review now?' abort as a clean cancel - Fix lint: drop dead helpers, lowercase error, perfsprint, un-deprecate the still-used review_fix_agent field - Doc/comment fixes (ReviewConfig prompt/skills, master adjudication)
Strip the provider prefix and thinking-level suffix when matching a configured profile model against a session's recorded model, so hints like 'anthropic/claude-sonnet:high' link to session model 'claude-sonnet-4-5'. Same-model/different-thinking workers fall back to start-time + used-session disambiguation.
|
Addressed the review feedback (Cursor Bugbot + Copilot) in
Also fixed all lint findings (dead helpers removed, lowercased error string, perfsprint, and un-deprecated the still-used |
- Drop the --fix and --all flags and the fix-apply pathway (findings remain browsable via --findings). - Add --model to override the model for a single --agent worker run (--model requires --agent). - Remove now-dead fix-agent selection helpers; keep the shared default/saved agent-pick helpers used by the master picker. - Update post-run footer/findings output and docs to drop --fix references.
- entire review --configure now prints available review agents (adapter-backed, with installed status) and current profiles every time, so it's the discovery entry point. - Accept --set-agents/--set-master/--set-task/--set-model to write a profile non-interactively (no TUI); --set-* writes preserve untouched profile-level fields (task, master_model). With no --set-* flags it falls back to the guided wizard (interactive) or a discovery view (non-interactive). - --agent errors now list the profile's configured workers. - Available agents derive from the registry + ReviewerFor, so the catalog never drifts from what review can actually launch.
The catalog now appears only in the non-interactive discovery view; the interactive wizard already lists selectable agents, so showing the catalog first was redundant. Scripted --set-* writes just confirm.
- New optional agent.ModelLister capability (agent.ModelInfo + AsModelLister). - Curated, clearly-labeled model lists for claude-code, codex, gemini (their CLIs have no --list-models). --model still forwards any value the CLI accepts. - entire review --models lists advertised models per review agent (optionally filtered by --agent); needs no repo/profile. - Designed so agents with a live model command (e.g. Pi's pi --list-models) can implement ListModels by shelling out later.
Symmetric with --models: --agents lists the worker agents valid for --agent in the resolved profile (with hook-install status and the master marked), falling back to the available review-agent catalog when no profile exists.
Replace the free-text 'Model for <agent>' input with a select of the agent's advertised models (via agent.ModelLister), plus 'Default' and 'Custom…' (free text) options. Falls back to free text when an agent advertises no models.

Summary
Redesigns
entire reviewaround named review profiles with mandatory master adjudication, replacing the old global per-agent review config. Experimental feature — legacy behavior and migration are removed entirely.What changed
review_profiles+review_default_profilesettings. A profile has a canonicaltask, a set of workeragents, and amasterthat consolidates worker reports into one final report.entire review,entire review <profile>,entire review --profile <name>entire review --promptfor one-off per-run instructionsentire review --agent <name>to run a single workermaster, which runs after workers and produces the canonical report.entire review --configure) walks through review type + worker agents + optional models, then asks before starting agents. Non-interactive runs fall back to an opinionated defaultgeneralprofile.agent+model, so the same agent can run multiple times with different models.--modelis threaded into each launchable agent's argv.Testing
env -u PI_CODING_AGENT go test ./cmd/entire/cli/...Notes
Stacked: the Pi review-runner adapter is in a follow-up PR on top of this branch.
Note
Medium Risk
Large behavioral change to an experimental command (settings shape, fan-out rules, no legacy migration); master synthesis and multi-agent concurrency affect how reviews run and attach to checkpoints.
Overview
entire reviewis rebuilt around named review profiles instead of the legacy per-agentreviewmap. Settings addreview_profilesandreview_default_profile; each profile has a sharedtask, workeragents(with optionalagentalias +model), and amasterthat produces the final report after workers finish.The CLI gains
--profile, positional profile names,--configure(guided setup without running),--promptfor one-off instructions, and--editscoped to profile skill/model pickers. Multi-worker runs fan out to all profile workers—the old per-run multi-agent picker is gone—and require a validmaster. First-run / non-TTY paths use guided setup or an opinionated defaultgeneralprofile.Prompts and orchestration inject profile name + canonical task into worker prompts;
RunConfig/AgentRuncarry profile, model, and display vs registry agent names for manifests and session matching. Master adjudication replaces optional lazy checkpoint synthesis:AgentSynthesisProviderruns automatically (SynthesisSinkauto mode) with a stricter merge/dispute prompt. Claude, Codex, and Gemini reviewers pass--modelwhen configured; Codex argv order is fixed for stdin.Removed: project→clone review migration (
migration.goand tests) andDeps.SynthesisProviderfrom the review bridge. Docs and integration tests move to profile-shaped settings.Reviewed by Cursor Bugbot for commit bc13a81. Configure here.