Google EGM Plugin in Practice: Spec-Driven Development with Claude Code

Google's EGM plugin productizes spec-driven development with elephant-goldfish agents and seven skills.
The article explores Google's EGM plugin, used by thousands of engineers, which forces developers to think through design before AI writes code. Its Elephant-Goldfish Model pairs a full-context agent for drafting specs with zero-context sub-agents for independent adversarial review, covering seven skills from brainstorm to drift report. The author notes the process slows things down and suits team, long-term projects.
One of the biggest problems with AI coding assistants is that they always want to start writing code immediately. The moment you finish describing a requirement, Claude Code or Cursor is already generating files—and whether the direction is right or edge cases are covered often only becomes apparent after code has piled up into a mountain. A plugin called EGM, used internally by thousands of Google engineers, tries to reverse this inertia—it doesn't rush to write code, but instead forces you to think through the design first.

Elephants and Goldfish: Agent Division of Labor Across Two Types of Memory
The core idea of EGM comes from an article by Google Distinguished Engineer Dave Rezin, known as the "Elephant-Goldfish Model." It splits the agents involved in development into two categories:
One is the full-context agent, commonly called the "elephant"—it remembers all the discussions, micro-decisions, and architectural assumptions between you and the model, and is responsible for drafting project specifications and maintaining design documents. The other is the zero-context sub-agent, commonly called the "goldfish"—they carry no memory of prior conversations and focus only on the material fed to them, so they aren't influenced by biases from earlier decisions.
This design actually echoes common sense in code review: letting the agent that wrote the code review its own output often misses problems; handing it to a sub-agent with an independent context makes blind spots easier to spot. A Bilibili creator noted in testing that this mechanism launches six review tasks from different perspectives in parallel, filtering through everything from codebase details and macro architecture to implementation readiness.

Context windows and memory mechanisms: The distinction between "full context" and "zero context" is rooted in the context window mechanism of large language models. The context window is the total number of tokens a model can read in a single inference, including the system prompt, conversation history, and tool return results. The so-called "elephant" agent continuously accumulates the entire history of project discussions in its context window, thus maintaining decision consistency; the "goldfish" sub-agent has its context window reset each time it is invoked, loaded only with the material needed for the current task. This design exploits a characteristic of LLMs: the longer the context, the more early information gets diluted, and the model tends to stay consistent with existing conclusions. Zero-context sub-agents therefore naturally possess a "stranger reviewer" perspective, similar to clean-room review in software engineering. The cost is that sub-agents cannot access the basis of historical decisions, so the main agent must explicitly feed necessary background into the prompt.
Seven Skills: From Brainstorming to Drift Detection
The plugin is organized as a set of independent skills, now open-sourced on GitHub with versions for Claude, Codex, and Cursor. The seven core skills cover the complete chain before, during, and after development:
- Bootstrap: Analyzes existing codebases and automatically generates the architecture documentation agents need to understand the project
- Brainstorm: Tests new ideas through extensive questioning, converging vague ideas into a concept summary
- Draft: Transforms a brief concept into a structured technical design document
- Review: A fresh sub-agent reviews the design document in five stages
- Review Loop: Processes review feedback and drives the iteration loop to closure
- Drift Report: Scans code and documentation to find where they have diverged
- Retro: Captures lessons learned at each stage
Among these, the drift report was described by the creator as "worth using for this one feature alone." Documentation drifting out of sync with code is a widespread chronic problem in team collaboration—the code layout lists a scheduler that doesn't actually exist; the interface described in the docs was renamed long ago. Running drift reports regularly surfaces these small but continuously accumulating cognitive biases.
In Practice: Adding Multi-User Accounts to an App
The creator did a complete demo using a channel-tracking app called YouTube IQ. When he asked EGM to add user registration and login to the app, the brainstorming skill didn't hand back a solution directly—it threw back a series of questions: How do users create accounts? Who bears the cost of the analytics service? Will sharing an API key among multiple users exhaust the quota? Who has permission to change the key?
These questions hit directly at holes in the original design—some existing routes returned dashboard data to other users, creating a data leak risk. The creator admitted in the demo that he "was a bit too eager to move fast," and the plugin forced him to slow down and re-examine edge cases he hadn't considered. The goldfish sub-agents then reviewed the spec from multiple perspectives, finding 20 blocking issues, 16 major defects, and 7 minor flaws in one pass.

