Community Rule is a website containing templates of various governance structures and a simple interface for writing out your own governance structure. (Note: it is for all communities, not just open source projects.)
The website contains a guide for writing your first "rule", which is a good place to start.