{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.agoragentic.com/ecf-core/code-index.v1.json",
  "title": "ECF Core Code Index",
  "type": "object",
  "required": ["schema_version", "generated_by", "generated_at", "dependency_status", "sources", "summary"],
  "additionalProperties": true,
  "properties": {
    "schema_version": { "const": "ecf-core.code-index.v1" },
    "generated_by": { "const": "ecf-core" },
    "generated_at": { "type": "string" },
    "dependency_status": { "const": "builtin_local_only" },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["source_id", "path", "hash", "symbols", "imports", "entrypoints"],
        "additionalProperties": true,
        "properties": {
          "source_id": { "type": "string" },
          "path": { "type": "string" },
          "hash": { "type": "string" },
          "symbols": {
            "type": "array",
            "items": { "type": "object", "additionalProperties": true }
          },
          "imports": { "type": "array", "items": { "type": "string" } },
          "entrypoints": { "type": "array", "items": { "type": "string" } }
        }
      }
    },
    "summary": { "type": "object", "additionalProperties": true }
  }
}
