That completely distorts what the passage itself says. The dead are judged PRECISELY on the basis of what they did before they died: "the dead were judged on the basis of what was recorded in the books, according to their deeds" (20:12; translation by Aune). The books are plainly a record of the persons' erga "deeds". This is how the judgment scene plays out in earlier Jewish apocalypses that the author of Revelation was indebted to:
"I looked at everything on the heavenly tablets and I read everything that was written, and I learned everything. And I read the book and everything that was written in it, all the deeds of men and all the sons of flesh that will be upon the earth until the generations of eternity....Blessed is the man who dies righteous and pious, concerning whom no book of iniquity has been written, and against whom no guilt will be found" (1 Enoch 81:2-4), "In a book it was written how many of them he was destroying...And thus in the vision I saw that one who was writing ... and was showing that whole book to the Lord of the sheep, everything they had done, and everything that each one of them had taken away, and everything that they had handed over to destruction. And the book was read in the presence of the Lord of the sheep, and he took the book from his hand and read it and set it down" (89:70-71), "And I looked at that man who wrote the book at the word of the Lord, until he opened the book of the destruction that those last twelve shepherds worked, and he showed before the Lord of the sheep that they had destroyed more than those before them" (90:17), "What will you do, O sinners, and where will you flee on that day of judgment .... to you the days of your judgment will come. All the words of your lawless deeds will be read out before the Great Holy One, and your face will be put to shame, and then he will remove all the deeds that partook in lawlessness" (97:3-6), "I swear to you, sinners, by the Great Holy One, that all your evil deeds are revealed in heaven, and you will have no unrighteous deed that is hidden. Do not suppose to yourself nor say in your heart, that they do not know nor are your unrighteous deeds seen in heaven, nor are they written down before the Most High. Henceforth know that all your unrighteous deeds are written down day by day, until the day of your judgment" (98:4-8), "Then be prepared, O unrighteous, and present your petitions as a reminder, offer them as a testimony before the angels, that they may bring in the sins of the unrighteous before the Most High as a reminder" (99:3), "Woe to you, unrighteous, when you afflict the righteous on a day of hard anguish, and burn them in fire; for you will be recompensed according to your deeds...Woe to you, all you sinners, because of the words of your mouth and the deeds of your hands, for you have strayed from the holy deeds, in the heat of a blazing fire you will burn. And now know that from the angels inquiry will be made into your deeds in heaven" (100:7, 9-10), "I have read the tablets of heaven, and I have seen the writing of what must be, and I know the things that are written in them and inscribed about you .... Woe to you, dead sinners, when you die in your sinful wealth ... They have died in splendor, and judgment was not executed on them in their life. Know that down to Sheol they will lead your souls, and there they will be in a great distress, and in darkness and in a snare and in a flaming fire. Into great judgment your souls will enter, and the great judgment will be for all the generations of eternity" (102:2, 5-8), "Do not say, O sinners, 'None of our sins will be searched out and written down,' all your sins are being written down day by day" (104:7),"And Enoch was taken from the children of men and we led him to the garden of Eden for greatness and honor. And behold he is there writing condemnation and judgment of the world, and all of the evils of the children of men .... he was put there for a sign and so that he might bear witness against all the children of men so that he might relate all of the deeds of the generations until the day of judgment" (Jubilees 4:23-24), "Thus a blessing and righteousness will be written on high as a testimony for him in the heavenly tablets before the God of all. And we will remember for a thousand generations the righteousness which a man did during his life in all of the appointed times of the year. And it will be written on high and it will come to him and his descendents after him. And he will be written down as a friend and as a righteous one in the heavenly tablets....But if they transgress and act in all the ways of defilement, they will be recorded in the heavenly tablets as enemies, and they would be blotted out of the book of life" (30:19-20, 22), "And you, understanding one, inherit your reward in the remembrance of [...]. Engraved is your portion and ordained is all the punishment, for engraved is that which is ordained by God against all the [...] of the sons of Seth, and a book of remembrance is written in his presence for those who keep his word. And this is the vision of meditation and a book of remembrance. And he will give it as an inheritance to Enosh together with a spiritual people, for according to the pattern of the holy ones is his fashioning, but he did not give meditation as a witness to the spirit of flesh, for he does not know the difference between good and evil according to the judgment of its spirit" (4Q417 1 1:14-17), "Everything has been engraved before you with the stylus of remembrance for all the incessant periods and the cycles of the number of everlasting years in all their predetermined times, and they will not be hidden, and will not be lacking from before you. How will a man count his sin? How will he defend his iniquities?" (1QH 9:23-26), "There is no moment in which man's works can be concealed, because they are written on the heart in the Lord's sight. And the Spirit of Truth testifies to all things and brings all accusations. He who has sinned is consumed in his heart and cannot raise his head to face his judge" (Testament of Judah 20:4-5),"These are the angels of the Lord Almighty. They write down all the good deeds of the righteous upon their manuscript as they watch at the gate of heaven. And I take them from their hands and bring them up before the Lord Almighty, he writes their name in the Book of the Living. Also the angels of the accuser who is upon the earth, they also write down all the sins of men upon their manuscript" (Apocalypse of Zephaniah 4:6-9), "The wondrous man who sat on the throne was the one who judged and sentenced the souls. The two angels on the right and on the left recorded. The one on the right recorded righteous deeds while the one on the left recorded sins....And the judge told on of the angels who served him, 'Open for me this book and find for me the sins of this soul' " (Testament of Abraham 12:11-17), "Behold, days are coming and the books will be opened in which are written the sins of all those who have sinned" (2 Baruch 24:1).