← 返回 Skills 市场
dexzopiclone

Duel Loop

作者 dexzopiclone · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
82
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install duel-loop
功能描述
彻底断绝主代理长期对话中累积的偏见与情绪对产出的裹挟,确保每次产出忠实于需求本身,不再随对话越长越偏离预期。你只负责提需求和最终验收。传统单agent反复调prompt、人工审核输出的工作流,在这里被架构级消解了。角色隔离的双子代理对抗架构:执行和QA子代理运行在完全架空的环境中,看不到主代理的会话上下文、用户画...
使用说明 (SKILL.md)

Self Evolution

双子代理执行-审核流水线。主代理负责调度和验收,不直接产出敏感内容。

\x3C!-- baseDir = /root/.openclaw/workspace/skills/duel-loop -->

触发

用户创建/修改规则、方案、协议、策略,且明确要求走 QA 流程。关键词:走QA审核QA质量检查评审review

核心原则

主代理禁止直接执行以下类型的内容生成

  • 拟定规则/方案/协议文本
  • 总结、归纳、建议类输出
  • 任何高度依赖上下文质量的创造性或分析性工作

主代理的唯一职责:调度、传递上下文、验收、打回

流程总览

Dispatch(执行子代理) → Review(QA子代理) → Accept/Reject(主代理)
                                              ↓ Reject
                                        Dispatch(修订子代理) → Review(QA子代理) → ...
                                              ↓ 5次未通过
                                              CIRCUIT BREAK → 报告用户

Step 1: Dispatch(派发执行)

将任务委派给执行子代理(sessions_spawnruntime="subagent"mode="run")。

执行子代理 prompt 要求

  • 包含任务描述(做什么)
  • 包含必要的上下文(相关文件路径、背景信息、约束条件)
  • 不包含主代理的完整会话历史(避免污染,只传递任务相关上下文)
  • 输出写入 drafts/\x3Cname>-v1.md

上下文传递规则

  • 只传递与任务直接相关的文件内容,不传递完整会话上下文
  • 如果需要引用会话中的具体信息,由主代理提取关键片段后注入 prompt
  • 执行子代理是隔离环境,不应感知到主代理的身份/用户画像/memory

Step 2: Review(QA 审核)

派 QA 子代理审核执行子代理的产出。QA prompt 模板见 templates/qa-review-prompt.md

评分维度(满分 10)

维度 分值 评估标准
根因分析深度 2 是否追溯到问题本质而非仅描述表象;是否识别出因果链条和递进关系
方案完备性 3 是否覆盖所有已识别的子问题;边界条件、异常路径、默认行为是否明确
领域无关性 2 规则/方案是否不绑定特定实现细节,具有通用可复用性
可操作性 2 是否有明确的执行步骤或判断标准,而非模糊原则;执行者能否无歧义地落实
副作用评估 1 是否评估了方案引入的新风险/开销/兼容性问题,并给出控制措施

Step 3: Accept/Reject(验收)

主代理对 QA 结果进行验收。

通过条件:QA 评分 10/10

打回条件:QA 评分 \x3C 10/10

打回时,主代理将 QA 反馈(评分 + 扣分点 + 改进建议)作为输入,派发新的执行子代理进行修订。修订子代理必须收到:

  • 上一版本草稿路径
  • QA 审核的完整评分和扣分点
  • 明确指令:"根据以下 QA 反馈修订方案"

修订后文件版本号递增:\x3Cname>-v2.md

Step 4: Approve(落地)

10/10 通过后,主代理将草稿内容落地到目标生产文件。

熔断机制

5 次验收不通过 → 触发熔断

熔断后主代理必须:

  1. 停止自动修订循环
  2. 向用户输出:
    • 总共经历的轮次和每轮评分趋势
    • QA 在最后一轮提出的剩余扣分点
    • 最后一版草稿的文件路径
    • 建议用户人工介入的原因(持续未通过的共性模式,如维度定义模糊、约束矛盾等)
  3. 等待用户决策:接受当前版本 / 手动调整后继续 / 放弃

QA Prompt 构造

派发 QA 子代理时,读取模板后填入实际参数:

read {baseDir}/templates/qa-review-prompt.md

