Order my goals under the goals they serve

Keep my goals in the order they are shown, each one under the goal it serves, so a goal with several parents is shown once and none is hidden by a missing parent or a loop

Give goals ([{ id, title?, parents?, children? }]; parents and children name other goals by id or { id }). The goals are ordered by the reader the app's goal list used (read-data/pursuit-hierarchy-view.mjs): each top goal in the order given, then the goals under it, depth first; a goal with several parents is one row, indented under the first parent reached; a goal whose parent is not among those given, or that is in a cycle, is still shown. Answers rows ([{ id, title, depth, shown_under, parents }]) and count. Refuses goals that is not a list and a goal without an id. Reads no records, keeps nothing and sends nothing. The Home screen did more than this run does: it saved goals, marked the one needle mover, focused the app on one goal or space, and greeted the person with the next step and their AIs' work in the words of home-words.json; none of that is here, and this run does not read home-words.json.

What it asks for

Nothing: your AI starts it with your words.

Use it from your AI

Connect the AI you already use to Trillion once. Then ask in your own words; your AI finds this tool by what it does and runs it.

Say to your AI: “Use Trillion to keep my goals in the order they are shown, each one under the goal it serves, so a goal with several parents is shown once and none is hidden by a missing parent or a loop”