# /doubt-driven-development: Have a fresh reviewer try to break each risky decision

Source: https://trendhub.net/skills/addyosmani-agent-skills/doubt-driven-development
Skill folder: https://github.com/addyosmani/agent-skills/tree/main/skills/doubt-driven-development
Pack: Addy Osmani's Agent Skills (https://trendhub.net/skills/addyosmani-agent-skills)
Works with: Claude Code, Any agent via the skills CLI, Codex, Gemini CLI, Antigravity CLI, Command Code

Doubt-driven development makes the agent state each non-trivial decision as a short claim, pull out the smallest piece of code or reasoning that supports it, and hand only that piece plus its contract to a fresh-context reviewer told to find faults. The agent then sorts every finding itself, and the loop ends after trivial findings, three rounds or your go-ahead.

## When to use it

- A change touches production auth, a data migration, a public API or anything hard to undo.
- You are working in unfamiliar code and the agent sounds more certain than it should.
- The agent is about to assert that something is thread-safe, idempotent or matches the spec.

## How it works

1. **Claim**: The agent writes the decision in two or three lines along with why getting it wrong would hurt.
2. **Extract**: It isolates the diff or proposal and its contract, removing its own reasoning but keeping any caller, guard or test that contradicts it.
3. **Doubt**: It sends that unit, without the claim, to a fresh-context reviewer using an adversarial prompt, and in interactive sessions always offers a second opinion from Gemini CLI, Codex CLI or a manual review.
4. **Reconcile**: It re-reads the artifact and files each finding as a contract misread, a real fix, an accepted trade-off or noise.
5. **Stop**: It ends when findings turn trivial, after three cycles, or when you say ship it, and escalates to you instead of looping further.

## What it steers the agent away from

- Asking a reviewer whether the work is good, which invites agreement
- Treating a reviewer's objection as automatically correct without checking the artifact
- Running an external model CLI without your explicit approval for that exact command

## What it can touch

Spawns a fresh-context subagent from the main session and, only with your approval each time, runs gemini or codex in a read-only mode by piping a prompt file through stdin; it reads code but does not need to change files on its own.

## Pairs well with

- `/code-review-and-quality`
- `/source-driven-development`
- `/test-driven-development`

## Questions

### Does it run on every change?

No. It applies to decisions that add branching, cross a module boundary, rely on properties a compiler cannot check, or are hard to reverse, and skips renames, formatting and simple instructions.

### How is it different from a code review?

A review judges finished work before merge; this skill questions individual decisions while the work is still in progress and cheap to change.
