The Grand Secretariat oversaw the execution of the royal commands and its staff recorded every detail of state affairs .