Zhang Yi ( Bogong ) Zhang Yi ( died 264 ) , Bogong , was a general of the state of Shu Han during the Three Kingdoms period . As an area commander . Originally from Wuyang county ( 武陽 ; present - day Pengshan County , Meishan , Sichuan ) and a descendant of Zhang Liang , Zhang Yi became Liu Bei ' s secretary after the latter had captured Yi Province from Liu Zhang . The secretary received several promotions during his service to the Shu regime , and became an area commander responsible for overseeing the Nanzhong region . However , Zhang Yi lacked the flexibility to acclimate Shu ' s law ( 蜀科 ; which was dictated by Legalism ) to local customs , so common people around the area disliked him . Finally , such public outcry precipitated a major revolt , which effectively absolved Zhang Yi from governorship . The Shu emperor Liu Shan ( Liu Bei ' s son ) sent an envoy to summon Zhang Yi back to the capital because of the uprising . Zhang Yi ' s close aides also urged him to quickly return and admit guilt , but Zhang dissented and grunted , " I was called back because I am not suitable for my post , but I should gather the grain for my successor , ( Ma Zhong ) , so that the army would vanquish the rebels . How can I neglect the affairs of the State just because I am demoted ? " Thus , he prescribed the transport of food supplies to a staging area , and kept the army in full alertness . Zhang Yi ' s action laid the foundation for Ma Zhong ' s later success and received the panegyric from the chancellor Zhuge Liang . War with Wei . After he returned to the capital Chengdu , Zhang Yi was selected by Zhuge Liang as the latter ' s Front - Commander during one of his northern expeditions against Shu ' s rival state , Cao Wei . He was also made the designated Governor of Fufeng . After Zhuge Liang ' s death , Zhang Yi received the post of Front - Leader ( the Front - Commander was supposed to be a temporary post created for an expedition , while the Front - Leader served as a regular or permanent counterpart of the former ) . Since then , he was tasked with the defense of Jiangwei commandery , whict sits on the border between Shu and Wei . When the general Jiang Wei urged for an assault on the Wei - controlled Didao county ( 狄道 , present - day Lintao County , Gansu ) , Zhang Yi controverted , stating Shu was small and its citizens were exhausted — it was unwise to wage war continuously . Jiang Wei annulled Zhang ' s concern , and Liu Shan acquiesced in the war plan Jiang Wei had prepared . Then , the careworn Zhang Yi was promoted to " Senior General Who Guards the West " ( 鎮西大將軍 ) and was " recommended " by Jiang Wei to join the operation . Nevertheless , they did break Wang Jing ' s army at Tao River , and dealt the enemy a loss up to tens of thousands . At this juncture , Zhang Yi again advised Jiang Wei to acquit the campaign and return , so the deed could be retained . However , the annoyed Jiang Wei related his wish to add a punch line to the novel by citing a parable / idiom of Chu people adding feet to the drawing of a snake ( 為蛇畫足 ; a Chinese idiom which has the same meaning as " to gild the lily " . It is unlikely Jiang Wei did not understand the meaning of the idiom he used . ) Ironically , Jiang Wei ' s campaign fitted the idiom exactly when Shu - Han army could not breach the city of Didao . Since then , Jiang Wei bore a grudge against Zhang Yi , but he brought the latter with him everytime he battled Wei ; Zhang Yi had no choice but to accompany his commander . Fall of Shu . Using the pretext of Jiang Wei ' s frequent invasion , the Wei regent Sima Zhao ordered his generals Zhong Hui and Deng Ai to conquer Shu once and for all . Zhang Yi was thus sent by Liu Shan to assist the defence of Yang ' an . There , he and general Dong Jue were swiftly defeated by Zhong Hui , and they were forced to retreat to Jiange ( 劍閣 , present - day Jiange County , Sichuan ) . When the duo arrived their destination , they only learnt Jiang Wei was also defeated by Deng Ai , and was on his way to Jiange . Perceiving the great pass of Jiange as the last gate into Chengdu , they persevered a staunch defence , and managed to hold the advance of Zhong Hui . However , Deng Ai adroitly slithered 350 km through a nearly impassible route to bypass Jiange and attacked the unprepared city of Jiangyou . After Jiangyou was lost and the defensive forces under Zhuge Zhan were totally crushed in Mianzhu Pass , Liu Shan relinquished the defence of Chengdu and surrendered . Zhang Yi followed Jiang Wei to surrender to Zhong Hui in November 263 . Within two months , Zhong Hui suddenly revolted under the influence of Jiang Wei , but the two men were butchered by the Wei soldiers who did not cater to their caprice . As a consequence , the disturbance burgeoned into a catastrophe in which the northerners razed the city of Chengdu , and Zhang Yi was also killed during the turmoil . In fiction . In the historical novel " Romance of the Three Kingdoms " by Luo Guanzhong , Zhang Yi was a late era general for Shu , typically serving below or alongside Liao Hua . Right before Zhuge Liang died , he named Zhang Yi , along with Liao Hua , Ma Dai , Wang Ping and Zhang Ni , as the loyal generals of Shu who should be retained . He died in chapter 119 during the confusion of the failed uprising by Jiang Wei and Zhong Hui .