are we allowed to write notes in the code of the game to help explain certain things to the next dev?
I believe that if it is to explain how something that is developed works, fine.
What I think would be wrong is leaving comments explaining the general idea of the game or idea of mechanics that were not developed
Yep, that sounds right.