{
      "name": "einvoice-validation-pipeline",
      "domain": "ViDA / E-Invoicing",
      "title": "E-Invoice Validation Pipeline",
      "description": "Gated four-step e-invoice validation pipeline: format conformance check (Factur-X, XRechnung, PINT-AE, MyInvois, Peppol BIS 3.0/Belgium, KSeF FA(3)/Poland), VAT arithmetic verification, jurisdiction mandate routing, and a hash-anchored transmission receipt carrying the SPEC.md §27 pre-transmission release gate (review_required, schema-only pending HA-RETRO-1). Exits early on a format-conformance failure or a VAT-arithmetic mismatch, so the receipt is only ever built for a document that passed both checks.",
      "composer_url": "https://ainumbers.co/chaingraph/chains/einvoice-validation-pipeline.html",
      "steps": [
        {
          "tool_id": "art-293-einvoice-format-validator",
          "handoff": "structural_completeness feeds Stage 2 VAT verification; a format failure stops the chain",
          "gate": {
            "input": "/structural_completeness",
            "rules": [
              {
                "op": "eq",
                "value": false,
                "next": "end"
              }
            ],
            "default": "art-294-einvoice-vat-calc-verifier"
          }
        },
        {
          "tool_id": "art-294-einvoice-vat-calc-verifier",
          "handoff": "consistent feeds Stage 3 mandate routing; a VAT-arithmetic mismatch stops the chain",
          "gate": {
            "input": "/consistent",
            "rules": [
              {
                "op": "eq",
                "value": false,
                "next": "end"
              }
            ],
            "default": "art-295-einvoice-jurisdiction-mandate-router"
          }
        },
        {
          "tool_id": "art-295-einvoice-jurisdiction-mandate-router",
          "handoff": "routed_mandate feeds the terminal transmission receipt"
        },
        {
          "tool_id": "art-296-einvoice-transmission-receipt-builder",
          "handoff": "Composes the hash-anchored transmission receipt -- final stage"
        }
      ]
    }
