According to the relevant laws and regulations of the state, lawyers who have served as judges and prosecutors may not serve as agents ad litem or defenders within two years after leaving the people's courts and people's procuratorates; After leaving the people's court, a judge may not act as an agent ad litem or defender in the court of first instance; A judge's spouse or children may not act as agents ad litem or defenders in the court where they are located.
People's Republic of China (PRC) Lawyers Law
Article 41
Lawyers who have served as judges and prosecutors shall not serve as agents ad litem or defenders within two years after leaving the people's courts and people's procuratorates.
Public Procurators Law of the People's Republic of China
Article 37
A public prosecutor shall not act as an agent ad litem or defender within two years after leaving the People's Procuratorate.
After leaving the people's procuratorate, a public prosecutor shall not act as an agent ad litem or defender of the case handled by the original procuratorate, except as a guardian or close relative of the party concerned.
After being dismissed, a public prosecutor shall not act as an agent ad litem or a defender, except as a guardian or close relative of a party to represent him in litigation or defense.