Skip to content
RESEARCH
10 min readЧитать на русском

Hyperfocus Engineering

Hyperfocus Engineering

A Prompt Architecture for On-Demand Executive Function in ADHD / Neurodivergent Operators

Author: Alex Nix Status: Working draft — for public release


Abstract

Productivity advice for ADHD and other neurodivergent operators is dominated by two failure modes: motivational rhetoric ("just start small, you can do it") and generic systems (Pomodoro, GTD, Eisenhower matrix) designed for neurotypical executive function and silently presuming it. Both fail under live cognitive friction: motivation evaporates the moment dopamine doesn't fire, and generic systems collapse because the system itself demands the executive function it claims to replace.

This paper describes Hyperfocus Engineering — a prompt architecture in which an LLM agent serves as externalized executive function on demand. Six composable skills — focus-start, hyperfocus-sprint, dopamine-stack, cognitive-unload, anti-distraction, urgency-mode, with all six SKILL.md files in the companion Hyperfocus Skills pack — are derived from a single shared mechanics catalogue: ten executive-function primitives that the LLM holds in place of the user's prefrontal cortex during a specific bottleneck (task initiation, sustained attention, task switching, working memory). The architecture is opinionated about what not to do — no motivational language, no gamification, no diagnosis-first framing — and is auto-triggered by distress-signal detection in user messages rather than slash invocation.

We describe the architecture, the ten mechanics, the auto-trigger contract, the failure modes observed in production use, and the open problems that remain.


1. Motivation

Three failure modes motivated this work.

Motivation runs out before the task does. Standard productivity advice for ADHD reduces to micro-encouragement: "just start", "five-minute rule", "eat the frog". This works when dopamine fires in response to verbal self-instruction. For many neurodivergent operators it does not. The system is asking the broken organ to fix itself.

Generic frameworks presume the function they replace. Pomodoro [1] presumes that the user can (a) decide which task to work on, (b) suppress task-switching urges for 25 minutes, and (c) return after the break. GTD [2] presumes that capturing items reduces cognitive load — true for users whose working memory was the bottleneck, false for users whose initiation was. Eisenhower matrices presume that priority is the missing input. The presumed input is, in each case, the function ADHD has compromised.

LLMs are executive-function-native. A language model has no problem holding a 7-item working list, sustaining attention across a 90-minute conversation, switching contexts on demand, or initiating a task when prompted. The scarce resources that gate ADHD work — initiation, sustained attention, working memory, task switching — are abundant in the agent. The opportunity is to route those functions through the agent on demand, the same way agentic-wiki-paper routes the maintenance function of a personal wiki through the agent.

This is, in Karpathy's framing [3], a scaffolding problem: external structure compensating for missing internal structure. The contribution of this paper is to make that scaffolding concrete and reusable — six skills, ten mechanics, one auto-trigger contract.


Barkley [4] — the dominant model of ADHD as a disorder of behavioural inhibition, with four downstream executive deficits: working memory, self-regulation of affect, internalization of speech, and reconstitution. Mechanics 5 (attention checkpoint), 6 (return-to-work script), and 9 (cognitive unload) below are direct compensations for these four deficits. The skills do not "treat" anything — they hold the function externally for the duration of a work block.

Csíkszentmihályi [5] — flow as the product of clear feedback × matched challenge. The mechanics catalogue is largely an engineering of the feedback half of this equation: mini-deadline cascade (clear feedback every 10–20 min), reward marker (visible progress), quick-win injection (matched challenge in the opening). ADHD-affected operators can enter flow when feedback is dense and matched; without scaffolding the feedback is sparse and the state never starts.

Cirillo [6] — Pomodoro as the atomic unit of work. We treat Pomodoro as one configuration of the mini-deadline cascade primitive — 25-minute blocks with hard breaks — and generalize it to 25/50/90 with mid-block checkpoints. The novelty is not the timer; it is decoupling the timer from the implicit executive functions Pomodoro silently demands (initiation, return after break).

Karpathy [3, 7] — the LLM-as-scaffold intuition. We borrow the same architectural move from agentic-wiki-paper: the agent owns the function the human finds expensive (there: wiki maintenance; here: executive function), and the human owns the function the agent cannot do (there: curation; here: actual creative work).

Related but rejected: Pure motivational/coaching agents (the agent as cheerleader). These reproduce the failure mode of motivational rhetoric inside a chat interface. The mechanics catalogue is explicit about banning motivational language — see §6.


3. The four bottlenecks

ADHD-affected work fails at four separable points. The architecture's design — six skills, not one — falls out of this decomposition.

