FAQ
paper-trail is a Claude Code plugin with 6 hand-picked skills for content work, indexed on Flowy. Install it with the command on its page. It includes citation-receipts, paper-writer, pdf-cascade. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
$ npx -y skills add roomi-fields/paper-trail --agent claude-code
Repo: roomi-fields/paper-trail
Anti-hallucination plugin for academic research in Claude Code. Create literature reviews and papers guaranteed without fabricated citations.
Citation hallucinations in academic writing — fabricated quotes, inverted attributions, misidentified authors — are systemic when the author writes from memory and looks up sources afterward. Retracted papers from major venues have shown the failure mode is structural, not anecdotal.
paper-trail makes the error mechanically impossible by enforcing
a research-first workflow with strict state transitions, automated PDF
acquisition with anti-homonymy validation, and per-citation audit
against the actual source text.
DISCLAIMER.md)RECEIPTS.md classifying each
citation as VALID / ADJUST / INVALID / UNVERIFIABLEpaper-trail's acquisition cascade and search layer cover the major academic indexing and full-text platforms.
| Source | Coverage | Used for |
|---|---|---|
| Crossref | Cross-domain DOI registry, 150M+ records | DOI lookup, metadata, open-access URL |
| arXiv | Preprints (CS, math, physics, q-bio, q-fin, stats, EE) | Full-text PDFs of preprints |
| OpenAlex | 200M+ scholarly works, cross-domain aggregator | Metadata, abstracts, citation graph |
| Unpaywall | 30M+ free full-text articles | OA PDF discovery |
| HAL | French academic repository | Full-text, OA |
| CORE | UK-based aggregator, 200M+ OA records | Full-text fallback |
| archive.org | Digitized books and articles, Internet Archive | Books, older publications, scans |
| Semantic Scholar | AI-curated academic graph, 200M+ papers | Cross-reference, related papers |
| PubMed / PMC / bioRxiv / medRxiv | Biomedical, preprints | Biomedical full-text |
| Zenodo / SSRN / DBLP / DOAJ / BASE / IACR / EuropePMC | Cross-domain | Additional metadata and full-text |
| Source | Coverage | Activation |
|---|---|---|
| Sci-Hub | Paywalled scholarly literature, ~88M papers | RESEARCH_ENABLE_SHADOW_LIBS=1 |
| Anna's Archive | Books and articles, aggregates Library Genesis, Sci-Hub, Z-Library | RESEARCH_ENABLE_SHADOW_LIBS=1 |
Shadow-library activation is explicit and per-session. A
disclaimer prints to stderr on first use. The user is responsible
for legal compliance in their jurisdiction. See
DISCLAIMER.md.
| MCP | Coverage | Status |
|---|---|---|
| paper-search MCP | Unified API over 22 platforms above | Required for SOTA writing — install from git (see INSTALL.md) |
| NotebookLM MCP | Books corpus (Q&A with citations) | Optional — RESEARCH_ENABLE_NOTEBOOKLM=1 |
| RTFM MCP | Local indexed corpus (code, docs, research) | Optional — failure correlation only |
⚠️ Do not install
paper-search-mcpfrom PyPI — the published version (0.1.3) is severely outdated (13 / 63 tools, no OpenAlex, no Crossref, no Semantic Scholar). Use the git HEAD recipe inINSTALL.md.
In a Claude Code session:
/plugin install file:///path/to/paper-trail
Or via marketplace (when published):
/plugin marketplace add roomi-fields
/plugin install paper-trail
RESEARCH_VAULT_PATH is required — the plugin refuses to start
without it. Set it (and any reusable secret like S2_API_KEY) once
in ~/.config/paper-trail/env so every project picks them up
automatically :
mkdir -p ~/.config/paper-trail
cat > ~/.config/paper-trail/env <<'EOF'
RESEARCH_VAULT_PATH=~/Documents/MyResearch
RESEARCH_CONTACT_EMAIL=you@example.org
S2_API_KEY=s2k-...
EOF
chmod 600 ~/.config/paper-trail/env
Per-project shell overrides take priority. For complete configuration,
see INSTALL.md.
python3 -m pipeline preflight
Reports vault, Python deps, paper-search MCP registration, and any
missing optional secret — with a copy-pastable fix command for each
problem.
/paper-trail:status # overview of the registry
/paper-trail:new-sota "your research topic"
/paper-trail:audit-article path/to/your/paper.tex
Three primary workflows, all enforced by the plugin's state machine and pre-write hooks:
/paper-trail:new-sota "topic"
paper-search MCPpage1_validated state; rejected candidates are listed with
reasons/paper-trail:audit-sota path/to/SOTA.md [--purge]
/paper-trail:audit-article path/to/paper.tex [--warn]
Classifies each citation, optionally purges hallucinations from the
SOTA (with .bak backup), or inserts inline warnings adjacent to
problematic citations in the paper.
/paper-trail:cascade <slug> # acquire a specific reference
/paper-trail:doctor [--fix] # check and repair registry consistency
/paper-trail:reactivate-ocr # resume OCR-waiting refs
User → 9 slash commands → 6 skills → 4 sub-agents → Worker engine
↓
YAML registry
See docs/ARCHITECTURE.md for the full
diagram and pipeline/ARCHITECTURE.md
for the worker engine internals.
docs/USAGE.md — daily workflowsdocs/ARCHITECTURE.md — system overviewdocs/LEGAL.md — licensing and attributionDISCLAIMER.md — shadow libraries opt-in policyNOTICE.md — third-party attributionsCHANGELOG.md — version history| Variable | Default | Purpose |
|---|---|---|
RESEARCH_VAULT_PATH | — (required) | Vault root — plugin refuses to start without it |
RESEARCH_SOURCES_PATH | $VAULT/10_SOURCES | PDF directory |
RESEARCH_REGISTRY_PATH | $SOURCES/_registry | YAML registry |
RESEARCH_VAULT_LAYOUT | obsidian | Adapter (obsidian / flat / zotero) |
RESEARCH_RTFM_DB | unset | Optional RTFM SQLite DB for failure correlation |
RESEARCH_CONTACT_EMAIL | anonymous@example.org | Email sent to Crossref, Semantic Scholar (politeness) |
S2_API_KEY | unset | Optional Semantic Scholar API key (stricter rate limit without) |
RESEARCH_ENABLE_SHADOW_LIBS | unset | Enable Anna's Archive & Sci-Hub (opt-in, see DISCLAIMER) |
RESEARCH_ENABLE_NOTEBOOKLM | unset | Enable NotebookLM in sota-writer phase A |
RESEARCH_SKIP_END_DOCTOR | unset | Skip the SessionEnd consistency check |
The PROJECT_AUTHORS whitelist used by the Semantic Scholar resolver
(group names treated as anonymous in queries — e.g. "Anonymous", "Group")
is loaded from $XDG_CONFIG_HOME/paper-trail/project_authors.txt
(default ~/.config/paper-trail/project_authors.txt), one entry per line.
The file is optional; if absent the whitelist is empty.
MIT — see LICENSE.
This plugin builds on patterns and components from several open-source
projects in the Claude Code ecosystem. See NOTICE.md
for detailed attributions.
Issues and pull requests welcome at github.com/roomi-fields/paper-trail/issues. The plugin is in active development; structural changes may happen between minor versions before v1.0.
.claude-plugin/
plugin.json
.env.example
.gitignore
adapters/
__init__.py
base.py
flat.py
obsidian.py
zotero.py
agents/
cascade-runner.md
citation-parser.md
claim-checker.md
page1-validator.md
researcher.md
textbook-resolver.md
CHANGELOG.md
commands/
paper-trail-acquire.md
paper-trail-audit-all.md
paper-trail-audit-article.md
paper-trail-audit-sota.md
paper-trail-cascade.md
paper-trail-decide.md
paper-trail-doctor.md
paper-trail-identify.md
paper-trail-ingest-all.md
paper-trail-ingest.md
paper-trail-inject-url.md
paper-trail-linkify.md
paper-trail-new-paper.md
paper-trail-new-sota.md
paper-trail-purge.md
paper-trail-reactivate-ocr.md
paper-trail-receipts.md
paper-trail-registry-cleanup.md
paper-trail-resolve-textbooks.md
paper-trail-review.md
paper-trail-search.md
paper-trail-status.md
conftest.py
CONTRIBUTING.md
DISCLAIMER.md
docs/
ARCHITECTURE.md
LEGAL.md
MARKETPLACE_ENTRY.md
USAGE.md
hooks/
_hook_env.py
hooks.json
post_edit_ref_check.py
post_edit_sota_check.py
pre_save_sota_check.py
session_end_doctor.py
INSTALL.md
lib/
__init__.py
archive_org_helper.py
download_books.py
oa_finder.py
s2_resolver.py
shadow/
__init__.py
annas_archive_helper.py
annas_archive.py
mirrors.py
README.md
scihub.py
validate_pdf_content.py
LICENSE
NOTICE.md
pipeline/
__init__.py
__main__.py
acquire.py
ARCHITECTURE.md
breakers.py
cascade_sources/
__init__.py
_pscfg.py
base_search.py
base.py
biorxiv.py
citeseerx.py
dblp.py
doaj.py
europepmc.py
iacr.py
medrxiv.py
NOTICE.md
oaipmh.py
openaire.py
paper.py
pmc.py
semantic.py
ssrn.py
utils.py
zenodo.py
cascade.py
cli.py
config.py
dispatcher.py
doctor.py
events.py
identify.py
ingest.py
invariants.py
journal.py
linkify.py
linter_wrapper.py
lock.py
paper_search_acquire.py
preflight.py
purge.py
registry.py
rtfm_failures.py
rtfm_helper.py
sota_sync.py
tests/
assert_coverage.py
coverage_run_2026-05-24.md
coverage_set_2026-05-24.md
fixtures/
ingest/
expected_sections.json
fixture_libre.md
fixture_mixte.md
fixture_purge.md
fixture_wikilink.md
synthetic/
refs/
I01_state_unknown.md
I02a_slug_duplicate.md
I02b_slug_duplicate.md
I03_uid_bad_prefix.md
I04_pdf_path_prefixed.md
I05_pdf_missing.md
I06_sha256_invalid.md
I07_page1_log_inconsistent.md
I08_history_non_monotonic.md
I09_attempts_renumber.md
I10_blocked_no_reason.md
I11_cited_in_orphan.md
i12_reciprocity_missing.md
I13a_sha_duplicate.md
I13b_sha_duplicate.md
I14_terminal_transition.md
I15_rtfm_overdue.md
I16_rtfm_ingest_failure.md
I17_pdf_format_invalid.md
I18_sha_drift.md
I19_image_only_no_text_sources.md
sources/
Sources/
fake_doc_for_tests.pdf
vault/
Publications/
SOTA_Fixture_I12_Cites_It.md
test_acquire_targeting.py
test_concurrent.py
test_events.py
test_f1_negative.py
test_idempotence.py
test_ingest_fixtures.py
test_invariants_synthetic.py
test_linkify_fixtures.py
test_p2_sync_branchements.py
test_p7_autofix_i22_i23.py
test_p8_registry_cleanup.py
test_purge_fixtures.py
test_skills_structure.py
test_sota_sync.py
transitions.py
USAGE.md
plans/
AUDIT_LEGACY_VS_NEW_2026-05-26.md
B_worker_fixes_2026-05-24.md
B_worker_FSM_pipeline.md
H2_H7_RESUME.md
PIPELINE_CIBLE.md
plan-design.md
PLUGIN_EXECUTION_PLAN.md
PLUGIN_PLAN.md
SYSTEM_ARCHITECTURE.md
PRIVACY.md
README.md
requirements.txt
skills/
citation-receipts/
SKILL.md
paper-writer/
SKILL.md
pdf-cascade/
SKILL.md
registry-doctor/
SKILL.md
sota-auditor/
SKILL.md
sota-writer/
SKILL.md
tools/
citation_audit.py
identify_pdfs.py
notebooklm-integration.md
precheck_sota_wikilinks.py
reinject_legacy_blocked.py
reset_registry.py
review_problems.py© 2026 Flowy · Free and open source
Built for Claude Code · Not affiliated with Anthropic