{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://gda.group/schemas/hygiene-1.schema.json",
  "title": "hygiene/1 — GDA Capital's property-hygiene report, one document per calendar date",
  "description": "The machine-readable output of the daily-office property-hygiene liturgy (scripts/property-hygiene.mjs). Checks this property against its own canonical sources and declared surfaces, and folds the existing npm run verify (charter/directory/frontdoor) exit code and output into one report rather than re-implementing those checks.",
  "type": "object",
  "required": ["contract", "date", "generated", "vendoredFiles", "wellKnownSurfaces", "verify", "regressions"],
  "additionalProperties": false,
  "properties": {
    "contract": { "const": "hygiene/1" },
    "date": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
    "generated": { "type": "string", "format": "date-time" },
    "vendoredFiles": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["file", "canonicalUrl", "checked", "matches"],
        "additionalProperties": false,
        "properties": {
          "file": { "type": "string", "minLength": 1 },
          "canonicalUrl": { "type": "string" },
          "checked": { "type": "boolean" },
          "matches": { "type": ["boolean", "null"] },
          "note": { "type": "string" }
        }
      }
    },
    "wellKnownSurfaces": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["path", "checked", "status"],
        "additionalProperties": false,
        "properties": {
          "path": { "type": "string", "minLength": 1 },
          "checked": { "type": "boolean" },
          "status": { "type": ["integer", "null"] },
          "note": { "type": "string" }
        }
      }
    },
    "verify": {
      "type": "object",
      "required": ["ran", "exitCode", "ok"],
      "additionalProperties": false,
      "properties": {
        "ran": { "type": "boolean" },
        "exitCode": { "type": ["integer", "null"] },
        "ok": { "type": "boolean" },
        "summary": { "type": "string" }
      }
    },
    "regressions": {
      "type": "array",
      "description": "Named things that were fine yesterday and are not today. Empty is the honest common case, not padding.",
      "items": { "type": "string", "minLength": 1 }
    }
  }
}
