In the Engishiki (an ancient book for codes and procedures on national rites and prayers), Mokuryo already had an official duty of dokoshi and thus the time is estimated to have been before that.
延喜式にはすでに土工司の職掌を木工寮が担っているためおそらくそれ以前のことと推測される。