Debate Research
Input Parameters
Collect from user before starting. Only topic is required; all others have defaults.
| Param | Required | Default | Description |
|---|
| INLINECODE1 | yes | — | Debate subject |
| INLINECODE2 |
no | Proponent + Opponent | 2-4 role objects:
{name, stance, model?}. Default: Proponent (argue for) and Opponent (argue against). Model inherits from global. |
|
goal | no | inferred | What question to answer |
|
audience | no | "self" | Who reads the report: self / team / public |
|
decision_type | no | "personal-choice" | personal-choice / team-standardization / market-analysis |
|
evidence_round | no | "auto" | false / true / auto (enable when topic is fact-dense) |
|
confirm_plan | no | true | Show plan and wait for user OK before execution |
|
model | no | inherit | Global subagent model; role-level override takes priority |
|
output_path | no | null | File path for report; null = return in conversation |
Implicit parameter: language — inferred from the user's topic/conversation language. All subagent prompts output in this language.
Example User Prompt
Execution Pipeline
Phase 0 — Pre-flight
Step 0a: Model reachability check
Collect all unique models (global + per-role + judge). For each unique model,
probe via sessions_spawn with a minimal one-sentence task (e.g. "Reply OK")
and model: <target>. Do NOT use curl or external HTTP — all models route
through OpenClaw's provider config.
If any probe fails:
- - If user explicitly specified the failed model → abort, report failure, suggest alternatives
- If model was default-assigned → warn user, fall back to session default model, continue
Step 0b: Plan presentation (if confirm_plan: true)
Present to user:
- - Topic
- Role × model assignment table
- Evidence round: on/off/auto (with rationale if auto)
- Estimated subagent call count
- Goal / audience / decision_type interpretation
[STOP — wait for user confirmation]
If confirm_plan: false, skip directly to Phase 1.
Phase 1 — Stance Investigation (parallel)
Spawn one subagent per role, all in parallel.
Each agent receives a prompt built from:
- - Role name + stance
- Topic
- web_search: enabled
Required output format per agent:
CODEBLOCK0
Use sessions_spawn + sessions_yield to wait for all completions.
Error handling:
- - Agent timeout → mark output
[INCOMPLETE], continue pipeline
Phase 2 — Cross Rebuttal (parallel)
Spawn one subagent per role, all in parallel.
Each agent receives:
- - Its original stance
- All other roles' Phase 1 output (cross-injected)
- web_search: disabled
Required output format per agent:
CODEBLOCK1
Word limit: 300 × number_of_opponents words per agent.
Error handling:
- - Agent timeout → mark
[INCOMPLETE], continue
Phase 2.5 — Evidence Audit (optional)
Triggered when evidence_round: true, or when auto and topic involves
measurable claims. Auto-enable heuristic: topic contains performance benchmarks,
cost comparisons, security assessments, market data, or quantitative metrics.
When in doubt with auto, skip (false positive costs more than false negative).
Spawn 1 subagent as "evidence auditor":
- - Input: all Phase 1 + Phase 2 output
- web_search: disabled
- Task: extract every factual claim, tag each as:
[official-docs] [community-feedback] [personal-blog] [no-source] [exaggerated]
- - Output: concise fact checklist
Phase 3 — Neutral Judgment
Spawn 1 subagent as neutral judge:
- - Input: Phase 1 + Phase 2 + Phase 2.5 (if available)
- web_search: disabled
- Weigh arguments by confidence scores AND source quality tags
Required output structure:
- 1. Strong arguments per side
- Exaggerated claims per side
- Shared limitations (problems neither option solves)
- Core disagreements (value-level, not just factual)
- Consensus points
- Recommendation — explicit directional advice, adapted to INLINECODE26
- Open Questions — unresolved unknowns that could change the conclusion
- Scenario selection matrix (table: scenario × recommendation × rationale)
- One-sentence summary
Phase 4 — Report Assembly
Orchestrator (main conversation) assembles all outputs into Markdown:
CODEBLOCK2
If output_path specified → write file.
Otherwise → return in conversation.
Completion States
| State | Condition | Behavior |
|---|
| INLINECODE28 | All phases completed normally | Full report |
| INLINECODE29 |
1+ agents timed out or returned
[INCOMPLETE] | Report with degradation note |
|
aborted | Model pre-check failed / user cancelled plan | No report; return error summary |
Prompt Templates
See references/prompts.md for the exact prompt templates used in each phase.
Orchestrator builds prompts dynamically from parameters + these templates.
辩论研究
输入参数
开始前从用户处收集。仅topic为必填项;其余均有默认值。
| 参数 | 必填 | 默认值 | 描述 |
|---|
| topic | 是 | — | 辩论主题 |
| roles |
否 | 支持方 + 反对方 | 2-4个角色对象:{name, stance, model?}。默认:支持方(支持论点)和反对方(反对论点)。模型继承全局设置。 |
| goal | 否 | 推断 | 需要回答的问题 |
| audience | 否 | self | 报告读者:self / team / public |
| decision_type | 否 | personal-choice | personal-choice / team-standardization / market-analysis |
| evidence_round | 否 | auto | false / true / auto(当主题事实密集时启用) |
| confirm_plan | 否 | true | 执行前显示计划并等待用户确认 |
| model | 否 | 继承 | 全局子代理模型;角色级别覆盖优先 |
| output_path | 否 | null | 报告文件路径;null = 在对话中返回 |
隐式参数: language — 从用户主题/对话语言推断。所有子代理提示均以此语言输出。
用户提示示例
- - Claude Code vs OpenCode (gpt-5.4, claude-4.6-sonnet)
执行流程
阶段 0 — 预检
步骤 0a:模型可达性检查
收集所有唯一模型(全局 + 每个角色 + 裁判)。对于每个唯一模型,
通过 sessions_spawn 使用最小单句任务(例如回复 OK)
和 model: 进行探测。不要使用 curl 或外部 HTTP — 所有模型均通过
OpenClaw 的提供者配置路由。
如果任何探测失败:
- - 如果用户明确指定了失败的模型 → 中止,报告失败,建议替代方案
- 如果模型是默认分配的 → 警告用户,回退到会话默认模型,继续
步骤 0b:计划展示(如果 confirm_plan: true)
向用户展示:
- - 主题
- 角色 × 模型分配表
- 证据轮次:开启/关闭/自动(如果自动则附理由)
- 预估子代理调用次数
- 目标/受众/决策类型解释
[停止 — 等待用户确认]
如果 confirm_plan: false,直接跳转到阶段 1。
阶段 1 — 立场调查(并行)
为每个角色生成一个子代理,全部并行。
每个代理接收基于以下内容构建的提示:
- - 角色名称 + 立场
- 主题
- web_search: 启用
每个代理的必需输出格式:
核心论点(3-5):
- [论点] | 置信度:0.0-1.0 | 来源:[official-docs/community-feedback/personal-blog/academic-paper]
对方弱点(2-3)
预测反击(1-2)
使用 sessionsspawn + sessionsyield 等待所有完成。
错误处理:
- - 代理超时 → 标记输出 [INCOMPLETE],继续流程
阶段 2 — 交叉反驳(并行)
为每个角色生成一个子代理,全部并行。
每个代理接收:
- - 其原始立场
- 所有其他角色的阶段 1 输出(交叉注入)
- web_search: 禁用
每个代理的必需输出格式:
反驳(每个对方论点一个):
- [反驳] | 置信度:0.0-1.0
最弱前提攻击:
- 识别对方单个最弱假设并挑战它 ← 苏格拉底元素
新攻击(2):
- [攻击]
字数限制: 每个代理 300 × 对手数量 字。
错误处理:
- - 代理超时 → 标记 [INCOMPLETE],继续
阶段 2.5 — 证据审计(可选)
当 evidence_round: true 时触发,或当 auto 且主题涉及
可衡量声明时触发。自动启用启发式:主题包含性能基准、
成本比较、安全评估、市场数据或定量指标。
当 auto 不确定时跳过(误报成本高于漏报)。
生成 1 个子代理作为证据审计员:
- - 输入:所有阶段 1 + 阶段 2 输出
- web_search: 禁用
- 任务:提取每个事实声明,将每个标记为:
[official-docs] [community-feedback] [personal-blog] [no-source] [exaggerated]
阶段 3 — 中立判断
生成 1 个子代理作为中立裁判:
- - 输入:阶段 1 + 阶段 2 + 阶段 2.5(如果有)
- web_search: 禁用
- 根据置信度分数和来源质量标签权衡论点
必需输出结构:
- 1. 各方的强论点
- 各方的夸大声明
- 共同局限性(双方都未解决的问题)
- 核心分歧(价值层面,不仅仅是事实层面)
- 共识点
- 建议 — 明确的定向建议,适应 decision_type
- 未解决问题 — 可能改变结论的未解决未知因素
- 场景选择矩阵(表格:场景 × 建议 × 理由)
- 一句话总结
阶段 4 — 报告组装
编排器(主对话)将所有输出组装为 Markdown:
markdown
[主题]:辩论研究报告
日期:YYYY-MM-DD
方法:多代理结构化辩论(debate-research 技能)
角色:[角色1 (模型)] | [角色2 (模型)] | ...
受众:[audience] | 决策类型:[decision_type]
完成状态:[success | degraded-success | aborted]
各方核心论点
[阶段 1 输出,按角色组织]
交叉反驳
[阶段 2 输出,按角色组织]
证据审计
[阶段 2.5 输出,或未请求]
中立判断
[阶段 3 第 1-5 部分]
建议
[阶段 3 第 6 部分]
未解决问题
[阶段 3 第 7 部分]
场景矩阵
[阶段 3 第 8 部分]
一句话总结:[阶段 3 第 9 部分]
如果指定了 output_path → 写入文件。
否则 → 在对话中返回。
完成状态
| 状态 | 条件 | 行为 |
|---|
| success | 所有阶段正常完成 | 完整报告 |
| degraded-success |
1+ 个代理超时或返回 [INCOMPLETE] | 带降级说明的报告 |
| aborted | 模型预检失败 / 用户取消计划 | 无报告;返回错误摘要 |
提示模板
参见 references/prompts.md 了解每个阶段使用的确切提示模板。
编排器根据参数和这些模板动态构建提示。