Start here

Create a repo, put a paper in it, get a verified summary out. Then scale up to a review.

Standalone repo mode is the default path when you do not want generated wiki-manager output. Everything below is a real command with its real output — the repo is self-contained, and no step requires a wiki.

Before You Start

RequirementWhyIf missing
python3Every script. Stdlib + requests + pdfminer only — no pip installsNothing runs. There is no python on this machine; always spell it python3
PubMed MCP connectorMandatory for any full review, at every scope. Also ladder rung 1A review stops at Stage 0. Authorize it in claude.ai → Settings → Connectors, then start a new session — connectors attach at session start
pdftotext / pdfinfo (poppler)PDF text extraction, rung 0/2/5Falls back to pdfminer; slower, sometimes worse layout
pdftoppm + tesseractPer-page OCR fallback for scanned PDFsA scanned PDF yielding <100 chars just fails its rung and the ladder continues
$DEEP_RESEARCH_EMAILUnpaywall requires email= as an API parameterLadder rung 4 reports skipped — never guessed
quartoOnly for PDF/docx renderingreport.md and the HTML artifact still work

1. Create A Repo

$ python3 scripts/research.py init ~/research/my-manuscript-repo
{
  "schema_version": 1,
  "status": "ok",
  "command": "init",
  "repo_root": "/Users/you/research/my-manuscript-repo",
  "created_dirs": [
    "data/sources/assets",
    "data/sources/snapshots",
    "data/papers/extractions",
    "data/papers/appraisals",
    "projects",
    "runs",
    "templates",
    "exports/wiki",
    "exports/bib",
    "exports/html",
    "exports/docx",
    "exports/pdf"
  ],
  "created_files": [ ... ]
}

That is the whole repo. data/papers/registry.jsonl and data/sources/events.jsonl are created empty; data/refmgr/ (the derived SQLite search index) appears the first time you import a PDF or run registry.py reindex. The slash-command form is /deep-research:init <path>.

2. Add A Project

A project is a manuscript question. It matters because appraisal is project-scoped — the same paper can be low-risk-of-bias for one question and unusable for another.

$ python3 scripts/research.py project create adolescent-cbt --repo ~/research/my-manuscript-repo
{
  "schema_version": 1,
  "status": "ok",
  "command": "project create",
  "slug": "adolescent-cbt",
  "project_dir": "/Users/you/research/my-manuscript-repo/projects/adolescent-cbt",
  "created": ["protocol.md", "synthesis.md", "manuscript.qmd", "refs.bib", "corpus.lock.jsonl"]
}

The slug is what you pass as --project everywhere downstream.

3. Put Papers In It

All intake paths converge on the same registry record, so it does not matter which one you use:

# by identifier
/deep-research:pool-add --repo ~/research/my-manuscript-repo --pmid 12345678
python3 scripts/registry.py add --repo ~/research/my-manuscript-repo --doi 10.1000/example

# from files you already have
python3 scripts/registry.py add-pdf       --repo ~/… --file paper.pdf
python3 scripts/registry.py import-bib    --repo ~/… --file refs.bib
python3 scripts/registry.py import-folder --repo ~/… --dir papers/ --recursive

PDF bytes are content-addressed by sha256 — importing the same paper twice merges identifiers into the existing entry rather than storing it again. /deep-research:pool-add covers PMIDs and bounded queries; DOI-only adds, PDFs, bulk .bib, and folders have no slash-command wrapper, so call the script.

4. Summarize One Paper

/deep-research:summarize \
  --repo ~/research/my-manuscript-repo \
  --project adolescent-cbt \
  --pmid 12345678 \
  --purpose journal-club \
  --format both

--purpose takes clinical, methods, journal-club, peer-review, or background; --audience takes researcher, clinician, student, grant-writer, or general. They shape the summary's framing, not its evidence.

The script never calls a model. It does registry lookup, acquisition, reuse, taskboard bookkeeping, rendering, and verification, then returns a status telling the agent what to dispatch next — pending_retrieval, pending_extraction, pending_appraisal, pending_summary, completed, or failed. Re-running the same command after that subagent writes its file resumes from where it stopped. This is the same loop Stage 5/6 use in the full pipeline, scoped to one paper. See Paper summaries.

Appraisal is on by default whenever full text and a supported framework are available. Use --no-appraise only for a deliberate extraction-only summary — the summary then has to state why appraisal was skipped.

5. Summarize Several

/deep-research:summarize-set \
  --repo ~/research/my-manuscript-repo \
  --project adolescent-cbt \
  --pmid 12345678 --pmid 23456789 \
  --overview --format both

