양의
After Liu Bei's death in 223, Yang Yi continued serving in Shu under Liu Bei's son and successor, Liu Shan, who was assisted by the Imperial Chancellor, Zhuge Liang. In 225, Zhuge Liang had Yang Yi transferred to the Imperial Chancellor's Office, where Yang Yi served as an Army Adviser (). Later that year, Yang Yi followed Zhuge Liang on a campaign against some rebel forces and restless tribes in the southern parts of Shu. In 227, he accompanied Zhuge Liang to Hanzhong Commandery. In 230, he was promoted to Chief Clerk () and appointed as General Who Pacifies the Army (). Over the following years, when Zhuge Liang led a series of military campaigns against Shu's rival state Cao Wei, Yang Yi was in charge of managing human resources and logistics.