The entire path of Buddhism can be characterized as a quest for understanding the mind and then ridding the obstacles to mind. While the mind is the foundation of Buddhism, it is rarely directly described in its complexity.
For this reason the Third Karmapa Rangjung Dorje, wrote a treatise called Distinguishing Consciousness from Wisdom, which describes the eight consciousnesses in great detail and explains how we as ordinary beings are deluded by them. He then describes how to transcend ego and transform these consciousnesses into the five enlightened wisdoms.
This book is a virtual textbook of Buddhist psychology by an authentic teacher from a lineage that continues to be alive today even though it is a thousand years old.
A must for all practitioners of Vajrayana.