{
  "spec": "fio",
  "spec_version": "0.3.0",
  "manifest": {
    "id": "dscr-loan-calculator-2026",
    "name": "DSCR Loan Calculator",
    "description": "Computes debt service coverage ratio, monthly loan payment, total annual debt service, and maximum supportable loan size from business cash flow and proposed loan terms.",
    "workbook": {
      "uri": "DSCR Loan Calculator.xlsx",
      "locale": "en-US",
      "date_system": 1900
    }
  },
  "ports": [
    {
      "id": "net_income",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Start Here'!B6"
      },
      "schema": {
        "type": "number"
      },
      "default": 42000,
      "constraints": {
        "min": 0
      },
      "description": "Annual net income from the P&L in USD"
    },
    {
      "id": "depreciation_add_back",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Add-backs'!B5"
      },
      "schema": {
        "type": "number"
      },
      "default": 28000,
      "constraints": {
        "min": 0
      },
      "description": "Annual depreciation expense add-back in USD"
    },
    {
      "id": "amortization_add_back",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Add-backs'!B6"
      },
      "schema": {
        "type": "number"
      },
      "default": 2000,
      "constraints": {
        "min": 0
      },
      "description": "Annual amortization of intangibles add-back in USD"
    },
    {
      "id": "interest_add_back",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Add-backs'!B7"
      },
      "schema": {
        "type": "number"
      },
      "default": 21500,
      "constraints": {
        "min": 0
      },
      "description": "Existing loan interest expense add-back in USD"
    },
    {
      "id": "owner_salary_add_back",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Add-backs'!B8"
      },
      "schema": {
        "type": "number"
      },
      "default": 20000,
      "constraints": {
        "min": 0
      },
      "description": "Owner salary above market replacement add-back in USD"
    },
    {
      "id": "legal_settlement_add_back",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Add-backs'!B9"
      },
      "schema": {
        "type": "number"
      },
      "default": 12000,
      "constraints": {
        "min": 0
      },
      "description": "One-time legal settlement add-back in USD"
    },
    {
      "id": "related_party_rent_add_back",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Add-backs'!B10"
      },
      "schema": {
        "type": "number"
      },
      "default": 0,
      "constraints": {
        "min": 0
      },
      "description": "Rent paid to related party above market add-back in USD"
    },
    {
      "id": "existing_annual_debt_service",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Start Here'!B9"
      },
      "schema": {
        "type": "number"
      },
      "default": 28800,
      "constraints": {
        "min": 0
      },
      "description": "Existing annual principal and interest debt service in USD"
    },
    {
      "id": "loan_amount",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Start Here'!B12"
      },
      "schema": {
        "type": "number"
      },
      "default": 450000,
      "constraints": {
        "min": 0
      },
      "description": "Proposed loan principal amount in USD"
    },
    {
      "id": "annual_interest_rate",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Start Here'!B13"
      },
      "schema": {
        "type": "number"
      },
      "default": 0.0875,
      "constraints": {
        "min": 0.0001,
        "max": 0.3
      },
      "description": "Proposed loan annual interest rate percentage"
    },
    {
      "id": "term_years",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Start Here'!B14"
      },
      "schema": {
        "type": "integer"
      },
      "default": 10,
      "constraints": {
        "min": 1,
        "max": 30
      },
      "description": "Proposed loan amortization term in years"
    },
    {
      "id": "lender_minimum_dscr",
      "dir": "in",
      "shape": "scalar",
      "location": {
        "a1": "'Start Here'!B15"
      },
      "schema": {
        "type": "number"
      },
      "default": 1.25,
      "constraints": {
        "min": 0.5,
        "max": 5
      },
      "description": "Minimum debt service coverage ratio required by lender"
    },
    {
      "id": "total_add_backs",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Start Here'!B7"
      },
      "schema": {
        "type": "number"
      },
      "description": "Sum of all itemized non-cash and non-recurring add-backs in USD"
    },
    {
      "id": "cash_flow_available",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Start Here'!B8"
      },
      "schema": {
        "type": "number"
      },
      "description": "Cash flow available for debt service (net income plus add-backs) in USD"
    },
    {
      "id": "monthly_payment",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Start Here'!B18"
      },
      "schema": {
        "type": "number"
      },
      "description": "Standard amortizing monthly payment on the proposed loan in USD"
    },
    {
      "id": "new_annual_debt_service",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Start Here'!B19"
      },
      "schema": {
        "type": "number"
      },
      "description": "Annualized debt service on the proposed loan in USD"
    },
    {
      "id": "total_annual_debt_service",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Start Here'!B20"
      },
      "schema": {
        "type": "number"
      },
      "description": "Combined existing and proposed annual debt service in USD"
    },
    {
      "id": "dscr",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Start Here'!B21"
      },
      "schema": {
        "type": "number"
      },
      "description": "Debt service coverage ratio (cash flow available divided by total debt service)"
    },
    {
      "id": "verdict",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Start Here'!B22"
      },
      "schema": {
        "type": "string"
      },
      "description": "Underwriting verdict comparing DSCR against lender minimum"
    },
    {
      "id": "cushion_above_minimum",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Start Here'!B23"
      },
      "schema": {
        "type": "number"
      },
      "description": "Cash flow cushion above or shortfall below the lender minimum DSCR requirement in USD"
    },
    {
      "id": "max_new_annual_payment",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Start Here'!B24"
      },
      "schema": {
        "type": "number"
      },
      "description": "Maximum annual payment available for new debt at the lender minimum DSCR in USD"
    },
    {
      "id": "max_supportable_loan",
      "dir": "out",
      "shape": "scalar",
      "location": {
        "a1": "'Start Here'!B25"
      },
      "schema": {
        "type": "number"
      },
      "description": "Largest loan principal supported at the proposed rate, term, and minimum DSCR in USD"
    }
  ]
}
