3 Commits

Author SHA1 Message Date
ayghri d1634a63cb fix(opencode): share JSON command metadata with the native loader
Replace partial YAML parsing with JSON frontmatter accepted by both loading paths. Read asynchronously, preserve metadata types and existing commands, and document the bundled format.

Merge current main, preserving Rule 9 and contributor history. Validation: 50 tests pass; OpenCode 1.18.27 live native/global parity, metadata, and override checks pass. No model calls.

Owner-directed amendment prepared with Codex (GPT-6).
2026-09-10 07:19:14 -06:00
Rimon Hanna a59741d992 Address Copilot review: robust frontmatter strip + normal mode wording
- opencode plugin: match hooks/always-on.mjs frontmatter regex (handles
  trailing whitespace on fences) and trailing-newline trim instead of trim()
- mention "normal mode" alongside "stop adhd mode" in the always-on banner,
  command doc, and INSTALL OpenCode section
2026-08-13 10:48:33 +02:00
Rimon Hanna a6ad3a258c Add OpenCode support (server plugin + command + always-on)
OpenCode was previously covered only by the generic agent-skills fallback
(skill discovery, no command, no always-on). This adds a first-class
OpenCode adapter mirroring the Codex/Pi layout:

- .opencode/plugins/i-have-adhd.mjs: server plugin that registers the
  skills/ path and /i-have-adhd command, and appends the ruleset to the
  system prompt every turn when ~/.config/opencode/.i-have-adhd-always
  exists (the OpenCode equivalent of the SessionStart always-on hook).
- .opencode/command/i-have-adhd.md: on-demand session command.
- opencode.json: run-from-checkout entry point.
- INSTALL.md: dedicated OpenCode section; dropped from the catch-all title.

Ruleset stays sourced from skills/i-have-adhd/SKILL.md (frontmatter
stripped at inject time) — no rule text duplicated.
2026-08-13 00:05:39 +02:00