doubt-driven-development
できること
重要な決定を実装する前にチェックします。「レビュアー」に、承認するのではなく欠陥を見つけることを目的として、あなたが書いたものや計画したものを分析してもらいます。特に重大な場面で、すべてが正しく安全であることを確認するのに役立ちます。
使う場面
- ✓プロジェクトの重要なアーキテクチャ上の決定をするとき
- ✓複雑なコードや重要な部分を変更するコードを書くとき
- ✓「これは安全だ」「これは高速に動作する」といった自明でない主張をするとき
スキルのリンク
https://github.com/addyosmani/agent-skills/blob/main/skills/doubt-driven-development/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“次の決定をレビューしてください:「新しい認証方式は一般的な攻撃に対して安全である。」欠陥や誤った前提がないか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
AIは、重要な部分(「アーティファクト」)と、それが従うべきルール(「コントラクト」)を分けます。次に、批判的な視点を持つよう設定した別のAIに、このコントラクトに基づいてアーティファクトの問題点を探させます。最後に、見つかった問題を元の内容と照らし合わせます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Doubt-Driven Development
Overview
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.
This is not /review. /review is a verdict on a finished artifact. This is an in-flight posture: non-trivial decisions get cross-examined while course-correction is still cheap.
When to Use
A decision is non-trivial when at least one of these is true:
- It introduces or modifies branching logic
- It crosses a module or service boundary
- It asserts a property the type system or compiler cannot verify (thread safety, idempotence, ordering, invariants)
- Its correctness depends on context the future reader cannot see
- Its blast radius is irreversible (production deploy, data migration, public API change)
Apply the skill when:
- About to make an architectural decision under uncertainty
- About to commit non-trivial code
- About to claim a non-obvious fact ("this is safe", "this scales", "this matches the spec")
- Working in code you don't fully understand
When NOT to use:
- Mechanical operations (renaming, formatting, file moves)
- Following a clear, unambiguous user instruction
- Reading or summarizing existing code
- One-line changes with obvious correctness
- Pure tooling operations (running tests, listing files)
- The user has explicitly asked for speed over verification
If you doubt every keystroke, you ship nothing. The skill applies only to non-trivial decisions as defined above.
Loading Constraints
This skill is designed for the main-session orchestrator, where Step 3 (DOUBT, detailed below) can spawn a fresh-context reviewer.
- Do NOT add this skill to a persona's
skills:frontmatter. A persona that follows Step 3 would spawn another persona — the orchestration anti-pattern explicitly forbidden by../../references/orchestration-patterns.md("personas do not invoke other personas"). - If you find yourself applying this skill from inside a subagent context (where Claude Code prevents nested subagent spawn): the preferred path is to surface to the user that doubt-driven cannot run nested and let the main session handle it. As a last resort only, a degraded self-questioning fallback exists — rewrite ARTIFACT + CONTRACT as a fresh self-prompt with a hard mental separator from your prior reasoning, and walk Steps 1–5. This is not fresh-context review (you carry your own context with you), so flag the result as degraded and prefer escalation whenever the user is reachable.
The Process
Copy this checklist when applying the skill:
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)
Step 1: CLAIM — Surface what stands
Name the decision in two or three lines:
CLAIM: "The new caching layer is thread-safe under the
read-heavy workload described in the spec."
WHY THIS MATTERS: a race here corrupts user data and is
hard to detect in QA.
If you can't write the claim that compactly, you have a vibe, not a decision. Surface it before scrutinizing it.
Step 2: EXTRACT — Smallest reviewable unit
A fresh-context reviewer needs the artifact and the contract, not the journey.
- Code: the diff or the function — not the whole file
- Decision: the proposal in 3–5 sentences plus the constraints it has to satisfy
- Assertion: the claim plus the evidence that supposedly supports it (kept distinct from the Step 1 CLAIM block, which is the orchestrator's hypothesis under scrutiny)
Strip your reasoning. If you hand over conclusions, you'll get back validation of your conclusions. The unit must be small enough that a reviewer can hold it in mind in one read — if it's a 500-line PR, decompose first.
Step 3: DOUBT — Invoke the fresh-context reviewer
The reviewer's prompt must be adversarial. Framing decides the answer.
Adversarial review. Find what is wrong with this artifact.
Assume the author is overconfident. Look for:
- Unstated assumptions
…
よくある質問
どのような場合に使うべきではありませんか?
ファイル名の変更、コードの整形、ファイルの移動、既存コードの読み取りや要約といった単純な作業や、検証よりも速さが重要な場合には使わないでください。
「自明でない」決定とは何ですか?
複雑なロジックを含む決定、システムの複数の部分に関わる決定、コンピュータだけでは検証できない主張(セキュリティなど)をする決定、時間が経つと失われるかもしれない情報に依存する決定、または取り返しのつかない結果をもたらす決定のことです。
なぜ欠陥を探すことだけを目的とするレビュアーを使うのですか?
すでに完成したものを承認するより、欠陥を見つけるほうが難しいからです。問題を見つけることに集中したレビュアーは、すべての前提に疑問を投げかけ、大きな問題になる前に潜在的な誤りを発見する助けになります。
詳細
作者による元の説明
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 operatio
repo: addyosmani/agent-skills
人気
- GitHubのスター
- 107k
- ランキング
- #771
- ライセンス
- MIT
- 更新日
- 2026/10/13
コメント
- …
このリポジトリの他のスキル
api-and-interface-design
107k明確に定義されたAPIやインターフェースの作成を支援します。ソフトウェアの異なる部分がどのように通信するかを設計する際に役立ちます。
browser-testing-with-devtools
107k実際のブラウザでコードを直接テストできるよう支援します。実際の利用環境での動作を確認し、エラーやパフォーマンスの問題を見つけるのに役立ちます。
ci-cd-and-automation
107kAIエージェントに、反復的な作業の自動化、プロジェクトのリリース、インフラの管理を教えます。
code-review-and-quality
107k複数の観点から詳細なコードレビューを行います。新しい変更をマージする前に、品質を確保し、将来の問題を防ぐのに役立ちます。