  A finite-dimensional ${\sf RCD}$ space can be foliated into sufficiently
regular leaves, where a differential calculus can be performed. Two important
examples are given by the measure-theoretic boundary of the superlevel set of a
function of bounded variation and the needle decomposition associated to a
Lipschitz function. The aim of this paper is to connect the vector calculus on
the lower dimensional leaves with the one on the base space. In order to
achieve this goal, we develop a general theory of integration of $L^0$-Banach
$L^0$-modules of independent interest. Roughly speaking, we study how to `patch
together' vector fields defined on the leaves that are measurable with respect
to the foliation parameter.
