{
  "tool_id": "sleep_debt",
  "slug": "sleep-debt-calculator",
  "path": "/sleep-debt-calculator/",
  "mode": "engine_module",
  "usage": "Client-side calculator. Open https://aifithub.io/sleep-debt-calculator/ and fill in the inputs; results render in-browser. Also importable as ES module from https://aifithub.io/engines/sleep-debt-calculator.js — call compute(input) with the JSON shape below.",
  "methodology": "https://aifithub.io/methodology/sleep-debt-calculator/",
  "sample_input": {
    "tool": "sleep_debt",
    "ideal_sleep": 8,
    "actual_sleep": [
      7,
      6.5,
      7,
      6,
      5.5,
      8,
      8.5
    ]
  },
  "input_schema": {
    "type": "object",
    "properties": {
      "tool": {
        "type": "string"
      },
      "ideal_sleep": {
        "type": "number"
      },
      "actual_sleep": {
        "type": "array",
        "items": {
          "type": "number"
        },
        "minItems": 7,
        "maxItems": 7
      }
    },
    "required": [
      "tool",
      "ideal_sleep",
      "actual_sleep"
    ]
  },
  "output_schema": {
    "type": "object",
    "properties": {
      "totalDebt": {
        "type": "number"
      },
      "averageSleep": {
        "type": "number"
      },
      "days": {
        "type": "array"
      },
      "assessment": {
        "type": "string",
        "enum": [
          "Good",
          "Moderate Debt",
          "Significant Debt",
          "Severe Debt"
        ]
      },
      "estimatedRecoveryDays": {
        "type": "number"
      }
    }
  }
}
