by @nguyenthienthanh
CRITICAL: MUST run for EVERY message. Detects agent, complexity, AND model automatically. Always runs FIRST.