agentleFS
yathamsriram243-blipyathamsriram243-blip/egm-universal-agent/skills/egm_review_loop/SKILL.md

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

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
  1. Very specific:

    When running in Codex or ChatGPT Work, first read Codex integration.

    line 13
  2. Distinctive:

    Use this when the host supports subagent nesting to keep the primary conversation clean.

    line 42
  3. Distinctive:

    Sequential Fallback Protocol: If subagent execution is unavailable or unsupported on the host, perform clearly labeled sequential reviews …

    line 43
  4. Very specific:

    If TargetFile is missing, prompt the user in chat.

    line 73
  5. Very specific:

    Before every iteration, read TargetFile and locate the SemanticTarget header or anchor to determine updated absolute line numbers …

    line 80
  6. Very specific:

    All findings MUST adhere to the 11-field Standard Review-Finding Contract (resources/finding_contract.md):

    line 92
  7. Distinctive:

    After resolution, check if any unaddressed critical/high findings remain:

    line 101
  8. Distinctive:

    If findings remain and user requests re-audit: Loop back to Step 2.1 (re-scan line bounds).

    line 102
  9. Distinctive:

    If zero findings remain or user concludes: Exit cleanly to parent workflow or chat summary.

    line 103
  10. Very specific:

    Write findings report to goldfish_review_report.md using your file-writing tool and output:

    line 107

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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).

  1. 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.
  2. Hierarchical Dispatch (Synthesizer): The orchestrator dispatches an intermediate coordinator (egm-synthesizer at agents/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.
  3. 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'") or full 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 in resources/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 TypeRecommended Primary ReviewersStandards Applied
Concept Brief / RFCegm-zoom-out, egm-design, egm-comprehensionresources/document_standards/zoom-out-standard.md, resources/document_standards/heilmeier-standard.md
Feature Specificationegm-zoom-out, egm-design, egm-structural, egm-styleresources/document_standards/feature-spec-standard.md, resources/document_standards/zoom-out-standard.md
Implementation Planegm-implementation-readiness, egm-codebase-details, egm-styleresources/document_standards/implementation-readiness-standard.md
Full Architecture DocFull Swarm (Phased or Hierarchical)All applicable standards

Execution Workflow

Step 1: Intake & Targeted Scoping

  1. Inspect provided inputs (TargetFile, SemanticTarget, Reviewers, Standards, GoldfishContext).
  2. If TargetFile is missing, prompt the user in chat.
  3. 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

  1. Launch the assigned review personas using either Hierarchical Dispatch or Direct Dispatch.
  2. Provide each reviewer with a focused assignment, the resolved line bounds, and relevant context.
  3. 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

  1. Pass the validated findings list to /egm-resolve in the primary Elephant context.
  2. Present the interactive resolution gate to the user.
  3. Execute approved edits on TargetFile using 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.