You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.
If is a hyperdoctrine with at least products in the fiber categories, then there is a way of "freely" adding Lawvere-style comprehension to it. The base category is the Grothendieck construction of , with objects , and the fiber category is the Kleisli category of the comonad on : its objects are those of , while a morphism from to in is a morphism in . The comprehension of in this fiber category is . (If the categories are posets, then is equivalent to the slice .)
What is the best citation for this construction? The posetal case is described in detail in https://arxiv.org/abs/2108.03415 which says it is "recalled" from https://arxiv.org/abs/1206.0162. The latter in turn attributes it to Jacobs' 1999 book Categorical Logic and Type Theory but without any more specific reference, and I haven't been able to find it therein. Note that the question isn't just about the Grothendieck construction of a hyperdoctrine for a base category, but about the new hyperdoctrine that we can define over it.