SuperAPI AI Directory

adversarial-polish

General & other

View repository

Updated 10-15 23:32

About this skill

Adversarial Manuscript Polishing

Replace subjective judgment with adversarial roles and blind evaluation, letting the manuscript naturally converge to its optimal state through the "critique → rewrite → synthesize → blind evaluation" loop.

Core Philosophy

The problem with single-pass polishing: the model either over-accommodates (you say change it, so I change it), over-criticizes (criticizing for the sake of criticizing), or over-compromises (offending neither side). The result is that the manuscript is swayed by the wording of the prompt rather than by content quality.

The solution of adversarial polishing: split each role into an independent perspective, each seeing only the necessary information, and then let blind evaluation decide who wins. The winner becomes the new baseline, and the loop continues until no one can improve it further.


⚠️ Execution Model: Sub-Agent Isolation (Core Mechanism)

All the value of adversarial polishing is built on context isolation. If all roles share the same context window, the model will inevitably be contaminated by the outputs of preceding roles—a strawman critique will make the rewriter over-accommodate, the synthesizer will favor the version seen later, and the judges will be hinted by the rewrite explanations. This is not a problem of "lack of focus"; it is a fundamental architectural flaw.

When Sub-Agent capability is available (Claude Code / Cowork) — the preferred approach

Each role must be generated (spawned) as an independent sub-agent. This is a hard requirement, not a suggestion.

Specific approach:

  1. Strawman → spawn a sub-agent, whose promptonlycontains: the task description + the text of the current version A + the strawman role instructions (see the prompt template below). It does not contain any critiques, rewrites, or voting information from any historical round.

  2. Rewriter → spawn anew sub-agent (after the strawman is done), whose promptonlycontains: the task description + the current version A + the strawman critique report + the rewriter role instructions. It does not contain any information about the synthesizer or the judges.

  3. Synthesizer → spawn anew sub-agent (after the rewriter is done), whose promptonlycontains: the task description + "Version A" and "Version B" (A and B randomly shuffled and labeled) + the synthesizer role instructions.It does not contain the strawman critique report(the synthesizer should not know which version is the one "revised after being criticized").

  4. Three judges → simultaneously spawn 3 independent sub-agents (executed in parallel). Each judge's promptonlycontains: the task description + the three versions (randomly labeled X/Y/Z, shuffled in order, with all trailing rewrite explanations and synthesis explanations removed) + the judge role instructions. The three judges are completely independent and invisible to one another.

