{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://jakgpt.com/spec/jak-format-v2.json",
  "title": "JAK File Format v2.0",
  "description": "Portable AI persona format - your AI identity in a file",
  "type": "object",
  "required": ["jak_version", "identity"],
  "properties": {
    "jak_version": {
      "type": "string",
      "const": "2.0",
      "description": "Format version"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp when the file was created"
    },
    "source": {
      "type": "string",
      "enum": ["chatgpt_extraction", "manual", "jak_app", "import"],
      "description": "How this profile was created"
    },
    "identity": {
      "type": "object",
      "required": ["display_name"],
      "properties": {
        "display_name": {
          "type": "string",
          "minLength": 1,
          "description": "Full name or display name (REQUIRED)"
        },
        "preferred_name": {
          "type": "string",
          "description": "How the user prefers to be addressed (first name, nickname, etc.)"
        },
        "roles": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Professional roles or occupations"
        },
        "languages": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Languages spoken"
        },
        "nationality": {
          "type": "string",
          "description": "Nationality or cultural context"
        },
        "one_liner": {
          "type": "string",
          "description": "Short self-description (tagline)"
        },
        "bio": {
          "type": "string",
          "description": "Longer biography"
        },
        "location": {
          "type": "object",
          "properties": {
            "city": { "type": "string" },
            "country": { "type": "string" }
          }
        }
      }
    },
    "personality": {
      "type": "object",
      "properties": {
        "core_traits": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Key personality traits"
        },
        "thinking_style": {
          "type": "string",
          "description": "How this person thinks and processes information"
        },
        "decision_making": {
          "type": "string",
          "description": "Approach to making decisions"
        },
        "motivations": {
          "type": "string",
          "description": "What drives this person"
        },
        "frustrations": {
          "type": "string",
          "description": "Common frustrations"
        },
        "core_values": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Fundamental values"
        }
      }
    },
    "working_style": {
      "type": "object",
      "properties": {
        "default_mode": { "type": "string" },
        "strengths": { "type": "array", "items": { "type": "string" } },
        "weaknesses": { "type": "array", "items": { "type": "string" } },
        "likes": { "type": "array", "items": { "type": "string" } },
        "dislikes": { "type": "array", "items": { "type": "string" } },
        "productivity_style": { "type": "string" }
      }
    },
    "communication": {
      "type": "object",
      "properties": {
        "style": { "type": "string", "description": "Communication style" },
        "tone": { "type": "string", "description": "Preferred tone" },
        "response_length": { "type": "string", "description": "Preferred response length" },
        "annoys": { "type": "string", "description": "What annoys in communication" },
        "appreciates": { "type": "string", "description": "What is appreciated in communication" }
      }
    },
    "expertise": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Skills and areas of expertise"
    },
    "focus": {
      "type": "object",
      "properties": {
        "primary": { "type": "string", "description": "Primary current focus" },
        "projects": { "type": "array", "items": { "type": "string" } },
        "ambitions": { "type": "array", "items": { "type": "string" } }
      }
    },
    "relationships": {
      "type": "object",
      "properties": {
        "status": { "type": "string" },
        "partners": { "type": "array", "items": { "type": "string" } },
        "romantic_priorities": { "type": "array", "items": { "type": "string" } },
        "relationship_style": { "type": "string" },
        "attachment": { "type": "string" },
        "love_languages": { "type": "string" },
        "expresses_love": { "type": "string" },
        "needs_from_partner": { "type": "string" },
        "friction_points": { "type": "string" },
        "conflict_style": { "type": "string" },
        "patterns": { "type": "string" },
        "collaborators": { "type": "array", "items": { "type": "string" } },
        "social_style": { "type": "string" }
      }
    },
    "emotional": {
      "type": "object",
      "properties": {
        "tendencies": { "type": "string" },
        "stressors": { "type": "array", "items": { "type": "string" } },
        "grounding": { "type": "array", "items": { "type": "string" } },
        "difficult_periods": { "type": "string" },
        "fulfillment": { "type": "string" }
      }
    },
    "health": {
      "type": "object",
      "properties": {
        "diet": { "type": "string" },
        "sleep": { "type": "string" },
        "exercise": { "type": "string" },
        "travel": { "type": "string" },
        "concerns": { "type": "string" },
        "lifestyle": { "type": "string" }
      }
    },
    "technology": {
      "type": "object",
      "properties": {
        "devices": { "type": "string" },
        "os": { "type": "string" },
        "languages": { "type": "string" },
        "tools": { "type": "string" },
        "infrastructure": { "type": "string" }
      }
    },
    "financial": {
      "type": "object",
      "properties": {
        "income": { "type": "string" },
        "entities": { "type": "string" },
        "revenue_models": { "type": "string" },
        "priorities": { "type": "string" }
      }
    },
    "memories": {
      "type": "object",
      "properties": {
        "facts": { "type": "array", "items": { "type": "string" } },
        "people": { "type": "array", "items": { "type": "string" } },
        "places": { "type": "array", "items": { "type": "string" } }
      }
    },
    "gaps": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Areas where more information is needed"
    },
    "verified_by_user": {
      "type": "boolean",
      "description": "Whether the user has reviewed and verified this profile"
    },
    "verified_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
