Multi-Agent Debate Review for Long Development Documents: Architecture and Practice
This article explains how to review extremely long development documents with a multi-agent debate workflow. It covers a four-layer architecture with an orchestrator, twelve review teams, an aggregation layer, and a convergence layer; a three-round scheduling strategy; structured output contracts; conflict clustering and merging; quality metrics such as evidence citation rate, cross-team reproduction rate, and residual conflicts; and practical guidance for turning findings into an executable fix list. It also lists common pitfalls, including overlapping dimensions, out-of-scope comments, hallucinated findings, runaway rounds, and reports without revisions.
1. Why Long Development Documents Are Hard to Review Manually
When a development document grows to hundreds of thousands of words, traditional review methods break down quickly. Human attention is limited, so reviewers usually cover only one or two dimensions they are familiar with, such as API definitions or deployment procedures, while missing terminology consistency, exception branches, permission boundaries, and observability design. The problem gets worse because issues inside a document are often connected: an imprecise state machine description can simultaneously affect API semantics, test cases, and rollback plans.
A natural idea is to split the review into multiple teams that “clash” with each other. Each team focuses on a single dimension, challenges the others, and corrects mistakes, while an orchestrator schedules the process and consolidates the conclusions. This structure is essentially a multi-agent debate review of a document.
2. Overall Architecture: Orchestrator, Twelve Clashing Teams, and Convergence Layer
The system can be abstracted into four layers.
- Orchestration layer: splits the document, assigns tasks, controls rounds, and collects conclusions. It does not make judgments itself; it only schedules work and logs conflicts.
- Clash layer: several review teams work in parallel, each with a clear dimension boundary and output contract.
- Aggregation layer: deduplicates and clusters structured conclusions, sorts them by severity, and identifies contradictory judgments.
- Convergence layer: runs one additional targeted debate round for conflicting items and produces a final, actionable issue list.
The twelve dimensions can be divided as follows: requirement and goal consistency, terminology and naming consistency, API and data contracts, state machine and process completeness, exception and failure paths, security and permission boundaries, performance and capacity assumptions, observability and operations, testing and acceptance criteria, compatibility and migration, document readability and structure, and compliance and risk warnings.
Each team’s output must be a structured object rather than free-form prose; otherwise the aggregation stage cannot compute anything:
{"team": "state_machine","doc_span": "3.2-3.5","findings": [{"id": "SM-017","severity": "high","claim": "Retry and timeout do not define an idempotency key","evidence": "quoted excerpt from the original text","impact": "may cause duplicate writes","fix": "add an idempotency key and a deduplication window"}],"confidence": 0.82}
3. Orchestration and Scheduling: How to Split and Rotate
Splitting must balance semantic completeness and load. Dividing purely by word count can cut a complete flow in half, leaving teams with incomplete context. A safer approach is to build a section tree from the heading hierarchy first, then package “semantic blocks” as the smallest unit, with each block carrying a global glossary and a table-of-contents summary as shared context.
For scheduling, a three-round strategy is recommended. In the first round, teams review independently in parallel and are not allowed to see each other’s conclusions, which avoids anchoring effects. In the second round, teams cross-examine: each team receives the other teams’ conclusions and may only raise rebuttals and additional evidence. In the third round, targeted convergence re-debates only high-severity conflicts.
round1: parallel(team_1..team_12) -> findingsround2: cross(team_i reviews findings_-i) -> rebuttalsround3: converge(conflict clusters) -> final_list
Budget control matters as well. Set a maximum token limit and a maximum round limit for each round; once exceeded, force convergence to prevent the debate from drifting into an inconclusive argument.
4. Conflict Aggregation: Turning Contradictory Judgments into Adjudicable Items
The core of aggregation is “deduplicate within a cluster, collide across clusters.” Use the issue location (section + entity + keywords) as the clustering key to merge conclusions from different teams that point to the same place; take the maximum severity and the union of evidence. If two conclusions give opposite recommendations for the same location, mark it as a conflict cluster and send it to the third round.
def cluster_key(f):return (f["doc_span"], f["entity"], tuple(sorted(f["keywords"])))def merge(cluster):return {"severity": max(x["severity"] for x in cluster),"evidence": list({e for x in cluster for e in x["evidence"]}),"conflict": has_contradiction(cluster),}
Whether the results are reliable cannot be judged by feeling; it depends on three metrics: evidence citation rate (whether a conclusion includes an original excerpt), cross-team reproduction rate (how many issues are independently found by two or more dimensions), and the number of residual conflicts after convergence. Only when all three are healthy are the conclusions worth executing.
5. Putting Conclusions into Practice: How to Read a Document of Hundreds of Thousands of Words
Do not try to read the whole document. Have the orchestration layer output a list sorted by severity, and handle high-severity items reproduced across teams first, since these usually have the widest impact. Batch medium and low severity issues into a “backlog pool,” merge them by section, and revise them in one pass. After revisions, re-run only the affected semantic blocks for incremental review instead of re-debating everything.
To integrate the process into an engineering system, write the conclusions into the requirements and defect tracking system, and use logging services and monitoring alerts to observe trends in review duration, conflict rate, and reproduction rate. Store the documents and lists themselves in object storage for version retention, ensuring every review is traceable and rollback-capable.
6. Common Pitfalls
First, overlapping dimensions cause duplicate counting, which requires strict deduplication during aggregation. Second, teams commenting out of scope, which is constrained by output contracts and dimension whitelists. Third, “hallucinated conclusions” without evidence, suppressed by requiring quotes from the original text. Fourth, runaway rounds, which require a hard limit. Fifth, producing only a report without revisions; the final list must include an owner and acceptance criteria to close the loop.
