Google open-sources the Elephant-Goldfish Model plugin its engineers use to catch AI coding mistakes

Google has open-sourced the Elephant-Goldfish Model plugin, an internal tool that makes an AI coding agent write and defend a design document before it touches any code. The plugin hands that document to fresh AI sessions that have never seen the design conversation and tells them to find what is wrong with it.

Elephant-Goldfish Model plugin

The EGM plugin in a nutshell (Source: Google)

“AI-powered velocity is transformative; however, it has silently introduced a potential reliability crisis by also increasing the velocity of “slop,” bugs, and session context collapse. Generative AI tools excel at increasing coding speed, but pure speed without structured guardrails means we are often auto-scaling our mistakes rather than simply writing code faster. We need a paradigm shift, aligning the human need for system comprehension with AI’s capacity for execution,” wrote the Elephant-Goldfish Model team.

Long memory, no memory

The Elephant is a long-running session that holds the whole project in view: the architecture, the intent, and the small decisions made along the way. It writes no code. Its job is to interview the developer, argue over choices, and keep the record.

Each Goldfish is stateless, meaning it starts with no memory of anything that came before. Google’s reasoning is that a reviewer who sat out the design conversation doesn’t carry its blind spots.

Three checks before any code

The plugin runs in three phases, each a command. In egm-brainstorm, the developer and the Elephant work under a no-code rule, debating options and testing assumptions. In egm-draft, they produce a Markdown design document covering the problem, the technical plan, the alternatives considered, and an implementation plan that names the specific files to change.

The Goldfish arrive in egm-review. One reads the full document and has to explain the design back to the Elephant. If it gets the plan wrong, the document counts as ambiguous and goes back for more drafting. Several more Goldfish then act as hostile reviewers hunting edge cases, hidden dependencies, and logical gaps, and their objections return to the Elephant to resolve. A last Goldfish makes a go/no-go call on whether file paths, data structures, and function signatures are all present and unambiguous.

Security flaws are not on the reviewers’ list by name. A team that wants a threat review of a design still has to set one up, though the rules and reviewer personas are customizable, so adding a security-minded Goldfish is within reach.

Thousands of daily users at Google

The repository ships with Markdown rules, defined subagent personas (the roles each AI reviewer plays), and review workflows. The plugin works inside the Antigravity development environment, and Google says support for other environments is coming.

Google says thousands of Googlers use the plugin every day to ship production code. It’s available for free on GitHub.

Download: The IT leader’s guide to AI code sprawl

More about

Don't miss