If a district attorney has represented a minor in a dependency proceeding, that district attorney shall not appear, on behalf of the people of the State of California, in any juvenile court hearing which is based upon a petition that alleges that the same minor is a person within the description of Section 602.
Records kept by the district attorney in the course of representation of a minor described in Section 300 are confidential and shall be held separately, and shall not be inspected by members of the district attorney’s office not directly involved in the representation of that minor. A district attorney who represents or who has represented a minor in a proceeding brought pursuant to Section 300 shall not discuss the substance of that case with a district attorney representing the people pursuant to Section 681 in a proceeding brought pursuant to Section 602 in which that same minor is the subject of the petition.