Do see the thread that @Nige_S linked to: It contains a Keyboard Maestro skills file, which is what you need to create in order for your AI helper to remember key things about writing Keyboard Maestro macros for you. To save you reading back, here's the topic:
https://forum.keyboardmaestro.com/t/a-coding-agent-skill-which-helps-me-to-create-macros/51827
The skills file tells your AI helper many of the details about how to build Keyboard Maestro macros. You can start with the one there, then edit it to change things based on how you want Keyboard Maestro to work—it's just a pure text file. Even better, you can tell your AI agent to update it: "Update the skills file to include what you just learned about semaphore locks," for instance.
-rob.