1. The Core Bottleneck: What Engineering Deadlocks Does It Break?
Long contexts in large language models induce catastrophic confirmation bias during extended software design sessions. After multiple rounds of dialogue, coding agents internalize unstated faulty assumptions, generating architectural drafts riddled with hidden failure modes. Developers reviewing these drafts under cognitive fatigue routinely overlook boundary conditions and concurrency pitfalls.
The google/elephant-goldfish-model (EGM) introduces a groundbreaking decoupled agent paradigm, allocating generation and review to distinct cognitive entities. The Elephant digests full project context, anchors requirements, and drafts specifications. The Goldfish is stripped of all conversational history, performing cold reviews armed solely with the design document and the raw source code. This cognitive isolation shatters the path dependency inherent in continuous chat sessions.
💡 Architectural Insight: By artificially engineering memory fragmentation between agents, EGM forces reviewers into an absolute zero-history perspective, directly exposing logic blind spots buried beneath verbose interactions.
2. Core Architecture and Data Flow Analysis
Architecturally, EGM functions as a workflow scheduler built on a plugin ecosystem. It leverages subagent context isolation to segment the design phase into distinct state machine nodes: requirement exploration, draft generation, and zero-base review. Data flow across memory boundaries is strictly governed by execution commands.
[ Project Context ] ---> [ Elephant Agent ] ---> [ concepts_brief.md / design_draft.md ]
│
▼
[ Source Code Base ] ---> [ Goldfish Agent ] <--- [ Isolated Reviewer Context ]
│
▼
[ Architectural Trade-offs & Approvals ]
During execution, the Elephant maintains full project awareness, compressing interactions into concepts_brief.md and design_draft.md. Upon triggering a review, the scheduler explicitly drops conversational history, spinning up a clean Goldfish subagent. This subagent consumes only disk-persisted documents and source code, applying rigid standards to flag unstated assumptions and design inconsistencies.
3. Technology Selection and Hardcore Benchmarking
| Evaluation Metric | This Solution (EGM) | Traditional Single-Agent Chat | Human PR Review | Static Analysis (SonarQube) |
|---|---|---|---|---|
| Memory Isolation | Absolute (via dynamic subagent distillation) | Zero (carries full conversation history) | Dependent on human fatigue and domain focus | Rule-based on Abstract Syntax Trees (AST) |
| Design Coverage | Exploration, drafting, and drift detection | Limited to single session, prone to anchor bias | Post-implementation, high feedback latency | Post-coding syntax and style checks only |
| Blind Spot Catch Rate | High (forces breaking confirmation bias) | Low (defaults to flattering user intuition) | Medium (depends on reviewer attention span) | Extremely Low (ignorant of design intent) |
| Ecosystem Integration | Antigravity, Claude Code, Codex CLI | Tied to specific LLM chat interfaces | Tight Git hosting dependency | CI/CD pipeline integration required |
EGM fills the vacuum between rigid static analysis tools and human architects. It does not replace automated tests or human judgment, but it enforces a rigorous red-team defense line prior to implementation.
4. Hands-On Geek Guide: Building the Minimal Closed Loop
Integrate the EGM plugin into your local coding agent environment. For Claude Code users, execute the following terminal commands:
# Add the official Google EGM plugin marketplace source to Claude Code
claude plugin marketplace add google/elephant-goldfish-model
# Install the complete egm skill package into your current workspace
claude plugin install egm@egm
Start a new terminal session in your project repository. Run the brainstorm skill to establish feature boundaries:
# Initiate brainstorming to explore asynchronous webhook delivery constraints
/egm:egm-brainstorm Add webhook delivery with retry backoff and idempotency key.
Once the agent persists consensus into concepts_brief.md, execute the drafting and zero-base review commands:
# Transform the brief into a structured architectural design draft
/egm:egm-draft
# Dispatch the Goldfish reviewer for a cold, zero-context audit of the draft
/egm:egm-review design_draft.md
The agent generates a critical review report highlighting missing idempotency checks for duplicate events or unbounded retry backoffs. After addressing these findings, approve the specification and persist it under docs/designs/.
5. Production Gotchas and Avoidance Strategies
Deploying this workflow in enterprise engineering teams requires careful attention to execution constraints and host environment capabilities.
⚠️ Gotcha Warning [Subagent Environment Limits]: If the host environment of your coding agent lacks support for spawning fresh subagents, EGM halts and terminates the review process. Ensure client versions are updated (e.g., Antigravity CLI 1.4.10 or higher) to prevent command parsing errors or subagent creation failures.
⚠️ Gotcha Warning [Drift Detection Overload]: When codebase evolution causes specifications in
docs/designs/to fall severely out of sync, avoid running/egm-drift-reportacross the entire repository at once. Massive code trees risk triggering context window overflows or stream truncation. Run drift reports module by module and archive outdated documentation incrementally.
