scientific-literature
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-07-14
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- scientific-literature
- triggers
- [ "search epmc", "search pubmed", "search openalex", "search biorxiv", "search medrxiv", "find papers about", "build a corpus", "search literature", "count papers", "ingest paper", "fetch paper by DOI", "look up paper", "add paper to corpus", "embed papers", "semantic search", "find similar papers", "cluster papers", "thematic clustering" ]
- prerequisites
- [ "TypeDB running (install alhazen-core first and run /alhazen-core:init)", "uv installed", "Qdrant running for semantic commands (docker run -d -p 6333:6333 qdrant/qdrant)", "VOYAGE_API_KEY set for embed/search-semantic/cluster" ]
02 资源文件 107
- 参考文档.claude-plugin/plugin.json501 B
- 其他.python-version5 B
- 其他.standalone-db178 B
- 脚本cluster_synthesis.py2.2 KB
- 其他dashboard/components/atoms.tsx14.3 KB
- 其他dashboard/components/corpus-detail.tsx4.4 KB
- 脚本dashboard/components/curation-diagrams.ts8.1 KB
- 其他dashboard/components/database-selector.tsx1.7 KB
- 脚本dashboard/components/db.ts1.4 KB
- 其他dashboard/components/embedding-map.tsx8.5 KB
- 其他dashboard/components/faceting-note-viewer.tsx5.4 KB
- 其他dashboard/components/investigation-detail.tsx16.7 KB
- 其他dashboard/components/investigation-list.tsx5.6 KB
- 其他dashboard/components/investigation-shell.tsx7.4 KB
- 其他dashboard/components/kefed-graph.tsx5.8 KB
- 其他dashboard/components/kefed-instance.tsx10.2 KB
- 其他dashboard/components/kqed-view.tsx3.8 KB
- 其他dashboard/components/mermaid.tsx1.8 KB
- 其他dashboard/components/paper-curation.tsx14.5 KB
- 其他dashboard/components/paper-detail.tsx4.2 KB
- 其他dashboard/components/stage-view.tsx11.5 KB
- 脚本dashboard/components/tokens.ts3.2 KB
- 脚本dashboard/lib.ts19.3 KB
- 其他dashboard/pages/scientific-literature/acquisition/page.tsx8.4 KB
- 其他dashboard/pages/scientific-literature/corpus/[id]/page.tsx242 B
- 其他dashboard/pages/scientific-literature/faceting-note/[id]/page.tsx267 B
- 其他dashboard/pages/scientific-literature/investigation/[id]/page.tsx267 B
- 其他dashboard/pages/scientific-literature/kqed/[id]/page.tsx228 B
- 其他dashboard/pages/scientific-literature/map/page.tsx3.0 KB
- 其他dashboard/pages/scientific-literature/ontology/page.tsx7.4 KB
- 其他dashboard/pages/scientific-literature/page.tsx264 B
- 其他dashboard/pages/scientific-literature/paper/[id]/page.tsx238 B
- 其他dashboard/pages/scientific-literature/template/[id]/page.tsx4.7 KB
- 脚本dashboard/routes/acquisition/route.ts521 B
- 脚本dashboard/routes/bundle/[id]/route.ts453 B
- 脚本dashboard/routes/corpora/route.ts363 B
- 脚本dashboard/routes/corpus/[id]/route.ts646 B
- 脚本dashboard/routes/databases/route.ts369 B
- 脚本dashboard/routes/faceting-note/[id]/route.ts544 B
- 脚本dashboard/routes/faceting-note/[id]/run/route.ts545 B
- 脚本dashboard/routes/faceting-notes/route.ts464 B
- 脚本dashboard/routes/investigation/[id]/route.ts547 B
- 脚本dashboard/routes/investigations/route.ts577 B
- 脚本dashboard/routes/kqed/[id]/route.ts462 B
- 脚本dashboard/routes/map/route.ts794 B
- 脚本dashboard/routes/ontology/route.ts698 B
- 脚本dashboard/routes/paper/[id]/checks/route.ts559 B
- 脚本dashboard/routes/paper/[id]/curation/route.ts547 B
- 脚本dashboard/routes/paper/[id]/route.ts523 B
- 脚本dashboard/routes/stage/[id]/route.ts523 B
- 脚本dashboard/routes/template/[id]/route.ts567 B
- 参考文档docs/architecture-kqed.md29.9 KB
- 参考文档docs/example-fragments-sirt3.md10.7 KB
- 参考文档docs/example-kqed-sirt3.md13.5 KB
- 参考文档docs/grounding-text-guidelines.md3.8 KB
- 参考文档docs/kqed-phase1-grounding-plan.md31.4 KB
- 参考文档docs/kqed-phase2-sensemaking-plan.md12.5 KB
- 参考文档docs/kqed-phase3-analysis-plan.md12.5 KB
- 参考文档docs/kqed-phase4-dashboard-plan.md11.5 KB
- 参考文档docs/kqed-sensemaking-dashboard-design.md9.7 KB
- 参考文档docs/observation-source-labeling.md4.0 KB
- 参考文档docs/paper-identity-design.md9.7 KB
- 参考文档docs/paper-identity-plan.md28.9 KB
- 脚本entity_identity.py1.4 KB
- 脚本grounding_qc.py2.0 KB
- 参考文档hooks/hooks.json1.1 KB
- 脚本kqed.py27.0 KB
- 脚本migrations/retype_investigation_edges.py5.3 KB
- 脚本ontology_grounding.py7.8 KB
- 脚本paper_identity.py1.3 KB
- 脚本pdf_layout_parser.py15.1 KB
- 脚本pipelines/pipeline_faceting.py9.0 KB
- 脚本prototypes/build_citation_registry.py4.9 KB
- 脚本prototypes/consolidate_fulltext_text.py8.4 KB
- 脚本prototypes/fix_citation_registry.py6.9 KB
- 脚本prototypes/migrate_fulltext_identity.py2.8 KB
- 脚本prototypes/migrate_paper_identity.py8.7 KB
- 脚本prototypes/reconcile_legacy_fulltext.py4.1 KB
- 脚本prototypes/reconcile_papers_fulltext.py3.4 KB
- 脚本prototypes/reconcile_remaining_fulltext.py3.6 KB
- 脚本prototypes/rename_fulltext_artifact_files.py4.2 KB
- 其他pyproject.toml411 B
- 参考文档recipes/add-citation-impact.json943 B
- 参考文档recipes/add-claim.json548 B
- 参考文档recipes/add-evidence.json725 B
- 参考文档recipes/add-paper-to-corpus.json428 B
- 参考文档recipes/create-corpus-investigation.json616 B
- 参考文档recipes/create-deep-dive.json1.1 KB
- 参考文档recipes/record-phase.json704 B
- 其他schema.tql43.9 KB
- 脚本scientific_literature.py300.4 KB
- 参考文档skill.yaml1.5 KB
- 脚本tests/__init__.py—
- 脚本tests/conftest.py4.3 KB
- 脚本tests/test_cli_realignment.py76.4 KB
- 脚本tests/test_cluster_synthesis.py1.8 KB
- 脚本tests/test_entity_identity.py1.5 KB
- 脚本tests/test_fulltext_guard.py2.8 KB
- 脚本tests/test_grounding_qc.py2.4 KB
- 脚本tests/test_insert_paper_identity.py3.3 KB
- 脚本tests/test_ontology_grounding.py1.8 KB
- 脚本tests/test_paper_identity.py1.6 KB
- 脚本tests/test_schema_roundtrip.py27.0 KB
- 脚本tests/test_upsert_paper.py1.0 KB
- 脚本tests/test_value_specs.py6.9 KB
- 参考文档USAGE.md31.5 KB
- 其他uv.lock47.4 KB
03 SKILL.md 正文
Scientific Literature Skill
Multi-source scientific literature search, ingestion, and analysis. Sources: Europe PMC, PubMed (NCBI), OpenAlex, bioRxiv/medRxiv.
Quick Start
Path note: Replace
<skill-path>with your installation directory (e.g.~/.claude/plugins/cache/scientific-literature/when installed as a plugin).
# Count papers before committing (EPMC)
uv run --project <skill-path> python <skill-path>/scientific_literature.py count \
--query "CRISPR AND gene editing"
# Search EPMC and store results in a corpus
uv run --project <skill-path> python <skill-path>/scientific_literature.py search \
--source epmc --query "CRISPR AND gene editing" --collection "CRISPR Papers" \
--max-results 500
# Ingest a single paper by DOI (OpenAlex + PubMed fallback)
uv run --project <skill-path> python <skill-path>/scientific_literature.py ingest \
--doi "10.1038/s41587-020-0700-8"
# List papers in a corpus
uv run --project <skill-path> python <skill-path>/scientific_literature.py list \
--collection "collection-abc123"
Full-Text Ingestion & Per-Paper Cache — REQUIRED convention
This is the ONLY correct way to ingest a paper's full text and cache its files. It is mandatory and uniform across every scilit investigation (search corpora, deep-dives, CAIS, etc.) — never improvise an alternate layout.
1. Paper identity (deterministic)
Every paper is a scilit-paper whose id is a pure function of its best stable
identifier: DOI → PMID → arXiv → content-hash(title|first-author|year). Compute it
with paper_identity() in paper_identity.py; create/find papers only via
kqed.upsert_paper(driver, meta). Same paper → same id, always. The tier is recorded in
scilit-identity-basis / scilit-identity-value. (Full design: docs/paper-identity-design.md.)
2. One directory per paper; every file is named by ITS artifact id
~/.alhazen/cache/fulltext/<paper-id>/
scilit-fulltext-<paper-hash>.pdf # source rendition ┐ ONE full-text artifact
scilit-fulltext-<paper-hash>.txt # kreuzberg text ┘ (renditions share the id-base)
<other-artifact-id>.<ext> # any OTHER artifact of the paper (table/figure/supplement/data)
A paper may have several artifacts; each FILE is named by the id of the artifact it
belongs to (basename = artifact id, suffix = format). There is ONE full-text artifact
per paper, scilit-fulltext-<paper-hash> (paper-hash = the paper id's 12-hex suffix); its
.pdf source and .txt extraction are two renditions of that single artifact, sharing
the id-base and differing only by suffix. Any other content (extracted tables, figures,
supplements, datasets) is its OWN alh-artifact, file <that-artifact-id>.<ext>.
EVERY such file goes in that paper's fulltext/<paper-id>/ subdirectory — and nowhere
else (NOT cache/pdf/, cache/text/, cache/extracted/, or cache/papers/).
3. Rules
- MOVE files into place (copy, then remove the original) — never symlink, and never
leave a paper's content scattered in
cache/pdf/,cache/text/,cache/extracted/, orcache/papers/. - The filename basename equals the artifact id — a loose file is self-identifying.
- Register every file as an
alh-artifactwith a complete file xref:cache-path = fulltext/<paper-id>/<artifact-id>.<ext>pluscontent-hash(sha256),file-size,mime-type, andformat— linked to the paper viaalh-representation. The full-text artifact'scache-pathpoints at its text rendition (.txt, the indexable one); the.pdfis the sibling by suffix. - The path is computable from the paper id — the full-text artifact id is deterministic
(
scilit-fulltext-<paper-hash>), sopaper → fulltext/<paper-id>/scilit-fulltext-<paper-hash>.pdfneeds no graph lookup. Keep it that way. - A paper with a local source PDF must carry
scilit-acquisition-status = held; a cited-but-undownloaded reference isneeded.
4. Ingestion flow (per paper)
upsert_paper(meta)→ deterministic<paper-id>; full-text artifact idscilit-fulltext-<paper-hash>.- Download the source PDF → move to
fulltext/<paper-id>/scilit-fulltext-<paper-hash>.pdf; register the artifact with the complete file xref (cache-path + content-hash + file-size + mime-type + format); set statusheld. - kreuzberg-extract the text → write
fulltext/<paper-id>/scilit-fulltext-<paper-hash>.txtas the same artifact's.txtrendition. - Extracted tables / figures / supplements / data → each its OWN artifact, file
<artifact-id>.<ext>in the same dir, with its own complete file xref. - Never write any of the above outside
fulltext/<paper-id>/.
cache/pdf/may still hold OTHER skills' documents (tech-recon, health-coach) — those are out of scope for this convention; do not touch them. This convention governsscilit-papercontent only.
Reconciliation prototypes that retrofit existing data to this layout live in
prototypes/reconcile_*_fulltext.py (they MOVE sources into fulltext/<paper-id>/).
KEfED Model Authoring — build STRUCTURED, RICH, ACCURATE, EXPRESSIVE models
A KEfED model (kefed-model, authored under a bundle with add-experiment) is a graph of
kefed-model-nodes that reconstructs an experiment. Follow these principles:
-
Reconstruct the real protocol from the paper's Methods. Read the Experimental Procedures and build the actual material chain — organism → sample preparation → assay → readout — including where cells came from and how they were prepared (harvest, sort, lineage-deplete, transduce, transplant, culture...). The combination of nodes in the graph carries the experimental-design semantics, not any single node.
-
Minimal ontological commitment per node; maximum reuse. Node definitions are generic and reusable —
experimental mouse,bone-marrow harvest,competitive transplantation— NOTHSC (WT or SIRT3-KO mouse). What differentiates this experiment lives in the attached variables + values, never in node names. Share one OOEVV element wherever the concept genuinely recurs:add-entity-node/add-processfind-or-create a def by name within the model's element-set, so passadd-experiment --element-set <id>to make a family of experiments share one element-set and thus one def per concept (verify: distinct defs ≪ node count). A node name is the KIND of thing, never its specifics. Strip every specific out of the name and move it into a variable:C57BL/6 male mouse→mouse(+strain,sex,species);aged mouse tail-tip fibroblasts→fibroblast(+tissue source,donor age state,species);MeV-derived iPSC clones→iPSC clone(+reprogramming vector);S. cerevisiae ancestor strain (RWY12/BY4741, tlc1-delta)→yeast strain(+strain background,telomere genotype). Drop parentheticals that encode sample size / provenance / genotype ((811 single cells),(all cell types),(humanized line)) — put that in the node's DEFINITION. -
Variable = a grounded QUALITY + a reusable VALUE-SPECIFICATION. (
add-variable)- Quality (
ooevv-quality,ensure-quality) = what is measured — the semantic anchor. Ground only with a verified, definition-matching curie (PATO/EFO); otherwise leave it ungrounded (precise local definition,grounding-state "ungrounded", no curie). Never fabricate a grounding. - Value-specification (
ooevv-scale,ensure-value-spec --quality) = how it is measured — the value space + method:ordinalranks,nominal/binaryset,numericunit/range. A quality enumerates its canonical value-specs viaooevv-quality-scale. The same quality can be measured by different value-specs. - A variable references a shared value-spec:
add-variable --node <n> --role <r> --value-spec <id>. Reuse is the default —recognize → reuse → extend: runlist-qualities/list-value-specsbefore creating anything new. - Role is fixed by the value-spec's cardinality, not chosen freely: a value-spec with one
possible value ⇒
constant; two or more ⇒parameter. Sogenotype {WT|SIRT3-KO}is always a parameter,species {mouse}is a constant.measurement(the readout) is the third role.add-variablederives/auto-corrects parameter-vs-constant from the spec. - Worked example — age. One quality
age(PATO:0000011) with canonical value-specs{ordinal young<mature<old}and{numeric days, UO:0000033}. A mouse-genetics paper'sagevariable references the ordinal spec; a pharmacokinetics paper's references days. Same quality, different value-specs — this is why the value-spec is a property of the quality, selected per variable.
- Quality (
-
Place variables at the biologically-correct node. Organism-level (
species,genotype,age) on the mouse; cell-level (cell-population) on the sorted population; interventions (construct,treatment) on the transduction / recipient; the measurement on the readout assay. Traversing flow edges (link-nodes --role input|output) upstream from a measurement collects its indexing parameters — the data signature (show-data-signature). Rich chains ⇒ rich, correct signatures. Ameasurementlives on the PROCESS that measures it (anassay, or thedata-transformationthat computes the reported value) — never on a bare trailing data-product entity. If you find a trailing "result/profile/matrix/readout" entity that carries the measurements, it is an analysis process mislabeled as an entity: retype it todata-transformation(keep its indexing parameters, e.g.cell type identity, on it), or move the measurements onto the upstream assay and drop the empty entity. Measurements on a process keep them co-indexed by that process's parameters. -
Model the HIDDEN process that generated or sorted a specialization. When an entity's distinguishing property is the result of a procedure, add that procedure as an explicit node and attach the property as its parameter — do not bury it in a name:
- a genotype from a knockout / allele edit → a
material-processingnode (genetic modification,TLC1 humanization) that outputs the strain, carrying the genotype parameter; - a cell-type from clustering / annotation → a
data-transformation(cell-type clustering) carryingcell type identity(this is "the process that sorted them"); - a derived cell state (iPSC, reprogramming intermediate) → the reprogramming process that produced it. Add such a node when the paper's workflow genuinely implies it; for standard reagents (an inbred strain, a catalog cell line) capture identity as a constant rather than inventing a procurement step.
- a genotype from a knockout / allele edit → a
Grounding policy (non-negotiable): attach a curie only when a real ontology term's definition genuinely matches the intended meaning. If a term can't be grounded, or the candidate's definition is wrong, OMIT the grounding — better ungrounded-with-a-precise-local-definition than wrongly grounded.
Verb sequence: add-experiment [--element-set] → add-entity-node --subject / add-process --type
→ link-nodes --role input|output → ensure-quality [--curie] → ensure-value-spec --quality --scale-type → add-variable --value-spec → show-experiment / show-data-signature to verify.
Correcting an existing model (edit verbs). To bring an already-curated model up to the rules above without rebuilding it — the node id, its variables and its flow edges are preserved:
rename-node --node <knode> --name "<generic>"— make an over-specific entity name generic (renames the node and its sole-use OOEVV def).retype-node --node <knode> --type <material-entity|assay|material-processing|data-transformation> [--name "<n>"]— fix a mislabeled node (e.g. a measurement-bearing "result/profile" entity → thedata-transformationthat produced it).move-variable --variable <scvar> --to-node <knode>— canonicalize a measurement onto its measuring process, or move a specialization parameter onto the hidden process that sets it (rule 5).set-node-definition --node <knode> --definition "..."— park stripped-out specifics in the definition.delete-node --node <knode>— drop an emptied trailing entity (refuses while it still carries variables; move them off first). Re-checkshow-data-signatureafter any edit — indices should only get richer, never disappear.
Sensemaking — label observations by their evidence source
When adding a scilit-observation, give it a source-locator label (add-observation --source-label) so its evidence locus is legible at a glance. The label becomes the note
name; the full statement always stays in content. The evidence is not always a main
figure — cover all cases:
OF4DF— main Figure 4, panels D & F ·OF2A-G— Figure 2, panels A through GOSF3B— Supplemental Figure 3, panel BOT2/OST1— Table 2 / Supplemental Table 1OE5— Experiment 5 (a result reported only in text/Methods, no display item)OX— text-only narrative assertion (no figure/table/experiment)OF2A+SF4C— one observation read off multiple loci (join with+)
Prefer the most specific display item (main-figure panel > supplemental > table); fall back
to E<n> for figure-less experimental results and X for pure narrative. Legacy seed form
O4DF (bare figure digit) is still accepted but write OF4DF. Full grammar:
docs/observation-source-labeling.md.
Read USAGE.md before executing commands -- full command reference, source-specific options, query syntax, semantic search workflow, and clustering guide.
04 同仓库更多 Skills
tech-recon
暂无简介
tech-recon
Goal-driven technology investigation — interview, discover, ingest, analyze, and visualize competing systems against user-defined success criteria
scientific-literature
暂无简介
literature-trends
暂无简介
literature-trends
Abductive argumentation-based literature trend analysis — trace how explanatory hypotheses evolve over time within a tagged literature thread
dismech
暂无简介