Gemini Advisor
A capability-routed multi-model orchestration framework that optimizes developer agent token costs by 10–20x while enforcing strict 5-part implementation contracts and unbiased code reviews.
01 / The Problem & Context
The Token Burn and Hallucination Bottleneck in AI Coding Agents
Standard autonomous coding assistants default to running expensive frontier models (Pro/Opus) for every mechanical file write and test execution, burning hundreds of thousands of tokens per hour. Furthermore, single-agent loops suffer from builder bias—rubber-stamping their own regressions.
02 / Architectural Approach
To address these requirements, the system was decomposed into modular boundaries that prioritize memory efficiency, predictable throughput, and low operational latency:
Three-Tier Capability Routing
Assigned high-reasoning tasks (spec writing, architectural decomposition) to Gemini Pro, while delegating mechanical file updates to Gemini Flash at 15x lower cost.
Unbiased Read-Only Reviewer Agent
Engineered a specialized reviewer agent spawned in a fresh context with write tools disabled, auditing only git diffs and test results to issue strict SHIP/FIX-FIRST verdicts.
Machine-Auditable 5-Part Contracts
Enforced formal contracts (Objective, Files & Ownership, Interfaces, Constraints, Verification) between parent and builder agents to guarantee zero unintended file edits.
03 / Key Technical Trade-Offs
Why Flash for Builder vs Pro
Flash provides sub-second code generation at 1/15th the token cost of Pro. With strict file ownership boundaries, Flash performs boilerplate and localized edits with 99.4% syntax accuracy.
Read-Only Isolation for Reviewer
Builders tend to rationalize their own mistakes if asked to self-review. Spawning a fresh Pro agent without write permissions ensures impartial judgment against regression tests.
04 / Measurable Results & Learnings
↳ vs. naive all-model Pro routing, measured across 250+ automated agent coding tasks
↳ isolated read-only auditor agent vs. 41% caught by self-reviewing builder models
↳ ephemeral subagent memory contexts with zero inter-task state leakage