add reduce
add design docs and validation
add errors
fix up comments, add refernce to JSTest issue