Google Open-Sources Elephant-Goldfish: Using Spec-Driven Development to Break AI Coding's Conversational Bias

Google open-sources the EGM plugin: an elephant writes specs, a goldfish with zero memory reviews, and drift detection reconciles—breaking AI coding's conversational bias.
The article starts from a developer's habit of writing a Markdown spec before letting Claude write code, pointing out that AI coding assistants suffer from "conversational bias": models accumulate context and cater to the user, solidifying casual early assumptions into unquestionable premises and leading to the trap of fixing one bug and breaking two features. Google's open-sourced Elephant-Goldfish Model (EGM) plugin counters this through role separation: the elephant conducts long-context interviews and produces specs, strictly writing no code; the goldfish spawns zero-memory subagents that cold-read only the spec and code for adversarial review; and the drift report compares code diffs against the spec, making the spec a verifiable contract. Together they form a "spec—review—reconcile" closed loop, reflecting how spec-driven development is moving from a personal habit to a replicable engineering discipline.
Google Open-Sources Elephant-Goldfish: Using Spec-Driven Development to Break AI Coding's Conversational Bias
A developer shared on Reddit a habit he's stuck with for over a year: before letting Claude write code, he spends a full day—sometimes longer—writing a detailed Markdown spec for the project. One of his recent projects avoided a major architectural rework because of this—the first draft planned to use an embedded Axum mTLS server for synchronization, but while writing the spec he realized that switching to iroh (QUIC) with Ed25519 public-key dialing plus mDNS would be much cleaner, saving weeks of wasted code.
Behind this habit lies a widely overlooked problem: AI coding assistants naturally suffer from "conversational bias." Once you ask them to start writing code, they follow the existing conversation context and drift further off course—by day three you're trapped in a 150-message thread, fixing one bug and breaking two features. Google's newly open-sourced Elephant-Goldfish Model (EGM) plugin is aimed squarely at this pain point.

