Add P0 infrastructure for the Volve-DIA benchmark

Set up the data, parsing and quality-control layer for a public benchmark
on the Volve daily drilling reports (DDR) and WITSML real-time data.

- Data manifest with SHA-256 hashes of the three Volve subtrees in use.
- DDR XML parser into DuckDB (1,759 reports, 26 wellbores, 23,447
  activities, 17 tables) with locked expected counts.
- Render QC of the publisher HTML against the XML (272,544 items).
- OCR client for the shared chandra vLLM service, with a page cache keyed
  on model, prompt hash, dpi, max_tokens and temperature, and OCR QC
  against the HTML on a 26-report pilot.
- Run logging (scripts/runlog.sh, logs/index.csv), the P0 runner and
  40 tests.
- Research plan, technical overview and progress page (in Vietnamese).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 12:45:34 +00:00
commit a3c175638f
172 changed files with 145856 additions and 0 deletions

View File

@@ -0,0 +1,177 @@
# Citation Styles Reference
Reviewed 2026-09-30. This is a formatting aid; all sample author/title/page combinations below are illustrative, not verified references. Replace placeholders and use a current CSL style plus the target venue instructions for final output. The DOI-checking script verifies registration/metadata, not style compliance.
## APA Style (7th Edition)
### Journal Articles
**Format**: Author, A. A., Author, B. B., & Author, C. C. (Year). Title of article. *Title of Periodical*, *volume*(issue), page range. https://doi.org/xx.xxx/yyyy
**Example**: Smith, J. D., Johnson, M. L., & Williams, K. R. (2023). Machine learning approaches in drug discovery. *Nature Reviews Drug Discovery*, *22*(4), 301-318. [DOI URL]
### Books
**Format**: Author, A. A. (Year). *Title of work: Capital letter also for subtitle*. Publisher Name. https://doi.org/xxxx
**Example**: Kumar, V., Abbas, A. K., & Aster, J. C. (2021). *Robbins and Cotran pathologic basis of disease* (10th ed.). Elsevier.
### Book Chapters
**Format**: Author, A. A., & Author, B. B. (Year). Title of chapter. In E. E. Editor & F. F. Editor (Eds.), *Title of book* (pp. xx-xx). Publisher.
**Example**: Brown, P. O., & Botstein, D. (2020). Exploring the new world of the genome with DNA microarrays. In M. B. Eisen & P. O. Brown (Eds.), *DNA microarrays: A molecular cloning manual* (pp. 1-45). Cold Spring Harbor Laboratory Press.
### Preprints
**Format**: Author, A. A., & Author, B. B. (Year). Title of preprint. *Repository Name*. https://doi.org/xxxx
**Example**: Zhang, Y., Chen, L., & Wang, H. (2024). Novel therapeutic targets in Alzheimer's disease. *bioRxiv*. [preprint DOI URL]
### Conference Papers
**Format**: Author, A. A. (Year, Month day-day). Title of paper. In E. E. Editor (Ed.), *Title of conference proceedings* (pp. xx-xx). Publisher. https://doi.org/xxxx
---
## Nature Style
### Journal Articles
**Format**: Author, A. A., Author, B. B. & Author, C. C. Title of article. *J. Name* **volume**, page range (year).
**Example**: Smith, J. D., Johnson, M. L. & Williams, K. R. Machine learning approaches in drug discovery. *Nat. Rev. Drug Discov.* **22**, 301-318 (2023).
### Books
**Format**: Author, A. A. & Author, B. B. *Book Title* (Publisher, Year).
**Example**: Kumar, V., Abbas, A. K. & Aster, J. C. *Robbins and Cotran Pathologic Basis of Disease* 10th edn (Elsevier, 2021).
### Multiple Authors
- Nature reference lists: list all authors through five; above five use the first author followed by "et al.". Other Nature Portfolio journals may differ; check the actual journal instructions.
**Example**: Zhang, Y. et al. Novel therapeutic targets in Alzheimer's disease. *bioRxiv* [preprint DOI URL] (2024).
---
## Chicago Style (18th Edition, Author-Date)
### Journal Articles
**Format**: Author, First Name Middle Initial. Year. "Article Title." *Journal Title* volume, no. issue (Month): page range. https://doi.org/xxxx.
**Example**: Smith, John D., Mary L. Johnson, and Karen R. Williams. 2023. "Machine Learning Approaches in Drug Discovery." *Nature Reviews Drug Discovery* 22, no. 4 (April): 301-318. [DOI URL].
Reference lists include up to six authors; above six list the first three plus et al. Three or more authors use first author plus et al. in text. Current Chicago no longer requires a book publication place.
### Books
**Format**: Author, First Name Middle Initial. Year. *Book Title: Subtitle*. Edition. Publisher.
**Example**: Kumar, Vinay, Abul K. Abbas, and Jon C. Aster. 2021. *Robbins and Cotran Pathologic Basis of Disease*. 10th ed. Elsevier.
---
## Vancouver Style (Numbered)
### Journal Articles
**Format**: Author AA, Author BB, Author CC. Title of article. Abbreviated Journal Name. Year;volume(issue):page range.
**Example**: Smith JD, Johnson ML, Williams KR. Machine learning approaches in drug discovery. Nat Rev Drug Discov. 2023;22(4):301-18.
### Books
**Format**: Author AA, Author BB. Title of book. Edition. Place: Publisher; Year.
**Example**: Kumar V, Abbas AK, Aster JC. Robbins and Cotran pathologic basis of disease. 10th ed. Philadelphia: Elsevier; 2021.
### Citation in Text
Use superscript numbers in order of appearance: "Recent studies^1,2^ have shown..."
---
## IEEE Style
### Journal Articles
**Format**: [#] A. A. Author, B. B. Author, and C. C. Author, "Title of article," *Abbreviated Journal Name*, vol. x, no. x, pp. xxx-xxx, Month Year.
**Example**: [1] J. D. Smith, M. L. Johnson, and K. R. Williams, "Machine learning approaches in drug discovery," *Nat. Rev. Drug Discov.*, vol. 22, no. 4, pp. 301-318, Apr. 2023.
### Books
**Format**: [#] A. A. Author, *Title of Book*, xth ed. City, State: Publisher, Year.
**Example**: [2] V. Kumar, A. K. Abbas, and J. C. Aster, *Robbins and Cotran Pathologic Basis of Disease*, 10th ed. Philadelphia, PA: Elsevier, 2021.
---
## Common Abbreviations for Journal Names
- Nature: Nature (single-word journal titles are not shortened)
- Science: Science
- Cell: Cell
- Nature Reviews Drug Discovery: Nat. Rev. Drug Discov.
- Journal of the American Chemical Society: J. Am. Chem. Soc.
- Proceedings of the National Academy of Sciences: Proc. Natl. Acad. Sci. U.S.A.
- PLOS ONE: PLoS ONE
- Bioinformatics: Bioinformatics
- Nucleic Acids Research: Nucleic Acids Res.
---
## DOI Best Practices
1. **Always verify DOIs**: Use the verify_citations.py script to check all DOIs
2. **Format as URLs**: https://doi.org/10.xxxx/yyyy (preferred over doi:10.xxxx/yyyy)
3. **Separate punctuation from identifiers**: APA omits a final period after a DOI URL; other styles may differ. Do not copy prose punctuation into the identifier
4. **Resolve redirects**: Check that DOIs resolve to the correct article
---
## In-Text Citation Guidelines
### APA Style
- (Smith et al., 2023)
- Smith et al. (2023) demonstrated...
- Multiple citations: (Brown, 2022; Smith et al., 2023; Zhang, 2024)
### Nature Style
- Superscript numbers: Recent studies^1,2^ have shown...
- Or: Recent studies (refs 1,2) have shown...
### Chicago Style
- (Smith et al. 2023) for three or more authors
- Smith et al. (2023) found...
---
## Reference List Organization
### By Citation Style
- **APA, Chicago**: Alphabetical by first author's last name
- **Nature, Vancouver, IEEE**: Numerical order of first appearance in text
### Hanging Indents
Most styles use hanging indents where the first line is flush left and subsequent lines are indented.
### Consistency
Maintain consistent formatting throughout:
- Capitalization (title case vs. sentence case)
- Journal name abbreviations
- DOI presentation
- Author name format
## Authoritative style resources
- [APA reference examples](https://apastyle.apa.org/style-grammar-guidelines/references/examples) and [reference guide](https://apastyle.apa.org/instructional-aids/reference-guide.pdf).
- [Nature formatting guide](https://www.nature.com/nature/for-authors/formatting-guide).
- [Chicago author-date examples](https://www.chicagomanualofstyle.org/tools_citationguide/citation-guide-2.html).
- [NLM Citing Medicine](https://www.ncbi.nlm.nih.gov/books/NBK7256/); numbered citation punctuation and author truncation can be journal-specific.
- [IEEE reference guide](https://ieeeauthorcenter.ieee.org/wp-content/uploads/IEEE-Reference-Guide.pdf). Its full current text was not retrievable during this refresh; the IEEE examples above remain illustrative and require venue verification.
- [Pandoc citation processing](https://pandoc.org/MANUAL.html#citations); a local CSL file and complete bibliography are required for the selected nondefault style.

View File

@@ -0,0 +1,268 @@
# Core Workflow
Illustrative workflow; example queries, dates, counts, and numerical findings are not executed review results. Run commands from this skill directory, using paths to your review workspace.
All seven phases in full: planning and scoping, systematic search, screening and
selection, data extraction and quality assessment, synthesis and analysis, citation
verification, and document generation.
## Core Workflow
Literature reviews follow a structured, multi-phase workflow:
### Phase 1: Planning and Scoping
1. **Define Research Question**: Use PICO framework (Population, Intervention, Comparison, Outcome) for clinical/biomedical reviews
- Example: "What is the efficacy of CRISPR-Cas9 (I) for treating sickle cell disease (P) compared to standard care (C)?"
2. **Establish Scope and Objectives**:
- Define clear, specific research questions
- Determine review type (narrative, systematic, scoping, meta-analysis)
- Set boundaries (time period, geographic scope, study types)
3. **Develop Search Strategy**:
- Identify 2-4 main concepts from research question
- List synonyms, abbreviations, and related terms for each concept
- Plan Boolean operators (AND, OR, NOT) to combine terms
- Select complementary bibliographic databases and registries appropriate to the question
- **Optionally use parallel-web (`parallel-cli search`) for initial scoping** to quickly gauge the landscape before formal database searches
4. **Set Inclusion/Exclusion Criteria**:
- Date range (e.g., the explicitly historical interval 2015-2024)
- Language (typically English, or specify multilingual)
- Publication types (peer-reviewed, preprints, reviews)
- Study designs (RCTs, observational, in vitro, etc.)
- Document all criteria clearly
### Phase 2: Systematic Literature Search
1. **Multi-Database Search**:
Select bibliographic databases and registries appropriate for the domain. Use optional web search for scoping and supplementary discovery; record it separately from database exports.
**Supplementary web discovery (parallel-web):**
- Use `parallel-cli search` with academic domain filtering for broad scholarly coverage
- Consider academic-focused and general searches; ranked samples do not guarantee complete retrieval
```bash
mkdir -p sources
# Illustrative ranked sample; not a complete search
parallel-cli search "your research topic" -q "keyword1" -q "keyword2" \
--json --max-results 10 --excerpt-max-chars-total 27000 \
--include-domains "scholar.google.com,arxiv.org,pubmed.ncbi.nlm.nih.gov,semanticscholar.org,biorxiv.org,medrxiv.org,ncbi.nlm.nih.gov,nature.com,science.org,ieee.org,acm.org,springer.com,wiley.com,cell.com,pnas.org,nih.gov" \
-o sources/litreview_<topic>-academic.json
# General search for supplementary sources
parallel-cli search "your research topic" -q "keyword1" -q "keyword2" \
--json --max-results 10 --excerpt-max-chars-total 27000 \
-o sources/litreview_<topic>-general.json
```
- Use `parallel-cli extract --full-content` to request content from accessible paper URLs; check for truncation and retrieval errors
```bash
parallel-cli extract "https://arxiv.org/abs/1706.03762" --full-content --json
```
**Biomedical & Life Sciences:**
- Search PubMed via its interface or E-utilities; PMC has different full-text coverage
- Search bioRxiv/medRxiv interfaces, or retrieve date-range API metadata and explicitly filter it
- See `database_strategies.md` for exact requests, authentication, and export limits
**General Scientific Literature:**
- Search arXiv via direct API (preprints in physics, math, CS, q-bio)
- Search Semantic Scholar using its documented relevance or bulk API as appropriate
- Use Google Scholar manually for supplementary discovery and citation chaining; preserve search and screening limits
Biological entity databases can inform background, but do not count as
bibliographic sources simply because they contain references.
2. **Document Search Parameters**:
```markdown
## Search Strategy
### Database: PubMed
- **Date searched**: 2024-10-25
- **Date range**: 2015-01-01 to 2024-10-25
- **Search string**:
```
("CRISPR"[Title] OR "Cas9"[Title])
AND ("Anemia, Sickle Cell"[MeSH Terms] OR "SCD"[Title/Abstract])
AND 2015:2024[Publication Date]
```
- **Results**: 247 articles
```
Repeat for each database searched.
3. **Export and Aggregate Results**:
- Export results in JSON format from each database
- Normalize raw provider responses into a JSON array, preserving raw exports and provenance separately
- Use `scripts/search_databases.py` for post-processing:
```bash
python scripts/search_databases.py combined_results.json \
--deduplicate \
--format markdown \
--output aggregated_results.md
```
### Phase 3: Screening and Selection
1. **Deduplication**:
```bash
python scripts/search_databases.py results.json --deduplicate --format json --output unique_results.json
```
- Keeps first normalized DOI; title fallback compares DOI-less records only. Review matches and retain raw duplicates for enrichment
- Document number of duplicates removed
2. **Title Screening**:
- Review all titles against inclusion/exclusion criteria
- Exclude obviously irrelevant studies
- Document number excluded at this stage
3. **Abstract Screening**:
- Read abstracts of remaining studies
- Apply inclusion/exclusion criteria rigorously
- Document reasons for exclusion
4. **Full-Text Screening**:
- Obtain full texts of remaining studies
- Conduct detailed review against all criteria
- Document specific reasons for exclusion
- Record final number of included studies
5. **Create PRISMA Flow Diagram**:
- Use the official template matching new/updated review and source types.
- Track records identified and removed before screening, records screened
and excluded, reports sought/not retrieved/assessed, excluded reports with
reasons, and included studies plus reports of those studies.
- Reconcile counts at each transition; do not invent one included-study count
from the number of publications. Maintain a study-to-report map.
### Phase 4: Data Extraction and Quality Assessment
1. **Extract Key Data** from each included study:
- Study metadata (authors, year, journal, DOI)
- Study design and methods
- Sample size and population characteristics
- Key findings and results
- Limitations noted by authors
- Funding sources and conflicts of interest
2. **Assess Risk of Bias and Certainty**:
- Use a tool appropriate to the design and question: RoB 2 for randomized
trial results; ROBINS-I for nonrandomized intervention results; AMSTAR 2
for systematic reviews of healthcare interventions. Other designs require their own appraisal tool.
- Preserve domain judgments and rationale. RoB 2 uses low risk, some concerns,
or high risk; do not force every tool onto a common numerical scale.
- GRADE assesses a body of evidence for each outcome (high/moderate/low/very
low), not a generic grade for each individual study. See the
[Cochrane certainty guidance](https://www.cochrane.org/authors/handbooks-and-manuals/handbook/current/chapter-14).
- Pre-specify how bias affects synthesis; do not invent post-hoc exclusions.
3. **Organize by Themes**:
- Identify 3-5 major themes across studies
- Group studies by theme (studies may appear in multiple themes)
- Note patterns, consensus, and controversies
### Phase 5: Synthesis and Analysis
1. **Create Review Document** from template:
```bash
cp assets/review_template.md my_literature_review.md
```
2. **Write Thematic Synthesis** (NOT study-by-study summaries):
- Organize Results section by themes or research questions
- Synthesize findings across multiple studies within each theme
- Compare and contrast different approaches and results
- Identify consensus areas and points of controversy
- Highlight the strongest evidence
Fictitious structure example (replace every count and percentage with extracted evidence):
```markdown
#### 3.3.1 Theme: CRISPR Delivery Methods
Multiple delivery approaches have been investigated for therapeutic
gene editing. Viral vectors (AAV) were used in 15 studies^1-15^ and
showed high transduction efficiency (65-85%) but raised immunogenicity
concerns^3,7,12^. In contrast, lipid nanoparticles demonstrated lower
efficiency (40-60%) but improved safety profiles^16-23^.
```
3. **Critical Analysis**:
- Evaluate methodological strengths and limitations across studies
- Assess quality and consistency of evidence
- Identify knowledge gaps and methodological gaps
- Note areas requiring future research
4. **Write Discussion**:
- Interpret findings in broader context
- Discuss clinical, practical, or research implications
- Acknowledge limitations of the review itself
- Compare with previous reviews if applicable
- Propose specific future research directions
### Phase 6: Citation Verification
**CRITICAL**: All citations must be verified for accuracy before final submission.
1. **Verify All DOIs**:
```bash
python scripts/verify_citations.py my_literature_review.md
```
This script:
- Extracts all DOIs from the document
- Checks DOI registration via the Handle API
- Retrieves available Crossref metadata and preserves unresolved errors
- Generates verification report
- Does not verify claim support, publisher accessibility, or final citation style
2. **Review Verification Report**:
- Check for any failed DOIs
- Verify author names, titles, and publication details match
- Correct any errors in the original document
- Resolve errors against the source; do not delete a reference solely because a service timed out or lacks its metadata
3. **Format Citations Consistently**:
- Choose one citation style and use throughout (see `references/citation_styles.md`)
- Common styles: APA, Nature, Vancouver, Chicago, IEEE
- Use complete metadata with a CSL processor; the script only provides metadata previews
- Ensure in-text citations match reference list format
### Phase 7: Document Generation
1. **Generate PDF**:
```bash
python scripts/generate_pdf.py my_literature_review.md \
--bibliography my_literature_review.bib --csl styles/apa.csl \
--output my_review.pdf
```
Supply an existing `.bib` and `.csl` for that example; they are not bundled.
`[@key]` citations are formatted, while manually typed references remain unchanged.
Options:
- `--csl` / `--citation-style`: existing local CSL path/name; omitted uses Pandoc default
- `--bibliography`: bibliography file; sibling `.bib` also auto-detected
- `--output`: PDF destination
- `--no-toc`: Disable table of contents
- `--no-numbers`: Disable section numbering
- `--check-deps`: Check if pandoc/xelatex are installed
2. **Review Final Output**:
- Check PDF formatting and layout
- Verify all sections are present
- Ensure citations render correctly
- Check that figures/tables appear properly
- Verify table of contents is accurate
3. **Quality Checklist**:
- [ ] DOI registration checked; metadata identity and claim support reviewed manually
- [ ] Citations formatted consistently
- [ ] PRISMA flow diagram included (for systematic reviews)
- [ ] Search methodology fully documented
- [ ] Inclusion/exclusion criteria clearly stated
- [ ] Results organized thematically (not study-by-study)
- [ ] Quality assessment completed
- [ ] Limitations acknowledged
- [ ] References complete and accurate
- [ ] PDF generates without errors

View File

@@ -0,0 +1,183 @@
# Literature database search strategies
Reviewed 2026-09-30. These are bibliographic discovery contracts, not a promise
of complete retrieval. Save query, platform, date/time, date-field meaning,
filters, raw pages, reported total, exported count, and any failures. Mark a
capped or interrupted retrieval incomplete before screening it.
## Source selection and query design
1. Define the review type and eligibility criteria before seeing results. Use
PICO for intervention questions; adapt the framework for other questions.
2. Select complementary bibliographic databases, relevant registries, preprint
servers, and grey literature sources. A web search and a biological entity
database are not substitutes for a discipline's bibliographic index.
3. Build synonym groups with OR and combine concepts with AND. Pilot against
known eligible papers. Consider whether outcome filters, language limits,
publication-type limits, or NOT terms discard relevant studies.
4. Translate each query to that platform. Wildcards and field syntax are not
portable: do not copy PubMed `[MeSH]`, arXiv `ti:`, or search-engine operators
into another API. Record the actual translated query, not just keywords.
5. For systematic reviews, screen against protocol criteria regardless of venue,
author reputation, institutional affiliation, or citation count. Bibliometric
metrics reflect exposure and field/age effects, not risk of bias.
## PubMed and PMC
Use the [PubMed interface](https://pubmed.ncbi.nlm.nih.gov/advanced/) or NCBI
E-utilities. `gget search` searches Ensembl and has no PubMed/bioRxiv mode.
PubMed contains bibliographic records; PMC is a full-text repository with a
partly overlapping corpus. Do not equate access to an abstract with full text.
A small first-page request, not a complete review search:
```bash
mkdir -p sources
curl --fail-with-body --get 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi' \
--data-urlencode 'db=pubmed' \
--data-urlencode 'term=(CRISPR[Title/Abstract]) AND ("Anemia, Sickle Cell"[MeSH Terms])' \
--data-urlencode 'retmode=json' --data-urlencode 'retmax=5' \
--data-urlencode 'tool=literature_review' -o sources/pubmed-first-page.json
```
- ESearch returns `esearchresult.count` (often a string), `idlist`, and query
translation/warnings. Inspect these; HTTP 200 alone does not confirm success.
- Use `retstart`/`retmax` for paging **within the first 10,000 PubMed matches**.
Partition larger searches into recorded, deduplicated subqueries or use a
documented bulk method; the History server does not bypass this limit.
- EFetch is `GET .../efetch.fcgi?db=pubmed&id=PMID1,PMID2&retmode=xml` (or POST for
large ID sets). Parse `PubmedArticleSet` XML, preserve article/book records,
and reconcile requested versus returned IDs.
- No key is needed for small requests. Supply a real contact `email` and `tool`
for sustained use; optional `api_key` raises the default shared limit from
3 requests/s per IP to 10/s per key. Account for concurrent clients.
- Use explicit `[Publication Date]` ranges, and record the selected field.
A historical example such as `2020:2024[DP]` does not mean "current years".
Sources: [NLM parameter guide](https://www.nlm.nih.gov/dataguide/eutilities/utilities.html),
[PubMed 10,000-result ceiling](https://ncbiinsights.ncbi.nlm.nih.gov/2021/10/05/updated-pubmed-api/),
[NCBI usage guidelines](https://eutilities.github.io/site/API_Key/usageandkey/).
## bioRxiv and medRxiv
The [official API](https://api.biorxiv.org/) provides date/DOI metadata retrieval,
not a general keyword query endpoint. Use the server's search interface for
keyword discovery or filter the downloaded metadata explicitly.
- `GET https://api.biorxiv.org/details/{server}/{from}/{to}/{cursor}/json`, with
server `biorxiv` or `medrxiv`, date strings `YYYY-MM-DD`, zero-based
cursor (start at 0), and optional `category=cell_biology`.
- Response `collection[]` holds records; `messages[]` describes status, count,
cursor, and totals. Date-range calls return at most 30 records; advance the
cursor by the number received, retain all versions, and check totals/status.
- Single DOI: `/details/{server}/{doi}/na/json`. Preserve DOI, `version`, `date`,
abstract, license, and `published` linkage. A preprint and a published report
may describe one study but are distinct reports.
- `/pubs/{server}/{from}/{to}/{cursor}` maps publication links, with up to 100
entries per page. It has a different schema (`biorxiv_doi`, `published_doi`).
- Public reads need no API key. Use conservative sequential calls and stop on
throttling/errors; do not interpret missing publication links as proof that
a preprint remains unpublished.
## arXiv
`GET https://export.arxiv.org/api/query` accepts `search_query`, `id_list`,
`start` (zero-based), `max_results`, `sortBy`, and `sortOrder`. No key is needed.
```bash
curl --fail-with-body --get 'https://export.arxiv.org/api/query' \
--data-urlencode 'search_query=cat:q-bio.QM AND ti:"single cell"' \
--data-urlencode 'start=0' --data-urlencode 'max_results=5' \
--data-urlencode 'sortBy=submittedDate' --data-urlencode 'sortOrder=descending' \
-o sources/arxiv-first-page.xml
```
Parse Atom namespaces, `opensearch:totalResults`, and entry IDs; error entries
can arrive in an Atom feed. Preserve `vN`, original `published`, and `updated`
dates. `ti:` is the title field, not `title:`. Use a single connection with at
least three seconds between requests. Use pages no larger than 2,000 and do
not expect offsets to provide more than 30,000 matches; partition or use the
bulk interfaces. This is preprint discovery, not evidence of peer review.
Source: [arXiv API manual](https://info.arxiv.org/help/api/user-manual.html).
## Semantic Scholar
Use the [Graph API contract](https://api.semanticscholar.org/api-docs/graph)
(and its downloadable [schema](https://api.semanticscholar.org/graph/v1/swagger.json)).
- Relevance search: `GET https://api.semanticscholar.org/graph/v1/paper/search`;
plain-text `query`, separate `year=2020-2024`, optional `fields`, `offset`,
`limit` (maximum 100). Response has `data[]`, `total`, and optional `next`.
Only 1,000 relevance-ranked records are retrievable; not an exhaustive export.
- Bulk search: `GET .../paper/search/bulk`; query uses its documented Boolean
grammar (`+`, `|`, `-`, quotes, parentheses), with separate filters and
`fields`. Response has `data[]` and a continuation `token`; pass that token
unchanged to the next request. Up to 1,000 records/call, capped at 10 million.
Nested citation/reference data are not available on this endpoint.
- Do not invent `title:`/`author:` operators for the relevance API. Use separate
author or title search routes only after consulting their own contracts.
- API keys go in `x-api-key`; availability/quota depends on the endpoint and
account. Anonymous access is a shared, throttled pool. Follow your granted
quota, inspect HTTP 429, and back off; the former blanket "100 requests per
5 minutes" is not a current service guarantee.
- Citation counts and influential-citation labels are discovery aids. Check
paper identity, missing fields, date coverage, and source text yourself.
## OpenAlex, Crossref, and supplementary search
[OpenAlex authentication](https://help.openalex.org/api/authentication/) permits
keyless casual reads; a free key raises the daily budget. Use `api_key` or
`Authorization: Bearer` without saving secrets in search logs. `GET
https://api.openalex.org/works` accepts `search`, `filter`, `select`, and `sort`.
Responses have `results[]` and `meta`. The current `per_page` maximum is 100;
start `cursor=*` and follow `meta.next_cursor` unchanged. Basic page-based
retrieval stops at 10,000. Respect request credits and rate-limit headers;
keyless does not mean unlimited. See [paging](https://help.openalex.org/api/paging/).
Crossref `GET https://api.crossref.org/works/{doi}` is a singleton metadata
lookup with JSON `message`, no key or pagination. A 404 does not prove a DOI
from another registration agency is invalid. List searches (`/works?query...`)
have different quotas and pagination: public list limit 1/s, polite 3/s, versus
5/s and 10/s for single records. Provide real `mailto` for polite access; follow
[response headers](https://community.crossref.org/t/refining-rest-api-limits-for-improved-stability-and-reliability/16137).
Google Scholar's [interface](https://scholar.google.com/intl/en/scholar/help.html)
provides Cited by, Related articles, and Cite exports, but no supported bulk API.
Record queries and screened ranges; do not promise citation-count sorting,
unlimited results, or complete coverage from a ranked sample. Stop on access
blocks. Dimensions and licensed indexes require the access your institution
actually holds; a free website tier does not imply API entitlement.
## Result normalization and reproducibility
`search_databases.py` does **not** query or merge raw provider envelopes. Give it
a JSON array of normalized objects, preserving the raw exports separately:
```json
[
{"title": "Example title", "authors": "Author, A. and Author, B.",
"first_author": "Author", "year": 2026, "source": "PubMed",
"doi": null, "url": "https://pubmed.ncbi.nlm.nih.gov/", "citations": null}
]
```
Use strings for title/authors/source and numbers or null for citation counts;
BibTeX authors require `and` separators. Keep provider IDs, search/run IDs,
retrieval dates, and source provenance as extra fields. Missing is not zero.
```bash
python scripts/search_databases.py combined_results.json --deduplicate \
--format json --output unique_results.json --summary
```
Deduplication keeps the first normalized DOI; title fallback compares DOI-less
records only. Review title matches manually and enrich from raw duplicates;
the script does not choose the most complete metadata or link all reports of a
study. Unknown years remain for manual review. Ranking only orders the imported
sample. Use final BibTeX keys from the export; same-author/year keys receive
suffixes. An export timestamp is not the original search date.
Use the official [PRISMA guidance](https://www.prisma-statement.org/prisma-2020)
and [Cochrane selection guidance](https://www.cochrane.org/authors/handbooks-and-manuals/handbook/current/chapter-04)
to keep screening decisions and report/study links auditable.

View File

@@ -0,0 +1,71 @@
# Example Workflow
Illustrative end-to-end recipe, not an executed review. Run from the skill directory; populate the protocol, normalized search records, bibliography, and CSL file before the dependent commands. Dates below are a deliberately historical 2015-2024 interval.
## Example Workflow
Complete workflow for a biomedical literature review:
```bash
# 1. Create review document from template
mkdir -p sources styles
cp assets/review_template.md crispr_sickle_cell_review.md
# 2. Optional supplementary discovery (authenticated Parallel account)
parallel-cli search "CRISPR Cas9 sickle cell disease gene therapy efficacy" \
-q "CRISPR" -q "sickle cell" -q "gene therapy" \
--json --max-results 10 --excerpt-max-chars-total 27000 \
--include-domains "scholar.google.com,arxiv.org,pubmed.ncbi.nlm.nih.gov,semanticscholar.org,biorxiv.org,nature.com,science.org,cell.com,pnas.org,nih.gov" \
-o sources/litreview_crispr_scd-academic.json
parallel-cli search "CRISPR sickle cell disease clinical trials treatment" \
-q "CRISPR" -q "sickle cell" \
--json --max-results 10 --excerpt-max-chars-total 27000 \
-o sources/litreview_crispr_scd-general.json
# 3. Search specialized databases using appropriate skills
# - Use PubMed E-utilities and bioRxiv/medRxiv search or date-metadata APIs
# - Use direct API access for arXiv, Semantic Scholar
# - Save all pages and counts; document any API caps or failed requests
# - Normalize into a JSON array; keep raw exports and provenance
# 4. Process your normalized combined_results.json; raw API envelopes will fail
python scripts/search_databases.py combined_results.json \
--deduplicate \
--year-start 2015 \
--year-end 2024 \
--format markdown \
--output search_results.md \
--summary
# 5. Screen results and extract data
# - Request extracts with --full-content; obtain original reports and record failures
# - Use independent final full-text decisions and retain exclusion reasons
# - Track records, reports, studies, and overlapping participants separately
# - Extract key data into the review document
# - Organize by themes
# 6. Write the review following template structure
# - Introduction with clear objectives
# - Detailed methodology section
# - Results organized thematically
# - Critical discussion
# - Clear conclusions
# 7. Check DOI registration/metadata, then manually verify identity and claim support
python scripts/verify_citations.py crispr_sickle_cell_review.md
# Review the citation report
cat crispr_sickle_cell_review_citation_report.json
# Investigate missing/inconclusive results; transient failures do not invalidate citations
python scripts/verify_citations.py crispr_sickle_cell_review.md
# 8. Render after supplying bibliography, local CSL, and [@key] citations
# For manually typed references, omit those options; text will not be restyled
python scripts/generate_pdf.py crispr_sickle_cell_review.md \
--bibliography crispr_sickle_cell_review.bib --csl styles/nature.csl \
--output crispr_sickle_cell_review.pdf
# 9. Review final PDF and markdown outputs
```

View File

@@ -0,0 +1,93 @@
# Search, citation chaining, and source verification
Use [database_strategies.md](database_strategies.md) for current request syntax,
authentication, response shapes, and paging limits. Commands below are
illustrative discovery recipes, not executed searches or complete corpora.
## Supplementary web search
Parallel CLI 0.9.3 supports the flags below. Authenticate with `parallel-cli auth`
or `PARALLEL_API_KEY`; installation and authentication are described in the
[official CLI guide](https://docs.parallel.ai/integrations/cli). It is optional
for the review workflow and may incur provider charges.
```bash
mkdir -p sources
parallel-cli search "CRISPR sickle cell clinical studies" \
-q 'CRISPR sickle cell clinical trial' --json --max-results 10 \
--excerpt-max-chars-total 27000 \
--include-domains 'pubmed.ncbi.nlm.nih.gov,biorxiv.org,medrxiv.org' \
-o sources/scoping-web.json
parallel-cli extract 'https://arxiv.org/abs/1706.03762' \
--full-content --json -o sources/paper-extract.json
```
`--max-results` is a cap on ranked returned hits, not the database total.
`--full-content` requests a fuller extraction; unavailable or truncated content
still requires retrieval from the original source. Save the URL, extraction
status, date, and exact text supporting each inference. Never report a title,
web excerpt, or machine summary as if the full paper was assessed.
## Citation chaining
- **Forward:** use Google Scholar Cited by or documented Semantic Scholar /
OpenAlex citation queries. Search-engine queries such as "papers citing ..."
are supplementary leads, not complete forward-citation exports.
- **Backward:** inspect reference lists of eligible reports and relevant reviews;
retrieve candidate records and apply the same eligibility criteria.
- Track seed papers, tools, dates, retrieved counts, and screening decisions.
Link preprint, journal, protocol, and follow-up reports to a study ID before
synthesis. Citation-count thresholds and journal prestige are not eligibility
rules; recent and negative studies must have an equal chance of inclusion.
## DOI checks and bibliographic identity
```bash
python scripts/verify_citations.py review.md --output review_citation_report.json
```
Optional `--email` supplies a real contact to the Crossref polite pool. The
helper extracts unique DOI candidates, URL-encodes them, and checks
`GET https://doi.org/api/handles/{doi}`. Registration requires a successful
Handle `responseCode=1` and matching identifier, not HTTP 200 alone. It then
requests `GET https://api.crossref.org/works/{doi}` and checks metadata identity.
These public singleton reads require no key or pagination.
Read the report's `verified` as **registration confirmed**, `failed` as
**unresolved/missing/inconclusive**, and `metadata_unavailable` as **manual
metadata follow-up needed**. Transient errors and throttling are not proof of
fabrication. Crossref does not cover every registration agency. The script
preserves the original Crossref message and full author list; its compatibility
formatting methods are previews, not compliant APA or Nature output.
DOI extraction is heuristic: inspect ambiguous trailing punctuation and older
suffixes with parentheses. Citations without DOIs require manual verification.
Check titles, authors, year, version, correction/retraction notices, and that
the source actually supports the cited statement. Registered identifiers and
accessible URLs do not establish those properties.
Sources: [Handle proxy API](https://www.handle.net/proxy_servlet.html),
[Crossref REST API](https://www.crossref.org/documentation/retrieve-metadata/rest-api/).
## Rendering references
Use complete metadata in BibTeX/CSL JSON and a current, venue-appropriate CSL
file. See [citation_styles.md](citation_styles.md). With Pandoc, cite using
`[@citation_key]`; manually typed reference strings are not reformatted by
selecting a style.
```bash
# Requires your populated review.bib and local styles/apa.csl.
python scripts/generate_pdf.py review.md --bibliography review.bib \
--csl styles/apa.csl --output review.pdf
```
No CSL files are bundled or downloaded automatically. A sibling `.bib` is
recognized; otherwise provide `--bibliography` or Pandoc bibliography metadata.
Omitting `--csl` uses Pandoc's default citation style. `--citation-style` remains
an alias for a local file/name (e.g. `apa` requires `apa.csl`).
Inspect the rendered PDF and all warnings, including unresolved keys. Match
in-text citations to the bibliography and manually verify formatting against
the destination journal's instructions. [Pandoc citation documentation](https://pandoc.org/MANUAL.html#citations).