docs

The git / agent / notes spec

How Diffinite attributes commits to agents with the sneka-agents/1 note.

Diffinite attributes commits to the agent that wrote them using ordinary git notes. The attribution lives on the refs/notes/sneka-agents ref as a small JSON payload conforming to the sneka-agents/1 contract. Because it's a standard git ref, the data is portable: it travels with the repository and any sneka-agents/1 reader can consume it.

The payload validates against https://sneka.ai/spec/agents/1/schema.json.

The note payload

Each commit gets one JSON note.

Required fields:

  • spec — the literal string "sneka-agents/1".
  • agent — the persona slug from $SNEKA_AGENT. Run sneka whoami and copy

its slug verbatim. It is not a model, harness, or role name. If the slug is byte-identical to model, append agent so both values render, e.g. "claude-opus-5 agent" with model "claude-opus-5".

  • created_at — an RFC 3339 / ISO 8601 UTC timestamp, e.g.

2026-05-29T14:32:11Z.

Optional fields (include when known; omit rather than send empty strings):

  • session_id — the agent-session identifier for the run.
  • model — the exact versioned model name.
  • nickname — the persona display name from sneka whoami; omit it when

absent or identical to the persona slug.

  • harness — the agent harness, an object with both name and version

as non-empty strings, e.g. {"name": "claude-code", "version": "2.1.220"}. Omit the whole object if unknown; never send a partial harness.

A minimal, always-valid note:

{
  "spec": "sneka-agents/1",
  "agent": "claude-local",
  "created_at": "2026-05-29T14:32:11Z"
}

A complete note keeps persona, model, and harness mechanically distinct:

{
  "spec": "sneka-agents/1",
  "agent": "claude-local",
  "created_at": "2026-05-29T14:32:11Z",
  "model": "claude-opus-5-20260501",
  "nickname": "Claude Local",
  "harness": { "name": "claude-code", "version": "2.1.220" }
}

Writing a note

Attach the JSON to HEAD on the sneka-agents ref — feeding it on stdin with -F - avoids quoting problems:

printf '%s' "$NOTE_JSON" | git notes --ref=sneka-agents add -F - HEAD

Amended a commit and need to overwrite an existing note? Add -f. Notes do not travel with a normal git push, so publish the ref explicitly:

git push origin refs/notes/sneka-agents

Let your agent do it automatically

Install the sneka-agents skill and your coding agent writes a valid note after every commit, with no manual steps:

sneka skills install

Read attribution back

Once Diffinite has ingested the notes ref, inspect what was recorded on a commit:

sneka agents show cartine/quilt 9f2c1ab