A skill to stop your coding agent from burying the answer. ADHD-friendly output.
opencode: simplify dual-version loading and align install docs
Ayoub G.815c8bda4cc5
diff --git a/.github/install/INSTALL.ar.md b/.github/install/INSTALL.ar.mdindex e56e6e1..d779839 100644--- a/.github/install/INSTALL.ar.md+++ b/.github/install/INSTALL.ar.md@@ -504,35 +504,39 @@ hermes skills uninstall i-have-adhd<details><summary><strong>OpenCode</strong></summary>-يقوم OpenCode بتحميل هذا المستودع كمكون إضافي للخادم: يسجل `.opencode/plugins/i-have-adhd.mjs` نقطة إدخال `skills/` والأمر `/i-have-adhd`، ويضيف مجموعة القواعد عند تمكين التشغيل الدائم. يقرأ OpenCode أيضًا `skills/` محليًا، لذلك تظل المهارة تعمل حتى بدون المكوّن الإضافي - يضيف المكوّن الإضافي أمر `/i-have-adhd` وعلامة التشغيل الدائم.+يدعم المكوّن الإضافي OpenCode V1 **1.18.29 وما بعده** وV2. يسجّل المهارة والأمر `/i-have-adhd` ويتيح وضع التشغيل الدائم اختياريًا. تحتاج إصدارات V1 الأقدم إلى التحديث أو استخدام المكوّن الإضافي من الإصدار السابق للمهارة.### تثبيت-استنسخ المستودع ووجّه OpenCode إلى المكوّن الإضافي. يتيح المسار المطلق استخدام نسخة محلية واحدة في جميع المشاريع:+للاستخدام في جميع المشاريع:```bashgit clone https://github.com/ayghri/i-have-adhd ~/.config/opencode/vendor/i-have-adhd+mkdir -p ~/.config/opencode/plugins+cat > ~/.config/opencode/plugins/i-have-adhd.js <<'EOF'+export { default } from '../vendor/i-have-adhd/.opencode/plugins/i-have-adhd.mjs';+EOF```-أضف إلى `opencode.json` (العالمي: `~/.config/opencode/opencode.json`):+يعمل الاستيراد النسبي كما هو، دون استبدال المسارات. يكتشف V1 وV2 مكوّنات `.js` الإضافية تلقائيًا. شغّل OpenCode من مجلد المستودع؛ يحمّل `.opencode/plugins/i-have-adhd.js` المكوّن الإضافي دون الحاجة إلى `opencode.json`.-```json-{ "plugin": ["/absolute/path/to/i-have-adhd/.opencode/plugins/i-have-adhd.mjs"] }-```+تظل إعدادات V1 الحالية التي تشير إلى ملف `.mjs` عبر `plugin` في `opencode.json` تعمل على 1.18.29 وما بعده. استخدم ذلك الإعداد أو ملف التحميل أعلاه، وليس كليهما، لتجنب التحميل المكرر.-أو شغّل OpenCode من نسخة المستودع المحلية؛ إذ يحتوي ملف `opencode.json` في الجذر على إعداد المكوّن الإضافي مسبقًا.+ابدأ جلسة جديدة واكتب `/i-have-adhd`. تظل القواعد سارية حتى تقول `stop adhd mode` أو `normal mode`.-ابدأ جلسة جديدة وفعّل نمط الإجابات المناسبة لاضطراب فرط الحركة وتشتت الانتباه:+#### المهارة والأمر فقط (دون تشغيل دائم)-```text-/i-have-adhd-```+بدلًا من ذلك، انسخ المهارة والأمر من المستودع إلى مجلدات OpenCode العامة:-تظل القواعد سارية حتى `stop adhd mode` أو `normal mode`.+```bash+mkdir -p ~/.config/opencode/skills/i-have-adhd ~/.config/opencode/commands+cp skills/i-have-adhd/SKILL.md ~/.config/opencode/skills/i-have-adhd/SKILL.md+cp .opencode/command/i-have-adhd.md ~/.config/opencode/commands/i-have-adhd.md+```### تحقق-ابدأ تشغيل OpenCode، واكتب `/`، وتأكد من ظهور `i-have-adhd` في قائمة الأوامر.+شغّل OpenCode، واكتب `/`، وتأكد من ظهور `i-have-adhd` في قائمة الأوامر.### تحديث@@ -540,22 +544,28 @@ git clone https://github.com/ayghri/i-have-adhd ~/.config/opencode/vendor/i-havegit -C ~/.config/opencode/vendor/i-have-adhd pull```+إذا استخدمت التثبيت بالنسخ، حدّث نسختك المحلية ثم انسخ الملفين مجددًا.+### إلغاء التثبيت-قم بإزالة إدخال `plugin` من `opencode.json`.+احذف `~/.config/opencode/plugins/i-have-adhd.js`. للتثبيت بالنسخ، احذف `~/.config/opencode/skills/i-have-adhd/` و`~/.config/opencode/commands/i-have-adhd.md`. لإعداد V1 الحالي، أزل إدخال `plugin` الخاص به.-### تشغيل دائمًا (اختياري)+### تشغيل دائم (اختياري)++يتطلب المكوّن الإضافي. يضيف إنشاء ملف العلامة مجموعة القواعد الكاملة إلى موجّه النظام في كل رد:```bashtouch ~/.config/opencode/.i-have-adhd-always```-أثناء وجود العلامة، يضيف المكوّن الإضافي مجموعة القواعد الكاملة إلى موجّه النظام في كل رد - وهو نظير خطاف `SessionStart` الخاص بـ Claude Code في OpenCode. يقوم `stop adhd mode` أو `normal mode` بتعطيله للجلسة الحالية؛ احذف العلامة لتعطيل التشغيل الدائم:+يطلب `stop adhd mode` أو `normal mode` من الوكيل العودة إلى نمط الرد المعتاد في الجلسة الحالية. احذف العلامة لإيقاف إضافة القواعد تلقائيًا:```bashrm ~/.config/opencode/.i-have-adhd-always```+إذا كان `XDG_CONFIG_HOME` محددًا، فاستبدل `~/.config` في هذه المسارات بذلك المجلد.+</details>diff --git a/.github/install/INSTALL.fa.md b/.github/install/INSTALL.fa.mdindex 6252391..ad1cb99 100644--- a/.github/install/INSTALL.fa.md+++ b/.github/install/INSTALL.fa.md@@ -424,35 +424,39 @@ Exceptions: explain fully when asked to explain. Confirm before destructive acti<details><summary><strong>OpenCode</strong></summary>-OpenCode این ریپازیتوری را به عنوان یک پلاگین سرور بارگذاری میکند: فایل `.opencode/plugins/i-have-adhd.mjs` نقطه ورود `skills/` و دستور `/i-have-adhd` را ثبت میکند و زمانی که حالت همیشه فعال باشد، مجموعه قوانین را تزریق میکند. OpenCode همچنین به صورت بومی `skills/` را میخواند، بنابراین مهارت حتی بدون پلاگین هم کار میکند — پلاگین فقط دستور `/i-have-adhd` و پرچم همیشه فعال را اضافه میکند.+پلاگین از OpenCode V1 **نسخه 1.18.29 و جدیدتر** و V2 پشتیبانی میکند. مهارت و دستور `/i-have-adhd` را ثبت میکند و حالت همیشه فعال را بهصورت اختیاری ارائه میدهد. نسخههای قدیمیتر V1 باید ارتقا یابند یا از پلاگین نسخه قبلی مهارت استفاده کنند.### نصب-ریپازیتوری را کلون کرده و OpenCode را به پلاگین ارجاع دهید. استفاده از مسیر مطلق، یک نسخه را در تمام پروژهها به اشتراک میگذارد:+برای استفاده در همه پروژهها:```bashgit clone https://github.com/ayghri/i-have-adhd ~/.config/opencode/vendor/i-have-adhd+mkdir -p ~/.config/opencode/plugins+cat > ~/.config/opencode/plugins/i-have-adhd.js <<'EOF'+export { default } from '../vendor/i-have-adhd/.opencode/plugins/i-have-adhd.mjs';+EOF```-به فایل `opencode.json` خود اضافه کنید (سراسری: `~/.config/opencode/opencode.json`):+مسیر نسبی همانطور که نوشته شده کار میکند و نیازی به جایگزینی مسیر نیست. V1 و V2 پلاگینهای `.js` را خودکار پیدا میکنند. OpenCode را از پوشه ریپازیتوری اجرا کنید؛ `.opencode/plugins/i-have-adhd.js` پلاگین را بدون `opencode.json` بارگذاری میکند.-```json-{ "plugin": ["/absolute/path/to/i-have-adhd/.opencode/plugins/i-have-adhd.mjs"] }-```+نصبهای فعلی V1 که از طریق `plugin` در `opencode.json` به فایل `.mjs` اشاره میکنند، در نسخه 1.18.29 و جدیدتر همچنان کار میکنند. برای جلوگیری از بارگذاری تکراری، فقط از آن تنظیم یا فایل بارگذار بالا استفاده کنید.-یا OpenCode را از داخل پوشه کلونشده اجرا کنید — این ریپازیتوری شامل یک فایل `opencode.json` در ریشه است که پلاگین در آن سیمکشی شده است.+یک نشست جدید شروع کنید و `/i-have-adhd` را وارد کنید. قوانین تا زمانی که `stop adhd mode` یا `normal mode` را بگویید فعال میمانند.-یک نشست جدید شروع کنید و خروجی دوستدار ADHD را برای آن نشست فعال کنید:+#### فقط مهارت و دستور (بدون حالت همیشه فعال)-```text-/i-have-adhd-```+روش دیگر این است که مهارت و دستور را از ریپازیتوری به پوشههای سراسری OpenCode کپی کنید:-قوانین تا زمانی که `stop adhd mode` یا `normal mode` را تایپ نکنید، فعال میمانند.+```bash+mkdir -p ~/.config/opencode/skills/i-have-adhd ~/.config/opencode/commands+cp skills/i-have-adhd/SKILL.md ~/.config/opencode/skills/i-have-adhd/SKILL.md+cp .opencode/command/i-have-adhd.md ~/.config/opencode/commands/i-have-adhd.md+```### بررسی صحت نصب-OpenCode را شروع کنید، `/` را تایپ کنید و تأیید کنید که `i-have-adhd` در لیست دستورات ظاهر میشود.+OpenCode را اجرا کنید، `/` را وارد کنید و مطمئن شوید `i-have-adhd` در فهرست دستورات دیده میشود.### بهروزرسانی@@ -460,22 +464,28 @@ OpenCode را شروع کنید، `/` را تایپ کنید و تأیید کنgit -C ~/.config/opencode/vendor/i-have-adhd pull```+در روش نصب با کپی، ریپازیتوری را بهروزرسانی کرده و هر دو فایل را دوباره کپی کنید.+### حذف نصب-ورودی `plugin` را از `opencode.json` حذف کنید.+فایل `~/.config/opencode/plugins/i-have-adhd.js` را حذف کنید. در روش نصب با کپی، `~/.config/opencode/skills/i-have-adhd/` و `~/.config/opencode/commands/i-have-adhd.md` را حذف کنید. برای نصب فعلی V1 با تنظیمات، ورودی `plugin` مربوط را حذف کنید.### همیشه فعال (اختیاری)+به پلاگین نیاز دارد. ساختن فایل پرچم، تمام قوانین را در هر نوبت به پرامپت سیستم اضافه میکند:+```bashtouch ~/.config/opencode/.i-have-adhd-always```-تا زمانی که این پرچم وجود دارد، پلاگین مجموعه قوانین کامل را در هر نوبت به پرامپت سیستم اضافه میکند — معادل هوک `SessionStart` در Claude Code برای OpenCode. دستور `stop adhd mode` یا `normal mode` آن را برای نشست جاری غیرفعال میکند؛ برای خاموش کردن دائمی حالت همیشه فعال، پرچم را حذف کنید:+دستور `stop adhd mode` یا `normal mode` از عامل میخواهد در نشست جاری به سبک پاسخ معمول برگردد. برای توقف تزریق خودکار، فایل پرچم را حذف کنید:```bashrm ~/.config/opencode/.i-have-adhd-always```+اگر `XDG_CONFIG_HOME` تنظیم شده است، در این مسیرها `~/.config` را با آن پوشه جایگزین کنید.+</details><details>@@ -803,4 +813,4 @@ claude plugin install i-have-adhd@i-have-adhdمجدداً راهاندازی کنید، سپس `/i-have-adhd` را مجدداً فراخوانی کنید.-**مهارت پس از `npx skills add` ناپدید است.** یک چت جدید با عامل شروع کنید. مهارتها در شروع نشست فهرستبندی میشوند. تأیید کنید که پوشه در جایی که عامل اسکن میکند قرار گرفته است (`~/.cursor/skills/` برای Cursor، `.agents/skills/` برای OpenCode) و اینکه `name` در frontmatter با نام پوشه مطابقت دارد.\ No newline at end of file+**مهارت پس از `npx skills add` ناپدید است.** یک چت جدید با عامل شروع کنید. مهارتها در شروع نشست فهرستبندی میشوند. تأیید کنید که پوشه در جایی که عامل اسکن میکند قرار گرفته است (`~/.cursor/skills/` برای Cursor، `.agents/skills/` برای OpenCode) و اینکه `name` در frontmatter با نام پوشه مطابقت دارد.diff --git a/.github/install/INSTALL.id.md b/.github/install/INSTALL.id.mdindex 603d092..d5e0382 100644--- a/.github/install/INSTALL.id.md+++ b/.github/install/INSTALL.id.md@@ -380,6 +380,73 @@ Di dalam sesi Kimi Code, jalankan `/plugins`, arahkan kursor ke **I Have ADHD**,</details>+<details>+<summary><strong>OpenCode</strong></summary>++Plugin mendukung OpenCode V1 **1.18.29 atau lebih baru** dan V2. Plugin mendaftarkan skill dan perintah `/i-have-adhd`, serta menyediakan mode selalu aktif opsional. Versi V1 yang lebih lama perlu diperbarui atau menggunakan plugin dari rilis skill sebelumnya.++### Instalasi++Untuk digunakan di semua proyek:++```bash+git clone https://github.com/ayghri/i-have-adhd ~/.config/opencode/vendor/i-have-adhd+mkdir -p ~/.config/opencode/plugins+cat > ~/.config/opencode/plugins/i-have-adhd.js <<'EOF'+export { default } from '../vendor/i-have-adhd/.opencode/plugins/i-have-adhd.mjs';+EOF+```++Impor relatif ini langsung berfungsi; tidak perlu mengganti jalur. V1 dan V2 otomatis menemukan plugin `.js`. Jalankan OpenCode dari direktori repositori: `.opencode/plugins/i-have-adhd.js` memuat plugin tanpa `opencode.json`.++Instalasi V1 yang sudah merujuk file `.mjs` melalui `plugin` di `opencode.json` tetap berfungsi pada 1.18.29 atau lebih baru. Gunakan entri tersebut atau pemuat di atas, jangan keduanya, agar plugin tidak dimuat dua kali.++Mulai sesi baru dan ketik `/i-have-adhd`. Aturan berlaku hingga Anda mengatakan `stop adhd mode` atau `normal mode`.++#### Hanya skill dan perintah (tanpa mode selalu aktif)++Sebagai alternatif, salin skill dan perintah dari repositori ke direktori global OpenCode:++```bash+mkdir -p ~/.config/opencode/skills/i-have-adhd ~/.config/opencode/commands+cp skills/i-have-adhd/SKILL.md ~/.config/opencode/skills/i-have-adhd/SKILL.md+cp .opencode/command/i-have-adhd.md ~/.config/opencode/commands/i-have-adhd.md+```++### Verifikasi++Jalankan OpenCode, ketik `/`, dan pastikan `i-have-adhd` muncul dalam daftar perintah.++### Pembaruan++```bash+git -C ~/.config/opencode/vendor/i-have-adhd pull+```++Untuk instalasi dengan menyalin, perbarui repositori lalu salin kembali kedua file.++### Uninstal++Hapus `~/.config/opencode/plugins/i-have-adhd.js`. Untuk instalasi dengan menyalin, hapus `~/.config/opencode/skills/i-have-adhd/` dan `~/.config/opencode/commands/i-have-adhd.md`. Untuk instalasi V1 dengan konfigurasi yang sudah ada, hapus entri `plugin` terkait.++### Selalu Aktif (opsional)++Memerlukan plugin. Membuat file penanda menambahkan seluruh aturan ke prompt sistem pada setiap giliran:++```bash+touch ~/.config/opencode/.i-have-adhd-always+```++`stop adhd mode` atau `normal mode` meminta agen kembali ke gaya respons biasa untuk sesi saat ini. Hapus file penanda untuk menghentikan penyisipan otomatis:++```bash+rm ~/.config/opencode/.i-have-adhd-always+```++Jika `XDG_CONFIG_HOME` diatur, ganti `~/.config` dalam jalur ini dengan direktori tersebut.++</details>+<details><summary><strong>Pi</strong></summary>@@ -558,7 +625,7 @@ Pengecualian: jelaskan secara lengkap jika diminta. Konfirmasi sebelum melakukan</details><details>-<summary><strong>Cursor, OpenCode, Amp, dan lingkungan lain yang kompatibel dengan agent-skills</strong></summary>+<summary><strong>Cursor, Amp, dan lingkungan lain yang kompatibel dengan agent-skills</strong></summary>Berfungsi di lingkungan apa pun yang mendukung pembacaan Agent Skills. Ganti `-a <agent>` dengan agen pilihan Anda.@@ -657,4 +724,4 @@ claude plugin install i-have-adhd@i-have-adhdMulai ulang dan panggillah `/i-have-adhd` lagi.-**Skill tidak muncul setelah `npx skills add`.** Buka obrolan agen baru. Skill diindeks di awal sesi. Pastikan folder telah diinstal di lokasi yang dicari oleh agen (`~/.cursor/skills/` di Cursor, `.agents/skills/` di OpenCode) dan bahwa `name` di frontmatter sesuai dengan nama folder.\ No newline at end of file+**Skill tidak muncul setelah `npx skills add`.** Buka obrolan agen baru. Skill diindeks di awal sesi. Pastikan folder telah diinstal di lokasi yang dicari oleh agen (`~/.cursor/skills/` di Cursor, `.agents/skills/` di OpenCode) dan bahwa `name` di frontmatter sesuai dengan nama folder.diff --git a/.github/install/INSTALL.ja.md b/.github/install/INSTALL.ja.mdindex 818bebb..e7e5814 100644--- a/.github/install/INSTALL.ja.md+++ b/.github/install/INSTALL.ja.md@@ -384,35 +384,39 @@ Kimi Code セッション内で `/plugins` を実行し、**I Have ADHD** にカ<details><summary><strong>OpenCode</strong></summary>-OpenCode はこのリポジトリをサーバープラグインとして読み込みます。`.opencode/plugins/i-have-adhd.mjs` が `skills/` のエントリーポイントと `/i-have-adhd` コマンドを登録し、常時有効化されている場合はルールセットを注入します。また、OpenCode は `skills/` をネイティブにも読み込めるため、プラグインなしでもスキル自体は動作します(プラグインを追加すると `/i-have-adhd` コマンドと常時有効化フラグが使えるようになります)。+プラグインは OpenCode V1 **1.18.29以降**と V2 に対応しています。スキルと `/i-have-adhd` コマンドを登録し、任意の常時有効モードを提供します。古い V1 はアップグレードするか、以前のスキルリリースのプラグインを使用してください。### インストール-リポジトリをクローンし、OpenCode からプラグインを指定します。絶対パスを指定すると、すべてのプロジェクトで単一のチェックアウトを共有できます:+すべてのプロジェクトで使用する場合:```bashgit clone https://github.com/ayghri/i-have-adhd ~/.config/opencode/vendor/i-have-adhd+mkdir -p ~/.config/opencode/plugins+cat > ~/.config/opencode/plugins/i-have-adhd.js <<'EOF'+export { default } from '../vendor/i-have-adhd/.opencode/plugins/i-have-adhd.mjs';+EOF```-`opencode.json`(グローバル設定: `~/.config/opencode/opencode.json`)に追加:+相対インポートはそのまま使えます。パスの置き換えは不要です。V1 と V2 は `.js` プラグインを自動検出します。チェックアウト先で OpenCode を起動すれば、`.opencode/plugins/i-have-adhd.js` が読み込まれるため、`opencode.json` は不要です。-```json-{ "plugin": ["/absolute/path/to/i-have-adhd/.opencode/plugins/i-have-adhd.mjs"] }-```+既存の V1 設定で `opencode.json` の `plugin` から `.mjs` ファイルを指定している場合も、1.18.29以降では動作します。二重読み込みを避けるため、その設定か上記のローダーのどちらか一方を使用してください。-または、チェックアウト先から直接 OpenCode を起動します。ルート直下の `opencode.json` にプラグインが設定済みです。+新しいセッションで `/i-have-adhd` と入力します。`stop adhd mode` または `normal mode` と入力するまでルールが維持されます。-新しいセッションを開始し、そのセッションでADHDフレンドリーな出力を有効化:+#### スキルとコマンドのみ(常時有効なし)-```text-/i-have-adhd-```+別の方法として、チェックアウト先からスキルとコマンドをグローバルディレクトリにコピーできます:-`stop adhd mode` または `normal mode` と入力するまでルールが維持されます。+```bash+mkdir -p ~/.config/opencode/skills/i-have-adhd ~/.config/opencode/commands+cp skills/i-have-adhd/SKILL.md ~/.config/opencode/skills/i-have-adhd/SKILL.md+cp .opencode/command/i-have-adhd.md ~/.config/opencode/commands/i-have-adhd.md+```### 確認-OpenCode を起動して `/` と入力し、コマンド一覧に `i-have-adhd` が表示されることを確認します。+OpenCode を起動し、`/` と入力して、コマンド一覧に `i-have-adhd` があることを確認します。### 更新@@ -420,22 +424,28 @@ OpenCode を起動して `/` と入力し、コマンド一覧に `i-have-adhd`git -C ~/.config/opencode/vendor/i-have-adhd pull```+コピー方式では、チェックアウトを更新した後に2つのファイルを再度コピーしてください。+### アンインストール-`opencode.json` から `plugin` のエントリーを削除します。+`~/.config/opencode/plugins/i-have-adhd.js` を削除します。コピー方式では `~/.config/opencode/skills/i-have-adhd/` と `~/.config/opencode/commands/i-have-adhd.md` を削除します。既存の V1 設定方式では、該当する `plugin` エントリーを削除します。### 常時有効(任意)+プラグインが必要です。フラグを作成すると、毎ターン完全なルールセットがシステムプロンプトに追加されます:+```bashtouch ~/.config/opencode/.i-have-adhd-always```-フラグファイルが存在する間、プラグインは毎ターンシステムプロンプトの末尾に完全なルールセットを追加します(Claude Code の `SessionStart` フックに相当)。`stop adhd mode` や `normal mode` で現在のセッションのみ無効化できます。常時有効を完全に解除する場合はフラグファイルを削除してください:+`stop adhd mode` または `normal mode` は、現在のセッションで通常の出力に戻るようエージェントに指示します。自動注入を停止するにはフラグを削除してください:```bashrm ~/.config/opencode/.i-have-adhd-always```+`XDG_CONFIG_HOME` を設定している場合は、これらのパスの `~/.config` をそのディレクトリに置き換えてください。+</details>diff --git a/.github/install/INSTALL.ko.md b/.github/install/INSTALL.ko.mdindex 462afef..7f812b5 100644--- a/.github/install/INSTALL.ko.md+++ b/.github/install/INSTALL.ko.md@@ -382,6 +382,73 @@ Kimi Code 세션에서 `/plugins`를 실행하고 **I Have ADHD**에 커서를</details>+<details>+<summary><strong>OpenCode</strong></summary>++플러그인은 OpenCode V1 **1.18.29 이상**과 V2를 지원합니다. 스킬과 `/i-have-adhd` 명령을 등록하고 선택 사항인 항상 활성화 모드를 제공합니다. 이전 V1 버전은 업그레이드하거나 이전 스킬 릴리스의 플러그인을 사용하세요.++### 설치++모든 프로젝트에서 사용하려면:++```bash+git clone https://github.com/ayghri/i-have-adhd ~/.config/opencode/vendor/i-have-adhd+mkdir -p ~/.config/opencode/plugins+cat > ~/.config/opencode/plugins/i-have-adhd.js <<'EOF'+export { default } from '../vendor/i-have-adhd/.opencode/plugins/i-have-adhd.mjs';+EOF+```++상대 경로는 그대로 사용할 수 있으며 경로를 바꿀 필요가 없습니다. V1과 V2 모두 `.js` 플러그인을 자동으로 검색합니다. 저장소 디렉터리에서 OpenCode를 시작하면 `.opencode/plugins/i-have-adhd.js`가 로드되므로 `opencode.json`은 필요하지 않습니다.++기존 V1 설치에서 `opencode.json`의 `plugin`으로 `.mjs` 파일을 지정하는 방식도 1.18.29 이상에서 작동합니다. 중복 로드를 피하려면 기존 설정이나 위 로더 중 하나만 사용하세요.++새 세션에서 `/i-have-adhd`를 입력하세요. `stop adhd mode` 또는 `normal mode`를 입력할 때까지 규칙이 유지됩니다.++#### 스킬과 명령만 설치(항상 활성화 없음)++대신 저장소에서 스킬과 명령을 OpenCode의 전역 디렉터리에 복사할 수 있습니다:++```bash+mkdir -p ~/.config/opencode/skills/i-have-adhd ~/.config/opencode/commands+cp skills/i-have-adhd/SKILL.md ~/.config/opencode/skills/i-have-adhd/SKILL.md+cp .opencode/command/i-have-adhd.md ~/.config/opencode/commands/i-have-adhd.md+```++### 확인++OpenCode를 시작하고 `/`를 입력해 명령 목록에 `i-have-adhd`가 있는지 확인하세요.++### 업데이트++```bash+git -C ~/.config/opencode/vendor/i-have-adhd pull+```++복사 방식으로 설치했다면 저장소를 업데이트한 후 두 파일을 다시 복사하세요.++### 제거++`~/.config/opencode/plugins/i-have-adhd.js`를 삭제하세요. 복사 방식으로 설치했다면 `~/.config/opencode/skills/i-have-adhd/`와 `~/.config/opencode/commands/i-have-adhd.md`를 삭제하세요. 기존 V1 설정 방식에서는 해당 `plugin` 항목을 제거하세요.++### 항상 활성화(선택 사항)++플러그인이 필요합니다. 플래그를 만들면 매 턴마다 전체 규칙이 시스템 프롬프트에 추가됩니다:++```bash+touch ~/.config/opencode/.i-have-adhd-always+```++`stop adhd mode` 또는 `normal mode`는 현재 세션에서 기본 응답 스타일로 돌아가도록 에이전트에 요청합니다. 자동 주입을 멈추려면 플래그를 삭제하세요:++```bash+rm ~/.config/opencode/.i-have-adhd-always+```++`XDG_CONFIG_HOME`이 설정되어 있다면 이 경로들의 `~/.config`를 해당 디렉터리로 바꾸세요.++</details>+<details><summary><strong>Pi</strong></summary>@@ -561,7 +628,7 @@ Skills 관리자에서 `i-have-adhd`를 제거하거나 `~/.agents/skills/i-have</details><details>-<summary><strong>Cursor, OpenCode, Amp 및 기타 agent-skills 실행 환경</strong></summary>+<summary><strong>Cursor, Amp 및 기타 agent-skills 실행 환경</strong></summary>Agent Skills를 읽는 모든 실행 환경에서 작동합니다. `-a <agent>`를 사용하는 에이전트로 바꾸세요.diff --git a/.github/install/INSTALL.pt-BR.md b/.github/install/INSTALL.pt-BR.mdindex 10e4d65..60b421d 100644--- a/.github/install/INSTALL.pt-BR.md+++ b/.github/install/INSTALL.pt-BR.md@@ -382,6 +382,73 @@ Em uma sessão do Kimi Code, execute `/plugins`, posicione o cursor em **I Have</details>+<details>+<summary><strong>OpenCode</strong></summary>++O plugin suporta OpenCode V1 **1.18.29 ou superior** e V2. Registra a skill e o comando `/i-have-adhd` e oferece o modo sempre ativo opcional. Versões anteriores do V1 precisam ser atualizadas ou usar o plugin da versão anterior da skill.++### Instalação++Para usar em todos os projetos:++```bash+git clone https://github.com/ayghri/i-have-adhd ~/.config/opencode/vendor/i-have-adhd+mkdir -p ~/.config/opencode/plugins+cat > ~/.config/opencode/plugins/i-have-adhd.js <<'EOF'+export { default } from '../vendor/i-have-adhd/.opencode/plugins/i-have-adhd.mjs';+EOF+```++A importação relativa funciona como está; não é preciso substituir caminhos. V1 e V2 descobrem plugins `.js` automaticamente. Inicie o OpenCode dentro do repositório: `.opencode/plugins/i-have-adhd.js` carrega o plugin sem `opencode.json`.++Instalações V1 que apontam para o arquivo `.mjs` por meio de `plugin` em `opencode.json` continuam funcionando na versão 1.18.29 ou superior. Use essa configuração ou o carregador acima, não ambos, para evitar carregamento duplicado.++Inicie uma nova sessão e digite `/i-have-adhd`. As regras permanecem até você dizer `stop adhd mode` ou `normal mode`.++#### Apenas skill e comando (sem modo sempre ativo)++Como alternativa, copie a skill e o comando do repositório para os diretórios globais do OpenCode:++```bash+mkdir -p ~/.config/opencode/skills/i-have-adhd ~/.config/opencode/commands+cp skills/i-have-adhd/SKILL.md ~/.config/opencode/skills/i-have-adhd/SKILL.md+cp .opencode/command/i-have-adhd.md ~/.config/opencode/commands/i-have-adhd.md+```++### Verificação++Inicie o OpenCode, digite `/` e confirme que `i-have-adhd` aparece na lista de comandos.++### Atualização++```bash+git -C ~/.config/opencode/vendor/i-have-adhd pull+```++Na instalação por cópia, atualize o repositório e copie novamente os dois arquivos.++### Desinstalação++Remova `~/.config/opencode/plugins/i-have-adhd.js`. Na instalação por cópia, remova `~/.config/opencode/skills/i-have-adhd/` e `~/.config/opencode/commands/i-have-adhd.md`. Para uma instalação V1 já configurada, remova a entrada `plugin` correspondente.++### Sempre ativo (opcional)++Requer o plugin. Criar o arquivo de sinalização adiciona todas as regras ao prompt do sistema em cada turno:++```bash+touch ~/.config/opencode/.i-have-adhd-always+```++`stop adhd mode` ou `normal mode` pede ao agente que volte ao estilo padrão na sessão atual. Remova o arquivo para interromper a inclusão automática:++```bash+rm ~/.config/opencode/.i-have-adhd-always+```++Se `XDG_CONFIG_HOME` estiver definido, substitua `~/.config` nesses caminhos por esse diretório.++</details>+<details><summary><strong>Pi</strong></summary>@@ -561,7 +628,7 @@ Exceções: explique por completo quando pedirem. Confirme antes de ações dest</details><details>-<summary><strong>Cursor, OpenCode, Amp e qualquer outro ambiente compatível com agent-skills</strong></summary>+<summary><strong>Cursor, Amp e qualquer outro ambiente compatível com agent-skills</strong></summary>Funciona com qualquer ambiente que leia Agent Skills. Troque `-a <agent>` pelo seu.diff --git a/.github/install/INSTALL.vi.md b/.github/install/INSTALL.vi.mdindex a8c047f..31e4035 100644--- a/.github/install/INSTALL.vi.md+++ b/.github/install/INSTALL.vi.md@@ -382,6 +382,73 @@ Trong phiên Kimi Code, chạy `/plugins`, đưa con trỏ đến **I Have ADHD*</details>+<details>+<summary><strong>OpenCode</strong></summary>++Plugin hỗ trợ OpenCode V1 **từ 1.18.29** và V2. Plugin đăng ký skill, lệnh `/i-have-adhd` và chế độ luôn bật tùy chọn. V1 cũ hơn cần nâng cấp hoặc dùng plugin từ bản phát hành skill trước đó.++### Cài đặt++Để dùng trong mọi dự án:++```bash+git clone https://github.com/ayghri/i-have-adhd ~/.config/opencode/vendor/i-have-adhd+mkdir -p ~/.config/opencode/plugins+cat > ~/.config/opencode/plugins/i-have-adhd.js <<'EOF'+export { default } from '../vendor/i-have-adhd/.opencode/plugins/i-have-adhd.mjs';+EOF+```++Đường dẫn tương đối hoạt động ngay, không cần thay đường dẫn. V1 và V2 đều tự phát hiện plugin `.js`. Khởi động OpenCode trong thư mục kho mã: `.opencode/plugins/i-have-adhd.js` tải plugin mà không cần `opencode.json`.++Các cài đặt V1 hiện có trỏ đến tệp `.mjs` qua `plugin` trong `opencode.json` vẫn hoạt động từ phiên bản 1.18.29. Chỉ dùng cấu hình đó hoặc tệp nạp ở trên để tránh tải hai lần.++Mở phiên mới và nhập `/i-have-adhd`. Các quy tắc duy trì đến khi bạn nói `stop adhd mode` hoặc `normal mode`.++#### Chỉ skill và lệnh (không có chế độ luôn bật)++Hoặc sao chép skill và lệnh từ kho mã vào các thư mục toàn cục của OpenCode:++```bash+mkdir -p ~/.config/opencode/skills/i-have-adhd ~/.config/opencode/commands+cp skills/i-have-adhd/SKILL.md ~/.config/opencode/skills/i-have-adhd/SKILL.md+cp .opencode/command/i-have-adhd.md ~/.config/opencode/commands/i-have-adhd.md+```++### Kiểm tra++Khởi động OpenCode, nhập `/` và xác nhận `i-have-adhd` có trong danh sách lệnh.++### Cập nhật++```bash+git -C ~/.config/opencode/vendor/i-have-adhd pull+```++Với cách cài bằng sao chép, cập nhật kho mã rồi sao chép lại hai tệp.++### Gỡ cài đặt++Xóa `~/.config/opencode/plugins/i-have-adhd.js`. Với cách cài bằng sao chép, xóa `~/.config/opencode/skills/i-have-adhd/` và `~/.config/opencode/commands/i-have-adhd.md`. Với cài đặt V1 dùng cấu hình hiện có, xóa mục `plugin` tương ứng.++### Luôn bật (không bắt buộc)++Cần plugin. Khi tạo tệp cờ, toàn bộ quy tắc được thêm vào lời nhắc hệ thống ở mỗi lượt:++```bash+touch ~/.config/opencode/.i-have-adhd-always+```++`stop adhd mode` hoặc `normal mode` yêu cầu agent trở lại cách trả lời mặc định trong phiên hiện tại. Xóa tệp cờ để ngừng tự động thêm quy tắc:++```bash+rm ~/.config/opencode/.i-have-adhd-always+```++Nếu có đặt `XDG_CONFIG_HOME`, thay `~/.config` trong các đường dẫn này bằng thư mục đó.++</details>+<details><summary><strong>Pi</strong></summary>@@ -561,7 +628,7 @@ Ngoại lệ: giải thích đầy đủ khi được yêu cầu. Xác nhận tr</details><details>-<summary><strong>Cursor, OpenCode, Amp và mọi môi trường agent-skills khác</strong></summary>+<summary><strong>Cursor, Amp và mọi môi trường agent-skills khác</strong></summary>Hoạt động với mọi môi trường đọc Agent Skills. Thay `-a <agent>` bằng agent của bạn.diff --git a/.github/install/INSTALL.zh-CN.md b/.github/install/INSTALL.zh-CN.mdindex 3cd1dfb..4f76ca2 100644--- a/.github/install/INSTALL.zh-CN.md+++ b/.github/install/INSTALL.zh-CN.md@@ -438,31 +438,35 @@ hermes skills uninstall i-have-adhd<details><summary><strong>OpenCode</strong></summary>-OpenCode 将此仓库作为服务端插件加载:`.opencode/plugins/i-have-adhd.mjs` 注册 `skills/` 入口点和 `/i-have-adhd` 命令,并在启用始终启用模式时注入规则。OpenCode 也会原生读取 `skills/`,因此即使没有插件,技能本身仍然可用——插件额外提供的是 `/i-have-adhd` 命令和始终启用标志。+插件支持 OpenCode V1 **1.18.29及以上**和 V2。它注册技能与 `/i-have-adhd` 命令,并提供可选的始终启用模式。较旧的 V1 需要升级,或继续使用上一个技能版本的插件。### 安装-克隆仓库并让 OpenCode 指向该插件。使用绝对路径可以让所有项目共享同一份检出:+在所有项目中使用:```bashgit clone https://github.com/ayghri/i-have-adhd ~/.config/opencode/vendor/i-have-adhd+mkdir -p ~/.config/opencode/plugins+cat > ~/.config/opencode/plugins/i-have-adhd.js <<'EOF'+export { default } from '../vendor/i-have-adhd/.opencode/plugins/i-have-adhd.mjs';+EOF```-将以下内容加入你的 `opencode.json`(全局:`~/.config/opencode/opencode.json`):+相对导入可以直接使用,无需替换路径。V1 和 V2 都会自动发现 `.js` 插件。在检出目录中启动 OpenCode 即可加载 `.opencode/plugins/i-have-adhd.js`,无需 `opencode.json`。-```json-{ "plugin": ["/absolute/path/to/i-have-adhd/.opencode/plugins/i-have-adhd.mjs"] }-```+现有 V1 安装通过 `opencode.json` 的 `plugin` 引用 `.mjs` 文件的方式,在1.18.29及以上版本中仍然有效。请使用该配置或上述加载文件中的一种,避免重复加载。-也可以直接在检出目录中运行 OpenCode——仓库根目录自带已接好插件的 `opencode.json`。+开启新会话并输入 `/i-have-adhd`。规则持续生效,直到输入 `stop adhd mode` 或 `normal mode`。-开启新会话,并为该会话启用 ADHD 友好输出:+#### 仅技能与命令(不含始终启用)-```text-/i-have-adhd-```+也可以从检出目录将技能与命令复制到 OpenCode 的全局目录:-规则持续生效,直到输入 `stop adhd mode` 或 `normal mode`。+```bash+mkdir -p ~/.config/opencode/skills/i-have-adhd ~/.config/opencode/commands+cp skills/i-have-adhd/SKILL.md ~/.config/opencode/skills/i-have-adhd/SKILL.md+cp .opencode/command/i-have-adhd.md ~/.config/opencode/commands/i-have-adhd.md+```### 验证@@ -474,22 +478,28 @@ git clone https://github.com/ayghri/i-have-adhd ~/.config/opencode/vendor/i-havegit -C ~/.config/opencode/vendor/i-have-adhd pull```+使用复制方式安装时,更新检出目录后重新复制这两个文件。+### 卸载-从 `opencode.json` 中移除 `plugin` 条目。+删除 `~/.config/opencode/plugins/i-have-adhd.js`。使用复制方式安装时,删除 `~/.config/opencode/skills/i-have-adhd/` 和 `~/.config/opencode/commands/i-have-adhd.md`。现有 V1 配置方式则移除相应的 `plugin` 条目。### 始终启用(可选)+需要插件。创建标志后,每一轮都会将完整规则集追加到系统提示:+```bashtouch ~/.config/opencode/.i-have-adhd-always```-标志存在期间,插件会在每一轮把完整规则追加到系统提示——相当于 Claude Code `SessionStart` 钩子的 OpenCode 版本。`stop adhd mode` 或 `normal mode` 可在当前会话中停用;删除该标志即可永久关闭始终启用:+`stop adhd mode` 或 `normal mode` 会要求代理在当前会话中恢复通常的输出风格。删除标志可停止自动注入:```bashrm ~/.config/opencode/.i-have-adhd-always```+如果设置了 `XDG_CONFIG_HOME`,请将这些路径中的 `~/.config` 替换为该目录。+</details>diff --git a/.github/readme/README.ar.md b/.github/readme/README.ar.mdindex 243d17a..0a3ab74 100644--- a/.github/readme/README.ar.md+++ b/.github/readme/README.ar.md@@ -30,6 +30,8 @@ Install the i-have-adhd skill/plugin from https://github.com/ayghri/i-have-adhd,أو 🔗 [راجع تعليمات التثبيت](../install/INSTALL.ar.md).+يدعم المكوّن الإضافي لـ OpenCode الإصدار V1 1.18.29 وما بعده وV2.+## ماذا تفعل هذه المهارة؟تمنع هذه المهارة مساعد البرمجة من طمس الجواب وسط نص طويل: ابدأ بالإجراء، ورقّم الخطوات، وتجنّب العبارات الختامية مثل «آمل أن يساعدك هذا!».diff --git a/.github/readme/README.es.md b/.github/readme/README.es.mdindex 394464e..0792b18 100644--- a/.github/readme/README.es.md+++ b/.github/readme/README.es.md@@ -31,6 +31,8 @@ Install the i-have-adhd skill/plugin from https://github.com/ayghri/i-have-adhd,O 🔗 [consulta las instrucciones de instalación](../../INSTALL.md).+El plugin de OpenCode admite V1 1.18.29 o posterior y V2.+## Qué haceUna *skill* para tu asistente de código que evita que entierre la respuesta. Acción primero. Pasos numerados. Nada de "¡Espero que esto ayude!".diff --git a/.github/readme/README.fa.md b/.github/readme/README.fa.mdindex 3516c48..da280c2 100644--- a/.github/readme/README.fa.md+++ b/.github/readme/README.fa.md@@ -31,6 +31,8 @@ Install the i-have-adhd skill/plugin from https://github.com/ayghri/i-have-adhd,🔗 [مشاهده راهنمای نصب](../install/INSTALL.fa.md)+پلاگین OpenCode از V1 نسخه 1.18.29 و جدیدتر و V2 پشتیبانی میکند.+## این مهارت چه کار میکند؟diff --git a/.github/readme/README.id.md b/.github/readme/README.id.mdindex 30f2868..3fe020e 100644--- a/.github/readme/README.id.md+++ b/.github/readme/README.id.md@@ -24,6 +24,8 @@🔗 [Panduan Instalasi](../install/INSTALL.id.md)+Plugin OpenCode mendukung V1 1.18.29 atau lebih baru dan V2.+## Apa Fungsinya Sii?Sebuah skill untuk asisten coding-mu yang mencegahnya mengubur jawaban di tengah teks. Aksi di awal. Langkah bernomor. Tanpa basa-basi seperti "Semoga membantu!"@@ -94,4 +96,4 @@ Terinspirasi secara bebas dari *The Adult ADHD Tool Kit* karya J. Russell RamsayMIT.-Beri ⭐ jika ini menyelamatkanmu dari harus menggulir layar melewati satu lagi "Pertanyaan bagus!"\ No newline at end of file+Beri ⭐ jika ini menyelamatkanmu dari harus menggulir layar melewati satu lagi "Pertanyaan bagus!"diff --git a/.github/readme/README.ja.md b/.github/readme/README.ja.mdindex 57c744d..719d0e7 100644--- a/.github/readme/README.ja.md+++ b/.github/readme/README.ja.md@@ -31,6 +31,8 @@ Install the i-have-adhd skill/plugin from https://github.com/ayghri/i-have-adhd,または、🔗 [インストール手順を確認する](../install/INSTALL.ja.md)。+OpenCode プラグインは V1 1.18.29以降と V2 に対応しています。+## 機能コーディングアシスタントの回答を長文で埋めさせないようにするスキル。最優先は行動で、手順を箇条書きで整理。 「お役に立てれば幸いです!」などの不要な挨拶や定型文をカットします。diff --git a/.github/readme/README.ko.md b/.github/readme/README.ko.mdindex aa46b85..8a5f8ab 100644--- a/.github/readme/README.ko.md+++ b/.github/readme/README.ko.md@@ -26,6 +26,8 @@🔗 [설치 안내](../install/INSTALL.ko.md)+OpenCode 플러그인은 V1 1.18.29 이상과 V2를 지원합니다.+## 무슨 일을 하나코딩 어시스턴트가 답을 긴 글 속에 묻어두지 못하게 막는 스킬입니다. **행동 우선**, 단계는 **번호로**, "도움이 되었기를!" 같은 군더더기 없음.diff --git a/.github/readme/README.pt-BR.md b/.github/readme/README.pt-BR.mdindex b09789f..69c3984 100644--- a/.github/readme/README.pt-BR.md+++ b/.github/readme/README.pt-BR.md@@ -26,6 +26,8 @@🔗 [Instruções de instalação](../install/INSTALL.pt-BR.md)+O plugin OpenCode suporta V1 1.18.29 ou superior e V2.+## O que ela fazUma skill para o seu assistente de código que impede que ele enterre a resposta. Ação primeiro. Passos numerados. Nada de "Espero ter ajudado!"diff --git a/.github/readme/README.th.md b/.github/readme/README.th.mdindex 57bbf4b..e788a2a 100644--- a/.github/readme/README.th.md+++ b/.github/readme/README.th.md@@ -31,6 +31,8 @@ Install the i-have-adhd skill/plugin from https://github.com/ayghri/i-have-adhd,หรือ 🔗 [ดูวิธีติดตั้ง](../../INSTALL.md) (ภาษาอังกฤษ)+ปลั๊กอิน OpenCode รองรับ V1 ตั้งแต่ 1.18.29 และ V2+## มันทำอะไรได้บ้างเป็น Skill สำหรับผู้ช่วยเขียนโค้ดของคุณ ซึ่งช่วยไม่ให้คำตอบสำคัญ ๆ ถูกกลบด้วยข้อความยาว ๆ โดยจะแสดงสิ่งที่ต้องทำก่อน มีขั้นตอนและเลขกำกับ และไม่มีประโยคอย่าง “หวังว่าจะช่วยได้นะ!”diff --git a/.github/readme/README.vi.md b/.github/readme/README.vi.mdindex 3644849..ec21d31 100644--- a/.github/readme/README.vi.md+++ b/.github/readme/README.vi.md@@ -26,6 +26,8 @@🔗 [Hướng dẫn cài đặt](../install/INSTALL.vi.md)+Plugin OpenCode hỗ trợ V1 từ 1.18.29 và V2.+## Skill này làm gìMột skill dành cho trợ lý lập trình, giúp câu trả lời đi thẳng vào trọng tâm thay vì bị chôn vùi trong những đoạn văn dài. Hành động trước. Đánh số các bước. Không có câu “Hy vọng điều này hữu ích!”diff --git a/.github/readme/README.zh-CN.md b/.github/readme/README.zh-CN.mdindex 01e6f83..70a7102 100644--- a/.github/readme/README.zh-CN.md+++ b/.github/readme/README.zh-CN.md@@ -32,6 +32,8 @@ Install the i-have-adhd skill/plugin from https://github.com/ayghri/i-have-adhd,或 🔗 [查看安装说明](../install/INSTALL.zh-CN.md)+OpenCode 插件支持 V1 1.18.29及以上和 V2。+## 功能一个给编程助手用的技能,让它别把答案埋进长篇大论。行动优先。步骤编号。不说“希望这能帮到你!”diff --git a/.opencode/plugins/i-have-adhd.js b/.opencode/plugins/i-have-adhd.jsindex df89218..62aee34 100644--- a/.opencode/plugins/i-have-adhd.js+++ b/.opencode/plugins/i-have-adhd.js@@ -1,16 +1,2 @@-// OpenCode V2 entry point for i-have-adhd.-//-// OpenCode V2 auto-discovers direct `.ts` and `.js` files in a discovered-// `.opencode/plugins/` directory, but not `.mjs`, and a `plugins` config entry-// must name a directory — 2.0.18 rejects a file path with "configured plugin-// path must be a directory" and silently ignores a directory path.-//-// This mirror re-exports the implementation so a local checkout works on V2-// with no config entry. The module keeps its own `__dirname`, so its-// `../../skills` and `../command/i-have-adhd.md` lookups still resolve inside-// the checkout.-//-// OpenCode V1 does not auto-discover `.opencode/plugins/`, so V1 keeps using-// the explicit path in `opencode.json`:-// { "plugin": ["/absolute/path/to/i-have-adhd/.opencode/plugins/i-have-adhd.mjs"] }+// V1 and V2 discover .js files; the .mjs implementation keeps its asset paths.export { default } from './i-have-adhd.mjs';diff --git a/.opencode/plugins/i-have-adhd.mjs b/.opencode/plugins/i-have-adhd.mjsindex 82d8db5..79672d1 100644--- a/.opencode/plugins/i-have-adhd.mjs+++ b/.opencode/plugins/i-have-adhd.mjs@@ -1,31 +1,10 @@-// i-have-adhd — OpenCode plugin.-//-// Mirrors the Claude Code / Codex behaviour for OpenCode: the skill in-// `skills/i-have-adhd/SKILL.md` is the single source of truth for the ruleset.-//-// • On demand — registers the skills directory and a `/i-have-adhd`-// command so the ruleset applies for the rest of the session.-// • Always-on — when the opt-in flag file exists, the full ruleset is-// appended to the system prompt every turn (the OpenCode-// equivalent of the SessionStart hook in hooks/always-on.sh).-//-// Opt in to always-on: touch ~/.config/opencode/.i-have-adhd-always-// Opt back out: rm ~/.config/opencode/.i-have-adhd-always-//-// One default export serves both plugin APIs. V2 calls `setup(ctx)`; V1 calls-// `server()`. V1 object entrypoints require OpenCode 1.18.29 or newer, so-// 1.18.28 and older need the previous plugin file. The two APIs are separate —-// `server()` restates the V1 hooks rather than translating `setup`.-//-// V2 install — add to opencode.json(c), plural field, directory path:-// { "plugins": ["/absolute/path/to/i-have-adhd"] }-// V1 install — add to opencode.json, singular field, file path:-// { "plugin": ["/absolute/path/to/i-have-adhd/.opencode/plugins/i-have-adhd.mjs"] }+// OpenCode V1 (1.18.29+) uses server(); V2 uses setup().+// Both register the canonical skill, slash command, and opt-in always-on hook.-import fs from 'fs';-import os from 'os';-import path from 'path';-import { fileURLToPath } from 'url';+import fs from 'node:fs';+import os from 'node:os';+import path from 'node:path';+import { fileURLToPath } from 'node:url';const __dirname = path.dirname(fileURLToPath(import.meta.url));const skillsDir = path.resolve(__dirname, '../../skills');@@ -38,9 +17,7 @@ const FALLBACK_DESCRIPTION ='multi-step work, restate state across turns, suppress tangents, give ' +'specific time estimates, make wins visible.';-// JSON is valid YAML frontmatter; share native command metadata without a YAML dependency.-// Returns the full definition: V1 registers it as `config.command[...]`, while V2-// reads only `description` because `Command.Info` has no other fields.+// Command frontmatter is JSON so both loaders can share metadata without a YAML parser.async function commandDefinition() {const raw = await fs.promises.readFile(commandPath, 'utf8');const match = raw.match(/^---[^\S\r\n]*\r?\n([\s\S]*?)\r?\n---[^\S\r\n]*(?:\r?\n|$)([\s\S]*)$/);@@ -48,17 +25,13 @@ async function commandDefinition() {return { ...JSON.parse(match[1]), template: match[2].trim() };}-// Always-on opt-in flag, mirroring Claude Code's ~/.claude/.i-have-adhd-always-// but under OpenCode's config dir so the two tools stay independent.const flagPath = path.join(process.env.XDG_CONFIG_HOME || path.join(os.homedir(), '.config'),'opencode','.i-have-adhd-always',);-// Read SKILL.md and strip a leading YAML frontmatter block (--- ... ---).-// Regex and trailing-newline trim match hooks/always-on.mjs so always-on-// injections behave identically across harnesses (see tests/test_always_on_hooks.py).+// Match the shared hooks' frontmatter stripping and newline handling.function rulesetBody() {return fs.readFileSync(skillPath, 'utf8')@@ -66,31 +39,23 @@ function rulesetBody() {.replace(/(?:\r?\n)+$/, '');}-// Shared by both APIs: the text to inject, or null when the flag is absent or-// the ruleset cannot be read. The callers differ only in how they append — V1-// mutates the last string in `output.system`, V2 pushes a typed text part.function alwaysOnInjection() {- let on = false;- try { on = fs.existsSync(flagPath); } catch (e) {}- if (!on) return null;-- let body;- try { body = rulesetBody(); } catch (e) { return null; }-- const header =- 'ADHD MODE ACTIVE (always-on). The ruleset below applies to every ' +- 'response. "stop adhd mode" or "normal mode" turns it off for this ' +- 'session; delete ' + flagPath + ' to turn always-on off for good.';- return header + '\n\n' + body;+ try {+ if (!fs.existsSync(flagPath)) return null;+ const header =+ 'ADHD MODE ACTIVE (always-on). The ruleset below applies to every ' ++ 'response. "stop adhd mode" or "normal mode" turns it off for this ' ++ 'session; delete ' + flagPath + ' to turn always-on off for good.';+ return header + '\n\n' + rulesetBody();+ } catch {+ return null;+ }}export default {id: SKILL_ID,- // OpenCode V2.async setup(ctx) {- // Make the skill discoverable, so the `skill` tool and the /i-have-adhd- // command can both load it.try {const content = rulesetBody();await ctx.skill.transform((editor) => {@@ -103,50 +68,40 @@ export default {content,});});- } catch (e) {- // Missing or malformed SKILL.md must not break command registration.+ } catch {+ // Keep the command available if skill registration fails.}- // Register /i-have-adhd. A global install loads the plugin from a path with- // no project-scope `.opencode/command/` directory, so the plugin has to- // supply the command itself (see #140).try {const command = await commandDefinition();await ctx.command.transform((editor) => {editor.add({name: SKILL_ID,description: command.description || FALLBACK_DESCRIPTION,- execute: async ({ sessionID, prompt, delivery }) => {- await ctx.session.prompt({+ execute: ({ sessionID, prompt, delivery }) =>+ ctx.session.prompt({...prompt,sessionID,text: prompt.text ? `${command.template}\n\n${prompt.text}` : command.template,delivery,- });- },+ }),});});- } catch (e) {- // Missing or malformed command files must not break skill discovery.+ } catch {+ // Keep skill discovery available if command registration fails.}- // Always-on: append the ruleset to the system prompt every turn while the- // flag file exists. "stop adhd mode" turns it off for the session (the- // model honours the skill's own Persistence rules); deleting the flag- // turns always-on off for good.try {await ctx.session.hook('context', (event) => {const injected = alwaysOnInjection();if (!injected) return;event.system.push({ type: 'text', text: injected });});- } catch (e) {- // Always-on injection is optional; never break plugin load.+ } catch {+ // Optional hook failures must not block plugin loading.}},- // OpenCode V1 (1.18.29+). The APIs are separate: this restates the V1 hooks- // rather than translating `setup`.async server() {return {config: async (config) => {@@ -154,14 +109,14 @@ export default {config.skills.paths = config.skills.paths || [];if (!config.skills.paths.includes(skillsDir)) config.skills.paths.push(skillsDir);- // Global installs need a command entry; preserve native or user-defined commands.+ // Preserve a native or user-defined command with the same name.try {config.command = config.command || {};if (!config.command[SKILL_ID]) {config.command[SKILL_ID] = await commandDefinition();}- } catch (e) {- // Missing or malformed command files must not break skill discovery.+ } catch {+ // Keep skill discovery available if command registration fails.}},diff --git a/AGENTS.md b/AGENTS.mdindex 9e57bda..49a84d2 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -31,7 +31,7 @@ Agents may read and reference any GitHub issue or pull request. Commenting has n| Claude and Codex metadata | `.claude-plugin/`, `.codex-plugin/`, `.agents/plugins/` | Plugin manifests and marketplace metadata. || Shared hooks | `hooks/hooks.json`, `hooks/always-on.*` | Hook declarations and cross-platform always-on behavior. || Pi and OMP | `package.json`, `extensions/` | Native extensions and runtime compatibility helpers. |-| OpenCode | `opencode.json`, `.opencode/` | OpenCode plugin and command entry points. |+| OpenCode | `.opencode/` | Auto-discovered plugin and command entry points for V1 (1.18.29+) and V2. || Other runtimes | `qwen-extension.json`, `kimi.plugin.json`, `gemini-extension.json`, `GEMINI.md`, `plugin.json` | Qwen, Kimi, Gemini, and additional plugin metadata. || Documentation | `README.md`, `INSTALL.md`, `.github/readme/`, `.github/install/` | User-facing overview, installation, and translations. || Verification | `tests/`, `scripts/` | Unit tests, compatibility checks, and evaluation tooling. |diff --git a/INSTALL.md b/INSTALL.mdindex c047f4b..b8c8d8c 100644--- a/INSTALL.md+++ b/INSTALL.md@@ -508,117 +508,71 @@ Use slash command `/skill:i-have-adhd` to invoke the skill explicitly.<details><summary><strong>OpenCode</strong></summary>-# OpenCode+The plugin supports OpenCode V1 **1.18.29+** and V2. It registers the skill and `/i-have-adhd` command, and adds optional always-on mode. Older V1 versions need an upgrade or the plugin from the previous skill release.-OpenCode reads `skills/i-have-adhd/SKILL.md` natively, so the ruleset is available-to the `skill` tool with no plugin at all. The plugin adds two things on top: the-`/i-have-adhd` slash command for a global install, and the always-on flag.--The plugin serves both OpenCode plugin APIs from one default export. OpenCode V2-calls `setup(ctx)`; OpenCode V1 calls `server()`. V1 object entrypoints require-OpenCode 1.18.29 or newer — on 1.18.28 and older, stay on the plugin file from the-previous release, which exports a bare plugin function.--## Install--### Skill only (no plugin)--Copy the skill into your global skills directory. OpenCode discovers-`~/.config/opencode/skills/` and every project already gets the ruleset through the-`skill` tool. Ask for it in plain words ("use the i-have-adhd skill").--```bash-mkdir -p ~/.config/opencode/skills/i-have-adhd-cp skills/i-have-adhd/SKILL.md ~/.config/opencode/skills/i-have-adhd/SKILL.md-```--### Skill and `/i-have-adhd` command (no plugin)+### Install-Also copy the command file. A global install has no project-scope-`.opencode/commands/` directory, so `/i-have-adhd` is otherwise missing from the-`/` menu (see #140).+For use across projects:```bash-mkdir -p ~/.config/opencode/commands-cp .opencode/command/i-have-adhd.md ~/.config/opencode/commands/i-have-adhd.md+git clone https://github.com/ayghri/i-have-adhd ~/.config/opencode/vendor/i-have-adhd+mkdir -p ~/.config/opencode/plugins+cat > ~/.config/opencode/plugins/i-have-adhd.js <<'EOF'+export { default } from '../vendor/i-have-adhd/.opencode/plugins/i-have-adhd.mjs';+EOF```-This is the recommended global install: two files, no plugin, no build step.+The relative import works as written; no path substitution is needed. V1 and V2 automatically discover `.js` plugins. From a checkout, start OpenCode in the repository directory: `.opencode/plugins/i-have-adhd.js` loads the plugin without `opencode.json`.-### Plugin (adds always-on)+Existing V1 installations that reference the `.mjs` file through `plugin` in `opencode.json` still work on 1.18.29+. Use either that entry or the loader above, not both, to avoid duplicate loading.-The plugin registers the skill and the command itself and adds the always-on-flag.+Start a new session and type `/i-have-adhd`. The rules apply until you say `stop adhd mode` or `normal mode`.-**Running from a checkout needs no configuration on OpenCode V2.** V2 auto-discovers-direct `.ts` and `.js` files in a discovered `.opencode/plugins/` directory, and this-repository ships `.opencode/plugins/i-have-adhd.js` as a mirror of the implementation.-Open a terminal in the checkout and start OpenCode.+#### Skill and command only (without always-on)-OpenCode V1 does not auto-discover `.opencode/plugins/`, so add the plugin explicitly:--```jsonc-{ "plugin": ["/absolute/path/to/i-have-adhd/.opencode/plugins/i-have-adhd.mjs"] }-```--**For a global install, expose the vendored checkout with a one-line loader**, because-the checkout is not a discovered project:+Alternatively, from a checkout, copy the skill and command into OpenCode's global directories:```bash-git clone https://github.com/ayghri/i-have-adhd ~/.config/opencode/vendor/i-have-adhd-mkdir -p ~/.config/opencode/plugins-cat > ~/.config/opencode/plugins/i-have-adhd.js <<'EOF'-export { default } from "file://$HOME/.config/opencode/vendor/i-have-adhd/.opencode/plugins/i-have-adhd.mjs";-EOF+mkdir -p ~/.config/opencode/skills/i-have-adhd ~/.config/opencode/commands+cp skills/i-have-adhd/SKILL.md ~/.config/opencode/skills/i-have-adhd/SKILL.md+cp .opencode/command/i-have-adhd.md ~/.config/opencode/commands/i-have-adhd.md```-The loader re-exports the vendored module so its `__dirname` — and therefore its-`../../skills` and `../command/i-have-adhd.md` lookups — stay inside the checkout.-Replace `file://$HOME/...` with an absolute `file:///` URL.--A `plugins` config entry is not usable for either case on 2.0.18: a file path is-rejected with `configured plugin path must be a directory`, and a directory path is-accepted but never loaded. Auto-discovery is the supported route.--## Verify+### VerifyStart OpenCode, type `/`, and confirm `i-have-adhd` appears in the command list.-From a checkout on V1, `opencode debug config` should show `command["i-have-adhd"]`-and the checkout's `skills` directory under `skills.paths`.-## Update+### Update```bashgit -C ~/.config/opencode/vendor/i-have-adhd pull```-If you used the copy-based install, re-copy `SKILL.md` and-`.opencode/command/i-have-adhd.md` after pulling.+For the copy-based install, pull your checkout and re-copy the two files.-## Uninstall+### Uninstall-Remove `~/.config/opencode/plugins/i-have-adhd.js`, and whichever of-`~/.config/opencode/skills/i-have-adhd/` and-`~/.config/opencode/commands/i-have-adhd.md` you created.+Remove `~/.config/opencode/plugins/i-have-adhd.js`. For the copy-based install, remove `~/.config/opencode/skills/i-have-adhd/` and `~/.config/opencode/commands/i-have-adhd.md`. For an existing V1 config-based install, remove its `plugin` entry.-## Always-on (optional)+### Always-on (optional)-Requires the plugin.+Requires the plugin. The flag adds the complete ruleset to the system prompt on every turn:```bashtouch ~/.config/opencode/.i-have-adhd-always```-While the flag exists, the plugin appends the full ruleset to the system prompt-every turn — the OpenCode equivalent of the Claude Code `SessionStart` hook.-`stop adhd mode` or `normal mode` disables it for the current session; delete the-flag to turn always-on off for good:+`stop adhd mode` or `normal mode` asks the agent to return to its normal style for the current session. Delete the flag to stop automatic injection:```bashrm ~/.config/opencode/.i-have-adhd-always```+If `XDG_CONFIG_HOME` is set, replace `~/.config` in these paths with that directory.++</details>+<details><summary><strong>Pi</strong></summary>Pi discovers this repository as a native package: `extensions/` provides the session-persistent mode and `skills/` keeps the Agent Skills entry point available.diff --git a/README.md b/README.mdindex 6acecf9..ce776dc 100644--- a/README.md+++ b/README.md@@ -32,6 +32,8 @@ Install the i-have-adhd skill/plugin from https://github.com/ayghri/i-have-adhd,Or 🔗 [check the installation instructions](INSTALL.md).+The OpenCode plugin supports V1 1.18.29+ and V2.+## What it doesA skill for your coding assistant that stops it from burying the answer. Action first. Steps numbered. No "Hope this helps!"diff --git a/tests/opencode_plugin_driver.mjs b/tests/opencode_plugin_driver.mjsindex 5177c5c..379fad0 100644--- a/tests/opencode_plugin_driver.mjs+++ b/tests/opencode_plugin_driver.mjs@@ -1,20 +1,5 @@-// Test driver for the OpenCode plugin. Imports the plugin at argv[2], calls the-// API named by argv[3], and prints a JSON summary so tests can assert on it:-//-// skill V2: runs `setup(ctx)` and prints the registered skills.-// command V2: runs `setup(ctx)` and prints the registered commands, with-// `template` holding the prompt the command would submit.-// context V2: runs `setup(ctx)`, fires the `context` session hook against an-// empty system prompt, and prints the resulting system text.-// v1-config V1: calls `server()` and prints the config after its `config`-// hook runs twice, checking registration, overrides, and idempotency.-// v1-context V1: calls `server()` and fires-// `experimental.chat.system.transform` against an empty system-// prompt, printing the resulting system text.-//-// One default export serves both APIs: V2 calls `setup(ctx)`, V1 calls-// `server()`. A `context` or `v1-context` run prints nothing when the hook-// injects nothing (always-on flag absent).+// Usage: node driver.mjs <plugin> <skill|command|context|v1-config|v1-context> [config]+// Print registrations as JSON, or the injected system text for context modes.import { pathToFileURL } from 'node:url';const pluginPath = process.argv[2];@@ -27,7 +12,6 @@ const hooks = new Map();const prompts = [];const editorFor = (store) => ({- list: () => [...store.values()],get: (id) => store.get(id),add: (entry) => store.set(entry.id ?? entry.name, entry),});diff --git a/tests/test_opencode_plugin.py b/tests/test_opencode_plugin.pyindex d7110b7..a4ddd7f 100644--- a/tests/test_opencode_plugin.py+++ b/tests/test_opencode_plugin.py@@ -9,9 +9,7 @@ from pathlib import PathROOT = Path(__file__).resolve().parents[1]-# The plugin default-exports one definition serving both APIs: V2 calls-# `setup(ctx)` and V1 calls `server()`. Always-on injection is shared, so it is-# asserted through both entry points.+# Exercise both runtime APIs against the same fixtures.INJECTION_MODES = ["context", "v1-context"]@@ -26,7 +24,7 @@ class OpenCodePluginTest(unittest.TestCase):def setUp(self):self.temp_dir = tempfile.TemporaryDirectory()self.addCleanup(self.temp_dir.cleanup)- self.plugin_root = Path(self.temp_dir.name) / "plugin"+ self.plugin_root = Path(self.temp_dir.name).resolve() / "plugin"shutil.copytree(ROOT / ".opencode", self.plugin_root / ".opencode")shutil.copytree(ROOT / "skills", self.plugin_root / "skills")# The plugin reads its flag from $XDG_CONFIG_HOME/opencode/.i-have-adhd-always.@@ -208,14 +206,8 @@ class OpenCodePluginTest(unittest.TestCase):self.assertEqual([str(self.plugin_root / "skills")], config["skills"]["paths"])- # --- V2 auto-discovery mirror ----def test_js_mirror_reexports_the_implementation(self):- # OpenCode V2 auto-discovers direct .ts/.js files in a discovered- # .opencode/plugins/ directory but not .mjs, and a `plugins` config entry- # is unusable on 2.0.18 (file paths rejected, directory paths ignored).- # The .js mirror is what makes a local checkout load on V2, so assert it- # exists and resolves to the same definition as the .mjs.+ # Discovery uses .js; re-exporting must preserve the module identity.mirror = ROOT / ".opencode" / "plugins" / "i-have-adhd.js"impl = ROOT / ".opencode" / "plugins" / "i-have-adhd.mjs"self.assertTrue(mirror.is_file(), "missing V2 auto-discovery mirror")@@ -227,9 +219,7 @@ class OpenCodePluginTest(unittest.TestCase):"const a = (await import(process.argv[1])).default;""const b = (await import(process.argv[2])).default;""process.stdout.write(JSON.stringify({"- "same: a === b || (a.id === b.id && typeof a.setup === 'function'"- " && typeof b.setup === 'function' && typeof a.server === 'function'"- " && typeof b.server === 'function'),"+ "same: a === b,""id: a.id, keys: Object.keys(a).sort()}));")result = subprocess.run(