The first version of my Kubernetes Operator worked.

It was built for one database platform, for one customer problem, and it did exactly what it needed to do. But it was concrete all the way down: tightly coupled, not extensible, and impossible to test without live infrastructure.

If I wanted to support other database platforms, I'd have to refactor the entire core. Replace concretes with interfaces. Restructure the codebase so logic could be reused across implementations.

This is the part of AI-assisted development that nobody talks about. Not the greenfield build, but what happens next. Taking production code and making it better without breaking it.

Here's the workflow I used.