{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://claude-context.dev/schemas/staleness.schema.json",
  "title": "Claude Context Staleness Tracking",
  "description": "Schema for sync/staleness.json - documentation freshness tracking",
  "type": "object",
  "required": ["version"],
  "properties": {
    "$schema": {
      "type": "string",
      "description": "JSON Schema reference"
    },
    "version": {
      "type": "string",
      "pattern": "^\\d+\\.\\d+\\.\\d+$"
    },
    "description": {
      "type": "string"
    },
    "thresholds": {
      "type": "object",
      "properties": {
        "warningDays": {
          "type": "integer",
          "default": 30,
          "description": "Days before warning status"
        },
        "staleDays": {
          "type": "integer",
          "default": 90,
          "description": "Days before stale status"
        }
      }
    },
    "workflows": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "lastVerified": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": ["verified", "warning", "stale"]
          }
        }
      }
    }
  },
  "additionalProperties": false
}
