It looks like tagging is more powerful than I initially thought. See, e.g., Tagging files from the macOS command line or A little tagging automation. #apple