i-have-adhd: readable responses, adapters and evidence
One ruleset, three persistence models in i-have-adhd
Trace startup injection, per-turn transformation and Pi session state without flattening them into a generic plugin diagram.
What you will learn
- The reusable asset is the rules document
- Startup and per-turn injection have different consequences
- Pi adds explicit state and context reconciliation
Before you start
- Basic Git and command-line knowledge
- Ability to separate observed behavior from an untested claim
Explain the inspected mechanism, plan a reversible trial and interpret evidence without treating style as correctness.
Key takeaways
- Rules and delivery lifecycle are separate components.
- Fail-open loading can hide missing rules.
- Pi state inspection is not Pi runtime verification.
The reusable asset is the rules document
The canonical skill supplies presentation instructions; manifests make that asset discoverable, while executable adapters decide when to inject it. Separating these responsibilities explains why a wording edit can affect several integrations, but a fix to one adapter does not automatically repair another host lifecycle. Pin both rules and adapter code when comparing revisions.
The Node startup hook resolves SKILL.md relative to its own script location and removes a leading YAML block before writing the body. The launcher separately obtains a plugin root from environment variables. These are distinct trust boundaries: a relative rule lookup does not validate every path selected by the launcher or everything the host permits a plugin to execute.
Startup and per-turn injection have different consequences
hooks.json registers SessionStart events, and the Node implementation checks an opt-in marker before emitting rules. It does not maintain an in-process conversation state machine. The inspected OpenCode adapter instead registers experimental.chat.system.transform and appends rules on each invocation while its own marker exists. A fresh transform call can therefore inject again.
Both implementations tolerate certain file failures to avoid disrupting the host. That improves availability but makes silence ambiguous: it may mean the user opted out, a file is missing or another guarded operation failed. Diagnose the loading path before concluding that a model ignored instructions. A successful process exit is not sufficient evidence that rules were present.
Pi adds explicit state and context reconciliation
The Pi extension reads saved custom state entries and falls back to defaults such as a flag or configuration setting. It emits different custom messages for enabled and disabled modes, handles stop phrases and synchronizes after session events. Its context helper is intended to determine whether the latest relevant marker is still active after context changes.
This series inspected that TypeScript path but did not execute the Pi runtime or its compatibility helper. Our fourteen cases cover only the Node hook and OpenCode adapter with synthetic context. The architecture diagram distinguishes inspected Pi behavior from executed fixture paths so that a successful test of one integration is not presented as a test of all three.
Decision guide
| Criterion | Option A | Option B |
|---|---|---|
| Best when | You need predictable behavior and easy auditing | You need adaptive optimization and have reliable telemetry |
| Main risk | May leave performance on the table | Can become difficult to explain or debug |
Implementation steps
- 1
Locate the canonical rules document.
- 2
Map the event that invokes each adapter.
- 3
Identify its opt-in and disable state.
- 4
Separate inspected paths from executed tests.
Copy-ready example
{
"Node": "SessionStart + opt-in marker",
"OpenCode": "system transform + separate marker",
"Pi": "saved state + context reconciliation",
"PiRuntimeTested": false
}Frequently asked questions
Do all integrations inject once?
No. The inspected paths include startup injection and per-turn transformation.
Does an exit code of zero prove activation?
No. The Node hook also exits successfully for opt-out and guarded failures.
Sources
- i-have-adhd / skills/i-have-adhd/SKILL.mdSource checked 2026-09-12
- i-have-adhd / hooks/always-on.mjsSource checked 2026-09-12
- i-have-adhd / hooks/hooks.jsonSource checked 2026-09-12
- i-have-adhd / .opencode/plugins/i-have-adhd.mjsSource checked 2026-09-12
- i-have-adhd / extensions/i-have-adhd.tsSource checked 2026-09-12