> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trustgated.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Optional reorder

> Score a whole list, badge and flag it by default, and re-rank by trust only if you choose to.

## The idea

This is the discovery path made hands-on. You hand TrustGate a list, you get a read per item, and then you decide how far to take it. The default is to show trust without touching your order. Reordering is a separate, deliberate step you opt into.

The order of operations matters here, so read it in order.

<Steps>
  <Step title="Score the list">
    Send your list of tokens in one batch read and get back a read for each. This is the batch path that powers discovery.
  </Step>

  <Step title="Badge and flag, in your order">
    The default and least invasive move. Render a trust badge and any flags next to each item, in the exact order your feed already has. Your ranking is untouched. Users simply gain a read they did not have.
  </Step>

  <Step title="Reorder, only if you choose">
    Optional and explicit. Pass the scored list to the reorder helper to sort or re-rank it by trust, then apply the result. You decide whether to call this at all, on which items, and when.
  </Step>
</Steps>

<Warning>
  Reordering is never automatic. TrustGate will not rearrange your feed on its own. The helper hands you a reordered list and stops there. Applying it is your call, every time. If you never call it, your order never changes.
</Warning>

## Illustrative shape

<Warning>
  The batch request and the helper signature below are illustrative. They show the flow, not the live endpoint or the exact function names. Both are being finalized with the batch path. Send them to me when ready and I will document the working versions here.
</Warning>

```js theme={null}
// 1. Score the list in one batch read
const reads = await scoreBatch([tokenA, tokenB, tokenC]); // endpoint to confirm

// 2. Default: render in your existing order, just add badges and flags
renderFeed(myList, reads);

// 3. Optional and explicit: re-rank by trust, then decide to apply it
const reordered = reorderByTrust(myList, reads); // helper, signature to confirm
// you choose whether to use `reordered` or keep `myList`
```

## Why it is built this way

A discovery feed is a product decision, and it belongs to you. A trust layer that quietly reshuffled it would be taking over the very thing that makes your feed yours. So TrustGate draws the line hard: it will badge, it will flag, it will offer you a trust-ranked version of the list, and it will never impose one. The strongest, most invasive action is the one most clearly left in your hands.

<Note>
  Badging and flagging are safe to ship as the default everywhere. Reach for reordering when you have decided trust should shape the order, not before.
</Note>

## Next

<CardGroup cols={2}>
  <Card title="The discovery product page" icon="list" href="/products/discovery">
    The overview and the opt-in ladder in full.
  </Card>

  <Card title="Consume the score" icon="plug" href="/integrate/consume-score">
    The underlying read, single or batch.
  </Card>
</CardGroup>