| Bottleneck | Symptom phrase | Targeting skill | |---|---|---| | Task initiation | "can't start", "stuck", "залип" | focus-start, urgency-mode | | Sustained attention | "keep losing focus", "отвлекаюсь" | hyperfocus-sprint, anti-distraction | | Task switching | "stuck on another thing", "не могу переключиться" | focus-start, cognitive-unload | | Working memory overflow | "overwhelmed", "перегрузка" | cognitive-unload, dopamine-stack |

A single "universal focus assistant" cannot serve these without becoming generic; the same input that helps an overloaded user (cut-to-impact filtering) actively damages an initiation-blocked user (more decisions to make). The skills are prescriptions under a diagnosis of which bottleneck is firing, surfaced by signal phrases in the user's message.


4. The mechanics catalogue

The ten primitives:

  1. Micro-step ladder — task decomposition to 5–10 min units, first step ≤ 60 s.
  2. Friction removal — front-load every dependency before the timer.
  3. Mini-deadline cascade — visible countdown per block, not just per session.
  4. Quick-win injection — guaranteed-completable subtask in the first 15 min.
  5. Attention checkpoint — scheduled self-check every 10–15 min.
  6. Return-to-work script — fixed 3-line procedure for re-entering after a break.
  7. Reward marker — dopamine peg tied to visible progress, not arbitrary stimulus.
  8. Artificial urgency — countdown + scope reduction + visible stake, decoupled from real deadline.
  9. Cognitive unload — externalize working memory into a brain-dump before planning.
  10. Cut-to-impact — drop / delegate / defer / do filter in strict order.

Each skill is a composition of 2–5 primitives. The map:

| Skill | Mechanics composed | |---|---| | focus-start | 1, 2, 4 | | hyperfocus-sprint | 3, 4, 5, 6, 7 | | dopamine-stack | 4, 7, 1 (per item) | | cognitive-unload | 9, 10 | | anti-distraction | 2 (environment), 5, 6 | | urgency-mode | 8, 3, 7, 4 |

This is the key architectural move: the user-facing surface (six skills) is plural because the bottlenecks are plural, but the underlying primitives are few and reused. New skills (e.g. a morning-routine or body-doubling-mode) compose the same primitives — no new mechanics needed.


5. The auto-trigger contract — behavioral, not lexical

Skills do not require slash invocation. And, critically, they do not wait for the user to name the problem either. The architecture's central trigger mechanism is behavioral inference over the last 2–4 turns of conversation, not phrase matching on the latest message.

Why phrase matching fails. A person mid-task-switch into a third unrelated idea does not say "I'm task-switching" — they bring up the third idea. A person with an immature idea does not announce immaturity — they pitch it as if finished. A person avoiding a far deadline does not say "I'm avoiding it" — they mention it again without approaching it. The exact cognitive state the skills target is the state in which self-diagnosis is unavailable. Trigger systems that wait for verbal self-report fire only on the explicit-complaint subset, which empirically is the minority.

What the agent watches instead — patterns over conversation trajectory:

  • Task switching mid-flow — user raises X while Y from the previous turn is unresolved
  • Impulsive new project — brand-new ambition with no scope/context, especially atop hot work or in off-hours
  • Immature idea — pitch is contradictory, missing specifics, framing shifts within one message
  • Option-floating — multiple alternatives offered without a commitment criterion
  • Scope creep — adding to a task instead of finishing the named slice
  • Avoidance — tangential questions or adjacent files instead of the named task
  • Accumulation — ≥3 distinct work threads opened without closure
  • Avoidance under far deadline — task with a distant deadline mentioned repeatedly without engagement

Phrase matching survives as a backup for the rare cases where the user explicitly self-reports ("can't start", "overwhelmed", "залип"). Skill descriptions list these phrases as fallback heuristics, not primary triggers.

Gates. Four gates prevent false positives:

  1. Urgency gate — auto-fire only when a concrete task exists. Pure venting ("устал", "everything sucks") gets empathy, not a skill.
  2. Ambiguity gate — if two skills match equally, one disambiguating question with max 2 options. Never more.
  3. Diagnosis gate — never use "ADHD" or "neurodivergent" first. Frame as "focus mode". The user's own framing wins.
  4. Chain gate — one skill per turn. Never auto-chain cognitive-unload → hyperfocus-sprint. The next skill is offered as a one-line suggestion.

Why this matters. A skill that requires the user to know its name and remember to invoke it is useless during the exact cognitive state it targets (initiation block, working-memory overflow). The auto-trigger contract puts the recognition burden on the agent, not the user. This is the same intuition as a smoke alarm: the system that recognizes the problem must be external to the person experiencing it.


