Skip to main content

What is ADHD?

Linear Chain-of-Thought anchors on whatever it says first. Tree-of-Thought widens the search but still walks a single shared context, so the anchoring persists across branches. ADHD treats this as an architectural problem, not a prompting one. It spawns N isolated reasoning processes under deliberately distorted cognitive frames — a hardware engineer, a regulator, a 10-year-old, a speedrunner — with zero shared context during divergence, then runs a separate critic pass to score, cluster, prune traps, and deepen the survivors. Reach for it on design decisions, fuzzy debugging, naming, API surface design, strategy, and any prompt of the shape “give me a few ways to…”.

Quickstart

Run your first ADHD loop as a skill, from the CLI, or in TypeScript.

How it works

The two-phase diverge/focus loop and the isolation invariant that makes it work.

The frames

The 15 cognitive frames, how selection works, and how to author your own.

Evals

Head-to-head numbers against a single-shot baseline, judged by an independent LLM.

Why not just prompt harder?

The first three answers a model gives are the answers a senior engineer would give in thirty seconds. Correct. Forgettable. The interesting answers live past number three, in the awkward middle nobody walks into. A single chain told to “consider alternatives” generates those alternatives into one shared context, sequentially — it anchors on whichever alternative it produces first and every subsequent “alternative” drifts toward it. ADHD’s branches never share a context during divergence, so there is no first answer to anchor on. Distinctness is produced by construction, not requested by a prompt and hoped for.
“List alternatives” varies the output; ADHD varies the generator. Only the second escapes the anchor.

The loop in one picture

  1. Diverge. N parallel, isolated LLM calls — each sees the problem plus one frame’s vantage prompt, and a system prompt that forbids evaluation. Branches never see each other, so no anchoring.
  2. Focus. A separate critic call scores every idea (novelty / viability / fit), flags traps with reasons, clusters by underlying angle, and deepens the top-K survivors into sketches with risks and first steps.
The generator–critic split is mechanical — separate LLM calls with opposite system prompts — not promised in one prompt.

Baseline vs ADHD, one problem

Problem. “We have a CLI that calls an LLM and it sometimes hangs for 90 seconds. Design the right retry/timeout/UX strategy.”
Walks through four textbook patterns: progressive timeout with staged UI, fast-fail + exponential backoff, hedged parallel requests, streaming with keepalive. Lands on a sensible hybrid recommendation — the answer a senior engineer gives in 30 seconds.What’s missing: no traps named, no acknowledgement that the user might want to bail out of a slow request, no questioning of the “wait then retry the same model” frame.
Independent LLM judge on this problem: breadth 9 vs 6, novelty 8 vs 3, trap detection ~8 vs ~2. See Evals for the full suite.

Three ways to run it

Agent skill

npx skills add UditAkhourii/adhd — works in Claude Code, Cursor, Codex, and ~50 more agents. No API key needed.

CLI

npm install -g adhd-agent — run the loop from any terminal, with structured JSON output.

TypeScript library

npm install adhd-agent — call run() at decision points inside your own agent.

Project

ADHD operationalizes the Divergent Ideation source spec and ships under the MIT license.