Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@მამუკაჯიბლაძე I think a standard reference is the book "Dirichlet branes and mirror symmetry" edited by Douglas and Gross. For something shorter, there are also Paul Aspinwall's notes "D-Branes on Calabi-Yau manifolds".
I am not aware of a "nice" embedding functor of diffeological spaces into locally ringed spaces. However, maybe you find the framework of $C^\infty$-rings and locally $C^\infty$-ringed spaces helpful; see, for instance, the book "Smooth infinitesimal analysis" by Moerdijk and Reyes, as well as Dominic Joyce's arxiv.org/abs/1001.0023v7.
Yes, you can interpret the QFT anomaly, or at least the chiral anomaly, as the Chern class in $H^2(\mathcal{A}/\mathcal{G};\mathbb{Z})$. There are more anomalies which have different descriptions, for instance they do not have to live on a space $\mathcal{A}/\mathcal{G}$ of gauge equivalence classes.