egm-resolve
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGoldfish Review: Resolve
Goldfish Review:Resolve
When running in Codex or ChatGPT Work, first read Codex integration.
In Claude Code or Cowork, read first.
${CLAUDE_PLUGIN_ROOT}/docs/claude.md在 Codex 或 ChatGPT Work 中运行时,请先阅读 Codex 集成。
在 Claude Code 或 Cowork 中,请先阅读 。
${CLAUDE_PLUGIN_ROOT}/docs/claude.mdOverview
概述
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.
本 skill 指导 Agent 如何在主要的 Elephant 上下文窗口中运行,以解析由并发 Goldfish 审查者生成的扁平化缺陷报告。它会为准确的设计决策进行辩护、应用自动化文本修复,并管理交互式协商检查点。
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.
- 上下文建议(Elephant Memory):此 skill 应在生成目标文档(Elephant)的持久化对话会话中运行,以回顾先前的推理过程并制定更高质量的修复方案。
Inputs
输入
The caller or orchestration driver provides exactly these parameters:
- : Absolute or relative path to target document.
TargetFile - : Exact line numbers (or
LineRange).full file - : Aggregated flat list of findings from Goldfish reviewers.
FindingsList
调用方或编排驱动程序恰好提供以下参数:
- :目标文档的绝对路径或相对路径。
TargetFile - :准确的行号(或
LineRange)。full file - :来自 Goldfish 审查者的聚合扁平化发现列表。
FindingsList
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.
-
Readat
TargetFileby reading it and parse theLineRange.FindingsList
-
混合执行 UX:检测是否提供了执行参数:
- 自动化模式:如果所有参数均已提供,则以子进程方式静默执行。
- 独立人工模式:如果未提供参数,则启动友好的引导流程。每次提示用户输入一项内容,并在每轮结束后等待用户回复。指定所有输入后,显示最终配置并确认用户已准备继续。
-
读取中
TargetFile对应的内容,并解析LineRange。FindingsList
Step 2: Evaluate & Categorize
第 2 步:评估与分类
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.
为每条发现指定且仅指定一个类别:
- CONTEST:批评意见不准确,或基于对代码库的误解。引用审查者能够查阅的证据:文件和符号,或文档中记录的决定。
- ESCALATE:批评意见不准确,但相关证据不在审查者能够查阅的任何文件中(例如团队惯例或口头决定)。说明这一事实。不要修复该发现。将其交给用户。
- PROPOSE FIX:批评意见有效。定义精确的文本替换内容或结构格式调整,以解决所发现的问题。
- DECLINE:该发现属于 Nit。记录它。不要修复。如果修复值得进行,也可以使用 PROPOSE FIX。
应用以下规则:
- CONTEST 必须可核验。“这是有意为之”不是证据。如果无法引用审查者能够查阅的证据,请使用 ESCALATE 或 PROPOSE FIX。
- **不要仅为迎合审查者而添加上下文。**当文档的人类读者需要上下文时再添加。如果只有零上下文 subagent 需要它,则使用 ESCALATE。
- **不要对理解缺口提出 CONTEST。**如果全新读者无法理解文档,则说明文档缺少上下文。
- **不要更改严重性。**如果你认为 Blocker 属于 Nit,请对其提出 CONTEST 并说明原因。
- 你就是被审查文档的作者。想要提出 CONTEST 并不构成审查者错误的证据。
Step 3: Report Fixes
第 3 步:报告修复
Construct the final report and save it named
in the working directory (or your harness's artifact directory, if it has one)
using your file-writing tool. Use this layout:
goldfish_review_report.mdmarkdown
undefined构建最终报告,并使用文件写入工具将其以 为文件名保存在工作目录中(如果 harness 有 artifact 目录,则保存在其中),使用以下布局:
goldfish_review_report.mdmarkdown
undefinedGoldfish Annotated Review Report
Goldfish Annotated Review Report
Target: ()
[TargetFile][LineRange]Target: ()
[TargetFile][LineRange]Prioritized Findings & AI Suggestions
Prioritized Findings & AI Suggestions
{{range findings, ordered by Severity}}
{{range findings, ordered by Severity}}
[Issue 1] [[ReviewerPersona]
] - Severity: [High | Medium | Low]
[ReviewerPersona][Issue 1] [[ReviewerPersona]
] - Severity: [High | Medium | Low]
[ReviewerPersona]- Affected Scope: Lines Start-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}}
undefined- Affected Scope: Lines Start-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}}
undefinedStep 4: Interactive Resolution Gate
第 4 步:交互式解决关卡
If any finding is , list those findings first in the chat message.
They need the user's knowledge, not only approval.
ESCALATEBefore proceeding, output a visible chat message to the user: *"I have compiled
the audit findings into . Please review the findings there and choose how you would like to
proceed:
goldfish_review_report.md- Comment directly on the file: Review in chat or the file and leave comments/edits to approve, reject, or contest specific items.
goldfish_review_report.md - 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 wasdirectly to
PROPOSE FIXatTargetFilein a single batch using your file-editing tool. Any items categorized asLineRange,CONTEST, orESCALATEare explicitly bypassed. Then proceed to Step 5.DECLINE -
"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-
For each item, output a visible chat message formatting the full finding details and explanation in rich markdown:
imarkdown### 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 : Ask the user to reply with Accept proposed fix, Skip / ignore, or Discuss.
PROPOSE FIX - If : Ask the user to reply with Skip / agree with contest, Overrule contest (propose fix), or Discuss.
CONTEST - If : Ask the user to reply with Confirm (no change), Add the fact to the document, or Discuss.
ESCALATE
- If
-
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.
-
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.
如果任何发现属于 ,请在聊天消息中优先列出这些发现。它们需要用户掌握的相关知识,而不仅仅是批准。
ESCALATE继续之前,向用户输出一条可见的聊天消息:*"我已将审查发现整理到 中。请在该文件中查看这些发现,并选择希望如何继续:
goldfish_review_report.md- 直接评论文件:在聊天中或文件中审查 ,并留下评论或编辑,以批准、拒绝或对具体项提出 CONTEST。
goldfish_review_report.md - 全部自动接受:回复 "auto accept",批量应用所有建议修复(跳过 项)。
CONTEST - 继续到下一阶段:回复 "continue" 或 "no changes",不应用修复并继续执行。
- 交互式拆解:回复 "interactive breakdown",在聊天中逐项引导浏览,并在作出决定前详细解释每项建议编辑或 发现。
CONTEST - 自定义指令 / Wildcard 请求:回复任何自定义指令、问题或带外请求。"*
你必须在本轮载荷中调用零个工具,立即交还主动执行权。你必须停止执行并进入空闲状态,等待人类开发者对 artifact 进行评论或编辑,或在聊天中回复。
按以下方式解释用户的操作或回复:
-
回复 "auto accept" / "Accept all suggestions",或用户在未提出 CONTEST 的情况下点击 "Proceed":使用文件编辑工具,将 AI 建议为的所有修复直接批量应用到
PROPOSE FIX的TargetFile范围内。凡归类为LineRange、CONTEST或ESCALATE的项均明确跳过。然后进入第 5 步。DECLINE -
“继续到下一阶段” / "No changes":不应用任何自动化修复。然后进入第 5 步。
-
“交互式拆解”:进入针对所有发现项的顺序拆解循环(所有类别,除外):
DECLINE-
对于每个项目,输出一条可见的聊天消息,并使用丰富的 Markdown 格式呈现完整的发现详情与解释:
imarkdown### 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]然后在聊天中提示用户决定如何处理该项目(调用零个工具并进入空闲状态):- 如果 :要求用户回复 接受建议修复(Accept proposed fix)、跳过/忽略(Skip / ignore) 或 讨论(Discuss)。
PROPOSE FIX - 如果 :要求用户回复 跳过/同意 CONTEST(Skip / agree with contest)、推翻 CONTEST 并提出修复(Overrule contest (propose fix)) 或 讨论(Discuss)。
CONTEST - 如果 :要求用户回复 确认且不修改(Confirm (no change))、将事实添加到文档中(Add the fact to the document) 或 讨论(Discuss)。
ESCALATE
- 如果
-
将用户的决定记录在内部记忆清单中(例如:第 1 项:已接受、第 2 项:已忽略、第 3 项:已被推翻)。在此顺序循环期间,不要调用任何文件编辑工具。
-
所有项目处理完毕后,总结已接受的编辑,使用文件编辑工具执行这些编辑,然后进入第 5 步。
-
-
自定义指令 / 带外编辑:如果用户提供了针对性指令,请应用这些指令并继续执行。
Step 5: Post-Resolution Synchronization & Exit
第 5 步:解决后同步与退出
- Re-verify Lines: If changes were made to , verify that the file remains structurally coherent and valid markdown.
TargetFile - Mark the report as resolved (add a line at the top).
Status: resolved - Handoff: Exit cleanly back to the caller (such as ) with the count of accepted fixes, contested items, escalated items, declined items, and remaining unaddressed issues.
egm-review-loop
- 重新验证行范围:如果对 做了更改,请验证该文件在结构上仍然连贯且属于有效的 Markdown。
TargetFile - 将报告标记为已解决(在顶部添加 行)。
Status: resolved - 移交:干净地退出并返回调用方(例如 ),同时报告已接受的修复数、
egm-review-loop项数、CONTEST项数、ESCALATE项数以及仍未处理的问题数。DECLINE