# Where Is the i-have-adhd Adapter Location for OpenCode? (Complete File Guide)

> Find the i-have-adhd adapter location for OpenCode. Discover the exact files and folder within the ayghri/i-have-adhd repository to seamlessly integrate it.

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

---

**The i-have-adhd adapter for OpenCode is located in the hidden `.opencode` folder at the repository root, comprising three files: [`opencode.json`](https://github.com/ayghri/i-have-adhd/blob/main/opencode.json), `.opencode/plugins/i-have-adhd.mjs`, and [`.opencode/command/i-have-adhd.md`](https://github.com/ayghri/i-have-adhd/blob/main/.opencode/command/i-have-adhd.md).**

The **i-have-adhd** repository provides a specialized skill for the **OpenCode** AI coding assistant. Understanding the exact adapter location helps developers debug, extend, or fork the integration. This article maps every file that bridges OpenCode's runtime to the i-have-adhd functionality.

## Adapter Location Overview

According to the **ayghri/i-have-adhd** source code, the OpenCode adapter lives entirely within the `.opencode` directory. No files outside this folder participate in the OpenCode integration.

The adapter consists of three coordinated components:

- **[`opencode.json`](https://github.com/ayghri/i-have-adhd/blob/main/opencode.json)** – module-level manifest at repository root
- **`.opencode/plugins/i-have-adhd.mjs`** – JavaScript plugin implementation
- **[`.opencode/command/i-have-adhd.md`](https://github.com/ayghri/i-have-adhd/blob/main/.opencode/command/i-have-adhd.md)** – command palette definition

## Core Adapter Files Explained

### opencode.json: The Entry Point Manifest

Located at the repository root, **[`opencode.json`](https://github.com/ayghri/i-have-adhd/blob/main/opencode.json)** tells OpenCode that a plugin exists and where to find it. This file is the first thing OpenCode reads when scanning for available skills.

```json
// opencode.json - declares the plugin entry point
{
  "plugin": ".opencode/plugins/i-have-adhd.mjs"
}

```

Without this file, OpenCode would not recognize the repository as a valid skill source.

### .opencode/plugins/i-have-adhd.mjs: The Plugin Logic

The **`i-have-adhd.mjs`** file in `.opencode/plugins/` contains the actual adapter implementation. This module:

- Registers the skill's entry point with OpenCode's plugin system
- Injects the ruleset on every conversation turn
- Exposes the `/i-have-adhd` slash command

```javascript
// .opencode/plugins/i-have-adhd.mjs - adapter implementation
export default function register(opencode) {
  opencode.registerSkill({
    name: 'i-have-adhd',
    onTurn: (context) => {
      // Inject ADHD-focused assistance ruleset
      context.addSystemPrompt(adhdRuleset);
    },
    commands: ['/i-have-adhd']
  });
}

```

This file bridges OpenCode's generic runtime to i-have-adhd's specific behavioral modifications.

### .opencode/command/i-have-adhd.md: Command Definition

The markdown file at **[`.opencode/command/i-have-adhd.md`](https://github.com/ayghri/i-have-adhd/blob/main/.opencode/command/i-have-adhd.md)** provides the human-readable description that appears in OpenCode's command palette. When users type `/`, this text explains what the command does.

```markdown

# /i-have-adhd

Activate ADHD-optimized coding assistance with:
- Shorter response chunks
- Explicit step numbering
- Priority highlighting for next actions

```

## Loading and Testing the Adapter

OpenCode automatically discovers and loads the adapter when initialized in a project containing these files.

```javascript
// Automatic loading via OpenCode SDK
import { OpenCode } from '@opencode-ai/sdk';
await OpenCode.start();  // Reads opencode.json, loads plugin from .opencode/plugins/

```

To test the plugin independently without full OpenCode initialization:

```bash

# Direct test execution

node tests/opencode_plugin_driver.mjs .opencode/plugins/i-have-adhd.mjs

```

## Adapter Architecture Summary

| Component | Location | Responsibility |
|-----------|----------|---------------|
| Manifest | [`opencode.json`](https://github.com/ayghri/i-have-adhd/blob/main/opencode.json) | Declares plugin existence and entry point |
| Plugin logic | `.opencode/plugins/i-have-adhd.mjs` | Registers skill, manages turn-by-turn behavior |
| Command UI | [`.opencode/command/i-have-adhd.md`](https://github.com/ayghri/i-have-adhd/blob/main/.opencode/command/i-have-adhd.md) | Provides palette description and usage help |

All three files must remain in their specified locations for the i-have-adhd OpenCode adapter to function correctly.

## Summary

- The **i-have-adhd adapter location for OpenCode** is the `.opencode` folder at repository root
- Three coordinated files form the complete adapter: [`opencode.json`](https://github.com/ayghri/i-have-adhd/blob/main/opencode.json), `.opencode/plugins/i-have-adhd.mjs`, and [`.opencode/command/i-have-adhd.md`](https://github.com/ayghri/i-have-adhd/blob/main/.opencode/command/i-have-adhd.md)
- The JavaScript plugin handles runtime integration; the JSON manifest enables discovery; the markdown provides UI text
- No external dependencies or additional paths are required for OpenCode compatibility

## Frequently Asked Questions

### Where exactly is the i-have-adhd OpenCode adapter stored?

The adapter is stored in the **`.opencode`** directory at the repository root, specifically in three files: [`opencode.json`](https://github.com/ayghri/i-have-adhd/blob/main/opencode.json) (root level), `.opencode/plugins/i-have-adhd.mjs`, and [`.opencode/command/i-have-adhd.md`](https://github.com/ayghri/i-have-adhd/blob/main/.opencode/command/i-have-adhd.md). These paths are hardcoded expectations from the OpenCode runtime.

### What does the .opencode folder contain?

The `.opencode` folder contains the plugin implementation (`plugins/i-have-adhd.mjs`) and command documentation ([`command/i-have-adhd.md`](https://github.com/ayghri/i-have-adhd/blob/main/command/i-have-adhd.md)). This hidden folder convention keeps OpenCode-specific code organized and separate from the skill's core logic.

### Can I relocate the adapter files to a different directory?

No. OpenCode specifically looks for [`opencode.json`](https://github.com/ayghri/i-have-adhd/blob/main/opencode.json) at the repository root and resolves plugin paths relative to that location. Moving files would break the automatic discovery mechanism and prevent the skill from loading.

### How does OpenCode know to load the i-have-adhd skill?

OpenCode scans for [`opencode.json`](https://github.com/ayghri/i-have-adhd/blob/main/opencode.json) files in the project. When found, it parses the `plugin` field to locate the JavaScript entry point, then executes that module to register the skill's capabilities with the runtime.