Al-Hadi ila'l-Haqq Yahya b. al-Husayn was born in 859, more than a century after Zayd ibn Ali's own rising and death had already given the Zaydi movement its name. In 897 he proclaimed his own religious and political mission at Sa'da, in the mountains of northern Yemen, and there founded the first lasting Zaydi imamate, a state that traced its legitimacy through the same principle Zaydis had held from the start, that the rightful leader of the community must be a qualified descendant of Ali who is willing to rise and claim the position openly, not merely wait for it in seclusion.
Governing that new imamate meant ruling on real cases, and al-Hadi set his own legal reasoning down in a book he called Kitab al-Ahkam, the Book of Rulings. He never finished it. When he died in 911, after fourteen years as imam, the work remained incomplete, and it fell to his follower Muhammad ibn Sulayman al-Kufi to compile a second volume, Kitab al-Muntakhab, gathering further rulings attributed to his teacher to round out what the unfinished Ahkam had left open. Between the two books, an imamate founded in Sa'da less than two decades earlier now had a body of law written down in its own founder's name, unfinished or not, and that law became the seed of a distinct legal tradition that would carry al-Hadi's own title, al-Hadi ila'l-Haqq, forward as its name: the Hadawiyya.