docs

Plugins

Editor plugins

Emit zegit evidence from your existing agent — Claude Code or OpenCode — deterministically, around every tool call. Same record as mongoose; only the producer differs.

Both plugins record what the agent did during a session as a platform-standard, unsigned evidence record written to .zegit/evidence/<session>.jsonl, ready to hand to zg evidence evaluate. Because the harness emits evidence deterministically — not via a model-callable tool — "the agent simply didn't log it" is impossible. Both fail open: a recording error never blocks your session.

Claude Code

A Go hook binary, zegit-evidence, wired into Claude Code's hook events.

terminalbash
git clone https://github.com/zegit-zoo/plugin-claude-code
cd plugin-claude-code
./install.sh

The installer builds the binary and prints a hook block to merge into ~/.claude/settings.json (user-wide) or .claude/settings.json (per repo):

~/.claude/settings.jsonjson
{
  "hooks": {
    "PostToolUse": [
      { "hooks": [{ "type": "command", "command": "zegit-evidence step" }] }
    ],
    "Stop": [
      { "hooks": [{ "type": "command", "command": "zegit-evidence finalize" }] }
    ]
  }
}

PostToolUse appends a step per tool call; Stop assembles and writes the record (and removes the staging file). Then hand off:

terminalbash
zg evidence evaluate .zegit/evidence/<session>.jsonl

OpenCode

A TypeScript plugin run natively via Bun — no build step. Register it in opencode.json:

opencode.jsonjson
{
  "plugin": ["@zegit-zoo/plugin-opencode"]
}

It hooks tool.execute.before/after to record each call (a started-but-never-finished call stays recorded as failed), captures the model best-effort from chat.message, and flushes one record per session on session.idle and shutdown. Alternatively, drop src/*.ts into .opencode/plugin/.

What they share

Both emit the same core common/evidence record (schema 0.1) — only producer.name and actor.agent.harness differ (claude-code vs opencode). Both write unsigned records bound to repo state; signing and verification are always zg's job. The .jsonl is a gitignored runtime log — the durable, committed artifact is the signed AoV that zg produces.

See Core concepts for the record shape and the envelope ladder these feed into, and mongoose for a harness that emits the same evidence natively.

Authoritative reference, generated from the component repos. Spot something stale? Tell us.