{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.com/schemas/walkthroughs.schema.json",
  "title": "Agent Walkthroughs",
  "type": "object",
  "required": ["description", "objective", "walkthroughs"],
  "properties": {
    "description": { "type": "string", "minLength": 1 },
    "objective": { "type": "string", "minLength": 1 },
    "walkthroughs": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "id",
          "roadmapId",
          "priority",
          "title",
          "objective",
          "why",
          "steps",
          "evidenceToCollect",
          "passCriteria",
          "warningCriteria",
          "failCriteria",
          "stressTests",
          "objectiveAlignment"
        ],
        "properties": {
          "id": { "type": "string", "minLength": 1 },
          "roadmapId": { "type": "string", "minLength": 1 },
          "priority": { "type": "number", "minimum": 1 },
          "title": { "type": "string", "minLength": 1 },
          "objective": { "type": "string", "minLength": 1 },
          "why": { "type": "string", "minLength": 1 },
          "steps": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "required": ["order", "action", "why", "filesOrRoutes", "evidence"]
            }
          },
          "evidenceToCollect": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "passCriteria": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "warningCriteria": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "failCriteria": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "stressTests": {
            "type": "array",
            "minItems": 1,
            "items": { "type": "string", "minLength": 1 }
          },
          "objectiveAlignment": { "type": "string", "minLength": 1 }
        }
      }
    }
  }
}