Key principles:

  • The sub-agent receives only the information listed above,never give it more
  • The strawman, rewriter, and synthesizer areserial(the latter depends on the former's output)
  • The three judges areparallel(independent of each other, spawned simultaneously)
  • Each sub-agent is used once and discarded, not reused

Sub-Agent Prompt Templates

Strawman prompt:

你是一位挑剔的资深中文科技内容编辑。你的任务是审阅一篇文章,只找问题,不给修复方案。

## 任务描述
{task_prompt}

## 待审阅文章
{current_A_text}

## 你的职责
[...稻草人角色指令全文,见下方"角色 1"章节...]

请直接输出批评报告,不要输出任何前言。

Rewriter prompt:

你是一位有能力的中文科技内容作者。你需要根据一份批评报告改写一篇文章。

## 任务描述
{task_prompt}

## 原文
{current_A_text}

## 批评报告
{strawman_critique}

## 你的职责
[...改写者角色指令全文,见下方"角色 2"章节...]

请输出完整的改写版本,不要输出任何前言。

Synthesizer prompt:

你是一位客观的中文科技内容编辑。你面前有同一任务的两个版本,需要取长补短合成最优版本。

## 任务描述
{task_prompt}

## 版本甲
{randomly_assigned_version_1}

## 版本乙
{randomly_assigned_version_2}

## 你的职责
[...综合者角色指令全文,见下方"角色 3"章节...]

请输出完整的综合版本,不要输出任何前言。

Judge prompt (same template for each judge, spawned independently):

你是一位盲审评委。你需要从三个版本中选出最好的一个。你不知道这些版本的作者或来历。

## 任务描述
{task_prompt}

## 版本 X
{randomly_labeled_version_X}

## 版本 Y
{randomly_labeled_version_Y}

## 版本 Z
{randomly_labeled_version_Z}

## 你的职责
[...评委角色指令全文,见下方"角色 4"章节...]

请直接输出你的排名和理由,不要输出任何前言。

When there is no Sub-Agent capability (Claude.ai web version) — fallback plan

Claude.ai has no sub-agent; all roles execute in the same context. This means true context isolation cannot be achieved. To simulate the isolation effect as much as possible:

  • Before switching roles each time, explicitly state "Now think as [role name], considering only the following information: [list the visible information]"
  • Strictly reference only content within that role's "visible information" scope
  • In the judge stage, random labels (X/Y/Z) must be used and rewriting instructions removed
  • Honestly inform the user: when executed in Claude.ai, the effect is weaker than in an environment with sub-agents, because the context cannot be truly isolated. If the manuscript is very important, it is recommended to run this skill in Claude Code.

Workflow

Step Zero: Preparation

  1. Obtain the manuscript

    • Already in context → use directly
    • User uploads a file → use directly
    • User provides a URL → use web_fetch to retrieve it
  2. Create a working directory

    <文章目录>/adversarial-polish/
    ├── round-0/
    │   └── A-original.md          # 原始稿件
    ├── round-1/
    │   ├── strawman-critique.md   # 稻草人批评
    │   ├── B-rewrite.md           # 改写版本
    │   ├── AB-synthesis.md        # 综合版本
    │   ├── judge-ballots.md       # 三位评委投票
    │   └── round-summary.md       # 本轮总结
    ├── round-2/
    │   └── ...
    ├── evolution-log.md           # 全程进化日志
    └── final/
        ├── final-article.md       # 最终定稿
        └── polish-report.md       # 打磨报告
    
  3. Confirm the task prompt

    • Confirm with the user or automatically generate a clear "task description" (task prompt) to serve as the anchor for all roles
    • Example: "Polish this technical blog post about AI Agent architecture to a publishable level; the target readers are Chinese internet users with some technical background"
    • This task prompt is visible to all roles and is the only shared context
    • The task prompt should include writing style requirements (if any), such as the target reader profile, language style preferences, terminology handling conventions, etc.
  4. Save the original manuscriptto round-0/A-original.md


Loop begins

Each loop round includes four roles + one convergence judgment.

Role 1: Strawman

⚡ Execution method: spawn as an independent sub-agent (using the strawman prompt template above)

Identity: A picky senior reader/editor.

Visible information: Task description + current version A (nothing more; do not look at historical criticism and revisions).

Responsibilities:

  • Only find problems, do not give fixes
  • Be as strict as peer review, but focus on the work, not the person
  • Cover the following dimensions:
    • Structure: Is the logic coherent? Is the paragraph order optimal? Is anything redundant or missing?
    • Expression: Does it have an AI flavor? Is there any filler? How is the rhythm?
    • Reader experience: Does the opening grab attention? Are there points in the middle where attention wanders? Is the ending powerful?
    • Information density: Is there any padding? Is there information overload?
    • Persuasiveness: Are there any flaws in the argument's logic? Are there any unsupported assertions?
  • Assign a severity level to each issue: 🔴 Critical / 🟡 Significant / 🟢 Minor

Output format:

# 稻草人批评报告 - 第 N 轮

## 总体印象(2-3 句话)

## 问题清单

### 🔴 致命问题
1. [具体位置] [问题描述]
2. ...

### 🟡 显著问题
1. [具体位置] [问题描述]
2. ...

### 🟢 轻微问题
1. [具体位置] [问题描述]
2. ...

## 稻草人总结
- 致命问题 X 个,显著问题 Y 个,轻微问题 Z 个
- 最关键的一个问题是:[...]

Save to: round-N/strawman-critique.md


Role 2: Rewriter (Author B)

⚡ Execution method: after the Strawman is finished, spawn as a new independent sub-agent (using the above Rewriter prompt template)

Identity: A capable author who has been given a revision task.

Visible information: Task description + current Version A + Strawman critique report.

Responsibilities:

  • Review the critiques one by one, judging which ones are valid and which are nitpicking
  • Revise in response to the valid critiques
  • Preserve the strengths and the author's voice of the original text
  • The extent of the revision depends on the severity of the critiques: critical issues must be resolved, minor issues handled as appropriate

Output: The complete revised version (not a diff, but the full article).

Append a revision note at the end of the article:

---
## 改写说明
- 采纳批评 N 条,忽略 M 条
- 主要改动:[列出 3-5 个关键修改]
- 忽略理由:[解释为什么某些批评不采纳]

Save to: round-N/B-rewrite.md


Role 3: Synthesizer

⚡ Execution method: after the Rewriter is finished, spawn as a new independent sub-agent (using the above Synthesizer prompt template)

Identity: An objective editor who has two versions in front of them and needs to take the best from each.

Visible information: Task description + Version A + Version B (randomly labeled "Version Jia" and "Version Yi", with the order shuffled to avoid position bias).

Responsibilities:

  • Compare the two versions paragraph by paragraph
  • Take the better wording from each paragraph
  • If the two versions each have strengths and weaknesses, merge them creatively
  • Maintain consistency and coherence throughout the text

Output: The complete synthesized version.

Append a synthesis note at the end of the article:

---
## 综合说明
- 版本甲贡献:[哪些段落/表达来自甲]
- 版本乙贡献:[哪些段落/表达来自乙]
- 原创融合:[哪些地方做了创造性合并]

Save to: round-N/AB-synthesis.md


Role 4: Blind Judging Panel (Judge Panel)

⚡ Execution method: simultaneously spawn 3 independent sub-agents to run in parallel (using the above Judge prompt template). The three judges are completely isolated from one another and cannot see each other.

Identity: Three independent judges who care only about "which version best completed the task".

Visible information: Task description + three versions (randomly labeled X/Y/Z, with the order shuffled and all author information and revision notes hidden).

Important: The versions submitted to the judges must have the "revision note" and "synthesis note" at the end removed, keeping only the article body.

Judging criteria:

  1. Task completion (whether it met the requirements of the task prompt)
  2. Reader experience (whether it reads smoothly and is engaging)
  3. Information density and quality of expression
  4. Overall completeness (whether it can be published directly)

Each judge ranks the versions independently and gives reasons, then the results are aggregated using Borda count:

# 盲评投票 - 第 N 轮

## 评委 1
排名:[X > Y > Z] 或其他顺序
理由:[2-3 句话]

## 评委 2
排名:[...]
理由:[...]

## 评委 3
排名:[...]
理由:[...]

## Borda 计分
(第一名 2 分,第二名 1 分,第三名 0 分)

| 版本 | 评委 1 | 评委 2 | 评委 3 | 总分 |
|------|-------|-------|-------|------|
| X    | ?     | ?     | ?     | ?    |
| Y    | ?     | ?     | ?     | ?    |
| Z    | ?     | ?     | ?     | ?    |

## 结果
- 胜出版本:[X/Y/Z](揭晓为 [A/B/AB])
- 得分差距:[大/小/微弱]

Save to: round-N/judge-ballots.md


Convergence check

After each round ends, check the convergence condition:

  • If A (the original version) wins → streak count +1
    • streak = 2 → Converged! End the loop
    • streak < 2 → continue to the next round (A unchanged)
  • If B or AB wins → streak resets to zero, the winning version becomes the new A, and the next round continues

Safety valve: Maximum of 4 rounds. If convergence is still not reached after 4 rounds, take the highest-scoring version in history as the final result.

At the end of each round, generate a round summary:

# 第 N 轮总结

- 稻草人发现:🔴 X 个 / 🟡 Y 个 / 🟢 Z 个
- 改写者采纳:M 条批评
- 盲评结果:[版本] 胜出(Borda 分 X 分)
- 收敛状态:streak = N / 未收敛,继续
- 当前最佳版本:[来源说明]

Save to: round-N/round-summary.md


After the loop ends

Generate an evolution log

Summarize the evolution process of all rounds and save to evolution-log.md:

# 稿件进化日志

## 任务描述
[task prompt]

## 进化轨迹

### 第 1 轮
- 稻草人核心批评:[...]
- 改写关键改动:[...]
- 盲评结果:[版本] 胜出
- streak: 0 → N

### 第 2 轮
...

## 收敛分析
- 总轮次:N
- 收敛方式:[A 连续两轮胜出 / 达到最大轮次]
- 最终版本来源:[第 X 轮的 A/B/AB]
- 关键进化点:[稿件在哪些方面有了质的提升]

Generate the final files

  1. Final draft (final/final-article.md): clean article body text, without any explanations
  2. Polishing report (final/polish-report.md):
    • Summary of key differences between the original text vs the final draft
    • Main improvement points (3-5)
    • Specific comparison examples for each improvement (original text → final draft)
    • Quality assessment:
      • H (Hook): Can the title and opening grab the reader?
      • K (Knowledge): Is there anything gained from reading it? Is the information density sufficient?
      • R (Resonance): Are there points of resonance? Can it trigger "I think so too"?

Output to outputs/

Copy the following files to the output directory:

  • final-article.md — Final draft
  • polish-report.md — Polishing report
  • evolution-log.md — Evolution log

Use present_files to display the final draft and polishing report.


Important principles

Role isolation (the most important principle)

When there are sub-agents: each role must be spawned as an independent sub-agent. This is the foundation of adversarial polishing; see the "Execution model" section above for details.

Each sub-agent only receives content within the scope of its "visible information":

  • Straw manOnly sees the task + current version, does not consider "how to fix it", only focuses on "what is wrong"
  • RewriterSees the task + current version + criticism, may disagree with the criticism, and does not have to accept it wholesale
  • SynthesizerOnly sees the task + two versions (randomly labeled), and does not know which is the original and which is the rewritten version
  • JudgesOnly see the task + three versions (randomly labeled + explanatory text removed), and do not know the origin of any version
  • The three judges are completely isolated from one another, spawned in parallel, mutually invisible

Preserve the author's voice

All roles must respect the original text's core viewpoints, attitude, and style. Polishing is optimizing expression, not rewriting content. The rewriter and synthesizer are first of all loyal to the original author's intent.

Honest evaluation

Judges must evaluate truthfully and must not "choose the new version just to show value". If the original version is indeed better, choose the original version. Truly good content can withstand adversarial testing.

All intermediate products are retained

Every output of every role is saved as an independent file. This is not only for traceability, but also allows users to intervene at any stage:

  • Think a certain criticism from the straw man is unreasonable? You can intervene
  • Think some intermediate version is actually better? You can extract it
  • Want to understand how the manuscript got better step by step? Look at the evolution log

Execution strategy

Quick mode vs full mode

If the user explicitly says "quick polish" or the manuscript is relatively short (< 1000 words), it can be reduced:

  • Judges reduced from 3 to 2
  • Maximum rounds reduced from 4 to 2
  • Convergence condition lowered from streak=2 to streak=1

Full mode is used by default.

User intervention points

After each round in the loop ends, briefly report the results of that round to the user. By default, automatically continue to the next round unless:

  • The user says "stop", "pause", or "let me take a look"
  • The user says "use version B from round X"
  • The user has an objection to a certain criticism

Progress prompts

At the start of each round, tell the user the current status:

Round 2 begins (streak=0, the combined AB version won the previous round and has been replaced as the new baseline) The straw man is reviewing the new baseline...


Notes

  • If the manuscript quality is already very high, it may converge in round 1. This is normal—it means the manuscript withstood adversarial testing
  • If it still has not converged after 4 rounds, it means there may be a stylistic preference disagreement rather than a quality issue. In this case, output the highest-scoring version and explain this in the report