{
  "schema_version": "1.0.0",
  "identity": {
    "id": "tco-maszyny",
    "version": "1.0.0",
    "name": "Kalkulator TCO maszyny",
    "category": "Decyzje",
    "description": "Policz całkowity koszt posiadania maszyny: zakup, instalacja, eksploatacja, serwis i wartość końcowa."
  },
  "input": {
    "fields": [
      {
        "id": "purchase",
        "label": "Cena zakupu",
        "type": "number",
        "unit": "PLN",
        "default": 120000,
        "minimum": 0,
        "maximum": 1000000000,
        "required": true
      },
      {
        "id": "install",
        "label": "Instalacja i szkolenie",
        "type": "number",
        "unit": "PLN",
        "default": 10000,
        "minimum": 0,
        "maximum": 1000000000,
        "required": true
      },
      {
        "id": "years",
        "label": "Okres użytkowania",
        "type": "integer",
        "unit": "lat",
        "default": 5,
        "minimum": 1,
        "maximum": 30,
        "required": true
      },
      {
        "id": "energy",
        "label": "Energia rocznie",
        "type": "number",
        "unit": "PLN/rok",
        "default": 8000,
        "minimum": 0,
        "maximum": 1000000000,
        "required": true
      },
      {
        "id": "service",
        "label": "Serwis rocznie",
        "type": "number",
        "unit": "PLN/rok",
        "default": 6000,
        "minimum": 0,
        "maximum": 1000000000,
        "required": true
      },
      {
        "id": "other",
        "label": "Pozostałe koszty roczne",
        "type": "number",
        "unit": "PLN/rok",
        "default": 2000,
        "minimum": 0,
        "maximum": 1000000000,
        "required": true
      },
      {
        "id": "residual",
        "label": "Wartość odsprzedaży netto",
        "type": "number",
        "unit": "PLN",
        "default": 20000,
        "minimum": 0,
        "maximum": 1000000000,
        "required": true
      },
      {
        "id": "hours",
        "label": "Praca rocznie",
        "type": "number",
        "unit": "h/rok",
        "default": 2000,
        "minimum": 1,
        "maximum": 1000000000,
        "required": true
      }
    ],
    "special": {}
  },
  "formula": {
    "model": "deterministic",
    "expressions": [
      {
        "id": "annual",
        "formula": "energy+service+other",
        "unit": "PLN/rok",
        "precision": 2
      },
      {
        "id": "total",
        "formula": "purchase+install+annual*years-residual",
        "unit": "PLN",
        "precision": 2
      },
      {
        "id": "hour",
        "formula": "total/(years*hours)",
        "unit": "PLN/h",
        "precision": 2
      }
    ]
  },
  "qualification": {
    "states": [
      "MATCH",
      "MISMATCH",
      "UNKNOWN",
      "REVIEW"
    ],
    "rules": [],
    "limitations": "Nie obejmuje kosztu kapitału, podatków ani przestojów, chyba że podano je w kosztach. Wartość końcowa jest założeniem; do decyzji inwestycyjnej użyj też NPV."
  },
  "output": {
    "fields": [
      {
        "id": "annual",
        "label": "Koszt roczny eksploatacji",
        "unit": "PLN/rok",
        "precision": 2
      },
      {
        "id": "total",
        "label": "TCO netto",
        "unit": "PLN",
        "precision": 2
      },
      {
        "id": "hour",
        "label": "TCO na godzinę",
        "unit": "PLN/h",
        "precision": 2
      }
    ],
    "formats": [
      "csv",
      "json"
    ]
  },
  "evidence": {
    "methodology": "Model niedyskontowany. Od sumy nakładów i kosztów eksploatacji odejmujemy wartość końcową.",
    "source_type": "author_model",
    "test_cases": [
      {
        "inputs": {},
        "expected": {
          "annual": 16000,
          "total": 190000,
          "hour": 19
        },
        "status": "MATCH"
      }
    ]
  },
  "commercial": {
    "access": "free",
    "paid_features_available": false
  },
  "action": {
    "mode": "human_web",
    "path": "/narzedzie-tco-maszyny/",
    "agent_execution": false
  },
  "governance": {
    "execution": "browser",
    "external_api": false,
    "privacy": "local processing; explicit local project save",
    "schema_version": "1.0.0"
  }
}
