  We establish, in a rather general setting, an analogue of DiPerna-Lions
theory on well-posedness of flows of ODE's associated to Sobolev vector fields.
Key results are a well-posedness result for the continuity equation associated
to suitably defined Sobolev vector fields, via a commutator estimate, and an
abstract superposition principle in (possibly extended) metric measure spaces,
via an embedding into $\mathbb{R}^\infty$.
  When specialized to the setting of Euclidean or infinite dimensional (e.g.
Gaussian) spaces, large parts of previously known results are recovered at
once. Moreover, the class of ${\sf RCD}(K,\infty)$ metric measure spaces object
of extensive recent research fits into our framework. Therefore we provide, for
the first time, well-posedness results for ODE's under low regularity
assumptions on the velocity and in a nonsmooth context.
