by dist-epoch · 11mo ago · 0 comments
This is 5% of what refactoring is, the rest is big scale re-architecting code where these tools are useless.
The agents can do this big scale architecturing if you describe exactly what you want.
IntelliJ has no moat here, because they can do well 5% of what refactoring is.
$x$.foo($args$)
Where you add filters like x's type is a subclass of some class, and args stands for 0-n arguments.You can also access the full intellij API via groovy scripts in the filters or when computing replacement variables, if you really want.
Though most of the time built in refactors like 'extract to _' or 'move to' or 'inline' or 'change type signature' or 'find duplicates' are enough.
- rename variable/function
- extract variable/function
- find duplicate code
- add/remove/extract function parameter
- inline a function
- moving code between classes
- auto imports
Others are used more rarely and can probably be left out but I do think it would save a lot of tokens, errors and time.https://gitlab.com/rhobimd-oss/shebe/-/blob/main/docs/guides...
https://gitlab.com/rhobimd-oss/shebe/-/tree/main?ref_type=he...
Then in skills or CLAUDE.md I instruct claude to use this mcp tool to enumerate all files need changing/updating.