
77 Cal.App.3d 169 (1978)
143 Cal. Rptr. 398
JAMES H., a Minor, Petitioner,
v.
THE SUPERIOR COURT OF RIVERSIDE COUNTY, Respondent; THE PEOPLE, Real Party in Interest.
Docket No. 19283.
Court of Appeals of California, Fourth District, Division Two.
January 26, 1978.
*171 COUNSEL
Joseph J. Storto for Petitioner.
Byron C. Morton, District Attorney, and James B. Chew, Deputy District Attorney, for Respondent and for Real Party in Interest.
*172 OPINION
GARDNER, P.J.
(1a) In this case we hold that in the absence of any statutory procedure for so doing the juvenile court has the inherent power to determine a minor's mental competence to understand the nature of proceedings pending under Welfare and Institutions Code section 707, subdivision (b) and to assist counsel in a rational manner at that hearing.
Under Welfare and Institutions Code section 602, a petition had been filed in the juvenile court alleging that the minor, age 17, had committed forcible rape (Pen. Code, § 261, subd. 3). The real party in interest filed a notice of motion, under Welfare and Institutions Code section 707, subdivision (b), to declare minor not a fit and proper subject for the juvenile court.
Prior to the proposed Welfare and Institutions Code section 707, subdivision (b) proceedings, the court had appointed a psychiatrist, Dr. John McMullin, to examine the minor "due to the possible issue of diminished capacity of minor at the time of the alleged offense." Dr. McMullin filed a report in which he concluded that minor showed borderline mental retardation and had a "long-standing drug dependency ... which will require a structured environment." Dr. McMullin further opined that there was nothing to indicate diminished capacity; that at the time of the offense minor was legally sane; and further that minor was "aware of the nature and the purpose of the charges against him and is, within the limits of his mental capabilities, able to cooperate with counsel in presenting a defense."
Dr. McMullin referred minor to Dr. Stephen Lawrence, a psychologist, for interview and testing. Dr. Lawrence then filed a report in which he, too, concluded that minor was mentally retarded and had a long standing and severe drug dependency (paint sniffing). Dr. Lawrence concluded that the minor had the mental capacity to form the specific intent to kidnap and rape and that he was legally sane at the time of the commission of the offense although he did suffer from some diminished capacity. However, Dr. Lawrence concluded that minor was not presently able to understand the nature and purpose of the proceedings against him, was not presently able to cooperate with counsel in a rational manner and "[h]ence, the defendant is judged presently legally incompetent to stand trial."[1]
*173 Armed with Dr. Lawrence's report, counsel for minor objected to proceeding with the Welfare and Institutions Code section 707, subdivision (b) hearing on the ground his client was incompetent. The court overruled the objection, stating that competency was not an issue. Minor filed a petition for writ of prohibition. This court issued an alternative writ.
Minor's position is that although he would come within the framework of Penal Code sections 1367-1368 were he an adult, such procedures do not exist in the juvenile court, and therefore the court is unable to proceed. He asks that we dismiss all pending proceedings.
Real party in interest contends: (1) the issue is premature since the court has not indicated any doubt as to the minor's present competency; and (2) the minor's present competency is not a prerequisite to the court's proceeding with the Welfare and Institutions Code section 707, subdivision (b) hearing. In this respect, the real party in interest argues that the minor will in no way be prejudiced by proceeding with such a hearing even though he cannot cooperate with his attorney. The argument proceeds that if, as a result of the hearing, he is sent to the adult court, proceedings under Penal Code sections 1367-1368 can be instituted. If he is not found unfit under Welfare and Institutions Code section 707, subdivision (b), he will remain in the juvenile court where the question of his mental competency can be thrashed out within the framework of the Juvenile Court Law, i.e., by recourse to Welfare and Institutions Code sections 705 and 6550. (See In re Michael D., 70 Cal. App.3d 522 [140 Cal. Rptr. 1].)
We find neither position acceptable. However, neither do we find any statutory procedure in the Juvenile Court Law which fits this situation. Therefore, we improvise.

