pullback of Lie algebra cocycles along Cartan connections For $H \hookrightarrow G$ an inclusion of Lie groups, with $\mathfrak{h} \hookrightarrow \mathfrak{g}$ the corresponding inclusion of Lie algebras, an $(H\hookrightarrow G)$-Cartan connection on a smooth manifold $X$ is a $G$-principal connection $\nabla$ on $X$ equipped with a reduction of its structure group to $H$ and such that at each point $x \in X$ the composite (for any local trivialization)
$$
  \phi_x
   : 
  T_x X 
   \stackrel{\nabla}{\longrightarrow}
  \mathfrak{g}
   \longrightarrow
  \mathfrak{g}/\mathfrak{h}
$$
is a linear isomorphism.
Now suppose that the inclusion is normal so that $\mathfrak{k} := \mathfrak{g}/\mathfrak{h}$ is a Lie algebra. Then for $\mu \in \mathrm{CE}^{n+1}(\mathfrak{k})$ an $H$-invariant Lie algebra $(n+1)$-cocycle on $\mathfrak{k}$ (hence an $L_\infty$-map $\mu : \mathfrak{k} \to \mathbb{R}[n]$), pullback of $\mu$ along $\phi$ produces a differential $(n+1)$-form $\phi^\ast \mu \in \Omega^{n+1}(X)$.
In the special case that $X = G/H$ and $\nabla$ is the Maurer-Cartan form, then this differential form is just the left-invariant extension of the cocycle over the Lie group, and is closed.
For general $X$ the form $\phi^\ast \mu$ is not in general closed. Asking it to be closed is akin to famous integrability conditions for differential form data, say in the definition of $G_2$-manifolds. 
I would like to know if this concept of pulling back Lie algebra cocycles along Cartan connections this way and asking the result to be closed has been considered in generality, and under which name.
Moreover, what I am really interested in is the generalization of this condition to the case that $\mathfrak{g}$ is an $L_\infty$-algebra, $\nabla$ a higher principal connection and $X$ a suitable smooth higher (derived) stack. For this case, has anything vaguely similar to the above general condition been considered and given a name?
 A: I am fairly certain that no one has considered pullbacks of Lie algebra cocycles in the context of Cartan geometries.
A: This is not an answer, just a comment that got a bit long. 
The closest to this I have ever come is the work of Calderbank and Diemer (http://arxiv.org/abs/math/0001158) from the realm of Cartan geometries modelled on a pair $(G,P)$ for a parabolic subgroup $P$. They start with finite-dimensional irreducible $\mathfrak{g}$-representation $\mathbb{V}$ and construct a homotopy transfer from the twisted deRham sequence (it is in general no longer a complex: $(d^\nabla)^2 s= R\cdot s$) on exterior forms with values in the bundle associated to $\mathbb{V}$ to bundles associated to Lie algebra homology of the nilradical of $\mathfrak{p}$ with values in $\mathbb{V}$. In this way some curved infinity structures arise on the sections of homology bundles, whose operators are actually multi-differential operators. These structures have not been much exploited yet. The good thing is that one always has some control over the kernel of  these operators between sections of homology bundles. E.g., there is an injection from the $\nabla$ parallel sections into the kernel of the operator acting on sections of the zeroth homology bundle with values in sections of the first homology bundle. In general, forms with values in $\mathcal{V}$ that are closed give rise to some special solutions of "geometric" differential equations.
I can provide more details and references if you are interested; I have a feeling I'm bit out of topic here. :)
