{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://opentine.com/schemas/tine-experts-1.schema.json",
  "title": "tine-experts/1",
  "description": "`tine experts PATH --json`: agents (by model, from line attribution notes) and humans (by commit author e-mail) ranked by attributed lines, then verified runs. `verified_runs` counts runs credited by notes whose signature checks and whose content hashes still match.",
  "type": "object",
  "required": [
    "command",
    "schema",
    "path",
    "revision",
    "files",
    "files_clipped",
    "total_lines",
    "experts"
  ],
  "properties": {
    "command": {
      "const": "experts"
    },
    "schema": {
      "const": "tine-experts/1"
    },
    "path": {
      "type": "string"
    },
    "revision": {
      "type": "string",
      "pattern": "^([0-9a-f]{40}|[0-9a-f]{64})$"
    },
    "files": {
      "type": "integer",
      "minimum": 0
    },
    "files_clipped": {
      "type": "boolean"
    },
    "total_lines": {
      "type": "integer",
      "minimum": 0
    },
    "experts": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "rank",
          "kind",
          "id",
          "lines",
          "share",
          "files",
          "commits",
          "runs",
          "verified_runs"
        ],
        "properties": {
          "rank": {
            "type": "integer",
            "minimum": 1
          },
          "kind": {
            "enum": [
              "agent",
              "human"
            ]
          },
          "id": {
            "type": "string"
          },
          "lines": {
            "type": "integer",
            "minimum": 0
          },
          "share": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "files": {
            "type": "integer",
            "minimum": 0
          },
          "commits": {
            "type": "integer",
            "minimum": 0
          },
          "runs": {
            "type": "integer",
            "minimum": 0
          },
          "verified_runs": {
            "type": "integer",
            "minimum": 0
          }
        }
      }
    }
  }
}
