I used that example as it was easy, but I could also have said: "we should be able to say: when the user is logged in and clicks on submit, then create a new apartment" (you'll have recognized airbnb...) My point being it could be much more complicated than turning button to red.
Most people try to solve the issue with AI. I think it's one of the reasons why we haven't solved that problem (making programming more approachable) yet. I'd argue the first step is to make that it's readable in plain english. If we have this, then we can start thinking about AI. Why don't you have a look at Bubble (bubble.is). That's our approach