Yes, I do things like this too. Planning works great, but the same is true for making write-ups after completing a task. In this case you'd ask the agent to write up a document with all the rules for your refactoring based on the current thread (where you have discovered the rules with the agent as you go). Let it include examples and let it pause and report back to you if it comes across a situation that isn't fully covered by the current rules yet so you can review it ,update the rules, and then let it continue
reply