{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://coreyscherrer.com/static/daemon/daemon.schema.json",
  "title": "Corey's Daemon",
  "description": "Public profile and status for Corey Scherrer, served at https://coreyscherrer.com/daemon/daemon.json. Built from a hand-edited file every 15 minutes and passed through a content gate. Entries with an `expires` date in the past are removed when served.",
  "type": "object",
  "required": ["schema_version", "generated_at", "draft"],
  "properties": {
    "$schema": {"type": "string", "format": "uri"},
    "schema_version": {"const": 1},
    "generated_at": {"$ref": "#/$defs/date"},
    "draft": {"type": "boolean", "description": "True while any section still holds placeholder or unconfirmed text."},
    "identity": {
      "type": "object",
      "required": ["name"],
      "properties": {
        "name": {"type": "string"},
        "headline": {"type": "string"},
        "summary": {"type": "string"},
        "links": {"type": "array", "items": {"$ref": "#/$defs/link"}}
      }
    },
    "mission": {"type": "string"},
    "now": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["text", "expires"],
        "properties": {"text": {"type": "string"}, "expires": {"$ref": "#/$defs/date"}}
      }
    },
    "status": {
      "type": "object",
      "required": ["headline", "expires"],
      "properties": {
        "headline": {"type": "string"},
        "detail": {"type": "string"},
        "since": {"$ref": "#/$defs/date"},
        "expires": {"$ref": "#/$defs/date"}
      }
    },
    "offerings": {"type": "array", "items": {"type": "string"}},
    "requesting": {"type": "array", "items": {"type": "string"}},
    "projects": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name"],
        "properties": {
          "name": {"type": "string"},
          "summary": {"type": "string"},
          "url": {"$ref": "#/$defs/https"},
          "repo": {"type": "string", "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"}
        }
      }
    },
    "resume": {
      "type": "object",
      "properties": {
        "summary": {"type": "string"},
        "url": {"$ref": "#/$defs/https"},
        "roles": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["org"],
            "properties": {"org": {"type": "string"}, "title": {"type": "string"}, "years": {"type": "string"}}
          }
        }
      }
    }
  },
  "$defs": {
    "date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$"},
    "https": {"type": "string", "pattern": "^https://"},
    "link": {
      "type": "object",
      "required": ["label", "url"],
      "properties": {"label": {"type": "string"}, "url": {"$ref": "#/$defs/https"}}
    }
  }
}
