{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "kei-artifact://plan",
  "title": "Karpathy Goal-Driven Plan",
  "description": "Ordered plan steps, each with a verify-criterion.",
  "type": "object",
  "additionalProperties": false,
  "required": ["goal", "steps"],
  "properties": {
    "goal": {
      "type": "string",
      "minLength": 1
    },
    "parent_spec_id": {
      "type": "string",
      "minLength": 1
    },
    "steps": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["step", "verify"],
        "properties": {
          "step": {"type": "string", "minLength": 1},
          "verify": {"type": "string", "minLength": 1},
          "est_minutes": {"type": "integer", "minimum": 0}
        }
      }
    },
    "risks": {
      "type": "array",
      "items": {"type": "string", "minLength": 1}
    }
  }
}
