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 — a non-empty identifier for the authoring agent, e.g.

"claude-opus-4-8", "codex".

  • 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 model or runtime label.
  • nickname — a user-supplied nickname for the agent.
  • harness — the agent harness, an object with both name and version

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

A minimal, always-valid note:

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

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