
963 So.2d 864 (2007)
K.E., a child, Petitioner,
v.
DEPARTMENT OF JUVENILE JUSTICE, Respondent.
No. 1D07-2915.
District Court of Appeal of Florida, First District.
August 14, 2007.
*865 Nancy A. Daniels, Public Defender, John W. Hedrick, Assistant Public Defender, and Spencer Bishins, Certified Legal Intern, Tallahassee, for Petitioner.
Bill McCollum, Attorney General, Trisha Meggs Pate, Assistant Attorney General, and Heather F. Ross, Assistant Attorney General, Office of the Attorney General, Tallahassee; Jennifer Parker, General Counsel, Department of Juvenile Justice, Tallahassee, for Respondent.
PADOVANO, J.
K.E., a child, petitioned this court for a writ of habeas corpus to challenge the validity of her detention, pending the outcome of a juvenile delinquency proceeding. The court granted the petition and issued an order directing the Department of Juvenile Justice to release the child. By this opinion, we now state the reasons for granting relief.
The child was accused of committing a battery on her mother and resisting a police officer without violence. Both offenses are misdemeanors. Following a domestic argument in which the child was reported to have been throwing things around the house, the mother called the police. An officer arrived at the home, and the child allegedly pushed his arm away as he was attempting to handcuff her.
A detention hearing was held the next day before Judge Richard Hood, a senior judge covering the juvenile delinquency docket. The child had a total score of two points on the Risk Assessment Instrument and therefore did not meet the general criteria for detention under section 985.245, Florida Statutes (2007). However, a specific provision in section 985.255(2) authorizes the court to place a child charged with an offense of domestic violence in secure detention if an alternative placement, referred to in the statute as "respite care," does not exist. Based on this statute, Judge Hood ordered that the child be placed in secure detention.
A space became available at the Capital City Youth Services facility, and the child then moved for release from the custody of the Department of Juvenile Justice. This motion was called up for a hearing on June 6, 2007, before Judge Angela Dempsey. The child's mother objected to the proposed placement and expressed her fear that the child might run away. At the conclusion of the hearing, Judge Dempsey denied the motion and ordered that the child remain in secure detention. The detention order stated as reasons for continuing to hold the child in secure detention that the mother feared the child would run away from the facility, that she would take drugs, that she would exchange sex for drugs, and that she might commit a battery on her again.
The child petitioned this court for a writ of habeas corpus to challenge this order, but her detention status changed before the court could consider the case. While the petition was pending, the child entered a plea of nolo contendere to the two misdemeanor charges. Judge Hood accepted the plea and placed her on home detention, pending the disposition hearing.
In light of this development, the state contended that the petition for writ of habeas corpus had become moot. The child replied that the controversy continued to exist, because her new detention order, although less restrictive, was still *866 unlawful. Specifically, she argued that the second order was defective because it failed to explain the reasons for placing her in home detention. In response to this argument, the state took the position that the child should have been required to file a new petition for writ of habeas corpus directed to the home detention order.
We decline to dismiss the petition in this case on the ground that it is moot. It is true, as the state argues, that the petition for writ of habeas corpus was directed to the order entered by Judge Dempsey and that the child was no longer being detained under that order. However, Florida courts have frequently addressed juvenile detention issues after the expiration of the order at issue because they are "capable of repetition yet evading review." See K.P. v. State, 952 So.2d 1229 (Fla. 5th DCA 2007); T.T. v. Esteves, 828 So.2d 449 (Fla. 4th DCA 2002); W.B.T. v. Esteves, 825 So.2d 1055 (Fla. 4th DCA 2002); T.C. v. Layne, 725 So.2d 1278 (Fla. 4th DCA 1999). Juvenile detention is a remedy that is used only for a brief period of time.
Furthermore, the subsequent home detention order merely changed the form of the restraint. It did not remove the need to determine whether the child was being detained illegally. Judge Hood placed the child on home detention when she entered her plea, but the child did not have a high enough score to justify any restraint, and Judge Hood's order, like Judge Dempsey's order before it, failed to state a valid reason for the detention. In these circumstances, we can see no reason why the child should have been required to file a new habeas corpus petition challenging the most recent order.
An order detaining a child in the custody of the state pending a juvenile delinquency hearing must comply with the statutes authorizing juvenile detention. See R.W. v. Soud, 639 So.2d 25 (Fla.1994); S.W. v. Woolsey, 673 So.2d 152 (Fla. 1st DCA 1996). Section 985.24 provides that a child may be detained only for the specific reasons given in the statute. Additionally, section 985.245 states that, in the absence of a specific statutory exception, an order placing a child in detention "shall be based on a risk assessment of the child."
The risk assessment is done uniformly throughout the state on a standardized document known as a Risk Assessment Instrument. According to the criteria set by this instrument, a child who has a score of twelve or more points qualifies for secure detention, a child who has a score of seven to eleven points qualifies for home detention, and a child who scores below seven points does not qualify for any form of detention.
A trial judge may deviate from the level of restrictiveness required by the scoring, but in that event, the judge must explain why the deviation is necessary. Section 985.255(3)(b) directs that "[i]f the court orders a placement more restrictive than indicated by the results of the risk assessment instrument, the court shall state in writing, clear and convincing reasons for such placement." (emphasis added) The written statement of the clear and convincing reasons for deviating from the level of restrictiveness indicated by the standardized scoring is not optional; it is required in order to make a more restrictive placement lawful. See D.B. v. State, 848 So.2d 1219 (Fla. 3d DCA 2003).
The procedure for justifying a deviation promotes a broader legislative policy of controlling the use of detention. This policy is expressed in section 985.02(4), in the following terms: "The Legislature finds that detention should be used only when less restrictive interim placement alternatives prior to the adjudication and disposition are not appropriate." Other parts of *867 Chapter 985 also reveal a legislative intent to minimize the use of detention. For example, section 985.115(1) states, "A child taken into custody shall be released from custody as soon as reasonably possible." Section 985.24(2) prohibits the use of detention to allow a parent to avoid responsibility, to facilitate the interrogation of a child, to permit more convenient access to a child, or because an appropriate housing facility is not available. And section 985.24(4) directs that the Department of Juvenile Justice shall "continue to identify alternatives to secure detention."
If a trial judge were to treat the power to detain a child as a purely discretionary power, the purpose of the detention statute would be subverted. The Legislature has granted judges authority to exercise discretion in those exceptional cases that should not be governed entirely by the standardized scoring, but that discretion must be exercised according to the statutory procedures. Detention is not a remedy to be used indiscriminately.
The child in this case had a total score of two points, which is not enough to justify any form of detention without a written statement of clear and convincing reasons. She would have been eligible for detention based on the charge of domestic violence, but only if there had been a finding that secure detention was necessary to protect the victim. Neither order contained a finding that is sufficient to justify detention.
Judge Dempsey denied the child's motion for release from secure detention and ordered her continued secure detention in part because the child's mother feared that she posed an ongoing threat of domestic violence. However, this ceased to be a valid reason for secure detention once the child's lawyer located an approved alternative placement. Whatever risk may have existed would have been mitigated by the fact that the child would not be living with her mother.
Section 985.255(2) provides for the detention of a child charged with domestic violence only for a limited time and only when the evidence shows that it is necessary. The statute provides in material part:
(2) A child who is charged with committing an offense of domestic violence as defined in s. 741.28 and who does not meet detention criteria may be held in secure detention if the court makes specific written findings that:

