一键导入
robust-lit-review
World-class automated literature review pipeline - the single entry point for all lit review operations (brainstorm, search, review, render)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
World-class automated literature review pipeline - the single entry point for all lit review operations (brainstorm, search, review, render)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Appraise a CLAIM (e.g. a popular diet or health product) — decompose into PICO sub-questions, run a Q1/post-2016/CrossRef-verified systematic review per question, GRADE each, cross-check with OpenEvidence, and ship a verdict-style bilingual site to Cloudflare Pages.
Brainstorm and refine research topics with comprehensive search term generation for literature review
| name | robust-lit-review |
| description | World-class automated literature review pipeline - the single entry point for all lit review operations (brainstorm, search, review, render) |
| user_invocable | true |
You are orchestrating a world-class automated systematic literature review. This is the single entry point for all operations.
The user can request any of these modes:
| Command | What it does |
|---|---|
/lit-review | Full pipeline: topic -> search -> filter -> validate -> write -> render |
/lit-review --hitl | Full pipeline with Human-in-the-Loop mode (9 checkpoints) |
/brainstorm-topic | Brainstorm and refine search terms before running |
--hitl)When enabled, the pipeline pauses at 9 checkpoints where human judgment matters most.
Each checkpoint presents multiple-choice options via AskUserQuestion.
from litreview.pipeline.checkpoints import (
format_checkpoint_for_user, CheckpointLog,
cp1_search_strategy, cp2_borderline_articles, cp3_final_article_set,
cp4_thematic_grouping, cp5_key_claims, cp6_prisma_audit,
cp7_cover_letter, cp8_final_preview, cp9_publish_decision,
)
| CP | When | Why human needed | Default (auto-mode) |
|---|---|---|---|
| CP1 | After query generation | Wrong query = wrong review | Strategy A |
| CP2 | After filtering | Borderline articles need domain judgment | Review individually |
| CP3 | After selection | Missing landmark papers? Topic imbalance? | Approve |
| CP4 | Before writing | Thematic structure shapes the narrative | Approve structure |
| CP5 | After writing | LLM may hallucinate stats/dosing/p-values | All correct |
| CP6 | After PRISMA audit | Some items may be legitimately N/A | Auto-fix all |
| CP7 | Cover letter | Target journal affects framing | Approve |
| CP8 | Before render | Last quality gate | Render |
| CP9 | Before publish | Public action requires consent | Publish |
How to implement each checkpoint:
# 1. Generate checkpoint
cp = cp1_search_strategy(topic, suggested_queries)
# 2. Present to user (if --hitl enabled)
prompt_text = format_checkpoint_for_user(cp)
# Use AskUserQuestion tool with prompt_text
# 3. Record decision
cp.selected = user_response # "A", "B", "C", etc.
log.record(cp)
# 4. Branch pipeline based on selection
All decisions are logged to output/checkpoint_log.json for reproducibility.
API keys are in .env:
SCOPUS_API_KEY — Elsevier/Scopus (search + CiteScore/SJR journal metrics)PUBMED_API_KEY — NCBI E-utilities (PubMed search)EMBASE_API_KEY — Elsevier/Embase (medical literature)UNPAYWALL_EMAIL — DOI validation + open access linksZOTERO_API_KEY + ZOTERO_LIBRARY_* — Export to Zotero collectionWhen the user wants to explore/refine their topic before running:
cd /Users/htlin/robust-lit-review && source .venv/bin/activate
python -c "
import asyncio
from litreview.config import get_config
from litreview.clients.scopus import ScopusClient
async def count():
config = get_config()
async with ScopusClient(config.scopus_api_key) as c:
r = await c.search('TITLE-ABS-KEY(\"YOUR QUERY\")', max_results=1)
# Check opensearch:totalResults from raw response
asyncio.run(count())
"
Execute these stages sequentially. Use subagents for parallelizable steps.
cd /Users/htlin/robust-lit-review
source .venv/bin/activate 2>/dev/null || (uv venv && source .venv/bin/activate && uv pip install -e ".")
Launch 3 subagents in parallel:
Launch validation subagent:
https://doi.org/api/handles/{doi}Method A: Balanced heuristic (fast, no extra deps)
from litreview.pipeline.enrichment import ensure_balanced_coverage
selected = ensure_balanced_coverage(articles, target_count=50)
Method B: PubMedBert embedding + haiku judge (better relevance)
from litreview.pipeline.semantic_selector import select_articles
scored, judge_tasks = select_articles(topic, articles, Path("/tmp/judge"))
Then dispatch judge tasks in parallel:
for task in judge_tasks:
Agent(model="haiku", description=task.description, prompt=task.prompt)
After all complete:
from litreview.pipeline.semantic_selector import collect_judge_results
selected = collect_judge_results(scored, Path("/tmp/judge"), target=50)
Requires: uv pip install -e ".[semantic]" (sentence-transformers + torch)
Method A: Regex extraction (fast, no LLM cost)
from litreview.pipeline.enrichment import enrich_articles
enriched = enrich_articles(selected)
Method B: Haiku subagent extraction (much better quality)
from litreview.pipeline.llm_extraction import generate_extraction_tasks
tasks = generate_extraction_tasks(selected, Path("/tmp/extract"))
Then dispatch ALL in parallel (model="haiku"):
for task in tasks:
Agent(model="haiku", description=task.description, prompt=task.prompt)
After all complete:
from litreview.pipeline.llm_extraction import collect_extraction_results
enriched = collect_extraction_results(selected, Path("/tmp/extract"))
build_rich_article_context() for the writing agentsWrite the review in PARALLEL using modular sections + Quarto {{< include >}}.
Step 6a: Dispatch sections
from litreview.pipeline.section_dispatcher import dispatch_sections, generate_main_qmd
dispatched = dispatch_sections(articles, stats, Path("output"))
main_qmd = generate_main_qmd(topic, stats, Path("output"))
This creates output/sections/*.context.json with per-section article context.
Step 6b: Launch parallel writing subagents (8 sections simultaneously)
Launch ALL of these agents in a SINGLE message (parallel tool calls):
| Agent | Section File | Articles | Words |
|---|---|---|---|
| 1 | sections/00-abstract.qmd | all | 300 |
| 2 | sections/01-introduction.qmd | review, classification, epidemiology | 1,200-1,500 |
| 3 | sections/02-methods.qmd | (none — methodological) | 800-1,000 |
| 4 | sections/03-pathogenesis.qmd | pathogenesis, genetics | 1,000-1,200 |
| 5 | sections/04-diagnosis.qmd | diagnosis, classification | 1,200-1,500 |
| 6 | sections/05-etiology.qmd | infection, malignancy, autoimmune, iatrogenic | 1,200-1,500 |
| 7 | sections/06-treatment.qmd | treatment_conventional/targeted/transplant | 1,500-1,800 |
| 8 | sections/07-covid.qmd | infection_trigger, pathogenesis | 800-1,000 |
| 9 | sections/08-discussion.qmd | review_guideline, prognosis | 1,500-1,800 |
Each agent:
output/sections/{name}.context.jsonoutput/references.bib for citation keysoutput/sections/{name}.qmdStep 6c: Generate main.qmd
Write the main file with {{< include >}} directives pointing to each section.
CRITICAL WRITING RULES (include in EVERY agent prompt):
Choose ONE audit method:
Method A: Keyword audit (fast, no LLM cost)
from litreview.pipeline.prisma_audit import audit_manuscript, format_audit_report, generate_repair_prompts
results = audit_manuscript(Path("output/sections"))
print(format_audit_report(results))
repairs = generate_repair_prompts(results)
Method B: Haiku LLM-as-judge (much more accurate)
from litreview.pipeline.llm_prisma_judge import generate_judge_tasks, collect_judge_results
tasks = generate_judge_tasks(Path("output/sections"), Path("/tmp/prisma_judge"))
Dispatch all tasks in parallel (model="haiku"):
for task in tasks:
Agent(model="haiku", description=task.description, prompt=task.prompt)
After all complete:
results = collect_judge_results(Path("/tmp/prisma_judge"))
The LLM judge reads the actual section text and evaluates whether each PRISMA item is substantively addressed — not just keyword-present. It also generates specific fix suggestions in natural language.
If any items FAIL or are PARTIAL:
generate_repair_prompts() or the judge's suggestion field returns fix instructionsRepair agent prompt template:
Read /Users/htlin/robust-lit-review/output/sections/{filename}
The PRISMA 2020 audit found gaps. ADD the missing content without rewriting.
Required fixes:
{fix_instructions}
Do NOT remove existing content. Insert at appropriate locations.
from litreview.pipeline.prisma_checklist import generate_prisma_checklist
checklist = generate_prisma_checklist(
repo_url="https://github.com/htlin222/robust-lit-review"
)
# Write to output/sections/09-prisma-checklist.qmd
cd output
quarto render literature_review.qmd --to pdf
quarto render literature_review.qmd --to docx
Present to user:
.qmd, .bib, .pdf, .docxThe full pipeline is also available via CLI:
lit-review review "TOPIC" --term "term1" --term "term2" --target 50 --min-citescore 3.0 -v
On push to main with changes in output/, the workflow: