TITLE: Ordinary cohomology of stacks
QUESTION [14 upvotes]: Let $\mathbf{X}$ be a stack over $Top$ (a lax sheaf of groupoids, or some such thing). If it admits a surjective representable map $F \to \mathbf{X}$ then one can form the iterated fibre product to get a simplicial space $F_\bullet$, and its realisation $X$ is the homotopy type of $\mathbf{X}$, which comes with a (homotopy class of?) map $X \to \mathbf{X}$.
It seems that the reasonable thing to call the singular cohomology of $\mathbf{X}$ is the singular cohomology of its homotopy type, because the homotopy type is sufficiently unique for this to be well-defined.
On the other hand, consider the composition of functors
$$\mathbf{h}^i : Top \overset{H^i(-;\mathbb{Z})}\to AbGp \to Set \overset{inc}\to Gpd$$
where the middle functor is forgetful, and the last one is the inclusion of sets as groupoids with no non-identity morphisms. 
The stack $\mathbf{X}$ gives another functor $Top \to Gpd$, and one may consider the set $H^i$ of natural transformations $\eta : \mathbf{X} \to \mathbf{h}^i$. This set has the structure of an abelian group as one may add pointwise (as $\mathbf{h}^i$ factors through abelian groups).
Given any such $\eta$, we may apply it to the unique homotopy class of maps $X \to \mathbf{X}$ to obtain $\eta(X \to \mathbf{X}) \in H^i(X;\mathbf{Z})$ a cohomology class on the homotopy type. Any $Y \to \mathbf{X}$ factors up to homotopy through $X$, and so $\eta(Y \to \mathbf{X})$ is obtained by pullback from $\eta(X \to \mathbf{X})$. Thus it seems to me that the group $H^i$ is naturally isomorphic to $H^i(X;\mathbf{Z})$.
My first question, at last, is: is the group $H^i$ the correct notion of the cohomology of the stack $\mathbf{X}$, which happens to coincide with the cohomology of its homotopy type? Would it still be a reasonable definition on some terrible stack that does not admit an atlas?
Secondly: how does one do homology like this?
Thirdly: one can do the above over $Diff$ instead of $Top$, and use de Rham cohomology in the definition of $\mathbf{h}^i$. Then it seems the group one produces, call it $H^i_{dR}$ now, still makes sense, but the homotopy type of a stack over $Diff$ is not necessarily itself a manifold and does not necessarily have a de Rham theory. Is this a reasonable thing to do? Why is it not done this way (for example by Behrend)?
Fourthly: if, as I suspect, all this is known, where can I find it?

REPLY [5 votes]: Does this work for de Rham cohomology? 
Sure.  While the homotopy type of a stack in $Diff$ doesn't exactly have a de Rham complex, it does have a couple of things that work perfectly as substitutes.  Behrend uses the Cech-de Rham double complex from a particular choice of atlas.  The homotopy type of the stack is the geometric realisation of a simplicial manifold, and the Cech-de Rham double complex is made from the simplicial object in cochain complexes by taking the de Rham complex levelwise, so it really is the de Rham model for the simplicial manifold.
Alternatively, the homotopy type of the stack has a real homotopy type (which can be defined, for example, by taking Sullivan's PL forms with real coefficients).  On manifolds the  cohomology of the real homotopy type is of course naturally isomorphic to the de Rham cohomology.  Thus on stacks over $Diff$ the Cech-de Rham complex is a model for the real homotopy type.
What about K-theory?
This wasn't one of your questions, but as long as we are varying the cohomology theory, it's worth mentioning this.  The K-theory of a stack really is different from the K-theory of its homotopy type.  The simplest example is the stack $*/G$.  The K-theory of the stack is the G-equivariant K-theory of a point, but K-theory of the homotopy type is K(BG), which is of course the completion at the augmentation ideal by the Atiyah-Segal theorem.
I think that defining K-theory in terms of natural transformations $hom(-,\textbf{X}) \to K(-)$ just gives you the K-theory of the homotopy type.