Let $M$ be a compact manifold, $G$ a compact Lie group, $P\to M$ a principal $G$-bundle and $A$ a flat principal connection on $P$. Then $(\Omega^\bullet(M;\operatorname{ad}P),d_A)$ forms a cochain complex, where $$d_A\beta=h^*d\beta=d\beta+\dot\rho(A)\wedge\beta$$ where $h:TP\to TP$ is the projection onto the distribution of horizontal planes associated to $A$.
What is known about the (co)homology of this complex? I'm trying to work it out, and I start to have some vague ideas, but if anyone could give me some directions about how to proceed, or a reference where this can be found I would be grateful.
I will update this post with my progress and my open questions as I find new stuff.
What I've found for now:
If $A$ is flat, then the associated distribution of horizontal planes is integrable, and thus $P$ is foliated by horizontal leaves $\{M_t\}_t$.
Q: $M_t$ for the leaves is my own notation. Do the $M_t$ have any well defined relation with the base manifold $M$?
We can identify elements of $\Omega^k(M;\operatorname{ad}P)$ with basic forms $\beta\in\Omega^k(P)\otimes\mathfrak{g}$. So take such a $\beta$. If it is closed with respect to the standard exterior derivative $d$, then it is closed with respect to $d_A$: $$d\beta = 0\Rightarrow d_A\beta = h^*d\beta = 0.$$ We also notice that $d_A\beta = h^*d\beta = 0$ is equivalent to say that $d\beta$ only acts on vertical vectors.
Q: Does this imply that $\beta$ is somehow "constant" on the horizontal leaves $M_t$? Maybe something like $\mathcal{L}_X\beta = 0$ for horizontal vector fields? (Note: I tried the computation, but didn't get anywhere. I didn't try really hard though...)