I teach students to use their own imagination like generative AI. Prompting works. They just need a bit of practice.
This is one of the reasons why I do literate programming using org-mode. It's easy to lose track of what I was thinking when I wrote something, and what the original structure and goal was as I continue to write it. Org-mode helps me keep my thoughts in order in English and interlineate code in with them, then mash a key to spit out compilable source. I don't use it for everything, but it sure comes in handy when I do use it.