King Beopheung’s Law Code
King Beopheung issued a law code and set official robes by rank; he also created a Ministry of War and a chief minister and used the era name Geonwon.

Mansegmj · CC BY-SA 4.0 · Source
Beopheung set up the Ministry of War in 517, issued the code and robes for the seventeen ranks in 520, created the post of sangdaedeung to head the Hwabaek noble council in 531 and adopted Silla’s first era name, Geonwon, in 536. With Buddhism recognized in 527 and Geumgwan Gaya annexed in 532, Silla took shape as a centralized state.
The bone-rank system was organized around this time, fixing not only the highest office a person could hold but even the size of his house and the colour of his clothes.