agentleFS
Gzyms69Gzyms69/agent-setup-bundle/skills/doubt-driven-development/SKILL.md

doubt-driven-development

Skill0 starsChanged 3 months agoMITView on GitHub

ADVERSARIAL VERIFICATION GATE. Subjects architectural decisions, migrations, and code changes to a fresh-context adversarial review to challenge false confidence. MUST ACTIVATE when correctness matters more than speed, when stakes are high (security, irreversible ops, core refactors), or before asserting non-obvious technical facts.

28 other projects use a version of this, 3 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use constraint-driven-development, using-agent-skills and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • vinvcnSkill

    constraint-driven-development

    把一个项目的质量线确立为书面契约,并阻止 agent 悄悄降低它。通过访谈确定用户在意哪些维度,当用户心里没有数字时提供合理的默认阈值,把一切记录进 CONSTRAINTS.md,并盯住 diff 中质量线被削弱的迹象——新增的 @ts-ignore 或 eslint-disable 抑制注释、被跳过或删除的测试、被剥掉的断言、未实现的 stub、被调低的阈值。当没有任何质量线被写下来时使用;当用户说 "set up constraints" 或 "define our standards" 时;当用户希望把他们在意的维度——无障碍性、Web 性能、覆盖率——设置成被强制执行的约束时;当 agent 为了变绿不断静默检查或跳过测试时;当你需要一个覆盖率或性能阈值却不知道该选什么数字时;或者当 agent 写下的代码超出任何人会读的体量时。

    Also in 4 projects that use this

  • LLl0k0laDSkill

    using-agent-skills

    Use when starting a session or when you need to discover which skill applies to the current task. This is the meta-skill that governs how all other skills are discovered and invoked.

    Also in 19 projects that use this

  • borhen68Skill

    observability-and-instrumentation

    Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that runs in production and you need evidence it works. Use when production issues are reported but you can't tell what happened from the available data.

    Also in 11 projects that use this

  • LLl0k0laDSkill

    shipping-and-launch

    Use when preparing to deploy to production. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.

    Also in 20 projects that use this

  • az9713Skill

    code-simplification

    Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

    Also in 19 projects that use this

  • az9713Skill

    deprecation-and-migration

    Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when deciding whether to maintain or sunset existing code.

    Also in 13 projects that use this

  • +5 more from LLl0k0laD

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the user approves, write the prompt to a temp file and pipe it to the target CLI to prevent shell injections.

    line 77
  2. Distinctive:

    Read the artifact text against each finding.

    line 80
  3. Distinctive:

    Before finishing the doubt cycle, confirm:

    line 109
  4. Distinctive:

    Issue resolution tracking: All issues identified by the reviewer must be either (a) fixed in the artifact, or (b) explicitly accepted as a …

    line 121

“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Doubt-Driven Development

Overview

A confident answer is not a correct one. Long sessions accumulate context that quietly turns assumptions into "facts." 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 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 compiler cannot verify (idempotence, ordering, invariants).
  • Its blast radius is high (production deploy, DB migration, public API change).
  • Working in code you don't fully understand.

When NOT to use:

  • Mechanical operations (renaming, formatting, file moves).
  • Following a clear, unambiguous user instruction.
  • Pure tooling operations (running tests, listing files).

The Process

Copy this checklist when applying the skill:

Doubt cycle:
- [ ] Step 1: CLAIM — write the claim + why-it-matters
- [ ] Step 2: EXTRACT — isolate artifact + contract, strip reasoning
- [ ] Step 3: DOUBT — invoke fresh-context reviewer with adversarial prompt
- [ ] Step 4: RECONCILE — classify every finding against the artifact text
- [ ] Step 5: STOP — stop when findings are trivial, or after 3 loops

Step 1: CLAIM — Surface what stands

Name the decision in two or three lines:

CLAIM: "The new database transaction guarantees no orphaned order items."
WHY THIS MATTERS: Orphans cause billing bugs that are hard to correct later.

