The twelve level cap and rank system was a hierarchical structure introduced during the Asuka period in Japan, which categorized government officials into ranks based on their social status, abilities, and contributions. This system was part of Prince Shลtoku's reforms aimed at centralizing power and creating a more efficient bureaucracy. It helped establish a merit-based system for appointing officials, moving away from the aristocratic favoritism that characterized earlier governance.