
42 Cal.Rptr.3d 471 (2006)
139 Cal.App.4th 28
DANIEL V., Petitioner,
v.
The SUPERIOR COURT of San Joaquin County, Respondent;
The People, Real Party in Interest.
Jamie K., Petitioner,
v.
The Superior Court of San Joaquin County, Respondent;
The People, Real Party in Interest.
Nos. C050566, C051071.
Court of Appeal, Third District.
May 2, 2006.
*472 James Larsen, Public Defender, Edmund B. Shaver and Nelson C. Lu, Deputy Public Defenders, for Petitioner in No. C050566.
*473 James Larsen, Public Defender, Vickie L. Delph and Nelson C. Lu, Deputy Public Defenders for Petitioner in No. C051071.
No appearance for Respondent.
Bill Lockyer, Attorney General, Robert R. Anderson and Mary Jo Graves, Assistant Attorneys General, Carlos A. Martinez, George M. Hendrickson and Stephen G. Herndon, Deputy Attorneys General, for Real Party in Interest.
SIMS, Acting P.J.
In this opinion involving petitions filed in the juvenile court by the People pursuant to Welfare and Institutions Code section 602, we hold a purported assignment of such cases "for all purposes, including trial," to a particular judge in a particular department did not constitute a valid "assignment for all purposes" sufficient to trigger the time for peremptory challenge of the judge (Code Civ. Proc., § 170.6[1]), where the purported assignment was made in the "notice of petition" by a deputy court clerk, pursuant to an informal court practice rather than a court rule or order.
We consolidated the petitions of the two minors, Daniel V. and Jamie K., who were the subjects of unrelated proceedings. They separately petitioned this court for writs of mandate/prohibition after the juvenile court denied as untimely their peremptory challenges to Judge Barbara Kronlund. After receiving a preliminary opposition from the People in Daniel V.'s case, we issued alternative writs in both cases and orders staying further proceedings in the juvenile court.
We now discharge the alternative writs and issue peremptory writs directing the juvenile court to vacate its orders denying the section 170.6 challenges and to accept the challenges.

