git clone https://github.com/google/elephant-goldfish-model.git--- name: egm-resolve license: Apache-2.0 disable-model-invocation: true description: >- The Elephant resolution skill. Ingests flat deficiency reports from concurrent Goldfish reviewers, applies automated fixes for PROPOSE FIX items via UI multiple-choice gates, and presents interactive negotiation/re-sync checkpoints. --- # Goldfish Review: Resolve 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.md` first. ## Overview This skill instructs the agent on how to operate within the primary Elephant context window to parse flat deficiency reports from concurrent Goldfish reviewers. It defends accurate design choices, applies automated textual repairs, and manages interactive negotiation checkpoints. ## Prerequisites & Context Strategy * **Context Recommendation (Elephant Memory)**: This skill should be run in the persistent conversation session that generated the target document (the Elephant) to recall earlier reasoning and craft higher-quality fixes. ## Inputs The caller or orchestration driver provides exactly these parameters: * **`TargetFile`**: Absolute or relative path to target document. * **`LineRange`**: Exact line numbers (or `full file`). * **`FindingsList`**: Aggregated flat list of findings from Goldfish reviewers. ## Execution Workflow ### Step 1: Intake Validation & Gather Context 1. **Hybrid Execution UX**: Detect if execution arguments are present: * *Automated Mode*: If all parameters are provided, execute silently as a subprocess. * *Standalone Human Mode*: If parameters are omitted, trigger a friendly onboarding flow. Prompt for one piece of input at a time, waiting for the user's response after each turn. Once all inputs are specified, display the final setup and verify the user is ready to continue. 2. Read `TargetFile` at `LineRange` by reading it and parse the `FindingsList`. ### Step 2: Evaluate & Categorize Give each finding exactly one category: * **CONTEST**: The critique is inaccurate or relies on a misunderstanding of the codebase. Cite evidence that the reviewer could read: a file and symbol, or a decision recorded in the document. * **ESCALATE**: The critique is inaccurate, but the evidence is outside every file the reviewer could read (for example, a team convention or a verbal decision). State that fact. Do not fix the finding. Give it to the user. * **PROPOSE FIX**: The critique is valid. Define precise textual replacements or structural formatting adjustments to resolve the gap. * **DECLINE**: The finding is a Nit. Record it. Do not fix it. You can use PROPOSE FIX for a Nit if the fix is worth it. Apply these rules: * **A contest must be checkable.** "This was intentional" is not evidence. If you cannot cite evidence the reviewer could read, use ESCALATE or PROPOSE FIX. * **Do not add context only to satisfy a reviewer.** Add context when a human reader of the document needs it. If only a zero-context subagent needs it, use ESCALATE. * **Do not contest a comprehension gap.** If a fresh reader could not follow the document, the document is missing context. * **Do not change a severity.** If you think a Blocker is a Nit, CONTEST it and state the reason. * You wrote the document under review. A wish to contest is not evidence that the reviewer is wrong. ### Step 3: Report Fixes Construct the final report and save it named `goldfish_review_report.md` in the working directory (or your harness's artifact directory, if it has one) using your file-writing tool. Use this layout: ```markdown # Goldfish Annotated Review Report **Target:** `[TargetFile]` (`[LineRange]`) ## Prioritized Findings & AI Suggestions {{range findings, ordered by Severity}} ### [Issue 1] [`[ReviewerPersona]`] - Severity: [High | Medium | Low] * **Affected Scope:** [Lines Start-End]([RelativePath]#L[Start]-L[End]) ([Sub-header]) * **Discrepancy Description:** [copied from FindingsList] * **Rationale:** [copied from FindingsList] * ***AI Suggestion:*** [CONTEST | ESCALATE | PROPOSE FIX | DECLINE] * ***Justification:*** [Detailed reason] * ***Proposed Edit:*** * Location: [Line/Header] * Change: [Precise replacement string or deletion note] {{end}} ``` ### Step 4: Interactive Resolution Gate If any finding is `ESCALATE`, list those findings first in the chat message. They need the user's knowledge, not only approval. Before proceeding, output a visible chat message to the user: *"I have compiled the audit findings into `goldfish_review_report.md`. Please review the findings there and choose how you would like to proceed: - **Comment directly on the file**: Review `goldfish_review_report.md` in chat or the file and leave comments/edits to approve, reject, or contest specific items. - **Auto accept**: Reply "auto accept" to batch-apply all proposed fixes (skipping contested items). - **Continue to next phase**: Reply "continue" or "no changes" to proceed without applying fixes. - **Interactive breakdown**: Reply "interactive breakdown" for a guided, item-by-item walkthrough in chat with detailed explanations for each proposed edit or contested finding before making decisions. - **Custom instruction / Wildcard request**: Reply with any custom instruction, question, or out-of-band request."* You **MUST** immediately yield active execution by calling **zero tools** in this turn payload. You must stop execution and go idle, waiting for the human developer to comment on/edit the artifact or reply in the chat. Interpret the user's action/response as follows: - **"Auto accept" / "Accept all suggestions" / User clicks "Proceed" without contesting**: Apply all fixes where the AI suggestion was `PROPOSE FIX` directly to `TargetFile` at `LineRange` in a single batch using your file-editing tool. Any items categorized as `CONTEST`, `ESCALATE`, or `DECLINE` are explicitly bypassed. Then proceed to Step 5. - **"Continue to next phase" / "No changes"**: Do not apply any automated fixes. Then proceed to Step 5. - **"Interactive breakdown"**: Enter a sequential breakdown loop over ALL finding items (all categories except `DECLINE`): 1. For each item `i`, output a visible chat message formatting the full finding details and explanation in rich markdown: ```markdown ### Breakdown Item [i]: [Issue Title] [`[ReviewerPersona]`] * **Scope:** [Lines Start-End]([RelativePath]#L[Start]-L[End]) ([Sub-header]) * **Description:** [Description] * **AI Suggestion:** [CONTEST | ESCALATE | PROPOSE FIX] * **Explanation & Justification:** [Detailed reason and background explaining why the fix is proposed or why the finding is contested] * **Proposed Edit:** [Precise replacement text or deletion note] ``` Then prompt the user in chat for their decision on this item (calling **zero tools** and going idle): * If `PROPOSE FIX`: Ask the user to reply with **Accept proposed fix**, **Skip / ignore**, or **Discuss**. * If `CONTEST`: Ask the user to reply with **Skip / agree with contest**, **Overrule contest (propose fix)**, or **Discuss**. * If `ESCALATE`: Ask the user to reply with **Confirm (no change)**, **Add the fact to the document**, or **Discuss**. 2. Record the user's decisions in an internal memory checklist (e.g., *Item 1: Accepted*, *Item 2: Ignored*, *Item 3: Overruled*). **Do NOT call any file editing tools during this sequential loop.** 3. Once all items have been decided, summarize the accepted edits, execute them using your file-editing tool, and proceed to Step 5. - **Custom instruction / Out-of-band edit**: If the user provides targeted instructions, apply them and proceed. ### Step 5: Post-Resolution Synchronization & Exit 1. **Re-verify Lines**: If changes were made to `TargetFile`, verify that the file remains structurally coherent and valid markdown. 2. Mark the report as resolved (add a `Status: resolved` line at the top). 3. **Handoff**: Exit cleanly back to the caller (such as `egm-review-loop`) with the count of accepted fixes, contested items, escalated items, declined items, and remaining unaddressed issues.
1. **Prepare the Dispute Summary:** Clearly outline the conflict, including the parties involved, the core disagreement, and any relevant context (e.g., timeline, policies, or past attempts to resolve it). Tip: Include specific examples of behaviors or statements that escalated the dispute. 2. **Use the Prompt Template:** Paste the dispute summary into the prompt template, replacing [DISPUTE_SUMMARY]. For complex disputes, break the summary into bullet points for clarity. 3. **Review the AI’s Analysis:** The AI will provide core issues, underlying interests, and solutions. Cross-reference these with your notes to ensure accuracy. Tip: If the AI misses a key detail, refine the dispute summary and regenerate. 4. **Customize the Mediation Plan:** Adapt the step-by-step plan to fit your team’s dynamics or organizational culture. For example, if your team prefers async communication, replace live talking points with written drafts. 5. **Implement and Iterate:** Use the compromise options as a starting point for discussions. After the first mediation session, revisit the AI’s output to adjust the plan based on new insights. Tip: Track action items in a shared document (e.g., Notion, Google Docs) to hold parties accountable.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/google/elephant-goldfish-model/tree/main/skills/egm-resolveCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as a conflict resolution specialist. Review the following dispute scenario: [DISPUTE_SUMMARY]. Identify the core issues, the underlying interests of each party, and potential solutions that address all concerns. Provide a step-by-step mediation plan with specific talking points for each party. Suggest 3-5 compromise options that could satisfy both sides without requiring external intervention.
Dispute Summary: Two senior engineers, Alex (Backend) and Jamie (Frontend), are in a stalemate over the implementation of a new authentication system. Alex insists on using OAuth 2.0 for security compliance, while Jamie argues that JWT (JSON Web Tokens) would be more efficient and reduce latency by 30%. Both have dug in their heels, with Alex citing company security policies and Jamie pointing to recent performance bottlenecks. The project timeline is at risk, and the team is divided. Core Issues: 1. Security vs. Performance: Alex prioritizes compliance with industry standards (OAuth 2.0), while Jamie prioritizes system responsiveness and developer experience (JWT). 2. Timeline Pressure: The current delay is causing a 2-week slip in the sprint, which could impact the quarterly release. 3. Communication Breakdown: Neither party has fully explored the trade-offs or considered hybrid solutions. Underlying Interests: - Alex: Avoid security breaches, maintain compliance with company policies, and ensure long-term maintainability. - Jamie: Deliver a high-performance system, reduce technical debt, and meet sprint goals to avoid team burnout. Potential Solutions: 1. Hybrid Approach: Implement OAuth 2.0 for authentication but use JWT for session management, reducing latency by 20% while maintaining security. This leverages the strengths of both protocols. 2. Phased Rollout: Deploy JWT for internal testing environments first, with OAuth 2.0 for production. This allows Jamie to validate performance gains while Alex ensures security policies are met. 3. Third-Party Audit: Bring in a neutral security consultant to review both approaches and provide data-driven recommendations. Mediation Plan: 1. **Opening (5 min):** Acknowledge both parties' expertise and the importance of their contributions. Frame the discussion as collaborative problem-solving. - Talking Point for Alex: 'Your focus on security is critical for our customers' trust. Let’s explore how we can balance that with performance.' - Talking Point for Jamie: 'Your insights on system efficiency are invaluable. How can we align that with our security requirements?' 2. **Issue Identification (10 min):** Have each party summarize their concerns in 2-3 sentences without interruption. Paraphrase to ensure understanding. 3. **Exploring Solutions (15 min):** Guide them through the hybrid approach and phased rollout options. Ask open-ended questions like, 'What would need to be true for this solution to work for both of you?' 4. **Commitment (5 min):** Ask each party to commit to one actionable next step, such as reviewing the hybrid proposal or scheduling a follow-up with the security team. 5. **Follow-Up:** Schedule a 30-minute follow-up in 48 hours to review progress and adjust the plan as needed. Compromise Options: - **Option 1:** OAuth 2.0 for authentication + JWT for session management (hybrid). - **Option 2:** JWT for internal tools, OAuth 2.0 for customer-facing features. - **Option 3:** Implement JWT now with a security review scheduled for next sprint to ensure compliance. - **Option 4:** Use a managed authentication service (e.g., Auth0) that supports both protocols, reducing implementation overhead. - **Option 5:** Split the authentication system into two phases: Phase 1 (JWT for MVP), Phase 2 (OAuth 2.0 for full compliance).
skills-collection
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan