Design a complete state machine for any stateful entity (order, transfer, payment, request, ticket, approval) — states, allowed transitions, actor per transition, conditions, side effects, and illegal transitions. Use when an entity's lifecycle needs to be unambiguous before implementation.