{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://thesalestraveler.com/data/schema/release-manifest.schema.json",
  "title": "The Sales Traveler — release manifest",
  "description": "Schema for /data/releases/<version>/manifest.json and /data/releases/latest.json. Each manifest is a hash-chained, content-addressed fingerprint of the site's index/corpus snapshot at one point in time. See https://thesalestraveler.com/provenance/ and https://thesalestraveler.com/trust/ for what this proves (tamper-evidence, recomputable by anyone) and does not prove (it is not a digital signature, and it is not anchored to any public blockchain today).",
  "type": "object",
  "required": ["version", "releaseId", "rootHash", "generatedAt", "fileCount", "files", "verification"],
  "properties": {
    "version": { "type": "string", "pattern": "^v[0-9]+$", "description": "Sequential release number; increments only when the computed rootHash changes." },
    "releaseId": { "type": "string", "pattern": "^sha256:[0-9a-f]{16}$" },
    "rootHash": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
    "previousReleaseId": { "type": ["string", "null"] },
    "previousRootHash": { "type": ["string", "null"] },
    "generatedAt": { "type": "string", "format": "date-time" },
    "fileCount": { "type": "integer" },
    "files": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["path", "sha256", "bytes"],
        "properties": {
          "path": { "type": "string", "description": "Repo-relative path of the hashed file." },
          "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
          "bytes": { "type": "integer" }
        }
      }
    },
    "changed": {
      "type": "object",
      "properties": {
        "added": { "type": "array", "items": { "type": "string" } },
        "changed": { "type": "array", "items": { "type": "string" } },
        "removed": { "type": "array", "items": { "type": "string" } }
      }
    },
    "verification": { "type": "string", "description": "Plain-language recomputation steps for rootHash — see /provenance/ for a worked example." }
  }
}