One verified summary per paper, plus an optional bounded overview across them. --ids-file, --bib, and --folder take the set from a file instead; --topic / --question do a bounded PubMed scan for candidates — add --select-only to see the picked set before paying for summaries.

A set is not a review. An overview may compare descriptive attributes across the included papers. It may not claim pooled effects, certainty of a body of evidence, or consensus — those require a full run that actually produced them, and the verifier rejects that wording outside one.

6. Run A Full Review

Ask the agent in plain words — "run a literature review on X", "what does the evidence say about Y". It configures Stage 0 with you, then runs the Stage 0–8 pipeline. Expect to be asked six things up front: the question in framework form, the profile, the target root, your study-selection criteria, filters, and which outputs you want.

While it runs, the state is all on disk and readable at any time:

/deep-research:status <run-dir> --table      # per-paper coverage: downloaded? format? extracted?
/deep-research:status <run-dir> --missing    # only the blocked records
/deep-research:watch --run-dir <run-dir>     # read-only TUI, live or finished

If a run is interrupted, point the agent back at the run directory. It reads config.json's stage pointer plus taskboard.jsonl, continues incomplete and failed tasks, and does not re-prompt or restart the stage.

7. Get Things Out

# BibTeX over the whole registry
/deep-research:bib-export --repo ~/… --out refs.bib --select all

# a ReadCube-importable RIS + PDF bundle
/deep-research:export --repo ~/… --all --destination ~/ReadCube-import --require-pdfs

# HTML / PDF / docx from a finished run
python3 scripts/html_report.py build --run-dir <run> --out <run>/outputs/report.html
python3 scripts/render.py all --run-dir <run> --formats pdf,docx

When Something Goes Wrong

SymptomCauseFix
The run stops at Stage 0 saying PubMed MCP is missingConnectors attach at session start; authorizing mid-session does not helpAuthorize in claude.ai → Settings → Connectors, then start a new session. There is no reduced-scope fallback for this one
The run halts before extraction with a table of blocked papersmissing.md is non-empty — quarantined (no text) or abstract-only (degraded text, ladder exhausted)Drop PDFs into <run-dir>/inbox/ (any filename), then library.py ingest-inbox and re-run fulltext.py acquire. Or tell the agent to continue provisionally — allowed at fast/standard, not at systematic/max
A paper you know is open access came back abstract_onlyThe truncation detector fired: under 1500 body words, or a paywall marker in the textCheck the reason in engine.log. Supply the PDF via inbox/ to upgrade the record — the detector is deliberately trigger-happy, because a false fulltext corrupts the appraisal
A PDF you dropped in inbox/ was not matchedNo DOI on page 1, and the fuzzy title score missed. Titles under 25 normalized characters are never fuzzy-matchedIt stays in inbox/ and is listed with the reason — never guessed onto a record. Register it explicitly with registry.py add-pdf --file … --pmid …
doctor says "no refmgr library … nothing to check"The SQLite index has not been built yet in a fresh repopython3 scripts/registry.py reindex --repo ~/… — it is derived from the registry and always rebuildable
Unpaywall rung reports skipped on every paperNo email — the parameter is required, not courtesySet $DEEP_RESEARCH_EMAIL or pass --email
Rung 1 tasks sit pending foreverRung 1 and rung 7 are coordinator handoffs; a script cannot call an MCP toolThe agent should resolve each with fulltext.py resolve-mcp / resolve-browser, including --status unavailable when the tool found nothing
The report is marked PROVISIONALA verifier check failed, or a quarantine/abstract-only trigger firedRead outputs/verification.json — it names the failing check_id. The report is still delivered; OKF promotion is what gets blocked
embed index fails on an importsentence-transformers is the one scoped exception to the no-pip policy, and it is optionalpip install sentence-transformers, or skip it — ask and search --q work on lexical retrieval alone

Which Path Do I Want?

You wantUseYou get
To know what one paper says/deep-research:summarizeA verified summary with appraisal, in Markdown and HTML
To orient across papers you picked/deep-research:summarize-set --overviewOne summary each, plus a descriptive overview — no pooled claims
Just the extracted data, no write-up yet/deep-research:extractFull text fetched, a verified extraction promoted into the registry — no appraisal, no summary
To answer a question from papers you already hold/deep-research:askAn answer built only from spans that still verify. Not a literature search
To find what the literature saysA full review — ask the agentReport, evidence table, PRISMA flow, verification, optional bundle
To build a reusable paper pool without a reportA run with pipeline.stop_after_stage: 5Extractions every later run can reuse