bento-hotspots
Hotspots
Metrics rank candidates; reading the code decides. A 60-line function can be fine and a 20-line one tangled. Never change code just to move a number.
Repo layer first. Read the repo's AGENTS.md/CLAUDE.md and, if it exists, the
overlay .agents/bento/bento-hotspots.md at the repo root; follow it under the
overlay rules.
Run from inside the repo: uv run <this skill>/scripts/hotspots.py (or pipx run).
Both read the script's inline lizard dependency. If they can't fetch it (offline), run the
script with any Python that already has lizard, such as the repo's .venv/bin/python, or
pip install lizard first. Never estimate the metrics by hand: if nothing runs, say the scan
didn't run. The script measures, per function: nloc, ccn (cyclomatic), cognitive
(Sonar cognitive complexity), nesting and params. Its limits are 50 / 10 / 15 / 3 / 5,
plus 500 NLOC per file. Pass paths to narrow the scan. Generated code (dist/, build/,
*.min.js, *.d.ts), vendored code, test data (fixtures/, testdata/) and untracked
files are skipped.