[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-79363":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":44,"readmeContent":45,"aiSummary":46,"trendingCount":16,"starSnapshotCount":16,"syncStatus":47,"lastSyncTime":48,"discoverSource":49},79363,"adhd","UditAkhourii\u002Fadhd","UditAkhourii","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.","https:\u002F\u002Fuditakhourii.github.io\u002Fadhd\u002F",null,"TypeScript",804,38,5,13,0,6,62,683,34,90.81,"MIT License",false,"main",true,[5,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"agents","ai","ai-agents","brainstorm","chain-of-thought","claude","claude-agent-sdk","creativity","divergent-thinking","ideation","interdisciplinary","llm","llm-tools","nodejs","prompt-engineering","tree-of-thought","typescript","2026-06-12 04:01:24","\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fadhdstack.github.io\u002F\">\n    \u003Cimg src=\"docs\u002Fhero.png\" alt=\"ADHD for Claude Code\" width=\"100%\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n# ADHD — a skill for agents\n\n[![CI](https:\u002F\u002Fgithub.com\u002FUditAkhourii\u002Fadhd\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FUditAkhourii\u002Fadhd\u002Factions\u002Fworkflows\u002Fci.yml)\n[![npm](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fadhd-agent.svg)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fadhd-agent)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg)](.\u002FLICENSE)\n[![Node](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fnode-%3E%3D18-brightgreen)](#install)\n[![Paper](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpaper-preprint-blueviolet)](https:\u002F\u002Fadhdstack.github.io\u002F)\n\n> **An architectural fix for premature convergence in autoregressive reasoning.**\n\n📄 **Preprint:** [ADHD: Parallel Divergent Ideation for Coding Agents](https:\u002F\u002Fadhdstack.github.io\u002F)\n👤 **Author:** Udit Akhouri — [@akhouriudit](https:\u002F\u002Fx.com\u002Fakhouriudit) · [LinkedIn](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fudit-akhouri-10160a168\u002F) · researchudit@gmail.com\n\nLinear Chain-of-Thought gets trapped in local minima: each generated token conditions the next, so the model anchors on whatever it said first. Tree-of-Thought widens the search but still walks a single shared context, so 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 survivors.\n\nLike Steve Jobs' *connecting the dots* — but the dots get generated under deliberate cognitive distortion first, in parallel, with the critic switched off, before any of them are evaluated.\n\nIt is the no-brainer skill to reach for on **creative work, interdisciplinary work, design decisions, fuzzy debugging, naming, API surface design, strategy, positioning, and any prompt of the shape *\"give me a few ways to…\"***.\n\nShips three ways: as an **agent skill** ([`skills\u002Fadhd\u002FSKILL.md`](.\u002Fskills\u002Fadhd\u002FSKILL.md), drop-in via `npx skills add UditAkhourii\u002Fadhd`, works in Claude Code, Cursor, Antigravity, Codex, and ~50 more), as a **Node\u002FTS library** ([`adhd-agent`](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fadhd-agent) on npm), and as a **CLI** (`adhd \"your problem here\"`). The library and CLI are built on the [Claude Agent SDK](https:\u002F\u002Fdocs.claude.com\u002Fen\u002Fapi\u002Fagent-sdk).\n\n---\n\n## Install\n\n### One command, every agent\n\n```bash\nnpx skills add UditAkhourii\u002Fadhd\n```\n\nThat is it. The [`skills`](https:\u002F\u002Fgithub.com\u002Fvercel-labs\u002Fskills) CLI detects which agent you are using and drops [`skills\u002Fadhd\u002FSKILL.md`](.\u002Fskills\u002Fadhd\u002FSKILL.md) into the right place. Supports **Claude Code, Claude.ai, Antigravity, Cursor, Codex, Cline, Continue, Aider, Gemini CLI, Windsurf, Cody, Roo, Augment, OpenCode, Kilo, Kimi, Qwen, Trae, Replit, Warp**, and ~40 more.\n\nRestart your agent. The skill auto-triggers on brainstorm, ideate, design, naming, refactor, and \"give me a few ways to\" intents. Or invoke it explicitly: `\u002Fadhd \"design a rate limiter that survives a leader election\"`.\n\nUseful flags:\n\n```bash\nnpx skills add UditAkhourii\u002Fadhd -g            # install globally instead of per-project\nnpx skills add UditAkhourii\u002Fadhd -a claude-code -a cursor   # target specific agents\nnpx skills add UditAkhourii\u002Fadhd --copy        # copy files instead of symlinking\nnpx skills add UditAkhourii\u002Fadhd --list        # see what skills the repo offers\n```\n\n### Manual install (if you do not have npx)\n\nThe skill file is at [`skills\u002Fadhd\u002FSKILL.md`](.\u002Fskills\u002Fadhd\u002FSKILL.md). Curl it into your agent's skill directory:\n\n```bash\n# Claude Code (global)\nmkdir -p ~\u002F.claude\u002Fskills\u002Fadhd\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002FUditAkhourii\u002Fadhd\u002Fmain\u002Fskills\u002Fadhd\u002FSKILL.md \\\n  -o ~\u002F.claude\u002Fskills\u002Fadhd\u002FSKILL.md\n\n# Claude Code (per-project)\nmkdir -p .claude\u002Fskills\u002Fadhd\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002FUditAkhourii\u002Fadhd\u002Fmain\u002Fskills\u002Fadhd\u002FSKILL.md \\\n  -o .claude\u002Fskills\u002Fadhd\u002FSKILL.md\n\n# Cursor (project rules)\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002FUditAkhourii\u002Fadhd\u002Fmain\u002Fskills\u002Fadhd\u002FSKILL.md >> .cursorrules\n```\n\nFor **Claude.ai web\u002Fdesktop**: open project settings → **Skills** → **Add skill** → upload [`skills\u002Fadhd\u002FSKILL.md`](.\u002Fskills\u002Fadhd\u002FSKILL.md).\n\nFor **Cline, Continue, Aider, Roo Code, and other agents**: paste the body of [`SKILL.md`](.\u002Fskills\u002Fadhd\u002FSKILL.md) (skip the YAML frontmatter) into your agent's system prompt or rules field.\n\n### Programmatic install (Agent SDK)\n\n```ts\nimport { query } from \"@anthropic-ai\u002Fclaude-agent-sdk\";\nimport { readFileSync } from \"node:fs\";\n\nconst skill = readFileSync(\".\u002Fskills\u002Fadhd\u002FSKILL.md\", \"utf8\");\n\nfor await (const m of query({\n  prompt: \"design a retry strategy for a CLI whose LLM hangs for 90s\",\n  options: {\n    systemPrompt: { type: \"preset\", preset: \"claude_code\", append: skill },\n    allowedTools: [\"Task\"],\n  },\n})) {\n  \u002F\u002F …\n}\n```\n\n### As a CLI (terminal usage, no agent needed)\n\n```bash\nnpm install -g adhd-agent\nadhd \"design a rate limiter that survives a leader election\"\n```\n\nAuth: picks up `ANTHROPIC_API_KEY` from the environment, or inherits auth from a local Claude Code install.\n\n### As a library (inside your own agent)\n\n```bash\nnpm install adhd-agent\n```\n\n```ts\nimport { run } from \"adhd-agent\";\nconst result = await run({ problem: \"...\", framesPerRun: 5, topK: 3 });\n```\n\n### From source\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FUditAkhourii\u002Fadhd.git\ncd adhd && npm install && npm run build\n```\n\n---\n\n## Quickstart\n\n### CLI\n\n```bash\nadhd \"design a rate limiter that survives a leader election\"\n\nadhd \"name this function\" --frames 3 --ideas 8 --top 2\n\nadhd \"we have a CLI that hangs for 90s on LLM calls. what's the right retry\u002FUX?\" \\\n    --frames 5 --ideas 6 --top 3 --context .\u002Fclient.ts\n\nadhd \"...\" --json > result.json\n```\n\n### Library\n\n```ts\nimport { run, renderText } from \"adhd-agent\";\n\nconst result = await run({\n  problem: \"How should we shard this queue under bursty load?\",\n  context: readFileSync(\".\u002Fqueue.ts\", \"utf8\"),\n  framesPerRun: 6,\n  ideasPerFrame: 8,\n  topK: 3,\n  onEvent: (e) => console.error(e),\n});\n\nconsole.log(renderText(result));\n\u002F\u002F or operate on:\n\u002F\u002F   result.shortlist        → 2–4 most promising ideas with scores\n\u002F\u002F   result.nonObviousPick   → the highest-novelty viable one\n\u002F\u002F   result.traps            → \"looks good but isn't\" list, with reasons\n\u002F\u002F   result.deepened         → top-K expanded: sketch + risk + first step + child ideas\n\u002F\u002F   result.clusters         → the SHAPE of the idea space\n```\n\n---\n\n## What ADHD actually is\n\nA two-phase loop with a hard wall between the phases. Mixing them is what kills idea quality, because the critic strangles the generator.\n\n### Phase 1 — Diverge (ADHD mode)\n\nPick N **cognitive frames** from the frame library. Spawn N **parallel** Agent SDK queries, each one a fresh isolated session.\n\nEach branch sees:\n- the problem\n- *one* frame's vantage prompt (e.g. *\"You think in latency, memory layout, and physical constraints. Re-ask this as a hardware problem.\"*)\n- a system prompt that **forbids evaluation, ranking, or hedging** — pure generation, JSON array out, no prose.\n\nCritically: branches **do not see each other**. The \"regulator\" branch never reads what the \"speedrunner\" branch wrote. No anchoring, no shared context, no convergence pressure.\n\n### Phase 2 — Focus\n\nNow the critic comes back online. Three passes:\n\n1. **Score** every leaf on `novelty \u002F viability \u002F fit`. Tag traps with reasons.\n2. **Cluster** by underlying angle, not surface keywords (\"remove-the-server plays\", \"cache-shaped plays\") — surfaces the *shape* of the space.\n3. **Deepen** top-K: sketch how it works, name the load-bearing risk, name the first concrete step, generate 3–5 child ideas (variations, hybrids, unlocks).\n\nOutput:\n- the wide set, clustered\n- a 2–4 idea shortlist\n- the **non-obvious-but-viable pick** flagged explicitly\n- the trap list, each trap with the reason it's a trap\n- the deepened branches — the \"connected dots\"\n- one provocation (a wildcard question)\n\n---\n\n## Architecture — how parallel divergence works under the hood\n\nFor researchers and infra folks: the mechanism, not the metaphor.\n\n### Context-window management\n\nEach divergent branch is its own `query()` call against the [Claude Agent SDK](https:\u002F\u002Fdocs.claude.com\u002Fen\u002Fapi\u002Fagent-sdk) — a fresh, **stateless session** with no shared KV-cache, no shared message history, no shared system prompt beyond the `claude_code` preset. The only tokens that enter a branch are:\n\n```\nsystem  = preset + frame_vantage_prompt + \"forbid evaluation\u002Franking\u002Fhedging, JSON array out\"\nuser    = problem + optional_context\n```\n\nToken cost scales **linearly** in branches (`O(N × per_branch)`), not quadratically — there's no broadcast of prior branches into later ones. The \"ADHD\" fan-out is true concurrent inference, not interleaved decoding on a shared trajectory. See [`src\u002Fllm.ts`](.\u002Fsrc\u002Fllm.ts) and [`src\u002Fdiverge.ts`](.\u002Fsrc\u002Fdiverge.ts).\n\n### Pruning & convergence criteria\n\nConvergence is a **separate LLM call** with an inverted system prompt (critic posture, evaluation mandatory). It performs three structured passes — see [`src\u002Fscore.ts`](.\u002Fsrc\u002Fscore.ts), [`src\u002Fcluster.ts`](.\u002Fsrc\u002Fcluster.ts), [`src\u002Fdeepen.ts`](.\u002Fsrc\u002Fdeepen.ts):\n\n1. **Score** — every leaf scored on `novelty \u002F viability \u002F fit` (0–10 each), structured JSON. Traps tagged with a mechanistic reason (e.g. *\"shelve isn't thread-safe under multi-writer load\"*), not a vague risk label.\n2. **Cluster** — angle-level grouping (\"remove-the-server plays\", \"cache-shaped plays\"), not surface-keyword clustering. Surfaces the *shape* of the design space.\n3. **Deepen top-K** — for the K highest combined-score non-trap leaves, generate: sketch, load-bearing risk, first concrete step, 3–5 child ideas (variations \u002F hybrids \u002F unlocks).\n\nNo heuristic threshold and no logit-bias steering. The critic's structured output is the pruning decision. Default `K=3`; the `nonObviousPick` field surfaces the highest-novelty viable leaf even if it's not the highest-fit.\n\n### Routing & orchestration\n\nMulti-agent orchestration via parallel `query()` calls, gated by a configurable semaphore (`concurrency`, default 4). Frame selection (see [`src\u002Fframes.ts`](.\u002Fsrc\u002Fframes.ts)) is deterministic per-seed with a `codeMode` bias toward engineering vantage points. Each frame is a **system-prompt payload** that re-poses the entire question — *\"re-ask this as a hardware problem\"*, *\"re-ask this as a regulator\"*, *\"re-ask this as a 10-year-old\"* — not a logit-level intervention.\n\n```ts\n\u002F\u002F the load-bearing call shape — bench\u002Frun-evals.ts and src\u002Fdiverge.ts\nconst branches = await Promise.all(\n  frames.map(frame => withSemaphore(concurrency, () => callLLM({\n    systemPrompt: `${frame.vantage}\\n\\nFORBIDDEN: evaluation, ranking, hedging. JSON array out.`,\n    userPrompt:   `${problem}\\n\\n${context ?? \"\"}`,\n  })))\n);\n\u002F\u002F branches[i] never sees branches[j] during divergence — by construction.\n```\n\nThe generator-critic split is **mechanical** (different API calls, different system prompts) rather than promised in-prompt to the same session. This is the load-bearing design choice that distinguishes ADHD from in-context ToT.\n\n---\n\n## How ADHD is different from Chain-of-Thought (and Tree-of-Thought)\n\nEasy to conflate. They are structurally different.\n\n| | Chain-of-Thought | Tree-of-Thought | **ADHD** |\n|---|---|---|---|\n| **Threads** | one, linear | one tree, walked | **N parallel, isolated** |\n| **Branches share context** | yes | yes (one session) | **no — each branch is its own `query()`** |\n| **Generator vs critic** | same step | same model, alternating | **separated phases, separate LLM calls, opposite system prompts** |\n| **Branching driver** | none | next-step variations | **cognitive frames** — re-ask the *whole question* from a different vantage point |\n| **Parallelism** | sequential | mostly sequential | **true concurrent API calls** |\n| **Goal** | correct reasoning | find a solving path | **escape premature convergence; surface non-obvious viable options** |\n| **Right for** | math, multi-step logic | search, planning, puzzles | **open-ended design & ideation** |\n\n### The three load-bearing differences\n\n**1. Isolation, not search.**\nCoT and ToT branches share a context window — by step 4, the model has anchored on what it wrote in steps 1–3. ADHD branches **never see each other** during divergence. Anchoring is eliminated by construction, not by prompting.\n\n**2. Frames, not next-step variation.**\nToT branches typically vary the next move (\"try this number \u002F try that number\"). ADHD varies the *entire vantage point of the generator*. It's not \"what's the next step from here,\" it's *\"re-ask the whole question as if you were an immune system.\"* That produces structurally different ideas, not nearby ones — which is what interdisciplinary work needs.\n\n**3. Generator–critic split is mechanical, not promised.**\nIn CoT and ToT, the model evaluates as it goes. ADHD makes divergence its own LLM call with a system prompt that *forbids* evaluation. Convergence is a separate call with the opposite posture. Two postures, two passes, mutually exclusive.\n\n### One-sentence version\n\n> CoT makes one head think slower. ToT makes one head search wider. **ADHD makes many heads think differently, in parallel, then has a critic pick.**\n\n### Pop-sci version\n\n> CoT is one careful person reasoning aloud. ToT is one person playing chess looking N moves ahead. **ADHD is a brainstorm room with a hardware engineer, a regulator, a 10-year-old, and a speedrunner in it — then a separate room with the editor.**\n\n### Where it overlaps with ToT\n\nADHD *is* a tree-of-thought variant: the deepen pass literally expands top-K nodes. What's new is **what drives the branching** (frames, not next-step) and **how the generator\u002Fcritic split is enforced** (separate LLM calls, separate system prompts, zero shared context during divergence).\n\n---\n\n## Why this is the no-brainer skill for creative and interdisciplinary work\n\nCreative and cross-domain work is exactly the regime where premature convergence costs the most.\n\n- The right answer is often **not in any one domain's playbook** — you need to *transplant* a mechanism. ADHD's cross-domain frames (biology, logistics, game design, markets) do this on purpose.\n- The textbook answer is usually a **trap** — it looks right because it's familiar. ADHD's separate critic pass flags traps with named reasons, not just \"could be risky.\"\n- The interesting ideas live in the **awkward middle** — past the first 3, before the absurd. Single-pass generation never gets there because each token is biased by the previous one. Parallel isolated branches do.\n- You don't always know **what good looks like** yet. ADHD's cluster pass surfaces the *shape* of the design space so you can argue at the angle level, not idea-by-idea.\n\nIn one line: **ADHD is what to reach for the moment a single-pass agent would give you a competent, forgettable answer.**\n\n---\n\n## Frames (the cognitive distortions)\n\n15 built-in frames, biased toward engineering when `--code-mode` is on. Each is a vantage prompt + tags. Some examples:\n\n- **Hardware engineer** — *\"You think in latency, memory layout, physical constraints.\"*\n- **Regulator \u002F auditor** — *\"What must be provable, traceable, refusable?\"*\n- **10-year-old** — *\"Ignore convention. What's the naive but unencumbered approach?\"*\n- **Competitor trying to break it** — adversarial; ideas surface by inversion\n- **Biology** — immune systems, neural plasticity, cell signaling, gut flora\n- **Logistics** — queues, batching, just-in-time, hub-and-spoke, returns\n- **Game design** — loops, rewards, friction, save-states, speedrun tricks\n- **Markets** — auctions, futures contracts, clearing houses\n- **Inversion** — ask the opposite question, then negate\n- **$0 budget \u002F infinite budget** — extremes break anchoring\n- **Remove the load-bearing assumption** — what's possible if the framework \u002F DB \u002F network is gone?\n- **Speedrunner** — glitches, skips, frame-perfect shortcuts\n- **Ant colony \u002F swarm** — no central planner, local rules, emergent behavior\n- **3am on-call** — what design would let you not get paged?\n\nEdit [`src\u002Fframes.ts`](.\u002Fsrc\u002Fframes.ts) to add your own. A frame is 5 lines.\n\n---\n\n## When to use ADHD (and when not to)\n\n**Use it for:**\n- Architecture & design decisions (storage layer, sharding, auth model, queue topology, retry strategy)\n- API \u002F SDK \u002F CLI surface design\n- Fuzzy debugging — generate *hypothesis classes* you haven't considered\n- Migration & refactor planning\n- Naming — functions, products, services, env vars\n- Code review widening — what could go wrong here, beyond the checklist\n- Strategy, positioning, pricing — anywhere you'd say *\"give me a few ways to…\"*\n- **Inside agent loops** at decision points where the cost of premature convergence is high\n\n**Don't use it for:**\n- Lookup questions\n- Bug fixes with a known root cause\n- Anything where the right answer is one Google away\n- Inner-loop \u002F tight latency \u002F per-keystroke use\n- Single-correct-answer problems\n\n> One-sentence test: *If a junior would Google it and find the answer, baseline wins. If a senior would say \"hm, let me think about this differently for a minute\" — that's the moment ADHD replaces.*\n\n---\n\n## Cost & speed\n\nHonest numbers. A default run is roughly:\n\n- N parallel divergence calls (default 5 but can be increased to n=infinity)\n- 1 scoring call\n- 1 clustering call\n- K deepen calls (default 3)\n\n≈ **10 LLM calls per run**, 5–10x a single-shot baseline. Latency depends on concurrency; 30–90s wall clock is typical.\n\nFrame it as: **$0.30 to widen a $50k architecture decision.** Don't run it on every keystroke. Run it at decision points.\n\n---\n\n## CLI flags\n\n| Flag | Default | What |\n| --- | --- | --- |\n| `--frames N` | 5 | parallel divergence branches |\n| `--ideas N` | 6 | ideas per branch |\n| `--top N` | 3 | how many to deepen \u002F focus |\n| `--concurrency N` | 4 | max parallel LLM calls |\n| `--context PATH` | — | inject a file as context (code, stack, constraints) |\n| `--model NAME` | SDK default | override model |\n| `--no-code-mode` | — | don't bias frames toward engineering |\n| `--json` | — | emit machine-readable `RunResult` |\n| `--quiet` | — | suppress progress events |\n\n---\n\n## Library API (TypeScript)\n\n```ts\nimport { run, renderText, FRAMES, selectFrames } from \"adhd-agent\";\nimport type {\n  RunOptions, RunResult, Idea, Branch, Cluster,\n  DeepenedIdea, Score, RunEvent,\n} from \"adhd-agent\";\n\ntype RunOptions = {\n  problem: string;\n  context?: string;\n  framesPerRun?: number;   \u002F\u002F default 5\n  ideasPerFrame?: number;  \u002F\u002F default 6\n  topK?: number;           \u002F\u002F default 3\n  concurrency?: number;    \u002F\u002F default 4\n  codeMode?: boolean;      \u002F\u002F default true\n  model?: string;\n  onEvent?: (e: RunEvent) => void;\n};\n```\n\nEverything in `RunResult` is structured — clusters, scored ideas with `novelty \u002F viability \u002F fit`, trap reasons, deepened sketches with child ideas. You can route it into your own renderer, downstream agent, or planning loop.\n\n---\n\n## Use ADHD inside your own agent\n\nThe shape that pays the most: call `run()` at decision points inside a larger agent loop.\n\n```ts\n\u002F\u002F inside your planning \u002F coding \u002F review agent\nif (agentIsAtADecisionPoint) {\n  const { shortlist, nonObviousPick, traps, deepened } = await run({\n    problem: framedDecision,\n    context: relevantCode,\n    framesPerRun: 4,\n    topK: 2,\n    codeMode: true,\n  });\n  \u002F\u002F feed the deepened sketches back into your agent's context\n}\n```\n\nGood moments to call it:\n- agent stuck after N attempts on a bug — widen the hypothesis space\n- planning agent at a branch point with high uncertainty\n- code-review agent asked *\"what could go wrong here\"*\n- refactor agent picking which abstraction to introduce\n- test-generation agent generating adversarial inputs (inversion frame)\n\n---\n\n## Evals\n\nADHD ships with a reproducible eval suite that compares it head-to-head against a single-shot baseline across a set of open-ended engineering problems. An LLM-as-judge with a skeptical-staff-engineer system prompt scores both outputs on five dimensions — **breadth**, **novelty**, **trap detection**, **actionability**, **builder usefulness** — and declares a winner. A\u002FB order is randomized per problem to balance positional bias.\n\n### Headline results\n\nMean scores across 6 problems (0–10). Full per-problem verdicts in [`EVALS.md`](.\u002FEVALS.md).\n\n| Dimension          | ADHD     | Baseline | Δ        | Ratio    |\n| ------------------ | -------: | -------: | -------: | -------: |\n| breadth            | **9.00** | 4.83     | **+4.17** | 1.9× |\n| novelty            | **7.83** | 2.67     | **+5.17** | 2.9× |\n| trap_detection     | **9.50** | 1.83     | **+7.67** | 5.2× |\n| actionability      | **9.50** | 6.50     | **+3.00** | 1.5× |\n| builder_usefulness | **7.67** | 6.83     | **+0.83** | 1.1× |\n\nADHD wins 5 of 6 problems head-to-head. The biggest gap is **trap detection** — single-shot baselines almost never name the seductive-but-broken ideas, while ADHD's separate critic pass routinely flags 15–20 of them with mechanistic reasons.\n\n_Run date: 2026-05-25. Re-run anytime with `npm run evals`._\n\n```bash\nnpm run evals          # full suite (~6 problems, ~10 LLM calls each)\nnpm run evals:quick    # first 2 problems\nnpm run evals -- --problem lru-100ms   # one specific problem\n```\n\nOutput: [`EVALS.md`](.\u002FEVALS.md) (human-readable verdicts + aggregate table) and `bench\u002Fresults.json` (full transcripts).\n\nThe eval suite is **local only**. There is no CI workflow for it. Reproducible numbers come from `npm run evals` on your machine; commit the resulting `EVALS.md` if you want to update the repo's published figures. The committed `EVALS.md` was generated this way.\n\nAdding a new problem is a 4-line change to [`bench\u002Fproblems.json`](.\u002Fbench\u002Fproblems.json) — see [CONTRIBUTING.md](.\u002FCONTRIBUTING.md).\n\n---\n\n## Roadmap\n\n- [ ] Recursive deepen (multi-level ToT, not just one)\n- [ ] Pluggable scorers (user-defined weights, custom trap detectors)\n- [ ] Frame packs (security, ML, frontend, distsys, product)\n- [ ] Memory across runs — learn which frames win for which problem shapes\n- [ ] Streaming output during divergence\n- [ ] Cross-LLM support (frames don't depend on Claude)\n\n---\n\n## Star History\n\n\u003Ca href=\"https:\u002F\u002Fwww.star-history.com\u002F?repos=uditakhourii%2Fadhd&type=date&legend=top-left\">\n  \u003Cimg alt=\"Star History Chart\" src=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=uditakhourii\u002Fadhd&type=date&legend=top-left\" style=\"background:#ffffff\" \u002F>\n\u003C\u002Fa>\n\n---\n\n## External reviews\n\n- [**Han plugin compatibility analysis**](https:\u002F\u002Fgithub.com\u002Ftestdouble\u002Fhan\u002Fblob\u002Fadhd-swarm-research\u002Fdocs\u002Fresearch\u002Fadhd-application-to-han.md) by [@mxriverlynn](https:\u002F\u002Fwww.reddit.com\u002Fuser\u002Fmxriverlynn) — evidence-based review using Han's own `\u002Fresearch` skill, 11 sources, 8 validation rounds. Findings tracked as issues [#16](https:\u002F\u002Fgithub.com\u002FUditAkhourii\u002Fadhd\u002Fissues\u002F16), [#17](https:\u002F\u002Fgithub.com\u002FUditAkhourii\u002Fadhd\u002Fissues\u002F17), [#18](https:\u002F\u002Fgithub.com\u002FUditAkhourii\u002Fadhd\u002Fissues\u002F18).\n\n---\n\n## License\n\nMIT License.\n\n---\n\n## Credits\n\nADHD operationalizes the *Divergent Ideation* source spec — see [SOURCE-SPEC.md](.\u002FSOURCE-SPEC.md) for the original prose. The runnable skill is at [`skills\u002Fadhd\u002FSKILL.md`](.\u002Fskills\u002Fadhd\u002FSKILL.md).\n\n---\n\n## Contact\n\n**Udit Akhouri** — author of the preprint and maintainer of this repo.\n\n- 📄 Preprint: [adhdstack.github.io](https:\u002F\u002Fadhdstack.github.io\u002F)\n- 🐦 X \u002F Twitter: [@akhouriudit](https:\u002F\u002Fx.com\u002Fakhouriudit)\n- 💼 LinkedIn: [udit-akhouri](https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fudit-akhouri-10160a168\u002F)\n- ✉️  Email: [researchudit@gmail.com](mailto:researchudit@gmail.com)\n- 🐙 GitHub: [@UditAkhourii](https:\u002F\u002Fgithub.com\u002FUditAkhourii)\n\nOpen to collaboration with research labs and applied-AI teams working on reasoning, planning, and agentic systems.\n","ADHD 是一个为编码代理设计的技能，基于Claude Agent SDK构建，采用树状思维并进行剪枝处理。其核心功能在于通过在不同认知框架下并行展开发散性思维，对想法进行评分、剔除陷阱，并深化有价值的想法。技术上，它利用TypeScript开发，能够有效避免自回归推理中的过早收敛问题。适合应用于创意工作、跨学科研究、设计方案决策、模糊调试、命名、API界面设计、策略制定等需要多角度思考的场景。无论是作为代理技能、Node\u002FTS库还是命令行工具，ADHD都易于集成和使用，支持多种编码环境。",2,"2026-06-11 03:57:46","CREATED_QUERY"]