The Manjusri Vasthu Vidya Sastra is a manuscript of the 5th or 6th century CE that gives the basis on which Sri Lankan Buddhist monasteries are constructed. It contains detailed information concerning plans, structures and the auspicious placement of particular elements.
The text of the Manjusri Vasthu Vidya Sastra is in Sanskrit but written in Sinhala script. Words such as "navadada" for nine indicate that the text is in Sinhala as well.
E. W. Marasinghe dates the manuscript to the 5th or 6th century CE at the latest. It focuses on Buddhist monasteries. While the translator believes that this text is exclusively Sri Lanken and Buddhist, the text is very similar to most other Vasthu vidya Shastras or what are also called Vaastu Shastras. In many instances the wording is exactly the same as the Mayamata, Manasara and Agastyas Vaastu Shastra which are three well known Vaastu Shastras. Vaastu Shastras are texts on building houses, forts, temples, churches, large and small houses, huts, horse barns, cattle sheds, and just about every other kind of built space. This particular text focuses on Buddhist temples yet its rules also apply to other buildings. Vaastu Shastras were used in ancient days to build mathematically precise and energetically vibrant buildings all over the world. While the exterior style may vary the fundamental form and principles of Vaastu Shastras were used as far back as King Solomon's temple.
The elements of Sri Lankan monasteries may appear to be randomly placed because they differ in layout. The text gives 12 different arama layouts, with two alternatives for each, totalling 24 layouts in all. Each layout is contained within a grid. The layouts carry names like hastiarama, and padmarama. Pabbata Vihara monasteries followed the hastiarama model. There are different layouts for different settings depending on whether the monastery is in a town, village, royal park, near a river, by the sea, in the middle of a forest, by a highway and so on. There is provision for placing the entrances north, south, east, or west, but there were conditions for this. In each layout, not only the religious buildings, but also the assembly hall, flower pavilion, dancing hall, hospital, refectory and kitchen had specific positions which fitted into certain sequences. Monasteries therefore had a very "architectural layout". The various buildings were placed in relation to each other, though on different levels.
There were specifications for nearly everything. The Manjusri text advised on site selection, discussed soil properties and gave procedures for soil testing. It suggested suitable trees for each monastic layout. It gave advice on the preparation and application of glues, pigments and pastes, and on the carving of elephants and horses, indicating the correct proportions of these animals. It even gave instructions on how to obtain measurements using the plumb line. There were auspicious times, auspicious materials and auspicious lengths. There were rituals relating to certain important stages in the construction. The first brick was to be laid by the architect, suitably clothed, facing east. The doors should open inward for good results. If images were incorrectly placed, the patron’s life and health would be affected.