The Book of Life
The mundane task of bookkeeping in the ancient Near East often found a parallel in the divine realm. The idea of divine scribal activity appears several times throughout both the OT and NT and is frequently mentioned in pseudepigraphal writings
19 And thus a blessing and righteousness will be written (on high) as a testimony for him in the heavenly tablets before the God of all. 20 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 descendants after him. And he will be written down as a friend and a righteous one in the heavenly tablets.
A warning against breach of covenant
21 All of these words I have written for you, and I have commanded you to speak to the children of Israel that they might not commit sin or transgress the ordinances or break the covenant which was ordained for them so that they might do it and V 2, p 114 be written down as friends. 22 But if they transgress and act in all the ways of defilement, they will be recorded in the heavenly tablets as enemies. And they will be blotted out of the book of life and written in the book of those who will be destroyed and with those who will be rooted out from the land.
3 In those days, I saw him—the Antecedent of Time, while he was sitting upon the throne of his glory, and the books of the living ones were open before him. And all his power in heaven above and his escorts stood before him. 4 The hearts of the holy ones are filled with joy, because the number of the righteous has been offered, the prayers of the righteous ones have been heard, and the blood of the righteous has been admitted before the Lord of the Spirits.