FACTUAL AND PROCEDURAL BACKGROUND
On May 27, 2005, the District Attorney filed in juvenile court a petition against Daniel V., alleging he committed three felony violations of Penal Code section 288, subdivision (a), lewd or lascivious act on a child under age 14. The document began with a "NOTICE," the first paragraph of which stated:
"A petition as hereafter set forth has been filed in the above entitled Court and has been set for hearing on Thursday June 23, 2005 at the hour of 9:00, in the Juvenile Court, San Joaquin County, located at [address]. The case has been assigned to Judge Kronlund, in Dept. J2 for all purposes, including trial." The underlined words were handwritten on underlined blanks in the typewritten paragraph. The "Notice" part of the document ended with a date stamp, a typewritten reference to the court clerk, and signature or signature stamp of a deputy court clerk.[2] On *474 the next line, the "PETITION" began. Copies of the first pages of the documents filed against Daniel V. and Jamie K. are attached to this opinion as an appendix, with identifying information deleted.
At the initial hearing[3] on June 23, 2005 (which both sides call an arraignment), Judge Kronlund appointed counsel and set the matter for a jurisdictional hearing[4] on July 19, 2005, in Department J2. Nothing in the minute order reflected an assignment for all purposes.
On July 19, 2005, Daniel V.'s case was called in Department J2, with an assigned, retired judge, Judge Richard Haugner, presiding. Daniel V. denied the allegations, and the matter was set for a contested jurisdictional hearing on August 19, 2005, in Department J2.[5] Also on July 19, 2005, Daniel V. filed a peremptory challenge to Judge Kronlund.
On August 19, 2005, the case was called for the contested jurisdictional hearing before Judge Kronlund. She struck the section 170.6 peremptory challenge as untimely, on the ground that the case was assigned to her for all purposes in the notice of petition, and therefore the section 170.6 challenge should have been made no later than 10 days after the June 23, 2005, arraignment. The hearing was continued.
Daniel V. filed in this court a petition for writ of mandate/prohibition and stay of proceedings. At our request, the People filed a preliminary opposition, and Daniel V. filed a response. On October 13, 2005, we issued an alternative writ of mandate and stayed juvenile court proceedings with respect to Daniel V.
Daniel V.'s petition alleges, and the People admit, that the juvenile division of *475 respondent court has two juvenile delinquency departments, and Judge Michael Coughlan regularly sits in J1, while Judge Kronlund regularly sits in J2. Daniel V.'s deputy public defender submitted a declaration stating that respondent court, in an effort to distribute the juvenile delinquency case workload evenly, instituted in October 2003 a procedure whereby, at arraignment, odd-numbered cases are assigned to J1 and even-numbered cases are assigned to J2, regardless of complexity or subject matter. Sometimes, but not always, the People's juvenile petitions would state assignments to Judge Coughlan or Judge Kronlund for all purposes. At non-contested jurisdictional hearings, most matters set for contested hearings are set in the same department unless a section 170.6 challenge is filed. The juvenile court has not conducted itself as if cases were assigned for all purposes. The two departments transfer cases between themselves and also frequently have visiting judges fill in when Judge Kronlund or Judge Coughlan is absent, without any reference to assignment for all purposes. Daniel V.'s attorney declared that a recent unrelated case was initially assigned to Judge Coughlan for a contested jurisdictional hearing, but he was presiding over another hearing, so the case was transferred to Judge Kronlund, who refused to consider the case as assigned to Judge Coughlan for all purposes and insisted on hearing the case until counsel filed a section 170.6 challenge.
Daniel V. also submitted a reporter's transcript from the hearing at which Judge Kronlund denied the section 170.6 challenge. The transcript shows Daniel V.'s attorney argued that when a case is assigned to one judge for all purposes, there is supposed to be an attempt to schedule matters so as not to conflict with the judge's absences, and, "It's not the way this court is run." Counsel said his short experience in this juvenile division was that other judges frequently heard whatever was on the calendar for that day, and Daniel V.'s case had had two judges for three appearances.
The People's return denies the foregoing allegations and submits declarations,[6] including the following:
Judge Richard Vlavianos declared that in November 2003, while he was presiding judge of the juvenile court within the San Joaquin County Superior Court, he "made the decision to implement a Direct Calendar (or `one kid, one judge') system, with the concurrence of our Presiding Judge [presumably the presiding judge of the San Joaquin County Superior Court]." The purpose was to equalize the court's workload and provide consistency that would benefit the children and their families. Judge Vlavianos said, "I ran my thoughts by my Presiding Judge who agreed and authorized me to implement a one kid, one judge calendar." Judge Vlavianos met with supervisors of the Public Defender's and District Attorney's offices and told them he wanted a "one kid, one judge" system, and that odd-numbered cases would be assigned to Department J1, and even-numbered cases would be assigned to Department J2, except for drug court and certain Vehicle Code cases. The judge showed the supervisors a court calendar, effective November 17, 2003 (which said nothing about assignment for all purposes, but merely contained the word "ODD" under Department J1 and "EVEN" under Department J2, where two *476 judges sat at the time). Judge Vlavianos declared that in early 2004 (after we issued a writ in an unrelated case due to lack of notice), respondent court began placing notices of the assignments on the courtroom doors, on counsel tables inside the courtrooms, and in the notice of petition.[7] Judge Vlavianos declared: "At all times I believed that the court has the inherent power to choose the calendaring system that it believes will best serve its constituents. I am unaware of any requirement that a Rule of Court be promulgated prior to a calendaring system being put into place."
The People also submitted a declaration from Judge Kronlund, who declared she is the regular judge in Department J2, and her name appears on the courtroom door and on a nameplate on the bench. Judge Kronlund attested that "[c]ases are not frequently transferred out of one juvenile delinquency department and sent to the other. On rare occasion a visiting judge will fill in if myself or Judge Michael Coughlan is away from the court, but these instances are few and far between. It is not common practice to transfer cases out of the department to which the case has been assigned for all purposes, and that happens only rarely for good cause, if it happens at all. In this circumstance, I permit a 170.6 motion to be filed since there would have been a change in the assigned judge. This is the same practice and policy followed by our Civil Departments who are under a direct calendar system as well."
While acknowledging a different judge handled Daniel V.'s July 19, 2005, hearing, Judge Kronlund declared this was "very unusual" and was necessitated by her covering for absent Manteca court judges.[8] Judge Kronlund said she has informed lawyers "on a fairly regular basis" that the cases assigned to her have been assigned for all purposes (but she did not say she informed the lawyers in either of the cases now before us).
The People also submitted a declaration from a deputy court clerk who described her practice (and her performance in Daniel V.'s case) of filling in the blanks in the section 602 petition to assign even-numbered cases to Judge Kronlund in Department J2. Attached to the clerk's declaration was an apparent checklist used by deputy court clerks for opening juvenile petitions.
Daniel V. filed a replication with a declaration from four deputy public defenders assigned to the juvenile division, who attested it "happens quite frequently" that visiting judges preside in and handle matters scheduled in Departments J1 and J2, and "we cannot recall any of them ever asking to continue any case for a particular judge's return from absence because that case had been assigned at first arraignment to an absent judge for `all purposes.' Instead, such visiting judges simply handle the case load for that particular day, whatever it may be."
Jamie K.'s case followed a similar path. On June 27, 2005, the People filed a petition alleging he committed a felony violation *477 of Penal Code section 261, subdivision (a)(2) (forcible rape), one felony violation of Penal Code section 459 (first degree burglary), and one felony violation of Penal Code section 136.1, subdivision (a)(2) (dissuading a witness). The notice of petition stated (with a deputy court clerk's signature or signature stamp[9]) that the case was assigned for all purposes, including trial, to Judge Kronlund in Department J2. At the arraignment on August 16, 2005, Judge Kronlund appointed counsel and set a jurisdictional hearing for September 6, 2005. A retired judge (Judge Glenn Ritchey, Jr.) presided at the September hearing (where Jamie K. denied the allegations) and set the matter for a contested jurisdictional hearing on October 21, 2005.[10] Jamie K. immediately made a section 170.6 challenge, which Judge Kronlund later denied as untimely. The court allowed the People to add another felony violation and continued the hearing.
On October 28, 2005, Jamie K. filed in this court his petition for a writ of mandate/prohibition and stay of proceedings. We consolidated the cases of Daniel V. and Jamie K. for purposes of proceedings in this court. On November 3, 2005, we issued an alternative writ of mandate and stayed juvenile court proceedings with respect to Jamie K. (as we had previously done with Daniel V.) The People filed a return, and Jamie K. filed a replication.

