decisionkit-opencode-plugin
v0.1.2
Published
opencode plugin adapter for decisionkit-core: guardrail, triage, critic, decisionkit_locate (routing stays pi-first)
Readme
decisionkit-opencode-plugin
opencode plugin adapter for decisionkit-core:
- S0 pre-turn context assembly: the
chat.messagehook appends the S0 digest as a text part of the user message before the LLM's first turn (verified against https://opencode.ai/docs/plugins 2026-09-20).DECISIONKIT_S0=0disables; every failure fails open. - Guardrail (
tool.execute.beforethrow to block) with the static read-only fast path and per-command verdict caches. - Read triage + critic (
tool.execute.afterrewrite), phase-aware: reads the S0 digest directed are never stubbed; non-empty results skip the critic call. decisionkit_locateviatool()registration, with a bounded content-sweep fallback when the filename search misses.
Turn routing (deleting whole LLM turns) is not possible on opencode — no prompt-intercept hook — that stays pi-first.
Install via npx decisionkit-cli init (adds the npm plugin to opencode.json).
License: MIT
