| name | microfiche |
| description | Offload large text (docs, logs, transcripts, notes, research dumps) into OCR-certified page images and recall them at up to 2.8x fewer tokens by reading the PNG instead of the raw text. Use when context is filling up with reference material, when the user says "pack this", "microfiche", "offload context", or before reading a large file you will only need to consult occasionally. |
microfiche
Store text as dense page images. A 1092x1092 page holds ~13,500 characters of
prose at 10px and costs 1521 image tokens when read; the same characters cost
~4,300 text tokens. Certified pages read back at 99.5 percent on Opus-class
models. The certification gate (local OCR) automatically keeps code, hashes,
and dense symbols as plain text, so recall is never silently lossy.
Requirements
The microfiche CLI on PATH (pip install microfiche) and tesseract-ocr
installed. If microfiche --help fails, tell the user to install it.
Workflow
-
Pack reference material instead of holding it in context:
microfiche init --reader opus # once per project; writes .microfiche/
microfiche ingest --root .microfiche path/to/big-file.md ...
microfiche flush --root .microfiche # renders + certifies pages
Use --reader sonnet if the session's model is Sonnet-class.
-
When you need the content back, search first:
microfiche search --root .microfiche "what you remember"
-
Recall a certified page by Reading its PNG (this is the token saving:
the Read tool bills the image, not the text):
.microfiche/pages/<page_id>.png
The page id comes from search results or microfiche stats. Read the
image carefully; it is a dense but verified rendering of the exact text.
-
For sections whose pages failed certification (code, tables), fetch text:
microfiche get --root .microfiche <section_id>
Rules
- Only trust pages marked PASS by flush (or cert.passed in the manifest).
Never recall a FAIL page as an image; use
microfiche get instead.
- Quote exact strings (hashes, keys, version numbers) from text sections,
never from a page image.
- Add
.microfiche/ to .gitignore; the store contains rendered PNGs.
- One page image replaces ~4,300 text tokens with 1521 image tokens. When
you need three or more consecutive sections from one page, Read the page
once instead of fetching sections individually.