agentleFS
MrCipherSmithMrCipherSmith/goodai-base/skills/doubt-driven-development/SKILL.md

doubt-driven-development

Skill0 starsChanged 5 months agoMITView on GitHub

Use when a non-trivial decision is about to stand — branching logic, cross-boundary change, unverifiable invariant, or irreversible blast radius — and you want a fresh-context adversarial reviewer to catch a wrong direction in-flight, while correction is still cheap. NOT for mechanical edits, one-liners, or explicit user instructions.

64 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use using-agent-skills, observability-and-instrumentation and 9 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.
  • 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 38 projects that use this

  • HK-hubSkill

    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 36 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 46 projects that use this

  • HK-hubSkill

    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 33 projects that use this

  • +5 more from LLl0k0laD
  • +2 more from HK-hub

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 55 edited versions we read keep these.

  • 1

    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:

    External CLIs: verify the binary is on PATH, confirm flags with the user, and pipe the artifact via stdin (never interpolate it into a …

    line 75

“Common” is measured: kept by at least 6 in 10 of the 55 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

What It Does

Materializes a fresh-context adversarial reviewer before a non-trivial decision stands, so a wrong direction is caught early — while course-correction is still cheap.

"A confident answer is not a correct one."

Long sessions accumulate context that silently converts assumptions into "facts." This skill applies rigorous skepticism in-flight, not post-hoc. It is the cheap, per-decision counterpart to the full review-orchestrator (post-hoc, whole-diff) and plan-gatekeeper (interactive, whole-plan).

When It Applies

A decision qualifies as non-trivial if it:

  • Introduces or modifies branching logic
  • Crosses a module / service / package boundary
  • Asserts a property the type system cannot verify (thread-safety, idempotence, ordering, an invariant)
  • Depends on context future readers will not see
  • Has irreversible blast radius (production deploy, data migration, public-API or contract change)

Skip it for: mechanical operations, clear user instructions, reading existing code, one-liners, tooling operations, or when the user has explicitly prioritized speed. Doubt on a formatting change is theater.

The Five-Step Process

CLAIM → EXTRACT → DOUBT → RECONCILE → STOP

1. CLAIM

Name the decision compactly and state why it matters (which of the "non-trivial" triggers it hits). One or two sentences. This is for you; it is not passed to the reviewer.

2. EXTRACT

Isolate the artifact (the code / diff / design) plus its contract (the behavior it must satisfy — signature, invariants, pre/post-conditions), stripped of your reasoning and your conclusion.

3. DOUBT

Invoke an adversarial reviewer over ARTIFACT + CONTRACT only. Framing is mandatory and issues-only:

"Find what is wrong with this. List concrete failure modes. Do not validate; do not balance praise against criticism."

Options, cheapest first:

  • Same-model sub-agent — dispatch the code-reviewer agent (or review-logic skill) with the issues-only prompt.
  • Cross-model (higher signal, higher cost) — an external CLI such as Codex or Gemini. In interactive mode always offer cross-model review before RECONCILE and let the user decide the cost/benefit; announce it if you skip it.

4. RECONCILE

Re-read the artifact text against each finding and classify: contract-misread (reviewer lacked context — discard, but note the ambiguity) → actionable (real defect — fix) → trade-off (surface to user) → noise (drop). Disagreement is data, not a verdict. Never rubber-stamp.

5. STOP

Halt when any of: findings are trivial, 3 cycles reached, or the user gives an explicit go-ahead. Three unresolved cycles means the artifact may not be ready — escalate to the user, do not loop.

Load-Bearing Details

  • Never pass the CLAIM (your conclusion) to the reviewer — it biases agreement.
  • Adversarial framing is mandatory — "find issues" beats the reviewer's default balanced tone.
  • Bounded recursion — 3 cycles max; then escalate.
  • External CLIs: verify the binary is on PATH, confirm flags with the user, and pipe the artifact via stdin (never interpolate it into a shell string — injection risk).
  • Orchestrate from the main session — the reviewer persona does not spawn its own sub-reviewers.

Rationalizations — Stop and re-read the rule if you think:

RationalizationWhy it is wrong
"I'm confident this is right, no need to doubt"Confidence is exactly the signal to doubt — accumulated context masquerades as fact
"I'll ask the reviewer 'is this good?'"That invites agreement; the only valid framing is "find what is wrong"
"I'll paste my reasoning so the reviewer understands"Your conclusion biases the reviewer — pass artifact + contract only
"The reviewer found nothing actionable across 3 cycles, so it's fine"Doubt theater — if substantive findings keep surfacing but none are ever classified actionable, you are validating, not doubting
"Cross-model is expensive, I'll silently skip it"In interactive mode you must offer it and let the user decide; silent skips hide the cost/benefit call
"This branch is trivial"If it changes branching, crosses a boundary, or is irreversible, it is non-trivial by definition

IRON LAW: THE REVIEWER RECEIVES THE ARTIFACT AND ITS CONTRACT — NEVER YOUR CONCLUSION — AND IS ALWAYS ASKED TO REFUTE, NEVER TO APPROVE.

Red Flags

  • Spawning a doubt cycle for formatting / rename / comment changes
  • Prompting "is this correct?" instead of "find what is wrong"
  • Rubber-stamping reviewer output without re-reading the artifact against each finding
  • Looping past 3 cycles alone instead of escalating
  • Passing the CLAIM or your reasoning into the reviewer prompt
  • Interpolating the artifact into a shell command for an external CLI instead of piping via stdin
  • Doubt theater: 2+ cycles produce findings, zero are ever actioned

Relationship to Other Skills

  • review-orchestrator / review-* — post-hoc, whole-diff verdict; doubt is per-decision and in-flight.
  • plan-gatekeeper — interactive interrogation of a whole plan with ADR output; doubt targets a single decision or artifact.
  • TDD — a failing test is the doubt step for a behavioral claim; use doubt for claims a test cannot express (invariants, ordering, blast radius).

Verification Checklist

  • Decision met at least one non-trivial trigger (else the skill should have been skipped)
  • Reviewer prompt contained artifact + contract and no conclusion/reasoning
  • Reviewer framing was "find what is wrong", not "is this good"
  • Cross-model review offered (interactive) or its skip announced
  • Every finding classified (contract-misread / actionable / trade-off / noise) with the artifact re-read
  • Loop stopped at trivial findings, 3 cycles, or explicit go-ahead — not left running

STATUS Protocol (when run as a sub-agent)

STATUS: DONE                 — doubt cycle complete, no actionable findings remain
STATUS: DONE_WITH_CONCERNS   — trade-offs surfaced for the user to decide
STATUS: BLOCKED              — 3 cycles reached with unresolved actionable findings; escalate
STATUS: NEEDS_CONTEXT        — contract could not be extracted; artifact under-specified

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.