pub fn pick_tier(
signal: &ToolSignals,
mode: PickerMode,
confidence_threshold: f64,
) -> PickOutcomeExpand description
Decide a turn’s tier from its signal.
The rules run in order; the first that fires wins:
- Escalate — a hard reason to go capable (critical error / compaction).
- De-escalate — a hard reason to go cheap (a settled turn).
- Scorer — no hard reason, so weigh the two axes; if confident, follow it.
- Fall open — not confident: hand to the classifier, else the default.
Rules 1 and 2 are the two hard shortcuts that skip the scorer — one always escalates, one always de-escalates. Escalate is checked first, so a critical error still wins on a turn whose tests also happened to pass.
Deterministic and pure: the async classifier lives in the caller, so rule 4
returns PickOutcome::ConsultClassifier instead of calling it here. The
no_signal case (no tool activity yet) is handled one level up.