Food-photo pairing orchestrator for Asif's journal. Invoke when the user says 'food-photo', '/food-photo', '@food-photo', 'pair food photos', 'match receipts to memoir', 'food memory pairing', 'reconcile food receipts', or 'link food photos to chapters'. Reads receipt images + metadata from `trips/{slug}/receipts/` and pairs them with hand-authored food memories in memoir (chapters/ + reference/incident-bank.md + `trips/{slug}/memoir-extracts.md`). Surfaces cross-link suggestions ("April 15 lunch at Venice Beach matches food entry in chapter 5, line 247"). Preview-only with `--dry-run`; no writes.
Phase 7 orchestrator that reconciles photographed food receipts with hand-authored food memories. Produces cross-link suggestions; never edits memoir files.
trips/{slug}/receipts/ (receipt kind, approved into pending.json)memory-promotion when routing receipts → memoir| Source | Path | Purpose |
|---|---|---|
| Pending queue | trips/{slug}/pending.json | Rows where kind: "receipt" and payload.category suggests food (or explicit memoryWorthy: true) |
| Receipt images | trips/{slug}/receipts/ | Image files named by row id |
| Trip memoir extracts | trips/{slug}/memoir-extracts.md |
| Tier-1 scope: trip-scoped memoir text |
| Memoir chapters | chapters/*.md | Tier-2 scope: full memoir |
| Incident bank | reference/incident-bank.md | Food incidents (short form) |
| Trip context | trips/{slug}/trip.yaml | Day cursor + location for geo/temporal bounding |
--dry-run (default) — emit pairing suggestions; do not write.--slug <slug> — override active trip.--scope trip|memoir|both — search scope. trip = memoir-extracts.md only; memoir = chapters/ + reference/; both (default).--min-confidence low|med|high — only emit pairings above threshold (default med).--entries <ids...> — restrict to specific pending.json receipt ids.--photo-only — skip memoir search; just list food receipts awaiting pairing.createdAt within ±24h of a memoir date referencetrips/{slug}/; memoir passage references the same tripEach pairing gets a confidence (low/med/high) and a signal breakdown.
## food-photo pairing · {slug} · {dateRange}
Food receipts considered: {N}
Pairings proposed: {M}
Unpaired receipts: {K}
### pairings
#### {receiptId} · {merchant} · {receipt createdAt local}
- image: trips/{slug}/receipts/{receiptId}.jpg
- signals: temporal✓ merchant✓ geo✓ dish~ (confidence: high)
- candidate memoir passage:
chapters/05-edison-saturday.md:247
"We ended up at Mithaas, which smelled like every Saturday of my childhood."
- suggested action: cross-link (add photo reference footnote) | merge (inline photo caption)
#### {receiptId} · {merchant} · ...
- (no match above threshold — leave for manual review)
### unpaired food receipts
- {receiptId} · {merchant} · {createdAt local} · reason: no temporal/geo overlap with any food passage
journal-drain action, not a Phase 7 side-effect.reference/locked-paragraphs.md.@@ scratchpad boundary (per memoir-rules-supplement.txt). Suggestions stay at footnote/caption level, not inline edits.ynab-drain).