> For the complete documentation index, see [llms.txt](https://docs.tryflox.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tryflox.xyz/concepts/the-log.md).

# The tamper-evident log

Every assessment Flox makes is written to an append-only log where each record is cryptographically linked to the one before it.

## How the chain works

Each record commits to its predecessor:

```
hash_n = sha256( hash_{n-1} || canonical_json(record_n) )
```

`canonical_json` sorts keys and strips whitespace, so the hash is stable across serializers. Because every record folds in the previous hash, the entire history is fixed by a single 32-byte value — the head.

Change any past record and its hash changes, which breaks every hash after it. `node src/cli.js verify` recomputes the chain from genesis and reports the first record that doesn't match.

## Anchoring

The head is published on Robinhood Chain via the `FloxAttestation` contract. Once anchored, editing a past call would require producing a chain whose head matches one already on mainnet — which the hash function makes infeasible.

Coverage only ever extends. The contract rejects a commit with a lower record count than the last, so history cannot be silently shortened. Re-anchoring after new assessments extends the on-chain guarantee to cover them.

## Why refusals matter here

The value of the log is not that it records the good calls — anyone will show you those. It is that it records the refusals, the passes, the times Flox declined, and makes it impossible to remove them after the fact. A track record you cannot prune is the only one that tells you how the agent actually behaves.

Each record is also signed by the attestor key, so you can confirm who committed it, not just that it is internally consistent.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tryflox.xyz/concepts/the-log.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
