{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "dd-flow/merge-stage-report@2/engine-0.4.2",
  "title": "Merge stage report emitted by dd-flow engine 0.4.2",
  "type": "object",
  "additionalProperties": true,
  "required": ["schema_id", "run", "stage", "project", "subject", "overall", "breadcrumbs", "implemented_goals", "acceptance_scenarios", "changed_files", "checks", "review", "review_gates", "defs"],
  "properties": {
    "schema_id": { "const": "dd-flow/merge-stage-report@2" },
    "run": { "type": "object", "required": ["run_id", "run_index"], "properties": { "run_id": { "type": "string", "pattern": "^RUN-[0-9]{3}-[a-z0-9]+(?:-[a-z0-9]+)*$" }, "run_index": { "type": "string", "minLength": 1 } } },
    "stage": { "type": "object", "required": ["name", "dir", "status"] },
    "project": { "type": "object", "required": ["id", "title"] },
    "subject": { "type": "object", "required": ["id", "title"] },
    "overall": { "type": "object", "required": ["verdict", "summary", "next_action"], "properties": { "verdict": { "enum": ["accepted", "blocked", "failed"] }, "summary": { "type": "string", "minLength": 1 }, "next_action": { "type": "string", "minLength": 1 } } },
    "breadcrumbs": { "type": "array" },
    "implemented_goals": { "type": "array" },
    "acceptance_scenarios": { "type": "array" },
    "changed_files": { "type": "array" },
    "checks": { "type": "array" },
    "review": { "type": "object" },
    "review_gates": { "type": "array" },
    "defs": { "type": "array" }
  }
}
