i-have-adhd On-Demand vs Always-On Activation Modes: Technical Guide
The i-have-adhd skill operates through two distinct activation strategies: on-demand mode requires explicit command invocation for single interactions, while always-on mode leverages hook scripts in hooks/always-on.sh or hooks/always-on.mjs to automatically transform every assistant response until the hook file is removed.
The ayghri/i-have-adhd repository implements ADHD-friendly formatting rules through a dual-mode architecture that accommodates different user workflows. Understanding the technical distinction between on-demand and always-on activation allows you to choose between explicit control and persistent automation when integrating these accessibility features into your AI assistant interactions.
How On-Demand Activation Works
On-demand mode provides granular, per-interaction control over the ADHD formatting rules. When you explicitly invoke the skill using the /i-have-adhd command, the system activates the rule set for that specific response only.
This mode is ideal for users who need occasional formatting assistance rather than continuous modifications to every assistant output. After the assistant generates the formatted response, the skill returns to an inactive state, requiring another explicit command for subsequent use.
/user: /i-have-adhd
assistant: ADHD MODE ACTIVE (on-demand). The rules below apply to this response only.
How Always-On Activation Works
Always-on mode implements a persistent hook-based system that automatically prepends the ADHD-friendly rules to every assistant response. According to the source code in ayghri/i-have-adhd, this mode activates through the presence of dedicated hook files in the hooks/ directory.
The repository provides two hook implementations: hooks/always-on.sh for shell-based environments and hooks/always-on.mjs for Node.js runtimes. The activation behavior is declared in hooks/hooks.json, which manages how the assistant intercepts and processes outgoing responses.
When always-on mode is active, the system displays a banner message on the first interaction indicating that "ADHD MODE ACTIVE (always-on)" is running, along with the specific rule set being applied to every subsequent response.
Enabling Always-On Mode
Activate persistent formatting by creating or ensuring the existence of the hook file:
# Install the always-on hook for continuous activation
touch hooks/always-on.sh
# Alternatively, copy the provided script to your hooks directory
cp hooks/always-on.sh /path/to/your/hooks/directory/
Once the hook file exists, every assistant reply automatically receives the ADHD-friendly formatting without requiring explicit commands:
assistant: ADHD MODE ACTIVE (always-on). The rules below apply to every response.
Disabling Always-On Mode
To deactivate persistent mode, remove the hook file or delete the session marker file referenced in the activation banner:
# Remove the hook file to disable always-on behavior permanently
rm hooks/always-on.sh
# Or remove the session-specific marker file (location varies by system)
rm ~/.i-have-adhd-always-on
Key Differences Between Activation Modes
On-demand mode requires explicit user intervention through the /i-have-adhd command and applies formatting to single interactions only. This approach preserves the default assistant behavior for most conversations while allowing targeted accessibility support when needed.
Always-on mode utilizes the hooks/always-on.sh or hooks/always-on.mjs scripts to intercept and modify every response automatically. This mode suits users who consistently require ADHD-friendly formatting and prefer not to invoke commands repeatedly.
| Feature | On-Demand Mode | Always-On Mode |
|---|---|---|
| Activation Method | Explicit command (/i-have-adhd) |
File existence check (hooks/always-on.*) |
| Duration | Single response | Persistent until hook removal |
| Control Granularity | Per-interaction | Global/session-wide |
| Indicator | "ADHD MODE ACTIVE (on-demand)" banner | "ADHD MODE ACTIVE (always-on)" banner |
Implementation Details
The always-on mechanism relies on the hook declaration in hooks/hooks.json, which specifies how the assistant runtime should load and execute the formatting rules. The shell script version (hooks/always-on.sh) provides POSIX-compliant compatibility, while the JavaScript version (hooks/always-on.mjs) supports Node.js-based assistant implementations.
Both hook variants check for the existence of a marker file (typically located at ~/.i-have-adhd-always-on or similar) to determine whether to inject the formatting preamble into the current response stream. This file-based state management allows for session persistence without requiring background processes or configuration changes.
Summary
- On-demand mode activates via explicit
/i-have-adhdcommands and formats only the immediate response. - Always-on mode uses
hooks/always-on.shorhooks/always-on.mjsto automatically format every assistant reply. - The always-on system displays a persistent activation banner on first run to confirm "ADHD MODE ACTIVE (always-on)" status.
- Disable always-on mode by deleting the hook file or removing the session marker file (e.g.,
~/.i-have-adhd-always-on). - The hook behavior is configured in
hooks/hooks.json, supporting both shell and JavaScript runtime environments.
Frequently Asked Questions
How do I temporarily disable always-on mode without deleting the hook file?
Remove the session marker file referenced in the activation banner, typically located at ~/.i-have-adhd-always-on. This disables the always-on behavior for the current session while preserving the hook file for future reactivation.
What is the difference between always-on.sh and always-on.mjs?
hooks/always-on.sh provides a shell script implementation for POSIX-compliant environments and bash-based assistant runtimes, while hooks/always-on.mjs offers a JavaScript/Node.js version for modern JavaScript-based AI frameworks. Both files implement identical formatting logic but use runtime-specific APIs for response interception.
Can I use both activation modes simultaneously?
While both modes can technically coexist in the installation, always-on mode effectively supersedes on-demand functionality because the hook processes every response automatically. If always-on is active, invoking /i-have-adhd becomes redundant since all responses already receive the ADHD-friendly formatting.
Where does the always-on mode store its activation state?
The always-on mode uses a file-based state system. The presence of hooks/always-on.sh (or .mjs) enables the hook mechanism, while a marker file (often ~/.i-have-adhd-always-on) tracks the active session state. The activation banner displayed on first run indicates the specific marker file location for your system.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →