{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://sneka.ai/spec/agents/1/schema.json",
  "$comment": "SPDX-License-Identifier: MIT",
  "title": "Agent note v1",
  "description": "Git note payload for refs/notes/sneka-agents.",
  "type": "object",
  "additionalProperties": true,
  "required": ["spec", "agent", "created_at"],
  "properties": {
    "spec": {
      "description": "Format version constant.",
      "type": "string",
      "const": "sneka-agents/1"
    },
    "agent": {
      "description": "Non-empty display identifier for the authoring agent.",
      "type": "string",
      "pattern": "\\S"
    },
    "created_at": {
      "description": "RFC 3339 timestamp for when the note was written.",
      "type": "string",
      "format": "date-time"
    },
    "session_id": {
      "description": "Optional local or hosted agent-session identifier.",
      "type": ["string", "null"]
    },
    "model": {
      "description": "Optional model or runtime label.",
      "type": ["string", "null"]
    },
    "nickname": {
      "description": "Optional user-supplied nickname for the authoring agent.",
      "type": ["string", "null"]
    },
    "harness": {
      "description": "Optional agent harness identity. When present, both name and version are required non-empty strings.",
      "type": ["object", "null"],
      "additionalProperties": false,
      "required": ["name", "version"],
      "properties": {
        "name": {
          "description": "Non-empty harness name, such as the local tool or product that wrote the note.",
          "type": "string",
          "pattern": "\\S"
        },
        "version": {
          "description": "Non-empty harness version string.",
          "type": "string",
          "pattern": "\\S"
        }
      }
    }
  },
  "examples": [
    {
      "spec": "sneka-agents/1",
      "agent": "codex",
      "created_at": "2026-05-25T14:32:11Z",
      "session_id": "sneka-koja-run-3a9b",
      "model": "gpt-5",
      "nickname": "scout",
      "harness": { "name": "koja", "version": "0.4.2" }
    }
  ]
}
