There is an interesting book entitled 'Mysticism in Iran: The Safavid Roots of a Modern Concept' by Ata Anzali. The blurb says : ""Mysticism" in Iran is an in-depth analysis of significant transformations in the religious landscape of Safavid Iran that led to the marginalization of Sufism and the eventual emergence of 'irfan as an alternative Shi'i model of spirituality.
Ata Anzali draws on a treasure-trove of manuscripts from Iranian archives to offer an original study of the transformation of Safavid Persia from a majority Sunni country to a Twelver Shi'i realm. The work straddles social and intellectual history, beginning with an examination of late Safavid social and religious contexts in which Twelver religious scholars launched a successful campaign against Sufism with the tacit approval of the court. This led to the social, political, and economic marginalization of Sufism, which was stigmatized as an illegitimate mode of piety rooted in a Sunni past.
Anzali directs the reader's attention to creative and successful attempts by other members of the ulama to incorporate the Sufi tradition into the new Twelver milieu. He argues that the category of 'irfan, or "mysticism," was invented at the end of the Safavid period by mystically minded scholars such as Shah Muhammad Darabi and Qutb al-Din Nayrizi in reference to this domesticated form of Sufism. Key aspects of Sufi thought and practice were revisited in the new environment, which Anzali demonstrates by examining the evolving role of the spiritual master. This traditional Sufi function was reimagined by Shi'i intellectuals to incorporate the guidance of the infallible imams and their deputies, the ulama.
Anzali goes on to address the institutionalization of 'irfan in Shi'i madrasas and the role played by prominent religious scholars of the eighteenth and early nineteenth centuries in this regard. The book closes with a chapter devoted to fascinating changes in the thought and practice of 'irfan in the twentieth century during the transformative processes of modernity. Focusing on the little-studied figure of Kayvan Qazvini and his writings, Anzali explains how 'irfan was embraced as a rational, science-friendly, nonsectarian, and anticlerical concept by secular Iranian intellectuals.'
Pre-Buyid Shi'ism, which we find in Usul al-Kafi, spoke about an 'irfan that was based upon ma'rifa of the batin of the ontological Imam (the Imam as Light). The Imam as an external manifestation of the Intellect illuminates the intellect of the Shi'a (again, 'aql having a very specific definition, being that faculty that perceives the truth of the signs of Allah).