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?