# Bibliography Management

## Bib file: `tome/references.bib`

All entries in one file, managed by the Tome MCP server. BibTeX ignores the `x-` status fields. **NEVER auto-modify** — Tome handles writes with roundtrip safety and backups.

## Status fields (per entry, managed by Tome)

- `x-pdf = {true|false}` — PDF exists in `tome/pdf/`
- `x-doi-status = {valid|unchecked|rejected|missing}` — DOI verification state
- `x-tags` — comma-separated tags

## Tome tool discipline

- **`doi(key=...)`**: Run after **every** ingest. Perplexity-sourced DOIs are frequently wrong (~10% hallucination rate). Verify PDF content against title/authors (first 2 pages) as a second check.
- **`notes`**: After reading any paper, record summary, claims, and quality. Check `paper(key)` first. This builds institutional memory across sessions.
- **`paper()`**: Quick overview of library state (no args = stats).

## Key format

All keys use first author surname (lowercase) + 4-digit year. Year in key **must match** `year` field. Three valid forms:

- **`authorYYYYslug`** (preferred for new papers) — 1–2 word topic slug, no separators, all lowercase.
- **`authorYYYY`** — valid when unambiguous.
- **`authorYYYYa`/`b`/`c`** — letter suffixes for disambiguation.

**Datasheets**: `<manufacturer>_<partid>` — e.g., `thorlabs_m365l4`. Use `@misc` with `howpublished = {Datasheet}`.

**Supplementary Info**: `<key>_sup<N>.pdf` — SI files don't get their own bib entries. Note SI presence in the `note` field.

**Wrong PDFs**: Rename to `<key>_wrong.pdf`, set `x-pdf = {false}`, add "WRONG PDF: ..." to `note` field.

Before adding: `paper(action="list")` or `paper(key)` to check for duplicates.

## File layout

- `tome/pdf/<key>.pdf` — source PDFs (git-tracked)
- `tome/inbox/` — drop zone for new PDFs
- `.tome/raw/<key>.p<N>.txt` — extracted page text (gitignored)
- `.tome/chroma/` — search index (gitignored, managed by Tome)

**NEVER edit files in `.tome/raw/`.** They are auto-generated by Tome's `reindex` tool.

- **Ingest new PDF**: Place in `tome/inbox/`, then `ingest` tool
- **Rebuild extractions**: `reindex(scope="papers")` (one key via `key=` or all)
- **Read a page**: `paper(key, page=page)`
