So what does this mean for this specific PR? Should the query API take the possibility of an AST into account?
AST represents the entire code not just tags. A tag listing seems to be probably to remain a list. I could imagine that tags become tree-like (via scope relationship) but I'm not sure the query API is concerned. In a tag tree world it would return a list of subtrees, no?