{
 "schema_version": "1.0",
 "nodes": [
  {
   "id": "lease",
   "type": "input/document",
   "label": "The lease",
   "parameters": {
    "document": "__LEASE_PDF__",
    "required": true
   }
  },
  {
   "id": "contract_link",
   "type": "input/text",
   "label": "Link to the contract",
   "parameters": {
    "text": "https://www.example.com/leases/via-dei-glicini-14",
    "required": true
   }
  },
  {
   "id": "read",
   "type": "ai/document_analysis",
   "label": "Read the lease",
   "parameters": {
    "system_prompt": "You read Italian residential leases for tenants who do not read Italian. Copy every fact exactly as the contract states it: never compute, round, convert or correct anything. Answer with one JSON object with these keys:\n- landlord, tenant: the full names, written as a person writes them (Elena Marchetti, not ELENA MARCHETTI)\n- address: the street, number and city of the rented flat as printed, such as 'Via Roma 1, Milano'\n- start_date, end_date: the start and the first end of the lease as the contract states them, as YYYY-MM-DD\n- term_years, renewal_years: the years of the first term and of the automatic renewal, as numbers\n- notice_months: the months of notice the tenant must give, as a number\n- notice_method: how the tenant must give notice, in short plain English, at most 60 characters\n- rent_monthly, rent_annual: the monthly and the yearly rent as printed, as numbers, without currency signs\n- rent_due_day: the day of the month by which the rent is due, as a number\n- deposit: the security deposit as printed, as a number\n- condo_advance_monthly: the monthly advance for building costs as printed, as a number; leave it out if none\n- articles: one object per article of the contract, in order, each with article (such as 'Art. 6'), topic (one or two English words) and says (what it means for the tenant, in plain English, at most 200 characters)\nNumbers are plain JSON numbers: 1250, not '1.250,00'.",
    "prompt": "Read this lease.",
    "response_format": "json_object",
    "max_tokens": 6000
   }
  },
  {
   "id": "facts",
   "type": "utility/json_schema_validate",
   "label": "The facts are complete",
   "parameters": {
    "schema_source": "inline",
    "schema_definition": {
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "title": "The facts of a lease, as printed",
     "type": "object",
     "additionalProperties": false,
     "required": [
      "landlord",
      "tenant",
      "address",
      "start_date",
      "end_date",
      "term_years",
      "renewal_years",
      "notice_months",
      "notice_method",
      "rent_monthly",
      "rent_annual",
      "rent_due_day",
      "deposit",
      "articles"
     ],
     "properties": {
      "landlord": {
       "type": "string",
       "minLength": 3
      },
      "tenant": {
       "type": "string",
       "minLength": 3
      },
      "address": {
       "type": "string",
       "minLength": 5,
       "maxLength": 60
      },
      "start_date": {
       "type": "string",
       "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
      },
      "end_date": {
       "type": "string",
       "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
      },
      "term_years": {
       "type": "integer",
       "minimum": 1
      },
      "renewal_years": {
       "type": "integer",
       "minimum": 0
      },
      "notice_months": {
       "type": "integer",
       "minimum": 0
      },
      "notice_method": {
       "type": "string",
       "minLength": 5,
       "maxLength": 60
      },
      "rent_monthly": {
       "type": "number",
       "exclusiveMinimum": 0
      },
      "rent_annual": {
       "type": "number",
       "exclusiveMinimum": 0
      },
      "rent_due_day": {
       "type": "integer",
       "minimum": 1,
       "maximum": 31
      },
      "deposit": {
       "type": "number",
       "minimum": 0
      },
      "condo_advance_monthly": {
       "type": "number",
       "minimum": 0
      },
      "articles": {
       "type": "array",
       "minItems": 5,
       "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
         "article",
         "topic",
         "says"
        ],
        "properties": {
         "article": {
          "type": "string",
          "maxLength": 12
         },
         "topic": {
          "type": "string",
          "maxLength": 30
         },
         "says": {
          "type": "string",
          "minLength": 10,
          "maxLength": 300
         }
        }
       }
      }
     }
    },
    "mode": "fail"
   }
  },
  {
   "id": "landlord",
   "type": "utility/extract",
   "label": "Landlord",
   "parameters": {
    "path": "landlord",
    "expected_type": "text",
    "on_missing": "fail"
   }
  },
  {
   "id": "tenant",
   "type": "utility/extract",
   "label": "Tenant",
   "parameters": {
    "path": "tenant",
    "expected_type": "text",
    "on_missing": "fail"
   }
  },
  {
   "id": "address",
   "type": "utility/extract",
   "label": "Address",
   "parameters": {
    "path": "address",
    "expected_type": "text",
    "on_missing": "fail"
   }
  },
  {
   "id": "start_date",
   "type": "utility/extract",
   "label": "Start date",
   "parameters": {
    "path": "start_date",
    "expected_type": "text",
    "on_missing": "fail"
   }
  },
  {
   "id": "end_date",
   "type": "utility/extract",
   "label": "End date",
   "parameters": {
    "path": "end_date",
    "expected_type": "text",
    "on_missing": "fail"
   }
  },
  {
   "id": "term_years",
   "type": "utility/extract",
   "label": "Term years",
   "parameters": {
    "path": "term_years",
    "expected_type": "number",
    "on_missing": "fail"
   }
  },
  {
   "id": "renewal_years",
   "type": "utility/extract",
   "label": "Renewal years",
   "parameters": {
    "path": "renewal_years",
    "expected_type": "number",
    "on_missing": "fail"
   }
  },
  {
   "id": "notice_months",
   "type": "utility/extract",
   "label": "Notice months",
   "parameters": {
    "path": "notice_months",
    "expected_type": "number",
    "on_missing": "fail"
   }
  },
  {
   "id": "notice_method",
   "type": "utility/extract",
   "label": "Notice method",
   "parameters": {
    "path": "notice_method",
    "expected_type": "text",
    "on_missing": "fail"
   }
  },
  {
   "id": "rent_monthly",
   "type": "utility/extract",
   "label": "Rent monthly",
   "parameters": {
    "path": "rent_monthly",
    "expected_type": "number",
    "on_missing": "fail"
   }
  },
  {
   "id": "rent_annual",
   "type": "utility/extract",
   "label": "Rent annual",
   "parameters": {
    "path": "rent_annual",
    "expected_type": "number",
    "on_missing": "fail"
   }
  },
  {
   "id": "rent_due_day",
   "type": "utility/extract",
   "label": "Rent due day",
   "parameters": {
    "path": "rent_due_day",
    "expected_type": "number",
    "on_missing": "fail"
   }
  },
  {
   "id": "deposit",
   "type": "utility/extract",
   "label": "Deposit",
   "parameters": {
    "path": "deposit",
    "expected_type": "number",
    "on_missing": "fail"
   }
  },
  {
   "id": "anniversary",
   "type": "utility/date",
   "label": "Start plus the term",
   "parameters": {
    "operation": "add",
    "unit": "years"
   }
  },
  {
   "id": "computed_end",
   "type": "utility/date",
   "label": "End, computed (the day before)",
   "parameters": {
    "operation": "subtract",
    "unit": "days",
    "amount": 1
   }
  },
  {
   "id": "end_gap",
   "type": "utility/date",
   "label": "Printed end minus computed end",
   "parameters": {
    "operation": "difference",
    "unit": "days"
   }
  },
  {
   "id": "rent_gap",
   "type": "utility/calculate",
   "label": "Yearly rent minus twelve months",
   "parameters": {
    "expression": "rent_annual - rent_monthly * 12"
   }
  },
  {
   "id": "end_ok",
   "type": "utility/predicate",
   "label": "The end date agrees",
   "parameters": {
    "operation": "equals",
    "compare_number": 0
   }
  },
  {
   "id": "rent_ok",
   "type": "utility/predicate",
   "label": "The rent agrees",
   "parameters": {
    "operation": "equals",
    "compare_number": 0
   }
  },
  {
   "id": "consistent",
   "type": "utility/boolean_combine",
   "label": "The contract agrees with itself",
   "parameters": {
    "mode": "all"
   }
  },
  {
   "id": "notice_by",
   "type": "utility/date",
   "label": "Last day to give notice",
   "parameters": {
    "operation": "subtract",
    "unit": "months"
   }
  },
  {
   "id": "deposit_months",
   "type": "utility/calculate",
   "label": "Deposit in months of rent",
   "parameters": {
    "expression": "deposit / rent_monthly",
    "decimals": 1
   }
  },
  {
   "id": "t_rent",
   "type": "text/format",
   "label": "Rent, written",
   "parameters": {
    "format": "currency",
    "currency": "EUR",
    "locale": "en-GB",
    "decimals": 0
   }
  },
  {
   "id": "t_deposit",
   "type": "text/format",
   "label": "Deposit, written",
   "parameters": {
    "format": "currency",
    "currency": "EUR",
    "locale": "en-GB",
    "decimals": 0
   }
  },
  {
   "id": "t_months",
   "type": "text/format",
   "label": "Months, written",
   "parameters": {
    "format": "auto"
   }
  },
  {
   "id": "t_due",
   "type": "text/format",
   "label": "Due day, written",
   "parameters": {
    "format": "auto"
   }
  },
  {
   "id": "t_start",
   "type": "text/format",
   "label": "Start, written",
   "parameters": {
    "format": "date",
    "date_style": "long",
    "locale": "en-GB"
   }
  },
  {
   "id": "t_end_en",
   "type": "text/format",
   "label": "End, written",
   "parameters": {
    "format": "date",
    "date_style": "long",
    "locale": "en-GB"
   }
  },
  {
   "id": "t_end_it",
   "type": "text/format",
   "label": "End, in Italian",
   "parameters": {
    "format": "date",
    "date_style": "long",
    "locale": "it-IT"
   }
  },
  {
   "id": "t_notice",
   "type": "text/format",
   "label": "Notice date, written",
   "parameters": {
    "format": "date",
    "date_style": "long",
    "locale": "en-GB"
   }
  },
  {
   "id": "t_term",
   "type": "text/format",
   "label": "Term, written",
   "parameters": {
    "format": "auto"
   }
  },
  {
   "id": "t_renewal",
   "type": "text/format",
   "label": "Renewal, written",
   "parameters": {
    "format": "auto"
   }
  },
  {
   "id": "byline",
   "type": "text/template",
   "label": "Byline",
   "parameters": {
    "template": "Lease from [start] · [term] + [renewal] years · [landlord] to [tenant]",
    "placeholders": [
     {
      "name": "start",
      "inputPort": "start"
     },
     {
      "name": "term",
      "inputPort": "term"
     },
     {
      "name": "renewal",
      "inputPort": "renewal"
     },
     {
      "name": "landlord",
      "inputPort": "landlord"
     },
     {
      "name": "tenant",
      "inputPort": "tenant"
     }
    ]
   }
  },
  {
   "id": "step_1",
   "type": "text/template",
   "label": "Step 1",
   "parameters": {
    "template": "[rent] a month, by day [due]",
    "placeholders": [
     {
      "name": "rent",
      "inputPort": "rent"
     },
     {
      "name": "due",
      "inputPort": "due"
     }
    ]
   }
  },
  {
   "id": "step_2",
   "type": "text/template",
   "label": "Step 2",
   "parameters": {
    "template": "Deposit [deposit] · [months] months",
    "placeholders": [
     {
      "name": "deposit",
      "inputPort": "deposit"
     },
     {
      "name": "months",
      "inputPort": "months"
     }
    ]
   }
  },
  {
   "id": "step_3",
   "type": "text/template",
   "label": "Step 3",
   "parameters": {
    "template": "Notice by [notice]",
    "placeholders": [
     {
      "name": "notice",
      "inputPort": "notice"
     }
    ]
   }
  },
  {
   "id": "notice_it",
   "type": "text/template",
   "label": "The notice, in Italian",
   "parameters": {
    "template": "Comunico la disdetta del contratto di locazione dell'immobile di [address], con effetto dal [end].",
    "placeholders": [
     {
      "name": "address",
      "inputPort": "address"
     },
     {
      "name": "end",
      "inputPort": "end"
     }
    ]
   }
  },
  {
   "id": "notice_en",
   "type": "text/template",
   "label": "The notice, in English",
   "parameters": {
    "template": "I give notice to end the lease of the flat at [address], as of [end].",
    "placeholders": [
     {
      "name": "address",
      "inputPort": "address"
     },
     {
      "name": "end",
      "inputPort": "end"
     }
    ]
   }
  },
  {
   "id": "notice_how",
   "type": "text/template",
   "label": "How and by when",
   "parameters": {
    "template": "[method] by [notice]",
    "placeholders": [
     {
      "name": "method",
      "inputPort": "method"
     },
     {
      "name": "notice",
      "inputPort": "notice"
     }
    ]
   }
  },
  {
   "id": "articles_text",
   "type": "text/format",
   "label": "The articles as text",
   "parameters": {
    "format": "json",
    "json_style": "compact"
   }
  },
  {
   "id": "write",
   "type": "ai/text_generation",
   "label": "Write the page",
   "parameters": {
    "system_prompt": "You write a one-page summary of an Italian residential lease for a tenant who does not read Italian, in plain English, warm and clear, as a good adviser would; no legal jargon, no exclamation marks. You receive the facts and what every article says.\n\nRules:\n- Never write amounts, dates, durations or counts, neither in figures nor in words ('six months', 'three'): the page prints them, computed by the system. Write 'the notice period', 'the deposit' instead.\n- Use only what the articles say; never give legal advice beyond them, never invent rights or duties.\n- Keep strictly within the character limits below: they are the space on the printed page.\n\nReturn one JSON object and nothing else:\n- \"big_idea\": 40 to 130 characters: the lease in one sentence, what kind of contract it is and what matters most.\n- \"key_ideas\": 4 or 5 objects, the clauses a tenant most needs to know (costs, leaving, duties, limits), each with \"tag\" (at most 18 characters: the article and its topic, such as 'Art. 13 · Leaving'), \"title\" (at most 40 characters) and \"text\" (60 to 118 characters).\n- \"actions\": exactly 3 objects with \"text\" (20 to 80 characters): what to check or ask before signing.\n- \"illustration_prompt\": in English, at most 600 characters, for an image model: a square editorial illustration of the entrance of a Milanese apartment building with a courtyard and balconies with plants, flat shapes with soft grain, a limited palette of deep navy, sage green, pale stone and warm cream, plenty of calm space, full bleed with no border or frame, no people, no text, no letters, no numbers, no logos.",
    "response_format": "json_object",
    "max_tokens": 4000
   }
  },
  {
   "id": "page_check",
   "type": "utility/json_schema_validate",
   "label": "The words fit the page",
   "parameters": {
    "schema_source": "inline",
    "schema_definition": {
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "title": "The words of the lease summary",
     "type": "object",
     "additionalProperties": false,
     "required": [
      "big_idea",
      "key_ideas",
      "actions",
      "illustration_prompt"
     ],
     "properties": {
      "big_idea": {
       "type": "string",
       "minLength": 40,
       "maxLength": 150,
       "pattern": "^[^0-9]*$"
      },
      "key_ideas": {
       "type": "array",
       "minItems": 4,
       "maxItems": 5,
       "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
         "tag",
         "title",
         "text"
        ],
        "properties": {
         "tag": {
          "type": "string",
          "minLength": 3,
          "maxLength": 20
         },
         "title": {
          "type": "string",
          "minLength": 10,
          "maxLength": 44,
          "pattern": "^[^0-9]*$"
         },
         "text": {
          "type": "string",
          "minLength": 50,
          "maxLength": 130,
          "pattern": "^[^0-9]*$"
         }
        }
       }
      },
      "actions": {
       "type": "array",
       "minItems": 3,
       "maxItems": 3,
       "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
         "text"
        ],
        "properties": {
         "text": {
          "type": "string",
          "minLength": 20,
          "maxLength": 90,
          "pattern": "^[^0-9]*$"
         }
        }
       }
      },
      "illustration_prompt": {
       "type": "string",
       "minLength": 80,
       "maxLength": 600
      }
     }
    },
    "mode": "fail"
   }
  },
  {
   "id": "page_words",
   "type": "utility/filter",
   "label": "Only a consistent contract goes to print",
   "parameters": {
    "invert": false
   }
  },
  {
   "id": "illustration_prompt",
   "type": "utility/extract",
   "label": "Illustration prompt",
   "parameters": {
    "path": "illustration_prompt",
    "expected_type": "text",
    "on_missing": "fail"
   }
  },
  {
   "id": "illustration",
   "type": "ai/text_to_image",
   "label": "Paint the illustration",
   "parameters": {
    "aspect_ratio": "1_1",
    "variants": 1
   }
  },
  {
   "id": "render",
   "type": "design/template_render",
   "label": "Render the summary",
   "parameters": {
    "template_id": "__TEMPLATE_ID__",
    "template_revision": "__TEMPLATE_REVISION__",
    "output": "both",
    "page_selection": "all",
    "missing_policy": "fail_required",
    "overflow_policy": "template",
    "max_repeat": 6
   }
  },
  {
   "id": "o_pdf",
   "type": "output/pdf",
   "label": "Summary PDF",
   "parameters": {
    "output_name": "summary_pdf"
   }
  },
  {
   "id": "o_img",
   "type": "output/image",
   "label": "Summary image",
   "parameters": {
    "output_name": "summary_image"
   }
  },
  {
   "id": "o_facts",
   "type": "output/json",
   "label": "The facts, as printed",
   "parameters": {
    "output_name": "facts"
   }
  },
  {
   "id": "o_end_gap",
   "type": "output/json",
   "label": "End date check",
   "parameters": {
    "output_name": "end_date_gap_days"
   }
  },
  {
   "id": "o_rent_gap",
   "type": "output/json",
   "label": "Rent check",
   "parameters": {
    "output_name": "rent_gap"
   }
  },
  {
   "id": "o_notice",
   "type": "output/text",
   "label": "Notice deadline",
   "parameters": {
    "output_name": "notice_by"
   }
  },
  {
   "id": "o_layout",
   "type": "output/json",
   "label": "Layout report",
   "parameters": {
    "output_name": "layout_report"
   }
  }
 ],
 "connections": [
  {
   "from_node": "lease",
   "from_output": "document",
   "to_node": "read",
   "to_input": "documents_0"
  },
  {
   "from_node": "read",
   "from_output": "json",
   "to_node": "facts",
   "to_input": "document"
  },
  {
   "from_node": "facts",
   "from_output": "normalized_json",
   "to_node": "landlord",
   "to_input": "json"
  },
  {
   "from_node": "facts",
   "from_output": "normalized_json",
   "to_node": "tenant",
   "to_input": "json"
  },
  {
   "from_node": "facts",
   "from_output": "normalized_json",
   "to_node": "address",
   "to_input": "json"
  },
  {
   "from_node": "facts",
   "from_output": "normalized_json",
   "to_node": "start_date",
   "to_input": "json"
  },
  {
   "from_node": "facts",
   "from_output": "normalized_json",
   "to_node": "end_date",
   "to_input": "json"
  },
  {
   "from_node": "facts",
   "from_output": "normalized_json",
   "to_node": "term_years",
   "to_input": "json"
  },
  {
   "from_node": "facts",
   "from_output": "normalized_json",
   "to_node": "renewal_years",
   "to_input": "json"
  },
  {
   "from_node": "facts",
   "from_output": "normalized_json",
   "to_node": "notice_months",
   "to_input": "json"
  },
  {
   "from_node": "facts",
   "from_output": "normalized_json",
   "to_node": "notice_method",
   "to_input": "json"
  },
  {
   "from_node": "facts",
   "from_output": "normalized_json",
   "to_node": "rent_monthly",
   "to_input": "json"
  },
  {
   "from_node": "facts",
   "from_output": "normalized_json",
   "to_node": "rent_annual",
   "to_input": "json"
  },
  {
   "from_node": "facts",
   "from_output": "normalized_json",
   "to_node": "rent_due_day",
   "to_input": "json"
  },
  {
   "from_node": "facts",
   "from_output": "normalized_json",
   "to_node": "deposit",
   "to_input": "json"
  },
  {
   "from_node": "start_date",
   "from_output": "value",
   "to_node": "anniversary",
   "to_input": "date"
  },
  {
   "from_node": "term_years",
   "from_output": "value",
   "to_node": "anniversary",
   "to_input": "amount"
  },
  {
   "from_node": "anniversary",
   "from_output": "date",
   "to_node": "computed_end",
   "to_input": "date"
  },
  {
   "from_node": "computed_end",
   "from_output": "date",
   "to_node": "end_gap",
   "to_input": "date"
  },
  {
   "from_node": "end_date",
   "from_output": "value",
   "to_node": "end_gap",
   "to_input": "other_date"
  },
  {
   "from_node": "rent_annual",
   "from_output": "value",
   "to_node": "rent_gap",
   "to_input": "rent_annual"
  },
  {
   "from_node": "rent_monthly",
   "from_output": "value",
   "to_node": "rent_gap",
   "to_input": "rent_monthly"
  },
  {
   "from_node": "end_gap",
   "from_output": "number",
   "to_node": "end_ok",
   "to_input": "a"
  },
  {
   "from_node": "rent_gap",
   "from_output": "result",
   "to_node": "rent_ok",
   "to_input": "a"
  },
  {
   "from_node": "end_ok",
   "from_output": "result",
   "to_node": "consistent",
   "to_input": "conditions_0"
  },
  {
   "from_node": "rent_ok",
   "from_output": "result",
   "to_node": "consistent",
   "to_input": "conditions_1"
  },
  {
   "from_node": "computed_end",
   "from_output": "date",
   "to_node": "notice_by",
   "to_input": "date"
  },
  {
   "from_node": "notice_months",
   "from_output": "value",
   "to_node": "notice_by",
   "to_input": "amount"
  },
  {
   "from_node": "deposit",
   "from_output": "value",
   "to_node": "deposit_months",
   "to_input": "deposit"
  },
  {
   "from_node": "rent_monthly",
   "from_output": "value",
   "to_node": "deposit_months",
   "to_input": "rent_monthly"
  },
  {
   "from_node": "rent_monthly",
   "from_output": "value",
   "to_node": "t_rent",
   "to_input": "value"
  },
  {
   "from_node": "deposit",
   "from_output": "value",
   "to_node": "t_deposit",
   "to_input": "value"
  },
  {
   "from_node": "deposit_months",
   "from_output": "result",
   "to_node": "t_months",
   "to_input": "value"
  },
  {
   "from_node": "rent_due_day",
   "from_output": "value",
   "to_node": "t_due",
   "to_input": "value"
  },
  {
   "from_node": "start_date",
   "from_output": "value",
   "to_node": "t_start",
   "to_input": "value"
  },
  {
   "from_node": "computed_end",
   "from_output": "date",
   "to_node": "t_end_en",
   "to_input": "value"
  },
  {
   "from_node": "computed_end",
   "from_output": "date",
   "to_node": "t_end_it",
   "to_input": "value"
  },
  {
   "from_node": "notice_by",
   "from_output": "date",
   "to_node": "t_notice",
   "to_input": "value"
  },
  {
   "from_node": "term_years",
   "from_output": "value",
   "to_node": "t_term",
   "to_input": "value"
  },
  {
   "from_node": "renewal_years",
   "from_output": "value",
   "to_node": "t_renewal",
   "to_input": "value"
  },
  {
   "from_node": "t_start",
   "from_output": "text",
   "to_node": "byline",
   "to_input": "start"
  },
  {
   "from_node": "t_term",
   "from_output": "text",
   "to_node": "byline",
   "to_input": "term"
  },
  {
   "from_node": "t_renewal",
   "from_output": "text",
   "to_node": "byline",
   "to_input": "renewal"
  },
  {
   "from_node": "landlord",
   "from_output": "value",
   "to_node": "byline",
   "to_input": "landlord"
  },
  {
   "from_node": "tenant",
   "from_output": "value",
   "to_node": "byline",
   "to_input": "tenant"
  },
  {
   "from_node": "t_rent",
   "from_output": "text",
   "to_node": "step_1",
   "to_input": "rent"
  },
  {
   "from_node": "t_due",
   "from_output": "text",
   "to_node": "step_1",
   "to_input": "due"
  },
  {
   "from_node": "t_deposit",
   "from_output": "text",
   "to_node": "step_2",
   "to_input": "deposit"
  },
  {
   "from_node": "t_months",
   "from_output": "text",
   "to_node": "step_2",
   "to_input": "months"
  },
  {
   "from_node": "t_notice",
   "from_output": "text",
   "to_node": "step_3",
   "to_input": "notice"
  },
  {
   "from_node": "address",
   "from_output": "value",
   "to_node": "notice_it",
   "to_input": "address"
  },
  {
   "from_node": "t_end_it",
   "from_output": "text",
   "to_node": "notice_it",
   "to_input": "end"
  },
  {
   "from_node": "address",
   "from_output": "value",
   "to_node": "notice_en",
   "to_input": "address"
  },
  {
   "from_node": "t_end_en",
   "from_output": "text",
   "to_node": "notice_en",
   "to_input": "end"
  },
  {
   "from_node": "notice_method",
   "from_output": "value",
   "to_node": "notice_how",
   "to_input": "method"
  },
  {
   "from_node": "t_notice",
   "from_output": "text",
   "to_node": "notice_how",
   "to_input": "notice"
  },
  {
   "from_node": "facts",
   "from_output": "normalized_json",
   "to_node": "articles_text",
   "to_input": "value"
  },
  {
   "from_node": "articles_text",
   "from_output": "text",
   "to_node": "write",
   "to_input": "prompt"
  },
  {
   "from_node": "write",
   "from_output": "json",
   "to_node": "page_check",
   "to_input": "document"
  },
  {
   "from_node": "consistent",
   "from_output": "result",
   "to_node": "page_words",
   "to_input": "condition"
  },
  {
   "from_node": "page_check",
   "from_output": "normalized_json",
   "to_node": "page_words",
   "to_input": "value"
  },
  {
   "from_node": "page_words",
   "from_output": "value",
   "to_node": "illustration_prompt",
   "to_input": "json"
  },
  {
   "from_node": "illustration_prompt",
   "from_output": "value",
   "to_node": "illustration",
   "to_input": "prompt"
  },
  {
   "from_node": "page_words",
   "from_output": "value",
   "to_node": "render",
   "to_input": "data_0"
  },
  {
   "from_node": "address",
   "from_output": "value",
   "to_node": "render",
   "to_input": "title"
  },
  {
   "from_node": "byline",
   "from_output": "result",
   "to_node": "render",
   "to_input": "byline"
  },
  {
   "from_node": "step_1",
   "from_output": "result",
   "to_node": "render",
   "to_input": "step_1"
  },
  {
   "from_node": "step_2",
   "from_output": "result",
   "to_node": "render",
   "to_input": "step_2"
  },
  {
   "from_node": "step_3",
   "from_output": "result",
   "to_node": "render",
   "to_input": "step_3"
  },
  {
   "from_node": "notice_it",
   "from_output": "result",
   "to_node": "render",
   "to_input": "quote_original"
  },
  {
   "from_node": "notice_en",
   "from_output": "result",
   "to_node": "render",
   "to_input": "quote_translation"
  },
  {
   "from_node": "notice_how",
   "from_output": "result",
   "to_node": "render",
   "to_input": "quote_source"
  },
  {
   "from_node": "contract_link",
   "from_output": "text",
   "to_node": "render",
   "to_input": "source_url"
  },
  {
   "from_node": "illustration",
   "from_output": "result",
   "to_node": "render",
   "to_input": "illustration"
  },
  {
   "from_node": "render",
   "from_output": "pdf",
   "to_node": "o_pdf",
   "to_input": "pdf"
  },
  {
   "from_node": "render",
   "from_output": "image",
   "to_node": "o_img",
   "to_input": "image"
  },
  {
   "from_node": "facts",
   "from_output": "normalized_json",
   "to_node": "o_facts",
   "to_input": "json"
  },
  {
   "from_node": "end_gap",
   "from_output": "number",
   "to_node": "o_end_gap",
   "to_input": "json"
  },
  {
   "from_node": "rent_gap",
   "from_output": "result",
   "to_node": "o_rent_gap",
   "to_input": "json"
  },
  {
   "from_node": "notice_by",
   "from_output": "date",
   "to_node": "o_notice",
   "to_input": "text"
  },
  {
   "from_node": "render",
   "from_output": "layout_report",
   "to_node": "o_layout",
   "to_input": "json"
  }
 ]
}