DISCUSSION

I. Writ Review of Orders Denying Peremptory Challenge

An order denying a peremptory challenge is not an appealable order and may be reviewed only by way of a petition for writ of mandate. (§ 170.3, subd. (d).) The standard of review is abuse of discretion, and a trial court abuses its discretion when it erroneously denies as untimely a section 170.6 challenge. (Hemingway v. Superior Court (2004) 122 Cal.App.4th 1148, 1153, 19 Cal.Rptr.3d 363 (Hemingway); Grant v. Superior Court (2001) 90 Cal.App.4th 518, 523, 108 Cal.Rptr.2d 825.)

II. Section 170.6

"The Legislature has enacted detailed procedural statutory requirements regarding the time during which an affidavit to disqualify a judge may be filed. [Citation.] Any superior court policy or practice that is in conflict with those statutory time provisions is void. [Citations.]" (Motion Picture & Television Fund Hospital v. Superior Court (2001) 88 Cal. App.4th 488, 492, 105 Cal.Rptr.2d 872.)
Section 170.6 applies to juvenile court cases. (Pamela H. v. Superior Court (1977) 68 Cal.App.3d 916, 918, 137 Cal.Rptr. 612.)
As a general rule, section 170.6 permits challenge of a judge at any time before commencement of a trial or contested hearing, with three exceptions: (1) the all-purpose assignment rule (at issue in this case); (2) the master calendar rule; and (3) the "10-day/5-day" rule. (People v. Superior Court (Lavi) (1993) 4 Cal.4th 1164, 1172, 17 Cal.Rptr.2d 815, 847 P.2d 1031 (Lavi).)
*478 The first exception, all-purpose assignment, involves assignments that instantly pinpoint one judge who will be expected to preside at trial and to process the case in its totality from the time of the assignment, thereby acquiring expertise with the factual and legal issues in the case, which will accelerate the legal process. (Lavi, supra, 4 Cal.4th 1164, 1180, 17 Cal.Rptr.2d 815, 847 P.2d 1031.) Section 170.6, subdivision (a)(2), provides: "If directed to the trial of a cause that has been assigned to a judge for all purposes, the motion shall be made to the assigned judge or to the presiding judge by a party within 10 days after notice of the all purpose assignment, or if the party has not yet appeared in the action, then within 10 days after the appearance."
The second exception, master calendar courts, refers to a system where a trial-ready case is assigned to a trial-ready judge; the peremptory challenge must be filed no later than the time the case is assigned for trial. (§ 170.6, subd. (a)(2); Lavi, supra, 4 Cal.4th 1164, 1172-1178, 17 Cal.Rptr.2d 815, 847 P.2d 1031.)
The third exception, known as the "10-day/5-day" rule, provides that where the judge (other than a judge assigned for all purposes) is known at least 10 days before the date set for trial, the motion shall be made at least five days before the trial date. (§ 170.6, subd. (a)(2); Lavi, supra, 4 Cal.4th at p. 1182, 17 Cal.Rptr.2d 815, 847 P.2d 1031.)
The applicability of these exceptions is not necessarily determined by labels used by the court, but by function and purpose. (Lavi, supra, 4 Cal.4th 1164, 1174-1175, 17 Cal.Rptr.2d 815, 847 P.2d 1031 [that judge's department was labeled as master calendar court, although persuasive, was not conclusive]; see also, Ruiz v. Appellate Division of the Superior Court (2004) 119 Cal.App.4th 282, 290-291, 14 Cal.Rptr.3d 190 [court did not have master calendar system merely because it assigned trial-ready cases to ready courts on the direction of the assistant supervising judge, where the court did not give notice that it was a master calendar system].) Labels used by the court may be viewed as prima facie evidence as to what type of assignment occurred, and the party contesting the label has the burden of establishing that the label does not fit. (Id. at p. 1179, 17 Cal.Rptr.2d 815, 847 P.2d 1031; Shipp v. Superior Court (1992) 5 Cal.App.4th 147, 152, 6 Cal.Rptr.2d 685.)
Section 170.6 calls for automatic reassignment to another judge if a challenge is duly presented. (§ 170.6, subd. (a)(3).)

III. Application to these Cases

The minors argue the District Attorney's office has no authority to assign cases to a judge. However, as we have explained (fn.2, ante) we are satisfied that the assignments were made by the court clerk, not by the District Attorney's office.
The People argue the assignment for section 170.6 purposes was made in the notice of petition when the court clerk assigned each case to Judge Kronlund "for all purposes, including trial" pursuant to the unwritten local practice of respondent court. The minors argue these notices were ineffective for section 170.6 purposes, and respondent court does not otherwise treat cases as assigned to one judge for all purposes. We shall conclude that, for purposes of triggering the time demands of section 170.6, an all-purpose assignment cannot be made by a deputy court clerk pursuant to an informal, unwritten local practice, but rather requires a valid order from a judge or a valid written local court rule.
Daniel V. made his peremptory challenge at his second appearance, at the *479 conclusion of the first jurisdictional hearing (at which there was no adjudication of any contested issue), when Judge Haugner set the case for a contested jurisdictional hearing.
Jamie K. also made his peremptory challenge at his second appearance, at the conclusion of the first jurisdictional hearing (at which there was no adjudication of any contested issue), when Judge Ritchey set the case for a contested jurisdictional hearing.
In their preliminary opposition to the writ petition, the People suggested that, because contested issues could have been adjudicated at the first jurisdictional hearing, any section 170.6 challenge should have been made before the first jurisdictional hearing (even though the first such hearing for each minor turned out to have a visiting judge). We disagree. For purposes of applying section 170.6 in juvenile court proceedings, "trial" means the adjudicatory phase of the jurisdictional hearing, i.e., the hearing at which the minor is exposed to a finding of truth of allegations contained in a petition filed pursuant to Welfare and Institutions Code section 602. (In re Abdul Y. (1982) 130 Cal.App.3d 847, 856-857, 182 Cal.Rptr. 146.) At the first jurisdictional hearing under Welfare and Institutions Code section 602, the juvenile court reads the petition, advises of the right to a hearing on the issues raised by the petition, and asks if the minor admits or denies the allegations. (Rule 1487.) If the minor denies the allegations, "the court shall hold a contested hearing to determine whether the allegations in the petition are true." (Rule 1488.) In Abdul Y., we said the rules contemplated the jurisdictional hearing may be bifurcated into two phases, and we distinguished between the preliminary phase of the jurisdictional hearing, which is the functional equivalent of the pretrial stage of adult criminal proceedings, and the adjudicatory phase. (Abdul Y., supra, 130 Cal.App.3d at pp. 856-857, 182 Cal.Rptr. 146.) We said that, so long as a peremptory challenge is filed in an otherwise timely fashion before the commencement of the adjudicatory phase, the challenge complies with the statutory timetable. (Ibid.) We also held that section 170.6 may be triggered if the preliminary phase of the jurisdictional hearing includes a hearing on contested fact issues relating to the merits, e.g., a motion to suppress evidence (Pen.Code, § 1538.5) of a confession or other matter tending to establish guilt or innocence of the accused. (Abdul Y., supra, 130 Cal.App.3d at pp. 857-861, 182 Cal.Rptr. 146.)
Here, the minute orders do not reflect adjudication of any contested issues during the first jurisdictional hearing for each minor.
Thus, the minors' peremptory challenges were timely, unless the all-purpose assignment rule applies, such that each minor would have been required to make the section 170.6 challenge within 10 days of his first appearance. The question is whether each case was validly "assigned for all purposes" to Judge Kronlund by the time of the arraignment, as the People contend.
An assignment to one judge for all purposes, including trial, is sometimes called "direct calendaring." (Zilog, Inc. v. Superior Court (2001) 86 Cal.App.4th 1309, 1318, 104 Cal.Rptr.2d 173.) As noted in Lavi, supra, 4 Cal.4th at p. 1179, 17 Cal. Rptr.2d 815, 847 P.2d 1031, section 170.6 does not explain when an assignment to a judge may be deemed one for all purposes. "`An all-purpose assignment clearly contemplates assignment to a specific judge to process the litigation in its totality rather than a trial department in which the identity of the judge is subject to the vagaries of personal and administrative necessity. *480 The purpose of such assignment is to permit the efficient disposition of complex matters and this commendable purpose would be utterly frustrated unless there is certainty that once assigned, the all-purpose judge will preside over the action from beginning to end.' [Citation.] Thus, when there is an all purpose assignment, `[t]he litigant does not need any further information to know who will try the case,' because the assignment `instantly pinpoints' that judge. [Citation.]" (Lavi, supra, 4 Cal.4th at pp. 1179-1180, 17 Cal. Rptr.2d 815, 847 P.2d 1031.) "[F]or a case assignment to be an all purpose assignment, two prerequisites must be met. First, the method of assigning cases must `instantly pinpoint' the judge whom the parties can expect to ultimately preside at trial. [Fn. omitted.] Second, that same judge must be expected to process the case `in its totality' [citation], from the time of the assignment [fn. omitted], thereby `acquiring an expertise regarding the factual and legal issues involved, which will accelerate the legal process.' [Citation.] `[C]omplicated and potentially long drawn-out case[s]' are particularly conducive to all purpose assignments. [Citations.]"[11] (Id. at p. 1180, 17 Cal.Rptr.2d 815, 847 P.2d 1031.)
Lavi clarified in a footnote that it is not necessary (particularly in criminal cases) that a single judge handle every matter in a given case in order to make an all purpose assignment. It suffices if, at the time of the all purpose assignment, "substantial matters remain to be processed in addition to trial, and the assigned judge is expected to process all those matters from that point on (thus allowing him or her to acquire expertise in, and familiarity with, the intricacies of the case). . . ." (Lavi, supra, 4 Cal.4th at p. 1180, fn. 13, 17 Cal.Rptr.2d 815, 847 P.2d 1031.)
Lavi also noted in a footnote, "when there is an assignment to a department by number, if a particular judge regularly presides in that department and that judge's identity is either known to the litigant or discoverable on reasonable inquiry, and if there is reasonable certainty that this judge will ultimately hear the case (i.e., evidence is produced indicating that the case will likely remain in the department to which it was initially assigned), then a court may properly invoke the all purpose assignment rule, assuming such an assignment is involved." (Lavi, supra, 4 Cal.4th at p. 1180, fn. 12, 17 Cal.Rptr.2d 815, 847 P.2d 1031.)
Here, the People acknowledge there was no court order assigning these cases. They nevertheless argue the all-purpose assignment was made pursuant to rule 213, which says, "The presiding judge may, . . . on the court's motion, order the assignment of any case to one judge for all or such limited purposes as will promote the efficient administration of justice." However, section 1003 defines an "order" as follows: "Every direction of a court or judge, made or entered in writing, and not included in a judgment, is denunciated an order." (Italics added.) Here, the presiding judge neither made nor directed entry of a written order assigning for all purposes the two cases at issue in this opinion. Consequently, rule 213 is inapplicable.
The People argue it was local court policy to assign juvenile cases for all purposes based on case number (odd numbers went to Department J1 and even numbers went to J2), and therefore the case was validly assigned when the deputy court clerk filled in the blanks on the "NOTICE" of petition, assigning the cases for all purposes to *481 Judge Kronlund in Department J2, and therefore the minors should have invoked section 170.6 within 10 days of their first appearance.[12]
However, there was no formal local court rule or court order creating assignment to one judge for all purposes, but rather a mere informal practice set up by a former presiding judge of the juvenile court with apparently verbal consent of the presiding judge of the superior court.
The People suggest no formal rule was required. Although the judge who instituted the practice did not cite any statutory authority in his declaration, the People invoke section 128, which provides in part: "(a) Every court shall have the power to do all of the following: [¶] . . . [¶] (3) To provide for the orderly conduct of proceedings before it, or its officers. [¶] (4) To compel obedience to its judgments, orders, and process [¶] . . . [¶] (8) To amend and control its process and orders so as to make them conform to law and justice." (§ 128, subd. (a).)
However, section 128 merely confers authority; it says nothing about how that authority is exercised. We shall conclude that, if a court wants a direct calendar system for all juvenile court cases for section 170.6 purposes, the court must adopt a formal local rule (as respondent court did with other types of cases in San Joaquin County), so that counsel will not be left guessing when a section 170.6 challenge must be filed.
Division IV (Trial Court Administration) of title six of the California Rules of Court states in rule 6.603 that the presiding judge of the trial court "has ultimate authority to make judicial assignments"; "must . . . [d]esignate a presiding judge of the juvenile division"; must "[s]upervise the court's calendar"; and "may delegate any of the specific duties listed in this rule to another judge or, if the duty does not require the exercise of judicial authority, to the court executive officer." (Rule 6.603(c)(1), (d).)
"Every court may make rules for its own government and the government of its officers not inconsistent with law or with the rules adopted and prescribed by the Judicial Council." (Gov.Code, § 68070, subd. (a); see also § 575.1 [presiding judge of superior court may propose local rules to expedite the business of the court].)
Although courts have inherent supervisory and administrative powers to carry out their duties (Motion Picture & Television Fund Hospital v. Superior Court, supra, 88 Cal.App.4th at p. 492, 105 Cal. Rptr.2d 872), "[i]t is unrealistic to expect all counsel, including those who may primarily practice in other counties, to be aware of the unwritten rules for assignment of cases. . . ." (Ruiz, supra, 119 Cal. App.4th at p. 291, 14 Cal.Rptr.3d 190 [there was no official designation or even advance notice that the court was acting as a master calendar court merely because it assigned trial-ready cases to ready courts on the direction of the assistant supervising judge].)
*482 "The right to exercise a peremptory challenge under section 170.6 is a substantial right and an important part of California's system of due process that promotes fair and impartial trials and confidence in the judiciary. [Citation.] Courts must refrain from any tactic or maneuver that has the practical effect of diminishing this important right." (Hemingway, supra, 122 Cal.App.4th at p. 1158, 19 Cal.Rptr.3d 363.) Hemingway, which involved domestic violence courts, held a purported all-purpose assignment was of no legal consequence for section 170.6 purposes, where (1) there was no evidence the presiding judge or the supervising judge had ever delegated any assignment power to the judge who was sitting as a magistrate when she first assigned the case to herself (and the court conceded magistrates lacked jurisdiction to make all purpose assignments) (id. at pp. 1154, 1155, 19 Cal.Rptr.3d 363); (2) an administrative order relied on by the court did not state that domestic violence cases were assigned to one particular judge or courtroom (id. at p. 1156, 19 Cal.Rptr.3d 363); (3) domestic violence cases were handled by a master calendar system that assigned a ready case to an open court (id. at p. 1157, 19 Cal.Rptr.3d 363); and (4) domestic violence courts could not be governed by local custom but required formal published rules (id. at p. 1158, 19 Cal.Rptr.3d 363). Hemingway said the record was devoid of any evidence that the superior court created or intended to create a direct calendaring system. (Id. at p. 1157, 19 Cal.Rptr.3d 363.)
Although the facts of our case differ from Hemingway, supra, 122 Cal.App.4th 1148, 19 Cal.Rptr.3d 363, (i.e., here respondent court did attempt to create a direct calendar system), we find applicable to these juvenile court cases Hemingway's reasoning that the "structure and procedures of domestic violence courts cannot be governed by local custom and tradition, but must be governed by existing law and implemented by rules adopted in compliance with California Rules of Court, rule 981.[13] This provision requires that each court publish its local rules controlling the practice or procedure of a court, or judge, and make copies available for distribution to attorneys and litigants. `Local rule' is defined as `every rule, regulation, order, policy, form, or standard of general application adopted by a court to govern practice or procedure in that judge's courtroom.' Should the presiding judge choose to delegate any aspect of his or her authority to another judge, adequate notice must be given so litigants and lawyers can make intelligent decisions regarding the filing of disqualification motions." (Hemingway, supra, 122 Cal.App.4th at p. 1158, 19 Cal. Rptr.3d 363; cf. rule 981(j) [rule 981 does not apply to local rules that "relate only to the internal management of the court"].)
Hemingway's reasoning (Hemingway, supra, 122 Cal.App.4th 1148, 19 Cal. Rptr.3d 363) applies to section 170.6 challenges in juvenile court cases under Welfare and Institutions Code section 602. We add that the policy of adequate notice is not satisfied by the fact that respondent court told representatives of the offices of the prosecutor and public defender about the practice when it was first started in 2003. Employees come and go, institutional *483 memory dims, and minors' rights to invoke section 170.6 in future cases should not depend on the vagaries of unwritten rules that may or may not be passed down from one generation of employees to the next.
The People cite Shipp v. Superior Court, supra, 5 Cal.App.4th 147, 6 Cal. Rptr.2d 685, which held that, under a local trial court policy assigning family law cases for all purposes to a specific judge in a specific department and requiring all proceedings in the case to be held in the assigned department unless otherwise ordered by the court, there was an assignment for all purposes within the meaning of section 170.6. In Shipp, however, the local policy was a formal policy printed in the Manual of Procedures for the Family Law Department of the Los Angeles County Superior Court, a manual of which the petitioner was concededly aware. (Id. at pp. 150-152, 6 Cal.Rptr.2d 685.) Here, as indicated, there was some evidence of an intent to create a direct calendar system by the former presiding judge of the juvenile division. However, there is no evidence such a system was ever validly created. There is no formal policy or rule of court printed in a court manual that gives notice to litigants or their attorneys that would put them on notice of the need to exercise a peremptory challenge under section 170.6. At most, there was only an informal arrangement of calendaring.
Though not cited by the parties, we note an unwritten practice by a juvenile court was endorsed in a juvenile dependency case (Welf. & Inst.Code, § 300 et seq.) in In re Jeanette H. (1990) 225 Cal.App.3d 25, 275 Cal.Rptr. 9, which said, "Under the juvenile court's inherent power, the informal adoption of a policy requiring the mutual exchange of witnesses in appropriate cases is justified even in the absence of a more formal rule." (Id. at p. 37, 275 Cal. Rptr. 9.) However, in addition to encouraging adoption of a formal rule (id. at p. 37, fn. 4, 275 Cal.Rptr. 9), the appellate court specified, "Our holding here does not extend to quasi-criminal juvenile court proceedings arising under section 601 et seq. of the Welfare and Institutions Code [where minors' Fifth Amendment rights may be implicated]." (Id. at p. 37, 275 Cal.Rptr. 9.) Moreover, section 170.6 itself implicates due process rights, and "[c]ourts must refrain from any tactic or maneuver that has the practical effect of diminishing this important right." (Hemingway, supra, 122 Cal.App.4th at p. 1158, 19 Cal.Rptr.3d 363.) Thus, Jeanette H. is inapposite.
We conclude that, if respondent court wants to have a local practice that has the dire consequence of starting the clock on section 170.6 rights in a juvenile case under Welfare and Institutions Code section 602, it must do so by adopting a formal local rule.
Here, there are no published local rules governing the assignment of juvenile cases in respondent court. Respondent court has published local rules for its juvenile court, but nothing in those rules addresses assignment of cases.
The People argue this case is governed by San Joaquin County Superior Court local rule 3-101,[14] which authorizes the *484 court clerk to give notice of an assignment for all purposes (including section 170.6) when the case is subject to direct calendaring. However, local rule 3-101 cannot apply to juvenile court cases, because it expressly states it applies to "UNLIMITED JURISDICTION CASES ONLY." Juvenile courts are courts of limited jurisdiction. (Welf. & Inst.Code, § 245 ["Each superior court shall exercise the jurisdiction conferred by this chapter [which includes Welf. & Inst.Code, § 602], and while sitting in the exercise of such jurisdiction, shall be known and referred to as the juvenile court"]; In re Chantal S. (1996) 13 Cal.4th 196, 200, 51 Cal.Rptr.2d 866, 913 P.2d 1075 ["A `juvenile court' is a superior court exercising limited jurisdiction arising under juvenile law"].)[15]
The People argue that, even if local rule 3-101 does not apply to juvenile cases, its principle is "parallel[ed]" in the (informal) practice used in the juvenile court division. To the contrary, local rule 3-101's express restriction to cases of unlimited jurisdiction, together with the absence of a similar provision in the local rules governing juvenile cases, suggests respondent court cannot import local rule 3-101's substance into juvenile cases, particularly since there is some question as to whether the juvenile court division truly treats assignments as all-purpose assignments for purposes other than section 170.6.[16]
We conclude that, for purposes of section 170.6 challenges in juvenile cases under Welfare and Institutions Code section 602, an assignment "for all purposes" requires either a valid order from a judge or a valid written local court rule.

IV. Whether a Formal Policy Would Trigger Section 170.6

Petitioners suggest that if the San Joaquin court were to institute a formal written policy assigning cases to judges for all purposes, based on the case number being odd or even, such policy would constitute an abuse of discretion (because it would conflict with the policy of expeditious resolution of juvenile cases) and would violate the equal protection and due process clauses *485 of the United States and California Constitutions.
We decline to consider these arguments. They appear inconsistent with the statement in petitioners' replications that "Daniel does not dispute that the San Joaquin Superior Court may, if it wishes, create a direct calendaring system for juvenile delinquency cases. . . ." Additionally, the arguments are not necessary to resolution of the two cases now before us, and the answers may depend on the specifics of any future policy formally adopted by respondent court.
Thus, as we have noted, there is an unresolved factual issue as to whether respondent court treats all-purpose assignments as true all-purpose assignments for purposes other than section 170.6. We cannot tell from this record what happens when a visiting judge handles a scheduled matter, e.g., whether or not there is any acknowledgement that the case has an assigned judge, and whether the court attempts to schedule matters around the assigned judge's scheduled vacations or judicial conferences.
Thus, even assuming respondent court adopts a formal written rule for juvenile cases, that may not end the matter, because future parties may challenge the rule on the ground that the rule places a meaningless label on cases. As indicated, the label used by the court is prima facie evidence but is not necessarily controlling. (Lavi, supra, 4 Cal.4th at pp. 1174-1175, 17 Cal.Rptr.2d 815, 847 P.2d 1031 [that judge's department was labeled as master calendar court, although persuasive, was not conclusive].)
We conclude the assignments in these two cases were not made by order of a judge or pursuant to a written local rule, and therefore the purported assignments "for all purposes" in these two cases did not constitute valid assignments for all purposes under section 170.6. Accordingly, petitioners' peremptory challenges to Judge Kronlund were timely and should have been accepted.

DISPOSITION
In both case No. C050566 and case No. C051071, let a peremptory writ of mandate issue, directing the juvenile court to vacate its orders denying the peremptory challenges (Code Civ. Proc., § 170.6), and to enter new orders accepting the peremptory challenges. The alternative writ, having served its function, is discharged. Our orders staying proceedings in the juvenile court are vacated. The parties shall bear their own costs for the writ petitions and proceedings in this court. (Cal. Rules of Court, rule 56(l).)
We concur: NICHOLSON and RAYE, JJ.


*486 APPENDIX

*487 
NOTES
[1]  Undesignated section references are to the Code of Civil Procedure. Undesignated rule references are to the California Rules of Court. Undesignated local rule references are to the San Joaquin County Superior Court Local Rules.

Section 170.6 provides in part: "(a)(1) No judge, court commissioner, or referee of any superior court of the State of California shall try any civil or criminal action or special proceeding of any kind or character nor hear any matter therein that involves a contested issue of law or fact when it shall be established as hereinafter provided that the judge or court commissioner is prejudiced against any party or attorney or the interest of any party or attorney appearing in the action or proceeding." Prejudice may be established by a motion with counsel's declaration that the judge is prejudiced. (§ 170.6, subd. (a)(2).)
[2]  Thus, contrary to the minors' assertion, the assignment was made by the court clerk, not by the People.

Juvenile court proceedings to declare a minor a ward of the court under Welfare and Institutions Code section 602 are commenced by the filing of a petition by the prosecuting attorney. (Welf. & Inst.Code, § 650.) Upon the filing of the petition, the clerk of the juvenile court issues a notice of hearing on filing of petition. (Welf. & Inst.Code, § 658; rule 1470(b) [where minor is not detained, juvenile court clerk provides notice of initial hearing].)
[3]  At the initial hearing, the court informs the minor of the allegations and possible consequences, and the court may accept a plea if the minor wishes to admit the allegations or enter a no contest plea. (Rule 1472.)
[4]  At the beginning of the jurisdiction hearing, the court reads the petition, explains the minor's rights, and asks if the minor admits or denies the allegations. (Rule 1487.) If the minor denies the allegations, the court shall hold a contested hearing to determine whether the allegations are true. (Rule 1488.)

Here, the minute orders reflect each minor denied the allegations at the first phase of the jurisdictional hearing, and the case was continued for the contested hearing to be held at a later date.
[5]  Daniel V. alleges Judge Haugner did not ask for a waiver of the purported all-purpose assignment before he heard the case and did not say anything about the case being assigned for all purposes to one judge. The People deny these allegations for lack of information because Daniel V. did not provide a reporter's transcript of the hearing before Judge Haugner. Daniel V. did submit with his petition to this court a declaration from his attorney, attesting that during the time he served in San Joaquin County's juvenile court, "I have never been asked . . . to agree to a different judge than originally assigned or to waive the presence of any judge because of the judge's absence on a given date. The appearance, contested hearing, motion, or whatever else the case is on calendar for that particular day would simply proceed as scheduled." Daniel also submitted to this court a transcript of the hearing at which Judge Kronlund denied the section 170.6 challenge, wherein Daniel's attorney made similar assertions but without an evidentiary showing.

We do not resolve factual disputes in this opinion, but we make note of them because, as we explain post, they portend future litigation unless resolved in respondent court.
[6]  The minors object to the People's declarations because they were not "presented below," and the minors have no way to verify their truth. As indicated, we do not resolve factual disputes in this opinion, but we note them here.
[7]  The notice on the courtroom door and counsel table said, in bold print: "Department J-2 [¶] All even numbered cases are assigned to Department J-2 [¶] [something blacked out] [¶] for all purposes including trial." As indicated, similar wording appeared on the notice of petition.
[8]  At the August 19, 2005, hearing (as reflected in the reporter's transcript), Judge Kronlund said she was absent on July 19 due to medical appointments.

Judge Kronlund's declaration in Jamie K.'s case asserts that during a period of "almost 7 months" she was absent from Department J2 (for other assignments, conferences, vacations, etc.) for a total of 19 days.
[9]  There is no declaration from the deputy court clerk but only a declaration from her supervisor, who said the deputy is on medical leave but stamped her name on the petition per standard procedure. For purposes of this appeal, we shall accept that the assignment was made by the court clerk rather than the District Attorney, because it bears the clerk's stamp.
[10]  Judge Kronlund declared she was absent on September 6, 2005, because she was attending a work-related conference in San Diego.
[11]  We do not read Lavi, supra, 4 Cal.4th 1164, 17 Cal.Rptr.2d 815, 847 P.2d 1031, as requiring that cases be complex in order to be assigned to one judge for all purposes.
[12]  The People also point out that signs were posted on the courtroom doors and on counsel tables, stating even-numbered cases are assigned for all purposes to Department J2. However, the People expressly disavow any reliance on the signs as creating an all-purpose assignment. Thus, the People's return to the writ petition says petitioners argue the sign in Department J2 did not create an all-purpose assignment, but "[t]he People do not maintain that it did. It is the petition's notice page, prepared and served by the court, that effected the all-purpose assignment here." The People assert the signs merely assured that adequate notice was given.
[13]  Rule 981, which defines "local rules" to include every policy of general application governing court practice (rule 981(a)), states in part: "Each court must make its local rules available for inspection"; "Each court executive officer must be the official publisher of the court's local rules [unless the court appoints someone else]"; and "each court must file with the Judicial Council an electronic copy of rules. . . ." (Rule 981(b), (c), (d).)
[14]  Local rule 3-101 states: "DIRECT CALENDARING OF CIVIL CASES [¶] UNLIMITED JURISDICTION CASES ONLY

"A. All cases described as personal injury, eminent domain, collection or other actions denominated as civil in nature shall be subject to assignment to a judicial officer for all purposes at the time of filing of the action. This section shall not apply to abandonment, adoption, mental health, petitions for approval of minors' compromises and family law cases. Nothing herein shall be construed to interfere with the Presiding Judge's authority to assign or reassign cases pursuant to [former rule] 205(6) [see now rule 6.603, authority and duties of presiding judge].
"B. Cases which are subject to direct calendaring shall be numerically, by last digit of the court case number, assigned to a judicial officer for all purposes, who shall thereafter handle all proceedings involving the matter, including trial, except as otherwise provided or required by law. At the time of the initial filing of any case, the Clerk's office shall affix to the face of the complaint or petition, and also upon the face of the Notice of Status Conference, by stamp or other writing, the following notice:
"`THIS CASE HAS BEEN ASSIGNED TO JUDGE ___ IN DEPARTMENT ___ FOR ALL PURPOSES, INCLUDING TRIAL.'
"Time limits for peremptory challenges of magistrates under CAP Section 170.6 for Plaintiffs shall be within ten (10) days after the filing of the complaint and receiving notice of the assignment, and for defendants, within ten (10) days after filing the first pleading or appearance."
[15]  We note the content of local rule 3-101 makes it apparent that "UNLIMITED JURISDICTION" does not refer (and no one argues that it does refer) to the distinction between "limited civil cases" and "unlimited civil cases" introduced by trial court unification to differentiate former municipal court cases from superior court cases. (§ 85 [action shall be treated as limited civil case only if amount in controversy does not exceed $25,000, the relief sought is a type that may be granted in a limited civil case, and relief is of a type described by specified statutes]; General Electric Capital Auto Financial Services, Inc. v. Appellate Division (2001) 88 Cal.App.4th 136, 141-142, 105 Cal.Rptr.2d 552 [trial court unification resulted in introduction of concept of limited civil case to describe former municipal court cases].)
[16]  We express no view on the validity of local rule 3-101 as applied to cases of unlimited jurisdiction in respondent court.
