In the late 12th century when Kamakura bakufu was founded, Seii Taishogun (literally, "great general who subdues the barbarians"), a leader of samurai family, built a system of the political authority, government affairs and annual events as 'kuji' (as government affairs), and imposed 'kuji' to gokenin, vassals.
12世紀末に鎌倉幕府が成立すると、武家の棟梁である征夷大将軍が独自の政治的権限と政務及年中行事の体系を「公事」（政務としての）として構築し、家臣である御家人に対して「公事」を賦課した。