# gs-amajumdar/i-have-adhd architecture

> Architecture diagram of the GitHub repository gs-amajumdar/i-have-adhd, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gs-amajumdar/i-have-adhd
- Repository: https://github.com/gs-amajumdar/i-have-adhd

## Overview

i-have-adhd is a coding-assistant skill/plugin that makes responses action-first, concise, and easier to follow. Users activate it through an assistant integration; the rules in the shared skill guide subsequent responses, and users can turn the mode off. The sampled Pi extension loads those rules, tracks mode state, and synchronizes rules into conversation context; the always-on hook also reads the skill. Other integrations are present in the tree, but their runtime wiring was not sampled, so their links are shown as unverified.

Main entry points: [`extensions/i-have-adhd.ts`](https://github.com/gs-amajumdar/i-have-adhd/blob/main/extensions/i-have-adhd.ts) (Pi mode extension), [`skills/i-have-adhd/SKILL.md`](https://github.com/gs-amajumdar/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) (ADHD skill rules), [`hooks/always-on.mjs`](https://github.com/gs-amajumdar/i-have-adhd/blob/main/hooks/always-on.mjs) (Always-on hook), [`extensions/context-compat.ts`](https://github.com/gs-amajumdar/i-have-adhd/blob/main/extensions/context-compat.ts) (Context compatibility)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_rules["Shared response rules"]
  node_skill["ADHD skill rules<br/>[SKILL.md]"]
end

subgraph group_runtime["Assistant runtime"]
  node_pi_extension["Pi mode extension<br/>[i-have-adhd.ts]"]
  node_context_compat["Context compatibility<br/>[context-compat.ts]"]
end

subgraph group_integrations["Assistant integrations"]
  node_always_on["Always-on hook<br/>[always-on.mjs]"]
  node_opencode["OpenCode plugin<br/>[i-have-adhd.mjs]"]
  node_other_adapters["Other assistant adapters"]
end

node_user(("Assistant user"))
node_assistant["Coding assistant"]

node_user -->|"prompts"| node_assistant
node_assistant -.->|"applies rules"| node_skill
node_pi_extension -->|"loads rules"| node_skill
node_pi_extension -->|"checks context"| node_context_compat
node_always_on -->|"reads rules"| node_skill
node_assistant -.->|"loads extension"| node_pi_extension
node_assistant -.->|"starts hook"| node_always_on
node_assistant -.->|"loads plugin"| node_opencode
node_assistant -.->|"loads integration"| node_other_adapters

click node_skill "https://github.com/gs-amajumdar/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md"
click node_pi_extension "https://github.com/gs-amajumdar/i-have-adhd/blob/main/extensions/i-have-adhd.ts"
click node_context_compat "https://github.com/gs-amajumdar/i-have-adhd/blob/main/extensions/context-compat.ts"
click node_always_on "https://github.com/gs-amajumdar/i-have-adhd/blob/main/hooks/always-on.mjs"
click node_opencode "https://github.com/gs-amajumdar/i-have-adhd/blob/main/.opencode/plugins/i-have-adhd.mjs"
click node_other_adapters "https://github.com/gs-amajumdar/i-have-adhd/tree/main/extensions"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_skill,node_user toneBlue
class node_pi_extension,node_context_compat toneAmber
class node_always_on,node_opencode,node_other_adapters toneMint
class node_assistant toneIndigo
```

## Components

### Shared response rules

- [ADHD skill rules](https://github.com/gs-amajumdar/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md): `skills/i-have-adhd/SKILL.md`

### Assistant runtime

- [Pi mode extension](https://github.com/gs-amajumdar/i-have-adhd/blob/main/extensions/i-have-adhd.ts): `extensions/i-have-adhd.ts`
- [Context compatibility](https://github.com/gs-amajumdar/i-have-adhd/blob/main/extensions/context-compat.ts): `extensions/context-compat.ts`

### Assistant integrations

- [Always-on hook](https://github.com/gs-amajumdar/i-have-adhd/blob/main/hooks/always-on.mjs): `hooks/always-on.mjs`
- [OpenCode plugin](https://github.com/gs-amajumdar/i-have-adhd/blob/main/.opencode/plugins/i-have-adhd.mjs): `.opencode/plugins/i-have-adhd.mjs`
- [Other assistant adapters](https://github.com/gs-amajumdar/i-have-adhd/tree/main/extensions): `extensions`

### Other components

- **Assistant user**
- **Coding assistant**

## Connections

- Assistant user → Coding assistant: prompts (evidence: `README.md`)
- Coding assistant → ADHD skill rules: applies rules (evidence: `README.md`)
- Pi mode extension → ADHD skill rules: loads rules (evidence: `extensions/i-have-adhd.ts`)
- Pi mode extension → Context compatibility: checks context (evidence: `extensions/i-have-adhd.ts`)
- Always-on hook → ADHD skill rules: reads rules (evidence: `hooks/always-on.mjs`)
- Coding assistant → Pi mode extension: loads extension
- Coding assistant → Always-on hook: starts hook
- Coding assistant → OpenCode plugin: loads plugin
- Coding assistant → Other assistant adapters: loads integration
