The Vinaya Pitaka (Pali; English: Basket of Discipline) is a Buddhist scripture, one of the three parts that make up the Tripitaka (literally. "Three Baskets"). The other two parts of the Tripitaka are the Sutta Pitaka and the Abhidhamma Pitaka. Its primary subject matter is the monastic rules for monks and nuns. The name Vinaya Pitaka (vinayapi aka) is the same in P?li, Sanskrit and other dialects used by early Buddhists.
Scholarly consensus places the composition of the M?lasarv?stiv?da Vinaya in the early centuries of the first millennium, though all the manuscripts and translations are relatively late.
Six versions survive complete, of which three are still in use.
In addition, portions of various versions survive in various languages.
It was compiled at the First Council shortly after the Buddha's death, and recited by Upali, with little later addition. Most of the different versions are fairly similar, most scholars consider most of the Vinaya to be fairly early, that is, dating from before the separation of schools.
The Pali version of the Patimokkha, the code of conduct that applies to Buddhist monastics, contains 227 rules for bhikkhus and 311 rules for bhikkhunis. The Vibhanga section(s) of Vinaya Pitaka constitute(s) a commentary on these rules, giving detailed explanations of them along with the origin stories for each rule. The Khandhaka/Skandhaka sections give numerous supplementary rules grouped by subject, again with origin stories. The Buddha called his teaching the "Dhamma-Vinaya", emphasizing both the philosophical teachings of Buddhism as well as the training in virtue that embodies that philosophy.
In the collected Chinese editions of the Scriptures the Vinaya pitaka has a broader sense, including all four Chinese vinayas listed above, parts of others, non-canonical vinaya literature, lay vinaya and bodhisattva vinaya.
According to the scriptures, in the first years of the Buddha's teaching the sangha lived together in harmony with no vinaya, as there was no need, because all of the Buddha's early disciples were highly realized if not fully enlightened. As the sangha expanded situations arose which the Buddha and the lay community felt were inappropriate for samanas, or ascetics. According to tradition, the first rule to be established was the prohibition against sexual acts. The origin story tells of an earnest monk whose family was distraught that there was no male heir and so persuaded the monk to impregnate his wife. All three, the monk, his wife and son who both later ordained, eventually became fully enlightened arahants.
The vinaya is very important to Buddhists -
"Whatever Dhamma and Vinaya I have pointed out and formulated for you, that will be your Teacher when I am gone." (Mahaparinibbana Sutta, [D.16]).