Is there a Stokes theorem for covariant derivatives? A $V$-valued differential $n$-form $\omega$ on a manifold $M$ is a section of the bundle $\Lambda^n (T^*M) \otimes V$. (That is, the restriction $\omega_p$ to any tangent space $T_p M$ for $p \in M$ is a completely antisymmetric map $\omega_p : T_p M \times T_p M \times \cdots \times T_p M \to V$.) $V$ is a vector space here.
One can define a flat covariant derivative $\mathrm{d}\colon \Lambda^n (T^*M) \to \Lambda^{n+1} (T^*M)$ which is just the exterior derivative. It fulfills Stokes' theorem.
Assume now an algebra structure on $V$, and a representation $\rho$ of $V$ on a vector space $W$.
For a chosen $V$-valued differential 1-form $\omega$, there is also a covariant derivative (like a principal connection) that acts on all $W$-valued differential forms $\phi$ by the formula $\mathrm{d}_\omega \phi := \mathrm{d} \phi + \omega \wedge_\rho \phi$. The product $\wedge_\rho$ is the composition of $\wedge$, which multiplies a $V$-valued $n$-form and a $W$-valued $m$-form to a $V \otimes W$-valued $(n+m)$-form, and $\rho$.
Is there a generalisation for Stokes' theorem for $\mathrm{d}_\omega$? Maybe something like $\int_M \mathrm{d}_\omega \phi = \int_{\partial M}  \phi$ up to terms proportional to the curvature of $\mathrm{d}_\omega$?
 A: On 1-dimensional manifolds, this is just the holonomy (for circles) or parallel transport (for intervals). One integrates the connection with the path-ordered exponential.
It seems that there is a Stokes' theorem for higher gauge theory: There is a notion of 2-holonomy of surfaces for 2-connections, see for example An Invitation to Higher Gauge Theory or Nonabelian Multiplicative Integration on Surfaces.
A: I am no mathematician, but I have studied differential forms and covariant derivatives enough that I think I have a good foundation on the subject. I see a vector (or p-form) in curved space as a tensor with a basis that changes from point to point. Therefore, when you take the derivative, you should not just take the derivative of the tensor, but apply the product rule and take the derivative of the basis as well. This leads to the Misner, Thorn and Wheeler definition of the Christoffel symbols: $\nabla_ie_j=\Gamma^k_{ji}e_k$ (with $e_i$ and $e_k$ being basis vectors). One can define the exterior covariant derivative as the exterior derivative plus the product rule applied to the basis. So the exterior covariant derivative acts on magnitudes and directions (or dual directions) while the exterior derivative just acts on magnitudes. The exterior covariant derivative reduces to the covariant derivative when the bases are constant.
From this perspective, Stokes' theorem should apply to the exterior covariant derivative in curved space and flat space, but not to the exterior derivative in curved space. So by my logic, Stokes' theorem should be considered a property of the exterior covariant derivative and the version involving the regular exterior derivative is just a special case that only applies to flat space.
A: I'm pretty rusty on this topic, so I may be getting things wrong or misunderstanding parts of the question, but as far as I understand your setting is essentially that of a vector bundle with fibre $W$, with $\omega$ defining an affine connection on it.
Since you have $W$ defined with a global basis, the integral $\int_U \psi $ actually makes sense for $U\subset M$ of dimension $m$ and $\psi\in\Lambda^m(TM,W)$. However, from the perspective of a vector bundle, this basis is completely arbitrary, and completely independent of the connection defined by $\omega$ (although the representation of the connection in terms of $\omega$ does depend on this choice of global basis).
However, this does mean that even if the curvature is zero, $\omega$ can be non-zero. You may note that
$$
\int_M d_\omega\phi
= \int_M d\phi+\omega\wedge_\rho\phi
= \int_{\partial M}\phi + \int_M \omega\wedge_\rho\phi
$$
so you're basically asking what can be said about $\int_M \omega\wedge_\rho\phi$, and this is not bound by the curvature of $d_\omega$.
