{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://dicworkflowkit.local/schemas/entry.schema.json",
  "title": "QIHENG Entry Intent",
  "type": "object",
  "required": ["schema", "entryId", "mode", "source", "controller", "artifacts", "createdAt"],
  "properties": {
    "schema": { "const": "qiheng.entry.v1" },
    "entryId": { "type": "string", "pattern": "^qentry-[a-f0-9]{16}$" },
    "mode": { "enum": ["audit", "repair", "delivery"] },
    "source": {
      "type": "object",
      "required": ["type", "value"],
      "properties": {
        "type": { "enum": ["repository", "change", "spec"] },
        "value": { "type": "string", "minLength": 1 }
      },
      "additionalProperties": false
    },
    "controller": { "type": "object" },
    "artifacts": { "type": "object" },
    "createdAt": { "type": "string", "format": "date-time" }
  },
  "additionalProperties": false
}
