Skip to content

feat: Fan out review council agents across multiple models with verdict consolidation #635

Closed

Description

@jflowers

What happens

The Divisor review council dispatches each reviewer persona exactly once, against a single model. There is no way to run the same persona against more than one model and reconcile their verdicts, so a single model's blind spots (a missed secret, a missed downstream break) go unchallenged. This is distinct from per-agent model selection (#211), which concerns which single model an agent uses; this concerns running the same agent against a matrix of models at once.

What should happen

A council run should be able to fan a persona out across N configured models in parallel, collect each run's findings, and consolidate them into one verdict, treating the agent as REQUEST CHANGES if any single model returns REQUEST CHANGES. Findings should be deduplicated across runs. A failed run (missing provider key, invalid model) should be reported as informational and must not block the review. The matrix should be declaratively configurable per command/mode (code review, spec review, triage, feedback), mapping agent name → list of model runs, and should fall back to the host-model dispatch for any agent without an entry.

Context

A working implementation exists as local UF scaffolding in the fullsend checkout (fullsend-ai/fullsend) — a declarative .uf/review-matrix.yaml plus an invoke_agent plugin tool and matrix dispatch wired into the review council, triage, and feedback commands. That scaffolding is git-excluded in the fullsend checkout, so it is reference material for a port, not a committed artifact. Complements #211.

Activity

  1. jflowers commented on Oct 1, 2026

    @jflowers
    ContributorAuthor

    Implementation details (reference scaffolding in the fullsend checkout)

    A working reference implementation now exists locally under .opencode/ and .uf/ in fullsend-ai/fullsend. It is git-excluded there, so it's a port target, not a committed artifact. Design follows the evaluation doc's Option B: dispatch intelligence lives in a shared skill; the invoke_agent plugin stays thin (pure model-override execution).

    Architecture

    .uf/review-matrix.yaml            # declarative tier → model mapping (v2)
    .opencode/skills/dispatch-advisor/SKILL.md   # the advisor: pruning + tiering + fan-out
    .opencode/plugins/review-matrix/index.ts     # thin `invoke_agent` tool (unchanged)
    .opencode/commands/uf.review-council.md      # wired: code + spec modes
    .opencode/commands/uf.triage-issue.md        # wired: full panel (was hardcoded 5-agent)
    .opencode/commands/uf.address-feedback.md    # wired: Tier-2 escalation
    

    1. .uf/review-matrix.yaml (v2)

    v1 was a flat per-command agent → list-of-{model} schema with exotic per-agent models. v2 collapses to three tiers resolved by the skill:

    version: 2
    profiles:
      lightweight: opencode-go/qwen3.8-flash
      standard: opencode-go/deepseek-v4-pro
      heavy: opencode-go/grok-4.7
    defaults:
      code: standard
      spec: standard
      triage: standard
      feedback: standard
    always:
      divisor-adversary: heavy
      divisor-sre: lightweight
    • profiles maps a tier name to a concrete provider/model-id (opencode convention).
    • defaults is the base tier per command — used for commands with no diff (triage, feedback) and for spec review.
    • always is a per-agent override that wins over the tier table.

    2. dispatch-advisor skill

    Owns the full agent set for every command that fans out. Takes mode (code-review/spec-review/triage/address-feedback) + a change signal + optional --full, and reuses review-context Protocol 3 path classification (does not re-derive it).

    • Change profile — Protocol 3 categories + git diff --stat main...HEAD size (lines) and breadth (files), plus package span and a security-sensitivity flag (security category, .github/workflows/, cmd/, internal/, or secret/token/key in a path).
    • Agent relevance (hybrid) — ports the evaluation 0.2 rules table verbatim for the 10 known Divisor personas (SKIP when / ALWAYS INCLUDE when, ALWAYS wins over SKIP, included by default). Hard guarantee: divisor-adversary + divisor-guard are never skipped. Unknown agents (present in .opencode/agents/ but not in the table) are judged qualitatively from their .md description/Review Scope.
    • Model tier — ≤50 lines & ≤3 files & single package → lightweight; 51–300 lines or 4–10 files → standard; >300 lines or >10 files or security-sensitive → heavy; always: override wins.
    • Fan-out — security-sensitive + adversary → 2 models; >500 lines + architect → 2 models; else single. Fan-out is per-agent (adjacent tiers, e.g. standard + heavy), not panel-wide.
    • Escape hatch — --full forces all personas at standard, no pruning, no fan-out.

    3. Plugin (invoke_agent)

    Unchanged. One tool call = one child session at an explicit provider/model-id, returning metadata.usage = {cost, tokens} from step-finish. All skip/tier/fan-out logic is upstream in the skill, so the plugin stays thin.

    4. Verdict consolidation (already present in the commands)

    Each dispatched run returns a verdict; the command consolidates:

    • Code/spec review — the agent is REQUEST CHANGES if any single run does; findings deduplicated on (file, root cause).
    • Triage — strictest verdict precedence INVALID > NEEDS-CLARIFICATION > VALID.
    • Feedback — strictest recommendation across runs.
    • A failed run (bad/missing model) is recorded as error and must not block the review.

    5. Cost log

    Each fan-out writes .uf/artifacts/dispatch/<timestamp>.json with the dispatch plan plus per-run {agent, model, cost, tokens, verdict} collected from invoke_agent metadata.

    What changed vs. the issue's original matrix shape

    The issue described agent → list of models per command. The reference implementation resolves that same fan-out through the advisor (tier table + fan-out rules) rather than an explicit per-command model list — the explicit-list form is still expressible via the always: overrides plus the fan-out rules, but the default path is profile-driven. Worth confirming which surface the port should expose (explicit lists vs. profile rules) as an open question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions