# kist-aix/paper-curation architecture

> Architecture diagram of the GitHub repository kist-aix/paper-curation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kist-aix/paper-curation
- Repository: https://github.com/kist-aix/paper-curation

## Overview

Paper Curation is an explicitly invoked paper-processing product: users request a single-PDF AI review or select collection features, inspect a plan, confirm, and run. The collection workflow spans PDF/review generation, classification, retrieval and research, bibliography and citation analysis, timeline/audio outputs, and optional synchronization or publication; a review does not implicitly trigger the collection pipeline. The graph preserves these documented capabilities. Some subsystem links are documented only at product level because their implementation was not sampled; those edges are dashed where caller-level wiring is not evidenced.

Main entry points: [`pipeline/run_feature.py`](https://github.com/kist-aix/paper-curation/blob/master/pipeline/run_feature.py) (Feature request), [`pipeline/run_update_force.py`](https://github.com/kist-aix/paper-curation/blob/master/pipeline/run_update_force.py) (Review generation), [`pipeline/local_review.py`](https://github.com/kist-aix/paper-curation/blob/master/pipeline/local_review.py) (Single-PDF review), [`pipeline/run_full.py`](https://github.com/kist-aix/paper-curation/blob/master/pipeline/run_full.py) (Full curation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Requests and orchestration"]
  node_feature_request["Feature request<br/>[run_feature.py]"]
  node_full_run["Full curation<br/>[run_full.py]"]
end

subgraph group_review["Paper review"]
  node_single_review["Single-PDF review<br/>[local_review.py]"]
  node_review_batch["Review generation"]
  node_pdf_extract["PDF extraction<br/>[extract.py]"]
  node_review_render["Review HTML<br/>[review_to_html.py]"]
end

subgraph group_research["Discovery and analysis"]
  node_classification["Topic classification<br/>[classify_papers.py]"]
  node_topic_model["Topic modeling<br/>[topic_modeling.py]"]
  node_search_index["Search indexing"]
  node_retrieval["Hybrid retrieval"]
  node_reader["Deep Research reader"]
  node_citedby["Citation analysis<br/>[analysis.py]"]
  node_scopus["Scopus access<br/>[scopus.py]"]
end

subgraph group_outputs["Collection outputs"]
  node_bibliography[("Bibliography database")]
  node_metrics["Citation metrics<br/>[run_metrics.py]"]
  node_timeline["Research timelines"]
  node_audio["Audio generation<br/>[generate_audio.py]"]
  node_zotero["Zotero collection<br/>[sync_zotero.py]"]
  node_deployment["Site deployment<br/>[prepare_deploy.py]"]
end

subgraph group_state["Configuration and state"]
  node_config["Configuration and credentials<br/>[config_loader.py]"]
  node_corpus[("Paper corpus storage<br/>[corpus_store.py]")]
end

node_operator(("Operator / reader"))
node_worker["Embedding service<br/>[index.js]"]

node_operator -->|"requests review"| node_single_review
node_operator -->|"requests feature"| node_feature_request
node_operator -->|"starts curation"| node_full_run
node_single_review -->|"runs review"| node_review_batch
node_single_review -->|"extracts PDF"| node_pdf_extract
node_single_review -->|"renders review"| node_review_render
node_review_batch -->|"extracts PDF"| node_pdf_extract
node_review_batch -->|"renders HTML"| node_review_render
node_review_batch -->|"stores paper"| node_corpus
node_full_run -.->|"runs classification"| node_classification
node_full_run -.->|"builds search"| node_search_index
node_full_run -.->|"generates timeline"| node_timeline
node_feature_request -.->|"selects indexing"| node_search_index
node_feature_request -.->|"selects metrics"| node_metrics
node_feature_request -.->|"selects update"| node_bibliography
node_feature_request -.->|"selects audio"| node_audio
node_feature_request -.->|"selects sync"| node_zotero
node_feature_request -.->|"selects publishing"| node_deployment
node_classification -->|"uses clustering"| node_topic_model
node_search_index -.->|"indexes for"| node_retrieval
node_reader -.->|"queries index"| node_retrieval
node_reader -.->|"requests embeddings"| node_worker
node_metrics -->|"fetches citations"| node_scopus
node_citedby -->|"fetches records"| node_scopus
node_bibliography -->|"reads citation data"| node_scopus
node_review_batch -->|"loads settings"| node_config
node_single_review -->|"loads settings"| node_config
node_review_batch -.->|"curates collection"| node_classification
node_review_batch -.->|"curates collection"| node_timeline

click node_feature_request "https://github.com/kist-aix/paper-curation/blob/master/pipeline/run_feature.py"
click node_full_run "https://github.com/kist-aix/paper-curation/blob/master/pipeline/run_full.py"
click node_single_review "https://github.com/kist-aix/paper-curation/blob/master/pipeline/local_review.py"
click node_review_batch "https://github.com/kist-aix/paper-curation/blob/master/pipeline/run_update_force.py"
click node_pdf_extract "https://github.com/kist-aix/paper-curation/blob/master/pipeline/api/extract.py"
click node_review_render "https://github.com/kist-aix/paper-curation/blob/master/pipeline/review_to_html.py"
click node_classification "https://github.com/kist-aix/paper-curation/blob/master/pipeline/classify_papers.py"
click node_topic_model "https://github.com/kist-aix/paper-curation/blob/master/pipeline/topic_modeling.py"
click node_search_index "https://github.com/kist-aix/paper-curation/blob/master/pipeline/build_search_index.py"
click node_retrieval "https://github.com/kist-aix/paper-curation/blob/master/pipeline/query_search_index.py"
click node_reader "https://github.com/kist-aix/paper-curation/blob/master/pipeline/build_topic_index.py"
click node_citedby "https://github.com/kist-aix/paper-curation/blob/master/pipeline/lib/citedby/analysis.py"
click node_scopus "https://github.com/kist-aix/paper-curation/blob/master/pipeline/lib/citedby/scopus.py"
click node_bibliography "https://github.com/kist-aix/paper-curation/blob/master/pipeline/build_bibliography_db.py"
click node_metrics "https://github.com/kist-aix/paper-curation/blob/master/pipeline/run_metrics.py"
click node_timeline "https://github.com/kist-aix/paper-curation/blob/master/pipeline/generate_timelines.py"
click node_audio "https://github.com/kist-aix/paper-curation/blob/master/pipeline/generate_audio.py"
click node_zotero "https://github.com/kist-aix/paper-curation/blob/master/pipeline/sync_zotero.py"
click node_deployment "https://github.com/kist-aix/paper-curation/blob/master/pipeline/prepare_deploy.py"
click node_config "https://github.com/kist-aix/paper-curation/blob/master/pipeline/config_loader.py"
click node_corpus "https://github.com/kist-aix/paper-curation/blob/master/pipeline/lib/corpus_store.py"
click node_worker "https://github.com/kist-aix/paper-curation/blob/master/worker/index.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_feature_request,node_full_run toneBlue
class node_single_review,node_review_batch,node_pdf_extract,node_review_render toneAmber
class node_classification,node_topic_model,node_search_index,node_retrieval,node_reader,node_citedby,node_scopus toneMint
class node_bibliography,node_metrics,node_timeline,node_audio,node_zotero,node_deployment toneRose
class node_config,node_corpus,node_operator toneIndigo
class node_worker toneTeal
```

## Components

### Requests and orchestration

- [Feature request](https://github.com/kist-aix/paper-curation/blob/master/pipeline/run_feature.py): `pipeline/run_feature.py`
- [Full curation](https://github.com/kist-aix/paper-curation/blob/master/pipeline/run_full.py): `pipeline/run_full.py`

### Paper review

- [Single-PDF review](https://github.com/kist-aix/paper-curation/blob/master/pipeline/local_review.py): `pipeline/local_review.py`
- [Review generation](https://github.com/kist-aix/paper-curation/blob/master/pipeline/run_update_force.py): `pipeline/run_update_force.py`
- [PDF extraction](https://github.com/kist-aix/paper-curation/blob/master/pipeline/api/extract.py): `pipeline/api/extract.py`
- [Review HTML](https://github.com/kist-aix/paper-curation/blob/master/pipeline/review_to_html.py): `pipeline/review_to_html.py`

### Discovery and analysis

- [Topic classification](https://github.com/kist-aix/paper-curation/blob/master/pipeline/classify_papers.py): `pipeline/classify_papers.py`
- [Topic modeling](https://github.com/kist-aix/paper-curation/blob/master/pipeline/topic_modeling.py): `pipeline/topic_modeling.py`
- [Search indexing](https://github.com/kist-aix/paper-curation/blob/master/pipeline/build_search_index.py): `pipeline/build_search_index.py`
- [Hybrid retrieval](https://github.com/kist-aix/paper-curation/blob/master/pipeline/query_search_index.py): `pipeline/query_search_index.py`
- [Deep Research reader](https://github.com/kist-aix/paper-curation/blob/master/pipeline/build_topic_index.py): `pipeline/build_topic_index.py`
- [Citation analysis](https://github.com/kist-aix/paper-curation/blob/master/pipeline/lib/citedby/analysis.py): `pipeline/lib/citedby/analysis.py`
- [Scopus access](https://github.com/kist-aix/paper-curation/blob/master/pipeline/lib/citedby/scopus.py): `pipeline/lib/citedby/scopus.py`

### Collection outputs

- [Bibliography database](https://github.com/kist-aix/paper-curation/blob/master/pipeline/build_bibliography_db.py): `pipeline/build_bibliography_db.py`
- [Citation metrics](https://github.com/kist-aix/paper-curation/blob/master/pipeline/run_metrics.py): `pipeline/run_metrics.py`
- [Research timelines](https://github.com/kist-aix/paper-curation/blob/master/pipeline/generate_timelines.py): `pipeline/generate_timelines.py`
- [Audio generation](https://github.com/kist-aix/paper-curation/blob/master/pipeline/generate_audio.py): `pipeline/generate_audio.py`
- [Zotero collection](https://github.com/kist-aix/paper-curation/blob/master/pipeline/sync_zotero.py): `pipeline/sync_zotero.py`
- [Site deployment](https://github.com/kist-aix/paper-curation/blob/master/pipeline/prepare_deploy.py): `pipeline/prepare_deploy.py`

### Configuration and state

- [Configuration and credentials](https://github.com/kist-aix/paper-curation/blob/master/pipeline/config_loader.py): `pipeline/config_loader.py`
- [Paper corpus storage](https://github.com/kist-aix/paper-curation/blob/master/pipeline/lib/corpus_store.py): `pipeline/lib/corpus_store.py`

### Other components

- **Operator / reader**
- [Embedding service](https://github.com/kist-aix/paper-curation/blob/master/worker/index.js): `worker/index.js`

## Connections

- Operator / reader → Single-PDF review: requests review
- Operator / reader → Feature request: requests feature
- Operator / reader → Full curation: starts curation
- Single-PDF review → Review generation: runs review (evidence: `pipeline/local_review.py`)
- Single-PDF review → PDF extraction: extracts PDF (evidence: `pipeline/local_review.py`)
- Single-PDF review → Review HTML: renders review (evidence: `pipeline/local_review.py`)
- Review generation → PDF extraction: extracts PDF (evidence: `pipeline/run_update_force.py`)
- Review generation → Review HTML: renders HTML (evidence: `pipeline/run_update_force.py`)
- Review generation → Paper corpus storage: stores paper (evidence: `pipeline/run_update_force.py`)
- Full curation → Topic classification: runs classification
- Full curation → Search indexing: builds search
- Full curation → Research timelines: generates timeline
- Feature request → Search indexing: selects indexing
- Feature request → Citation metrics: selects metrics
- Feature request → Bibliography database: selects update
- Feature request → Audio generation: selects audio
- Feature request → Zotero collection: selects sync
- Feature request → Site deployment: selects publishing
- Topic classification → Topic modeling: uses clustering (evidence: `pipeline/classify_papers.py`)
- Search indexing → Hybrid retrieval: indexes for
- Deep Research reader → Hybrid retrieval: queries index
- Deep Research reader → Embedding service: requests embeddings
- Citation metrics → Scopus access: fetches citations
- Citation analysis → Scopus access: fetches records
- Bibliography database → Scopus access: reads citation data (evidence: `pipeline/build_bibliography_db.py`)
- Review generation → Configuration and credentials: loads settings (evidence: `pipeline/run_update_force.py`)
- Single-PDF review → Configuration and credentials: loads settings (evidence: `pipeline/local_review.py`)
- Review generation → Topic classification: curates collection
- Review generation → Research timelines: curates collection
