Google releases open-source plugin to enforce AI code reviews
The Elephant-Goldfish Model forces AI agents to create and vet detailed specifications before writing a single line of code.
The short version
- The plugin requires agents to create a Markdown specification before any code generation begins.
- It uses 'Goldfish' subagents that have no memory of previous conversations to ensure unbiased reviews.
- The framework includes 7 skills, 9 reviewer personas, and 6 brainstorming lenses.
- It is compatible with various frameworks including Claude Code, Codex, and ChatGPT.
- The plugin is licensed under Apache 2.0 and is not an official Google product.
Why it matters
For developers, this moves the 'debugging' phase earlier in the workflow, potentially saving hours of fixing incorrect code. It provides a structured way to prevent AI from making assumptions that lead to technical debt.
Solving the context collapse
Google has introduced the Elephant-Goldfish Model (EGM), an open-source plugin designed to improve how AI coding agents handle complex projects. The framework addresses a common problem known as 'session context collapse,' where an AI loses track of project goals as a conversation grows longer. By enforcing a strict workflow, the plugin ensures that the AI stays aligned with the original intent.
The name of the plugin comes from an essay by Dave Rensin, which uses the metaphor of elephants and goldfish to describe memory and focus. In this system, the 'Elephant' represents the main agent that holds the long-term project context and history. This agent is responsible for creating the high-level specifications without actually writing any executable code.
The primary goal of the EGM is to stop 'AI slop' by making the planning phase more rigorous. Instead of letting an AI guess how to solve a problem and then fixing the errors in a pull request, the plugin forces the AI to resolve trade-offs in a document first. This ensures that the logic is sound before any resources are spent on implementation.
How the Goldfish review works
The most unique part of the framework is the use of 'Goldfish' subagents to audit the Elephant's work. These subagents are intentionally stateless, meaning they have no access to the prior conversation history or the broader project context. They are only given the specific draft document and the files it references, which forces them to evaluate the plan objectively.
The review process follows five distinct stages to ensure the design is robust. It begins with an 'Initial Zoom Out' for a high-level look, followed by a 'Comprehension Test' where the Goldfish must paraphrase the design. If the Goldfish cannot accurately summarize the plan, the system flags the document as being too ambiguous for the AI to follow.
The review continues with a 'Critic Review' to find edge cases, an 'Intermediate Zoom Out' to check the architecture again, and an 'Implementation Readiness' check. This final stage validates specific technical details like data structures and file paths. Each stage allows for only one re-audit, and findings are categorized by severity as a Blocker, Major, or Nit.
Commands and capabilities
Users can interact with the EGM plugin through three primary commands that guide the development lifecycle. The first, /egm-brainstorm, initiates a swarm of Goldfish reviewers to evaluate the idea against six lenses: YAGNI (You Ain't Gonna Need It), token expenditure, UX, migration, observability, and technical debt. The results of this brainstorming session are saved into a specific brief file.
The second command, /egm-draft, takes that brief and builds out a detailed design document section by section. This allows the user to endorse the design choices before the heavy lifting begins. The third command, /egm-review, triggers the multi-stage Goldfish audit described earlier to ensure the draft meets all necessary standards.
Finally, the plugin includes a /egm-drift-report command to help maintain quality over time. This tool compares the final code against the original specification to ensure the AI didn't wander off-track during the coding phase. Google suggests that developers should run this comparison on a weekly basis to catch any gradual deviations in the project's architecture.
Performance and limitations
While Google reports that thousands of its engineers use this framework, the plugin is not an official Google product and is licensed under Apache 2.0. It does not include its own model weights; instead, it functions as a methodology that leverages whatever Large Language Model (LLM) the user already has available. This makes it compatible with several popular tools, including Claude Code, Codex, and ChatGPT.
Early testing has shown mixed results depending on the host environment. For example, Codex successfully completed two live tests in 573.13 seconds using 15 different reviewers. However, other instances, such as Claude Cowork, have struggled with the workflow, occasionally halting during the later stages of the review process due to usage limits.
The main trade-off for using the EGM plugin is the high consumption of tokens. Because it creates multiple subagents and runs several review stages, it can be expensive or slow depending on the model's limits. Additionally, some users have reported issues where the instructions for the reviewers can sometimes 'leak' into the main agent's context on certain hosts.
Who is affected by EGM
The EGM plugin is primarily aimed at software engineers and technical leads who manage complex codebases. By providing a standardized way to review AI-generated plans, it helps teams maintain a higher level of oversight. It is particularly useful for projects where 'hallucinations' or small logic errors in the planning phase could lead to significant downstream bugs.
Because it is open-source, the framework can be integrated into various existing AI agent workflows. This means developers who are already using tools like Antigravity or Codex can add a layer of 'independent review' to their existing pipelines. It shifts the role of the human developer from a code reviewer to a design approver.
As the AI coding landscape matures, the focus is shifting from how fast an AI can write code to how reliably it can follow complex instructions. The Elephant-Goldfish Model represents a move toward more deliberate, multi-step reasoning. It prioritizes accuracy and architectural integrity over the speed of generating raw output.
Sources and links
Liked it? Say why
Add a line for other readers.
No account needed. We never show your email. Comments with links, ads or abuse are held and not shown. Your comment shows after a quick check.
Listen to the AI Wire headlines
Listen to the AI WireListen to our daily AI shows every morning: on your commute, in the shower, wherever you are
Listen to the daily showsFirst reported by RS Web Solutions · Read the original. Written by the SI Agent News Desk from the reporting above.Written with AI from the source above. Every number is checked against the source. Spot a mistake? Corrections.
