Google's EGM Plugin Splits AI Coding Into Architect and Coder Roles

Elephant-Goldfish Model separates long-term planning from stateless code generation to prevent context pollution in extended AI-assisted development sessions.

cpaua2 min4
Google's EGM Plugin Splits AI Coding Into Architect and Coder Roles

Google has released an open-source plugin called Elephant-Goldfish Model (EGM) that restructures how developers work with AI coding agents over long sessions. The tool addresses a familiar failure mode: after a few hours of productive collaboration, the conversation history grows so large that the model begins repeating earlier mistaken assumptions, turning one bug fix into two new regressions.

Why long contexts degrade code quality

Language models tend to anchor on prior statements in the same dialogue, even when those statements were speculative or wrong. When architectural debates, debugging traces, and incremental changes all share one context window, the agent inherits contradictory constraints and drifts from the original design.

Two roles, one specification file

EGM divides the workflow between an Elephant agent (/egm-brainstorm, /egm-draft) and a Goldfish agent. The Elephant holds long-term memory but is forbidden from writing business logic. It asks clarifying questions, refines the architecture, and produces a detailed Markdown specification named project_plan.md. Failed design choices are discarded during this planning phase.

The Goldfish receives a single, self-contained task drawn from that specification. It writes and verifies code in a fresh, short context with no memory of previous discussions. Because each coding session starts clean, the agent does not carry forward stale assumptions or debugging baggage.

Origin in a community workflow

The approach mirrors a rule a seasoned developer shared on Reddit, where the post gathered 600 upvotes. That developer spent a full day writing a specification before touching code — a discipline EGM now automates. The plugin is available for Claude Code users who want to enforce the same separation without manual context management.

By persisting the entire project architecture in a readable Markdown file and delegating implementation to stateless agents, EGM aims to make large AI-assisted projects finishable rather than collapsing under their own conversation history.

Sources

reddit.com — content not available without authorization

Share

Author

cpaua

VibeCode blog admin. Writing about vibe coding, AI and open source.

Related news

Comments

To leave a comment, log in
Loading...

Weekly digest

The best of vibe coding, AI agents and open source — once a week, no spam.