Enhancing software engineering practices with generative AI: A framework for automated code synthesis and refactoring | Synapse