The prototype of the muyou retainer was the zhuwen , a position which evolved from that of the experienced clerks in the yamen but who had a position higher than the shusuan and assisted the magistrate in handling punishments and treasury matters 县官幕友的雏形是“主文” ,是以衙门中积年书手演变而来的,地位高于书算,其作用是协助县官处理刑名、钱谷一类的政务。