Google AI Open-Sources Elephant-Goldfish Model Plugin for Spec-First Coding Agents
Google releases the open-source Elephant-Goldfish Model (EGM) plugin, enforcing a strict spec-first workflow where AI agents draft design specs and run adversarial reviews before writing code.
Google AI has officially open-sourced the Elephant-Goldfish Model (EGM) plugin, an internal software engineering harness designed to eliminate hallucinated code and architecture decay in AI coding agents. Used internally by thousands of Google software engineers, the tool enforces a rigorous spec-first protocol requiring AI agents to draft comprehensive markdown technical designs and pass adversarial multi-agent reviews before generating any application code.
The Spec-First Paradigm: Elephant Agent and Zero-Code Drafting
Traditional AI coding assistants jump straight into code synthesis, often creating brittle architectures and subtle logic bugs. The Elephant-Goldfish Model reorders this lifecycle: in the Elephant phase, a long-context agent activates via commands such as /egm-brainstorm and /egm-draft to interview developers, evaluate trade-offs, and draft structured technical specifications under docs/designs/. Under strict execution constraints, the Elephant agent is prohibited from generating application code, forcing upfront clarity on interfaces, data models, and edge cases.
Stateless Goldfish Swarms: 6-Lens Adversarial Design Reviews
Once a specification draft is complete, the plugin executes the /egm-review command, spawning a swarm of stateless Goldfish sub-agents. These reviewers operate with zero memory of previous conversation turns, inspecting the design cold against the codebase. The swarm audits the design across six rigorous engineering lenses: YAGNI (You Aren Not Gonna Need It), token economics and compute cost, user experience, database migration complexity, observability instrumentation, and long-term technical debt.
Automated Drift Detection and Enterprise Production Deployment
To prevent divergence during implementation, EGM features an automated /egm-drift-report utility that compares pull request diffs directly against the approved design specification, flagging unauthorized scope expansion or missing test coverage. Released under a permissive open-source license, the plugin is compatible with popular AI agent frameworks including Claude Code, Cursor, and Google Gemini developer tools, establishing a standardized architectural guardrail for autonomous enterprise software engineering.