Jedi Code (Earth-2356)

The Jedi Code was a set of rules that governed the behavior of the Jedi Order and its many sects. It taught its followers to not give in to feelings of anger toward other lifeforms, which would help them resist fear and prevent them from falling to the dark side of the Force.

Amongst other dictates, the Jedi Code forbade Jedi Knights and Jedi Masters from taking on more than three Padawans at a given time; and forbade Jedi from marrying with members of different Jedi clans. Few understood that this practice of non-attachment did not mean the Jedi were strangers to compassion when, in fact, they believed that all lives were precious. The code also forbade the Jedi from killing unarmed opponents as well as seeking revenge.

During the Clone Wars, there were those in the Grand Army of the Republic, such as Wilhuff Tarkin, who believed that the Jedi Code prevented the Order from doing what was necessary to win the war against the Confederacy of Independent Systems and the Akatsuki. Shortly before the end of the Clone Wars, the Jedi High Council, through Obi-Wan Kenobi, asked Anakin Skywalker to spy upon the activities of his friend, Supreme Chancellor Sheev Palpatine, something which Skywalker felt was against the Jedi Code.

Source

 * https://starwars.fandom.com/wiki/Jedi_Code.