update rs.js to gd-dir-querying and add design docs