From 175d33ae41bc8edb6e7828c1601cb55a8dd8eb77 Mon Sep 17 00:00:00 2001 From: Nat Welch Date: Tue, 13 Oct 2026 00:03:48 +0000 Subject: [PATCH 1/2] feat: install i-have-adhd in the server image --- Dockerfile | 13 +++++++++++++ README.md | 1 + opencode.jsonc | 3 ++- scripts/smoke-test.sh | 10 ++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cbc3adf..bb1fb12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,6 +49,18 @@ COPY scripts/build-config.mjs ./scripts/build-config.mjs RUN pnpm install --frozen-lockfile --ignore-scripts --no-optional \ && node scripts/build-config.mjs /build/runtime.json +FROM tools AS i-have-adhd +ARG I_HAVE_ADHD_COMMIT=1ecea1993b7fce257ffbd686c070948b5e07eda6 +WORKDIR /build/i-have-adhd +RUN set -eu; \ + for file in LICENSE .opencode/plugins/i-have-adhd.mjs \ + .opencode/command/i-have-adhd.md skills/i-have-adhd/SKILL.md; do \ + mkdir -p "$(dirname "$file")"; \ + curl --fail --silent --show-error --location \ + "https://raw.githubusercontent.com/ayghri/i-have-adhd/${I_HAVE_ADHD_COMMIT}/$file" \ + -o "$file"; \ + done + FROM tools ENV HOME=/data \ @@ -64,6 +76,7 @@ ENV HOME=/data \ SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt COPY --from=config /build/runtime.json /etc/opencode/opencode.json +COPY --from=i-have-adhd /build/i-have-adhd /opt/i-have-adhd COPY AGENTS.md /etc/opencode/AGENTS.md COPY skills /etc/opencode/skills COPY --chmod=755 entrypoint.sh healthcheck.sh /usr/local/bin/ diff --git a/README.md b/README.md index 137e907..0080b08 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ Grafana and Karakeep can connect before their credentials are validated; check a - **Build** is the default agent and can use all configured tools. **General** can implement and test; **Explore** is read-only. Both subagents may use Context7 but deny Grafana, Lunch Money, Karakeep, Notion, Robinhood, and further delegation. Tool permissions do not sandbox shell access. - [Superpowers](https://github.com/obra/superpowers) supplies planning, debugging, testing, and review skills. The image also ships [`commit-push-pr` and `go-repo`](skills/). [`AGENTS.md`](AGENTS.md) requires repository edits in `/data/workspace/.worktrees//`. - [OpenCode Quota](https://github.com/slkiser/opencode-quota) provides `/quota` and `/quota_status`. +- [i-have-adhd](https://github.com/ayghri/i-have-adhd) provides `/i-have-adhd` for ADHD-friendly output until you say `stop adhd mode` or `normal mode`. The image bundles a commit-pinned upstream plugin; for [always-on mode](https://github.com/ayghri/i-have-adhd/blob/main/INSTALL.md#opencode), run `docker compose exec opencode touch /data/.config/opencode/.i-have-adhd-always`. - Defaults and pinned plugins live in [`opencode.jsonc`](opencode.jsonc). The image converts it to `/etc/opencode/opencode.json`; project `opencode.json(c)` files can override settings. See the [V2 configuration guide](https://opencode.ai/v2/docs/config). - Each startup copies the image's [`AGENTS.md`](AGENTS.md) to `/data/.config/opencode/AGENTS.md`, replacing local edits. Change instructions in this repository and rebuild. diff --git a/opencode.jsonc b/opencode.jsonc index 2a1b203..d8326e1 100644 --- a/opencode.jsonc +++ b/opencode.jsonc @@ -111,7 +111,8 @@ "opencode-gemini-auth@2.0.1", "opencode-wakatime@1.4.0", "superpowers@git+https://github.com/obra/superpowers.git#bb92a77741419a4ab5f06e711a283343f1ada0c3", - "@slkiser/opencode-quota@5.0.2" + "@slkiser/opencode-quota@5.0.2", + "/opt/i-have-adhd/.opencode/plugins/i-have-adhd.mjs" ], "experimental": { "policies": [ diff --git a/scripts/smoke-test.sh b/scripts/smoke-test.sh index 1807ca6..35fd497 100644 --- a/scripts/smoke-test.sh +++ b/scripts/smoke-test.sh @@ -87,6 +87,16 @@ docker exec "$name" sh -ec ' OPENCODE_TEST_URL="$url" OPENCODE_PASSWORD="$password" \ node scripts/test-router-integration.mjs +curl --fail --silent --show-error --user "opencode:$password" \ + "$url/api/plugin?location%5Bdirectory%5D=/data/workspace" \ + | jq -e '.data[] | select(.id == "i-have-adhd") | .state.status == "active"' +curl --fail --silent --show-error --user "opencode:$password" \ + "$url/api/skill?location%5Bdirectory%5D=/data/workspace" \ + | jq -e '.data[] | select(.id == "i-have-adhd") | .content | contains("## Persistence") and contains("### 10.")' +curl --fail --silent --show-error --user "opencode:$password" \ + "$url/api/command?location%5Bdirectory%5D=/data/workspace" \ + | jq -e '.data[] | select(.name == "i-have-adhd")' + # Credentials and workspaces must be writable by the non-root runtime user. docker exec "$name" sh -c 'test "$(id -u)" = 1000 && test -w /data/workspace && test -w /data/.local/share/opencode' From 84977710cf907b965edc858d386e5b3359049b59 Mon Sep 17 00:00:00 2001 From: Nat Welch Date: Tue, 13 Oct 2026 00:05:59 +0000 Subject: [PATCH 2/2] docs: correct upstream installation link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0080b08..d7f711f 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Grafana and Karakeep can connect before their credentials are validated; check a - **Build** is the default agent and can use all configured tools. **General** can implement and test; **Explore** is read-only. Both subagents may use Context7 but deny Grafana, Lunch Money, Karakeep, Notion, Robinhood, and further delegation. Tool permissions do not sandbox shell access. - [Superpowers](https://github.com/obra/superpowers) supplies planning, debugging, testing, and review skills. The image also ships [`commit-push-pr` and `go-repo`](skills/). [`AGENTS.md`](AGENTS.md) requires repository edits in `/data/workspace/.worktrees//`. - [OpenCode Quota](https://github.com/slkiser/opencode-quota) provides `/quota` and `/quota_status`. -- [i-have-adhd](https://github.com/ayghri/i-have-adhd) provides `/i-have-adhd` for ADHD-friendly output until you say `stop adhd mode` or `normal mode`. The image bundles a commit-pinned upstream plugin; for [always-on mode](https://github.com/ayghri/i-have-adhd/blob/main/INSTALL.md#opencode), run `docker compose exec opencode touch /data/.config/opencode/.i-have-adhd-always`. +- [i-have-adhd](https://github.com/ayghri/i-have-adhd) provides `/i-have-adhd` for ADHD-friendly output until you say `stop adhd mode` or `normal mode`. The image bundles a commit-pinned upstream plugin; for [always-on mode](https://github.com/ayghri/i-have-adhd/blob/main/INSTALL.md), run `docker compose exec opencode touch /data/.config/opencode/.i-have-adhd-always`. - Defaults and pinned plugins live in [`opencode.jsonc`](opencode.jsonc). The image converts it to `/etc/opencode/opencode.json`; project `opencode.json(c)` files can override settings. See the [V2 configuration guide](https://opencode.ai/v2/docs/config). - Each startup copies the image's [`AGENTS.md`](AGENTS.md) to `/data/.config/opencode/AGENTS.md`, replacing local edits. Change instructions in this repository and rebuild.