Skip to main content

gate_decision

Function gate_decision 

Source
pub fn gate_decision(score: f32) -> GateDecision
Expand description

Decide whether to inject the pack based on the codebase’s complexity score.

Two-tier gate:

  • score > HIGH_THRESHOLD: full pack
  • score > LOW_THRESHOLD: minimal map
  • else: skip

Thresholds calibrated against measured data:

  • reliary8 (complex, specific identifiers, tight coupling): score ≈ 6.4 → Full
  • quali (medium, simpler bodies): score ≈ 5.4 → Minimal
  • tokio (famous, similar score to quali): score ≈ 5.4 → Minimal (we can’t distinguish famous from private via index alone — the model’s training data exposure is external knowledge)