The warrior code

The Warrior Code is a list of fifteen different rules that should be followed by all Clan cats. It is taught from the first means of kithood to when an elder is faced with death. It is said that, as long as the Clans follow the warrior code, no harm shall come to them.

History
There is a disagreement about the origins of the Warrior Code. On one hand, Secrets of the Clans states that the rules were invented when the Clans were founded, made up by the leaders Thunder, Shadow, Wind and River. On the other hand, Code of the Clans states that the rules were developed during a very long timespan, each one invented by different cats after a significant event.

The Warrior Code
The Warrior Code :

1. Defend your Clan, even with your life. You may have friendships with cats from other Clans, but your loyalty must remain to your Clan. As one day you may meet them in battle.

2. Do not hunt or trespass on another Clan's territory.

3. Elders, Queens, and kits must be fed before apprentices and warriors. Unless they have permission, apprentices may not eat until they have hunted to feed the elders. If any warrior or apprentice is sick or injured, they may eat while the elders, queens, and kits are eating.

4. Prey is killed only to be eaten. Give thanks to StarClan for its life.

5. A kit must be at least six moons old to become an apprentice.

6. Newly appointed warriors will keep a silent vigil for one night after receiving their warrior name.

7. A cat cannot be made deputy without having mentored at least one apprentice.

8. The deputy will become Clan leader when the leader dies or retires.

9. After the death or retirement of the deputy, the new deputy must be chosen before moonhigh.

10. A Gathering of all four Clans is held at the full moon during a truce that lasts for the night. There shall be no fighting among Clans at this time.

11. Boundaries must be checked and marked daily. Challenge all trespassing cats.

12. No warrior can neglect a kit in pain or danger, even if the kit is from a different Clan.

13. The word of the Clan leader is the warrior code.

14. An honorable warrior does not need to kill other cats to win his/her battles, unless they are outside the warrior code or it is necessary for self-defense.

15. A warrior rejects the soft life of a kittypet.

Exceptions

 * Cats on their way to the Moonstone or Moonpool are allowed to cross other Clans' territories to get to their destination - WindClan grounds in on the moorland and ThunderClan grounds by the lake, in the forest.
 * At the lake, cats may travel on other Clans' grounds as long as they are within two fox-lengths of the lake; for instance, to go to a Gathering.

Additional Rules
The following rule is not part of the Warrior Code, but is always followed:
 * Medicine cats may not have a mate or kits.
 * Kits must stay in camp until they are apprenticed.

Rejected Codes
Throughout history, several other rules were proposed for introduction into the Warrior Code, however, they were turned down. These rules were:
 * Only cats of pure forest blood can be Clan members (suggested by Featherstar of WindClan).
 * Each Clan may only eat the prey they are most suited for (suggested by Robinstar of SkyClan).
 * All Clan cats must believe in StarClan (suggested by Dovestar of RiverClan).

Breaking the Warrior Code
The rules are often broken. All of the Clans break the rules many times although ThunderClan is the Clan that questions and debates the Code the most.

Examples of breaking the Warrior Code

 * Rule 1 was broken by Graystripe when he was torn between his loyalties to ThunderClan and RiverClan due to his relationship with Silverstream, and refused to fight her. This rule was also broken by Bluestar when she fell in love with Oakheart, and refused to fight him when he was attacked by Thistleclaw. Also broken by any cat who joined the Dark Forest.
 * Rule 2 is one of the most frequently broken, with many Clans crossing boundaries to catch prey or apprentices not acknowledging the boundaries.
 * Rule 3 was broken by Firepaw when catching prey for Yellowfang after she was exiled from ShadowClan. It was also broken by Longtail and Darkstripe, eating prey on a hunting patrol instead of bringing back to the elders and kits. It is rumored by Graypaw that Sandpaw and Dustpaw did this every so often.
 * Rule 4 was broken by Tigerstar and his warriors when he killed prey only to raise a hill of bones. It was also broken by Driftkit playing with a mouse when an owl swooped in and took the prey.
 * Rule 5 was broken by Brokenstar of ShadowClan, when he forced kits to become apprentices before they were ready. He also trained them too hard, killing some of them. Some were made warriors before they were even six moons old.
 * Rule 6 was broken when Squirrelflight was named a warrior, but did not sit vigil due to that ThunderClan did not yet have a camp.
 * Rule 7 was broken by Firestar when he named Brambleclaw deputy, even though he was going to mentor Berrykit when he became six moons. This rule was also broken when Hawkfrost was appointed temporarily as deputy since he hadn't mentored an apprentice.
 * Rule 8 was broken by Tallstar when he appointed Onewhisker leader, even though Mudclaw was still deputy.
 * Rule 9 was broken by Bluestar when she waited for too long to name a new deputy.
 * Rule 10 was broken by all Clans when they fought numerous times at Gatherings.
 * Rule 11 was broken by ShadowClan when they stopped believing in StarClan and stopped patrolling their borders.
 * Rule 12 was broken by Russetfur and her patrol, watching Berrykit struggle with his tail caught in a fox trap, and making no move to help him. Also done by Tigerstar when he was an apprentice and tried to kill Scourge while he was a kit named Tiny.
 * Rule 13 was broken by Fireheart when he refused to attack WindClan when Bluestar planned an attack.
 * Rule 14 was broken by Brokentail, Hawkheart, Tigerstar, Hollyleaf and Clawface.
 * Rule 15 was broken by Cloudpaw when he took food from Twolegs and by SkyClan's daylight warriors because they live with Twolegs at night.
 * The rule about medicine cats being forbidden to have a mate and kits was broken by both Leafpool and Yellowfang.

Punishment
The Clan Leader may choose to punish cats who broke the Warrior Code. These include scolding, giving a warrior apprentice duties, or giving an apprentice an unpleasant task (like when Bluestar put Firepaw in charge of taking care of Yellowfang for feeding her). In severe cases, the cat may be exiled from the Clan; such as RiverClan exiling Graystripe, or Bluestar exiling Tigerclaw.

Cats who would murder for no reason or caused much pain to other cats for no reason would go to the Place of No Stars instead of StarClan (Tigerstar, Hawkfrost, Darkstripe, Thistleclaw, etc.)