占位符替换:

  • {{DRAFT_PATH}} → 草稿文件绝对路径
  • {{ROUND}} → 当前轮次(1-5)
  • {{PREV_CONTEXT}} → 上一轮 QA 评分和扣分点(第 1 轮为空)
  • {{TASK_BRIEF}} → 用户原始需求的简要描述(由主代理从会话中提取,不超过 200 字)

与主代理上下文的关系

角色 职责 看到的上下文
主代理 调度、验收、打回、落地、熔断处理 完整会话上下文
执行子代理 产出方案/修订文本 仅任务描述 + 相关文件内容
QA 子代理 审核方案质量 仅草稿文件 + 评分维度 + 上一轮反馈

执行子代理和 QA 子代理之间没有直接通信,全部通过主代理中转。

目录结构

skills/self-evolution/
├── SKILL.md                          # 本文件
└── templates/
    └── qa-review-prompt.md           # QA 子代理 prompt 模板

草稿存放于 workspace 根目录:drafts/\x3Cname>-v\x3Cn>.md

安全使用建议
The design is coherent, but review these operational risks before installing: - Drafts are written to workspace/drafts/<name>-vN.md; ensure that workspace file permissions, retention, and backups meet your privacy requirements (sensitive content may be stored there). - The main agent has full conversation context and is responsible for extracting the TASK_BRIEF: ensure prompts/automation explicitly redact or truncate sensitive data before injecting into subagent prompts. - Test the workflow with non-sensitive examples to verify that the extraction and isolation behave as documented (subagents should not receive extraneous context). - Audit and lock the templates/qa-review-prompt.md file (or review it frequently) to prevent tampering that could change QA behavior. If you need stronger guarantees (no disk persistence, automatic redaction, or encrypted storage), request modifications to the skill to implement them before using with sensitive data.
功能分析
Type: OpenClaw Skill Name: duel-loop Version: 1.0.0 The 'duel-loop' skill implements a structured multi-agent workflow designed to improve output quality and reduce bias through a dual-agent execution and review pipeline. It uses isolated sub-agents for content generation and QA scoring, with a clear iterative process and circuit-breaker logic described in SKILL.md and templates/qa-review-prompt.md. No indicators of data exfiltration, malicious execution, or unauthorized access were found.
能力评估
Purpose & Capability
The skill implements a dispatch → review → accept loop for producing and QA'ing documents. It requests no binaries, env vars, or installs, and the files it reads/writes (templates and drafts/*) are consistent with the stated purpose.
Instruction Scope
SKILL.md limits what is passed to subagents (only task-related fragments, TASK_BRIEF ≤ 200 chars) and describes isolated runtimes. This stays within the described scope. Note: the main agent still holds full session context and is responsible for extracting/redacting fragments — that creates a normal risk surface where sensitive data could be injected into drafts if the main agent extracts it.
Install Mechanism
Instruction-only skill with no install spec and no code files. No downloads or external packages; lowest install risk.
Credentials
No environment variables, credentials, or config paths are requested. The declared requirements are proportional to a purely orchestration/QA prompt template skill.
Persistence & Privilege
always is false and the skill relies on runtime subagents (sessions_spawn) which is consistent with its orchestration role. Autonomous invocation is allowed by platform default but is not combined with other elevated privileges here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install duel-loop
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /duel-loop 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
初始发布:双子代理对抗QA流水线,角色隔离+5维10分制+熔断机制
元数据
Slug duel-loop
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Duel Loop 是什么?

彻底断绝主代理长期对话中累积的偏见与情绪对产出的裹挟,确保每次产出忠实于需求本身,不再随对话越长越偏离预期。你只负责提需求和最终验收。传统单agent反复调prompt、人工审核输出的工作流,在这里被架构级消解了。角色隔离的双子代理对抗架构:执行和QA子代理运行在完全架空的环境中,看不到主代理的会话上下文、用户画... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 82 次。

如何安装 Duel Loop?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install duel-loop」即可一键安装,无需额外配置。

Duel Loop 是免费的吗?

是的,Duel Loop 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Duel Loop 支持哪些平台?

Duel Loop 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Duel Loop?

由 dexzopiclone(@dexzopiclone)开发并维护,当前版本 v1.0.0。

💬 留言讨论