"The Messenger of Allah ﷺ came out to us with two books in hand. And he said: 'Do you know what these two books are?' We said: 'No, O Messenger of Allah ! Unless you inform us.' He said about the one that was in his right hand: 'This is a book from the Lord of the worlds, in it are the names of the people of Paradise, and the name of their fathers and their tribes. Then there is a summary at the end of them, there being no addition to them nor deduction from them forever.' Then he said about the one that was in his left: 'This is a book from the Lord of the worlds, in it are the names of the people of Fire, and the name of their fathers and their tribes. Then there is a summary at the end of them, there being no addition to them nor deduction from them forever.' The companions said: 'So why work O Messenger of Allah! Since the matter is already decided (and over)?' He said: 'Seek to do what is right and draw nearer, for indeed the inhabitant of Paradise, shall have his work sealed off with the deeds of the people of Paradise, whichever deeds he did. And indeed the inhabitant of Fire, shall have his work sealed off with the deeds of the people of Fire, whichever deeds he did.' Then the Messenger of Allah motioned with his hands, casting them down and said: 'Your Lord finished with the slaves, a group in Paradise, and a group in the Blazing Fire.'" Another chain reports a similar narration. (Using translation from Tirmidhī 2141)
"أتدْرون ما هذان الكتابان؟ هذا كتابٌ من ربِّ العالمين، فيه أسماءُ أهلِ الجنة، وأسماءُ آبائهم، وقبائِلهِم، ثم أجمل على آخرِهم، فلا يُزَادُ فيهم، ولا يُنقَصُ منهم أبدًا، هذا كتاب من رب العالمين فيه أسماءُ أهل النار، وأسماء آبائِهم، وقَبَائِلهم، ثم أجمل على آخرهم، فلا يُزادُ فيهم، ولا يُنْقص منهم أبدا سدِّدوا وقاربوا، فإن صاحبَ الجنةِ يُختمُ له بعملِ أهل الجنَّةِ، وإن عملَ أىَّ عملٍ، وإن صاحب النار يختم له بعمل أهل النار، وإن عملَ أىّ عملٍ، فرغ ربُّكم من العباد، فريق في الجنةِ وفريقٌ في السعير".