UditAkhourii /adhd

ADHD — a skill for coding agents. Tree-of-thought with pruning, built on the Claude & Codex Agent SDK. Fans out parallel divergent thoughts under different cognitive frames, scores, prunes traps, deepens the survivors. The no-brainer skill for creative and interdisciplinary work.

★ 4,501⑂ 298👁 17▤ 1
TypeScriptCreated 2026-05-25divergent.sh
4,501
stars
+0+3+154
298
forks
17
watchers
–
prs
–
issues
1
releases
–
discussions

README

ADHD — a skill for agents












 🎮 Join the Discord → for frame design, eval problems, and trap-hunting in real time · 👉 Join the community → as a contributor, maintainer, or early adopter (one short form).

 An architectural fix for premature convergence in autoregressive reasoning.

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, 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…".

📚 Official docs: adhd.mintlify.site · 📄 Preprint: ADHD: Parallel Divergent Ideation for Coding Agents · 👤 Author: Udit Akhouri — @akhouriudit · LinkedIn

---

 Side-by-side: baseline vs ADHD

One eval problem, same model, two strategies. Full transcripts in bench/results.json.

 Problem. "We have a CLI that calls an LLM and it sometimes hangs for 90 seconds. Design the right retry/timeout/UX strategy."

Baseline gives the sensible textbook hybrid (staged timeouts + one auto-retry) — the answer a senior engineer gives in 30 seconds, with no traps named. ADHD spawns 6 isolated frames, surfaces 30+ ideas, flags 20 traps with reasons, and lands the non-obvious pick baseline never considers: the slow model might just be the wrong model for this prompt — instant abort + branch to a cheaper/faster one.


Expand the full side-by-side



🟦 Baseline (single-shot)
🟧 ADHD




Walks through four textbook patterns:

1. Progressive timeout with staged UI (10s / 30s / 60s)
2. Fast-fail + exponential backoff retry
3. Hedged parallel requests
4. Streaming with keepalive

Lands on a hybrid recommendation — 15s first-token timeout, 30s between-token timeout, 90s absolute, one auto-retry. Sensible. Google SRE Book ch. 22. 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.




Spawns 6 isolated frames, surfaces a wide set of 30+ ideas across economic-incentive, async-control-surface, gamification, perceptual-distortion, collective-intelligence, redundancy-race clusters, then:

- ★ Non-obvious pick: "rage-quit = instant abort + branch to cheaper/faster model" — a button that pulses hotter the longer you wait. One click cancels and re-submits to Haiku-class. The thing baseline never considers: the slow model might just be the wrong model for this prompt.
- Plus shortlist: scout-fork to alternate endpoints at 30s; daemonize the CLI with ticket IDs; race 3 LLM replicas, cache the winner.
- 20 traps flagged with one-lin

Snapshot: 2026-11-04T14:00:00Z · Data license Apache-2.0 · JSON