D. to establish rules that a government must follow
The primary purpose of all constitutions is to set forth the fundamental principles and framework of government, including the rules that govern the operation of that government and the relationship between the government and its citizens. While some constitutions may also list citizens' rights or create systems of checks and balances, the overarching purpose is to provide a legal foundation for governance.