{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.com/schemas/conversion-copy.schema.json",
  "title": "Conversion Copy System",
  "type": "object",
  "required": ["description", "objective", "conversion_copy"],
  "properties": {
    "description": { "type": "string", "minLength": 1 },
    "objective": { "type": "string", "minLength": 1 },
    "conversion_copy": {
      "type": "object",
      "required": ["objective", "why", "studyDate", "sourceStudy", "conversionPrinciples", "copyTypes", "exampleTransformations", "agentWorkflow", "antiPatterns", "qaGates", "stressTestSuite", "passCriteria", "objectiveAlignment"],
      "properties": {
        "objective": { "type": "string", "minLength": 1 },
        "why": { "type": "string", "minLength": 1 },
        "studyDate": { "type": "string", "minLength": 1 },
        "sourceStudy": {
          "type": "object",
          "required": ["name", "sourceBoundary", "sources"],
          "properties": {
            "sources": {
              "type": "array",
              "minItems": 3,
              "items": {
                "type": "object",
                "required": ["title", "url", "usefulFor"]
              }
            }
          }
        },
        "conversionPrinciples": {
          "type": "array",
          "minItems": 6,
          "items": {
            "type": "object",
            "required": ["id", "name", "why", "agentCheck", "weakExample", "strongerExample", "guardrail"]
          }
        },
        "copyTypes": {
          "type": "array",
          "minItems": 4,
          "items": {
            "type": "object",
            "required": ["id", "name", "purpose", "structure", "agentPrompt"]
          }
        },
        "exampleTransformations": {
          "type": "array",
          "minItems": 3,
          "items": {
            "type": "object",
            "required": ["id", "weakCopy", "strongerCopy", "whyStronger", "requiredChecks"]
          }
        },
        "agentWorkflow": { "type": "array", "minItems": 6 },
        "antiPatterns": {
          "type": "array",
          "minItems": 4,
          "items": {
            "type": "object",
            "required": ["id", "issue", "fix"]
          }
        },
        "qaGates": { "type": "array", "minItems": 1 },
        "stressTestSuite": {
          "type": "object",
          "required": ["command", "fixturePath", "reportPath", "why"]
        },
        "passCriteria": { "type": "array", "minItems": 1 },
        "objectiveAlignment": { "type": "string", "minLength": 1 }
      }
    }
  }
}
