The origin of the Zen school is traditionally traced to Mahakassapa, who was said to have received a direct transmission outside the scriptures. This transmission is illustrated with the evocative story of the Buddha holding a flower silently before the assembled Sangha: only Mahakassapa understood, and smiled. The story is gains special resonance since Mahakassapa is renowned as a curmudgeonly old monk – although his authentic verses in the Theragatha do indeed show a delightful love of nature.
Despite the fame and importance of the story, it is not attested in any Indic scripture, and is a Chinese Chan invention. It’s first appearance is apparently in the compilation of koans, the 無門關 (Wúménguān, often rendered in English as The Gateless Gate), compiled by the Chinese Zen master Wumen Hui-k’ai (無門慧開) and first published in 1228. The development of the notion of lineages is discussed by Dumoulin.