Tripura Rahasya

The Tripura Rahasya (Devanagari: त्रिपुरा रहस्य, Tripurā Rahasya) meaning The Mystery beyond the Three cities, is an ancient literary work in Sanskrit believed to have been narrated by Dattatreya to Parashurama. It is an ancient prime text which is one of the treatises on Advaita school of classical Indian Metaphysics.
Tripurā means "three cities" or "the trinity." Rahasya means "secret" or "mystery." In a sense there is no secret to be revealed. It is only due to lack of wisdom that humans don't experience their true nature. Therefore, mystery would be a more appropriate translation. Thus, Tripura Rahasya means the Mystery beyond the Trinity. The three cities or states of consciousness are waking (Jāgṛat), dreaming (Svapna) and deep sleep (Suṣupti). The underlying consciousness in them all is called Sri Tripura, the Mother Goddess Tripura Sundari.
The Tripura Rahasya expounds the teachings of the supreme spiritual truth. The highest truth was first taught by Lord Shiva to Lord Vishnu. Lord Vishnu/Or sometimes considered Lord Shiva incarnated on earth as Sri Dattatreya, Lord of the Avadhutas, who taught this to Parasurama, who later taught it to Haritāyana.
The Tripura Rahasya is a dialogue between Lord Dattatreya and Parasurama. It is also called the Haritāyana Samhitā after its author Haritāyana, son of Harita.
It is said to consist of 12,000 slokas in three sections - the Jñāna Khaṇḍa (Section on Supreme Wisdom), the Mahātamya Khaṇḍa (Section on the Greatness of Sri Devi), and the Caryā Khaṇḍa (Section on Conduct). Of these the first consists of 6,687 slokas; the second of 2,163 slokas; and the third is untraceable.
After his encounter with Rama, Parasurama returned crest-fallen and on his way met an Avadhuta named Samvarta, the brother of Brihaspati who advised him to seek Dattatreya. Later he encountered Sri Dattatreya who instructed him in the Truth with added injunction that it should be communicated to Haritayana who would later seek the truth from him and so led him to salvation. Parasurama thus realized the Self by the guidance of Sri Datta and dwelt on the Malaya Hill in South India.
Later a Brahmin Sumedha, son of Harita (hence the name "Haritayana") sought Parasurama to learn the highest good from him, who in turn imparted to him the knowledge which he had gained from Dattatreya. Parasurama told him also that his Master had predicted the compilation of the knowledge of the Highest Truth by Haritayana for the benefit of mankind.