  The solution of Bethe ansatz equations for XXZ spin chain with the parameter
$q$ being a root of unity is infamously subtle. In this work, we develop the
rational $Q$-system for this case, which offers a systematic way to find all
physical solutions of the Bethe ansatz equations at root of unity. The
construction contains two parts. In the first part, we impose additional
constraints to the rational $Q$-system. These constraints eliminate the
so-called Fabricius-McCoy (FM) string solutions, yielding all primitive
solutions. In the second part, we give a simple procedure to construct the
descendant tower of any given primitive state. The primitive solutions together
with their descendant towers constitute the complete Hilbert space. We test our
proposal by extensive numerical checks and apply it to compute the torus
partition function of the 6-vertex model at root of unity.
