Skip to content
Back to skills

Lit Scoping

ASecurity

Step 1 of the lit-workflow literature pipeline - turn the user's research direction into a direction map and a confirmed review protocol with anchor papers. Broad scan with four parallel Sonnet researchers, grounding in real literature with growth metrics, citation audit, key-fact checks, Gemini cross-review, then protocol drafting. Use when the user runs /lit-workflow:lit-scoping, gives a research direction or background and wants to scope a literature review, or resumes a project at step 1.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
researchgobashtestinggitapi

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 12 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add yzzhang0423-stu/automatic-lit-workflow --skill lit-scoping --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Lit Scoping?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Lit Scoping
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/yzzhang0423-stu-lit-scoping/badge)](https://www.skillsdirectory.com/skills/yzzhang0423-stu-lit-scoping)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: lit-scoping
description: Step 1 of the lit-workflow literature pipeline - turn the user's research direction into a direction map and a confirmed review protocol with anchor papers. Broad scan with four parallel Sonnet researchers, grounding in real literature with growth metrics, citation audit, key-fact checks, Gemini cross-review, then protocol drafting. Use when the user runs /lit-workflow:lit-scoping, gives a research direction or background and wants to scope a literature review, or resumes a project at step 1.
argument-hint: "<your research background and direction, any length> | resume <project>"
---

# lit-scoping: broad scan → direction map → protocol (step 1)

You are the coordinator (Opus). You decide, the user approves at three points (S1.1 answers, S1.4 direction, S1.7 protocol). Scripts do every API call; subagents do the broad reading.

- CLI: `"${CLAUDE_PLUGIN_ROOT}/bin/litwf"` (write the path literally in Bash; it is not an env var). Below written as `litwf`.
- Templates: `${CLAUDE_SKILL_DIR}/templates/`.
- Project folder `P` = `<projects root>/<name>/` (printed by `litwf init`; root = `$LITWF_PROJECTS`, default `~/lit-workflow-projects/`). In `litwf` commands pass `P` as the project name, its absolute path, or `.` from inside it.
- Keep the user informed with your task list: one item per stage below.

## Hard rules (apply to every stage)

1. Paper titles, authors, years and identifiers come only from tool or script output. Never from memory. The step-1 gate fails on any identifier in `00_protocol/gap.md`, `question.md`, `anchors.md` or `criteria.md` that did not pass a citation audit (dataset DOIs such as Zenodo are exempt).
2. Every paper that appears in a direction card, the Gemini review or the anchors must pass `litwf audit` (Scholar Sidekick + PMID check). Failures are removed or replaced, never kept.
3. Feasibility facts (outcomes and event indicators, licence, size, access) are confirmed on the primary page by the fact-checker before they appear in a card.
4. Record every user decision with `litwf decide`, every fallback with `litwf degraded`, and move stages with `litwf stage`. Commit at the end of S1.4 (`--wip`) and S1.7 with `litwf commit`; commit runs the step's gate and refuses while it fails unless `--wip` is given.
5. Asta and Semantic Scholar data are for non-commercial research only.
6. Write all files in English, with one exception: the user's raw input in `intake.md` is kept verbatim in the language they used. Talk to the user in the language they use.
7. Bibliographic records (title, first author, year) for the audit come from `litwf refs`, never typed by hand.
8. Record model token use: after each subagent returns, `litwf tokens P "<stage> <agent> <model>" <total_tokens>` (the number is in the subagent's completion notice). `litwf gemini` records its own tokens.
9. Nothing is ever pushed: project repositories are local git only (`litwf commit` never pushes).
10. **Citation checks confirm identity only.** `litwf audit` (normal or claims mode) proves that an identifier exists, is not retracted, and belongs to the paper named. It does **not** prove that the paper says what it is cited for. Gemini does no support analysis in this pipeline: its statements about what a paper shows are leads, never evidence. The content check is done by the **user**: once the anchors are chosen, the user verifies every anchor against its original text (`00_protocol/anchor_check.md`, S1.7 step 4), and step 2 cannot start until they have. Say this plainly whenever you report audit results.

## Resume

If the argument starts with `resume`, run `litwf status <project>`, read `P/state.json` and the files of the current stage, and continue from that stage. If no argument is given, ask for the research background.

## Stages

| Stage | Do | Who | Stop for the user? |
|---|---|---|---|
| S1.0 Input | Create the project, save the input | you + script | no |
| S1.1 Clarify | ≤ 4 scope questions | you | **yes: answers** |
| S1.2 Broad scan | 4 parallel researchers | scoping-researcher ×4 (Sonnet) | no |
| S1.3 Ground + measure | Real papers, metrics, audit, key facts | you + scripts + fact-checker (Haiku) | no |
| S1.4 Direction map | 3–6 cards + your ranking | you | **yes: pick a direction** |
| S1.5 Focused sweep | Fill in the chosen direction | you (+1 researcher if needed) | no |
| S1.6 Gemini review | Independent critique | Gemini via `litwf gemini` | show disagreements |
| S1.7 Protocol | Protocol files + 5–10 anchors + anchor check | you + script | **yes: verify every anchor against its original text, then confirm** |

### S1.0 Input

1. Pick a short English project name from the topic (2–5 words). Run `litwf init "<name>"`; it prints `P`.
2. Write `P/01_scoping/intake.md` from `templates/intake.md`: paste the user's input verbatim under "Raw input", then fill the structured fields you can already infer; leave the rest as `?`.
3. Run `litwf doctor --only openalex,asta,pubmed,sidekick` (about 10 s). For any non-ok source, run `litwf degraded P <source> "<effect>"` and tell the user in one line.

### S1.1 Clarify

Ask at most 4 questions with AskUserQuestion, and only ones whose answer changes what is searched: modality, organ/disease, task type, public-data-only or private data, compute limits, directions to avoid. Skip what intake.md already answers. If the user named a dataset, also ask whether they have a local copy of its metadata (path): local files settle dataset facts faster and more reliably than the web (`litwf peek <file>`). Put the answers into intake.md. Then `litwf stage P S1.2`.

### S1.2 Broad scan

Spawn **four `scoping-researcher` subagents in one message** (Agent tool, `subagent_type: "lit-workflow:scoping-researcher"`, all in parallel). The harness may run them in the background; either way, wait until all four have finished before writing the synthesis. Each prompt contains: the perspective, the topic and constraints from intake.md (verbatim), the key questions, the boundary line from the table, suggested sources, the tool-call budget (**25, a hard stop: write it in every prompt as "Budget: 25 tool calls, hard stop. At 25 calls stop searching and write your notes with what you have."**), and the absolute output path `P/01_scoping/research_notes/<file>`.

| File | Perspective | Key questions | Boundary (do not research) |
|---|---|---|---|
| `R1_biomedical_problem.md` | Biomedical problem side | What clinical or biological need is unmet? What limits current standard practice? Which outcomes matter to clinicians? | dataset facts (R3), AI methods (R2) |
| `R2_ai_methods.md` | AI method side | Which method families from the last 3 years could transfer to this problem? What does each assume (data size, labels, modality)? Strongest reported results? | dataset facts (R3), who-is-doing-what (R4) |
| `R3_data_benchmarks.md` | Data and benchmarks | Which public datasets, challenges and benchmarks exist? Size, labels, outcomes with event indicators, licence, access route? | **owns all dataset facts** |
| `R4_frontier.md` | Frontier and competition | Who has worked on this in the last 18 months, how far did they get, which teams and routes are most active? Preprints and recent top-venue papers? | dataset facts (R3); cite which dataset a paper used, not its properties |

When all four return, read the four notes yourself (do not delegate the synthesis) and write `P/01_scoping/reports/broad_scan.md`: 3–6 candidate directions, each a problem statement, why it may be open, key evidence (identifiers), and open questions. Then `litwf stage P S1.3`.

If a researcher fails, rerun it once; if it fails again, `litwf degraded P researchers "<which perspective missing>"` and continue.

### S1.3 Ground and measure

For each candidate direction:

1. **Real papers.** Use the literature search tools available in the session (OpenAlex, PubMed with MeSH for biomedical directions, Asta / Semantic Scholar, or any other academic-search MCP you have) to pull 2–3 representative papers. Use only what the tools return. Keep Asta relevance queries short (< 6 words): long queries often return nothing. MeSH has no descriptor for many imaging methods (e.g. OCTA): fall back to the parent term plus `[tiab]` words.
2. **Metrics.** Write `P/01_scoping/directions.json` (see `templates/directions.json`) with an OpenAlex search phrase, an arXiv query and, for biomedical directions, a PubMed term. Run `litwf metrics P`. It writes `direction_metrics.csv` (per-year OpenAlex counts on titles+abstracts, 4-year growth, the full-text total for context, arXiv last 12 months, PubMed 5 years) and costs about 0.002 USD per direction. PubMed terms: combine `[Mesh]` with `[tiab]` synonyms, because MeSH indexing lags 1–2 years. Act on every `WARN` line (a zero count usually means a bad query). Judge crowding on the title+abstract counts, PubMed and R4, not on the full-text total.
3. **Audit.** Build the audit input with `litwf refs`, never by hand:
   ```bash
   litwf refs P --ids <identifiers you will cite> --source "direction map" --out 01_scoping/refs_scoping.json
   # or scan notes:  litwf refs P --from-md P/01_scoping/research_notes/*.md --out 01_scoping/refs_scoping.json
   ```
   It writes title, first author and year from OpenAlex/Crossref, PubMed or arXiv. Read every `CHECK` line: the identifier resolves to a paper whose title shares few words with the line that cited it, so the researcher may have attached the wrong identifier. Fix or drop those. Then run `litwf audit P --input 01_scoping/refs_scoping.json --out 01_scoping/audit_scoping.json`. Drop every FAIL; for `ambiguous`, replace the identifier with the printed candidate (`litwf refs ... --append`) and audit again. The gate fails if a failing identifier is still cited.
4. **Key facts.** List the facts that decide feasibility (for each dataset: outcomes with event indicators, licence, size, access; for each strong baseline: code and weights public). Spawn one `fact-checker` subagent (`subagent_type: "lit-workflow:fact-checker"`, Haiku) with the list and output path `P/01_scoping/key_facts.json`. Use only `confirmed` facts as facts; show `contradicted`/`cannot verify` as risks. The fact-checker cannot open binary files: for dataset metadata in xlsx/csv/json that the user has locally (or that you download with the user's permission), run `litwf peek <file>` yourself and mark the upgraded verdicts `coordinator_check`.

### S1.4 Direction map

Write `P/01_scoping/direction_map.md` from `templates/direction_map.md`: one card per direction under a `### D<n> <name>` heading, every field filled, every paper with its audited identifier, metrics from `direction_metrics.csv`, crowding judged from the metrics and R4. End with your ranking and reasons.

Show the user a compact version (one table row per direction: problem, data, crowding, growth, main risk, your rank) and ask with AskUserQuestion: pick one direction (your top pick first), merge/rewrite (Other), or reject all.

- Pick: `litwf decide P direction_selected "D<n>: <name>"`, then `litwf commit P "S1.4: direction selected" --wip` (the step-1 gate cannot pass before S1.7; `--wip` commits anyway and marks the message) and `litwf stage P S1.5`.
- Reject all: record the reasons with `litwf decide P directions_rejected "<reasons>"`, go back to S1.1 with them. Only one rescan is allowed (`limits.toml` `max_rescans`); after that, work with the user on a hand-written direction.

### S1.5 Focused sweep

For the chosen direction only: a multi-source search (the tools above) plus the last 18 months of arXiv, bioRxiv and medRxiv; Asta `snippet_search` for dataset names used in full texts. Add representative works, datasets and baselines to `P/01_scoping/focused_sweep.md`, audit any new papers (`litwf refs P --ids ... --append --out 01_scoping/refs_scoping.json`, then rerun the audit). Do not run another four-researcher scan; spawn one `scoping-researcher` only if a whole perspective is missing.

Draft the first gap statement now (template in `templates/protocol/gap.md`).

### S1.6 Gemini review

1. Write `P/01_scoping/gemini/prompt.md` from `templates/gemini_prompt.md`: the chosen direction card, the draft gap, and the closest 5 papers. Render the paper lines with `litwf refs-list P --refs 01_scoping/refs_scoping.json --ids <identifiers>` (never type titles). Do not include your other candidates.
2. Run `litwf gemini deep --project P --prompt-file 01_scoping/gemini/prompt.md --out 01_scoping/gemini/deep.md` in the background (Bash `run_in_background`; about 8 minutes, about 100k tokens; with the official Gemini CLI `deep` runs as a single critique). It falls back to a single critique automatically if the deep run fails; if both fail, it records the fallback and you continue.
3. Audit Gemini's references in claims mode. The prompt template makes Gemini end with a reference table (full title, first author, year, identifiers). Then:
   ```bash
   litwf gemini-claims P/01_scoping/gemini/deep.md --out P/01_scoping/gemini/claims_gemini.json
   litwf audit P --input 01_scoping/gemini/claims_gemini.json --out 01_scoping/gemini/audit_gemini.json
   ```
   Claims mode resolves every identifier separately and compares it with Gemini's stated title, author and year; identifiers that point to another paper are dropped, and a claim passes only if one identifier is consistent and passes Sidekick. A pass means only "this paper exists and is the one Gemini named"; it says nothing about what the paper shows. **Gemini's identifiers are unreliable:** in testing 1 in 10 (2026-12-01 test) to 1 in 4 (trial: 8 of 31 failed; 9 of 17 PMIDs pointed to unrelated papers, often next to a correct DOI). Use only passing claims. If `gemini-claims` finds no table, ask Gemini once more for the table only (`litwf gemini critique` with the table instruction).
4. Every `WEB-CHECK` claim (no identifier) must be searched on the web or in Asta/Crossref before it is mentioned. Found: add it through `litwf refs` and audit it. Not found: list it under `## Unverified claims` in gemini_review.md as a risk, never as a fact.
5. Write `P/01_scoping/gemini_review.md`: `## Agreements`, `## Disagreements` (one bullet each, ending with `Resolution: <what you did or why you keep your view>`), `## New leads (identity verified)`, `## Unverified claims`, `## Dropped (failed audit)`. Gemini's papers enter as leads only: if a lead would change the gap or a card (for example "paper X already solves the gap"), do not take Gemini's word for it: read the paper's abstract and the relevant section yourself, and if it becomes an anchor the user verifies it in the anchor check. Show the disagreements to the user side by side with your view; do not silently replace your view with Gemini's or the reverse.
6. If Gemini shows the direction is already done (a paper that solves the gap), go back to S1.4 and offer the next direction.

### S1.7 Protocol and anchors

1. Draft all files in `P/00_protocol/` from `templates/protocol/`: `question.md`, `criteria.md`, `fields.md`, `resources.md` (data and compute as numbers), `gap.md`, `anchors.md`.
2. `anchors.md`: 5–10 papers in the table format of the template; each with role (A nearest neighbour / B strongest baseline / C problem definition, or a dataset / resource paper) and side (bio / ai); at least one bio. Prefer papers from the audited sets.
3. Build `00_protocol/refs_anchors.json` with `litwf refs P --ids <anchor identifiers> --source anchors --out 00_protocol/refs_anchors.json` and run `litwf audit P --input 00_protocol/refs_anchors.json --out 00_protocol/audit_anchors.json`. Replace any failing anchor and audit again.
4. **Anchor check (manual, by the user; required before step 2).** Write `P/00_protocol/anchor_check.md` from `templates/protocol/anchor_check.md`: one row per anchor with its identifier, role, the reason it was chosen (the claim the user must verify, e.g. "strongest baseline: public code, Dice 0.85 on a public benchmark"), where to look in the paper (section, table, figure, or the quoted passage a researcher or the fact-checker supplied), and who proposed it. Leave the verdict empty. Tell the user clearly: "The citation audit only confirmed that these anchor papers exist and are the ones named. Please open each one and check that it really is what its row says." The user fills each verdict (`verified` / `change role` / `reject`) or tells you; replace rejected anchors (audit the replacement, add a new row) and fix changed roles in `anchors.md`. When every anchor row says `verified`: `litwf decide P anchors_verified "yes"`.
5. Show the user the protocol summary (question in one sentence, inclusion/exclusion criteria, resources, gap, anchor table) and ask them to confirm or edit. Apply edits, then `litwf decide P protocol_confirmed "yes"`.
6. Run `litwf gate P --step 1`. Fix every FAIL line, rerun until it passes. Then `litwf commit P "S1.7: protocol confirmed"` and `litwf stage P S2.0 --step 2`.
7. Report to the user: the chosen direction, the gap, the anchors and your anchor-check verdicts, the spend and tokens (`litwf status P`), the fallbacks used, and that step 2 (seed papers) is the next step (not built yet in this plugin version).

Files in this skill

  • SKILL.md16.9 KB
  • templates/direction_map.md1 KB
  • templates/directions.json359 B
  • templates/gemini_prompt.md1.7 KB
  • templates/intake.md606 B
  • templates/protocol/anchor_check.md850 B
  • templates/protocol/anchors.md491 B
  • templates/protocol/criteria.md313 B
  • templates/protocol/fields.md312 B
  • templates/protocol/gap.md422 B
  • templates/protocol/question.md289 B
  • templates/protocol/resources.md307 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in research →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.