Where Is the i-have-adhd Adapter Location for OpenCode? (Complete File Guide)
The i-have-adhd adapter for OpenCode is located in the hidden .opencode folder at the repository root, comprising three files: opencode.json, .opencode/plugins/i-have-adhd.mjs, and .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– module-level manifest at repository root.opencode/plugins/i-have-adhd.mjs– JavaScript plugin implementation.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 tells OpenCode that a plugin exists and where to find it. This file is the first thing OpenCode reads when scanning for available skills.
// 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-adhdslash command
// .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 provides the human-readable description that appears in OpenCode's command palette. When users type /, this text explains what the command does.
# /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.
// 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:
# Direct test execution
node tests/opencode_plugin_driver.mjs .opencode/plugins/i-have-adhd.mjs
Adapter Architecture Summary
| Component | Location | Responsibility |
|---|---|---|
| Manifest | 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 |
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
.opencodefolder at repository root - Three coordinated files form the complete adapter:
opencode.json,.opencode/plugins/i-have-adhd.mjs, and.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 (root level), .opencode/plugins/i-have-adhd.mjs, and .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). 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 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 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.
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 →