首页 / 全部技能 / 基础工具与工作流 / doubt-driven-development
基础工具与工作流 · addyosmani/agent-skills

doubt-driven-development

Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when you want every assumption cross-examined before proceeding, when stress-testing a plan for hidden failure modes, when correctness matters more than speed, when working in unfamiliar code, when stakes are high (production auth, security-sensitive logic, a high-stakes migration, irreversible operations), or any time a confident output would be cheaper to verify now than to debug later.

L1 基础 · 登记来源即可V1 已固定Dual-pass Audit
💬 对话试用 (预览)
Author addyosmaniGitHub addyosmani/agent-skills ↗Stars 113872License MITCommit 301b02b12b
管控等级描述 skill 的能力与建议配套的管控措施,不代表质量或安全认证,也不表示可用或不可用。是否使用由用户和管理者决定。不同 agent 宿主对权限的约束各不相同,请勿假定宿主一定会提供安全兜底。第三方 skill 版权归原作者,使用风险由使用者自行承担。

1实现原理 · 为什么它能做到

对所有非琐碎决策在立项生效前强制引入全新上下文的对抗性审查(Fresh-context Adversarial Review)

skills/doubt-driven-development/SKILL.md
A confident answer is not a correct one. Long sessions accumulate context that quietly turns assumptions into "facts" without anyone noticing. Doubt-driven development is the discipline of materializing a fresh-context reviewer — biased to **disprove**, not approve — before any non-trivial output stands.
这里在做什么:打破长对话带来的虚假自信与盲目假设累积,拉起全新无偏见的审查者寻找证伪漏洞

严格限定应用范围于非平凡决策(Non-trivial decisions),防止陷入每步都怀疑导致无法交付的泥潭

skills/doubt-driven-development/SKILL.md
If you doubt every keystroke, you ship nothing. The skill applies only to non-trivial decisions as defined above.
这里在做什么:对重命名、格式化、单行改动等操作明确免除质疑,只对分支逻辑、跨边界或不可逆变更启动循环

实施标准五步怀疑闭环(CLAIM → EXTRACT → DOUBT → RECONCILE → STOP)

skills/doubt-driven-development/SKILL.md
Doubt cycle: - [ ] Step 1: CLAIM — wrote the claim + why-it-matters - [ ] Step 2: EXTRACT — isolated artifact + contract, stripped reasoning - [ ] Step 3: DOUBT — invoked fresh-context reviewer with adversarial prompt - [ ] Step 4: RECONCILE — classified every finding against the artifact text - [ ] Step 5: STOP — met stop condition (trivial findings, 3 cycles, or user override)
这里在做什么:定义结构化的质疑审查全流程,确保输入剥离主观推理并限定停止条件

信息剥离铁律:仅向审查者传递产物与契约(ARTIFACT + CONTRACT),严禁传入主观声明(CLAIM)与思考过程

skills/doubt-driven-development/SKILL.md
**Pass ARTIFACT + CONTRACT only. Do NOT pass the CLAIM.** Handing the reviewer your conclusion biases it toward agreement. The reviewer must independently determine whether the artifact satisfies the contract.
这里在做什么:防止审查模型受到提示词引导产生顺从心理(Sycophancy),确保独立核实

采用纯对抗性 Prompt(Adversarial Prompt)重载角色设定,强制只找缺陷与证伪

skills/doubt-driven-development/SKILL.md
**The adversarial prompt above takes precedence over the persona's default response shape.** Personas like `code-reviewer` are written to produce balanced verdicts with both strengths and weaknesses; doubt-driven needs issues-only output.
这里在做什么:压制普通审查角色的夸赞与平衡倾向,使其聚焦未声明假设与边界失效

规范跨模型二级升级机制(Cross-model escalation),强制在交互会话中向用户询问并使用只读沙箱

