(b) In its discretion, the court may appoint a lawyer to represent the child, if the child is competent to direct the terms of the representation and court has a reasonable basis for finding that the appointment would be helpful in resolving the issues of the case. The court shall specify the terms of the appointment, including the lawyer's role, duties and scope of authority.
(c) When substantial allegations of domestic abuse have been made, the court shall order an investigation under section three hundred one of this article or make an appointment under subsection (a) or (b) of this section, unless the court is satisfied that the information necessary to evaluate the allegations will be adequately presented to the court without such order or appointment.
(d) Subject to whatever restrictions the court may impose or that may be imposed by the attorney-client privilege or by subsection (d), section two hundred two of this article, the court may require the child or parent to provide information to an individual or agency appointed by the court under section three hundred one of this article or subsection (a) or (b) of this section, and it may require any person having information about the child or parent to provide that information, even in the absence of consent by a parent or by the child, except if the information is otherwise protected by law.
(e) The investigator who submits a report or evidence to the court that has been requested under section three hundred one of this article and a guardian ad litem appointed under subsection (a) of this section who submits information or recommendations to the court are subject to cross-examination by the parties. A lawyer appointed under subsection (b) of this section may not be a witness in the proceedings, except as allowed under standards applicable in other civil proceedings.
(f) Services and tests ordered under this section shall be ordered only if at no cost to the individuals involved, or at a cost that is reasonable in light of the available financial resources.