Query all pages of a given type that are tagged with the tags of the current page

I am sharing this, it is the first advanced query I have designed & written, as I thought it would be very helpful for my workflow. It took me a lot of frustration as I think the resources around learning advanced queries are lacking. I also think discord is a terrible medium for sharing group knowledge, which is why I’m posting this here - anyway, here we are, presented in case its useful to others and/or for critique from those that know better.

I use a small, well-defined range of page types such as Source, Question, Statement, and Output.
I wanted to be able to create a new Question page, such as, “How can we design better onboarding for our game?”, give it tags:: onboarding, game design, tutorials and then quickly grab all Sources that relate to (any of) those tags. So here it is:

{:title "Sources for Current Page"
 (pull ?p [*])
 :in $ ?type ?currentpage
 [?cp :block/name ?currentpage]
 [?cp :block/tags ?ct]
 [?ct :block/name ?tag2]
 [?p :block/tags ?t]
 [?t :block/name ?tag1]
 [(= ?tag1 ?tag2)]
 [?p :block/name]
 [?p :block/properties ?prop]
 [(get ?prop :type) ?v]
 (or [(= ?v ?type)] [(contains? ?v ?type)])
:inputs ["Source" :current-page]