Verdict: AI coding agents like Claude Code and Codex are excellent at splitting work into parallel subtasks — but the moment you ask them to brainstorm, they collapse to the same three safe answers every time. The fix is not better prompting; it is a different architecture. A skill called ADHD (open-sourced by Udit Akhouri, MIT licensed, 2,400+ GitHub stars as of July 2026) treats premature convergence as a structural problem — it spawns parallel isolated reasoning branches under deliberately distorted cognitive frames, then a separate critic scores, prunes traps, and deepens the survivors. It costs 5–10× the tokens of a single answer, runs in 30–90 seconds, and won 5 of 6 open-ended engineering problems against a single-shot baseline in the author's evals. Use it for architecture decisions, API design, naming, and fuzzy debugging. Skip it for syntax, lookups, and anything with one right answer.
Last verified: 2026-07-29 · Fixes premature convergence in LLM ideation · Spawns parallel isolated agents under 15 cognitive frames · Critic scores on novelty, viability, fit · Open source, MIT, 2,400+ stars · Costs ~10 LLM calls per run (5–10× single-shot) · Shipped by Udit Akhouri (Brane Labs)
Volatile facts: GitHub stars, npm version, and eval numbers change — last checked July 29, 2026.
Why Do AI Coding Agents Give You the Same Three Ideas Every Time?
The problem has a name: premature convergence. An autoregressive language model generates tokens one at a time, each conditioned on the previous. When you ask it to brainstorm, it reaches for the pattern that showed up most often in its training data — because repeated exposure is what taught it that answer was "good." The first three ideas a senior engineer could give in thirty seconds are the same three the model gives. They are correct. They are forgettable. And no matter how many times you rephrase "give me something different," the model keeps returning the same shape of answer in different wording.
The reason is not a capability ceiling — it is the structure of the reasoning process. Every idea gets evaluated inside the same context window. Ideas bleed into each other. The thinking gets worse instead of better. You can build a specialized "test author" agent whose only job is writing tests, and it still falls back to the same patterns, because the architecture has not changed.
As Udit Akhouri writes in the preprint, "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." The fix, he argues, is architectural: treat premature convergence as a design problem, not a prompting one. (Preprint: ADHD: Parallel Divergent Ideation for Coding Agents)
What Is the ADHD Skill and How Does It Work?
ADHD is a skill for AI coding agents that implements a two-phase loop with a hard wall between the phases. It is built on the Claude and Codex Agent SDKs, MIT licensed, installable with one command, and works with 50+ agents including Claude Code, Cursor, Codex, Cline, Gemini CLI, and Windsurf. (GitHub: UditAkhourii/adhd, npm: adhd-agent)
The name reflects the creative, associative, divergent thinking style the skill enables — not a medical condition. The skill itself draws an analogy to how someone with ADHD thinks: "in a lot of directions and go deep in a few."
Phase 1 — Diverge (no critic)
The skill picks N cognitive frames from a library of 15 (regulator, biology, speedrunner, 10-year-old, $0 budget, first principles, logistics, game design, markets, inversion, ant colony, and more). It then spawns N parallel, isolated Agent calls — one per frame. Each agent sees only:
- the problem
- any context the user provided
- the chosen frame's vantage prompt
- a system instruction that forbids evaluation
The critical invariant: branch calls must be parallel and isolated. If one branch sees another's output, the whole method collapses back to a single wider thought. Branches that see each other anchor each other. (SKILL.md source)
Each branch generates 6 short distinct ideas under its frame, pushing past the "first three obvious answers everyone would give." The skill explicitly bans the first three defaults and tells the agent to push "into the awkward middle."
Phase 2 — Focus (critic on)
After all branches return, a separate critic pass scores every idea on three axes (0–10):
| Axis | What it measures | Weight |
|---|---|---|
| Novity | Distance from the obvious default | 0.35 |
| Viability | Could this actually ship | 0.40 |
| Fit | Does it address the stated problem | 0.25 |
The critic runs a "skeptical senior engineer" prompt — its job is to be hard on everything it reads. It also flagges traps: ideas that look attractive but have hidden costs, false economies, or won't scale. It then clusters ideas by underlying angle (not surface keywords), deepens the top 3 survivors into 4–8 sentence sketches with risks and next steps, and prioritizes picks flagged as non-obvious.
The generator-critic split is mechanical — it uses separate LLM calls with opposite system prompts, not a single prompt that promises to self-evaluate.
How Is This Different From Chain-of-Thought or Tree-of-Thought?
ADHD is a variant of Tree-of-Thought (ToT), but differs along three load-bearing axes. The original ToT paper (Yao et al., NeurIPS 2023) generalizes Chain-of-Thought to a tree of intermediate "thoughts" with explicit search (BFS or DFS) and an evaluator function. The key insight ADHD builds on: standard ToT still runs in a single shared context, so anchoring persists across branches. (arXiv:2305.10601)
| Feature | Chain-of-Thought | Tree-of-Thought | ADHD |
|---|---|---|---|
| Branching | One linear path | Tree search (BFS/DFS) | Parallel isolated branches |
| Context sharing | N/A (one path) | Shared across branches | Zero shared context between branches |
| Branch separation | N/A | Same context window | Separate LLM calls with opposite system prompts |
| Frame diversity | N/A | None — same lens | 15 deliberately distorted cognitive frames |
| Critic | N/A | Evaluator scores partial states | Separate "skeptical senior engineer" pass |
| Optimization target | Correctness | Correctness on closed answer space | Range of non-obvious viable options |
Existing inference-time methods — CoT, ToT, self-consistency sampling, Mixture-of-Agents, multi-agent debate — all optimize for correctness on a closed answer space. None of them is shaped for the open-ended case where there is no ground truth, no test you can run on a partial, and the metric of interest is range of non-obvious viable options.
How Do You Install the ADHD Skill?
One command, auto-detects your agent:
npx skills add UditAkhourii/adhd
The installer asks which AI coding agent you want it installed for (it supports 50+ — Claude Code, Cursor, Codex, Cline, Gemini CLI, Windsurf, Antigravity, and more) and whether you want project scope or global scope. (GitHub README)
For Claude Code specifically: the installer drops the skill into a .agents folder, which is what agents like Codex use for their configuration. Claude Code recognizes the .claude folder by default, so you rename .agents to .claude. The skill itself is a single SKILL.md file — no reference files or dependencies.
For Codex, if the universal command fails to register, force the target:
npx skills add UditAkhourii/adhd -a codex -g
Or install manually:
mkdir -p ~/.codex/skills/adhd
curl -fsSL https://raw.githubusercontent.com/UditAkhourii/adhd/main/skills/adhd/SKILL.md \
-o ~/.codex/skills/adhd/SKILL.md
You can also install the CLI or library directly:
npm install -g adhd-agent # CLI
npm install adhd-agent # library
Then invoke with /adhd "your problem" inside Claude Code or Codex, or run the CLI:
adhd "design a rate limiter that survives a leader election"
adhd "name this function" --frames 3 --ideas 8 --top 2
The npm package is at version 0.1.4 as of July 2026. (npm: adhd-agent)
When Should You Use It — and When Should You Skip It?
The skill ships with a pre-flight gate that auto-decides whether to run. If you call it explicitly with /adhd, it fires immediately. If an agent auto-invokes it on a brainstorming intent, it runs three checks first:
- Is the problem open-ended? Would someone experienced have a few different answers that all work, or just one right answer? If there is only one right answer, thinking from multiple angles wastes tokens. Stop.
- Are the stakes high? Would it genuinely cost you something if the obvious answer turned out to be wrong? If not, stop.
- How did you ask? If you used words like "quick," "standard," "canonical," "textbook," "just," or "one-line," you want the direct answer. Stop.
If all three pass, proceed. If any fails, the skill aborts and answers directly, optionally appending: "If you want a wider exploration under parallel cognitive frames with explicit trap detection, run /adhd <your problem>."
Use it for:
- Architecture decisions and API surface design
- Naming a real product or module
- Fuzzy debugging with no known root cause
- Schema design
- Test strategy planning (before you write a single test)
- UX churn analysis before shipping a feature
Skip it for:
- Syntax questions
- Lookups
- Bugs with a known root cause
- Closed phrasing ("quick," "standard," "canonical," "textbook")
- Side projects at 11pm
The New Stack, which featured the project, quotes author Udit Akhouri: ADHD is "good for brainstorming and planning, not coding." He positions it as a "reasoning and planning layer for AI agents" — not a code-generation accelerator. (The New Stack)
How Much Does It Cost?
A default run uses approximately 10 LLM calls: 5 divergence + 1 score + 1 cluster + 3 deepen, at concurrency 4. Typical wall-clock latency is 30–90 seconds. The cost is about 5–10× a single-shot answer. Calibration guidance from the skill:
- "Name this function" = 3 frames × 4 ideas
- "How should I position this product" = 5 frames × 8 ideas
- Default = 5 × 6 = 30 total ideas generated
The skill is explicit about when to stop diverging: "Stop when new candidates start repeating the shape of existing ones. The space is mapped. Do not pad to hit a number." (SKILL.md)
Does It Actually Work? The Eval Results
The preprint reports mean scores across 6 open-ended engineering problems (0–10 scale), ADHD vs a single-shot baseline at the same model, judged by an independent LLM with a "skeptical-staff-engineer" prompt, A/B order randomized. ADHD won 5 of 6:
| Dimension | ADHD | Baseline | Gain |
|---|---|---|---|
| Breadth | 9.00 | 4.50 | +100% |
| Novelty | 4.50 → 9.00 (largest gain) | varies | Large |
| Trap detection | 4.50 → 9.00 (largest gain) | varies | Large |
| Viability | improved | improved | Moderate |
| Fit | improved | improved | Moderate |
The one loss was on a well-understood problem where the baseline delivered a tighter, immediately shippable answer. The biggest gains are concentrated in trap detection, novelty, and breadth — the dimensions premature convergence destroys.
Limitations the author acknowledges: same-model judging, a small six-problem set, and a hand-authored frame library. The "2x better" headline from the Reddit launch post should be treated as a hypothesis, not a benchmark. (EVALS.md, adhdstack.github.io)
An independent test by miyagadget.page on an Apple M1 Max / 64GB with claude CLI 2.1.161 and adhd-agent 0.1.4 concluded: "worth it as a sparring partner for open-ended design/ideation; overkill for routine work." (miyagadget.page)
Two Practical Workflows That Pay Off
1. Test-Driven Development: Plan Tests Before You Write Them
AI agents slack off on test coverage. They fall back to the same common scenarios and never look at the edge cases — performance issues, unusual paths through the application, and boundary conditions that need covering too.
The workflow:
- Write a PRD (what the app does, who it is for, the goals) and a technical specification document (which tools, which stack).
- Link both inside your
CLAUDE.mdorAGENTS.mdfile so the agent picks up that context from the start. - Invoke
/adhdwith a prompt describing the app and ask it to write test cases using a TDD approach. - Because you called it explicitly, it skips the pre-check and spins up 5 agents immediately. Each goes off in its own direction using the frame that best matches the problem.
- It scores each approach, picks the top 3, and explores them in depth.
- You get a detailed report with scores written in shorthand:
N9= novelty 9,V8= viability 8,F10= fit 10. Each idea comes with a sketch of how it would be built, the risks involved, and the first steps.
What you get back is not tests — it is a testing strategy. The skill plans the tests; it does not write them. You then tell your agent which direction you want and it implements it. The result is a test suite split across three deeply explored branches, each testing a different path through the application — including edge cases and performance issues a single-shot agent would have skipped.
2. Pre-Launch UX Audit: Catch Churn Before You Ship
People like a product at first, then leave because one feature didn't work the way they expected. Most of the time it's something small that got overlooked during the build and made its way into the live version.
The workflow:
- Run the skill on the app you're about to launch.
- Ask it to evaluate the user experience — where people might churn, what could give them a bad experience.
- It goes through the application in depth to gather context, then spins up its agents the same way.
- It surfaces around 30 different ideas, picks the top 3, and explores them further.
- You get every finding graded on novelty, viability, and fit, with a suggested fix and a trap/risk list for each.
The gaps it catches can be significant: features promised in the PRD but never actually built, UX dead-ends, and failure modes that would have surfaced after launch instead of before. As with the testing workflow, the skill flags problems and suggests fixes — it does not implement them itself. You hand the findings you want fixed back to your agent and it implements them.
What This Means for You
If you use Claude Code, Cursor, Codex, or any of the 50+ supported agents for real work, the ADHD skill is worth running once before any high-stakes architecture decision, API design, naming choice, or test strategy. Install it with npx skills add UditAkhourii/adhd, call it explicitly with /adhd "your problem", and budget for ~10× the token cost of a single response.
The honest framing, from the author himself: treat it as a sparring partner for open-ended design, not a code-generation accelerator. An independent tester's verdict — "worth it as a sparring partner for open-ended design/ideation; overkill for routine work" — matches the author's own positioning and the evidence in the preprint.
For builders who already do TDD with agents, wrapping the testing-strategy phase in ADHD before writing any tests is the single highest-leverage application. For teams about to ship, the pre-launch UX audit catches PRD gaps and churn risks that a single-pass review will consistently miss.
If you want to understand agent architecture more broadly — how to design loops, route models, and structure workflows — see our guides on AI agent loops and loop engineering, single-agent vs multi-agent pipelines, and how to build and run an AI agent OS. For model routing and effort-level decisions, our Claude Opus 5 agent workflow routing guide covers when to use expensive reasoning and when to step down. And for the self-improving agent pattern that pairs naturally with divergent ideation, see Hermes Agent + Laguna S 2.1: building a self-improving AI agent.
FAQ
Q: What is premature convergence in AI agents? A: Premature convergence is when an LLM anchors on the first plausible answer it generates and then polishes that answer instead of exploring genuinely different alternatives. It is a structural property of autoregressive models — each token is conditioned on the previous one, so the model defaults to the patterns most represented in its training data.
Q: How is ADHD different from Tree-of-Thought? A: ADHD is a Tree-of-Thought variant with three structural differences: branches run in parallel with zero shared context (not in a single shared context window), each branch uses a deliberately distorted cognitive frame (not the same lens), and the generator-critic split is mechanical — separate LLM calls with opposite system prompts, not one prompt that promises to self-evaluate.
Q: How much does the ADHD skill cost per run? A: A default run uses approximately 10 LLM calls (5 divergence + 1 score + 1 cluster + 3 deepen) at concurrency 4. The cost is about 5–10× a single-shot answer, with typical wall-clock latency of 30–90 seconds. The skill auto-avoids running on problems with one right answer via its pre-flight gate.
Q: What agents does ADHD support?
A: The installer auto-detects your agent and supports 50+ including Claude Code, Cursor, Codex, Cline, Gemini CLI, Windsurf, and Antigravity. Install with npx skills add UditAkhourii/adhd. For CLI use, npm install -g adhd-agent. The current version is 0.1.4 on npm.
Q: Does ADHD write code or tests? A: No. ADHD is a planning and ideation layer, not a code generator. It produces strategies, sketches, and scored idea shortlists. You hand the chosen direction back to your agent and it implements. The author explicitly positions it as "good for brainstorming and planning, not coding."
Q: Is the "2x better" claim verified? A: The "thinks 2x better" framing originated from the Reddit launch post. The preprint reports ADHD winning 5 of 6 open-ended problems against a single-shot baseline, with the largest gains in trap detection and novelty. The author acknowledges limitations: same-model judging, a small six-problem eval set, and a hand-authored frame library. Treat the ratio as a hypothesis, not a benchmark.

Discussion
0 comments