v0.4.5 — structural_violation smell, two-tier complexity, structural integrity docs
Structural integrity
New: structural_violation smell
borescope smells now reports structural_violation when a function exceeds hard structural limits — regardless of hotspot score or fanin count:
- complexity > 22 (cyclomatic complexity absolute limit)
- loc > 200 (per-function LOC absolute limit)
This is distinct from high_complexity_bottleneck which requires complexity + fanin + hotspot to all exceed thresholds simultaneously. A cold function with complexity 32 won't trigger the bottleneck smell but will trigger structural_violation.
Two-tier threshold design
# .borescope/thresholds.toml
[default]
# Hard structural limits — structural_violation fires regardless of hotspot/fanin
complexity_absolute = 22
loc_high = 200
# Compound bottleneck — needs ALL THREE conditions
complexity_high = 10
fanin_high = 8
hotspot_medium = 0.5Docs: structural integrity section in patterns.md
Every heuristic now has:
- What it measures (with Wikipedia/research reference)
- The absolute target value
- The borescope command that surfaces it
- Clear separation of what borescope covers vs. external tools (tarpaulin, cargo-mutants)
'Quality heuristics' renamed to 'Structural integrity' throughout — these are objective structural properties, not style preferences.