{
  "schemaVersion": 1,
  "slug": "furniture-spacing-calculator",
  "category": "household",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "bd2750eadb2551ff454969aad57f794804087d54065bfa6b72d26bb8caf7dd45",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/furniture-spacing-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": "g = roomLength × 12 − sofaDepth − 18 − coffeeTableDepth; walkway = g ≥ 36",
    "vars": [
      [
        "roomLength",
        "room length (ft)"
      ],
      [
        "sofaDepth",
        "sofa depth (in)"
      ],
      [
        "coffeeTableDepth",
        "coffee-table depth (in)"
      ],
      [
        "g",
        "table-to-TV gap (in)"
      ]
    ],
    "note": "Remaining clearance = room length in inches − sofa depth − assumed 18-inch gap − coffee-table depth. A 36-inch walkway is a planning threshold; no console width is calculated."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const roomIn=roomLength*12; const gapTableTv=roomIn-sofaDepth-18-coffeeTableDepth; const walkwayOk=gapTableTv>=36?'Yes':'No — reduce the coffee table or sofa depth'; return {gapTableTv,walkwayOk};",
    "inputs": [
      {
        "name": "roomLength",
        "type": "number",
        "default": 16,
        "min": 0,
        "max": 200,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "sofaDepth",
        "type": "number",
        "default": 36,
        "min": 20,
        "max": 60,
        "step": 1,
        "slider": true
      },
      {
        "name": "coffeeTableDepth",
        "type": "number",
        "default": 24,
        "min": 12,
        "max": 48,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "gapTableTv",
        "precision": 0,
        "unit": "in"
      },
      {
        "name": "walkwayOk",
        "precision": 0,
        "unit": "",
        "type": "text"
      }
    ],
    "interpret": null
  }
}
