The juvenile court has the authority to review an Agency’s decision declining to file a dependency petition, and that authority does not violate the separation of powers doctrine. The minor ran away from his home in Guatemala when he was 16 years old, and was found homeless in San Francisco. The Department of Human Services investigated, and declined to file a petition. Legal Services for Children served as counsel to the minor and challenged the Department’s decision not to initiate dependency proceedings by filing an application pursuant to Welfare and Institutions Code section 331 seeking court review. The juvenile court ordered the Department to file a dependency petition and take the minor into protective custody. In an appeal from the order sustaining the petition, the Department contended that the juvenile court’s order was unauthorized by statute or in violation of the doctrine of separation of powers. The appellate court rejected the argument, finding that the under the authority of section 331, the juvenile court may order the Department to file a dependency petition and this authority does not violate the separation of powers doctrine.