Orchestrates the EGM Goldfish Review Protocol. Used as part of the EGM process to perform design document reviews. Executes five review phases: Initial Zoom Out Review, Comprehension Review, Design Critique, Intermediate Zoom Out Review, and Implementation Readiness.
When running in Codex or ChatGPT Work, first read Codex integration.
In Claude Code or Cowork, read ${CLAUDE_PLUGIN_ROOT}/docs/claude.md first.
Reviews and validates a design document through specialized reviewer personas.
A Goldfish runs in a fresh context with no conversation history. Spawn each
subagent with your harness's subagent tool (Antigravity: invoke_subagent; Claude Code: Agent; Codex: spawn_agent). Each subagent is defined in agents/<file>.md, and its
frontmatter name (for example egm-zoom-out) is the subagent type to request
where your harness registers named subagents. Otherwise spawn a general-purpose
subagent and tell it to read that persona file first. Pass the prompt verbatim
and wait for the report. If your harness cannot nest subagents,
use direct dispatch instead of the synthesizer. See docs/harnesses.md.
If your harness has no subagent tool, stop and tell the user: a review in the same context is not a Goldfish review.
ask_question, if your harness has one, or plain chat) MUST contain
strictly one question (len(questions) == 1), be the sole tool call in the
turn, and provide clear, action-oriented options without (Recommended)
prefixes.TargetFile: Absolute or relative path to the design document.GoldfishContext (Optional): Reading list to establish the system
baseline. If omitted, it holds only the linked files that Step 1.3 adds.Step (Optional): Specific pipeline preset or stage to run (e.g.
interactive, uninterrupted, feature_spec, implementation, or an
individual stage 5, 6, 7, 8, 9). If omitted, the user is prompted.TargetFile is provided. If missing:
ask_question, as providing an
arbitrary file path is an open-ended text input, not a choice between
fixed options) and end your turn.TargetFile is provided, verify if GoldfishContext is provided (an
empty list counts as provided, as does the user explicitly stating in their
prompt to proceed with no additional context). If missing:
GoldfishContext (any stage but Stage 6), in any flow including
uninterrupted. Read TargetFile, skip anchor-only links (#...), drop
the #fragment from other links, and resolve each relative link against
the design document's folder. Add each link whose real path (after
following symbolic links) stays inside the working directory to
GoldfishContext, skipping files that do not exist. If any link resolves
outside the working directory or is a URL, list those links in chat as
regular text, ask which to include, and end your turn; if no one can
answer, as in a headless run, leave them all out and keep going. Add only
approved ones and tell the user which were left out. Some reviewers cannot
open URLs, so save the raw page of each URL in GoldfishContext as a new
file in the working directory (or your harness's artifact directory) and
pass its absolute path instead. If a page cannot be saved, ask the user for
a local copy and end your turn; if no one can answer, as in a headless run,
leave it out, tell the user, and keep going. Pass
GoldfishContext to every stage except Stage 6, which reads the document
alone; tell any synthesizer to give these files to each reviewer.Preset Gate Check:
Step parameter was explicitly provided during invocation (e.g.
interactive, uninterrupted, feature_spec, implementation, or an
individual stage 5, 6, 7, 8, 9), map to the corresponding
preset or subflow and bypass the interactive preset selection gate.Step was omitted), you MUST present the Curated
Pipeline Presets single-select gate to the user (using a structured
question tool such as ask_question if your harness has one, or plain
chat).Modal Invariants & Wire Payload:
The question payload MUST contain strictly one question object
(len(questions) == 1). Multi-question payloads are strictly forbidden.
The question tool MUST be the sole tool call in this turn payload. You MUST yield execution immediately upon invocation.
is_multi_select MUST be false. Combinatorial multi-select
checklists are strictly prohibited to protect topological dependencies
(5 → 6 → 7 → 8 → 9).
Option 0 MUST be the primary default action (without a
(Recommended) prefix).
Payload specification:
{
"questions": [
{
"question": "Select the review execution mode for this document:",
"options": [
"Interactive review with all review rubrics (step-by-step, check in after each review)",
"Consolidated report with all review rubrics (runs full flow without stopping)",
"Feature spec only (evaluate design without considering implementation)",
"Implementation plan only (evaluate design for implementation readiness)"
],
"is_multi_select": false
}
]
}
Action Dispatch Based on Preset:
Interactive review with all review rubrics: Proceed to
Step 3 to discover the semantic split, then execute Stages 5, 6, 7, 8,
and 9 sequentially with interactive checkpoint gates between stages.Consolidated report with all review rubrics: Proceed to
Step 3 to discover the semantic split, then execute all five stages
without pausing for checkpoints, consolidating findings into
consolidated_review_report.md.Feature spec only: Bypass Step 3 semantic split
discovery entirely. Set FeatureRange = 1..End, set DetailedRange = N/A, and execute Stages 5, 6, 7, and 8 with checkpoints. Cleanly halt
review after Stage 8 before Stage 9.Implementation plan only: Proceed to Step 3 to discover
the semantic split, confirm DetailedRange, and jump directly to Stage
9 (Implementation Readiness Test).Feature spec only) was selected,
skip this step completely. Set FeatureRange to cover the entire
document (lines 1 through End) and proceed directly to Step 4.TargetFile to inspect its structure and line
count.## Detailed Implementation Plan (or standard synonyms: ## Implementation Plan, ## Work Breakdown, ## Implementation Steps).
FeatureRange = 1..(L-1).DetailedRange = L..End."Discovered semantic boundary at line L. FeatureRange: 1..(L-1), DetailedRange: L..End."ask_question with len(questions) == 1, or plain chat)
proposing the most likely split line as Option 0, with Option 1
allowing custom line ranges via write-in.FeatureRange = 1..End and DetailedRange = N/A.Once the semantic split and execution preset are confirmed:
FeatureRange and DetailedRange
are bound.All interactive review stages conclude with an explicit single-select gate
(using a structured question tool such as ask_question with
len(questions) == 1, is_multi_select: false, sole tool call in turn, or
plain chat):
Proceed to next stage: Stage [N+1] ([Next Stage Name])
(or Conclude review and begin detailed implementation planning for
Stage 8 terminal).I will update doc first (pause session; notify me in chat when edits are complete to re-run).Pause Review (save progress and exit).Proceed to next stage: Stage [N+1] ([Next Stage Name])
(or Conclude review and finalize document for Stage 9 terminal).Resolve findings with agent (evaluate findings, propose fixes, and apply approved edits).I will update doc manually (pause session; notify me in chat when edits are complete to re-run).Pause Review (save progress and exit).egm-resolve in the primary
Elephant context window on the target range (FeatureRange or
DetailedRange), passing the parsed findings from critic_report.md or
implementation_readiness_report.md.PROPOSE FIX vs CONTEST), writes goldfish_review_report.md, and executes
approved edits on TargetFile via file editing tools.TargetFile to
recalculate line bounds, and either advance to the next stage or re-run
the stage audit (enforcing max 1 re-audit limit).TargetFile to recalculate line shifts.Pause Review):
GoldfishContext to
every step except Step 6.
egm-synthesizer (or direct
subagent) with Reviewers: [egm-zoom-out, egm-inventive-catalyst] on
full file → write zoom_out_report.md.egm-comprehension
subagent directly (not the synthesizer) on FeatureRange &
DetailedRange → write its complete result to
comprehension_report.md.egm-synthesizer (or direct
subagents) with Reviewers: [egm-design, egm-structural, egm-style] on
FeatureRange → write critic_report.md.egm-synthesizer (or direct
subagent) with Reviewers: [egm-zoom-out] on full file → write
intermediate_zoom_out_report.md.egm-synthesizer (or
direct subagents) with Reviewers: [egm-implementation-readiness, egm-codebase-details, egm-style] on DetailedRange → write
implementation_readiness_report.md.consolidated_review_report.md using
your file-writing tool.consolidated_review_report.md (give its path).egm-synthesizer (or the
specialized egm-zoom-out subagent at agents/zoom_out.md) on full file
applying resources/document_standards/zoom-out-standard.md. When running
as Step 8 (Intermediate Zoom Out), include zoom_out_report.md path in
context and focus on additions/mitigations from Comprehension and Critic
stages. When running as Step 5, also
spawn egm-inventive-catalyst in parallel and write both into
zoom_out_report.md.
In both Stage 5 and Stage 8, pass GoldfishContext.zoom_out_report.md (Stage 5) or
intermediate_zoom_out_report.md (Stage 8) using your file-writing tool."Stage 5 (Initial Zoom Out Review) completed. Findings written to zoom_out_report.md. How would you like to proceed?", Option 0: "Proceed to next stage: Stage 6 (Comprehension Test)"."Stage 8 (Intermediate Zoom Out) completed. High-level architecture verified. How would you like to proceed?", Option 0: "Conclude review and begin detailed implementation planning"."Stage 8 (Intermediate Zoom Out) completed. Findings written to intermediate_zoom_out_report.md. How would you like to proceed?",
Option 0: "Proceed to next stage: Stage 9 (Implementation Readiness Test)"."I will update doc first (pause session; notify me in chat when edits are complete to re-run)" and Option 2:
"Pause Review (save progress and exit)".egm-comprehension subagent
at agents/comprehension.md on FeatureRange & DetailedRange with no
document standard. Do not use the synthesizer: its report keeps only
findings, and the author must see the paraphrase. The test is self-containment,
not detail. Do not apply re-implementation-standard.md: it asks for
code-level detail, which the Zoom Out standard forbids in FeatureRange.comprehension_report.md using your file-writing tool. Start with the two
paraphrase headings verbatim, then the findings. Keep the paraphrase when
there are no findings.comprehension_report.md (give its path)."Stage 6 (Comprehension Test) completed. Findings written to comprehension_report.md. How would you like to proceed?""Proceed to next stage: Stage 7 (Critic Review)""I will update doc first (pause session; notify me in chat when edits are complete to re-run)""Pause Review (save progress and exit)"egm-review-loop in-thread on
FeatureRange with reviewers [egm-design, egm-structural, egm-style],
standards {"egm-design": "feature-spec-standard", "egm-structural": "feature-spec-standard"}, and GoldfishContext.critic_report.md (give its path)."Stage 7 (Critic Review) completed. Findings written to critic_report.md. How would you like to proceed?""Proceed to next stage: Stage 8 (Intermediate Zoom Out Review)""Resolve findings with agent (evaluate findings, propose fixes, and apply approved edits)""I will update doc manually (pause session; notify me in chat when edits are complete to re-run)""Pause Review (save progress and exit)"egm-resolve in the primary Elephant context on FeatureRange,
passing findings from critic_report.md (or
goldfish_review_report.md).TargetFile using file editing
tools.TargetFile to recalculate line
bounds, and advance to Stage 8 (or re-run Stage 7, max 1 re-audit).egm-review-loop in-thread on
DetailedRange with reviewers [egm-implementation-readiness, egm-codebase-details, egm-style] and standards
{"egm-implementation-readiness": "implementation-readiness-standard", "egm-codebase-details": "implementation-readiness-standard"}, and
GoldfishContext.implementation_readiness_report.md (give its path)."Stage 9 (Implementation Readiness Test) completed. Report written to implementation_readiness_report.md. How would you like to proceed?""Conclude review and finalize document""Resolve findings with agent (evaluate findings, propose fixes, and apply approved edits)""I will update doc manually (pause session; notify me in chat when edits are complete to re-run)""Pause Review (save progress and exit)"egm-resolve in the primary Elephant context on DetailedRange,
passing findings from implementation_readiness_report.md (or
goldfish_review_report.md).TargetFile using file editing
tools.TargetFile to recalculate line
bounds, and conclude the review session (or re-run Stage 9, max 1
re-audit).Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/egm-review · pinned to the source commit
# Run from your project root
git clone https://github.com/google/elephant-goldfish-model.git .skillboard-tmp
git -C .skillboard-tmp checkout bdcfe8cdaee99699c4b2cb7ad4e3b2c1a6b56a31
mkdir -p ".claude/skills"
cp -r ".skillboard-tmp/distributions/claude/skills/egm-review" ".claude/skills/"
rm -rf .skillboard-tmpReview the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
sudo apt update && sudo apt install -y gitnpm install -g @anthropic-ai/claude-code# Run from your project root
git clone https://github.com/google/elephant-goldfish-model.git .skillboard-tmp
git -C .skillboard-tmp checkout bdcfe8cdaee99699c4b2cb7ad4e3b2c1a6b56a31
mkdir -p ".claude/skills"
cp -r ".skillboard-tmp/distributions/claude/skills/egm-review" ".claude/skills/"
rm -rf .skillboard-tmpDestination: .claude/skills/egm-review
Scanner static-checks@0.1.0 · commit bdcfe8cdaee9. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
References parent-directory traversal, which can escape a target directory.
Evidence: ../· fingerprint fa08499e14d0113b