THE RIGHT TO COUNSEL AT A WELFARE AND INSTITUTIONS CODE SECTION 707, SUBDIVISION(b) HEARING
(2) Unquestionably, a minor has a right to counsel in the juvenile court. Not only is this established by statute (Welf. & Inst. Code, §§ 700, 679), it has been established as a matter of constitutional due process (In *174 re Gault (1967) 387 U.S. 1 [18 L.Ed.2d 431, 87 S.Ct. 498]). It is true that the holding in Gault was limited to those proceedings which might result in a commitment to an institution. Nevertheless, the statutory scheme in California, both before and after Gault, provides counsel for the minor in all proceedings which require or permit the minor's personal participation. It is true that the attorney of one presently incapable of cooperating with his attorney may contest any issue susceptible of fair determination without the personal participation of the client. Such matters as demurrers and Penal Code section 995 motions come within this concept. (See People v. Superior Court (Hulbert) (1977) 74 Cal. App.3d 407 [141 Cal. Rptr. 497].) However, Welfare and Institutions Code section 707 proceedings are not such proceedings. The section itself provides that the court may consider not only the probation officer's report but "any other relevant evidence which ... the minor may wish to submit."

THE RIGHT TO COUNSEL MEANS THE RIGHT TO EFFECTIVE COUNSEL
The right to counsel is meaningless unless that right is construed to mean effective counsel. The United States Supreme Court in Kent v. United States (1966) 383 U.S. 541 [16 L.Ed.2d 84, 86 S.Ct. 1045] explicitly referred to a minor's right to effective counsel. (Kent, supra, at p. 554 [16 L.Ed.2d at p. 93].) If a person cannot effectively communicate or cooperate with his counsel that counsel rather obviously cannot be effective. "Counsel cannot effectively represent a defendant who is unable to understand the proceedings or to rationally assist him." (Hale v. Superior Court (1975) 15 Cal.3d 221, 228 [124 Cal. Rptr. 57, 539 P.2d 817]; see Chambers v. Municipal Court (1974) 43 Cal. App.3d 809, 813 [118 Cal. Rptr. 120].)

COMPETENCY HEARINGS ARE REQUIRED BY PRINCIPLES OF DUE PROCESS
(3) Due process demands that a person constitutionally entitled to the right to effective counsel be afforded a hearing as to his competency to cooperate with that counsel. "When facts giving rise to a doubt regarding a defendant's present sanity become known to the trial judge, due process requires that the court on its own motion, suspend proceedings in the case until the question is determined in a sanity hearing." (People v. Tomas (1977) 74 Cal. App.3d 75, 88 [141 Cal. Rptr. 453].) Tomas relied on Pate v. Robinson (1966) 383 U.S. 375 [15 L.Ed.2d 815, 86 S.Ct. 836]; Dusky v. United States (1960) 362 U.S. 402 [4 L.Ed.2d *175 824, 80 S.Ct. 788]; and Drope v. Missouri (1975) 420 U.S. 162 [43 L.Ed.2d 103, 95 S.Ct. 896], which cases hold that failure to afford a defendant a hearing on his present competency to cooperate with his attorney deprives a defendant of his constitutional right to a fair trial.

THE INHERENT POWER OF THE COURT TO HOLD SUCH A HEARING
(1b) Having laboriously determined that the minor is entitled to a competency hearing at a Welfare and Institutions Code section 707, subdivision (b) proceeding and facing the unquestioned fact that the authors of the Juvenile Court Law have simply failed to provide any proceedings comparable to Penal Code sections 1367-1368, the question remaining is whether the court has the inherent power to hold such a hearing. We hold that it does.
(4) Courts have the inherent power to create new forms of procedure in particular pending cases. "The ... power arises from necessity where, in the absence of any previously established procedural rule, rights would be lost or the court would be unable to function." (Witkin, Cal. Procedure (2d ed.) Courts, § 123, p. 392.) This right is codified in Code of Civil Procedure section 187 which provides that when jurisdiction is conferred on a court by the Constitution or by statute "... all the means necessary to carry it into effect are also given; and in the exercise of this jurisdiction, if the course of proceeding be not specifically pointed out by this code or the statute, any suitable process or mode of proceeding may be adopted which may appear most conformable to the spirit of this code." (See also Code Civ. Proc., § 128, subd. 8.) As the Supreme Court said in People v. Jordan, 65 Cal. 644 at page 646 [4 P. 683], "[i]n the absence of any rules of practice enacted by the legislative authority, it is competent for the courts of this State to establish an entire Code of procedure in civil cases, and an entire system of procedure in criminal cases, ..." (See also Citizens Utilities Co. v. Superior Court (1963) 59 Cal.2d 805, 813 [31 Cal. Rptr. 316, 382 P.2d 356], recognizing the inherent power of courts to adopt "`any suitable method of practice ... if the procedure is not specified by statute or by rules adopted by the Judicial Council.'")
In In re M.G.S., 267 Cal. App.2d 329 [72 Cal. Rptr. 808], the court had no difficulty whatsoever in applying the defense of legal insanity in juvenile court proceedings even though no statutory mention is made of *176 that defense, nor does there exist in juvenile court proceedings any statutory procedures similar to Penal Code section 1026 et seq.
Throughout the years following Kent and Gault, juvenile courts throughout the nation have been improvising procedures to comply with newly announced constitutional mandates pending action by the Legislature. California has been lucky. Due to the 1961 juvenile court reform, the California legislative program has kept abreast of the constitutional imperatives. (See Gardner, Gault and California, 19 Hastings L.J. 527.) But even so, during the period from Gault to the present many situations have arisen which have demanded improvisation to meet changing constitutional requirements. Without any fuss or commotion, the juvenile courts have done so without recourse to the Legislature or to the reviewing courts. They have done so without any evangelistic illusions of judicial wisdom. They have simply been forced to rely on their inherent powers to formulate procedures which have not yet attained legislative approval. Such is the instant case.

