EGM for Claude Code
A Claude Code plugin for the Elephant-Goldfish Model (EGM),
Google's open-source method for spec-driven development with AI coding agents.
An Elephant (your long-running session) brainstorms and drafts a design doc.
Goldfish reviewers (fresh subagents with no conversation history) then check
whether the doc stands on its own before any code is written. The skills,
personas, and document standards come unchanged from
google/elephant-goldfish-model.
This repository adds only what Claude Code needs to run them correctly.
Community project. Not an official Google or Anthropic product. Upstream
officially supports Antigravity and Gemini CLI. Native Claude Code support
is proposed upstream in
google/elephant-goldfish-model#101.
Install
Requires Claude Code 2.1.271 or later.
/plugin marketplace add kurcontko/egm-claude-code
/plugin install egm@egm-community
Or from a shell:
claude plugin marketplace add kurcontko/egm-claude-code
claude plugin install egm@egm-community
Use
| Step | Command | Who |
|---|
| 1. Clarify an idea into a concepts brief | /egm:egm-brainstorm <idea> | Elephant |
2. Draft the design doc in docs/designs/ | /egm:egm-draft | Elephant |
| 3. Review it with isolated reviewers | /egm:egm-review docs/designs/<doc>.md | Goldfish |
| 4. Work through the findings | /egm:egm-resolve | Elephant |
| 5. Build from the reviewed spec | your usual prompt | |
| Weekly: compare docs against code | /egm:egm-drift-report | |
| Existing codebase: generate READMEs bottom-up | /egm:egm-bootstrap | |
/egm:egm-review-loop runs an automated review-and-fix loop over any document.
The skills run only when you invoke them; Claude never starts them on its own.
See egm.dev and the
upstream getting-started guide
for the method itself.
What the overlay changes
Upstream's skills are harness-neutral: they say "spawn a subagent" and
reference agents/ and resources/ by relative path.
scripts/sync_upstream.py copies upstream at the
commit pinned in upstream.json and applies a small,
mechanical overlay:
| Change | Why |
|---|
Reviewer personas get tools: Read, Grep, Glob and omitClaudeMd: true | Without these, Claude Code subagents can edit files and load your CLAUDE.md, so a Goldfish is not really context-free |
The synthesizer and bootstrap orchestrator get a note with the plugin root and the egm: agent names; the synthesizer is limited to Agent, Read, Grep, Glob, Write | They run as subagents, so they never see a skill's note |
Each skill gets a note with the resolved ${CLAUDE_PLUGIN_ROOT} and a pointer to docs/claude-code.md | Installed skills live in the plugin cache, so agents/ and resources/ would otherwise resolve against your project. docs/designs/ stays in your project |
docs/claude-code.md maps the skills' wording onto Claude Code tools | invoke_subagent becomes Agent with egm:egm-<persona>, forks are ruled out because a fork inherits the whole conversation, and chained skills are read from the plugin because the Skill tool refuses them |
Skill folders are renamed to their frontmatter names (egm_review → egm-review) | Claude Code names plugin commands after the folder |
Everything else is copied byte for byte. These edits are safe here because
this plugin only targets Claude Code. Native support proposed upstream in
#101 keeps
skills/ and agents/ untouched instead, because Antigravity rejects
tools: Read, Grep, Glob in a shared persona file.
Verification
python scripts/sync_upstream.py --check rebuilds the plugin from the pinned
commit and fails if plugins/egm/ differs.
pytest tests checks the overlay: reviewer frontmatter, skill notes, resource
paths, and that the manifest matches the marketplace and lock file.
tests/live_probe.py runs one headless Claude Code session (about $0.15)
in a throwaway workspace. It confirms that /egm:egm-review reads the guide
from the plugin root and spawns egm:egm-zoom-out as a new agent, not a fork.
It also confirms that the reviewer sees neither a CLAUDE.md marker nor a
parent-prompt marker, and that it has no write, shell, or agent tools.
CI runs the first two plus claude plugin validate. A weekly workflow rebuilds
from upstream main and opens a pull request when upstream changes.
Contributing
Edit overlay/ or scripts/, never plugins/egm/ directly, then run: