egm-review-loop
Skill1 starsChanged 15 days agoMITView on GitHub
Executes the Antagonistic-Review process from the Elephant-Goldfish Model (EGM) via an automated multi-agent review loop to audit documents against qualitative standards and structural templates, and automatically apply approved fixes. Use when reviewing design docs, READMEs, feature specifications, implementation plans, or verifying document completeness and tone.
3 other projects use a version of this, 2 of them edited; most edited versions we compared are an older text (1 of 2); 2 new projects in the last 4 weeks, against 1 the 4 before.
How people change it
Most projects run an older version: 1 of 2 add nothing and lack a rule this one has, most likely added since.
Of the 2 edited versions we compared: 1 is an older text, 1 made changes of their own.
Not in older versions
- When running in Codex or ChatGPT Work, first read [Codex integration](../../docs/codex.md). In Claude Code or Cowork, read
${CLAUDE_PLUGIN_ROOT}/docs/claude.mdfirst.missing from 1 of 1
Rules people drop
- If your harness has no subagent tool, stop and tell the user: a review in the same context is not a Goldfish review.dropped by 1 of 1
- When resolving names in
ReviewersandStandards:dropped by 1 of 1 - Custom Paths: If the name contains a slash (
/), treat it as an absolute or workspace-relative path and read it directly.dropped by 1 of 1 - If all inputs are present, proceed to Step 2.dropped by 1 of 1
- If some or all inputs are missing, interactively prompt the userdropped by 1 of 1
- Before every iteration, unconditionally re-scan
TargetFileby reading it and using the stableSemanticTargetstring (e.g., locating the target header) to dynamically determine the updated absolute start and end line numbers. …dropped by 1 of 1 - Crucial Turn-Taking Requirement: After the resolution phase finishes for a given round, the loop driver MUST respect the turn-taking checkpoint in
egm-resolve. …dropped by 1 of 1 - Programmatic Callers: If running as a subflow of
egm-review, exit cleanly to hand execution back to the parent workflow.dropped by 1 of 1
We split this file and each edited version into the rules they give an agent and match them by wording. A version that adds no rule of its own and has not changed since this file last did reads as an older text, so what it lacks is not counted as dropped. We keep no past texts of a file, so that is inferred, and an edited version that started from an older text still counts its gaps as drops.
Adopted by
Rising: 2 new projects took it in the last 4 weeks, 2× the 4 weeks before.thin data
Most recently taken up by
- marcelosf80/dsh-elephant-goldfishedited, first seen Nov 29, 2026
- yathamsriram243-blip/egm-universal-agentedited, first seen Nov 16, 2026
- google/elephant-goldfish-modelword for word, first seen Nov 1, 2026
Other versions3 projects use a version of this.
Word for word · 1
- google/elephant-goldfish-model★ 24k100% same
Edited · 2
- marcelosf80/dsh-elephant-goldfish★ 096% same
- yathamsriram243-blip/egm-universal-agent★ 016% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- egm-bootstrapSkill
- egm-brainstormSkill
- egm-draftSkill
- egm-drift-reportSkill
- egm-resolveSkill
- egm-reviewSkill
- mcp-builderSkill
- open-code-reviewSkill
- vibetrace-navigatorSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
When running in Codex or ChatGPT Work, first read Codex integration.
- Distinctive: line 43
If your harness has no subagent tool, stop and tell the user: a review in the same context is not a Goldfish review.
- Very specific: line 67
When resolving names in Reviewers and Standards:
- Very specific: line 77
Custom Paths: If the name contains a slash (/), treat it as an absolute or workspace-relative path and read it directly.
- Distinctive: line 90
If all inputs are present, proceed to Step 2.
- Distinctive: line 91
If some or all inputs are missing, interactively prompt the user
- Very specific: line 109
Before every iteration, unconditionally re-scan TargetFile by reading it and using the stable SemanticTarget string (e.g., locating the …
- Very specific: line 183
Crucial Turn-Taking Requirement: After the resolution phase finishes for a given round, the loop driver MUST respect the turn-taking …
- Very specific: line 194
Programmatic Callers: If running as a subflow of egm-review, exit cleanly to hand execution back to the parent workflow.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Goldfish Review: Loop (Orchestration Driver)
When running in Codex or ChatGPT Work, first read Codex integration.
In Claude Code or Cowork, read ${CLAUDE_PLUGIN_ROOT}/docs/claude.md first.
Overview
This skill acts as the central orchestration engine driving the multi-agent review loop. It coordinates two distinct agent memory models:
- The Goldfish (Adversarial Auditors): Subagents spawned in isolated, fresh context windows to catch unstated assumptions without historical bias.
- The Elephant (Persistent Resolver): The primary agent context holding institutional knowledge to evaluate findings and apply approved repairs.
The driver manages argument intake, resolves paths for reviewers and standards, unconditionally re-parses target line ranges before every iteration, spawns concurrent specialized Goldfish auditors based on configuration, and coordinates with the Elephant context to resolve findings.
Delegation
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.
Inputs
The caller or user provides exactly these parameters:
TargetFile: Absolute or relative path to target document.SemanticTarget: Descriptive targeting string (e.g., "Target the H4 block with SS-ID 'S1.12'"), orfull file.Reviewers: List of reviewer names (shortnames or paths).Standards: Mapping of reviewer names to standard names (shortnames or paths).GoldfishContext: A reading list (source files, directories, or documentation URLs) fed to reviewers to establish their baseline. An empty list from the caller counts as provided; do not ask for it again. Some reviewers cannot open URLs, so before the first round save the raw page of each URL 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.
Path & Standard Resolution Logic
When resolving names in Reviewers and Standards:
- Reviewer Shortnames: Map reviewer shortname (e.g.,
design_critic,structural,style,implementation_readiness,codebase_details,comprehension,zoom_out) toagents/{name}.md. The persona file defines the reviewer's core mandates, audit vectors, and output format. - Standard Shortnames: Map standard shortname (e.g.,
feature-spec-standard,implementation-readiness-standard,zoom-out-standard,heilmeier-standard,re-implementation-standard) toresources/document_standards/{name}.md. - Custom Paths: If the name contains a slash (
/), treat it as an absolute or workspace-relative path and read it directly.
Execution Workflow
Step 1: Intake & Configuration UX
Evaluate the provided inputs (TargetFile, SemanticTarget, Reviewers,
Standards, GoldfishContext).
- Identify Missing Inputs: Determine which of the required parameters are missing.
- Interactive Onboarding:
- If all inputs are present, proceed to Step 2.
- If some or all inputs are missing, interactively prompt the user only for the missing inputs, one at a time via chat messages.
- Reviewer Recommendations:
- Feature Specs: Recommend
design_critic(mapped toresources/document_standards/feature-spec-standard.md) andstructural(mapped toresources/document_standards/feature-spec-standard.md). - Implementation Plans: Recommend
implementation_readiness(mapped toresources/document_standards/implementation-readiness-standard.md) andcodebase_details.
- Feature Specs: Recommend
- Confirm Configuration: Display the consolidated plan (Target, Reviewers, and mapped Standards) and ask the user to confirm before proceeding.
Step 2: The Sharpening Loop (Iterative Cycle)
Execute the following sequence in a continuous loop:
2.1 Unconditional Target Resolution
Before every iteration, unconditionally re-scan TargetFile by reading it
and using the stable SemanticTarget string (e.g., locating the target header) to
dynamically determine the updated absolute start and end line numbers. This
ensures absolute accuracy even if the file was edited in prior rounds. (If full
file mode is specified, confirm full-file line bounds).
2.2 Review Swarm Execution
- Launch Subagent Swarm:
Spawn subagents to execute the review:
- Hierarchical Dispatch (Synthesizer): Spawn the intermediate
synthesizer subagent (
agents/synthesizer.md/egm-synthesizer). The synthesizer spawns the Goldfish review swarm in parallel, deduplicates findings, writes the report artifact, and returns a single summary message to avoid context pollution in the root conversation. Pass it the Failed Reviewers rule below andGoldfishContext, and tell it to give those files to each reviewer. Its summary must give a status,completedornot run, for each requested reviewer. - Direct Dispatch (Flat Swarm): Alternatively, spawn each requested
reviewer subagent in
Reviewersdirectly. Instruct each subagent to first read its persona definition inagents/{name}.md, then auditTargetFileat the resolved line range against its designated standard inresources/document_standards/, supplyingGoldfishContext. - Each reviewer produces findings with severity (🔴 Blocker, 🟡 Major, 🟢 Nit), line numbers, discrepancy descriptions, and rationales.
- Hierarchical Dispatch (Synthesizer): Spawn the intermediate
synthesizer subagent (
- Consolidate Findings: Collect all findings across reviewers into a single
flat
FindingsList. Give each finding a stable id (<reviewer>-<round>-<n>) and record its reviewer, severity, and affected scope. - Failed Reviewers: A reviewer that times out, fails, or returns no report did not review. Retry it once. If it fails again, record it as not run in the report. Never count it as a reviewer with zero findings. If the synthesizer summary has no status for a requested reviewer, record that reviewer as not run.
2.3 Aggregated Resolution Hand-off
- Pass
TargetFile, the active line range, and the aggregatedFindingsListto theegm-resolveworkflow. - Execute the resolution workflow in the primary Elephant context:
- Categorize findings into
CONTESTvs.PROPOSE FIX. - Save
goldfish_review_report.mdwith your file-writing tool. - Present the interactive decision gate (Auto accept, Continue, Interactive breakdown).
- Apply approved text repairs to
TargetFileusing your file-editing tool.
- Categorize findings into
2.4 Iteration Check & Turn Boundary
Fresh reviewers sample differently each round, so a round with zero findings is rare even when the document improves. Use these rules instead:
- Settled findings: A finding is settled when it is contested or recorded without a fix (accepted risk). Keep the settled list across rounds. If a new reviewer raises a settled finding again (same affected scope, same issue), do not re-open it.
- Fixed findings: An applied fix does not settle a finding. If a later reviewer raises the same issue at the same scope, the fix failed or a later edit reintroduced the issue. Re-open the finding.
- Clean round: A round is clean when no reviewer raises a Blocker or Major finding that is not settled. Nits do not block. A reviewer recorded as not run makes the round not clean. Decide this from the review results, before you apply the fixes of that round.
- Converged: Two consecutive clean rounds. One clean round is not enough, because the next fresh reviewer can find a different gap in the same text.
- Cap: 5 rounds.
- Churn: A new finding is at the scope of an applied fix, and reverting that fix would resolve it.
On converged, go to Step 3. On cap or churn, write a short list of the open findings by severity, then ask the user one question: accept and proceed, continue past the cap, or return the document to drafting.
Crucial Turn-Taking Requirement: After the resolution phase finishes for a
given round, the loop driver MUST respect the turn-taking checkpoint in
egm-resolve. The driver must remain idle across human turns,
only looping back to Step 2.1 when the user explicitly confirms they wish to run
another round of review.
Step 3: Output Boundary & Final Checkpoint
Upon completion (converged, cap or churn accepted by the user, or manual halt):
- Programmatic Callers: If running as a subflow of
egm-review, exit cleanly to hand execution back to the parent workflow. - Manual Invocations: Output a summary of completion in chat: "The review loop has completed after [N] rounds ([converged | accepted at cap | halted]). Open findings are in the report. Would you like to proceed to the next stage, or do you have any final questions?"
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

