Ok, I am being silly. Jun has already taken the first steps. For some reason when I last looked at his code, I didn't get it. Now it all makes sense. Check out the BCMS package in contrib. It isn't everything I wanted, but it offers a prerty comprehensive tcl api to the content repository.
I think we might want to move some of these into the CR itself.