Google Open-Sources Elephant-Goldfish Model to Enhance AI Coding Reliability
Google has open-sourced its internal Elephant-Goldfish Model plugin, a novel tool designed to improve the reliability of AI coding agents by enforcing a structured design and review process.

Google has publicly released the Elephant-Goldfish Model (EGM) plugin, an internal tool developed to address the growing concern of "slop" and bugs introduced by the rapid adoption of AI in software development. The plugin mandates that AI coding agents first create and defend a design document before writing any code. This structured approach aims to inject a crucial quality control layer, ensuring that potential coding mistakes are identified and rectified early in the development lifecycle.
The EGM plugin operates on a dual-agent system: 'The Elephant' and 'The Goldfish.' The Elephant is a long-running AI session tasked with maintaining the overall project context, including architecture, intent, and design decisions. It does not write code but instead engages with developers, debates design choices, and keeps a comprehensive record of the project's evolution. This persistent memory ensures that the project's integrity is maintained throughout the development process.
In contrast, each Goldfish agent is stateless, meaning it starts with no prior knowledge of the design conversations or decisions made. This deliberate lack of memory is intended to mimic an independent reviewer who can identify flaws without being influenced by the blind spots or assumptions that may have arisen during the initial design phase. By bringing fresh perspectives, the Goldfish agents are better positioned to uncover overlooked issues.
The plugin enforces a rigorous three-phase process before any code is committed. The first phase, egm-brainstorm, involves developers and the Elephant debating options and testing assumptions under a strict no-code rule. Following this, egm-draft produces a detailed Markdown design document outlining the problem, technical plan, alternatives considered, and specific implementation steps, including files to be modified.
The critical review phase, egm-review, brings in the Goldfish agents. One Goldfish summarizes the design document back to the Elephant to ensure comprehension. Subsequently, multiple Goldfish agents act as adversarial reviewers, actively searching for edge cases, hidden dependencies, and logical gaps. Their objections are fed back to the Elephant for resolution. A final Goldfish agent performs a go/no-go assessment, verifying that all file paths, data structures, and function signatures are clearly defined and unambiguous.
While security flaws are not explicitly named in the default reviewer list, the plugin's customizable nature allows for the integration of security-minded Goldfish personas. Teams can tailor the reviewer profiles and workflows to include specific security checks, enabling a threat review of the design as part of the development process.
Google reports that thousands of its engineers utilize the EGM plugin daily to ship production code, highlighting its effectiveness in enhancing AI-assisted development. The plugin is now available for free on GitHub, along with Markdown rules, defined subagent personas, and review workflows. Support for environments beyond Google's internal Antigravity development environment is also planned.
The open-sourcing of the Elephant-Goldfish Model plugin signifies a proactive step by Google to address the potential downsides of rapid AI adoption in coding. By introducing a structured design and review process, the tool aims to mitigate the risks of increased errors and improve the overall reliability and comprehension of AI-generated code, fostering a more robust and trustworthy software development ecosystem.