(a) Respite care for the child is not available.
(b) It is necessary to place the child in secure detention in order to protect the victim from injury.
§ 985.255(2), Fla. Stat. (2007) (emphasis added).
Judge Dempsey did not make either of the findings that would be required to continue the child's secure detention under section 985.255(2). Instead, it appears that she attempted to justify a continued detention by stating reasons for departing from the risk assessment instrument. That was not the issue at the hearing on the child's motion to be released to an alternative living facility. Moreover, the reasons given for the departure (that the mother feared that the child would run away and then perhaps take drugs or engage in sexual activity) are not sufficient to justify an order holding a child with two misdemeanor offenses and a score of only two points in a secure detention facility.[1]
*868 Although the nature of the detention changed, the error was compounded in the subsequent detention order entered by Judge Hood. This order does not explain why any form of detention is necessary. It has a blank space for stating the reasons for imposing a placement more restrictive than that indicated by the Risk Assessment Instrument. It appears that the words, "child is care" were written in the blank but then crossed out. Nothing further is written in the blank space.
These errors lead us to conclude that our main point bears repeating. Juvenile detention is a matter that is controlled by legislation. It is not for us, as judges, to question the wisdom of the legislation. Rather, our task is simply to carry it out. Section 985.255 establishes the criteria for detaining a child, pending the outcome of a juvenile delinquency case. A decision to detain a child must be made according to the statutory criteria.
Petition granted.
ALLEN and BENTON, JJ., Concur.
NOTES
[1]  Within the last eighteen months this court has issued writs of habeas corpus directed to Judge Dempsey in fourteen juvenile delinquency cases, including this one. In ten of the previous cases, the writs were issued because the judge either failed to give adequate reasons for departing from the risk assessment instrument or failed to give any reason at all. These include T.A. v. Department of Juvenile Justice, 1D05-5807 (Kahn, Webster and Polston) (the court granted habeas corpus directing the release of a child in part because Judge Dempsey did not prepare a written order explaining the reasons for deviating from the risk assessment); Y.S. v. Department of Juvenile Justice, 1D05-6148 (Davis, Barfield and Hawkes) (the court granted habeas corpus and directed the immediate release of a child who had been held in secure detention, despite the fact that the child scored only one point on the risk assessment); K.C. v. Department of Juvenile Justice, 1D06-1392 (Kahn and Benton, Wolf dissenting) (the court granted habeas corpus and ordered the release of a child on the grounds that Judge Dempsey failed to comply with the requirements of the detention statute and that the child scored only one point on the risk assessment and did not otherwise qualify for secure detention); Z.B. v. Department of Juvenile Justice, 938 So.2d 584 (Fla. 1st DCA 2006) (Wolf, Van Nortwick and Browning) (the court granted habeas corpus, concluding that a curfew violation does not qualify as "absconding" and that Judge Dempsey therefore erred in adding ten points for absconding to the child's original score of two points); G.T. v. Department of Juvenile Justice, 1D06-3989 (Wolf, Van Nortwick and Browning) (the court granted habeas corpus and ordered the release of a child on the ground that Judge Dempsey erred by adding ten points to the child's score of three points after expressing her view that it was "ridiculous" that the child's failure to complete the requirements of his probation did not amount to a new law violation); C.T. v. Department of Juvenile Justice, 1D06-5807 (Ervin, Browning and Allen) (the court granted habeas corpus and directed the immediate release of a child, because Judge Dempsey had erred by adding ten points for absconding, based on a curfew violation, contrary to the court's earlier opinion in Z.B., which involved a writ of habeas corpus directed to Judge Dempsey on the same point of law); D.P. v. Department of Juvenile Justice, 1D06-4032 (Browning, Wolf and Van Nortwick) (the court granted habeas corpus, concluding that Judge Dempsey had erred by adding one point to the score, thus making the child eligible for secure detention); K.C. v. Department of Juvenile Justice, 1D06-6050 (Browning, Davis and Lewis) (the court granted habeas corpus and released a child from secure detention on the ground that Judge Dempsey had failed to state clear and convincing reasons for deviating from the risk assessment instrument); H.D. v. Department of Juvenile Justice, 1D06-6580 (Davis, Wolf and Allen) (the court granted habeas corpus and directed the release of a child on the ground that he had not been charged with a crime of violence [possession of a pocket knife], as Judge Dempsey had concluded); T.D. v. Department of Juvenile Justice, 1D07-1377 (Kahn, Polston and Thomas) (the court granted habeas corpus and directed the immediate release of a child, concluding that the child did not meet the statutory criteria for detention and that Judge Dempsey had therefore erred by ordering him to be held in secure detention).
