{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "./.argo/schema/IntentToImplementationHandoff.schema.json",
  "title": "Intent To Implementation Handoff Schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "stage",
    "generatedAt",
    "sourceIntentGraphPath",
    "intentElementIds"
  ],
  "properties": {
    "stage": {
      "type": "string",
      "const": "intent-to-implementation"
    },
    "generatedAt": {
      "type": "string"
    },
    "sourceIntentGraphPath": {
      "type": "string"
    },
    "summary": {
      "type": "string"
    },
    "intentElementIds": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    },
    "relationshipIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "openQuestions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/openQuestion"
      }
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "openQuestion": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "question",
        "recommendedAnswer",
        "reason"
      ],
      "properties": {
        "question": {
          "type": "string"
        },
        "recommendedAnswer": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        }
      }
    }
  }
}