How i-have-adhd Suppresses Tangents in AI Responses: A Technical Deep-Dive
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 (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, 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:
// 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):
// 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
touch ~/.claude/.i-have-adhd-always
Enable Always-On Mode for OpenCode
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:
- Sequential completion — The primary issue receives full attention before any secondary matter is introduced.
- Explicit separation — Secondary issues are prefixed with clear delimiters like "Separately:" or "Optional:".
- 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.mdlines 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-adhdcommand or flag files at~/.claude/.i-have-adhd-alwaysor~/.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 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 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.
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 →