It’s called a Code of Conduct. It exists and is in use by many organisations, including several open-source projects.