ADHD: Parallel Divergent Thinking Skill for Coding Agents
Tree-of-thought with pruning: spawns isolated reasoning processes under cognitive frames to fight premature convergence.
- Source repo
- UditAkhourii/adhd
- Stars
- ★ 4.5k
- Last updated
- 17d ago
- License
- MIT
- Primary language
- TypeScript
- FA score
- 62/100 · Some gaps
At a glance
- How it runs
- Works with
- Platform-specificCodex · Claude Code
- Cost
- Free software; you pay for model usage
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- When designing a rate limiter, use ADHD to explore diverse strategies, such as scout-forking alternate endpoints or daemonizing the CLI.
- Not a fit if
- Simple, straightforward tasks where one answer suffices
- Teams sensitive to API cost and latency: ~2.3× time, 1.9× output
- Website
- divergent.sh ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-10-25latest release v0.1.4 (2026-05-30)+3.3 ★/day over 7 days
- Source review
- 62/100 · Some gaps
What does this agent do, and when should you use it?
ADHD is a skill for coding agents designed to structurally address premature convergence in autoregressive reasoning. Unlike linear chain-of-thought or tree-of-thought, which share a single context and thus preserve anchoring, ADHD spawns N parallel, isolated reasoning processes under deliberately distorted cognitive frames with zero shared context during divergence. A separate critic pass then scores, clusters, prunes traps, and deepens the survivors. It provides a two-phase loop (Diverge and Focus), with the generator-critic split enforced as separate LLM calls with opposite system prompts. The package ships a CLI (adhd), a TypeScript library (adhd-agent) exposing run() and renderText(), and a skill for agents (SKILL.md) installable via npx skills add. Benchmarks show ADHD outperforms a single-shot baseline in breadth, novelty, trap detection, and actionability, with particularly strong gains in trap detection (9.5 vs 1.8). Adopted by projects like repowire, mstack, and han. Maintained by Udit Akhouri with a preprint and detailed documentation.
ADHD executes a two-phase loop. In the Diverge phase, it selects N cognitive frames based on the problem, spawns N parallel agent calls—each seeing the problem plus a frame's vantage prompt, with a system prompt forbidding evaluation—so branches never see each other. In the Focus phase, a separate critic LLM 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 library API returns structured results including shortlist, nonObviousPick, traps, deepened, and clusters. It reads user problems from CLI arguments or API parameters, calls the configured LLM provider (Claude or Codex), and outputs rendered text or JSON. The skill integrates into agent environments like Claude Code and Codex, auto-triggering on ideation intents or via /adhd commands. It does not execute code but provides ideation suggestions.
- When designing a rate limiter, use ADHD to explore diverse strategies, such as scout-forking alternate endpoints or daemonizing the CLI.
- When debugging a fuzzy issue, like an LLM CLI hanging for 90 seconds, ADHD surface non-obvious picks like 'rage-quit' to instantly switch to a cheaper model.
- When naming functions or APIs, run ADHD to generate creative suggestions across different cognitive frames.
- When planning architecture or strategy, use ADHD to consider multiple perspectives and avoid settling on the first idea.
- When reviewing ideas for pitfalls, ADHD's focus phase automatically flags traps with reasons, saving engineering time.
- When building other agent skills, incorporate ADHD's generator-critic split pattern into your own workflows, as done by repowire and mstack.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Config files
~/.codex/skills/adhd~/.codex/skills/adhd/SKILL.md- Runtime
- Node.js 18+
How do you install or deploy this agent?
Requires Node.js >=18. Install the CLI globally: npm install -g adhd-agent. Or as a library in a project: npm install adhd-agent. For agent integration, the recommended path is: npx skills add UditAkhourii/adhd, which auto-detects ~50 agents (Claude Code, Cursor, Antigravity, Codex, etc.). If Codex fails to auto-detect, force the target: npx skills add UditAkhourii/adhd -a codex -g. Manual install for Codex: mkdir -p ~/.codex/skills/adhd; curl -fsSL https://raw.githubusercontent.com/UditAkhourii/adhd/main/skills/adhd/SKILL.md -o ~/.codex/skills/adhd/SKILL.md, then restart Codex.
How do you use this agent?
From CLI: run adhd "your problem" (e.g., adhd "design a rate limiter"). Options include --frames, --ideas, --top for tuning. From TypeScript: import { run, renderText } from 'adhd-agent'; const result = await run({ problem: '...', framesPerRun: 5, topK: 3 }); console.log(renderText(result));. In agent environments, invoke /adhd "your problem" or let it auto-trigger on ideation intents. The skill ships with a single-line description to ensure compatibility with Codex builds.
What are this agent's strengths and limitations?
- Significant improvement in idea breadth (9.0 vs 4.8) and novelty (7.8 vs 2.7) over single-shot baselines in independent evals.
- Excellent trap detection (9.5 vs 1.8), automatically flagging seductive-but-broken ideas with reasons.
- Flexible integration: CLI, library, and skill for ~50 agents, with one-command installation.
- Methodologically grounded with a preprint, detailed documentation, and community adoption (repowire, mstack, etc.).
- Structured output (shortlist, nonObviousPick, traps) makes it easy to integrate into other pipelines.
- Higher resource consumption: about 2.3× time and 1.9× output compared to single-shot, increasing LLM API costs.
- Requires network access and API credentials to operate; cannot run fully offline.
- Full one-command install may not work on all agents; Codex sometimes needs manual configuration.
- May be overkill for simple, straightforward tasks where a single answer suffices.
- Potential for the critic to miss certain structured reasoning patterns, though docs claim generality; not all ideas may be actionable.
How does this agent compare with similar options?
Compared to standard chain-of-thought and tree-of-thought methods, ADHD's key differences are isolated divergence (no shared context) and a mechanical generator-critic split via separate LLM calls. It is not compared to other specific tools in the source.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| ADHD: Parallel Divergent Thinking Skill for Coding Agents This agent | 62 · Some gaps | Agent plugin / skillFree + model costs | ★ 4.5k | 17d ago | TypeScript | Codex · Claude Code |
| Archimedes Patent Workspace | 76 · Good | — | ★ 115 | 1mo ago | TypeScript | Codex · Claude Code |
| img2threejs — Code-Only 3D Reconstruction | 73 · Some gaps | Agent plugin / skillFree + model costs | ★ 21k | 6d ago | Python | Codex · Claude Code |
| OpenCove Infinite Canvas Workspace | 69 · Some gaps | Desktop appFree | ★ 1.7k | today | TypeScript | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
Isolated calls, a test showing generation queries disable tools, a 10 MB context-file limit, and explicit installation steps support least privilege and some data-flow transparency. However, the skill directs multiple Agent calls, the CLI sends supplied context to the model, and credentials come from an environment variable or local Claude Code auth; the packet shows neither sensitive-data controls nor per-call confirmation. MIT licensing and maintainer contact aid attribution, but dependency-security evidence is limited and no rollback process is described, so full marks are not justified.
The repository defines CI, type checking, and tests, and the CLI emits specific messages for some invalid arguments. The sampled product is inconsistent: the skill says five parallel branches, while the README describes six, and the supplied SKILL.md ends mid-instruction with an incomplete JSON requirement. Dependencies have version ranges but the packet gives no lockfile or audit evidence, warranting partial scores.
The skill names suitable design, naming, architecture, and fuzzy-debugging scenarios, and excludes lookups, syntax questions, and known-root-cause bugs. Its cost gate and installation options are concrete. Automatic triggering still relies on the agent's self-judgment, and platform support is documented as a claim without platform-specific verification in this packet.
Documentation is organized around installation, quickstart, API, and evaluations, with skill, CLI, and library examples, stated limitations, and an MIT license. Naming retains an old connect-dots CLI comment, and the packet contains no changelog. A maintainer and vulnerability-reporting route are named, but release ownership and update commitments remain limited.
The structured process yields scores, traps, clusters, a shortlist, and developed sketches; examples show text and JSON output. The README and evaluation documentation report comparative gains, but this packet cannot independently verify them. The skill estimates about 10 calls, 30–90 seconds, and 5–10 times the cost of one answer, so both value and cost-benefit receive partial rather than full marks.
The README points to in-repository evaluation methodology and transcripts, while CI and test files provide some inspectable support. Many performance figures remain project-reported, and cited external corroboration is not included in the packet. The sampled skill and README do not fully corroborate one another, limiting the score.
- The supplied SKILL.md is truncated during the deepening-phase JSON instruction, so the complete operating instructions cannot be confirmed from this packet.
- The workflow is costly and sends supplied context to a model; avoid including sensitive material that should not be sent to the model service.
- The README and skill disagree about the number of parallel branches. Treat the evaluation gains as repository claims, not independently verified results.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
v0.1.4 v0.1.4 — Community is open · Codex compatibility · first OSS adopter
Release notes excerpt
🎉 The ADHD community is open If you build with coding agents, sign up at https://tally.so/r/WO1Nzj as a contributor, maintainer, early adopter, or just a member who wants to follow along. Full discussion: https://github.com/UditAkhourii/adhd/discussions/19 Where we are - 5/6 wins vs a single-shot baseline across 6 open-ended engineering problems, with +5.17 novelty and +7.67 trap detection on a 0–10 rubric — full methodology in [EVALS.md](https://github.com/UditAkhourii/adhd/blob/main/EVALS.md). …View on GitHub ↗
FAQ
How does ADHD differ from chain-of-thought and tree-of-thought?
What is the cost of using ADHD?
Can I bring my own cognitive frames?
What types of problems should I use ADHD for?
How does ADHD handle security and permissions?
Is ADHD: Parallel Divergent Thinking Skill for Coding Agents open source?
Is ADHD: Parallel Divergent Thinking Skill for Coding Agents still maintained?
Who makes ADHD: Parallel Divergent Thinking Skill for Coding Agents?
What is ADHD: Parallel Divergent Thinking Skill for Coding Agents's official website?
Thanks — we use this to improve the page.