I have a specific question about defining the composition in (locally) ringed spaces.
The definition I had formulated myself while reading Hartshorne, since he conveniently neglected to suggest any such definition, was identical to
https://math.stackexchange.com/a/611617/299525
The $g_* (f^\#)$ is somewhat strange at first, but when one writes down all the domains and codomains and tries to draw the arrows, it works out very nicely. However, I just now observed that the Stacks Project has what I would have guessed would be the correct definition initially, namely $f^\# \circ g^\#$. Yet attempting to draw the arrows has a clear mismatch.
$$g^\# : \mathcal{O}_Z \to g_* \mathcal{O}_Y$$
while
$$f ^\#: \mathcal{O}_X \to f_* \mathcal{O}_X$$
Can one somehow identify $g_* \mathcal{O}_Y$ or is the Stacks Project assuming that its reader will identify $f^\# \circ g^\#$ as $g_* (f^\#) \circ g^\#$?