{
  "schemaVersion": 1,
  "slug": "bird-cage-size-calculator",
  "category": "pets",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "91a876ca152d68d1a7c1802398c9659b0ed272ed85b3ef286f41caa1f757e014",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/bird-cage-size-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": "Minimum starting dimension = ⌈measured wingspan × 2⌉ (mostly inside) or ⌈measured wingspan × 1.5⌉ (mostly outside)",
    "vars": [
      [
        "wingspan",
        "measured bird wingspan (in)"
      ],
      [
        "factor",
        "RSPCA single-bird starting factor based on time in cage"
      ]
    ],
    "note": "This estimates dimensions for one bird using RSPCA guidance. It does not size group housing or account for bar spacing, flight needs or species-specific behavior; seek advice from an avian veterinarian or specialist."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const factor=cageTime==='mostlyOutside'?1.5:2; const dimension=Math.ceil(wingspan*factor); return {minWidth:dimension,minDepth:dimension,minHeight:dimension};",
    "inputs": [
      {
        "name": "wingspan",
        "type": "number",
        "default": 12,
        "min": 2,
        "max": 80,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "cageTime",
        "type": "select",
        "default": "mostlyInside",
        "options": [
          {
            "value": "mostlyInside"
          },
          {
            "value": "mostlyOutside"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "minWidth",
        "precision": 0,
        "unit": "in"
      },
      {
        "name": "minDepth",
        "precision": 0,
        "unit": "in"
      },
      {
        "name": "minHeight",
        "precision": 0,
        "unit": "in"
      }
    ],
    "interpret": null
  }
}
