egm-review-loop
Skill0 starsChanged 42 days agoApache-2.0View on GitHub
Concurrent review-subagent dispatch engine for the Elephant-Goldfish Model (EGM). Coordinates isolated Goldfish reviewers across targeted scopes, aggregates findings, and handles both direct and hierarchical dispatch with sequential fallback.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- marcelosf80/dsh-elephant-goldfishtheir own version, first seen Nov 29, 2026
- serguei9090/VibeGraphtheir own version, first seen Nov 16, 2026
- google/elephant-goldfish-modeltheir own version, first seen Nov 1, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- google/elephant-goldfish-model★ 24ksame name
- serguei9090/VibeGraph★ 1same name
- marcelosf80/dsh-elephant-goldfish★ 0same name
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 repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/claude.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/egm.mdcCursor rule
- egm-bootstrapSkill
- egm-brainstormSkill
- egm-draftSkill
- egm-drift-reportSkill
- egm-resolveSkill
- egm-reviewSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 5 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
When running in Codex or ChatGPT Work, first read Codex integration.
- Distinctive: line 42
Use this when the host supports subagent nesting to keep the primary conversation clean.
- Distinctive: line 43
Sequential Fallback Protocol: If subagent execution is unavailable or unsupported on the host, perform clearly labeled sequential reviews …
- Very specific: line 73
If TargetFile is missing, prompt the user in chat.
- Very specific: line 80
Before every iteration, read TargetFile and locate the SemanticTarget header or anchor to determine updated absolute line numbers …
- Very specific: line 92
All findings MUST adhere to the 11-field Standard Review-Finding Contract (resources/finding_contract.md):
- Distinctive: line 101
After resolution, check if any unaddressed critical/high findings remain:
- Distinctive: line 102
If findings remain and user requests re-audit: Loop back to Step 2.1 (re-scan line bounds).
- Distinctive: line 103
If zero findings remain or user concludes: Exit cleanly to parent workflow or chat summary.
- Very specific: line 107
Write findings report to goldfish_review_report.md using your file-writing tool and output:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
EGM Review Loop: Concurrent Subagent Dispatch Engine
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 concurrent Goldfish review loop. It coordinates two distinct agent memory models:
- The Goldfish (Adversarial Auditors): Subagents spawned in isolated, fresh context windows to audit documents without historical bias.
- The Elephant (Persistent Resolver): The primary agent context holding system history to evaluate findings, triage feedback, and apply approved repairs.
The engine manages scope intake, resolves personas and standards, dynamically re-calculates line ranges before each cycle, selects suitable review lenses, and executes concurrent dispatch with honest reporting of coverage.
Delegation & Dispatch Modes
Spawn each subagent with your harness's subagent tool (Antigravity: invoke_subagent;
Gemini CLI: subagents).
- Direct Dispatch (Flat Swarm): The orchestrator invokes individual review
personas directly in parallel (
egm-zoom-out,egm-comprehension,egm-design,egm-implementation-readiness,egm-codebase-details,egm-structural,egm-style). Best suited when the host supports flat concurrency and root token budgets permit. - Hierarchical Dispatch (Synthesizer): The orchestrator dispatches an intermediate
coordinator (
egm-synthesizeratagents/synthesizer.md), which manages the swarm, deduplicates raw feedback, offloads context, and writes the consolidated report artifact. Use this when the host supports subagent nesting to keep the primary conversation clean. - Sequential Fallback Protocol: If subagent execution is unavailable or unsupported on the host, perform clearly labeled sequential reviews in the current context. Never claim concurrency or independence that did not occur.
Inputs
The caller or user provides these parameters:
TargetFile: Absolute or relative path to the target document (Required).SemanticTarget: Descriptive targeting string (e.g. "Target the H2 block 'Architecture'") orfull file.Reviewers: List of reviewer names (shortnames or paths). Defaults to recommended personas for the document type.Standards: Mapping of reviewer names to standard names inresources/document_standards/.GoldfishContext: A reading list (source files, directories, or documentation) fed to reviewers.
Reviewer Selection Matrix
Select suitable review personas instead of dispatching every agent unnecessarily:
| Document Type | Recommended Primary Reviewers | Standards Applied |
| Concept Brief / RFC | egm-zoom-out, egm-design, egm-comprehension | resources/document_standards/zoom-out-standard.md, resources/document_standards/heilmeier-standard.md |
| Feature Specification | egm-zoom-out, egm-design, egm-structural, egm-style | resources/document_standards/feature-spec-standard.md, resources/document_standards/zoom-out-standard.md |
| Implementation Plan | egm-implementation-readiness, egm-codebase-details, egm-style | resources/document_standards/implementation-readiness-standard.md |
| Full Architecture Doc | Full Swarm (Phased or Hierarchical) | All applicable standards |
Execution Workflow
Step 1: Intake & Targeted Scoping
- Inspect provided inputs (
TargetFile,SemanticTarget,Reviewers,Standards,GoldfishContext). - If
TargetFileis missing, prompt the user in chat. - Bind reviewer selection according to the Reviewer Selection Matrix. Display the consolidated plan and confirm with the user before launching workers.
Step 2: The Concurrent Review Loop
2.1 Unconditional Target Line Resolution
Before every iteration, read TargetFile and locate the SemanticTarget header or anchor
to determine updated absolute line numbers ($L_{start}..L_{end}$). This ensures 100% targeting
accuracy across editing iterations.
2.2 Swarm Execution & Coverage Monitoring
- Launch the assigned review personas using either Hierarchical Dispatch or Direct Dispatch.
- Provide each reviewer with a focused assignment, the resolved line bounds, and relevant context.
- Honest Coverage Reporting: Monitor subagent completion. If a subagent times out, fails to spawn, or encounters an error, record the incident explicitly under Coverage Limitations. Never fabricate results for an agent that failed to run.
2.3 Finding Ingestion & Schema Validation
All findings MUST adhere to the 11-field Standard Review-Finding Contract (resources/finding_contract.md):
id,title,severity,category,location,evidence,reasoning,impact,recommendation,confidence,status.
2.4 Aggregated Resolution Hand-Off
- Pass the validated findings list to
/egm-resolvein the primary Elephant context. - Present the interactive resolution gate to the user.
- Execute approved edits on
TargetFileusing your file-editing tool.
2.5 Iteration Boundary & Turn Taking
After resolution, check if any unaddressed critical/high findings remain:
- If findings remain and user requests re-audit: Loop back to Step 2.1 (re-scan line bounds).
- If zero findings remain or user concludes: Exit cleanly to parent workflow or chat summary.
Step 3: Completion Deliverable
Write findings report to goldfish_review_report.md using your file-writing tool and output:
- Subagents dispatched and dispatch mode (Direct, Hierarchical, or Sequential Fallback).
- Coverage limitations or agent failures (if any).
- Severity breakdown and link to
goldfish_review_report.md.
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.

