After that, with Ieyasu, he was engaged in enactment of laws including the Buke Shohatto (Code for the warrior households) and Kinchu narabini Kuge Shohatto (Code for Emperor and Court nobles).
その後、家康とともに武家諸法度・禁中並公家諸法度などの制定につとめた。