Text this: Variational theory of the Ricci curvature tensor dynamics