ADHD
An open-source skill for coding agents that prevents premature convergence by spawning N isolated parallel reasoning processes under different cognitive frames, then scoring and deepening the survivors.
At a Glance
About ADHD
ADHD is an open-source TypeScript library and CLI tool authored by Udit Akhouri that addresses what it calls "premature convergence" in LLM reasoning — the tendency for autoregressive models to anchor on high-probability answers and produce the same three ideas a senior practitioner would. It is published on npm as adhd-agent under the MIT license and is designed to be used as a subroutine inside larger coding agents at decision points. The project was featured by The New Stack and has been adopted by at least one OSS project (repowire).
What It Is
ADHD is a two-phase inference-time method for open-ended ideation tasks. In Phase 1 (Diverge), it spawns N isolated, parallel LLM calls — each under a different cognitive frame from a library of 15 (e.g., "regulator", "speedrunner", "biology", "$0 budget", "3am on-call") — with a system prompt that forbids evaluation. Because branches share no context, anchoring across branches is mechanically impossible. In Phase 2 (Focus), a separate critic call scores every idea on novelty, viability, and fit; flags traps with reasons; clusters ideas by underlying angle; and deepens the top-K survivors into sketches with risks and first steps. The generator–critic split is enforced by separate LLM calls with opposite system prompts, not by prompting a single call to "be balanced."
How It Differs from CoT and ToT
The project's documentation draws three structural distinctions from existing methods:
- Branch isolation vs. shared context: Chain-of-Thought and Tree-of-Thought branches share a context window, so anchoring persists across steps. ADHD's N branches are N distinct LLM calls with no shared history.
- Frame-based branching vs. next-step variation: ToT varies the next move within a search problem. ADHD varies the entire vantage point of the generator — re-asking the whole question from a structurally different angle.
- Mechanical generator–critic separation: The generator system prompt forbids evaluation; the critic system prompt forbids generation. They are different calls, not a single call asked to do both.
Evaluation Results
The project reports mean scores across six open-ended engineering problems (0–10 scale), comparing ADHD against a single-shot senior-engineer baseline, judged by an independent LLM with a skeptical-staff-engineer prompt and randomized A/B order. Per the published results: ADHD scored 9.00 vs. 4.83 on breadth (+4.17), 7.83 vs. 2.67 on novelty (+5.17), 9.50 vs. 1.83 on trap detection (+7.67), 9.50 vs. 6.50 on actionability (+3.00), and 7.67 vs. 6.83 on builder usefulness (+0.83). ADHD won 5 of 6 problems; the one loss was on a well-understood problem where the baseline delivered a tighter, immediately shippable answer. The project acknowledges limitations: same-model judging, a small six-problem set, and a hand-authored frame library.
Architecture and Setup
A default run uses approximately 10 LLM calls (5 divergence + 1 score + 1 cluster + 3 deepen) at concurrency 4, with typical wall-clock latency of 30–90 seconds. The implementation is roughly 600 lines of TypeScript built on the Claude Agent SDK. Installation is via a single command that auto-detects the agent environment (Claude Code, Cursor, Codex, Cline, Gemini CLI, Windsurf, and approximately 50 more):
npx skills add UditAkhourii/adhd
It can also be installed as a global CLI (npm install -g adhd-agent) or as a library (npm install adhd-agent). The library API exposes run(opts) → RunResult for use as a callable subroutine inside larger agents.
Update: v0.1.4 — Community Open · Codex Compatibility · First OSS Adopter
The latest release, v0.1.4, was published on May 30, 2026. It adds Codex compatibility (including a forced-target install path for Codex builds that truncate multi-line YAML), opens the community contribution form, and marks the first official OSS adopter: repowire, which ported ADHD onto its mesh-orchestrator primitives in a merged PR. The repository was created on May 25, 2026 and had accumulated 661 stars and 29 forks as of the last recorded update.
Community Discussions
Be the first to start a conversation about ADHD
Share your experience with ADHD, ask questions, or help others learn from your insights.
Pricing
Open Source
Fully free and open-source under the MIT License. Install via npm or npx.
- Full CLI and library access
- All 15 cognitive frames
- Parallel divergent ideation
- Trap detection and clustering
- Top-K deepening
Capabilities
Key Features
- Parallel isolated divergent reasoning branches under N cognitive frames
- 15 built-in cognitive frames (regulator, speedrunner, biology, $0 budget, 3am on-call, etc.)
- Mechanical generator–critic separation via distinct LLM calls
- Trap detection with explicit reasons for seductive-but-broken ideas
- Idea clustering by underlying angle (not surface keywords)
- Top-K deepening with sketch, load-bearing risk, and first concrete step
- CLI binary (adhd "problem")
- Programmatic TypeScript/Node.js API (run(opts) → RunResult)
- Installable as a skill for Claude Code, Cursor, Codex, Cline, Gemini CLI, Windsurf, and ~50 more agents
- Auto-detects agent environment on install
- Extensible frame library (5 lines per custom frame)
- JSON-only output with shortlist, nonObviousPick, traps, deepened, clusters fields
- Configurable frames, ideas per frame, and top-K survivors
- codeMode flag biases frame selection toward engineering-relevant tags