Dev & Engineering tree-of-thoughtideationcodexcreative-codingreasoningtypescript

ADHD: Parallel Divergent Thinking Skill for Coding Agents

Tree-of-thought with pruning: spawns isolated reasoning processes under cognitive frames to fight premature convergence.

FollowAgents review · FARS-2.1
Not recommended
56/ 100 5-point scale 2.8 / 5
1 2 3 4 5 6
1Trust11 / 29 · 1.9/5

Evidence: generation-only queries disable all built-in tools (tests/llm.test.ts), aligning with least privilege; but user confirmation mechanism not explicit, data flow transparency limited, sensitive data handling not specified, dependency security not audited, external effects (e.g., network calls) not clarified, rollback missing, source attribution has MIT attribution but unverified. Deductions: insufficient evidence for user confirmation, data flow, sensitive data, dependency security, external effects, rollback.

2Reliability8 / 14 · 2.9/5

Evidence: README and code consistent, dependencies pinned (package.json), CI covers multiple Node versions; but failure messages not detailed. Deduction: insufficient evidence for failure messages.

3Adaptability12 / 18 · 3.3/5

Evidence: clear target audience (coding agents) and scenarios (design decisions, fuzzy debugging, etc.), capability boundaries documented (when-to-use), trigger explicit (/adhd), environment fit broad (multiple agents). Deductions: no major flaws, but some details unverified.

4Convention11 / 18 · 3.1/5

Evidence: clear documentation structure (README, documentation/), detailed install notes, stable naming (adhd-agent), rich examples, known limitations documented, MIT license, version number exists but no changelog, maintenance responsibility clear (author). Deduction: no changelog.

5Effectiveness9 / 13 · 3.5/5

Evidence: clear output structure (shortlist, traps, etc.), marginal value supported by comparative data, cost-benefit discussed (time/output cost). Deductions: no major flaws, but cost data relies on external evals.

6Verifiability5 / 8 · 3.1/5

Evidence: claims supported by docs (evals.md), external evals cross-corroborate, facts and inferences separated (methodology explicit). Deductions: no major flaws.

Evidence confidence: Low Reviewed Aug 09, 2026 Reviewed revision 3d9dc487bc2e
The upstream repository has new commits since this review. The score still applies to the reviewed revision shown and may not cover the latest changes.
Safety controls not found in source: rollback or recovery path
Before you use it
  • Publisher identity unverified; source attribution based solely on MIT claim.
  • Dependency security not audited; recommend checking for vulnerabilities.
  • User confirmation mechanism unclear; may execute actions automatically.
  • Rollback mechanism absent; changes may be hard to revert.
Review evidence [1][2][3][4][5][6][7]
See the full review method →

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.

  1. When designing a rate limiter, use ADHD to explore diverse strategies, such as scout-forking alternate endpoints or daemonizing the CLI.
  2. 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.
  3. When naming functions or APIs, run ADHD to generate creative suggestions across different cognitive frames.
  4. When planning architecture or strategy, use ADHD to consider multiple perspectives and avoid settling on the first idea.
  5. When reviewing ideas for pitfalls, ADHD's focus phase automatically flags traps with reasons, saving engineering time.
  6. When building other agent skills, incorporate ADHD's generator-critic split pattern into your own workflows, as done by repowire and mstack.

What are this agent's strengths and limitations?

Pros
  • 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.
Limitations
  • 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 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.

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.

FAQ

How does ADHD differ from chain-of-thought and tree-of-thought?
ADHD creates fully isolated reasoning processes during divergence, eliminating the anchoring that persists in single-context approaches. It also enforces the generator-critic split as separate LLM calls, not a single prompt.
What is the cost of using ADHD?
Independent review shows roughly 2.3× latency and 1.9× output size. Actual cost depends on LLM pricing and problem complexity. For high-stakes creative tasks, the improved breadth and trap detection can outweigh the cost.
Can I bring my own cognitive frames?
Yes. There are 15 built-in frames and you can author your own. The CLI --frames option and documentation provide guidance on frame selection and customization.
What types of problems should I use ADHD for?
It's ideal for design decisions, fuzzy debugging, naming, API surface design, strategy, and any prompt asking for 'a few ways to...'. For simple deterministic coding tasks, a single-shot approach may be more efficient.
How does ADHD handle security and permissions?
ADHD only generates text ideas; it does not execute code. It relies on LLM APIs, so you must handle API keys carefully. In agent environments, ensure your agent's security policies permit the installed skill.

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents