From the Expositor p.7- 9:
There is a consensus of opinion among teachers that the Abhidhamma is divided into seven books, viz., Dhammasangani, Vibhanga, Dhatukatha, Puggalapannatti, Kathavatthu, Yamaka, and Patthana.
But the Vitaṇḍa school say:
‘Why bring in Kathavatthu? Was it not settled by Tissa, Moggali’s son, two hundred and eighteen years after the Buddha’s Parinibbāna? Hence it is [merely] the word of his disciples. Reject it.’
[To whom we say:]
‘Are there then only six books in the Abhidhamma?’
‘I do not say so.’
‘What do you say then?’
‘Seven books.’
‘How do you get the seven?’
‘There is a book called Mahādhammahadaya (in the Great Commentary); with that I make the seven.’
‘In the Mahādhammahadaya there is nothing which has not been said already in the Dhammahadaya Vibhanga. And the remaining catechetical section, which is peculiar to your Mahādhammahadaya, is not long enough to make up a treatise by itself. Hence it makes the seven only with the Kathavatthu.’
‘Nay, not with the Kathavatthu. There is the Mahā-Dhātukathā; with that I make the seven.’
‘But there is nothing new in that either. The remaining texts, peculiar to it, are not long enough to make up a treatise. Hence the Kathavatthu makes the seventh.’
When the Supreme Buddha, who taught us the seven treatises, came to the Kathavatthu, he began with an eight-faced inquiry into the theory of the person (or soul), in four questions each of two fivefold divisions, and laid down a table of contents in a text not quite as long as one recital, to be adopted in all the discourses:
‘Is the person known in the sense of a real and ultimate fact? Yes.
Is the person known in the same way as a real and ultimate fact is known? Nay, that cannot be. Acknowledge your refutation.
Is the person not known in the sense of a real and ultimate fact? Nay, it is not known.
Is the person unknown in the same way as any real and ultimate fact is known? Nay, it cannot be. Acknowledge your refutation.
Is the person known everywhere in the sense of a real and ultimate fact? Or is it unknown?
Is it known always in the sense of a real and ultimate fact? Or is it unknown?
Is it known in everything in that sense, or is it unknown?’
Thus, showing the eight aspects and their respective refutations, the table of contents has been laid down by the Teacher.
Now when he laid down the table of contents, he foresaw that, two hundred and eighteen years after his death, Tissa, Moggali’s son, seated in the midst of one thousand bhikkhus, would elaborate the Kathavatthu to the extent of the Dīgha Nikāya, bringing together five hundred orthodox and five hundred heterodox Suttas.
So Tissa, Moggali’s son, expounded the book not by his own knowledge but according to the table of contents laid down, as well as by the method given, by the Teacher. Hence the entire book became the word of the Buddha.
After which precedent? After the Madhujhāṇika Suttanta and others. In that Suttanta the Blessed One, after laying down heads of a discourse, ended thus:
‘Bhikkhu, owing to such causes, the factors of prolonged rebirth beset a man. Here if there be nothing to be pleased withal, proud of, or assimilated, then it is the end of the latent bias of lust,’ etc.—and then rose from his seat and entered the monastery.
The bhikkhus, who received the doctrine, approached Mahākaccāna and questioned him as to the meaning of the heads laid down by the Buddha of the Ten Powers.
The Elder, not replying directly to the question, said by way of paying homage to the Buddha:
‘Sirs, a person desirous of and seeking pith should bear in mind this simile of pith—the Buddha is like the pith of a tree, his disciples are like the branches and leaves. For, Sirs, the Buddha, who knows all knowable things, discerns all discernible things, is the eye of the world, the wisdom of the world, is like the constituents of wisdom to the world, is like the Ariyan Path to the world, is the speaker and originator of the Four Truths, the expounder of their meaning, the giver of the Deathless, the master of the Law, the Tathāgata.’
After thus praising the Teacher he, at the repeated request of the bhikkhus, expounded in great detail the meaning of the heads of discourse laid down by the Buddha and sent them away saying:
‘Sirs, if you are willing, approach the Buddha and ask him the meaning. And you should accept what he explains to you, so that if my explanation harmonizes with omniscience you should take it; if not, reject it.’
They approached the Buddha and asked him. The Teacher, without referring to any ill-spoken words of Kaccāna, raised his neck aloft like a golden drum and, filling with breath his noble mouth, graceful as the full-blown lotus, emitted the Brahma voice, and saying, ‘Well done, well done!’ to the Elder, added:
‘Bhikkhus, learned is Mahākaccāna, profoundly wise is Mahākaccāna. If you had asked me the same question, I would have answered exactly as he has done.’
Thus, since the time when the Teacher gave his approval, the whole Suttanta became the word of the Buddha. And it is the same with the Suttas expounded by Ānanda and others.
Thus, in teaching the seven books, when he came to the Kathavatthu the Buddha laid down the table of contents in the way mentioned above. In doing so he foresaw that two hundred and eighteen years after his death, Tissa, Moggali’s son, seated in the midst of one thousand bhikkhus, would elaborate the Kathavatthu as is stated above.
And Tissa, Moggali’s son, expounded the book not by his own knowledge but according to the table of contents laid down, as well as by the method given, by the Teacher. Hence the entire book became the word of the Buddha. Thus the Abhidhamma consists of seven books inclusive of the Kathavatthu.