Chuyển đến nội dung
Skillpedia
Công việc và dự án107k · #771

doubt-driven-development

Skill này làm gì

Kiểm tra các quyết định quan trọng trước khi thực hiện. Nó nhờ một “người rà soát” (được giao nhiệm vụ tìm lỗi thay vì phê duyệt) xem xét những gì bạn đã viết hoặc lên kế hoạch. Điều này giúp đảm bảo mọi thứ đúng và an toàn, nhất là trong các tình huống quan trọng.

Khi nào nên dùng

  • ✓Khi bạn đưa ra một quyết định kiến trúc quan trọng cho dự án.
  • ✓Khi bạn viết code phức tạp hoặc code thay đổi các phần quan trọng.
  • ✓Khi bạn đưa ra một khẳng định không hiển nhiên, như “cái này an toàn” hoặc “cái này sẽ chạy tốt”.

Liên kết skill

https://github.com/addyosmani/agent-skills/blob/main/skills/doubt-driven-development/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/addyosmani/agent-skills/blob/main/skills/doubt-driven-development/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Xem xét quyết định này: “Phương thức xác thực mới an toàn trước các tấn công thông thường.” Kiểm tra xem có lỗ hổng hoặc giả định sai nào không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

AI tách phần quan trọng (“artifact”) và các quy tắc nó phải tuân theo (“contract”). Sau đó, nó nhờ một AI khác, được cấu hình để hoài nghi, tìm vấn đề trong “artifact” dựa trên “contract”. Cuối cùng, nó so sánh các vấn đề tìm được với những gì đã viết.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

…
Câu hỏi thường gặp

Khi nào KHÔNG nên dùng công cụ này?

Đừng dùng cho các tác vụ đơn giản như đổi tên file, định dạng code, di chuyển file, đọc hoặc tóm tắt code có sẵn, hoặc khi tốc độ quan trọng hơn việc kiểm chứng.

Thế nào là quyết định “không tầm thường”?

Đó là quyết định liên quan đến logic phức tạp, tác động nhiều phần của hệ thống, đưa ra khẳng định mà máy tính không thể tự kiểm chứng (như bảo mật), phụ thuộc vào thông tin có thể bị mất theo thời gian, hoặc có hậu quả không thể đảo ngược.

Vì sao dùng “người rà soát” chỉ tìm lỗi?

Vì việc phê duyệt một thứ đã làm xong dễ hơn là tìm lỗi trong đó. Một người rà soát tập trung vào tìm vấn đề giúp đặt câu hỏi cho mọi giả định và phát hiện lỗi trước khi chúng gây hậu quả lớn hơn.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
107k
Vị trí xếp hạng
#771
Giấy phép
MIT
Cập nhật
13/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự