history
From 《史记·高祖本纪》 (Han dynasty). In 206 BCE, when Liu Bang (the future Han founder) entered the Qin capital Xianyang, he summoned the elders and announced: 与父老约,法三章耳;杀人者死,伤人及盗抵罪, 'I make this covenant with you: just three laws; murderers die, those who injure or steal are punished accordingly.' It replaced the brutal Qin code and won him the populace.
usage
Modern use is domesticated: any pair or group laying out a short list of basic rules - roommates, parents and children, joint-venture partners. The 'three' is conventional, not literal; you can have more or fewer items.