The software sector lost $2 trillion in market cap. AI agents are replacing per-seat SaaS tools. Which categories die and which survive comes down to one question.