I don't know if this is helpful, but in Texas the child is appointed a guardian ad litum (sp?)--a lawyer who represents them in the legal system. However, in my experience it was really the CPS caseworker who made the big (and mostly final) decisions about what happened. The judge generally tended to just go with their recommendations, and I would *imagine* (don't know for sure) that would generally be the case unless the parents were able to hire some kind of hot-shot lawyer who could game the system, if you will.
There is also (in Texas and some other states, not sure about NY) a CASA worker (Court Appointed Special Advocate), but I only met ours once, and I was never really very clear on what she was supposed to be doing.
Not sure if you need this much detail, but in general, (while in foster care) the child has to have a check-up with a doctor within a certain number of days (eg 21 days here) unless there are obvious injuries or signs of abuse that need to be checked out and documented. In many cases they must have developmental evaluation within a certain length of time to make sure there are no delays from neglect, etc. If they are school-aged, they must be in the public school system (no home-schooling). None of this applies if it's a straight adoption, of course, but in the case you're describing she likely wouldn't be directly adopted anyway. There's almost always some kind of "trial" period to make sure the child is a good match for the family before making it permanently legal.
In the case you described, the child being an orphan, I agree with an earlier post that they would have an emergency 14-day placement with a licensed foster family while CPS researched the case and tried to find 1) a will naming a guardian, e.g. godparents, 2) blood relatives, 3) possible kinship placements -- non-relatives who are familiar with the child and are willing to care for him/her until he/she turns 18 years old. (That could be a favorite teacher, a daycare worker, a close family friend, even a neighbor if there was an well-established relationship with the child.) In all cases, they'd have to pass background check, etc, first.
In the case where the mother is known (but has had rights terminated or is deceased) and they cannot locate the father, I've heard that they put some kind of public announcement (again, this is TX, so not sure about NY) in the papers or something, and that that somehow covers their due diligence to find the father, after which the child is free to be adopted (assuming there are no other legal concerns).
OTOH, I know of at least one case (in another state) where a baby girl was adopted and then three years later her father, who was in the military and had been overseas at the time of the announcement, came back and realized his wife/girlfriend(?) hadn't aborted like she'd said, and he ended up finding his daughter and winning custody back.
When a child is tentatively up for adoption but full due diligence hasn't yet been completed, they call it a "legal risk" placement. This type of family would have to be licensed to both foster and adopt (generally most in TX are licensed for both), they would be foster parents until legal risks had been resolved, but with the stated intent to adopt as soon as possible. Whereas foster-only parents would care for the child however long it took until a permanent placement was decided.
In Texas, CPS has 12 months to decide on a long-term plan for the child's future, whether that be return to parents, placement w/others, long-term foster care, or adoption.
I'm sorry I don't know about NY specifically, but hopefully by what I've shared, it gives you a springboard of what to look for. Happy writing!