@estebanforge/pi-egm
Elephant-Goldfish Model (egm.dev) for Pi: Google's spec-driven development workflow. Design with an elephant — your deep-context Pi session drafts the spec — review with goldfish: fresh zero-context child sessions that stress-test the design from conflict
Package details
Install @estebanforge/pi-egm from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@estebanforge/pi-egm- Package
@estebanforge/pi-egm- Version
0.1.1- Published
- Oct 31, 2026
- Downloads
- 248/mo · 248/wk
- Author
- estebanforge
- License
- Apache-2.0
- Types
- extension, skill
- Size
- 183.9 KB
- Dependencies
- 1 dependency · 1 peer
Pi manifest JSON
{
"skills": [
"./skills"
],
"extensions": [
"./extensions"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@estebanforge/pi-egm
The Elephant-Goldfish Model (EGM) on Pi: Google's open-source spec-driven development workflow — the same plugin thousands of Google engineers use to draft specs with deep-context agents and stress-test them with zero-context reviewers before writing code. Upstream source: google/elephant-goldfish-model.
An Elephant (your Pi session, holding project context) drafts the specification through structured brainstorming and probing questions. Goldfish reviewers — fresh subagents with zero conversation history — read only the draft and the live source, stress-testing the design from conflicting perspectives to expose unstated assumptions and blind spots while changes are still cheap. You make the trade-offs and approve the spec; only then does a coding agent build it.
Vendored verbatim from google/elephant-goldfish-model (Apache-2.0). The only content changes are one harness pointer per skill and the Pi tool name in the reviewer-dispatch enumerations. PI.md carries the Pi dispatch notes; PI.md-related concerns live there, not in the skill text.
Skills
| Command | Skill | Use it to… |
|---|---|---|
/egm-brainstorm |
egm-brainstorm | Test an idea with a Goldfish swarm and write concepts_brief.md. |
/egm-draft |
egm-draft | Turn a brief or notes into a design doc, section by section. |
/egm-review |
egm-review | Five-stage Goldfish review of a design doc (zoom-out, comprehension, critique, implementation readiness). |
/egm-resolve |
egm-resolve | Work through review findings and apply agreed edits. |
/egm-review-loop |
egm-review-loop | Run a configured reviewer group until convergence. |
/egm-bootstrap |
egm-bootstrap | Generate a README context hierarchy for an existing codebase. |
/egm-drift-report |
egm-drift-report | Compare checked-in designs with the current source for drift. |
Every skill also loads as a Pi skill (/skill:egm-<name>); the commands exist for parity with the upstream Antigravity and Claude Code UX. The philosophy behind the model is explained at egm.dev and in Dave Rensin's article; the full workflow docs live in the upstream repo.
Requirements
- None beyond Pi.
egm_goldfishships in this package: each reviewer runs in a fresh headless child process with no extensions, no context files, no discovered skills or prompt templates, no persisted session, and theedittool disabled (bashandwriteremain, so reviewers can search and deliver their report but cannot modify documents in place), so the zero-context guarantee does not depend on any subagent extension. One known residual exposure: pi still loadsAPPEND_SYSTEM.mdfiles into the child's system prompt and there is no flag to suppress them. Theegm_goldfishtool accepts optionalmodelandthinking_levelparameters to run a reviewer on a cheaper pi model; unset means the pi settings default model (provider and keys come from your Pi settings). - During EGM flows the extension blocks spawn-shaped tools other than
egm_goldfish, so a partially compatible subagent extension cannot silently fork context into a reviewer. The guard is a best-effort backstop: once EGM artifacts have been touched in a session (a read of the bundled skills, personas, standards, or PI.md, anegm_goldfishcall, or an/egm-*command) it stays armed until the session ends, because EGM flows are multi-turn and plain answers between stages are not flow exits. It is name-based, so a tool with an unusual name could still be called — residual risk we accept rather than chase per-extension compatibility. - If you run pi-subagent-manager you will notice EGM does not use it: its spawned sessions load your personal package stack, which can inject memory context into a reviewer.
Install
pi install npm:@estebanforge/pi-egm
Start a new session, then type /egm-brainstorm Add webhook delivery to this project. — the command prefills the editor with the skill prompt (press Enter to run, same as the fleet's command pattern). Continue with:
/egm-draft
/egm-review docs/designs/webhooks.md
Commands need an interactive session; headless runs should read the vendored skills/<name>/SKILL.md directly.
Optional: add EGM artifact directory: .dev/docs to your AGENTS.md to keep briefs, drafts, and review reports out of the repo root.
Provenance and license
- Skill, persona, and standards text: google/elephant-goldfish-model (egm.dev), Apache-2.0, Copyright Google LLC. Upstream is the canonical home for content changes.
- Pi integration (
PI.md,extensions/, packaging): EstebanForge, Apache-2.0. - Not an officially supported Google product.
Develop
npm run check # from the monorepo root: typecheck + tests
npx vitest run packages/pi-egm/tests # this package's structure tests
pi -e ./packages/pi-egm # try it without installing