{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://loadsheet.dev/schema/v1.json",
  "title": "loadsheet Report",
  "type": "object",
  "properties": {
    "schema": {
      "const": 1,
      "description": "The schema version, 1."
    },
    "tool": {
      "type": "string",
      "minLength": 1,
      "description": "The tool and version that wrote it, such as loadsheet@0.0.1."
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "When it was generated, as an ISO 8601 timestamp."
    },
    "mode": {
      "enum": ["local", "fleet", "pack"],
      "type": "string",
      "description": "local: this machine; fleet: several machines; pack: a public pack, without usage."
    },
    "source": {
      "type": "string",
      "minLength": 1,
      "pattern": "^(?!(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/]))",
      "description": "In pack mode, the directory name or GitHub URL read."
    },
    "machines": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "The machine's name."
          },
          "reachable": {
            "type": "boolean",
            "description": "Whether its Scan was read."
          },
          "scannedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was scanned."
          },
          "error": {
            "type": "string",
            "description": "Why it could not be read."
          }
        },
        "required": ["name", "reachable"],
        "description": "A machine a Report read from."
      },
      "description": "The machines read; empty in pack mode."
    },
    "window": {
      "type": "array",
      "items": [
        {
          "type": "string",
          "format": "date",
          "description": "A UTC calendar day, written YYYY-MM-DD."
        },
        {
          "type": "string",
          "format": "date",
          "description": "A UTC calendar day, written YYYY-MM-DD."
        }
      ],
      "minItems": 2,
      "additionalItems": false,
      "description": "The first and last day it covers, inclusive."
    },
    "config": {
      "type": "object",
      "properties": {
        "window": {
          "type": "integer",
          "minimum": 1,
          "description": "Days of history read."
        },
        "usageWindow": {
          "type": "integer",
          "minimum": 1,
          "description": "Days of usage history kept, when `loadsheet usage --days` set them; absent, usage keeps every day the machines have a record of."
        },
        "harnesses": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]*$"
          },
          "description": "Only these harness ids were read, when set."
        },
        "via": {
          "type": "object",
          "properties": {
            "include": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^(?=.{1,128}$)[^\\s<>\"'\\x60/\\\\\\x00-\\x1f\\x7f-\\x9f\\xad\\u061c\\u180e\\u200b-\\u200f\\u202a-\\u202e\\u2060-\\u206f\\ufeff\\ufff9-\\ufffb]+(?: [^\\s<>\"'\\x60/\\\\\\x00-\\x1f\\x7f-\\x9f\\xad\\u061c\\u180e\\u200b-\\u200f\\u202a-\\u202e\\u2060-\\u206f\\ufeff\\ufff9-\\ufffb]+)*$"
              },
              "description": "Only sessions from these entrypoints were read, when not empty."
            },
            "exclude": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^(?=.{1,128}$)[^\\s<>\"'\\x60/\\\\\\x00-\\x1f\\x7f-\\x9f\\xad\\u061c\\u180e\\u200b-\\u200f\\u202a-\\u202e\\u2060-\\u206f\\ufeff\\ufff9-\\ufffb]+(?: [^\\s<>\"'\\x60/\\\\\\x00-\\x1f\\x7f-\\x9f\\xad\\u061c\\u180e\\u200b-\\u200f\\u202a-\\u202e\\u2060-\\u206f\\ufeff\\ufff9-\\ufffb]+)*$"
              },
              "description": "Sessions from these entrypoints were skipped."
            }
          },
          "required": ["include", "exclude"],
          "description": "The entrypoint filter."
        },
        "ignore": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^(skill|instructions|mcp|subagent|memory):(?!\\s*(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/])).+$",
            "description": "A piece of context's id, `${kind}:${name}`."
          },
          "description": "Item ids never reported."
        },
        "rules": {
          "type": "object",
          "properties": {
            "invisible-skill": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                },
                "minSessions": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Least sessions that listed it, default 5."
                },
                "bareShare": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1,
                  "description": "Least share of those that listed it bare, default 0.5."
                }
              },
              "required": ["enabled", "minSessions", "bareShare"],
              "description": "A skill listed without its description in most sessions."
            },
            "dead-skill": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                },
                "minSessions": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Least sessions that listed it, default 20."
                },
                "minDays": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Least days of history, default 14."
                }
              },
              "required": ["enabled", "minSessions", "minDays"],
              "description": "A skill listed for weeks and never invoked."
            },
            "manual-only": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                },
                "minUserUses": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Least user invocations, default 3."
                }
              },
              "required": ["enabled", "minUserUses"],
              "description": "A model-invocable skill only the user invokes."
            },
            "expensive-description": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                },
                "maxChars": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Most listed characters, default 300."
                }
              },
              "required": ["enabled", "maxChars"],
              "description": "A skill whose listing entry is longer than it should be."
            },
            "dead-pack": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                },
                "minSkills": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Least skills in the pack, default 5."
                }
              },
              "required": ["enabled", "minSkills"],
              "description": "A pack none of whose skills is used."
            },
            "duplicate": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                }
              },
              "required": ["enabled"],
              "description": "The same piece of context installed more than once."
            },
            "heavy-instructions": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                },
                "maxChars": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Most characters, default 12000."
                }
              },
              "required": ["enabled", "maxChars"],
              "description": "An instruction file larger than it should be."
            },
            "idle-mcp": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                },
                "minSessions": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Least sessions that listed it, default 20."
                }
              },
              "required": ["enabled", "minSessions"],
              "description": "An MCP server listed and never called."
            },
            "harness-mismatch": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                },
                "minSessions": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "A harness with fewer sessions in the window counts as unused, default 1."
                }
              },
              "required": ["enabled", "minSessions"],
              "description": "Context installed for a harness that is not used."
            },
            "drift": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                }
              },
              "required": ["enabled"],
              "description": "The same piece of context differs between machines."
            },
            "short-history": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                },
                "minDays": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Least days of history, default 30."
                }
              },
              "required": ["enabled", "minDays"],
              "description": "Too little history to judge."
            },
            "cache-ttl": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                }
              },
              "required": ["enabled"],
              "description": "Claude Code's prompt cache kept 5 minutes on recent days.",
              "default": {
                "enabled": true
              }
            },
            "cache-off": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                }
              },
              "required": ["enabled"],
              "description": "No request read the prompt cache.",
              "default": {
                "enabled": true
              }
            },
            "heavy-memory": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                },
                "maxLines": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Most lines, default 30."
                },
                "maxChars": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Most characters, default 4000."
                }
              },
              "required": ["enabled", "maxLines", "maxChars"],
              "description": "An auto memory index longer than it should be.",
              "default": {
                "enabled": true,
                "maxLines": 30,
                "maxChars": 4000
              }
            },
            "stale-memory": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                },
                "minFiles": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Least stale memories in one folder, default 1."
                }
              },
              "required": ["enabled", "minFiles"],
              "description": "Memories that look like dated state and have not changed in 30 days.",
              "default": {
                "enabled": true,
                "minFiles": 1
              }
            },
            "heavy-skill": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                },
                "maxChars": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Most body characters, default 6000."
                },
                "minLoads": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Least loads in the window, default 20."
                }
              },
              "required": ["enabled", "maxChars", "minLoads"],
              "description": "A skill whose body is long and loaded often.",
              "default": {
                "enabled": true,
                "maxChars": 6000,
                "minLoads": 20
              }
            },
            "oversized-subagent": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                },
                "maxContext": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Most mean context tokens per request, default 100000."
                },
                "minRequests": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Least requests in the window, default 500."
                }
              },
              "required": ["enabled", "maxContext", "minRequests"],
              "description": "A subagent type whose requests carry a large context on one model.",
              "default": {
                "enabled": true,
                "maxContext": 100000,
                "minRequests": 500
              }
            },
            "pull-waiting": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "description": "Whether the rule runs."
                },
                "maxWakes": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Most pull-request wakes per woken thread, default 8."
                },
                "minThreads": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Least woken threads in the window, default 10."
                }
              },
              "required": ["enabled", "maxWakes", "minThreads"],
              "description": "Threads that pull-request notifications keep waking.",
              "default": {
                "enabled": true,
                "maxWakes": 8,
                "minThreads": 10
              }
            }
          },
          "required": [
            "invisible-skill",
            "dead-skill",
            "manual-only",
            "expensive-description",
            "dead-pack",
            "duplicate",
            "heavy-instructions",
            "idle-mcp",
            "harness-mismatch",
            "drift",
            "short-history"
          ],
          "description": "Each rule, whether it runs, and its thresholds."
        }
      },
      "required": ["window", "via", "ignore", "rules"],
      "description": "The config it ran with."
    },
    "coverage": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "machine": {
            "type": "string",
            "minLength": 1,
            "description": "The machine's name."
          },
          "harness": {
            "type": "string",
            "minLength": 1,
            "description": "The harness id."
          },
          "installed": {
            "type": "boolean",
            "description": "Whether the harness's home exists on that machine."
          },
          "sessions": {
            "type": "integer",
            "minimum": 0,
            "description": "Sessions found in the window."
          },
          "versions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Harness versions seen in those sessions."
          },
          "firstDay": {
            "type": "string",
            "format": "date",
            "description": "The first day with a session."
          },
          "lastDay": {
            "type": "string",
            "format": "date",
            "description": "The last day with a session."
          },
          "signals": {
            "type": "object",
            "properties": {
              "listing": {
                "enum": ["exact", "inferred", "none"],
                "type": "string",
                "description": "How well a harness provides a signal: read directly, inferred from indirect evidence, or not at all."
              },
              "modelUse": {
                "enum": ["exact", "inferred", "none"],
                "type": "string",
                "description": "How well a harness provides a signal: read directly, inferred from indirect evidence, or not at all."
              },
              "userUse": {
                "enum": ["exact", "inferred", "none"],
                "type": "string",
                "description": "How well a harness provides a signal: read directly, inferred from indirect evidence, or not at all."
              },
              "instructions": {
                "enum": ["exact", "inferred", "none"],
                "type": "string",
                "description": "How well a harness provides a signal: read directly, inferred from indirect evidence, or not at all."
              },
              "mcp": {
                "enum": ["exact", "inferred", "none"],
                "type": "string",
                "description": "How well a harness provides a signal: read directly, inferred from indirect evidence, or not at all."
              },
              "tokens": {
                "enum": ["exact", "inferred", "none"],
                "type": "string",
                "description": "How well a harness provides a signal: read directly, inferred from indirect evidence, or not at all."
              },
              "usage": {
                "enum": ["exact", "inferred", "none"],
                "type": "string",
                "description": "How well a harness provides a signal: read directly, inferred from indirect evidence, or not at all.",
                "default": "none"
              },
              "cacheTtl": {
                "enum": ["exact", "inferred", "none"],
                "type": "string",
                "description": "How well a harness provides a signal: read directly, inferred from indirect evidence, or not at all.",
                "default": "none"
              },
              "turns": {
                "enum": ["exact", "inferred", "none"],
                "type": "string",
                "description": "How well a harness provides a signal: read directly, inferred from indirect evidence, or not at all.",
                "default": "none"
              },
              "hours": {
                "enum": ["exact", "inferred", "none"],
                "type": "string",
                "description": "How well a harness provides a signal: read directly, inferred from indirect evidence, or not at all.",
                "default": "none"
              },
              "tools": {
                "enum": ["exact", "inferred", "none"],
                "type": "string",
                "description": "How well a harness provides a signal: read directly, inferred from indirect evidence, or not at all.",
                "default": "none"
              },
              "limits": {
                "enum": ["exact", "inferred", "none"],
                "type": "string",
                "description": "How well a harness provides a signal: read directly, inferred from indirect evidence, or not at all.",
                "default": "none"
              }
            },
            "required": ["listing", "modelUse", "userUse", "instructions", "mcp", "tokens"],
            "description": "How well each signal is provided."
          },
          "contextWindow": {
            "type": "integer",
            "minimum": 1,
            "description": "The model's context window in tokens, as the harness reports it in its latest session or, failing that, its settings; absent when unknown."
          },
          "settings": {
            "type": "object",
            "properties": {
              "settingsPath": {
                "type": "string",
                "pattern": "^~\\/(?:(?!\\.{1,2}\\/)[^/\\\\\\x00-\\x1f\\x7f]+\\/)*settings\\.json$",
                "description": "The active settings.json, only when it can be named relative to home."
              },
              "cacheTtl": {
                "enum": ["5m", "1h"],
                "type": "string",
                "description": "How long the main conversation's prompt cache lives, as the settings set it."
              },
              "cacheTtlFrom": {
                "type": "string",
                "pattern": "^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z0-9_]+)*$",
                "description": "Which knob set cacheTtl, such as `settings.promptCacheTtl`, `env.FORCE_PROMPT_CACHING_5M` or `default`."
              },
              "subagentCacheTtl": {
                "enum": ["5m", "1h"],
                "type": "string",
                "description": "How long a subagent's prompt cache lives, as the settings set it."
              },
              "caching": {
                "enum": ["on", "off"],
                "type": "string",
                "description": "Whether prompt caching is on or turned off."
              },
              "cachingFrom": {
                "type": "string",
                "pattern": "^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z0-9_]+)*$",
                "description": "Which variable turned caching off, such as `settings.env.DISABLE_PROMPT_CACHING`; absent when it is on."
              },
              "retentionDays": {
                "type": "integer",
                "minimum": 0,
                "description": "Days the harness keeps a transcript before it deletes it."
              },
              "docMaxBytes": {
                "type": "integer",
                "minimum": 0,
                "description": "The most bytes of an instruction file the harness reads."
              },
              "autoCompact": {
                "type": "boolean",
                "description": "Whether the harness compacts a conversation on its own when its context fills."
              },
              "autoCompactWindow": {
                "type": "integer",
                "minimum": 0,
                "description": "The context size in tokens at which the harness compacts on its own."
              }
            },
            "required": [],
            "description": "What the harness's settings and environment set, as derived values, never their text; absent when the harness reads none."
          },
          "unread": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9._-]*$"
            },
            "description": "The session stores of this harness that could not be read, by name, such as `opencode.db`; absent when every store was read."
          },
          "backfill": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "store": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9._-]*$",
                  "description": "The store, by name, such as `statev2.sqlite`."
                },
                "firstDay": {
                  "type": "string",
                  "format": "date",
                  "description": "The first day it added usage on."
                },
                "lastDay": {
                  "type": "string",
                  "format": "date",
                  "description": "The last day it added usage on."
                },
                "sessions": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Conversations it added, subagents' included."
                }
              },
              "required": ["store", "firstDay", "lastDay", "sessions"],
              "description": "What one session store added to a harness's usage, for sessions whose own files are gone."
            },
            "description": "The session stores that filled in this harness's sessions whose own files are gone, each with the days and sessions it added; absent when none did."
          }
        },
        "required": ["machine", "harness", "installed", "sessions", "versions", "signals"],
        "description": "What one harness on one machine could tell."
      },
      "description": "What each harness on each machine could tell; empty in pack mode."
    },
    "sheet": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "harness": {
            "type": "string",
            "minLength": 1,
            "description": "The harness id."
          },
          "sessions": {
            "type": "integer",
            "minimum": 0,
            "description": "Its sessions in the window, over all machines."
          },
          "fixedTokens": {
            "type": "object",
            "properties": {
              "value": {
                "type": "integer",
                "minimum": 0,
                "description": "The number of tokens."
              },
              "basis": {
                "enum": ["measured", "estimated"],
                "type": "string",
                "description": "measured: from usage a harness reported; estimated: from a character count."
              }
            },
            "required": ["value", "basis"],
            "description": "Tokens a session starts with now: averaged over whole days, newest first, until they hold at least 20 measurements or all 7 recent days are included. When those days have no measurements, uses the whole window; absent when no session reported them."
          },
          "contextWindow": {
            "type": "integer",
            "minimum": 1,
            "description": "The model's context window in tokens: the largest any machine's coverage for this harness reports; absent when none does."
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "item": {
                  "type": "string",
                  "pattern": "^(skill|instructions|mcp|subagent|memory):(?!\\s*(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/])).+$",
                  "description": "Its id."
                },
                "ref": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "enum": ["skill", "instructions", "mcp", "subagent", "memory"],
                      "type": "string",
                      "description": "What the piece of context is."
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "pattern": "^(?!(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/]))",
                      "description": "Its name, unique within its kind."
                    }
                  },
                  "required": ["kind", "name"],
                  "description": "Its kind and name."
                },
                "scope": {
                  "enum": ["user", "project", "plugin"],
                  "type": "string",
                  "description": "Where it is installed; absent when it is no longer installed on any machine read."
                },
                "pack": {
                  "type": "string",
                  "minLength": 1,
                  "pattern": "^(?!(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/]))",
                  "description": "Where it came from."
                },
                "managedBy": {
                  "enum": ["fleetrc", "skills", "plugin", "hand"],
                  "type": "string",
                  "description": "What installed it; absent when it is no longer installed on any machine read."
                },
                "machines": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Machines where it is installed or was seen; empty in pack mode."
                },
                "listings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "machine": {
                        "type": "string",
                        "minLength": 1,
                        "pattern": "^(?!(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/]))",
                        "description": "The machine with this install."
                      },
                      "scope": {
                        "enum": ["user", "project", "plugin"],
                        "type": "string",
                        "description": "Where it is installed: the user's home, a project, or a plugin."
                      },
                      "path": {
                        "type": "string",
                        "minLength": 1,
                        "pattern": "^(?!(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:(?:[\\\\/](?:\\.{1,2}(?=[\\\\/]))?)+(?:[uU][sS][eE][rR][sS]|[dD][oO][cC][uU][mM][eE][nN][tT][sS] [aA][nN][dD] [sS][eE][tT][tT][iI][nN][gG][sS])(?:[\\\\/](?:\\.{1,2}(?=[\\\\/]))?)+))",
                        "description": "The file or folder of this install."
                      },
                      "listed": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Characters in the listing."
                      },
                      "pack": {
                        "type": "string",
                        "minLength": 1,
                        "pattern": "^(?!(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/]))",
                        "description": "Where it came from."
                      }
                    },
                    "required": ["machine", "scope", "path", "listed"]
                  },
                  "description": "Machine-local listing measurements used for fleet projections."
                },
                "path": {
                  "type": "string",
                  "minLength": 1,
                  "pattern": "^(?!(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:(?:[\\\\/](?:\\.{1,2}(?=[\\\\/]))?)+(?:[uU][sS][eE][rR][sS]|[dD][oO][cC][uU][mM][eE][nN][tT][sS] [aA][nN][dD] [sS][eE][tT][tT][iI][nN][gG][sS])(?:[\\\\/](?:\\.{1,2}(?=[\\\\/]))?)+))",
                  "description": "Its file or folder, relative to the home directory or the project; absent when it is no longer installed on any machine read."
                },
                "chars": {
                  "type": "object",
                  "properties": {
                    "listed": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Characters it puts in the context of every session that lists or loads it: a skill's or subagent's name and description, an instruction file's whole text, an MCP server's instructions."
                    },
                    "body": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Characters loaded only when it is invoked: the rest of a skill's or subagent's file; 0 for instruction files and MCP servers."
                    }
                  },
                  "required": ["listed", "body"],
                  "description": "Its size in characters; body is 0 when it is no longer installed, because nothing is left to measure."
                },
                "tokens": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "The number of tokens."
                    },
                    "basis": {
                      "enum": ["measured", "estimated"],
                      "type": "string",
                      "description": "measured: from usage a harness reported; estimated: from a character count."
                    }
                  },
                  "required": ["value", "basis"],
                  "description": "What it adds to every session's context."
                },
                "exposure": {
                  "type": "object",
                  "properties": {
                    "sessions": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Sessions that listed or loaded it."
                    },
                    "share": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1,
                      "description": "Those sessions as a share, 0 to 1, of the harness's sessions."
                    },
                    "bare": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Of those sessions, how many listed it without its description."
                    }
                  },
                  "required": ["sessions", "share", "bare"],
                  "description": "How many sessions it was in."
                },
                "use": {
                  "type": "object",
                  "properties": {
                    "byModel": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Times the model invoked it."
                    },
                    "byUser": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Times the user invoked it."
                    },
                    "lastUsed": {
                      "type": "string",
                      "format": "date",
                      "description": "The start day of the last session that invoked it."
                    }
                  },
                  "required": ["byModel", "byUser"],
                  "description": "How often it was invoked."
                },
                "description": {
                  "type": "string",
                  "description": "A skill's or subagent's description, the text the harness lists for it; absent for other kinds. A Report shared through loadsheet.dev carries none."
                }
              },
              "required": ["item", "ref", "machines", "chars", "tokens", "exposure", "use"],
              "description": "One piece of context on a harness's sheet, aggregated over machines."
            },
            "description": "One line per piece of context."
          }
        },
        "required": ["harness", "sessions", "lines"],
        "description": "What one harness loads, line by line."
      },
      "description": "One sheet per harness, aggregated over machines."
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]*:(?!(?:(?:skill|instructions|mcp|subagent|memory):)?(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/]))[\\s\\S]+",
            "description": "A stable id, `${rule}:${item ?? pack ?? harness}`, then `:${via}` for a finding about one entrypoint."
          },
          "rule": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]*$",
            "description": "The rule that found it: a RuleId, or the id of a rule a newer loadsheet added."
          },
          "level": {
            "enum": ["cut", "fix", "info"],
            "type": "string",
            "description": "How strongly it asks for action."
          },
          "item": {
            "type": "string",
            "pattern": "^(skill|instructions|mcp|subagent|memory):(?!\\s*(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/])).+$",
            "description": "The item it is about; absent for pack-level and harness-level findings such as dead-pack and short-history."
          },
          "pack": {
            "type": "string",
            "minLength": 1,
            "pattern": "^(?!(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/]))",
            "description": "The pack it is about, for dead-pack."
          },
          "via": {
            "type": "string",
            "minLength": 1,
            "description": "The entrypoint it is about, for cache-ttl."
          },
          "where": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "machine": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The machine's name."
                },
                "harness": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The harness id."
                }
              },
              "required": ["machine", "harness"],
              "description": "A machine and harness."
            },
            "description": "Where it applies; empty in pack mode."
          },
          "evidence": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "number"
            },
            "description": "The numbers the rule judged on."
          },
          "savesTokens": {
            "type": "object",
            "properties": {
              "value": {
                "type": "integer",
                "minimum": 0,
                "description": "The number of tokens."
              },
              "basis": {
                "enum": ["measured", "estimated"],
                "type": "string",
                "description": "measured: from usage a harness reported; estimated: from a character count."
              }
            },
            "required": ["value", "basis"],
            "description": "Tokens it would save per session."
          },
          "fixes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "machine": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The machine to change; absent in pack mode, where the change goes to the pack's source."
                },
                "harnesses": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  },
                  "description": "Harnesses this edit applies to, when recorded per edit rather than only on the finding."
                },
                "action": {
                  "enum": ["remove", "hide-from-model", "shorten", "dedupe", "set"],
                  "type": "string",
                  "description": "What to do."
                },
                "path": {
                  "type": "string",
                  "minLength": 1,
                  "pattern": "^(?!(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:(?:[\\\\/](?:\\.{1,2}(?=[\\\\/]))?)+(?:[uU][sS][eE][rR][sS]|[dD][oO][cC][uU][mM][eE][nN][tT][sS] [aA][nN][dD] [sS][eE][tT][tT][iI][nN][gG][sS])(?:[\\\\/](?:\\.{1,2}(?=[\\\\/]))?)+))",
                  "description": "The file or folder to change, relative to the home directory or the project."
                },
                "run": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The exact command, when one exists."
                },
                "managedBy": {
                  "enum": ["fleetrc", "skills", "plugin", "hand"],
                  "type": "string",
                  "description": "For shorten: the installer of a file not made by hand, whose next update replaces it, so the change goes to its source."
                },
                "pack": {
                  "type": "string",
                  "minLength": 1,
                  "pattern": "^(?!(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/]))",
                  "description": "For shorten, with managedBy: the source the installer copies the file from, a plugin name, `owner/repo`, or a fleetrc source."
                },
                "set": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "minLength": 1,
                      "description": "The key to set."
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        }
                      ],
                      "description": "The value to set it to."
                    }
                  },
                  "required": ["key", "value"],
                  "description": "The key and value to set, for set and hide-from-model."
                }
              },
              "required": ["action", "path"],
              "description": "One change the user's agent should make.",
              "anyOf": [
                {
                  "not": {
                    "properties": {
                      "action": {
                        "enum": ["set", "hide-from-model"]
                      }
                    }
                  }
                },
                {
                  "required": ["set"]
                },
                {
                  "required": ["run"]
                }
              ]
            },
            "description": "Changes that resolve it."
          }
        },
        "required": ["id", "rule", "level", "where", "evidence", "fixes"],
        "description": "Something a rule found."
      },
      "description": "What the rules found."
    },
    "skipped": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "rule": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]*$",
            "description": "The rule: a RuleId, or the id of a rule a newer loadsheet added."
          },
          "harness": {
            "type": "string",
            "minLength": 1,
            "description": "The harness id."
          },
          "reason": {
            "enum": ["missing-signal", "not-enough-data"],
            "type": "string",
            "description": "missing-signal: the harness does not provide a signal the rule needs; not-enough-data: too few sessions."
          },
          "missing": {
            "type": "array",
            "items": {
              "enum": [
                "listing",
                "modelUse",
                "userUse",
                "instructions",
                "mcp",
                "tokens",
                "usage",
                "cacheTtl",
                "turns",
                "hours",
                "tools",
                "limits"
              ],
              "type": "string",
              "description": "A kind of evidence a harness's transcripts can provide."
            },
            "description": "The signals it needs and the harness does not provide."
          }
        },
        "required": ["rule", "harness", "reason"],
        "description": "A rule that did not run on a harness, and why."
      },
      "description": "Rules that did not run, per harness."
    },
    "usage": {
      "type": "object",
      "properties": {
        "sessions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "day": {
                "type": "string",
                "format": "date",
                "description": "The day the sessions started."
              },
              "harness": {
                "type": "string",
                "minLength": 1,
                "description": "The harness id."
              },
              "via": {
                "type": "string",
                "minLength": 1,
                "description": "The entrypoint or originator that started the sessions."
              },
              "project": {
                "type": "string",
                "pattern": "^(?!(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/]))(?:[A-Za-z0-9][A-Za-z0-9-]*\\/[A-Za-z0-9._-]+|~(?:\\/[^\\0\\n\\r]*)?|\\/[^\\0\\n\\r]*|unknown)$",
                "description": "The project the sessions ran in: `owner/repo`, a folder under the home directory (`~/...`), an absolute path outside it, or `unknown`."
              },
              "thread": {
                "enum": ["main", "subagent"],
                "type": "string",
                "description": "Whether these are main conversations or subagents' conversations."
              },
              "sessions": {
                "type": "integer",
                "minimum": 0,
                "description": "Sessions started; a subagent's conversation counts as one."
              },
              "compacted": {
                "type": "integer",
                "minimum": 0,
                "description": "Of those sessions, how many compacted their context at least once."
              },
              "compactions": {
                "type": "integer",
                "minimum": 0,
                "description": "Compactions in those sessions, automatic and manual."
              },
              "manualCompactions": {
                "type": "integer",
                "minimum": 0,
                "description": "Of those compactions, how many the user asked for."
              },
              "spoke": {
                "type": "integer",
                "minimum": 0,
                "description": "Of those sessions, how many had at least one prompt the user wrote themselves, not one an agent wrote in their place, such as a brief to a delegated agent. Absent means 0."
              },
              "yelled": {
                "type": "integer",
                "minimum": 0,
                "description": "Of those sessions, how many had at least one prompt where the user yelled, as `yelled` on turn cells counts it. Absent means 0."
              }
            },
            "required": [
              "day",
              "harness",
              "via",
              "project",
              "thread",
              "sessions",
              "compacted",
              "compactions",
              "manualCompactions"
            ],
            "description": "Additive session counters for one project, harness, day, entrypoint and thread."
          },
          "description": "Session counters."
        },
        "tokens": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "day": {
                "type": "string",
                "format": "date",
                "description": "The day the requests were made."
              },
              "harness": {
                "type": "string",
                "minLength": 1,
                "description": "The harness id."
              },
              "via": {
                "type": "string",
                "minLength": 1,
                "description": "The entrypoint or originator that started the sessions."
              },
              "project": {
                "type": "string",
                "pattern": "^(?!(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/]))(?:[A-Za-z0-9][A-Za-z0-9-]*\\/[A-Za-z0-9._-]+|~(?:\\/[^\\0\\n\\r]*)?|\\/[^\\0\\n\\r]*|unknown)$",
                "description": "The project the sessions ran in: `owner/repo`, a folder under the home directory (`~/...`), an absolute path outside it, or `unknown`."
              },
              "thread": {
                "enum": ["main", "subagent"],
                "type": "string",
                "description": "Whether the requests came from main conversations or subagents' conversations."
              },
              "model": {
                "type": "string",
                "minLength": 1,
                "pattern": "^(?!(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/]))",
                "description": "The model the requests went to, as the harness names it."
              },
              "requests": {
                "type": "integer",
                "minimum": 0,
                "description": "Model requests counted."
              },
              "input": {
                "type": "integer",
                "minimum": 0,
                "description": "Input tokens sent without the prompt cache: neither read from it nor written to it."
              },
              "output": {
                "type": "integer",
                "minimum": 0,
                "description": "Output tokens, reasoning included."
              },
              "reasoning": {
                "type": "integer",
                "minimum": 0,
                "description": "Of the output tokens, how many were reasoning."
              },
              "cacheRead": {
                "type": "integer",
                "minimum": 0,
                "description": "Input tokens read from the prompt cache."
              },
              "cacheWrite": {
                "type": "integer",
                "minimum": 0,
                "description": "Input tokens written to the prompt cache."
              },
              "cacheWrite5m": {
                "type": "integer",
                "minimum": 0,
                "description": "Of the cache writes, the tokens written to a cache that lives 5 minutes."
              },
              "cacheWrite1h": {
                "type": "integer",
                "minimum": 0,
                "description": "Of the cache writes, the tokens written to a cache that lives 1 hour; with cacheWrite5m at most cacheWrite, and the rest of unknown lifetime."
              },
              "cacheRewrite": {
                "type": "integer",
                "minimum": 0,
                "description": "Five-minute cache writes 5 to 60 minutes after a request to the same model in the conversation: possible reuse with a longer cache, not guaranteed hits."
              },
              "unsplit": {
                "type": "integer",
                "minimum": 0,
                "description": "Tokens whose split into input, output and cache is unknown, counted in no other counter. Absent means 0."
              },
              "activeSeconds": {
                "type": "integer",
                "minimum": 0,
                "description": "Seconds of work before these requests: each request adds the time since its conversation's previous request when that is at most 300 seconds. Absent means 0."
              }
            },
            "required": [
              "day",
              "harness",
              "via",
              "project",
              "thread",
              "model",
              "requests",
              "input",
              "output",
              "reasoning",
              "cacheRead",
              "cacheWrite",
              "cacheWrite5m",
              "cacheWrite1h",
              "cacheRewrite"
            ],
            "description": "Additive token counters for one project, harness, day, entrypoint, thread and model."
          },
          "description": "Token counters."
        },
        "turns": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "day": {
                "type": "string",
                "format": "date",
                "description": "The day the turns started."
              },
              "harness": {
                "type": "string",
                "minLength": 1,
                "description": "The harness id."
              },
              "via": {
                "type": "string",
                "minLength": 1,
                "description": "The entrypoint or originator that started the sessions."
              },
              "project": {
                "type": "string",
                "pattern": "^(?!(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/]))(?:[A-Za-z0-9][A-Za-z0-9-]*\\/[A-Za-z0-9._-]+|~(?:\\/[^\\0\\n\\r]*)?|\\/[^\\0\\n\\r]*|unknown)$",
                "description": "The project the sessions ran in: `owner/repo`, a folder under the home directory (`~/...`), an absolute path outside it, or `unknown`."
              },
              "thread": {
                "enum": ["main", "subagent"],
                "type": "string",
                "description": "Whether the turns were in main conversations or subagents' conversations."
              },
              "turns": {
                "type": "integer",
                "minimum": 0,
                "description": "Turns started."
              },
              "interrupted": {
                "type": "integer",
                "minimum": 0,
                "description": "Of those turns, how many the user interrupted."
              },
              "timed": {
                "type": "integer",
                "minimum": 0,
                "description": "Of those turns, how many have a measured duration."
              },
              "durationMs": {
                "type": "integer",
                "minimum": 0,
                "description": "The summed duration of the timed turns, in milliseconds."
              },
              "toolCalls": {
                "type": "integer",
                "minimum": 0,
                "description": "Tool calls the model made in those turns."
              },
              "withSubagents": {
                "type": "integer",
                "minimum": 0,
                "description": "Of those turns, how many started at least one subagent."
              },
              "longer": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0
                },
                "minItems": 10,
                "maxItems": 10,
                "description": "Timed turns by length: entry i counts the turns that ran at least `TURN_LENGTH_SECONDS[i]` seconds (0, 30 s, 1, 2, 5, 10, 20, 30 and 60 minutes, 2 hours), so the first is every timed turn whose length was followed and the entries never rise. Absent when no turn's length was followed."
              },
              "spoke": {
                "type": "integer",
                "minimum": 0,
                "description": "Of those turns, how many began with a prompt the user wrote themselves, not one an agent wrote in their place. Only these prompts have a tone. Absent means 0."
              },
              "yelled": {
                "type": "integer",
                "minimum": 0,
                "description": "Of those turns, how many began with a prompt where the user yelled: in capitals, with a swear word or insult, or with a word that says they are fed up, such as \"wtf\" or \"bro\". Absent means 0."
              },
              "shouted": {
                "type": "integer",
                "minimum": 0,
                "description": "Of the yelled prompts, how many were written mostly in capitals. Absent means 0."
              },
              "swore": {
                "type": "integer",
                "minimum": 0,
                "description": "Of the yelled prompts, how many had a swear word or an insult. Absent means 0."
              },
              "thanked": {
                "type": "integer",
                "minimum": 0,
                "description": "Of those turns, how many began with a prompt that said please or thanks. Absent means 0."
              }
            },
            "required": [
              "day",
              "harness",
              "via",
              "project",
              "thread",
              "turns",
              "interrupted",
              "timed",
              "durationMs",
              "toolCalls",
              "withSubagents"
            ],
            "description": "Additive turn counters for one project, harness, day, entrypoint and thread. A turn is one prompt and the work the agent did for it."
          },
          "description": "Turn counters; absent when no harness read reports turns."
        },
        "hours": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "day": {
                "type": "string",
                "format": "date",
                "description": "The UTC day."
              },
              "hour": {
                "type": "integer",
                "minimum": 0,
                "maximum": 23,
                "description": "The UTC hour of the day, 0 to 23."
              },
              "harness": {
                "type": "string",
                "minLength": 1,
                "description": "The harness id."
              },
              "thread": {
                "enum": ["main", "subagent"],
                "type": "string",
                "description": "Whether the activity was in main conversations or subagents' conversations."
              },
              "requests": {
                "type": "integer",
                "minimum": 0,
                "description": "Model requests made in that hour."
              },
              "turns": {
                "type": "integer",
                "minimum": 0,
                "description": "Turns started in that hour."
              },
              "activeSeconds": {
                "type": "integer",
                "minimum": 0,
                "description": "Seconds of work in that hour, as token cells count `activeSeconds`; divided by 3,600, how many conversations ran at once on average. Absent means 0."
              }
            },
            "required": ["day", "hour", "harness", "thread", "requests", "turns"],
            "description": "Additive activity counters for one harness, day, hour and thread."
          },
          "description": "Activity by hour of the day; absent when no harness read reports it."
        },
        "tools": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "day": {
                "type": "string",
                "format": "date",
                "description": "The day of the calls."
              },
              "harness": {
                "type": "string",
                "minLength": 1,
                "description": "The harness id."
              },
              "thread": {
                "enum": ["main", "subagent"],
                "type": "string",
                "description": "Whether the calls were made in main conversations or subagents' conversations."
              },
              "tool": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
                "description": "The tool: a built-in tool's name, `mcp:<server>` for any tool of an MCP server, or `other` for a name loadsheet does not keep."
              },
              "calls": {
                "type": "integer",
                "minimum": 0,
                "description": "Calls made."
              },
              "unattributedMcp": {
                "type": "integer",
                "minimum": 0,
                "description": "Calls to MCP tools whose server could not be verified."
              }
            },
            "required": ["day", "harness", "thread", "tool", "calls"],
            "description": "Additive tool-call counters for one harness, day, thread and tool."
          },
          "description": "Tool calls by tool; absent when no harness read reports them."
        },
        "skills": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "day": {
                "type": "string",
                "format": "date",
                "description": "The day of the invocations."
              },
              "harness": {
                "type": "string",
                "minLength": 1,
                "description": "The harness id."
              },
              "via": {
                "type": "string",
                "minLength": 1,
                "description": "The entrypoint or originator that started the sessions."
              },
              "project": {
                "type": "string",
                "pattern": "^(?!(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/]))(?:[A-Za-z0-9][A-Za-z0-9-]*\\/[A-Za-z0-9._-]+|~(?:\\/[^\\0\\n\\r]*)?|\\/[^\\0\\n\\r]*|unknown)$",
                "description": "The project the sessions ran in: `owner/repo`, a folder under the home directory (`~/...`), an absolute path outside it, or `unknown`."
              },
              "thread": {
                "enum": ["main", "subagent"],
                "type": "string",
                "description": "Whether the invocations were in main conversations or subagents' conversations."
              },
              "item": {
                "type": "string",
                "pattern": "^skill:(?!\\s*(?:(?:\\/(?:\\.{1,2}(?=\\/))?)+(?:home|Users|var(?:\\/(?:\\.{1,2}(?=\\/))?)+home)(?:\\/(?:\\.{1,2}(?=\\/))?)+|(?:\\/(?:\\.{1,2}(?=\\/))?)+root(?:\\/|$)|[A-Za-z]:[\\\\/])).+$",
                "description": "The skill invoked, `skill:<name>`."
              },
              "calls": {
                "type": "integer",
                "minimum": 0,
                "description": "Invocations, by the model or the user."
              }
            },
            "required": ["day", "harness", "via", "project", "thread", "item", "calls"],
            "description": "Additive skill-invocation counters for one harness, day, via, project, thread and skill."
          },
          "description": "Skill invocations by project; absent when no harness read reports them."
        },
        "limits": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "day": {
                "type": "string",
                "format": "date",
                "description": "The day of the readings."
              },
              "harness": {
                "type": "string",
                "minLength": 1,
                "description": "The harness id."
              },
              "windowMinutes": {
                "type": "integer",
                "minimum": 0,
                "description": "The window's length in minutes, such as 300 or 10080; 0 when the harness does not say."
              },
              "usedPercent": {
                "type": "number",
                "minimum": 0,
                "description": "The share of the window used at the latest reading, in percent; absent when there was none."
              },
              "at": {
                "type": "number",
                "minimum": 0,
                "description": "When the latest reading was taken, in seconds since the epoch with millisecond precision; absent with usedPercent."
              },
              "resetsAt": {
                "type": "integer",
                "minimum": 0,
                "description": "When the window resets, as of the latest reading, in seconds since the epoch; absent when unknown."
              },
              "peakUsedPercent": {
                "type": "number",
                "minimum": 0,
                "description": "The highest share used at any reading that day, in percent; absent with usedPercent."
              },
              "reached": {
                "type": "integer",
                "minimum": 0,
                "description": "How many times the limit was reached."
              }
            },
            "required": ["day", "harness", "windowMinutes", "reached"],
            "description": "One harness's rate-limit window on one day: the latest reading of how much of it is used, and how often the limit was hit. A gauge, not a sum: merging two keeps the later reading and the higher peak, and sums `reached`."
          },
          "description": "Rate-limit readings; absent when no harness read reports them."
        },
        "threads": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "day": {
                "type": "string",
                "format": "date",
                "description": "The day of the requests."
              },
              "harness": {
                "type": "string",
                "minLength": 1,
                "description": "The harness id."
              },
              "via": {
                "type": "string",
                "minLength": 1,
                "description": "The entrypoint, as a session cell's."
              },
              "project": {
                "type": "string",
                "minLength": 1,
                "description": "The project, as a session cell's."
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "description": "A hash of the harness's id for the thread, never the id itself: the same for its subagents."
              },
              "requests": {
                "type": "integer",
                "minimum": 0,
                "description": "Model requests made."
              },
              "tokens": {
                "type": "integer",
                "minimum": 0,
                "description": "Input, output, cache read and cache write tokens, and those whose split is unknown."
              }
            },
            "required": ["day", "harness", "via", "project", "id", "requests", "tokens"],
            "description": "One thread's tokens on one day: a conversation with its subagents, as the harness keeps it apart."
          },
          "description": "Tokens by thread; absent when no harness read keeps its threads apart."
        },
        "titles": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "harness": {
                "type": "string",
                "minLength": 1,
                "description": "The harness id."
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "description": "The thread, as a thread cell's `id`."
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "description": "The title, on one line."
              }
            },
            "required": ["harness", "id", "title"],
            "description": "A thread's title, as its harness or T3 Code names it. It stays on the machines that read it."
          },
          "description": "The titles of the threads in `threads` that have one; absent when none has."
        },
        "pulls": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "day": {
                "type": "string",
                "format": "date",
                "description": "The day the pull requests were opened: GitHub's creation day when it was asked, else the day an agent first linked each one."
              },
              "harness": {
                "type": "string",
                "minLength": 1,
                "description": "The harness of the agent that first linked them."
              },
              "via": {
                "type": "string",
                "minLength": 1,
                "description": "The app the agent ran in, such as `t3-code`."
              },
              "project": {
                "type": "string",
                "pattern": "^[A-Za-z0-9][A-Za-z0-9-]*\\/[A-Za-z0-9._-]+$",
                "description": "The repository, `owner/repo`."
              },
              "model": {
                "type": "string",
                "minLength": 1,
                "description": "The model of the agent that first linked them, as the harness names it."
              },
              "pulls": {
                "type": "integer",
                "minimum": 0,
                "description": "Pull requests counted."
              },
              "merged": {
                "type": "integer",
                "minimum": 0,
                "description": "Of those, how many were merged."
              },
              "closed": {
                "type": "integer",
                "minimum": 0,
                "description": "Of those, how many were closed without merging."
              },
              "open": {
                "type": "integer",
                "minimum": 0,
                "description": "Of those, how many are still open."
              },
              "stale": {
                "type": "integer",
                "minimum": 0,
                "description": "Of the open ones, how many were last seen open more than 7 days before the scan, with no answer from GitHub since: their state is likely out of date."
              },
              "mergeSeconds": {
                "type": "integer",
                "minimum": 0,
                "description": "The summed time from opening to merging of the merged ones, in seconds."
              },
              "mergedIn1h": {
                "type": "integer",
                "minimum": 0,
                "description": "Of the merged ones, how many merged within an hour of opening."
              },
              "mergedIn1d": {
                "type": "integer",
                "minimum": 0,
                "description": "Of the merged ones, how many merged within a day of opening; includes mergedIn1h."
              },
              "checked": {
                "type": "integer",
                "minimum": 0,
                "description": "Of the pull requests, how many GitHub answered for: the commit counters cover these only."
              },
              "checkedMerged": {
                "type": "integer",
                "minimum": 0,
                "description": "Of the merged ones, how many GitHub answered for: the share of them that is oneShot."
              },
              "commits": {
                "type": "integer",
                "minimum": 0,
                "description": "Commits in the checked pull requests."
              },
              "commitsAfterOpen": {
                "type": "integer",
                "minimum": 0,
                "description": "Of those commits, how many were written after the pull request was opened, by their author date."
              },
              "oneShot": {
                "type": "integer",
                "minimum": 0,
                "description": "Of the checked pull requests that were merged, how many got no commit written after they were opened."
              }
            },
            "required": [
              "day",
              "harness",
              "via",
              "project",
              "model",
              "pulls",
              "merged",
              "closed",
              "open",
              "stale",
              "mergeSeconds",
              "mergedIn1h",
              "mergedIn1d",
              "checked",
              "checkedMerged",
              "commits",
              "commitsAfterOpen",
              "oneShot"
            ],
            "description": "Additive counters for the pull requests agents opened in one repository, harness, entrypoint, model and day, each counted once, under the agent that first linked it. States are as last known: GitHub's when it was asked, else the app's last copy."
          },
          "description": "Pull requests agents opened; absent when no app read reports them."
        },
        "activity": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "harness": {
                "type": "string",
                "minLength": 1,
                "description": "The harness id."
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "description": "The thread, as a thread cell's `id`."
              },
              "via": {
                "type": "string",
                "minLength": 1,
                "description": "The entrypoint, as a session cell's."
              },
              "agent": {
                "type": "string",
                "minLength": 1,
                "description": "A hash of the subagent's own id when a subagent made the requests; absent for the thread's main conversation."
              },
              "project": {
                "type": "string",
                "minLength": 1,
                "description": "The project, as a session cell's."
              },
              "model": {
                "type": "string",
                "minLength": 1,
                "description": "The model, as the harness names it."
              },
              "runs": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 8640000000000
                },
                "description": "Runs of requests at most 300 seconds apart, oldest first, flattened: the first request's time, the last request's time, both in seconds since the epoch, and the requests made."
              }
            },
            "required": ["harness", "id", "via", "project", "model", "runs"],
            "description": "One conversation's work in the last three days of a scan, as runs of model requests: what the Activity page draws."
          },
          "description": "Each conversation's runs of requests in the scan's last three days; absent when no harness read times its requests. A Scan keeps only those days, and a Report the runs of its Scans."
        },
        "agents": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "harness": {
                "type": "string",
                "minLength": 1,
                "description": "The harness id."
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "description": "The thread, as a thread cell's `id`."
              },
              "agent": {
                "type": "string",
                "minLength": 1,
                "description": "The subagent, as an activity cell's `agent`."
              },
              "type": {
                "type": "string",
                "minLength": 1,
                "description": "Its type, such as `Explore`."
              }
            },
            "required": ["harness", "id", "agent", "type"],
            "description": "A subagent whose type is known."
          },
          "description": "Known types of subagents in `activity` and of their openers."
        },
        "agentTree": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "harness": {
                "type": "string",
                "minLength": 1,
                "description": "The harness id."
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "description": "The thread, as a thread cell's `id`."
              },
              "agent": {
                "type": "string",
                "minLength": 1,
                "description": "The subagent, as an activity cell's `agent`."
              },
              "parent": {
                "type": "string",
                "minLength": 1,
                "description": "The subagent that opened it, as that one's `agent`; absent when the thread itself opened it, or when the transcript does not say."
              }
            },
            "required": ["harness", "id", "agent"],
            "description": "A node in a thread's known subagent ancestry."
          },
          "description": "Known subagent ancestry. Each parent names another node of the same harness and thread."
        },
        "subagents": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "day": {
                "type": "string",
                "format": "date",
                "description": "The UTC day."
              },
              "harness": {
                "type": "string",
                "minLength": 1,
                "description": "The harness id."
              },
              "via": {
                "type": "string",
                "minLength": 1,
                "description": "The entrypoint, as a session cell's."
              },
              "type": {
                "type": "string",
                "minLength": 1,
                "description": "The subagent's type, such as `Explore`, as the call that started it named it."
              },
              "model": {
                "type": "string",
                "minLength": 1,
                "description": "The model, as the harness names it."
              },
              "requests": {
                "type": "integer",
                "minimum": 0,
                "description": "Requests made."
              },
              "context": {
                "type": "integer",
                "minimum": 0,
                "description": "Input and cache tokens, summed over the requests: the prompts' size."
              }
            },
            "required": ["day", "harness", "via", "type", "model", "requests", "context"],
            "description": "Subagent requests of one type and model, on the day of each run's first request, with their prompts' size: what the oversized-subagent rule judges."
          },
          "description": "Subagent requests by type and model in the scan's window; absent when no subagent's type is known. A Scan's alone, for the rules: a Report leaves it out."
        },
        "wakes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "day": {
                "type": "string",
                "format": "date",
                "description": "The UTC day the notification was written."
              },
              "harness": {
                "type": "string",
                "minLength": 1,
                "description": "The harness id."
              },
              "via": {
                "type": "string",
                "minLength": 1,
                "description": "The entrypoint, as a session cell's."
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "description": "The thread, as a thread cell's `id`."
              },
              "kind": {
                "type": "string",
                "minLength": 1,
                "description": "What wrote it: pull, schedule, agent, relay, delegate, task or cancelled."
              },
              "wakes": {
                "type": "integer",
                "minimum": 0,
                "description": "Turns it started."
              }
            },
            "required": ["day", "harness", "via", "id", "kind", "wakes"],
            "description": "Turns a notification of one kind started in one thread on a day, rather than the user: what the pull-waiting rule judges."
          },
          "description": "Turns a notification started, by thread and kind, in the scan's window; absent when no harness read reports them. A Scan's alone, for the rules."
        },
        "pullSpend": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "day": {
                "type": "string",
                "format": "date",
                "description": "The UTC day the pull requests were opened."
              },
              "harness": {
                "type": "string",
                "minLength": 1,
                "description": "The harness of the thread that linked them."
              },
              "via": {
                "type": "string",
                "minLength": 1,
                "description": "The entrypoint, as a session cell's."
              },
              "pulls": {
                "type": "integer",
                "minimum": 0,
                "description": "Pull requests counted."
              },
              "joined": {
                "type": "integer",
                "minimum": 0,
                "description": "Of those, the ones whose thread was found with its runs and prompts."
              },
              "tokens": {
                "type": "integer",
                "minimum": 0,
                "description": "Tokens those threads spent after the link, before the user's next prompt."
              }
            },
            "required": ["day", "harness", "via", "pulls", "joined", "tokens"],
            "description": "The pull requests agents opened on a day and what their threads spent after linking them: the pull-waiting rule's evidence."
          },
          "description": "Pull requests by day with the spend after their link, in the scan's window; absent when no store reports them. A Scan's alone, for the rules."
        }
      },
      "required": ["sessions", "tokens"],
      "description": "Sessions and tokens per project, summed over machines and filtered by harness and entrypoint as the sheets are, on every day the Scans hold or the last `config.usageWindow` days; absent when no machine reports them, and from a Report shared through loadsheet.dev."
    }
  },
  "required": [
    "schema",
    "tool",
    "generatedAt",
    "mode",
    "machines",
    "window",
    "config",
    "coverage",
    "sheet",
    "findings",
    "skipped"
  ],
  "description": "What loadsheet found: one sheet per harness and the findings, with no text but thread titles.",
  "if": {
    "properties": {
      "mode": {
        "const": "pack"
      }
    },
    "required": ["mode"]
  },
  "then": {
    "properties": {
      "machines": {
        "type": "array",
        "maxItems": 0
      },
      "coverage": {
        "type": "array",
        "maxItems": 0
      },
      "sheet": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "lines": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "machines": {
                    "type": "array",
                    "maxItems": 0
                  }
                }
              }
            }
          }
        }
      },
      "findings": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "where": {
              "type": "array",
              "maxItems": 0
            },
            "fixes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "machine": false
                }
              }
            }
          }
        }
      }
    }
  },
  "else": {
    "properties": {
      "findings": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "fixes": {
              "type": "array",
              "items": {
                "type": "object",
                "required": ["machine"]
              }
            }
          }
        }
      }
    }
  }
}
