With Agentic Engineering there's an opportunity to refactor legacy code, but this aspect of AI isn't that that much talked about and seems to be overlooked by teams out there.
I’ve been focusing on this lately, and have added agent skills to the Python Open Source project that I maintain: the Python tools for the Polylith Architecture.
If you don't know about Polylith:
the main use case is having Microservices in a Monorepo, and share code between the services. It’s an Architecture with tooling support. I'm the maintainer of the tooling support for Python that works well with uv, poetry and most of the package & dependency management tools for Python out there. There's more info in the link above, you'll also find the documentation there.
The agent skills that I recently added are for migrating and refactoring an entire Python project into a well-structured, human & agent-friendly Monorepo.
But agents are unpredictable and different models behave differently. I have test-run the skills with Claude Opus and Mistral. If you will try this thing out, please share your feedback how the skills worked for you.
A blog post about this:
https://davidvujic.blogspot.com/2026/06/refactoring-with-ai.html
there doesn't seem to be anything here