# How i-have-adhd Suppresses Tangents in AI Responses: A Technical Deep-Dive

> Learn how i-have-adhd suppresses tangents in AI responses. This technical deep-dive explains how a system prompt rule forces AIs to stay on topic for clearer, more focused answers.

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

---

**Yes, *i-have-adhd* suppresses tangents by embedding a concrete "Suppress tangents" rule directly into the model's system prompt, forcing the AI to finish one issue before presenting any secondary matters as separate, optional follow-ups.**

The *i-have-adhd* open-source project is a skill definition and hook system designed to keep AI-generated responses focused and actionable. One of its core capabilities is tangent suppression—ensuring that language models stay on task without drifting into unsolicited "by the way" asides that can overwhelm users with ADHD.

## The "Suppress Tangents" Rule in SKILL.md

The foundation of this behavior lives in [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) (lines 64-70). This file serves as the **source of truth** for all ADHD-style interaction rules, with the tangent suppression rule stated explicitly:

> *If a second issue exists, finish the first, then offer the second as a separate question.*
> 
> *Bad: "Here's the fix. By the way, your dependency is also stale, …"*
> 
> *Good: "Here's the fix. Separately: there is also a stale dependency. Want me to handle that next?"*

This rule transforms how the model structures multi-issue responses. Rather than threading additional concerns into a single flowing paragraph—the classic tangent pattern—it **compartmentalizes secondary issues** into distinct, opt-in offers.

## How the Rule Reaches the Model's System Prompt

The *i-have-adhd* project uses two integration paths to inject this rule into live AI sessions. Both follow the same pattern: read [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md), strip its YAML front-matter, and append the rule body to the system prompt.

### Claude-Code Hook: `hooks/always-on.mjs`

For Claude-Code users, the `always-on.mjs` hook (lines 27-34) handles automatic injection when the flag file `~/.claude/.i-have-adhd-always` exists:

```javascript
// From hooks/always-on.mjs
// Reads SKILL.md, removes front-matter, outputs clean ruleset
const skillContent = fs.readFileSync(skillPath, 'utf8');
const body = skillContent.replace(/^---[\s\S]*?---/, '').trim();
console.log(body);

```

The hook executes during session initialization, ensuring every response respects the tangent suppression guideline.

### OpenCode Plugin: `.opencode/plugins/i-have-adhd.mjs`

The OpenCode implementation mirrors this behavior in its `rulesetBody()` function (lines 35-43):

```javascript
// From .opencode/plugins/i-have-adhd.mjs
rulesetBody() {
  const skillPath = path.join(__dirname, '../../skills/i-have-adhd/SKILL.md');
  const content = fs.readFileSync(skillPath, 'utf8');
  return content.replace(/^---[\s\S]*?---/, '').trim();
}

```

Both implementations are **stateless transformation layers**—no runtime logic evaluates response content. The enforcement happens entirely through the model's own instruction-following capabilities once the rule is present in the prompt.

## Enabling Tangent Suppression in Practice

Users can activate this behavior through two modes:

| Mode | Activation | Best For |
|------|------------|----------|
| **On-demand** | Run `/i-have-adhd` command in-session | Occasional focus needs |
| **Always-on** | Create flag file (see below) | Persistent ADHD-friendly output |

### Enable Always-On Mode for Claude-Code

```bash
touch ~/.claude/.i-have-adhd-always

```

### Enable Always-On Mode for OpenCode

```bash
mkdir -p ~/.config/opencode
touch ~/.config/opencode/.i-have-adhd-always

```

Once active, the "Suppress tangents" rule becomes part of every system prompt without further user action.

## What Tangent Suppression Looks Like in Output

With the rule injected, model behavior shifts predictably across three dimensions:

1. **Sequential completion** — The primary issue receives full attention before any secondary matter is introduced.
2. **Explicit separation** — Secondary issues are prefixed with clear delimiters like "Separately:" or "Optional:".
3. **User opt-in** — Follow-ups are framed as questions ("Want me to handle that next?"), not assumptions.

**Example of compliant output:**

```

✅ Fixed the broken import path.

Separately: the project's README still references the old module name. Want me to update it now?

```

The first line delivers the core task completion. The second issue stands alone—visually, structurally, and cognitively distinct—giving the user control over whether to engage with it.

## Why Prompt Injection Works for Tangent Control

The *i-have-adhd* approach relies on **instruction hierarchy**—the tendency of large language models to prioritize system-level directives over implicit conversational patterns. By elevating "suppress tangents" to a hard rule in the system prompt, the project:

- Avoids complex post-processing or output filtering pipelines
- Requires no per-turn latency overhead
- Generalizes across any model that follows the injected prompt

According to the ayghri/i-have-adhd source code, no additional runtime validation occurs. The model's own alignment training enforces the rule.

## Summary

- **Primary mechanism**: The "Suppress tangents" rule in [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md) lines 64-70 explicitly prohibits mid-response asides.
- **Injection paths**: `hooks/always-on.mjs` (Claude-Code) and `.opencode/plugins/i-have-adhd.mjs` (OpenCode) strip YAML front-matter and append rules to system prompts.
- **Activation**: Either via `/i-have-adhd` command or flag files at `~/.claude/.i-have-adhd-always` or `~/.config/opencode/.i-have-adhd-always`.
- ** enforcement**: Fully delegated to the model's instruction-following; no custom output parsing required.

## Frequently Asked Questions

### Does i-have-adhd use post-processing to remove tangents after generation?

No. The project relies entirely on **pre-generation prompt engineering**. The rule is injected into the system prompt before any tokens are generated, so the model never produces the tangent in the first place. This is more efficient than filtering or rewriting output after the fact.

### Can I customize the "Suppress tangents" rule or add my own constraints?

Yes. The rule lives in [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) as plain Markdown. You can edit this file directly to adjust phrasing, add examples, or introduce additional behavioral constraints. Both the Claude-Code hook and OpenCode plugin read this file dynamically—no code changes required.

### What happens if a model doesn't follow the instruction?

The *i-have-adhd* repository includes no fallback enforcement mechanism. Effectiveness depends on the **underlying model's instruction-following capability**. The rule is written in explicit, few-shot format (with "Bad" and "Good" examples) to maximize compliance across different model families.

### Is tangent suppression the only ADHD-related rule in the skill?

No. [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md) contains a broader rule set addressing concision, structure, and clarity. The "Suppress tangents" rule is one of several designed to reduce cognitive load, but it operates independently—enabling this skill activates all rules simultaneously rather than à la carte.