Lem/Docs

Register, prioritize, and contextualize papers.

The registry is a local manifest of every paper Lem tracks — sources, priority, status, deadline, tasks, tags, and target venue — plus a fixed-size venue-fit context per paper.

The registry#

LemPaperRegistry loads the paper manifest from ~/.lem/papers.json by default; point Lem at an alternate registry with LEM_PAPERS_PATH. An absent or unreadable registry lists as an empty set with a note, not an error.

Each paper records an id and title; optional local, github_url, and overleaf_url sources; priority (urgent, high, medium, normal, low); status (backlog, research, in_progress, blocked, writing, review, ready, done, submitted, integrated, paused); an optional deadline, tasks, tags, and target_venue. The target venue (neurips, icml, iclr) is authoritative for the venue bucket when set; otherwise Lem falls back to preamble and title detection.

Inspect and import#

import is mutating: it encodes and rewrites papers.json. The CLI write commands call the same entry points as the separate LemImportPapers, LemRefreshPaperContexts, and LemAuditProvenance utilities, so the binaries and the CLI cannot drift apart.

Shell
swift run LemCLI papers                 # every paper's metadata
swift run LemCLI paper <id-or-title>    # one paper by exact id or title substring
swift run LemCLI import                 # discover papers and merge them into the registry

Per-paper context#

refresh-context fetches and persists venue-fit context for each authored manuscript. A context has no size knob: it is twenty recent target-venue papers plus five similar highly cited ones, fixed by the engine, and its references list is exactly those two buckets. Use library for external papers independent of a manuscript; use citation-harvest for one manuscript's bound literature corpus.

Shell
swift run LemCLI refresh-context [--force] [--limit <n>]

Provenance audit#

LemProvenanceAuditor audits text provenance across a paper's sources; its report lives at ~/.lem/provenance-audit.json by default.

Shell
swift run LemCLI audit [--paper <id-or-title>] [--no-report] [--force] [--transcripts]
swift run LemCLI provenance   # the latest provenance report, if present