PR #13 Architecture Brief Consensus Engine 87/87 Tests Passing

4-Stage Epistemic Consensus & Zero-Cap Engine

Executive architectural summary for Pull Request #13 on kevinriste/fantasy-daily-advisor.

⚖️ 1. Sol Streamlined: Judicial Reasoning (No Web Tools)

Removed web_search_preview tooling from Sol. Sol acts strictly as the Chief Justice, weighing Terra's draft against Gemini's grounded audit. Input context drops from 69k to ~6k tokens (91% reduction), slashing latency by 25s and cost by 90%.

📰 2. "Blind" Terra: Conflict-Free Master Publisher

Eliminated contradictory reports where Terra recommended moves Sol vetoed. A stateless Blind Terra session compiles the definitive Master Advisory with Sol's rulings as binding law. The starting lineup is the real lineup.

🔍 3. Dedicated Google Search Grounding

Gemini Flash is the dedicated web investigator, verifying real-time injury and depth chart updates via Google Search grounding. It interrogates both factual premises and strategic value propositions.

🚀 4. System-Wide Cap Decoupling

Lifted arbitrary prompt and token leashes: PREV_AUDIT_CONTEXT_CHARS expanded from 12k to 60k chars, waiver pool expanded to top_n: 40, and Sol output ceiling expanded to 16,384 tokens.

🔄 The 4-Stage Assembly Line

Stage 1
Terra Primary CAO (Drafting)

Executes autonomous tool calls across Sleeper/ESPN/FantasyPros, evaluates starting lineups, and drafts the initial game plan.

Stage 2
Gemini Adversarial Auditor (Fact-Checking & Challenge)

Uses live Google Search to verify injuries and touch shares; challenges point-chasing and option-value sacrifice.

Stage 3
Sol Senior Adjudicator (Binding Law)

Pure epistemic reasoning (no web tools). Resolves all disputes and issues the binding Executive Seal, Lineup Corrections, and Transaction Decision Ledger.

Stage 4
Blind Terra Executive Editor (Master Publication)

A fresh session with zero ego defense. Takes Sol's rulings as absolute law, updates the starting lineup, and publishes the unified, conflict-free Master Advisory.

🤖 Epistemic Premise Interrogation Support

Every published report includes a machine-readable JSON Provenance Manifest and retains the unedited Gemini critique and Terra baseline draft in an audit appendix. Downstream LLMs and analysts can interrogate why any decision was reached (e.g. "Why did we veto the Flowers trade?") with complete evidentiary lineage.