codify
To codify is to create a system or code for something. This can be done in a number of ways, including by making a list of all the rules, by creating a dictionary, or by creating a set of guidelines.
The government is codifying the law, which is why it's so difficult to change it.
The company is codifying the rules of the game, which is why it's so difficult to cheat.