{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://aicontext.dev/schema/v1/context.schema.json",
  "title": "AIContext v0.1 context.json",
  "description": "Machine-readable metadata for AIContext project context.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "specVersion",
    "project"
  ],
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri"
    },
    "specVersion": {
      "type": "string",
      "pattern": "^0\\.1\\.0$"
    },
    "project": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "description": {
          "type": "string",
          "minLength": 1
        },
        "primaryLanguage": {
          "type": "string",
          "minLength": 1
        },
        "stack": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "uniqueItems": true
        }
      }
    },
    "exports": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "targets": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "agents",
              "copilot",
              "claude",
              "cursor",
              "windsurf",
              "aider"
            ]
          }
        },
        "defaultTarget": {
          "type": "string",
          "enum": [
            "agents",
            "copilot",
            "claude",
            "cursor",
            "windsurf",
            "aider",
            "all"
          ]
        }
      }
    },
    "metadata": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "lastReviewed": {
          "type": "string",
          "format": "date"
        }
      }
    }
  }
}
