跳到正文
cccskills
免费在 GitHub 公开

adversarial-debate

N-round opposing-stance debates for trade-off analysis. Assigns pro/con roles to agents, runs structured debate rounds with quality scoring, and produces a moderator synthesis with confidence-rated recommendation. Generalizable to architecture, technology, security, and design decisions.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(10)

  • SKILL.md8.5 KB
  • commands/adversarial-debate.md2.4 KB
  • hooks/post-execute.cjs1.8 KB
  • hooks/pre-execute.cjs3.5 KB
  • references/research-requirements.md2.5 KB
  • rules/adversarial-debate.md1.6 KB
  • schemas/input.schema.json1.4 KB
  • schemas/output.schema.json2.5 KB
  • scripts/main.cjs4.4 KB
  • templates/implementation-template.md1.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Adversarial Debate

Overview

Runs a structured N-round debate between two opposing agents (pro and con) on any decision-requiring topic, then synthesizes a moderator recommendation. Built for architectural decisions, technology choices, security trade-offs, and design reviews — anywhere strong opinions exist and the right answer is non-obvious.

When to Use

  • Architecture decision records (ADRs) needing structured justification
  • Technology selection (e.g., Redis vs Postgres, REST vs GraphQL)
  • Security trade-off analysis (e.g., strict vs permissive auth policy)
  • Design review of competing approaches
  • Any HIGH/EPIC task where the planner identifies genuine disagreement among specialists

Do not use for:

  • Settled best practices (where there is consensus)
  • Simple implementation tasks
  • Decisions already made and documented in ADRs

Iron Law

NO RECOMMENDATION WITHOUT CITED DEBATE EVIDENCE

The moderator's synthesis MUST reference specific arguments made during rounds. A recommendation that ignores debate content is invalid.

Debate Protocol

Pre-Debate: Stance Assignment

Before any rounds begin, the invoking agent MUST define:

  1. Topic — one clear decision question (not open-ended)
  2. Pro stance — what the PRO agent advocates for
  3. Con stance — what the CON agent argues against / alternative
  4. Number of rounds — default 3, max 5
  5. Success criteria — what a good recommendation looks like

Example:

Topic: Should we use event sourcing for the order service?
Pro stance: Yes — event sourcing provides audit trail and temporal queries
Con stance: No — event sourcing adds complexity; CRUD with snapshots is sufficient
Rounds: 3

Round Structure

Each round follows this fixed sequence:

Step 1: PRO Argument

PRO agent argues its stance with:
- 1 primary argument (specific, concrete)
- 1 supporting piece of evidence (metric, case study, or first-principles reasoning)
- 1 anticipated objection pre-addressed

Step 2: CON Rebuttal

CON agent responds with:
- Direct refutation of PRO's primary argument (must engage it — no deflection)
- 1 counter-argument from CON's stance
- 1 counter-evidence or challenge to PRO's evidence

Step 3: Round Score

Score each round immediately using this rubric (0–10 per dimension):

DimensionDescription
SpecificityArguments use concrete examples, not vague claims
EvidenceClaims backed by data, precedent, or first principles
Rebuttal QualityDirectly addresses opposing argument, no deflection
RelevanceArguments stay on the stated topic

Round Score = mean(Specificity, Evidence, Rebuttal Quality, Relevance)

Track cumulative scores per agent across rounds.

Final Synthesis (Moderator)

After all rounds, the moderator agent produces a structured synthesis:

## Debate Summary

**Topic:** [restate topic]
**Rounds completed:** N
**PRO total score:** X.X/10
**CON total score:** X.X/10

## Key Arguments

**Strongest PRO argument:** [cite round + argument]
**Strongest CON argument:** [cite round + argument]

## Decision Factors

List 3-5 factors that should determine which stance wins in context:

1. Factor: [e.g., team expertise] → Favors: [PRO/CON/neutral]
2. ...

## Recommendation

**Decision:** [clear recommendation — not "it depends"]
**Confidence:** [High / Medium / Low]
**Rationale:** [2-3 sentences citing specific debate evidence from rounds]

## Conditions / Caveats

[Any conditions under which the recommendation should be revisited]

Workflow

Step 0: Load Context and Memory

