{
  "schemaVersion": 1,
  "slug": "egg-boiling-calculator",
  "category": "cooking",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "903a45fb0a4b7d4403473b3cf06fbae503d9d9eb51e9f612eb295027fe16cb76",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/egg-boiling-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": "t = b + s + T + A ÷ 1000",
    "vars": [
      [
        "b",
        "Base time by doneness: soft 5, medium 7, hard 10 (min)"
      ],
      [
        "s",
        "Size adjustment: small −1, medium −0.5, XL +1 (min)"
      ],
      [
        "T",
        "Start temp adjustment: fridge 0, room −1 (min)"
      ],
      [
        "A",
        "Altitude (ft)"
      ],
      [
        "t",
        "Total boiling time (min)"
      ]
    ],
    "note": "The base times and one-minute-per-1,000-ft adjustment are simplified estimates, not a universal recipe. Cooking method matters; use a tested recipe and cook eggs until yolks are firm."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const base = doneness === 'soft' ? 5 : doneness === 'medium' ? 7 : doneness === 'hard' ? 10 : 13; const size = eggSize === 'small' ? -1 : eggSize === 'medium' ? -0.5 : eggSize === 'xl' ? 1 : 0; const temp = startTemp === 'room' ? -1 : 0; const alt = altitude/1000; const total = base + size + temp + alt; return { minutes: total, iceBathMinutes: doneness === 'soft' ? 0 : 2, adjustments: size + temp + alt };",
    "inputs": [
      {
        "name": "doneness",
        "type": "select",
        "default": "hard",
        "options": [
          {
            "value": "soft"
          },
          {
            "value": "medium"
          },
          {
            "value": "hard"
          },
          {
            "value": "veryhard"
          }
        ]
      },
      {
        "name": "eggSize",
        "type": "select",
        "default": "large",
        "options": [
          {
            "value": "small"
          },
          {
            "value": "medium"
          },
          {
            "value": "large"
          },
          {
            "value": "xl"
          }
        ]
      },
      {
        "name": "startTemp",
        "type": "select",
        "default": "fridge",
        "options": [
          {
            "value": "fridge"
          },
          {
            "value": "room"
          }
        ]
      },
      {
        "name": "altitude",
        "type": "number",
        "default": 0,
        "min": 0,
        "max": 15000,
        "step": 100,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "minutes",
        "precision": 1,
        "unit": "min"
      },
      {
        "name": "iceBathMinutes",
        "precision": 0,
        "unit": "min"
      },
      {
        "name": "adjustments",
        "precision": 1,
        "unit": "min"
      }
    ],
    "interpret": null
  }
}
