I don't understand what makes this a "code" search and replace tool as opposed to a general text search and replace tool (a la the many many existing options for such). I was kind of expecting some kind of AST structure or grammar spec or at least a quick tokenizer to be able to handle situations like "don't replace this text if it appears in a string constant", but it doesn't mention anything like that.
The tool you are describing is what I am trying to build at https://github.com/alexpovel/srgn . The idea is a compromise between regex (think ripgrep) and grammar awareness (through tree-sitter).
Yeah it doesn't look like this is AST-aware at all.
If you want to do queries that understand the grammar, https://github.com/getgrit/gritql is closer to what you're looking for. (Disclaimer: I'm the author.)
Ex. here's how you would search for your example of looking for a string unless it's inside a string constant. [0]
grit apply '"this_string" => `new_string` where $match <: not within string()'