Both the Twelver Shiʿah and the Zaydiyyah lay claim to a corpus of supposedly early writings of spiritual dictums and supplicatory devotional prayers that purport to be utterances delivered by ʿAlī b. al-Ḥusayn (d. 94/713), the fourth Imām of the Twelvers, and his son Zayd b. ʿAlī (d. 122/740), the principal figure of the Zaydiyyah.
ʿAlī b. al-Ḥusayn was more widely known by his epithet Zayn al-ʿĀbidīn (The Ornament of the Worshippers), owing to his ascetic character and dutiful spiritual practice. For a study of his life and reception in Sunni and Shiʿi historical memory I would recommend the excellent encyclopaedic entries by Wilferd Madelung, in the Encyclopedia Iranica, and Etan Kohlberg, in the Encyclopedia of Islam, second edition, both of which supply the reader with a great many references to medieval works that recount his ascetic views and short reports attributed to him (the lengthiest treatment is found in the Tāʾrīkh madīnat Dimashq by the Sunni historian and “veritable goldmine of information”, as James Lindsay described him in a 2001 study).
In the Twelver Shiʿi literature ʿAlī b. al-Ḥusayn is identified as the author of a rather lengthy manual (atypical for the early period) of doxologies and pithy statements of rights (حقوق) known as Risālat al-ḥuqūq (The Treatise on Rights). The text typically contains 51 or so short formulations adumbrating a range of rights to be afforded to God, parents, leaders, prayers, bodily limbs, and etc. The full text survives in fourth hijri century works of Shiʿi authors, such as the Tuḥaf al-ʿuqūl of Ibn Shuʿbah al-Ḥarrānī and the Khiṣāl of al-Shaykh al-Ṣadūq.
Hossein Modarressi aptly observes that, generally speaking the style and religious outlook of the Risālat al-ḥuqūq bears the unmistakable imprint of ʿAlī b. al-Ḥusayn who was known for his ethical demeanour and pensive and spiritual mode of seeing the world. It is highly unlikely, however, that the full text goes back to early second hijri century. In my view, it is more probable that an original core of pithy ethical instructions emerged from the Shiʿi circles associated with ʿAlī b. al-Ḥusayn in the late Umayyad period (typically characterised by politically-inconspicuous religious discourses and less theologically-charged missives). Later the original short text (the earliest layer of the Risālah) would have received accretions and underwent editorial elaborations to serve the needs of the Shiʿi faithful as they grappled with the socio-political landscape of religious persecutions at the hands of the ʿAbbasids.
The transmission route of the full text is also problematic by both traditional and academic standards: the common link in most of the isnāds is Ismāʿīl b. al-Faḍīl (or b. al-Faḍl as some other sources know him), from whom al-Shaykh al-Ṣadūq claims to report in the Khiṣāl (while some Shiʿi ḥadīth critics take issue with another transmitter, ʿAlī b. Aḥmad b. Mūsā). Ismāʿīl was a companion of al-Bāqir (d. 114/732) and al-Ṣādiq (d. 148/765) at a time when the Shiʿi legal and theological corpus was vast and growing in considerable volume. The circles of al-Bāqir and al-Ṣādiq produced quite a number of uṣūl or short legal maxims and ethical instructions, such as the aṣl of Zayd al-Zarrād, which is suffused with aphorisms and short precepts on human conduct (of the 400 mentioned in the literary sources, only sixteenth are extant; see here).
It would be more apposite to place the earliest layers of the Risālat al-ḥuqūq in the milieu of the al-Ṣādiq in the middle of the second/eighth century. It is hardly likely that fifty or so rights that constitute the complete version from the fourth hijri century was preserved from the first hijri era. Hossein Modarressi points out that the purportedly original transmitter of the treatise, Abū Ḥamzah al-Thumālī (died mid-second century hijri) described the wording of ʿAlī b. al-Ḥusayn in terms that would suggest the original was a short letter sent to his close disciples. It was only in the post-occultation period (circa early fourth century hijri) that Shiʿi authors begin to refer to the short letter as the Treatise of Rights.
Another reason to suspect a later provenance for the Risālat al-ḥuqūq has to do with the intra-Shiʿi polemic that intensified in the late third and early fourth hijri centuries. Based on the polemical exchanges and titles of books aimed at refuting the theological excesses or shortcomings of the the other, it appears that the Imāmī Shiʿis and Zaydis were at loggerheads. A close reading of the early fourth century Shiʿi ḥadīth canon al-Kāfī is sufficient to demonstrate the point. Bearing this context in mind, we find that the Zaydī literature attributes a similarly titled work of rights, the Kitāb al-ḥuqūq (كتاب الحقوق), to Zayd b. ʿAlī.
The Zaydī version is almost half the size of the Twelver one. While the Twelver version contains 51 chapters or rights, the Zaydī has 23 that stem from two broad rights: the rights of God and the rights of humans (aptly rendered rights of souls). The similarities between the two are quite remarkable. The editor of the Zaydī version, Muḥammad Riḍā al-Jalālī, notes with good reason that the Zaydī recension appears to be an abridgement of the Twelver text. The opposite scenario, however, that the Zaydī is the original while the Twelver is an expanded version, cannot be ruled out. Either way, the two texts in question — given their similarities — are to be located in the same milieu. The most plausible period of provenance is the late third and early fourth hijri centuries, mainly because it was during this tumultuous epoch that we witnessed a Twelver-Zaydī rivalry played out in religious polemics.
The Zaydī text is based on a small codex held at the Great Mosque of Sanʿa in Yemen. To the best of my knowledge there exist two editions: the already-mentioned Jalālī edition and the one in the collection of Zayd b. ʿAlī’s writings (مجموع كتب و رسائل الإمام زيد بن علي) edited by Muḥammad Yaḥyā Sālim ʿAzzān. If we work with the assumption that the Zaydī version is the original and the Twelver derivative, then the full Zaydī text mumutatis mutandis is most probably not from the time of Zayd, but more plausibly an elaborated edition of an original core of a handful of short statements that mutated into a larger body of text after the late third and early fourth hijri century (that is, the tenth and eleventh centuries common era).
In which case and irrespective of the precise date of composition, the Twelver and Zaydī version contain lucidly worded and sophisticated formulations about rights and spiritual messaging that sheds light on a little-known current of medieval Islam where the rights of God and the rights of humans enter public religious discourses. A close reading of the Arabic and English translation would not go amiss.