From the fantasy universe of Warhammer 40K, created by Games Workshop, where "In the grim darkness of the future, there is only war".
The Codex Astartes is the book of divine wisdom authored by Roboute Guiliman, Primarch of the Ultramarines, in the years after the Horus Heresy and the Scouring. It contains a wealth of knowledge, distilled from thousands of warriors, which has guided the Imperium of Man through endless wars against numerous enemies for 10,000 years.
The Codex is sanctified by the Emperor himself. Even so, the Codex was initially met with resistance by the other Primarchs. It decreed that no force of Space Marines should ever number larger than 1,000 in order to prevent the treachery of the Horus Heresy from happening ever again. This decree would break the forces of each of the Primarchs into numerous chapters, 1/10th of their current size. In time they came to accept Guiliman's wise counsel, and this great division of the Space Marines' forces was known as the Second Founding.
Each of the various Space Marines chapters is directly governed by the tenets of the Codex Astartes. For any given tactical situation, the Codex has hundreds of pages devoted to how it may be met and overcome. Each warrior of the chapter is required to memorize whole sections of the Codex so that within a company there exists an entire record of the Codex’s tenets. While some chapters, such as the Ultramarines, do not deviate at all from its teachings, others tend to focus more heavily on certain areas (such as speed, stealth or close combat) rather than others.