Elamur: **Mova** · [Parse](https://mova.elamur.ai/free/en/parse/) · [Research](https://md.research.elamur.ai/free/en/) · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Shryfti](https://md.shryfti.elamur.ai/free/en/)

[Mova](https://md.mova.elamur.ai/free/en/) · [this page in HTML](https://mova.elamur.ai/free/en/docs/tools/pufferfish/)

[Mova](https://md.mova.elamur.ai/free/en/) / [docs](https://md.mova.elamur.ai/free/en/docs/) / [tools](https://md.mova.elamur.ai/free/en/docs/tools/) / pufferfish — 🐡 the Pufferfish

- [prompts](https://md.mova.elamur.ai/free/en/docs/tools/pufferfish/prompts/) — 2
- [all 2 pages in this folder and below →](https://md.mova.elamur.ai/free/en/docs/tools/pufferfish/all/)

# pufferfish — 🐡 the Pufferfish

The Pufferfish grows the [absurdity matrix](https://md.mova.elamur.ai/free/en/docs/repo-docs/knowledge/#the-absurdity-matrix) all the time. The word graph ([wordgraph](https://md.mova.elamur.ai/free/en/docs/wordgraph/)) and its corpus counts pick the next cells, one Sol rates them in batches, Rust checks every answer, and the rated cells wait in a staging table until the Octopus reviews them and adds them to `global/data`. Crab holds it as a standing worker ([animals](https://md.mova.elamur.ai/free/en/docs/repo-docs/animals/)). The Pufferfish never writes into the repository.

## How it runs

```
pufferfish run CONFIG       # the standing loop; a STOP file in run_root ends it between calls
pufferfish once CONFIG      # one step
pufferfish status CONFIG    # counts, the last journal record, a pause in force
pufferfish report CONFIG    # report.json, report.md and staging.tsv now
pufferfish import CONFIG DIR   # take in rated DIR/batch-*.tsv made elsewhere
```

One step:

1. **Candidates.** With no pending cells, `wordgraph::eval::candidates` picks `candidates_per_round` cells outside the known set: the matrix files, every cell the Pufferfish has rated, imported, failed or queued. Half are verb–noun pairs the parses show as subject or object, the most frequent first; half are frequent verbs and nouns never seen together. The list is written atomically as `candidates-NNN.tsv`.
2. **One batch.** The next `batch_size` cells go to the teacher in one non-interactive Codex call (`mova_teacher::ask`; ChatGPT login only, never Claude, no tmux). The prompt is [tools/pufferfish/prompts/rate.md](https://md.mova.elamur.ai/free/en/docs/tools/pufferfish/prompts/rate/), embedded in the binary; its SHA-256 is journaled with every call. The scale is 0 normal, 1 slightly odd, 2 odd, 3 very strange, 4 absurd, for the noun as subject and as object, literal plus normal figurative English; a verb without an object gets OBJ 4 (3 for a cognate or idiomatic object); `-` in both columns marks a pair that is not a real verb and noun.
3. **The check.** Every cell must be answered exactly once, the pair must echo the input exactly, and both scores must be 0–4 or both `-`. A row for a pair not asked is refused. One repair round asks again only for the faulty cells, listing the faults ([tools/pufferfish/prompts/repair.md](https://md.mova.elamur.ai/free/en/docs/tools/pufferfish/prompts/repair/) before the rating prompt). The valid rows are written atomically to `rated/batch-NNNN.tsv` (verb, noun, SUBJ, OBJ, reason); a batch with faulty cells is journaled `partial`, never done. A faulty cell goes back to the queue once; after a second fault it is failed (`failed.tsv`) and never asked again.
4. **Staging.** After every batch `staging.tsv` holds every rated cell, sorted, one per cell, in the matrix's four-column format (verb, noun, SUBJ, OBJ), cells with `-` left out.
5. **Report.** Every `report_every` batches: `report.json` and `report.md` with the cells rated, the score distribution per role, seen against unseen, the graph's agreement with Sol (the AUC of `Graph::opportunity` separating Sol's normal 0–1 from its absurd 3–4 cells, per role, for all, seen and unseen cells; the object column is the best of `obj` and `nsubj:pass`, as in `wordgraph absurdity`), and the distributions check of [Distributions as a test tool](https://md.mova.elamur.ai/free/en/docs/repo-docs/distributions/) through [distcheck](https://md.mova.elamur.ai/free/en/docs/tools/distcheck/): answers per verb and the mean score + 1 per verb and role against their medians (5× look, 10× suspect, 20× bug), with the injected control item that must be flagged.

**Limits and errors.** A usage-limit error pauses the loop 30 minutes; other errors back off 5, 10, 20, 40, then 60 minutes; an exhausted graph pauses 60 minutes. Every pause is journaled with its end, and a restarted loop keeps a pause in force. A transport failure charges no cell: the batch stays in the queue. No retry inside a call.

**Import.** `import CONFIG DIR` takes rated batches made elsewhere (`DIR/batch-*.tsv`), validated like an answer: well-formed rows, valid scores, plain words, each cell once in a file, and, when `DIR/../candidates-*.tsv` exist, a pair of one of those lists (they are copied in, for the seen/unseen kinds). Rows go to `imported/<sha12>.tsv`; a file already imported is skipped, so the import can be repeated while another loop adds batches. Imported cells are never asked again.

## Configuration

JSON, unknown fields refused ([example](https://mova.elamur.ai/free/en/docs/peta/pufferfish/config/pufferfish.json) in a private checkout):

| field | meaning |
| --- | --- |
| `run_root` | absolute; created 0700, refused when group or others can read it |
| `graph` | the `.wg` file; a `*` in the file name takes the newest match by modification time |
| `matrix_files` | the matrix tables whose cells are known (`global/data/absurdity-roles*.tsv`) |
| `teacher` | `model` (a `gpt-*` model, default deployment `gpt-6.1-sol`), `effort`, `workdir` (the Codex calls' folder) |
| `batch_size`, `candidates_per_round`, `report_every` | 200, 20000, 10 by default |
| `top_verbs`, `top_nouns` | the frequent words of the unseen half; 600 and 1500 |
| `operator_word` | required and non-empty: the teacher is asked only on the operator's word; journaled at every start |

## Files in run_root

`candidates-NNN.tsv`, `rated/batch-NNNN.tsv`, `imported/`, `faults.tsv` (append-only: cell, batch, fault), `failed.tsv`, `staging.tsv`, `report.json`, `report.md`, `journal.jsonl` (append-only: start, candidates, every call with batch, prompt SHA-256, seconds, usage and faults, batch, pause, report, import, stop), `STOP`.

## Tests

```
cargo test --release -p pufferfish    # a fake teacher and a fake graph; no live call
```

The negative control: an answer with a wrong pair or a score of 5 is refused (`cells::tests`, and end to end with the repair round and the second fault in `tests/pufferfish.rs`). Two runs from the same state write the same bytes.

## Limits

- The ratings are Sol's judgments, not gold: they join the matrix only after review.
- One Sol, one call at a time; throughput is bounded by the subscription's limits.
- The candidates are as good as the graph: lemmatisation or tagging errors of the parses reach the queue (the `-` answer catches the worst of them).
- The report's AUC compares the graph with Sol, not with people.
- Pairs only (verb × noun with two roles); no subject–verb–object triples, no domain layers (tale) yet.
- [← previous parsecmp — many parsers against the reference trees, and parser agreement](https://md.mova.elamur.ai/free/en/docs/tools/parsecmp/)
- [next → roundtrip — the autoencoder and the anti-autoencoder](https://md.mova.elamur.ai/free/en/docs/tools/roundtrip/)
- [↑ back to tools](https://md.mova.elamur.ai/free/en/docs/tools/)

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://mova.elamur.ai/sitemap.xml) · [llms.txt](https://mova.elamur.ai/llms.txt)
