Thanks for posting this; I'm very interested in finding similar chunks of code in an AST-ish fashion, and using tree-sitter seems perfect.
For active projects I setup a weekly-ish 'code audit' agent: it runs treepeat to find opportunities to refactor and bumps up enforced coverage numbers. Over time for some projects I lower the '--similarity' threshold to more broadly find similar structured code (potentially more ambitious refactoring)