{
 "meta": {
  "name": "Leaflet/Leaflet",
  "url": "https://github.com/Leaflet/Leaflet",
  "slug": "leaflet-leaflet",
  "host": "github.com",
  "commit": "125bda1e24d74d6f06f4075b0dab7ac10f3b5c10",
  "committed_at": "2026-09-19T17:58:56+03:00",
  "evaluated_at": "2026-10-07T14:27:54+00:00",
  "neosloc": "0.8.0"
 },
 "report": {
  "schema_version": 2,
  "target": "https://github.com/Leaflet/Leaflet",
  "inventory": {
   "files": 1004,
   "source_files": 86,
   "source_tokens": 133792,
   "languages": {
    "javascript": 133792
   },
   "git": true
  },
  "surfaces": {
   "kinds": [
    "library"
   ],
   "evidence": {
    "library": [
     {
      "path": "package.json",
      "detail": "npm package"
     }
    ]
   },
   "long_running": [],
   "owns_data": [],
   "uses_credentials": []
  },
  "dimensions": [
   {
    "key": "interface",
    "title": "Interface surface",
    "level": 2,
    "rationale": "The public API is delimited (__all__, an exports map, exported identifiers).",
    "evidence": [
     {
      "signal": "L1 importable",
      "detail": "npm package",
      "path": "package.json",
      "weight": 1
     },
     {
      "signal": "L2 public-api",
      "detail": "package entry point",
      "path": "package.json",
      "weight": 1
     }
    ],
    "metrics": {
     "route_declarations": 0,
     "routes_by_framework": {},
     "spec_files": 0,
     "spec_operations": 0,
     "spec_coverage": null
    },
    "gaps": [
     "L3 The public API is statically typed (py.typed, type declarations, a typed language). (no py.typed or type declarations)"
    ],
    "question": "Can another program use it through a documented, machine-readable surface?",
    "best_surface": "library",
    "surfaces": {
     "library": {
      "level": 2,
      "first_missing": "typed",
      "requirements": [
       {
        "level": 1,
        "id": "importable",
        "text": "An importable, packaged API exists.",
        "met": true,
        "evidence": [
         {
          "path": "package.json",
          "detail": "npm package"
         }
        ],
        "note": ""
       },
       {
        "level": 2,
        "id": "public-api",
        "text": "The public API is delimited (__all__, an exports map, exported identifiers).",
        "met": true,
        "evidence": [
         {
          "path": "package.json",
          "detail": "package entry point"
         }
        ],
        "note": ""
       },
       {
        "level": 3,
        "id": "typed",
        "text": "The public API is statically typed (py.typed, type declarations, a typed language).",
        "met": false,
        "evidence": [],
        "note": "no py.typed or type declarations"
       },
       {
        "level": 4,
        "id": "api-reference",
        "text": "An API reference is generated from the code (autodoc, mkdocstrings, typedoc, \u2026).",
        "met": false,
        "evidence": [],
        "note": "no generated API reference"
       }
      ]
     }
    },
    "level_name": "partial",
    "applicable": true
   },
   {
    "key": "stability",
    "title": "Contract stability",
    "level": 2,
    "rationale": "A changelog exists and marks breaking changes.",
    "evidence": [
     {
      "signal": "L1 versioned-releases",
      "detail": "60 semver tags, latest v2.0.0-alpha.1",
      "path": null,
      "weight": 1
     },
     {
      "signal": "L2 changelog",
      "detail": "marks breaking changes",
      "path": "CHANGELOG.md",
      "weight": 1
     }
    ],
    "metrics": {},
    "gaps": [
     "L3 A deprecation mechanism is used in code (warnings, @deprecated, Deprecation/Sunset headers) or the API is versioned. (no deprecation mechanism or API versioning)"
    ],
    "question": "Can integrators rely on it not changing under them?",
    "best_surface": "all",
    "surfaces": {
     "all": {
      "level": 2,
      "first_missing": "deprecation",
      "requirements": [
       {
        "level": 1,
        "id": "versioned-releases",
        "text": "Releases are versioned (semver tags or versioned changelog sections).",
        "met": true,
        "evidence": [
         {
          "path": null,
          "detail": "60 semver tags, latest v2.0.0-alpha.1"
         }
        ],
        "note": ""
       },
       {
        "level": 2,
        "id": "changelog",
        "text": "A changelog exists and marks breaking changes.",
        "met": true,
        "evidence": [
         {
          "path": "CHANGELOG.md",
          "detail": "marks breaking changes"
         }
        ],
        "note": ""
       },
       {
        "level": 3,
        "id": "deprecation",
        "text": "A deprecation mechanism is used in code (warnings, @deprecated, Deprecation/Sunset headers) or the API is versioned.",
        "met": false,
        "evidence": [],
        "note": "no deprecation mechanism or API versioning"
       },
       {
        "level": 4,
        "id": "clean-history",
        "text": "Across tagged releases, no OpenAPI operation, CLI option or __all__ symbol was removed without first being deprecated.",
        "met": true,
        "evidence": [
         {
          "path": null,
          "detail": "20 tagged releases compared"
         }
        ],
        "note": ""
       }
      ]
     }
    },
    "level_name": "partial",
    "applicable": true
   },
   {
    "key": "events",
    "title": "Events",
    "level": null,
    "rationale": "Not applicable: no service and no long-running CLI mode (batch CLIs, libraries and desktop apps have no events).",
    "evidence": [],
    "metrics": {},
    "gaps": [],
    "question": "Can others react to state changes without polling?",
    "best_surface": null,
    "surfaces": {},
    "level_name": "n/a",
    "applicable": false
   },
   {
    "key": "identity",
    "title": "Identity",
    "level": null,
    "rationale": "Not applicable: uses no credentials and has no service surface.",
    "evidence": [],
    "metrics": {},
    "gaps": [],
    "question": "Can a machine act with its own revocable, least-privilege identity?",
    "best_surface": null,
    "surfaces": {},
    "level_name": "n/a",
    "applicable": false
   },
   {
    "key": "portability",
    "title": "Data portability",
    "level": null,
    "rationale": "Not applicable: owns no persistent data.",
    "evidence": [],
    "metrics": {},
    "gaps": [],
    "question": "Can its data get in and out, in bulk, in open formats, with an explicit schema?",
    "best_surface": null,
    "surfaces": {},
    "level_name": "n/a",
    "applicable": false
   },
   {
    "key": "ergonomics",
    "title": "Agent ergonomics",
    "level": 0,
    "rationale": "Not yet: Errors are specific exception types, and library code never calls sys.exit.",
    "evidence": [],
    "metrics": {},
    "gaps": [
     "L1 Errors are specific exception types, and library code never calls sys.exit. (no exception classes)"
    ],
    "question": "Can an automated caller use it without guessing, and recover from failure?",
    "best_surface": "library",
    "surfaces": {
     "library": {
      "level": 0,
      "first_missing": "typed-exceptions",
      "requirements": [
       {
        "level": 1,
        "id": "typed-exceptions",
        "text": "Errors are specific exception types, and library code never calls sys.exit.",
        "met": false,
        "evidence": [],
        "note": "no exception classes"
       },
       {
        "level": 2,
        "id": "validation",
        "text": "Inputs are validated with messages naming the bad argument.",
        "met": true,
        "evidence": [
         {
          "path": "src/map/Map.js",
          "detail": "5 matches"
         },
         {
          "path": "src/core/Util.js",
          "detail": "1 match"
         },
         {
          "path": "src/geo/LatLng.js",
          "detail": "1 match"
         },
         {
          "path": "src/geometry/LineUtil.js",
          "detail": "1 match"
         },
         {
          "path": "src/geometry/Point.js",
          "detail": "1 match"
         },
         {
          "path": "src/geometry/PolyUtil.js",
          "detail": "1 match"
         },
         {
          "path": "src/layer/DivOverlay.js",
          "detail": "1 match"
         },
         {
          "path": "src/layer/GeoJSON.js",
          "detail": "1 match"
         },
         {
          "path": "src/layer/Layer.js",
          "detail": "1 match"
         },
         {
          "path": "src/layer/marker/Icon.js",
          "detail": "1 match"
         },
         {
          "path": "src/layer/tile/GridLayer.js",
          "detail": "1 match"
         },
         {
          "path": "src/layer/vector/Circle.js",
          "detail": "1 match"
         },
         {
          "path": "src/layer/vector/Polygon.js",
          "detail": "1 match"
         },
         {
          "path": "src/layer/vector/Polyline.js",
          "detail": "1 match"
         }
        ],
        "note": ""
       },
       {
        "level": 3,
        "id": "timeouts-retries",
        "text": "Timeouts and retries are configurable.",
        "met": false,
        "evidence": [],
        "note": "no retry parameter"
       },
       {
        "level": 4,
        "id": "agent-ready",
        "text": "Agent docs, and examples that run as tests (doctests).",
        "met": false,
        "evidence": [],
        "note": "no agent docs"
       }
      ]
     }
    },
    "level_name": "absent",
    "applicable": true
   },
   {
    "key": "embeddability",
    "title": "Embeddability",
    "level": 3,
    "rationale": "Published to a public registry, with at most 10 runtime dependencies.",
    "evidence": [
     {
      "signal": "L1 importable",
      "detail": "npm package",
      "path": "package.json",
      "weight": 1
     },
     {
      "signal": "L2 installable",
      "detail": "package manifest",
      "path": "package.json",
      "weight": 1
     },
     {
      "signal": "L3 published-minimal",
      "detail": "1 match",
      "path": ".github/workflows/main.yml",
      "weight": 1
     }
    ],
    "metrics": {},
    "gaps": [
     "L4 Optional features behind extras/features. (no optional extras)"
    ],
    "question": "Can another system run and compose it without a human?",
    "best_surface": "library",
    "surfaces": {
     "library": {
      "level": 3,
      "first_missing": "optional-features",
      "requirements": [
       {
        "level": 1,
        "id": "importable",
        "text": "Importable from source.",
        "met": true,
        "evidence": [
         {
          "path": "package.json",
          "detail": "npm package"
         }
        ],
        "note": ""
       },
       {
        "level": 2,
        "id": "installable",
        "text": "Installable as a package (a package manifest).",
        "met": true,
        "evidence": [
         {
          "path": "package.json",
          "detail": "package manifest"
         }
        ],
        "note": ""
       },
       {
        "level": 3,
        "id": "published-minimal",
        "text": "Published to a public registry, with at most 10 runtime dependencies.",
        "met": true,
        "evidence": [
         {
          "path": ".github/workflows/main.yml",
          "detail": "1 match"
         },
         {
          "path": null,
          "detail": "0 runtime dependencies"
         }
        ],
        "note": ""
       },
       {
        "level": 4,
        "id": "optional-features",
        "text": "Optional features behind extras/features.",
        "met": false,
        "evidence": [],
        "note": "no optional extras"
       }
      ]
     }
    },
    "level_name": "solid",
    "applicable": true
   },
   {
    "key": "extensibility",
    "title": "Extensibility",
    "level": 0,
    "rationale": "Not yet: Internal seams: a registry, registration function or plugin manager.",
    "evidence": [],
    "metrics": {},
    "gaps": [
     "L1 Internal seams: a registry, registration function or plugin manager. (no registry or registration function)"
    ],
    "question": "Can behaviour be added without modifying the code?",
    "best_surface": "all",
    "surfaces": {
     "all": {
      "level": 0,
      "first_missing": "seams",
      "requirements": [
       {
        "level": 1,
        "id": "seams",
        "text": "Internal seams: a registry, registration function or plugin manager.",
        "met": false,
        "evidence": [],
        "note": "no registry or registration function"
       },
       {
        "level": 2,
        "id": "documented",
        "text": "The docs show how to add behaviour through those seams (even in-tree).",
        "met": false,
        "evidence": [],
        "note": "no registration functions to document"
       },
       {
        "level": 3,
        "id": "out-of-tree",
        "text": "Out-of-tree extensions are discovered (entry points, a plugin directory, configuration) without editing the package.",
        "met": false,
        "evidence": [],
        "note": "extensions must be added inside the package"
       },
       {
        "level": 4,
        "id": "versioned-api",
        "text": "The extension API is versioned, has lifecycle hooks, and has example extensions.",
        "met": false,
        "evidence": [],
        "note": "the extension API isn't versioned"
       }
      ]
     }
    },
    "level_name": "absent",
    "applicable": true
   },
   {
    "key": "observability",
    "title": "Observability",
    "level": 0,
    "rationale": "Not yet: Logs through a standard logger namespace and never prints from library code.",
    "evidence": [],
    "metrics": {},
    "gaps": [
     "L1 Logs through a standard logger namespace and never prints from library code. (no standard logger)"
    ],
    "question": "Can an operator, or an orchestrating agent, tell whether it works and why not?",
    "best_surface": "library",
    "surfaces": {
     "library": {
      "level": 0,
      "first_missing": "standard-logger",
      "requirements": [
       {
        "level": 1,
        "id": "standard-logger",
        "text": "Logs through a standard logger namespace and never prints from library code.",
        "met": false,
        "evidence": [],
        "note": "no standard logger"
       },
       {
        "level": 2,
        "id": "log-levels",
        "text": "Log levels are used meaningfully (at least two levels).",
        "met": false,
        "evidence": [],
        "note": "fewer than two log levels used"
       },
       {
        "level": 3,
        "id": "hooks",
        "text": "Optional metrics or tracing hooks.",
        "met": false,
        "evidence": [],
        "note": "no metrics or tracing hooks"
       },
       {
        "level": 4,
        "id": "otel",
        "text": "OpenTelemetry instrumentation available.",
        "met": false,
        "evidence": [],
        "note": "no OpenTelemetry instrumentation"
       }
      ]
     }
    },
    "level_name": "absent",
    "applicable": true
   },
   {
    "key": "legibility",
    "title": "Change legibility",
    "level": 2,
    "rationale": "CI runs the tests; applications pin dependencies (libraries and zero-dependency projects are exempt).",
    "evidence": [
     {
      "signal": "L1 readme-tests",
      "detail": "",
      "path": "README.md",
      "weight": 1
     },
     {
      "signal": "L2 ci-pinned",
      "detail": "",
      "path": ".github/workflows/main.yml",
      "weight": 1
     }
    ],
    "metrics": {
     "source_files": 86,
     "source_tokens": 133792,
     "test_files": 52,
     "test_tokens": 111245,
     "test_ratio": 0.83,
     "modules": 16,
     "modules_within_budget": 1.0,
     "oversized_files": [
      "debug/vector/us-states.js",
      "src/map/Map.js"
     ],
     "largest_module": {
      "path": "debug/vector",
      "tokens": 31031
     },
     "typed_ratio": 0.0,
     "python_functions": 0,
     "python_annotated": 0,
     "import_edges": 258,
     "import_graph": true,
     "max_fan_out": 12,
     "import_cycles": 3,
     "largest_cycle": [
      "src/geo/LatLng.js",
      "src/geo/LatLngBounds.js",
      "src/geo/crs/CRS.js",
      "src/geo/crs/EarthCRS.js"
     ],
     "languages": {
      "javascript": 133792
     }
    },
    "gaps": [
     "L3 At least 90% of modules fit 32k tokens and no file exceeds 12k; test/source token ratio at least 0.3; at least 70% of the code is typed. (100% of modules fit 32k tokens; 2 files over 12k; 0% of code is typed (< 70%))"
    ],
    "question": "Can an agent change it safely with limited context?",
    "best_surface": "all",
    "surfaces": {
     "all": {
      "level": 2,
      "first_missing": "fits-and-verified",
      "requirements": [
       {
        "level": 1,
        "id": "readme-tests",
        "text": "A README and some tests.",
        "met": true,
        "evidence": [
         {
          "path": "README.md",
          "detail": ""
         },
         {
          "path": "spec/setup.js",
          "detail": "52 test files"
         }
        ],
        "note": ""
       },
       {
        "level": 2,
        "id": "ci-pinned",
        "text": "CI runs the tests; applications pin dependencies (libraries and zero-dependency projects are exempt).",
        "met": true,
        "evidence": [
         {
          "path": ".github/workflows/main.yml",
          "detail": ""
         },
         {
          "path": null,
          "detail": "library or zero-dependency project: lockfile not required"
         }
        ],
        "note": ""
       },
       {
        "level": 3,
        "id": "fits-and-verified",
        "text": "At least 90% of modules fit 32k tokens and no file exceeds 12k; test/source token ratio at least 0.3; at least 70% of the code is typed.",
        "met": false,
        "evidence": [],
        "note": "100% of modules fit 32k tokens; 2 files over 12k; 0% of code is typed (< 70%)"
       },
       {
        "level": 4,
        "id": "acyclic-documented",
        "text": "No import cycles, and agent docs (AGENTS.md, CLAUDE.md, llms.txt).",
        "met": false,
        "evidence": [],
        "note": "3 import cycles (largest: src/geo/LatLng.js, src/geo/LatLngBounds.js, src/geo/crs/CRS.js)"
       }
      ]
     }
    },
    "level_name": "partial",
    "applicable": true
   }
  ],
  "estimate": {
   "integrability_index": 1.29,
   "assessed_dimensions": 7,
   "not_applicable": [
    "events",
    "identity",
    "portability"
   ],
   "retrofit_person_days": 15.7,
   "retrofit_by_dimension": {
    "interface": 2.2,
    "stability": 0.7,
    "ergonomics": 3.3,
    "embeddability": 0.0,
    "extensibility": 4.4,
    "observability": 2.2,
    "legibility": 2.9
   },
   "wrappability": "moderate retrofit",
   "assumptions": {
    "target_level": 3,
    "size_factor": 0.73,
    "legibility_multiplier": 1.0,
    "reference_tokens": 250000
   }
  },
  "not_implemented": [],
  "value": {
   "ksloc": 12.57,
   "classic": {
    "person_months": 34.24,
    "schedule_months": 9.6,
    "cost": 385461
   },
   "capture": {
    "tests": 1.0,
    "contract": 0.5,
    "docs": 1.0,
    "capture": 0.88
   },
   "agent_factor": 0.15,
   "reproduce_pm": 5.27,
   "history": {
    "commits": 6688,
    "fix_commits": 1468,
    "authors": 1032,
    "age_months": 192.6,
    "months_since_last": 0.6
   },
   "knowledge_pm": 62.8,
   "rediscover_pm": 7.54,
   "replacement_pm": 12.81,
   "leverage": 0.91,
   "obsolescence": 0.95,
   "value_pm": 11.08,
   "value_cost": 124755,
   "knowledge_at_risk": 0.59,
   "assumptions": {
    "salary": 56286,
    "overhead": 2.4,
    "cost_per_pm": 11257,
    "floor": 0.1,
    "rediscover_share": 0.5,
    "fix_pm": 0.025,
    "change_pm": 0.005
   }
  },
  "make_or_buy": {
   "verdict": "buy",
   "make_buy_ratio": 271.151,
   "horizon_years": 3.0,
   "break_even_price_per_year": 42465.89,
   "make": {
    "model": "anthropic:claude-opus-5-5",
    "tokens": {
     "output": 739927,
     "input": 18498175,
     "cached_input": 15723448
    },
    "final_tokens": 246642,
    "model_cost": 29.04,
    "agent_hours": 8.22,
    "human_days": 164.46,
    "review_days": 6.12,
    "rediscover_days": 158.34,
    "calendar_days": 164.46,
    "build_cost": 88185.68,
    "yearly_cost": 13227.85,
    "total_cost": 127869.24
   },
   "buy": {
    "via": {
     "install": "library",
     "use": "library"
    },
    "adoption_minutes": {
     "install": 2,
     "first_use": 60.0,
     "total": 62.0
    },
    "tokens": {
     "output": 7750,
     "input": 193750,
     "cached_input": 164687
    },
    "model_cost": 0.3,
    "upgrade_minutes_per_year": 120,
    "measured": null,
    "price_per_year": 0.0,
    "fixed_cost": 69.54,
    "yearly_cost": 134.01,
    "total_cost": 471.58
   },
   "assumptions": {
    "day_rate": 536.05,
    "draft_factor": 3.0,
    "context_ratio": 25.0,
    "cached_share": 0.85,
    "review_tokens_per_day": 50000,
    "spec_difficulty": 2.0,
    "maintenance_share": 0.15,
    "model_priced": true
   }
  },
  "agentic": null,
  "review": null,
  "spend": null
 }
}
