Since ordering of `/sites` [is not guaranteed][1], how do i effectively order sites in a user-friendly way?

General requirements:

1. Trilogy must stay on the top of the list

    [stackoverflow.com,meta.stackoverflow.com,serverfault.com,meta.serverfault.com,superuser.com,meta.superuser.com, ...]

2. StackApps should stay on the bottom of the list or just below the Trilogy.

    [...., stackapps] or [..meta.superuser.com, stackapps, ...]

3. New beta Stack Exchange sites must be grouped with their meta site.  

    [.., webapps.stackexchange.com, meta.webapps.stackexchange.com, gaming.stackexchange.com, meta.stackexchange.com,..]

4. Official Stack Exchange sites (out of beta) should compare below the Trilogy.

any ideas, thoughts, hints?


  [1]: http://stackapps.com/questions/1183/new-meta-sites-out-of-order-in-sites