In the early days of the Buddhist order, there were no specific rules of conduct for monks. Whenever a dispute came up, someone would ask the Buddha his opinion. His answers were memorized by his followers and formed the first rules for the monks. By the end of his life there were hundreds of these rules, ranging from practical advice on maintaining good relations to weird stuff like whether or not it was a breach of decorum for a monk to run up a tree when being chased by an elephant (the Buddha said that it was okay).
---Brad Warner, in Don't Be a Jerk---