Design Is the New Code: Why Documentation Suits Agents Better Than Source Code
Another key judgment Dave Rezin makes in his article: for agents, documentation is easier to read than code. Code is the ultimate source of truth, but it's too large for agents to fully read and grasp the intent. A document that clearly explains what the system "wants to do and why it's designed this way" lets agents build correct understanding faster.
So the spec EGM generates follows the standard structure of Google's internal technical design documents: goals and non-goals, key user journeys, technical architecture, comparison of alternatives, non-functional requirements, and implementation and validation plans. The alternatives section deserves special attention—if you chose SQLite, the document requires you to explain clearly why you didn't choose NoSQL and on what basis. This style forces developers to make decision logic explicit rather than deciding on intuition.
Technical design document culture: The structure EGM's spec follows comes from Google's long-standing internal design document culture. At Google, major changes typically begin with a design document that goes through peer review before coding starts; the document itself is treated as a reviewable engineering artifact. Typical sections include background and goals, non-goals (explicitly demarcating what won't be done), system architecture diagrams, alternatives and rationale for trade-offs, cross-team impact, security and privacy considerations, and testing and launch plans. The "non-goals" and "alternatives" sections best reflect engineering judgment: the former prevents scope creep, the latter requires the author to prove the chosen approach is superior to rejected ones. The value of such documents for agents is that they make design intent—implicit in code—explicit, so models don't have to reverse-engineer millions of lines of source to understand system boundaries and constraints.
Adversarial Review: Breaking AI's Sycophancy
Behind the whole process is a clear methodology: adversarial review. Models naturally tend to agree with users—whatever you propose, they call it a good idea. EGM's approach is to have independent sub-agents play the critic role, specifically dismantling designs and hunting for flaws. The review stage covers multiple dimensions including cost quotas, architectural soundness, code reuse, the skeptical architect's perspective, user experience, and implementation compatibility.
The creator's hands-on impression was that this process "feels more like real software development"—slowing down to examine extreme cases one by one, an experience that could even be called enjoyable. He also noted the plugin's positioning leans toward teams: generating RFCs for comment and requiring complete alternatives aren't routine actions for solo developers.

RLHF and sycophancy bias: The model's tendency to agree with users is rooted in part in reinforcement learning from human feedback (RLHF). During training, annotators prefer responses that are friendly in tone and affirm the user's viewpoint, so the model learns a "go along with it" strategy—an advantage in open-ended dialogue, but a defect in engineering review, where it rarely proactively points out design flaws. Adversarial review assigns the "critic" role to an independent agent instance and explicitly requires it in the prompt to find flaws and question assumptions rather than offer affirmation. Because this instance carries no prior conversation history with the user, it has no one to agree with, making criticism easier to keep neutral. This approach is in the same lineage as red teaming: using specially constructed adversarial roles to expose weak points in a system rather than waiting for problems to erupt in real-world scenarios.
A Sober View: Good Practice Isn't Zero-Cost
At its core, this plugin productizes the working habits of senior engineers: think it through before acting, have an independent perspective do the review, and regularly calibrate documentation against code. The problem it solves is real—technical debt from casual AI coding, in enterprise-level projects, evolves over time into codebases no one understands.
But it comes at a clear cost. The creator admitted the process "really does slow things down" and brings a kind of pressure: it reminds you how big the gap is between casual coding and formal engineering. For small personal projects or one-off script tasks, this heavy process may not be worth it; if you just want to quickly validate an idea, having the model generate code directly and then iterating may be more efficient. EGM's real value scenarios are projects that require multi-person collaboration, long-term maintenance, and are quality-sensitive.
One signal worth noting: thousands of Google engineers use this approach internally. The willingness of one of the world's top engineering teams to roll out such tools at this scale itself shows that the value of spec-driven development in the AI era is being reconfirmed. As for whether it suits your project, you might as well install the plugin and run a drift report to see the gap between your existing code and documentation—that's probably the lowest-cost entry test.
Spec-Driven Development: What EGM represents is an emerging development paradigm—spec-driven development, where a structured, reviewable specification is produced first, then humans or agents implement code according to the spec, and the spec serves as the baseline for subsequent changes and validation. Its difference from test-driven development is that the spec describes "what to do and why," not "how to verify." This paradigm has regained attention in the AI coding era because the cost of generating code has dropped dramatically, shifting the bottleneck to judging "what to generate." The spec document simultaneously serves as an input constraint for agents and a consensus carrier for human teams, allowing code review to move forward to design review. The cost is increased upfront investment and slower iteration, so it suits projects with relatively stable requirements, more collaborators, and long maintenance cycles.
One-line Summary
Google's EGM plugin uses elephant-goldfish agent division of labor and seven skills to productize spec-driven development.
Paragraph Summary
The article introduces the EGM plugin used by thousands of Google engineers internally. It does the opposite—rather than rushing AI to write code, it forces developers to think through the design first. Its core idea is the "Elephant-Goldfish Model": a full-context "elephant" agent drafts specifications and maintains documentation, while zero-context "goldfish" sub-agents handle independent review to avoid bias and sycophancy. The plugin covers bootstrap, brainstorm, draft, review, review loop, drift report, and retro across seven skills, forming a complete loop. In testing, goldfish sub-agents reviewed in parallel from six perspectives, finding dozens of issues in one pass; the drift report detects code-documentation divergence and was seen as the most practical feature. The author also notes the process slows things down and suits team collaboration and long-term maintenance projects better.
Related articles

Multi-Agent Collaborative Development: Task Card-Driven Practices for Medium-to-Large AI Projects
A Bilibili creator shares a task card-driven, PM-orchestrated multi-Agent collaboration model with local-first repository state, so any Agent tool can take over a project anytime.

Cursor vs Copilot vs Claude Code: How Laravel Developers Should Choose
Compare Cursor, GitHub Copilot, and Claude Code for Laravel development: an AI-first editor, a plugin for existing editors, and a terminal agent for multi-file tasks and testing — plus workflow-based recommendations.

AgentScope Java Edition: A Practical Guide to Enterprise-Level Agent Frameworks
An in-depth analysis of Alibaba's AgentScope Java enterprise agent framework: contrasting client-side AI and server-side AI, explaining Java's natural advantages in high concurrency and distributed state management, and outlining a complete learning path from core principles to multi-agent collaboration.