Multi-Agent Debate for Development Document Review and Convergence

    This article explains how to use multi-agent debate for reviewing development documents without drowning in raw transcripts. It covers architecture, document preprocessing, role design, a structured claim protocol, convergence into an actionable issue list, engineering controls, governance, anti-patterns, and a phased rollout checklist.

    The Problem Is Not Debate, but Convergence

    In development document review, multi-agent debate is valuable: multiple roles inspect the same requirements, interface contracts, architecture, or operations manuals from different standpoints and expand the surface of issues found. A common pattern is to create several debate teams outside the review system—for example twelve teams for fact checking, interface consistency, security, performance, reliability, maintainability, testability, operability, user experience, terminology, compliance risk, and adversarial challenge—then have an orchestrator schedule cross-examination of the same documents and aggregate conclusions.

    This often finds issues a single review path misses, but it also produces a flood of conclusions: tens of thousands of words of overlapping, inconsistent, and severity-conflicting debate. The real gap is not too few teams or too little debate, but the lack of an engineered convergence mechanism. The deliverable should not be a huge raw transcript. It should be a ranked, traceable, actionable, reviewable issue list.

    From an engineering view, multi-agent document review has three tensions:

    1. Coverage vs. context budget. Broader review needs slicing, background, and dependencies, while context, latency, and cost are limited.
    2. Role diversity vs. conclusion consistency. Different roles conflict by design; simple voting can suppress rare but critical expert views.
    3. Review depth vs. delivery speed. More debate rounds go deeper, but also raise duplication, noise, and human reading cost.

    A practical design treats debate as discovery and convergence as the core delivery process. The goal: raise issue recall with multi-role cross-examination, keep traceability with structured claims, converge with evidence and risk rules, and keep final judgment with humans.

    Architecture: From Team Collision to Pipeline Governance

    Split the system into six layers instead of letting teams emit long free-form text.

    1. Document ingest and version baseline. Lock version, change scope, related requirements, interface definitions, and normative sources so teams do not cite different versions.
    2. Parse and slice. Detect headings, paragraphs, tables, code, figures, acceptance criteria, and glossaries; give each slice a stable anchor and dependencies.
    3. Orchestration. Team selection, task split, round scheduling, budget, stop conditions, state, and retries.
    4. Debate teams. Each role emits structured claims, takes challenges, and may add evidence or revise.
    5. Evidence and claim pool. Store claims, evidence, counterexamples, conflicts, and rulings so every conclusion traces to source text and rationale.
    6. Convergence and delivery. Normalize, dedupe, cluster, resolve conflicts, rank risk, human review, and generate fix tasks.

    A simplified main flow:

    1. Document version and baseline
    2. -> Structural parse and slicing
    3. -> Orchestrator selects teams and budget
    4. -> Independent review and claims
    5. -> Multi-round cross-examination and evidence
    6. -> Claim normalization, dedupe, and clustering
    7. -> Conflict classification and adjudication
    8. -> Risk scoring and priority ranking
    9. -> Human sampling review and key conflict confirmation
    10. -> One-page summary + issue list + fix advice + unresolved items

    Final artifacts should be machine-readable. Besides a one-page summary for managers, produce a structured issue list. Each issue should include document location, type, evidence, impact, suggested action, severity, confidence, suggested owner, status, and review conclusion so the system can connect to task flow, version regression, and quality gates.

    Document Preprocessing: Turn Review Targets into Computable Units

    Teams often talk past each other on fuzzy context. Preprocessing is not mere chunking; it builds review units that are citable, locatable, and retraceable.

    Lock document version and review baseline: version, change scope, related requirements, and normative sources. For related documents (requirements, API design, data contracts, runbooks), define cross-references and which source is authoritative. Otherwise one team argues from an old API and another from a new one.

    Keep structure. Do not slice only by token count; that splits preconditions, steps, and acceptance criteria. Organize by heading, semantic paragraph, table, code, figure, and glossary entry. Keep parent-child links, sequential dependencies, and stable anchors. Merge or explicitly link units that cover interface fields, state machines, branches, and error paths.

    Make review dimensions explicit. Typical issues include:

    • Factual errors: parameters, constraints, defaults vs. actual capability.
    • Completeness: missing preconditions, exception handling, rollback, permissions, or acceptance criteria.
    • Consistency: terms, APIs, data formats, and state flows that disagree across sections.
    • Implementability: developers cannot implement, or testers cannot design cases.
    • Operability: missing logs, monitoring, alerts, capacity, and failure handling.
    • Compliance and risk: permission boundaries, sensitive data, audit, and abnormal operations.
    • Readability: messy structure, unclear references, unexplained terms, unreproducible steps.

    Map these dimensions to roles and output fields so teams do not all emit non-actionable “please improve the document.”

    Team Design: Twelve Roles Are Not the Goal

    Team count is not the objective. Twelve teams help if they add complementary views and cross-checks, not if every team comments on every paragraph. Enable teams dynamically by document type and risk profile.

    Reference role matrix:

    Team Focus Typical output
    Fact checking Parameters, constraints, defaults, version facts Wrong facts, missing sources, stale descriptions
    Requirements consistency Goals and acceptance closed loop Missing scenarios, contradictory requirements, untestable items
    Interface contract APIs, fields, error codes, formats Contract mismatch, unclear bounds, compatibility risk
    Architecture dependencies Module boundaries, dependency direction, extensibility Inverted deps, tight coupling, no degradation path
    Security and permissions Identity, access, sensitive data, audit Privilege risk, missing permission notes, audit gaps
    Performance and capacity Latency, throughput, capacity, throttling Missing capacity assumptions, unverifiable SLOs
    Reliability and fault tolerance Exceptions, retry, idempotency, recovery Missing error paths, unclear retry semantics
    Testability Test conditions, observable results, acceptance steps Untestable requirements, missing I/O examples
    Operability Logs, monitoring, alerts, troubleshooting Missing observability, unusable incident steps
    User experience Reading path, task completion, ambiguity Skipped steps, unclear references, weak examples
    Standards and compliance Terms, process, policy, risk boundaries Inconsistent terms, missing process, compliance risk
    Adversarial challenge Challenge majority views, find counterexamples Over-design, hidden premises, conflicting evidence

    Inside a team, separate proposer, challenger, and recorder. Proposers emit claims; challengers seek counterexamples and evidence gaps; recorders structure the debate. Adjudicators should be independent of proposers to avoid self-judgment bias.

    Three principles: clear focus with limited overlap for cross-check, not duplicate spam; raise adversarial and security weight on high-risk work, reduce teams on low-risk docs; require a shared claim schema so aggregation can be automated.

    Debate Protocol: From Free Talk to Verifiable Claims

    Without a protocol, debate collapses into long natural-language chat. Require claims as the unit of opinion. A claim should include at least:

    1. Claim ID:
    2. Document location:
    3. Issue type:
    4. Suggested severity:
    5. Statement:
    6. Evidence excerpt:
    7. Reasoning:
    8. Impact scope:
    9. Suggested fix:
    10. Confidence:
    11. Verifiable condition:

    Five steps:

    1. Independent review. First pass without seeing others, to reduce anchoring.
    2. Cross-examination. Challenge the same location or topic; demand evidence, premises, or counterexamples.
    3. Defense and revision. Add support, narrow scope, or withdraw. Revision is more valuable than stubbornness.
    4. Independent adjudication. Score evidence strength, baseline, impact, and org norms.
    5. Convergence check. Stop when new high-value issues are rare, conflicts cluster on few topics, or budget is nearly spent.

    Stop conditions must be explicit: max rounds, time, context budget, new valid claims per round, duplication threshold, and whether high-risk conflicts are all in human review. Debate without stop conditions produces text, not decisions.

    Do not replace evidence with simple voting. Majority “this is a problem” does not prove it; a minority security or compatibility claim may matter more than many low-value wording notes. Prefer source evidence, authoritative baseline, reproducibility, and impact; treat votes as a secondary signal.

    Result Convergence: Compress Tens of Thousands of Words into an Action List

    Convergence is the core.

    1. Normalize. Map outputs to issue objects: location, type, evidence, impact, suggestion, severity, confidence, status. Unlocated, unevidenced, or unverifiable claims go to a low-confidence pool, not the main report.

    2. Dedupe and cluster. Drop exact duplicates, then cluster by location, root cause, and action. Different wording may share a cause—“missing exception handling,” “incomplete failure path,” “no rollback”—and should merge. Similarity of text is not enough; ask whether they affect the same delivery decision.

    3. Classify conflicts. At least four types: fact, scope, severity, and duplication. Facts go back to authority; scope needs document boundaries; severity is re-scored by impact and conditions; duplicates merge. Unresolvable items become an unresolved list for humans.

    4. Rank risk. Avoid opaque formulas. Use explainable rules: correctness, security, and implementability first, then scope, likelihood, evidence strength, and fix cost. High severity with strong evidence: must fix. Medium, well-bounded: should fix. Wording: suggested improvement. Weak evidence or tiny impact: watch or ignore.

    5. Produce artifacts.

    1. One-page summary: top risks, main conflicts, coverage, unresolved items.
    2. Structured issue list: priority-sorted, filterable, assignable, trackable.
    3. Fix advice and impact: point to section, paragraph, or field; avoid “please complete.”
    4. Evidence and conflict appendix: citations, challenges, and ruling reasons for audit.

    Human review is graded: all high-risk, sample medium, rule-based spot-check of low-risk; cross-domain and business-boundary conclusions always need people. That controls cost and prevents treating model output as final.

    Engineering: Budget, Stopping, Observability

    Simplified pipeline:

    1. review(document, baseline, budget):
    2. units = parse_and_anchor(document, baseline)
    3. teams = select_teams(document.type, document.risk_profile)
    4. claims = empty_pool()
    5. for unit in units:
    6. for round in max_rounds:
    7. proposals = run_independent_review(teams, unit)
    8. challenges = cross_examine(teams, proposals)
    9. judgments = adjudicate(challenges)
    10. claims.add(normalize(proposals, challenges, judgments))
    11. if should_stop(round, claims, budget):
    12. break
    13. issues = normalize_claims(claims)
    14. clusters = deduplicate_and_cluster(issues)
    15. resolved = resolve_conflicts(clusters)
    16. ranked = score_by_risk_and_evidence(resolved)
    17. return render_summary(ranked)
    18. + render_action_list(ranked)
    19. + render_unresolved(resolved)

    The orchestrator manages context, time, call cost, and human review cost. High-risk chapters get more teams and rounds; low-risk ones fewer teams or earlier stop. Reuse templates and issue patterns for repeating structures, but re-verify facts against the current version.

    Observability: record review IDs, team IDs, rounds, cited evidence, claim state, and rulings. Track:

    • Valid issue rate: action-list items vs. all claims.
    • Duplication rate: merged claims.
    • Conflict rate: items that need adjudication.
    • Human accept rate: confirmed after review.
    • Missed-issue feedback after release.
    • Average human review time.
    • Cost per confirmed valid issue.

    Quality gates: high-risk blocks release or forces review; medium goes to a tracking list; low-risk goes to continuous improvement. Then multi-agent review joins the quality loop instead of only generating reports.

    Security, Access, and Governance

    Development docs may include APIs, business rules, deploy notes, and internal process. Treat document text as untrusted input; instructional text in the doc must not change system rules. Least privilege: teams should not see unrelated sensitive material. Protect review logs and evidence chains with access control and retention so you can audit without widening leak surface.

    Responsibility: multi-agent debate assists discovery and structured advice. Final technical judgment stays with document, architecture, or security owners. Do not auto-edit authoritative specs or publish unreviewed conclusions.

    Common Anti-Patterns

    1. More teams without a shared claim schema: more prose, not more actionable issues.
    2. Voting instead of evidence: minority critical views get suppressed.
    3. No stop conditions: cost and latency explode.
    4. No dedupe/clustering: the same issue is restated many times.
    5. Proposer as adjudicator: errors lock in.
    6. Ignoring version baseline: invalid conflicts from mixed versions.
    7. Raw dialogue as deliverable: people need summary, list, and rationale.
    8. No regression after fixes.
    9. No human gate: model judgment treated as final.
    10. Optimizing for issue count: noise drowns high-risk items.

    Rollout Path and Checklist

    Phase 1: one relatively structured, lower-risk document type; lock baseline, slicing, claim schema, and three to five core teams; prove discover–dedupe–rank–human review.

    Phase 2: more teams and document types; add conflict classes, budget scheduling, and stop rules.

    Phase 3: feed results into task tracking, version regression, and quality gates; track accept rate, missed issues, and cost per valid issue.

    First-landing checklist:

    • Version, change scope, and authority locked.
    • Slices keep headings, dependencies, and stable locators.
    • Roles complementary, not redundant.
    • Each claim has evidence, impact, and action.
    • Rounds, budget, and stop conditions set.
    • Independent adjudication and conflict classification exist.
    • One-page summary, structured list, and unresolved items produced.
    • All high-risk items human-reviewed.
    • Trace IDs and quality metrics recorded.
    • Regression review after fixes.

    Closing

    The value of multi-agent debate is not more opinions. It is higher recall from different roles, then engineering that compresses opinions into decisions. A mature development-document review system needs discovery through argument, evidence for traceability, and convergence for action. Put debate and convergence on one pipeline so tens of thousands of words do not bury the work, and multi-agent review becomes a stable, controllable, sustainable way to improve document quality.