THE SOLUTION
(1c) Having determined that the court has the power and the duty to delve into the problem of a minor's capacity to cooperate with his attorney, what happens next?
As the real party in interest points out, the court has not as yet made a determination that a doubt exists as to the minor's capacity or ability to cooperate with his attorney. All the court has before it are the reports of some behavioral scientists and those reports are not consistent. Thus, the first order of business is for the court, on the record, to make a determination as to whether such a doubt exists in the court's mind. If the court finds that no such doubt exists, it shall then proceed with the section 707, subdivision (b) hearing.
However, if the court does entertain such a doubt, then it should immediately suspend proceedings and conduct a hearing into the question of the minor's present competence. (5) In making that determination, the court may borrow from Penal Code section 1367 and use as a yardstick the definition of incompetency set forth in that section, i.e., that the minor, by reason of mental disorder or developmental disability, is unable to understand the nature of the proceedings taken against him and assist counsel in the conduct of those proceedings in a rational manner. (See People v. Aparicio, 38 Cal.2d 565 [241 P.2d 221].) *177 Or the court may be guided by the statement of the United States Supreme Court in Dusky, supra, that the test is whether the minor has sufficient present ability to consult with his lawyer with a reasonable degree of rational understanding and whether he has a rational as well as a factual understanding of the proceedings against him. To anyone but a hairsplitting semanticist, the two tests are identical.
(1d) If the court finds that the minor is capable of cooperating with his counsel, the court should then proceed with the section 707, subdivision (b) hearing. If, however, the court finds that the minor cannot cooperate with his counsel, resort should then be made to existing juvenile court proceedings under Welfare and Institutions Code section 705, wherein a minor who is mentally disordered may be committed to an approved facility for care and treatment under Welfare and Institutions Code section 6550. While the legal pigeonhole of "mentally disordered" is not identical with the test of mental competency to aid counsel, unquestionably the psychiatric treatment available for one mentally disordered would also be aimed at restoring the minor to such a condition that he could eventually be able to aid his counsel in further proceedings. If, after treatment, he is found to be so capable then he would be returned to the juvenile court for further proceedings. In the meantime, if he has passed his 18th birthday, no jeopardy is attached and he can be processed through the adult court. If his condition is as irremediable as Dr. Lawrence indicates, the juvenile court should probably undertake a long term commitment program under one of the many civil commitment proceedings for the mentally ill.
In order to effect all of this we construe the petition for writ of prohibition as a petition for writ of mandate. So construed, we grant the petition and direct the court as follows:
(1) Advise on the record as to whether it entertains a doubt as to the defendant's present capacity to cooperate with counsel.
(2) If no such doubt exists, proceed with the Welfare and Institutions Code section 707 hearing.
(3) If such doubt does exist, suspend proceedings and hold a hearing in regard to the defendant's present capacity.
*178 (4) If, as the result of that hearing, the court finds that the minor can cooperate with counsel, the court should then reinstate proceedings and proceed with the Welfare and Institutions Code section 707 hearing.
(5) If the court finds that the minor is incapable of cooperating with counsel, the court should then institute proceedings under Welfare and Institutions Code section 705.
Kaufman, J., and Morris, J., concurred.
NOTES
[1]  Dr. Lawrence concluded that the organic brain damage is irreversible. Thus, if Dr. Lawrence's legal conclusions are correct, society is faced with an individual who can go through life committing crimes for which he is legally responsible, but who can never be successfully prosecuted for those crimes.
