Elephant-Goldfish Model (EGM) — Universal Agent Edition
The Universal Spec-Driven Development (SDD) Framework & Adversarial Review Engine for AI Coding Agents

"The Elephant behind the tree: Deep context memory anchored by clean architectural structure."
🚀 Overview / What is EGM Universal Agent?
The Elephant-Goldfish Model (EGM) is an open-source methodology and framework for Spec-Driven Development (SDD) with autonomous AI coding agents.
Originally engineered by Google (google/elephant-goldfish-model) based on Dave Rensin's foundational architecture, EGM coordinates two opposing memory models across the software development lifecycle:
- 🐘 The Elephant (Deep Context & Institutional Memory):
A persistent conversational agent holding deep project history, component boundaries, and customer journeys. The Elephant leads structured brainstorming, probes operational limits, and iteratively drafts living Markdown specifications.
- 🐠 The Goldfish (Zero-Context Stateless Reviewers):
Isolated, fresh-context subagents with zero conversational bias. The Goldfish swarm subjects draft specifications to rigorous, adversarial stress-testing across conflicting perspectives (Skeptical Architect, Hostile Design Critic, Naive Reader, Pragmatic Tech Lead, and Codebase Auditor).
- 🧑💻 The Human Engineer (Owns Outcomes):
AI serves as a tireless exploration partner and adversarial auditor; the human engineer retains full authority over architectural trade-offs, scope approval, and merge gates.
The Shift to the Universal Agent Edition
The upstream Google release focused primarily on Google Antigravity and Gemini CLI. However, modern engineering teams build with a diverse array of assistants: Claude Code, Cursor, OpenAI Codex, Windsurf, VS Code GitHub Copilot, Hermes, and open-source models (OpenCode, Continue, Cline, Roo Code, OpenHands).
The Universal Agent Edition bridges this fragmentation into a single canonical core. Through declarative native adapters, it brings native AI coding agent custom rules, Claude Code slash commands, and Cursor custom instructions to every leading agent ecosystem without code forks or documentation drift.
✨ Key Features & Capabilities
🛠️ 7 Universal EGM Skills & Slash Commands
/egm-brainstorm: Zero-document ideation tool. Dispatches a multi-lens Goldfish shootdown swarm to stress-test raw concepts, discover existing codebase reuse, challenge assumptions, and generate an RFC brief (concepts_brief.md).
/egm-draft: Section-by-section living specification compiler. Enforces strict separation of requirements, constraints, assumptions, explicit trade-offs, non-goals, and acceptance criteria with interactive Section Approval Gates.
/egm-review: Multi-stage verification pipeline orchestrator. Executes four verification stages in strict sequence:
$$\text{Stage 1: Zoom Out} \longrightarrow \text{Stage 2: Comprehension} \longrightarrow \text{Stage 3: Critic} \longrightarrow \text{Stage 4: Readiness}$$
/egm-review-loop: Concurrent review-subagent dispatch engine. Coordinates parallel Goldfish reviewers across targeted scopes with direct dispatch, hierarchical aggregation, and honest sequential fallback.
/egm-resolve: Interactive finding triage and automated patch engine. Ingests structured findings, classifies dispositions (defect, valid improvement, duplicate, false positive, needs clarification), applies minimal surgical diffs, and runs automated regression tests.
/egm-drift-report: Read-only specification-to-code divergence scanner. Compares checked-in design documents against live source files and AST symbols to surface undocumented behavior and stale contracts without modifying code.
/egm-bootstrap: Bottom-up repository blueprint compiler. Recursively maps codebases into leaf package contracts (Peanuts) and parent blueprint indexes (Hay) protected by idempotent HTML sentinel blocks and a 15-directory safety gate.