{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/CyberNova2333/cybernova-homepage/main/public/schemas/repo-meta.v1.json",
  "title": "CyberNova Repository Metadata Schema (v1)",
  "description": "Standardized root meta.json schema for CyberNova2333 repositories, consumed by cybernova-homepage at build time and runtime.",
  "type": "object",
  "required": [
    "schemaVersion",
    "slug",
    "name",
    "title",
    "visibility",
    "status",
    "category",
    "repository",
    "primaryLanguage",
    "techStack",
    "summary",
    "highlights"
  ],
  "properties": {
    "$schema": { "type": "string" },
    "schemaVersion": { "type": "integer", "const": 1 },
    "slug": { "type": "string", "pattern": "^[a-z0-9-]+$" },
    "localDir": { "type": "string" },
    "name": { "type": "string", "minLength": 1 },
    "title": {
      "type": "object",
      "required": ["zh", "en"],
      "properties": {
        "zh": { "type": "string", "minLength": 1 },
        "en": { "type": "string", "minLength": 1 }
      }
    },
    "visibility": {
      "type": "string",
      "enum": ["public", "upcoming"]
    },
    "status": {
      "type": "string",
      "enum": ["active", "stable", "experimental", "archived"]
    },
    "category": {
      "type": "string",
      "enum": ["ai-agent", "cloud-edge", "media-engine", "system-infra"]
    },
    "featured": { "type": "boolean" },
    "order": { "type": "integer", "minimum": 1 },
    "repository": {
      "type": "string",
      "pattern": "^https://github\\.com/CyberNova2333/[A-Za-z0-9_.-]+$"
    },
    "homepage": { "type": "string" },
    "docsUrl": { "type": "string" },
    "architectureUrl": { "type": "string" },
    "license": { "type": "string" },
    "primaryLanguage": { "type": "string" },
    "techStack": {
      "type": "array",
      "minItems": 1,
      "items": { "type": "string" }
    },
    "tags": {
      "type": "array",
      "items": { "type": "string" }
    },
    "summary": {
      "type": "object",
      "required": ["zh", "en"],
      "properties": {
        "zh": { "type": "string", "minLength": 10 },
        "en": { "type": "string", "minLength": 10 }
      }
    },
    "highlights": {
      "type": "object",
      "required": ["zh", "en"],
      "properties": {
        "zh": {
          "type": "array",
          "minItems": 1,
          "items": { "type": "string" }
        },
        "en": {
          "type": "array",
          "minItems": 1,
          "items": { "type": "string" }
        }
      }
    },
    "quickStart": {
      "type": "array",
      "items": { "type": "string" }
    },
    "roadmap": {
      "type": "object",
      "required": ["stage", "stageEn", "milestone"],
      "properties": {
        "stage": { "type": "string" },
        "stageEn": { "type": "string" },
        "milestone": {
          "type": "object",
          "required": ["zh", "en"],
          "properties": {
            "zh": { "type": "string" },
            "en": { "type": "string" }
          }
        }
      }
    },
    "additionalTermsConsent": {
      "type": "object",
      "description": "Explicit consent status per human contributor for AGPLv3 Additional Terms (Section 7).",
      "additionalProperties": { "type": "boolean" }
    },
    "updatedAt": { "type": "string" }
  }
}
