In the twelfth month of 805, Huiguo died and was buried next to his master, Amoghavajra. More than one thousand of his disciples gathered for his funeral. The honour of writing his funerary inscription on their behalf was given to Kūkai.
The Shingon lineage is an ancient transmission of esoteric Buddhist doctrine that began in India and then spread to China and Japan. Shingon is the name of this lineage in Japan, but there are also esoteric schools in China, Korea, Taiwan and Hong Kong that consider themselves part of this lineage (as the originators of the Esoteric teachings) and universally recognize Kūkai as their eighth patriarch. This is why sometimes the term "Orthodox Esoteric Buddhism" is used instead.
Kūkai systematized and categorized the teachings he inherited from Huiguo into ten bhūmis or "stages of spiritual realization".
In Orthodox Esoteric Buddhism, divine beings are grouped into six classes.