Kumon was originally a general term for official documents in the ritsuryo system (a system of centralized government based on the ritsuryo code), and derived from it, it also meant the government official who dealt with such documents.
公文（くもん）とは、本来は律令制における公文書の総称であり、転じてこうした文書の取り扱う官吏の事も指した。