ワンクリックで
adversarial-dev
Adversarial Generator/Evaluator development loop. Use when a feature needs rigorous QA or self-review isn't catching bugs.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Adversarial Generator/Evaluator development loop. Use when a feature needs rigorous QA or self-review isn't catching bugs.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | adversarial-dev |
| description | Adversarial Generator/Evaluator development loop. Use when a feature needs rigorous QA or self-review isn't catching bugs. |
| user_invocable | true |
| argument-hint | <feature description or plan file> |
| origin | Orchestrator — earned through direct practice (see commit history) |
| source_version | 2026-04-18 |
GAN-inspired development loop with structurally separated roles. The key insight: an agent reviewing its own code has a structural sycophancy problem. Adversarial separation fixes this.
Source: R47 Archon steal (adversarial-dev workflow). Proven in production.
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ NEGOTIATOR │ ──→ │ GENERATOR │ ──→ │ EVALUATOR │
│ │ │ │ │ │
│ Define │ │ Build code │ │ Attack code │
│ acceptance │ │ to satisfy │ │ Score 1-10 │
│ criteria │ │ contract │ │ per criterion│
└──────────────┘ └──────────────┘ └──────────────┘
↑ │
│ ┌─── PASS (all ≥ 7) ──→ DONE │
│ │ │
└── FAIL ─┘── retry ≤ 3 ────────────────┘
$ARGUMENTSWrite contract to .claude/adversarial/{feature-slug}/contract.json:
{
"feature": "Feature Name",
"criteria": [
{
"name": "short-kebab-name",
"description": "Specific, testable description — what to verify and how",
"threshold": 7
}
]
}
Rules for good criteria:
tsc --noEmit")Read the contract. Implement the feature.
Generator rules:
feat({feature}): {description}When done, signal: GENERATION_COMPLETE
Switch to Evaluator role. You are now adversarial.
Evaluator rules — CRITICAL:
Score each criterion 1-10:
| Score | Meaning |
|---|---|
| 9-10 | Exceptional — handles unmentioned edge cases |
| 7-8 | Solid — meets criterion as stated |
| 5-6 | Partial — fails some edge cases |
| 3-4 | Weak — major gaps |
| 1-2 | Broken — doesn't work |
PASS threshold: ALL scores ≥ 7. No curve grading. No "close enough."
Write feedback to .claude/adversarial/{feature-slug}/feedback-round-{N}.json:
{
"passed": false,
"scores": {"criterion-name": 6, "another": 8},
"feedback": [
{
"criterion": "criterion-name",
"score": 6,
"details": "Specific: file:line, exact error, reproduction command",
"suggestion": "What to fix and why"
}
],
"overall": "What worked, what didn't, what must be fixed"
}
If PASSED (all scores ≥ 7):
If FAILED:
Uses Disk State Loop pattern.
State file: .claude/adversarial/{feature-slug}/state.json
{
"phase": "negotiating|generating|evaluating|complete|failed",
"retry": 0,
"max_retries": 3,
"pass_threshold": 7,
"status": "running"
}
| Don't | Why | Do Instead |
|---|---|---|
| Evaluator modifies code | Defeats adversarial separation | Evaluator writes feedback, Generator fixes |
| "Good enough" scoring | Defeats the purpose | Hard 7/10 threshold, no exceptions |
| Generator reads feedback before generating | Biases initial implementation | Generate first, evaluate after |
| Skip criteria definition | No objective measure of quality | Always negotiate contract first |
| Evaluate your own code charitably | Structural sycophancy | Actively try to break it |
Call from other skills or directly:
/adversarial-dev implement user authentication with OAuth2
For complex features, combine with /prime first:
/prime governance
/adversarial-dev add retry logic to executor with exponential backoff
Evidence-gated completion check. Use before committing, creating PRs, or claiming work is done. Pairs with verification-spec at task start.
Systematic knowledge extraction from open-source projects. Use when: user shares a repo/link to study, says 偷师/steal/学习/研究, or wants to analyze another project's patterns for adoption.
Launch a real interactive claude CLI session in a target directory (typically a worktree) with a pre-seeded prompt. Use when the current session cannot absorb the task context — e.g., N parallel worktree jobs that would blow the context window, or when you need the user to watch progress in a visible terminal. Each spawned session runs independently in its own Windows Terminal tab.
FileNotFound recovery protocol. Before reporting a missing-file error, suggest near-misses by basename similarity (difflib threshold 0.4) so typos and stale paths fail loudly with actionable hints.
Paste-by-reference guard for Edit calls. When new_string would echo >30 lines of existing file content, use {{file:path:start:end}} reference instead and expand before submission.
File-IO protocol for parent ↔ subagent communication. Parent writes input.txt + context.json, subagent appends to output.txt with [ROUND END] sentinels. Used with Monitor tool for live observation.