# Main Features of the i-have-adhd VS Code Plugin: ADHD-Optimized Coding Assistance

> Discover the main features of the i-have-adhd VS Code plugin. This ADHD-optimized AI assistant offers clarity, actionability, and visual cues for enhanced coding.

- Repository: [Ayoub Ghriss/i-have-adhd](https://github.com/ayghri/i-have-adhd)
- Tags: overview
- Published: 2026-08-24

---

**The *i-have-adhd* VS Code extension reshapes AI assistant output to prioritize clarity and actionability for users with ADHD by injecting a specialized rule set, providing persistent toggleable modes, and offering visual status indicators.**

The *i-have-adhd* plugin is an extension for the Pi-coding-assistant runtime used by VS Code via Claude Code integration. Developed in the `ayghri/i-have-adhd` repository, this tool modifies how the assistant presents information by enforcing ADHD-friendly communication patterns defined in [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md).

## Toggleable ADHD-Friendly Mode

Users control the extension through the **`/i-have-adhd`** command (also accessible via the alias `/skill:i-have-adhd`). The command accepts three inputs:
- **`on`** – Explicitly enables ADHD mode
- **`off`** – Disables ADHD mode  
- **No argument** – Toggles the current state

According to the source code in [`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts) (lines 69–91), the `pi.registerCommand("i-have-adhd", …)` function handles these inputs and triggers state synchronization.

```typescript
// Turn it on
await pi.runCommand("i-have-adhd", "on");

// Toggle (no argument)
await pi.runCommand("i-have-adhd", "");

// Turn it off
await pi.runCommand("i-have-adhd", "off");

```

## Automatic Rule Injection

When enabled, the extension automatically injects the full rule set from [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) into the conversation context. The `syncContext()` function (lines 18–33 and 119–130) ensures these rules are sent only once per session via a custom message type (`RULES_MESSAGE_TYPE`), preventing duplicate injections while keeping the guidelines active.

The `loadRules()` function (lines 46–64) reads the markdown file content at runtime, allowing the assistant to reference the 10 ADHD-friendly output rules throughout the session.

## Persistent State Management

The plugin maintains user preferences across sessions through the session manager. The `getSavedState()` and `restoreState()` functions (lines 66–82 and 145–153) handle state persistence, automatically reapplying the previous configuration when VS Code reopenes a session or restores the session tree.

Users can also force ADHD mode at launch time using the **`--adhd`** flag. The extension registers this boolean flag via `pi.registerFlag("adhd", …)` (lines 63–67), enabling automatic activation before the session fully initializes.

## Always-On Configuration

Creating a hidden file named **`.i-have-adhd-always`** in the agent directory forces the mode to start enabled regardless of saved state. The `restoreState()` function checks for this `alwaysOnFlag` (lines 48–50) before consulting session storage, providing a failsafe for users who require consistent ADHD-friendly formatting.

```bash

# From the terminal, inside the repository root:

touch $(npm root)/.i-have-adhd-always

# The next session will start with ADHD mode enabled automatically.

```

## Visual Status Indicators

The extension provides immediate visual feedback through VS Code's UI. When active, a **green "● ADHD ON" badge** appears in the status bar, implemented via `ctx.ui.setStatus` in the `updateStatus()` function (lines 4–12).

State changes also trigger toast notifications through `ctx.ui.notify` within the `setEnabled()` function (line 60), displaying "ADHD mode enabled" or "ADHD mode disabled" messages to confirm user actions.

## Stop-Phrase Handling

The plugin includes intelligent deactivation through natural language triggers. The system monitors input for specific **stop phrases** including "stop adhd mode" and "normal mode" defined in the `STOP_PHRASES` set (lines 27–34). When detected in the `input` hook (lines 92–106), the extension automatically disables ADHD mode without requiring the slash command.

## Summary

- **Command-based control**: Toggle ADHD optimization via `/i-have-adhd` with support for explicit on/off states or toggling
- **Rule injection**: Automatically loads and injects content from [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) once per session using `syncContext()`
- **Persistent configuration**: Saves state to session manager and supports launch flags (`--adhd`) plus always-on files (`.i-have-adhd-always`)
- **Visual feedback**: Displays green status bar badges and toast notifications through `ctx.ui` methods
- **Natural language deactivation**: Recognizes stop phrases like "stop adhd mode" to disable features instantly

## Frequently Asked Questions

### How do I enable the i-have-adhd plugin in VS Code?

You can enable the plugin by running the `/i-have-adhd on` command in the VS Code command palette or chat interface. Alternatively, start VS Code with the `--adhd` launch flag, or create an empty file named `.i-have-adhd-always` in your agent directory to force automatic activation on every session start.

### What rules does the plugin inject into the conversation?

The plugin injects the 10 ADHD-friendly output rules defined in [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md). These rules restructure the assistant's responses to prioritize actionable items, reduce cognitive load, and present information in scannable formats. The `loadRules()` function reads this file and `syncContext()` delivers it to the conversation context via `RULES_MESSAGE_TYPE`.

### How does the plugin maintain state between sessions?

State persistence relies on the session manager accessed through `getSavedState()` and `restoreState()` functions in [`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts). When a session ends, the current enabled/disabled state is saved. Upon `session_start` or `session_tree` events, `restoreState()` retrieves and reapplies this configuration, checking first for the `.i-have-adhd-always` file flag before falling back to saved preferences.

### Can I disable ADHD mode without typing the slash command?

Yes. The extension monitors natural language input for predefined stop phrases including "stop adhd mode" and "normal mode" through the `STOP_PHRASES` set and `input` hook (lines 92–106). Uttering these phrases automatically disables the mode and updates the UI status indicator without requiring explicit command syntax.