{
  "schemaVersion": 1,
  "slug": "zodiac-compatibility-calculator",
  "category": "party",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "d5e79dde9658ed2200ac8e12d71fe30407813a2754f021afc6c3e80ad1cfd4eb",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/zodiac-compatibility-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "S = L(E1, E2); sign1 = sign2 → S = max(S, 80)",
    "vars": [
      [
        "E1",
        "Element of sign 1"
      ],
      [
        "E2",
        "Element of sign 2"
      ],
      [
        "L",
        "Element-pair lookup score"
      ],
      [
        "S",
        "Compatibility score (%)"
      ]
    ],
    "note": "Elements: Fire (Aries, Leo, Sagittarius), Earth (Taurus, Virgo, Capricorn), Air (Gemini, Libra, Aquarius), Water (Cancer, Scorpio, Pisces). Same element: Fire/Earth/Water 85, Air 80; Fire–Air and Earth–Water 90; clashes Earth–Fire 55, Fire–Water 45, Air–Earth 50, Air–Water 55; other pairs 50. Verdicts: ≥ 85 natural match, ≥ 70 easy connection, ≥ 55 with effort, below that challenging."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const E = { aries: 'Fire', leo: 'Fire', sagittarius: 'Fire', taurus: 'Earth', virgo: 'Earth', capricorn: 'Earth', gemini: 'Air', libra: 'Air', aquarius: 'Air', cancer: 'Water', scorpio: 'Water', pisces: 'Water' }; const key = (x, y) => [x, y].sort().join('-'); const good = { 'Fire-Air': 90, 'Earth-Water': 90, 'Air-Fire': 90, 'Water-Earth': 90 }; const same = { Fire: 85, Earth: 85, Air: 80, Water: 85 }; const clash = { 'Earth-Fire': 55, 'Fire-Water': 45, 'Air-Earth': 50, 'Air-Water': 55, 'Fire-Fire': 85 }; const e1 = E[sign1] || 'Fire'; const e2 = E[sign2] || 'Fire'; let score; let pairing; if (e1 === e2) { score = same[e1]; pairing = 'Same element'; } else if (good[key(e1, e2)] !== undefined) { score = good[key(e1, e2)]; pairing = 'Compatible elements'; } else { score = clash[key(e1, e2)] || 50; pairing = 'Tension between elements'; } if (sign1 === sign2) score = Math.max(score, 80); return { score: score, element1: e1, element2: e2, verdict: score >= 85 ? 'Natural match' : score >= 70 ? 'Easy connection' : score >= 55 ? 'Works with effort' : 'Challenging pairing', pairing: pairing };",
    "inputs": [
      {
        "name": "sign1",
        "type": "select",
        "default": "aries",
        "options": [
          {
            "value": "aries"
          },
          {
            "value": "taurus"
          },
          {
            "value": "gemini"
          },
          {
            "value": "cancer"
          },
          {
            "value": "leo"
          },
          {
            "value": "virgo"
          },
          {
            "value": "libra"
          },
          {
            "value": "scorpio"
          },
          {
            "value": "sagittarius"
          },
          {
            "value": "capricorn"
          },
          {
            "value": "aquarius"
          },
          {
            "value": "pisces"
          }
        ]
      },
      {
        "name": "sign2",
        "type": "select",
        "default": "leo",
        "options": [
          {
            "value": "aries"
          },
          {
            "value": "taurus"
          },
          {
            "value": "gemini"
          },
          {
            "value": "cancer"
          },
          {
            "value": "leo"
          },
          {
            "value": "virgo"
          },
          {
            "value": "libra"
          },
          {
            "value": "scorpio"
          },
          {
            "value": "sagittarius"
          },
          {
            "value": "capricorn"
          },
          {
            "value": "aquarius"
          },
          {
            "value": "pisces"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "score",
        "precision": 0,
        "unit": "%"
      },
      {
        "name": "element1",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "element2",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "verdict",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "pairing",
        "precision": 0,
        "unit": "",
        "type": "text"
      }
    ],
    "interpret": null
  }
}
