Home / All Skills / Workflow & Core Tools / doubt-driven-development
Workflow & Core Tools · addyosmani/agent-skills

doubt-driven-development

Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when stress-testing a plan for hidden failure modes, when correctness matters more than speed, when working in unfamiliar code, or when stakes are high (production auth, security logic, high-stakes migrations).

L1 Basic · Source registration onlyV1 Commit-PinnedDual-pass Audit
💬 Chat Trial
Author addyosmaniGitHub addyosmani/agent-skills ↗Stars 113872License MITCommit 301b02b12b
Control levels describe skill capabilities and suggested control measures; they do not represent quality or safety certifications, nor do they dictate usability. Usage decisions rest entirely with users and administrators. Different agent hosts apply varying constraints; do not assume hosts provide automatic protection. Third-party skill copyrights belong to their original authors. Use at your own risk.

1How It Works & Mechanism

Strict five-stage adversarial loop: CLAIM -> EXTRACT -> DOUBT -> RECONCILE -> STOP.

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.
Systematic falsification protocol.

Complete context isolation: reviewer sees only outputs and contracts, not internal rationalizations.

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.
Eliminates confirmation bias.

Anti-sycophancy defense: reviewers are explicitly incentivized to identify non-obvious failure modes.

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)
Breaks false confidence.

Explicit noise filtering: distinguishes substantive blockers from theoretical nitpicks.

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.
Prevents review paralysis.

Mandatory stop conditions: halts execution when irreconcilable contradictions emerge.

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.
Deterministic safety circuit.

规范跨模型二级升级机制(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 轮防止产生无限死循环

2Core Capabilities

01Adversarial falsification of high-stakes plans and code
02Context-isolated blind review orchestration
03Confirmation bias and sycophancy mitigation
04Deterministic halt gates for unresolved critical doubts
05严格按优先级归类的审查意见消化对齐(RECONCILE)
063 轮有界防死循环与用户裁决阻断(STOP)

4Recommended Governance & Evidence

Suggested Controls for Safe Operation
For Agent Runtime
Can be auto-loaded
For Administrators
Register source and version
Audit Notes: Pure methodology protocol document; optionally coordinates read-only CLI under explicit user control.

5Second-Pass Verification

  • [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

6Verdict & Scenarios

  • Directly combats the fatal flaw of LLM confidence accumulation in long sessions
  • Context isolation ensures reviews are genuinely independent rather than agreeable echoes
  • Protects production systems from catastrophic overlooked edge cases
  • Best for: Essential for high-risk software changes: production authentication, database migrations, cryptographic logic, and distributed state machines.
    Not for: Not for trivial one-line fixes, simple renamings, or formatting tweaks where overhead exceeds risk.
    💬 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
    Agents automatically download and verify mirrors from this JSON guide.
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit 301b02b12b.