# Check for prior debate results on same topic
grep -r "adversarial-debate" C:/dev/projects/agent-studio/.claude/context/memory/decisions.md 2>/dev/null | tail -5

Check .claude/context/memory/decisions.md for prior ADRs on same topic. If a prior debate exists, acknowledge it and note whether conditions have changed.

Step 1: Parse and Validate Input

Validate input against schemas/input.schema.json:

node .claude/skills/adversarial-debate/hooks/pre-execute.cjs '{"topic":"...","proStance":"...","conStance":"...","rounds":3}'

Expected output: { "valid": true } or error listing missing fields.

Step 2: Run Debate Rounds

For each round 1..N:

  1. PRO agent produces its argument (following Round Structure above)
  2. CON agent produces rebuttal (must reference PRO's specific argument)
  3. Score the round using the rubric — output a score table
  4. Record round to scripts/main.cjs output buffer

Step 3: Moderator Synthesis

After all rounds, produce the Final Synthesis following the template in templates/implementation-template.md.

The moderator MUST:

  • Reference at least 2 specific round arguments by round number
  • State a single clear recommendation (not "it depends without conditions")
  • Assign a confidence level (High/Medium/Low) with justification

Step 4: Persist Decision

Append result to .claude/context/memory/decisions.md:

echo "## [$(date +%Y-%m-%d)] Adversarial Debate: {TOPIC}
- Recommendation: {DECISION}
- Confidence: {CONFIDENCE}
- Rounds: {N}
- Cite: {KEY_EVIDENCE_SUMMARY}" >> .claude/context/memory/decisions.md

Step 5: Emit Observability Event

const { sendEvent } = require('.claude/tools/observability/send-event.cjs');
sendEvent({
  tool_name: 'adversarial-debate',
  agent_id: process.env.AGENT_ID || 'unknown',
  session_id: process.env.SESSION_ID || 'unknown',
  outcome: 'success',
});

Enforcement Hooks

Input validated against schemas/input.schema.json before execution. Output contract defined in schemas/output.schema.json.

Pre-execution hook: hooks/pre-execute.cjs — validates topic, stances, rounds range (1-5). Post-execution hook: hooks/post-execute.cjs — emits observability event via send-event.cjs.

Anti-Patterns

  • Never let agents pick their own stances — stance drift produces muddled debates
  • Never skip round scoring — unscored debates allow moderator bias in synthesis
  • Never produce "it depends" recommendations without explicit conditions listed
  • Never use more than 5 rounds — beyond round 3, new arguments rarely emerge
  • Never invoke debate for trivial decisions — overhead not justified for settled questions

Related Skills

  • llm-council — parallel multi-LLM synthesis (complementary: debate is sequential, council is parallel)
  • advanced-elicitation — meta-cognitive reasoning for single-agent analysis
  • plan-generator — use debate output as an ADR input to plan-generator
  • sequential-thinking — structured problem decomposition for the topic before debate

Memory Protocol

Before starting: Read .claude/context/memory/decisions.md for prior ADRs on related topics.

After completing: Append structured summary to .claude/context/memory/decisions.md with date, topic, recommendation, confidence, and key evidence citations.

Do not write directly to patterns.json, gotchas.json, or open-findings.json — use MemoryRecord tool.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio422026年7月14日 更新

Use when you want to improve response quality through meta-cognitive reasoning. Applies 15+ reasoning methods to reconsider and refine initial outputs.

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio422026年7月14日 更新

Force adversarial code review stance that eliminates confirmation bias — reviewer must find issues or re-analyze

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio422026年7月14日 更新

Creates specialized AI agents on-demand when no existing agent matches a request. Use when the Router cannot find a suitable agent for a task. Enables self-evolution by generating persistent agents.

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio422026年7月14日 更新

LLM-as-judge evaluation framework with 5-dimension rubric (accuracy, groundedness, coherence, completeness, helpfulness) for scoring AI-generated content quality with weighted composite scores and evidence citations

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio422026年7月14日 更新

The Agent Tool Contract — 5 principles for designing tools agents call reliably: predictable signature, rich errors, token-efficient output, idempotency, graceful degradation. Includes anti-pattern table with 8 common mistakes.

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio422026年7月14日 更新

查看 oimiragieo 的全部技能

报告此技能的问题