Ramana Maharshi taught primarily by his silence, answers to questions asked by seekers and devotees, and by his example in the kitchen and in the ashram.
Most of the writing was done in response to a specific question or request, to meet the needs of a particular devotee. The earliest works, Self-inquiry and Who am I? were written on scraps of paper as answers to written questions, while Ramana remained in complete silence.
Other writing was done at a specific request. 40 Verses on Reality was written at the request of Muruganar, who wanted a concise synopsis of Ramana’s teaching.
The Five Hymns to Arunachala were written in 1914 when Ramana was still living in a cave. Some of his followers asked Ramana for a song that they could sing when they went begging for food for the ashram.
Upadesa Saram (The Essence of Instruction) was written as 30 verses, again at the behest of Muruganar, who wanted a version of legendary instructions given by Siva.
There are a few items that were written spontaneously by Ramana. The most well know of these are his Eleven Verses and Eight Verses, as well as Five Verses on the Self.
Other than a few other miscellaneous verses, there are no other items directly written by the Maharshi.
Maharshi’s Teachings - Collected by Others
Talks with Ramana Maharshi and Day by Day with Ramana Maharshi are collections of dialogs of various devotees with Ramana. These were written from memory by devotees after the dialogs, then later collected into printed books. These are both considered generally accurate and good sources for seekers with a sincere interest in the teaching of Ramana.
Translations and Adaptations by Maharshi
In addition there are several adaptations and translations of classics of Advaita Vedanta that were done by Ramana Maharshi. These include The Song Celestial from the Bhagavad Gita, Translations from the Agamas, ancient Hindu scriptures, and several items from Sankara, the great spiritual teacher from many centuries ago, who restored the teachings of Advaita Vedanta to full vigor.
There are countless other books written by devotees of Ramana Maharshi who visited Ramana and stayed with him for some time. These books contribute much to what is known of Ramana Maharshi and his teaching.