Engineering Multi-Agent Debate Systems for Development Document Review

    Reviewing development documents involves numerous dimensions, making it difficult for a single reviewer to catch all issues. This article explores an engineering approach using multi-agent debates to enhance the review process. It details a three-layer architecture, twelve specialized review dimensions, orchestrator scheduling strategies, structured output formats, and a five-level consumption pipeline. By focusing on generating actionable, traceable artifacts rather than endless debate, this method effectively mitigates information overload while maximizing review coverage.

    Engineering Multi-Agent Debate Systems for Development Document Review

    1. Problem Statement: Why Multi-Team Debate is Valuable and How It Causes Information Overload

    The challenge of reviewing development documentation lies not only in its length but also in the highly scattered review dimensions. A complete design document may simultaneously involve architecture boundaries, API contracts, data consistency, security compliance, performance capacity, maintainability, testing strategies, deployment rollbacks, observability, cost control, release risks, and user experience—over a dozen dimensions. A single reviewer cannot maintain the same level of sensitivity across all dimensions, and traditional serial reviews often miss cross-chapter conflicts.

    Introducing multiple agent teams for cross-debate is a valuable engineering approach: allowing different roles to raise questions from their respective perspectives, followed by rebuttals from challengers and rulings from arbitrators, can improve the coverage and depth of problem discovery. However, when the review object reaches hundreds of thousands of words, the review teams reach twelve, and each team engages in multiple rounds of debate, the output quickly expands into massive conversations, conclusions, disputes, and revision suggestions. The real problem then is no longer “can it review,” but “how can humans consume the review results.”

    Therefore, the system design goal should shift from “generating more opinions” to “generating reviewable, traceable, and actionable review artifacts.” The debate process can be intense, but the final deliverables to the development team must be layered, converged, locatable, and prioritized. Otherwise, the stronger the review system, the worse the information overload.

    2. Overall Architecture: Separating Orchestration, Review Teams, and Artifacts

    It is recommended to split the system into three layers to avoid mixing scheduling logic, debate logic, and result consumption.

    1. Orchestration Layer: Responsible for decomposing the document, assigning review tasks, controlling rounds, budgets, concurrency, and failure retries, and collecting structured output from each team.
    2. Review Team Layer: Composed of multiple cross-review groups, each working around a specific review dimension. Internally, a group can have a proposer, a challenger, and an arbitrator.
    3. Artifact Layer: Transforms the debate results into executive summaries, topic summaries, itemized issues, evidence chains, revision tasks, and archives of raw records.

    The artifact layer is crucial. Raw debate conversations should not be directly handed to humans for reading; instead, they should be archived as audit material. The primary deliverables for the development team should be a “decision summary + issue list + revision tasks,” supporting drill-down from summaries to evidence and raw conversations.

    3. Twelve-Dimensional Review Team Design

    The twelve teams should not simply repeat the task of “finding problems” but should have clear boundaries and conflict relationships. The following dimension division can be adopted:

    • Architecture & Boundaries: Focuses on module division, dependency directions, extension points, and coupling risks.
    • Interfaces & Contracts: Focuses on request/response semantics, version compatibility, error codes, and idempotency.
    • Data & Consistency: Focuses on data models, transaction boundaries, cache consistency, and migration schemes.
    • Security & Permissions: Focuses on authentication and authorization, sensitive information, privilege escalation paths, and audit requirements.
    • Performance & Capacity: Focuses on hot paths, capacity assumptions, rate limiting, degradation, and resource budgets.
    • Maintainability: Focuses on naming, layering, configuration complexity, and long-term evolution costs.
    • Testing & Acceptance: Focuses on test coverage, acceptance criteria, exception paths, and regression risks.
    • Deployment & Rollback: Focuses on release sequences, canary strategies, rollback conditions, and environment differences.
    • Observability: Focuses on logs, metrics, tracing, alerts, and fault localization chains.
    • Cost & Resources: Focuses on storage, compute, network, and long-term operational costs.
    • Compliance & Process: Focuses on document completeness, approval chains, and responsibility boundaries.
    • User Experience & Release Risk: Focuses on the impact of changes on users, communication costs, and release windows.

    Each team can adopt a three-role structure: “Proposer—Challenger—Arbitrator.” The proposer raises risks or improvement suggestions, the challenger demands evidence, counterexamples, and impact scope, and the arbitrator provides a ruling, confidence level, and suggested priority. This transforms “opinions” into “conclusions that have been cross-examined.”

    4. Orchestrator Scheduling Strategy: Parallelism, Budget, and Convergence Priority

    The orchestrator should not allow teams to debate indefinitely. A phased scheduling approach is recommended:

    1. Document Slicing and Indexing: Build indexes by chapter, API, data flow, and deployment unit to ensure each team only loads relevant segments.
    2. First-Round Independent Review: Each team outputs structured issues in parallel to avoid early mutual contamination.
    3. Cross-Examination Round: The orchestrator distributes high-priority issues to relevant teams for cross-examination, limiting the maximum number of rounds.
    4. Arbitration and Merging: Rule on disputes, merge duplicate issues, and generate final artifacts.
    5. Manual Review Sampling: Sample and review high-severity conclusions to form a feedback loop.

    The scheduler needs to set budgets: maximum rounds, maximum issues per round, single-team context limit, total time limit, and failure retry limit. Convergence conditions can include: no new high-priority issues, dispute rate below a threshold, no new evidence in two consecutive rounds, or reaching the manual review time window.

    The pseudocode is as follows:

    1. tasks = split_document(doc, dimensions)
    2. teams = build_review_teams(tasks, dimensions)
    3. first_round = parallel_review(teams, tasks)
    4. issues = normalize_and_dedup(first_round)
    5. for round in range(max_rounds):
    6. disputed = select_disputed_issues(issues, threshold)
    7. if not disputed:
    8. break
    9. rebuttals = cross_examine(teams, disputed, evidence_index)
    10. issues = merge_with_arbitration(issues, rebuttals)
    11. if converged(issues, max_new_high_priority=0):
    12. break
    13. artifacts = build_artifacts(issues)
    14. publish(artifacts.executive_summary, artifacts.topic_summary, artifacts.tasks)
    15. archive(artifacts.raw_debate)

    5. Debate Protocol and Convergence Mechanism

    Debates must be bound by protocols, otherwise, they easily drift into lengthy generalizations. Each issue should include: issue title, involved chapter, risk type, severity level, evidence citation, counter-argument, arbitration conclusion, confidence, suggested modification, impact scope, and pending items.

    The debate protocol can stipulate: any conclusion must cite document snippets or clearly state assumptions; the challenger must provide counterexamples or missing evidence; the arbitrator must explain the reasoning for adoption; the same issue can have a maximum of limited rounds of debate; if it cannot converge, it should be marked as “requires human arbitration” instead of continuing the loop. This keeps “intense debates” within a consumable range.

    6. Structured Output and Evidence Chain

    Every conclusion should be traceable to evidence. A unified issue structure is recommended:

    1. {
    2. "id": "ISSUE-001",
    3. "dimension": "data_consistency",
    4. "severity": "P1",
    5. "title": "Missing compensation explanation for dual-write failure during migration",
    6. "location": "Chapter 4, Section 3 of the document",
    7. "evidence": ["Original text snippet reference", "Related API definition reference"],
    8. "debate": {"pro": "...", "con": "...", "arbitration": "..."},
    9. "confidence": 0.82,
    10. "suggestion": "Add compensation tasks and reconciliation strategy",
    11. "status": "needs_human_review"
    12. }

    The value of the evidence chain lies in: humans do not need to read the entire debate record, only the summary and evidence; developers can directly convert issues into revision tasks; and the basis for arbitration can be audited during subsequent reviews.

    7. Consumption Pipeline for Massive Conclusions: From Hundreds of Thousands of Words to Actionable Lists

    Faced with massive outputs, it is recommended to establish a five-level consumption pipeline:

    1. Executive Summary: Retains only blocking items, major risks, and disputes requiring decisions.
    2. Topic Summary: Aggregated by document chapter or review dimension, showing issue density and trends.
    3. Issue List: Sorted by severity, confidence, impact scope, and revision cost.
    4. Evidence Details: Each issue can drill down to the original text location, debate summary, and arbitration reasoning.
    5. Raw Archive: Complete conversations enter log services or object storage for auditing and review.

    Concurrently, perform clustering and deduplication: cluster by chapter, risk type, root cause, and suggested action, merging duplicate issues; form a separate “pending decision list” for disputed issues; route low-confidence issues to a sampling review queue. The final deliverable should be a “revision task board,” not a “complete collection of debate records.”

    8. Quality Assessment and Risk Control

    The quality of the review system must be continuously evaluated: issue coverage, duplication rate, dispute rate, manual adoption rate, false positive rate, average processing time, and high-severity issue recall. Risk controls include: limiting team role boundaries, requiring evidence citations, setting maximum rounds and budgets, retaining human final approval, desensitizing and isolating permissions for sensitive documents, and setting retention periods for raw debate records.

    Multi-agent debate does not replace human decision-making; rather, it transforms scattered reviews into structured candidate conclusions. Only by designing orchestration, convergence, evidence chains, and consumption pipelines together can one gain the benefits of multi-dimensional review while avoiding being overwhelmed by massive conclusions.