Let (X, OX) be a ringed space. Let π : C —> X be a stack over X where we use the topology on X to view X as a site. Endow C with the topology inherited from X (see Definition 06NV). This (roughly) means that the fibre categories CU where U ⊂ X is open are endowed with the chaotic topology. Denote B = π -1OX and think of C as a ringed site and π as a morphism of ringed sites
π : (C, B) —-> (X, OX)
The functor π* = π -1 : Mod(OX) —> Mod(B) commutes with all limits and colimits on modules and hence has a left adjoint π! : Mod(B) —> Mod(OX). In fact, if F is a sheaf of B-modules on C, then we can describe π!F as the sheaf associated to the presheaf
U |—> colimξ in opposite of CU F(ξ)
on the topological space X. (Colimit taken in category OX(U)-modules.) Actually, it turns out that the situation above is a special case of this section of the Stacks project and we obtain a left derived extension Lπ! : D(B) —> D(OX) for free (note there are no boundedness assumptions).
In fact, the construction shows a little bit more. Namely, let ξ be an object of C lying over the open U ⊂ X. Then we can consider the localization morphism jξ : C/ξ —> C and the sheaf Oξ = jξ, !B|ξ. Any B-module is a quotient of a direct sum of these Oξ and we have
Lπ! Oξ = π! Oξ
Cool, so this gives us a bit of control in trying to compute Lπ!.
Let x be a point of X. Let Cx denote the category
colimx ∈ U ⊂ X CU
This makes sense as C is a stack over X so we can think of it as a sheaf of categories. If F is a sheaf of B-modules on C, then the stalk of π!F is just the colimit of the “values” of F over Cx. Since taking stalks is exact, I think this should mean that we can compute the stalk of Lπ!F at x by taking the corresponding construction over the category Cx with its chaotic topology.
Another tool to compute Lπ! should be that if C is given as the stackification of a category C‘ fibred over X, then it should be sufficient to compute with C‘. Going back to the discussion and especially the example in this post we have to replace our choice of C there. We should start with the fibred category C‘ of immersions φ : U —> AnB (not necessarily closed) and commutative diagrams over B. Then C should be the stackification of that. Then with all of the above you’d get the cotangent complex of X/B by doing the same construction as in the affine case. The key is that affine locally C‘ has a good co-simplicial object computing the derived lower shriek functor. You use the localization of sheaves of algebras construction to provide C with a sheaf of rings surjecting onto the pullback of the structure sheaf of X (and not to change the underlying category).
A similar procedure is going to define the base change CS given a morphism of schemes S —> B, i.e., as underlying fibred category start with some category of diagrams of schemes and use the localization of sheaves of algebras construction to endow this with a structure sheaf.
I think this will just work and in fact it simplifies the original idea I had for the stacks C and CS. We’ll see.