If the "arrangement" tokens (sort, dir, limit, offset) are the key issues here, then we may be able to come up with a relatively straightforward limited solution.  The difficulty comes in adding new relationships and operators that are supposed to take effect after the append/prepend, which would mean we have to do a query, monkey with the results, and then do another query or queries.   That's probably a ways out.

 

But if we're just talking about arrangment stuff that can really happen in the initial query (limits, sorting by most things other than content, etc) then we might be able to put this together fairly quickly.  The issue will be making WQL smart enough to know its limits and fail on queries it can't handle correctly.