6. Failure modes observed in production

False fire on venting. Early versions fired cognitive-unload on phrases like "tired, everything sucks" without a task in scope. The user wanted empathy; the skill offered a brain-dump exercise. Fix: the urgency gate (rule 1). Empirically, the gate filters ~30% of trigger phrases — pure affect without operational intent.

Mechanic over-stacking. A version of hyperfocus-sprint initially composed all five candidate mechanics into the output. The plan became a dense form with three nested timers and a checklist of 14 items — the exact cognitive load the skill was supposed to prevent. Fix: each skill caps at 5 mechanics; outputs are bounded to one screen.

Motivational drift. Without explicit ban, models default to motivational closes ("you've got this!"). For the target user this is at best noise and at worst counterproductive (it implies that motivation is the missing input, which is exactly the false premise the architecture rejects). Fix: each skill has an explicit "what you don't do" section; the underlying mechanics catalogue's anti-patterns are loaded by every skill.

Fake stakes producing real anxiety. urgency-mode initially framed the countdown without a "this is a simulation" disclaimer. Some users responded to the framing with real anxiety, breaking the next block. Fix: explicit "this is a simulation, there's no real deadline" line in every urgency-mode output, plus a post-output anxiety check ("does this pressure feel like a game or like real anxiety?").

Diagnosis-first framing alienates users. A version of the auto-trigger rules used "ADHD productivity mode" in the user-facing surface. Users who hadn't self-identified felt boxed; users who had self-identified felt patronized. Fix: skills and triggers are neutral ("focus modes"); the paper alone uses the clinical framing, for discoverability and to ground the work in the literature.


7. Measurement & open problems

How would we know a skill worked? Three signals:

  1. Task completion within block — declared subtask closed by declared time.
  2. Self-reported friction drop — debrief one-liner: "easier than usual" / "same" / "worse".
  3. No post-block crash — the operator is capable of a next action, not collapsed.

These are weak signals individually but co-vary in production. Per-session debriefs accumulate over time. Open problem: at what N does the dataset become useful for calibrating skills per user (e.g. learning that this user's optimal block is 35 min, not the default 50)?

Generalizability. The architecture was designed by and for an ADHD operator. We believe the primitives are universal — neurotypical users benefit from quick-win injection and friction removal too — but the necessity of the architecture is asymmetric. For neurotypical users the skills are a productivity tool; for ADHD users they are a prosthesis. Open problem: is there a sharper way to characterize when the architecture is needed vs. merely useful?

Composition with other agentic layers. This architecture composes with agentic-wiki-paper (the wiki holds debriefs, project state, and skill registry) and with two-stage-architect-pattern-paper (planning agents call focus skills before initiating long blocks). Open problem: a meta-skill that, given a project state and a calendar, schedules focus blocks rather than reacting to user distress phrases. This shifts the architecture from reactive to proactive — desirable but with much higher false-positive risk.


8. Reference implementation

The reference implementation is six Claude Code skills under ~/.claude/skills/{focus-start, hyperfocus-sprint, dopamine-stack, cognitive-unload, anti-distraction, urgency-mode}/SKILL.md, a shared mechanics catalogue, and an auto-trigger ruleset in the global agent config. The verbatim SKILL.md content for all six lives in the companion concept page Hyperfocus Skills.

All skills are reproducible from the concept file alone: the SKILL.md files compose primitives; the primitives are defined once in the concept; new skills can be added by composing new primitive subsets.


References

  1. Cirillo, F. The Pomodoro Technique. Currency, 2018.
  2. Allen, D. Getting Things Done. Penguin, 2001.
  3. Karpathy, A. On LLM-maintained scaffolding for missing structure. X / blog notes, 2024–2025.
  4. Barkley, R. A. Behavioral inhibition, sustained attention, and executive functions: constructing a unifying theory of ADHD. Psychological Bulletin, 121(1), 65–94 (1997).
  5. Csíkszentmihályi, M. Flow: The Psychology of Optimal Experience. Harper & Row, 1990.
  6. Cirillo, F. Op. cit.
  7. Karpathy, A. On the LLM Wiki. Source for the scaffolding/maintenance argument also used in agentic-wiki-paper.

Sibling papers in this series: aoc-framework-paper · two-stage-architect-pattern-paper · lock-layer-pattern-paper · deliberate-omission-paper · sequential-consistency-prompt-architecture-paper · agentic-wiki-paper.