Step 2: EXTRACT — Smallest reviewable unit

A reviewer needs the artifact (the code snippet or diff) and the contract (what it must do), NOT your journey or reasoning. Strip explanations to prevent confirmation bias.

Step 3: DOUBT — Adversarial Review

Invoke a fresh-context check. The review prompt must be adversarial:

Adversarial review. Find what is wrong with this artifact.
Assume the author is overconfident. Look for:
- Unstated assumptions
- Edge cases not handled
- Hidden coupling or shared state
- Ways the contract could be violated
- Failure modes under unexpected input

Do NOT validate. Do NOT summarize. Find issues, or state
explicitly that you cannot find any after thorough examination.

ARTIFACT: <paste artifact>
CONTRACT: <paste contract>

Note: Do not pass the CLAIM to the reviewer, only the ARTIFACT and CONTRACT.

Cross-Model Escalation (Interactive Sessions)

A single model shares blind spots. In interactive sessions, after completing the single-model review, explicitly ask the user:

"Single-model review complete. Want a cross-model second opinion? Options: Gemini CLI, Codex CLI, manual external review, or skip." If the user approves, write the prompt to a temp file and pipe it to the target CLI to prevent shell injections.

Step 4: RECONCILE — Fold findings back

Read the artifact text against each finding. Classify in this order:

  1. Contract misread: The reviewer flagged something because the CONTRACT was unclear. Fix the contract and re-loop.
  2. Valid + Actionable: A real issue. Correct the artifact and re-loop.
  3. Valid trade-off: A real issue, but fixing it costs more than accepting it. Document the trade-off.
  4. Noise: The reviewer flagged something correct that they misread.

Step 5: STOP — Bounded loop

Stop when:

  • Iterations return only trivial or already-considered findings.
  • 3 cycles are completed (if issues persist, escalate to the user, do not grind further).
  • User explicitly overrides and says "ship it".

Red Flags

  • Spawning reviews for trivial edits (renames, lints).
  • Accepting reviewer output as authoritative without verifying the artifact.
  • Looping >3 cycles without escalating to the user.
  • Prompting with "is this good?" instead of "find issues".
  • Passing the CLAIM or your reasoning to the reviewer.
  • Accepting "this change is simple/small" as a reason to skip the doubt process. Simple changes in critical paths still need adversarial review.
  • Using the reviewer to validate rather than challenge — framing the review as "confirm this is correct" instead of "find what's wrong." Validation bias defeats the purpose of the doubt cycle.
  • Skipping the doubt process for "obvious" fixes. Obvious is a confidence signal, not a correctness signal. The fixes that cause the most damage are the ones that looked obvious.

Verification

Before finishing the doubt cycle, confirm:

  • The claim and its impact were explicitly documented.
  • Reviewer received ARTIFACT + CONTRACT without prior explanations.
  • Adversarial prompt was used.
  • Findings were reconciled and classified.
  • Stop condition was met within 3 cycles.

Verification Gates

These gates are mandatory. A doubt cycle is not complete until all are satisfied.

  1. Doubt process log preservation: The full doubt cycle (CLAIM, EXTRACT, DOUBT, RECONCILE, STOP) must be preserved in the conversation or session log. If the log is lost, the doubt cycle must be re-run. No "I already checked this" claims without a traceable record.
  2. Issue resolution tracking: All issues identified by the reviewer must be either (a) fixed in the artifact, or (b) explicitly accepted as a known trade-off with documented rationale. No silent dismissals. Every finding gets a disposition: fixed, accepted-with-rationale, or classified-as-noise-because.
  3. Cross-model escalation for high stakes: For decisions meeting the high-stakes threshold (production deploy, DB migration, public API change, security-sensitive logic), cross-model review must be attempted — not just offered. If the user declines cross-model review, document that the escalation was offered and declined.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.