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

egm-resolve

Skill0 starsChanged 42 days agoApache-2.0View on GitHub

The Elephant resolution skill. Ingests structured review findings, performs interactive triage and classification, proposes minimal safe patches, applies approved edits, and runs automated verification tests.

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, 6 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 4

    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:

    Run this skill in the persistent conversation session that generated the target document or code (the Elephant).

    line 25
  3. Distinctive:

    Do not rewrite unrelated paragraphs or refactor adjacent code.

    line 50
  4. Distinctive:

    Preserve User Work: Do not overwrite unrelated changes or revert concurrent human edits.

    line 51
  5. Distinctive:

    Scope Boundary Enforcement: Only apply patches to files and sections explicitly approved by the user.

    line 54
  6. Very specific:

    Read TargetFile at LineRange and inspect all referenced source files using your file-reading tool.

    line 60
  7. Very specific:

    Write the annotated triage report to goldfish_review_report.md in the working directory (or harness artifact directory) using your …

    line 67
  8. Distinctive:

    Verify that edits apply cleanly without mangling surrounding text.

    line 106
  9. Distinctive:

    If tests fail, inspect the failure log, formulate a rollback or corrective patch, and alert the user.

    line 111
  10. Very specific:

    Update goldfish_review_report.md with final statuses (fixed, rejected, deferred) and return:

    line 116

“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 Resolve: Interactive Triage & Patch Verification 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 operates within the primary Elephant context window to parse review findings from Goldfish subagents. It evaluates critiques against repository facts, classifies findings, presents an interactive triage gate to the human engineer, proposes the smallest safe fix, applies approved edits, and verifies changes using targeted tests.

Context Strategy (Elephant Memory)

Run this skill in the persistent conversation session that generated the target document or code (the Elephant). This preserves historical rationale, architectural context, and intent needed to defend accurate design decisions and craft minimal, high-quality repairs.

Inputs

  • TargetFile: Path to the target document or source file (Required).
  • LineRange: Target line numbers or full file (Required).
  • FindingsList: List of findings conforming to the 11-field Standard Review-Finding Contract (resources/finding_contract.md).

Finding Classification Taxonomy

For every finding in FindingsList, the Elephant classifies its disposition:

  1. defect: Confirmed technical, structural, or logical flaw requiring a code or document fix.
  2. valid improvement: Sound suggestion that enhances clarity, performance, or simplicity.
  3. duplicate: Redundant observation already covered by another finding ID.
  4. false positive: Reviewer misunderstood codebase semantics, out-of-scope boundaries, or intentional design invariants. Defended with code evidence.
  5. needs clarification: Reviewer raised a valid ambiguity that requires human direction before a fix can be determined.

Execution Constraints & Safety Rules

  1. No Silent Discarding: You MUST NOT silently ignore or delete disputed findings. Every finding must have an explicit disposition (accepted, rejected, deferred, fixed).
  2. Smallest Safe Fix: Propose the minimal surgical modification necessary to resolve the defect. Do not rewrite unrelated paragraphs or refactor adjacent code.
  3. Preserve User Work: Do not overwrite unrelated changes or revert concurrent human edits.
  4. No Speculative Verification Claims: You MUST NOT claim a fix is verified unless the relevant test command was executed and exited with code 0 in the shell tool.
  5. Scope Boundary Enforcement: Only apply patches to files and sections explicitly approved by the user.

Execution Workflow

Step 1: Ingest & Evaluate Findings

  1. Read TargetFile at LineRange and inspect all referenced source files using your file-reading tool.
  2. Evaluate each finding against live repository code and authoritative specs.
  3. Assign classification (defect, valid improvement, duplicate, false positive, or needs clarification).
  4. Formulate proposed minimal textual replacements or code edits for accepted items.

Step 2: Compile Triage Report

Write the annotated triage report to goldfish_review_report.md in the working directory (or harness artifact directory) using your file-writing tool:

# EGM Resolution & Triage Report

**Target:** `[TargetFile]` (`[LineRange]`)
**Date:** [YYYY-MM-DD]

## Finding-by-Finding Disposition

### [[id]] [title] - Severity: [Severity]
* **Category**: [Category] | **Location**: `[Location]`
* **Disposition**: [defect | valid improvement | duplicate | false positive | needs clarification]
* **Elephant Evaluation**: [Technical rationale defending or accepting the finding]
* **Proposed Action**: [CONTEST | PROPOSE FIX | DEFER]
* **Proposed Patch / Minimal Edit**:
  ```diff
  - [Original text / code to remove]
  + [Minimal replacement text / code to add]
  • Status: [open | accepted | rejected | deferred | fixed]

### Step 3: Interactive Triage Gate

Present the triage gate to the user in chat:

*"I have compiled the audit triage into `goldfish_review_report.md`. Please choose how to proceed:
- **Auto accept**: Apply all proposed fixes for confirmed defects and valid improvements.
- **Interactive breakdown**: Walk through findings one-by-one to approve, reject, or adjust each fix.
- **Continue without changes**: Proceed without applying fixes (leave findings deferred).
- **Custom instruction**: Provide specific guidance or edits."*

Yield execution immediately by calling zero tools in this turn payload and wait for user response.

### Step 4: Patch Application & Safe Editing

Upon approval:
1. Apply approved diffs using your file-editing tool (`edit_file`).
2. Verify that edits apply cleanly without mangling surrounding text.

### Step 5: Automated Verification & Regression Testing

1.  Detect and execute the relevant test command for the project (e.g., `pytest`, `npm test`, `cargo test`, `go test ./...`).
2.  If tests fail, inspect the failure log, formulate a rollback or corrective patch, and alert the user.
3.  Record test execution command and exit status in the report.

### Step 6: Post-Resolution Sync & Output

Update `goldfish_review_report.md` with final statuses (`fixed`, `rejected`, `deferred`) and return:
1. Finding-by-finding disposition summary.
2. Applied patches.
3. Verification results and test output.
4. Remaining risks or unaddressed items.

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.