The Synthesizer persona produces a verdict on every debate
("hypothesis is supported / weakly supported / falsified") but the
reasoning it used — which arguments from Theorist it weighted, which
Skeptic objections it dismissed, which Expert assessments it deferred
to — is buried in a free-text rationale block in debate_sessions.
Build a decision-tree viewer that decomposes each synthesis into a
visual tree: root = verdict, branches = supporting/contradicting
arguments, leaves = evidence chunks with links. Editors can click any
node to see "why was this argument weighted this way?"
Effort: thorough
scidex/agora/synthesis_decision_tree.py::extract_tree(debate_session_id) -> DecisionTree runs an LLM pass over the synthesis text + per-round persona messages and emits {verdict, root_rationale, branches: [{stance: 'support'|'oppose'|'qualify', argument, weight: float, source_round, source_persona, evidence_refs: list[{kind, id}], children: [...]}]}.migrations/20260428_synthesis_decision_trees.sql: synthesis_decision_trees(debate_session_id PK, tree_json JSONB, prompt_version TEXT, generated_at TIMESTAMPTZ, model TEXT). Trees are immutable per (debate_session_id, prompt_version)./debate/{id}/decision-tree renders the tree as an interactive collapsible D3 hierarchy (or a Mermaid graph TD if D3 is too heavy — see site/mermaid-pan.js for pan/zoom helper).run_extraction(limit=20, only_missing=True) -> dict runs nightly via a new economics_drivers/ci_synthesis_tree_extraction.py; only re-extracts when prompt version changes.GET /api/agora/decision-tree/{debate_session_id} returns the JSON tree.tests/test_decision_tree.py: synthetic 3-round debate with 2 support + 1 oppose argument → tree has 3 branches with correct stances; missing synthesis tolerated (returns 404 with reason=no_synthesis); cyclic references in extraction tolerated (DAG, not strict tree).scidex/agora/synthesis_engine.py::synthesize_debate_session to understand the synthesis prompt + output format. The new extractor consumes both the raw synthesis and the per-round messages.pydantic.site/mermaid-pan.js.scidex/agora/synthesis_engine.py (existing).debate_sessions, debate_messages tables.scidex/core/llm.py.q-viz-explainability-tearsheet — embeds the decision tree as a panel.q-mem-persona-reputation-log — uses argument-weights as per-persona quality signal.