doubt-driven-development
Fungsinya
Memeriksa keputusan penting sebelum diimplementasikan. Alat ini meminta 'reviewer', yang tugasnya mencari kekurangan dan bukan menyetujui, untuk menganalisis apa yang sudah Anda tulis atau rencanakan. Ini membantu memastikan semuanya benar dan aman, terutama dalam situasi kritis.
Kapan dipakai
- βSaat membuat keputusan arsitektur yang penting untuk sebuah proyek.
- βSaat menulis kode yang kompleks atau kode yang mengubah bagian krusial.
- βSaat membuat klaim yang tidak jelas, seperti 'ini aman' atau 'ini akan berjalan cepat'.
Link skill
https://github.com/addyosmani/agent-skills/blob/main/skills/doubt-driven-development/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βTinjau keputusan ini: 'Metode autentikasi baru aman dari serangan umum.' Periksa apakah ada kekurangan atau asumsi yang keliru.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
AI memisahkan bagian penting (disebut 'artifact') dan aturan yang harus diikuti (disebut 'contract'). Lalu, AI meminta AI lain, yang dikonfigurasi untuk bersikap kritis, untuk mencari masalah pada 'artifact' ini berdasarkan 'contract'. Terakhir, masalah yang ditemukan dibandingkan dengan apa yang sudah ditulis.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
β¦
Pertanyaan umum
Kapan saya TIDAK boleh menggunakan ini?
Jangan gunakan untuk tugas sederhana seperti mengganti nama file, merapikan format kode, memindahkan file, membaca atau merangkum kode yang sudah ada, atau ketika kecepatan lebih penting daripada verifikasi.
Apa yang dimaksud dengan keputusan 'non-trivial'?
Yaitu keputusan yang melibatkan logika yang kompleks, menyentuh berbagai bagian sistem, membuat klaim yang tidak bisa diverifikasi komputer saja (misalnya keamanan), bergantung pada informasi yang bisa hilang seiring waktu, atau memiliki konsekuensi yang tidak bisa dibatalkan.
Mengapa menggunakan 'reviewer' yang hanya mencari kesalahan?
Karena lebih mudah menyetujui sesuatu yang sudah jadi daripada menemukan kesalahannya. Reviewer yang fokus mencari masalah membantu memastikan semua asumsi dipertanyakan dan potensi kesalahan ditemukan sebelum menimbulkan masalah yang lebih besar.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 107k
- Peringkat
- #771
- Lisensi
- MIT
- Diperbarui
- 13/10/2026
Komentar
- β¦
Skill lain dari repositori ini
api-and-interface-design
107kMembantu merancang API dan antarmuka yang terdefinisi dengan baik. Berguna saat merancang cara berbagai bagian perangkat lunak saling berkomunikasi.
browser-testing-with-devtools
107kMembantu agent Anda menguji kode langsung di browser sungguhan. Berguna untuk memeriksa cara kerja di lingkungan penggunaannya, serta menemukan error dan masalah performa.
ci-cd-and-automation
107kMengajarkan agent AI Anda untuk mengotomatisasi tugas berulang, mengirim proyek, dan mengelola infrastruktur.
code-review-and-quality
107kMelakukan tinjauan kode mendetail dari berbagai sisi. Berguna sebelum menggabungkan perubahan baru untuk memastikan kualitas dan mencegah masalah di kemudian hari.
Skill serupa
knowledge-capture
394kMengajari agent Anda menyimpan keputusan, preferensi, dan fakta penting ke Knowledge vault sebagai catatan singkat dengan atribusi sumber.
knowledge-claim-consolidation
394kMembantu agent Anda merapikan Knowledge vault dengan menggabungkan klaim duplikat, memindahkannya ke halaman subjek yang tepat, dan menonaktifkan klaim yang sudah usang.
knowledge-correct
394kMemungkinkan agent Anda memperbaiki atau menarik kembali klaim atau halaman Knowledge tertentu atas permintaan Anda, dengan menyimpan catatan perubahan.