skills/doubt-driven-development/SKILL.md
**Interactive sessions: always offer. Never silently skip.** **Step 1: Ask the user** After the single-model review in Step 3 above, but before RECONCILE, pause and ask: > *"Single-model review complete. Want a cross-model second opinion? Options: Gemini CLI, Codex CLI, manual external review (you paste it elsewhere), or skip."*
这里在做什么:当单模型盲区可能造成严重后果时,主动征得用户授权并利用外部 CLI(如 Codex/Gemini)交叉复核

四级优先级意见对齐规则(Contract misread > Valid+actionable > Valid trade-off > Noise)与 3 轮上限硬阻断

skills/doubt-driven-development/SKILL.md
For each finding, classify in this **precedence order** (first matching class wins): 1. **Contract misread**… 2. **Valid + actionable**… 3. **Valid trade-off**… 4. **Noise**… Stop when: - Next iteration returns only trivial or already-considered findings, **or** - 3 cycles completed (escalate to user, don't grind a fourth alone)
这里在做什么:确立主控 Agent 对审查结果的分类判断权,并用最多 3 轮防止产生无限死循环

2核心能力

01非平凡高危决策前置识别与声明提取(CLAIM)
02最小审查单元与去主观推理契约提取(EXTRACT)
03隔离上下文对抗性评审提示编排(DOUBT)
04跨模型 CLI(Codex/Gemini)安全沙箱升维与用户授权机制
05严格按优先级归类的审查意见消化对齐(RECONCILE)
063 轮有界防死循环与用户裁决阻断(STOP)

4管控建议与判定依据

建议配套管控措施
面向 Agent
可自动加载
面向管理者
登记来源与版本
审计说明: Skill 自身目录仅包含单个指南规范 SKILL.md,无任何可执行代码、网络通信或文件读写动作。虽提及外部可选的 codex/gemini CLI,但属于宿主环境可选调用,且文档强制要求只读沙箱与用户前置授权,自身严格落入 green 纯指令级别

5第二遍独立确认

  • [ok] 零自执行脚本核实 — 目录内无任何 scripts/ 或二进制文件,仅有单个 SKILL.md 文档,无任何代码执行行为
  • [ok] 信息剥离原则核验 — SKILL.md 第 134 行严格规定仅传入 ARTIFACT 与 CONTRACT,严禁把主观 CLAIM 传入以防偏差
  • [ok] 跨模型 CLI 交互授权核验 — 第 146-180 行详细规定了必须在交互会话询问用户、必须验证 CLI 是否可用、且必须通过 stdin 和只读沙箱传递
  • [ok] 意见对齐四级分类核验 — 第 200-206 行清晰规范了 Contract misread > Valid+actionable > Valid trade-off > Noise 的优先级
  • [ok] 硬性 3 轮终止条件核验 — 第 213-220 行明确限定 3 轮未收敛必须停机上报用户,防止死循环耗费 token

6结论

  • 直击长会话积累盲目自信的软肋,建立独立的对抗性证伪机制打破「假装全懂」的幻觉
  • 极其严格的信息隔离纪律,只给产物与契约不给推理结论,从机制上根除模型的顺从偏见(Sycophancy)
  • 安全成熟度高,对跨模型 CLI 提出强力的只读沙箱要求与严密的命令行转义/stdin 规范
  • 适合: 适用于涉及高危资产(如生产鉴权逻辑、复杂并发控制、数据迁移脚本、公共 API 破坏性变更)的前期架构推导与实施前核验
    不适合: 不适用于简单的变量重命名、代码格式化、单行直观 Bug 修复等日常琐碎改动,也不适合在嵌套 Subagent 内部强行调用
    💬 Online Trial Chat Sandbox

    Preview this skill in an interactive chat playground. Generic LLM evaluation trial.

    💬 Open Chat Trial (Preview)
    Under construction · Generic sandbox trial
    Install Agent-Ready
    ① Accelerated Distribution dl.bestaiskill.com
    Option A · Direct Zip Download⚡ Download doubt-driven-development (Zip)
    Edge-accelerated mirror via dl.bestaiskill.com
    Option B · Copy Guide for Agent
    install.json
    agent 读 JSON 指南后会自动从本站下载安装,无需更多说明。
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit 301b02b12b.