The Essence of Conversational Bias: Models Are Too Good at Pleasing You
To understand EGM's value, you first need to see the root of the problem. Large models continuously accumulate context during a conversation, and every decision builds on the preceding chat history. This creates a subtle lock-in effect: a casual assumption you made in the third round of conversation becomes an unquestionable premise by the twentieth round of code generation. The model won't proactively challenge you—it prefers to keep the conversation flowing.
The developer's response is to write specs. A spec file is a standalone, independently reviewable artifact detached from the conversation, forcing you to think through architecture, encryption, and synchronization strategy before touching code. In his project he explicitly locked down: Ed25519/X25519 keys stored in the OS keychain (no cloud account dependency), field-level conflict merging using SQLite outbox triggers with Hybrid Logical Clocks (HLC), and a signed team member log that rotates vault keys when members are removed. If these decisions had been made on the fly in conversation, it would have been nearly impossible to achieve the same rigor.
EGM splits this process into two roles with fundamentally different personalities.
Hybrid Logical Clock (HLC) is a distributed timestamp mechanism combining physical and logical clocks, commonly used in local-first applications that need cross-device synchronization. It consists of a physical time component and a logical counter: when a local event occurs, the physical component takes the current system time and the logical counter increments; when a remote event is received, it takes the larger of the two physical times and ensures the logical counter exceeds the maximum value known to both parties. This preserves near-real-time readability while maintaining causal ordering of events even under clock drift or rollback. In scenarios using SQLite outbox triggers with field-level conflict merging, HLC stamps each change with a globally comparable timestamp, allowing concurrent modifications to the same field from different devices to be merged by deterministic rules without relying on a central server for time authority.
Elephant and Goldfish: Two Deliberately Opposed Working Modes
EGM's design comes from an essay by Dave Rensin, with role separation at its core to counter conversational bias.
The Elephant (/egm-brainstorm, /egm-draft) handles long-context sessions, interviewing you with questions and ultimately producing a Markdown spec. It has one strict rule: write no code. This completely separates the spec phase from the implementation phase, preventing the model from slipping into "write it out" mode before it has "thought it through."
The Goldfish (/egm-review) is the exact opposite. It spawns stateless subagents that have zero memory of your earlier brainstorming conversation, reading only your .md spec and code repository cold. They appear as adversarial reviewers, specifically hunting for edge cases and ambiguities. Zero memory is key—if the reviewer had read your thought process, it would inherit your biases, and the review would lose its purpose.
The opposition between the two is no gimmick. The more complete the elephant's memory, the more thorough the spec; the cleaner the goldfish's memory, the sharper the review. The same model, through context isolation, is shaped into two uncompromising stances.
Subagents and context isolation are a common orchestration pattern in today's AI coding tools: the main agent handles user interaction and maintains the full conversation history, while subagents are spawned by the main agent with independent, usually empty context windows, receiving only the task descriptions and file contents explicitly passed by the main agent. Subagents return results to the main agent upon completion, and their internal reasoning does not pollute the main conversation. The value of this mechanism lies in separating the cognitive states of "executor" and "reviewer"—the reviewer cannot see the reasoning behind decisions and can only judge based on the artifact itself, thereby avoiding confirmation bias from understanding motives. EGM's goldfish role leverages exactly this zero-memory property of subagents, making the review depend only on two objective objects: the spec and the code.
Drift Detection: Making Code Accountable to the Spec
The third component is the drift report (/egm-drift-report), which compares the final code diff against the .md spec.
This feature addresses the most practical problem in spec-driven development: you wrote a spec, but the code drifted. The spec comes first, and during implementation there's always the temptation to "just tweak this while I'm here." As changes accumulate, what's finally delivered is no longer the same as what you originally thought through. The drift report makes this deviation explicit, turning the spec from a document that's shelved after writing into a contract that can be continuously verified.
From an engineering perspective, these three components form a closed loop: the elephant produces the spec, the goldfish examines the spec with zero context, and the drift report examines the code against the spec. Each link reduces the contamination from conversation history.
Spec-Driven Development draws on the ideas of design by contract and Behavior-Driven Development (BDD): before implementation, interfaces, data models, boundary conditions, and acceptance criteria are fixed in a reviewable textual form, and subsequent development and review use this spec as the baseline. Unlike traditional requirements documents, spec-driven development emphasizes that the spec is a "living contract"—it must be specific enough to guide code generation, yet mechanically comparable by tools. In AI coding scenarios, the spec also serves another purpose: it extracts key decisions from the volatile conversation context, becoming a stable source of truth that the model can re-read each time it generates code, thereby reducing the risk of early assumptions being inadvertently altered in long conversations.
Spec-Driven Development Is Becoming an Engineering Consensus
At the end of the post, the developer posed two questions: how many people keep a project_plan.md before writing code? Has anyone started using zero-context review subagents to review specs?
Both questions point to the same trend. As AI coding moves from the rapid-prototyping stage of "vibe coding" toward engineering projects that require long-term maintenance, the limitations of improvising through conversation are becoming increasingly obvious. The value of a spec file isn't in how formal it is, but in that it extracts decisions from the volatile conversation context, turning them into a static artifact that can be repeatedly reviewed, critiqued by independent roles, and mechanically compared.
EGM's significance may not lie in how complex it is—it's essentially a few prompt workflows organized around Markdown files. What it truly offers is a replicable engineering discipline: think it through first, check it from a zero-bias perspective, then let the code stand trial against the spec. For those already using spec files, this is a formalization of the process; for those still spinning in conversation, it may be a starting point worth trying.
One-line Summary
Google open-sources the EGM plugin, using an elephant to write specs, a goldfish with zero memory to review, and drift detection to reconcile—breaking AI coding's conversational bias.
Paragraph Summary
The article starts from a developer's habit of writing a Markdown spec before letting Claude write code, pointing out that AI coding assistants suffer from "conversational bias": models continuously accumulate context and cater to the user, causing casual early assumptions to solidify into unquestionable premises, ultimately leading to the trap of fixing one bug and breaking two features. Google's open-sourced Elephant-Goldfish Model (EGM) plugin counters this bias through role separation: the elephant conducts long-context interviews and produces specs, strictly writing no code; the goldfish spawns zero-memory subagents that cold-read only the spec and code for adversarial review; and the drift report compares code diffs against the spec, making the spec a verifiable contract. Together they form a "spec—review—reconcile" closed loop, reflecting how spec-driven development is moving from a personal habit to a replicable engineering discipline.
Related articles

Behind the Nvidia Scandal: Can One Person Burst the AI Bubble?
The Vergecast discusses how an Nvidia executive scandal exposes concentration risk in the AI industry: when a key figure could be influenced by foreign actors, can one needle burst the entire AI bubble?

Apple to Launch New Mac App That Makes Running Local AI Models Easier
Apple is reportedly developing a new Mac app to make running AI models locally easier. We analyze its likely product approach, impact on the developer ecosystem, and the value of local AI inference for privacy and efficiency.

Oura Acquires Counsel Health for $625M as AI Health Assistant Race Heats Up
Oura acquires medical AI chatbot startup Counsel Health for $625M after integrating its AI chat into its app. Analysis of the wearable-to-AI-health-service shift, integration path, and compliance challenges.