Gongshu Wenzi (?-497 BCE), whose clan name was Gongshu and personal name Fa (also known as Ba), was posthumously granted the honorific title "Zhen Hui Wenzi," hence called Gongshu Wenzi. He was a high-ranking minister (qing dafu) in the State of Wei during the Spring and Autumn Period (770-476 BCE) and was the grandson of Duke Xian of Wei. In the thirty-first year of Duke Ling of Wei's reign (504 BCE), Duke Ding of Lu attacked the State of Zheng, capturing Kuang (present-day north of Changyuan County). On the way there, they did not request passage through Wei, and upon returning, Yang Hu (a powerful Lu official) had Duke Ding of Lu, Ji Huanzi (head of the Ji clan), and Meng Yizi (head of the Meng clan) enter directly through Wei's south gate and exit through the east gate. Duke Ling of Wei was furious and sent Mi Zixia (a favored official) to pursue them. At that time, Gongshu Wenzi, already advanced in years, rode in a carriage to advise Duke Ling, urging him not to damage the friendly relations between Lu and Wei over a small grievance, and predicted that Yang Hu, being full of evil deeds, would bring about his own downfall. Duke Ling heeded his advice and called off the pursuit.
Gongshu Wenzi was wealthy but not arrogant. He was skilled at recommending talented people and enjoyed an extremely high reputation among the feudal lords of his time. When his household steward Ju Yi (a worthy official) showed talent, he recommended him, allowing him to rise to the position of a high minister in the ducal court, standing on equal footing with himself. After Gongshu Wenzi died in 497 BCE, his son Gongshu Xu requested a posthumous title from Duke Ling of Wei. Duke Ling said: "In a year of famine in Wei, he distributed porridge to the starving people—was this not Hui (Benevolence)? When Wei was in danger, he risked his life to defend me—was this not Zhen (Uprightness)? He governed the affairs of Wei, regulated them well, maintained good relations with neighboring states, and ensured that the altars of Wei were not disgraced—was this not Wen (Cultured)?" Thus, they granted him the posthumous title "Zhenhui Wenzi" (Upright, Benevolent, and Cultured Lord).
During his travels through various states, Confucius spent the longest time living in the State of Wey. He spoke highly of Gongshu Wenzi (a respected Wey official), praising his virtue of recommending worthy talents. This is mentioned twice in The Analects.
