No description
Find a file
Research Assistant 74c8e4ca76 fix: tests validate PFResult envelope for status --json contract change
Updates all tests that assert on status --json output to read from PFResult envelope.

Code was intentionally changed in Phase 57 to wrap JSON output in PFResult {ok, command, version, data, error}. Tests must validate the new contract shape, not the old flat dict format.
2026-05-09 17:37:14 +08:00
.github/workflows fix: CI failures — stub params, ld_deep syntax, PFResult tests, setup_wizard plugin copy 2026-05-09 17:22:11 +08:00
.planning docs(060): create Phase 60 setup modularization plans 2026-05-09 15:59:48 +08:00
command fix: v1.4.17rc2 — OCR quote fix, 4-stage lifecycle, .env fallback, Codex support, deep-reading anchors, auto-update pip 2026-05-08 01:26:04 +08:00
docs v1.4.17rc4 2026-05-09 17:05:07 +08:00
fixtures feat(52-golden-datasets-cli-contracts): add CLI contract tests with snapshot integration 2026-05-08 23:32:03 +08:00
paperforge fix: CI failures — stub params, ld_deep syntax, PFResult tests, setup_wizard plugin copy 2026-05-09 17:22:11 +08:00
scripts v1.4.17rc4 2026-05-09 17:05:07 +08:00
tests fix: tests validate PFResult envelope for status --json contract change 2026-05-09 17:37:14 +08:00
.gitignore chore(53): add .vite/ to .gitignore 2026-05-09 00:08:52 +08:00
.pre-commit-config.yaml feat(17-dead-code-precommit): add ruff config, pre-commit hooks, Check 5, and OCR error context 2026-04-27 17:29:13 +08:00
AGENTS.md fix: CI failures — stub params, ld_deep syntax, PFResult tests, setup_wizard plugin copy 2026-05-09 17:22:11 +08:00
CHANGELOG.md docs: add v1.4.17rc1 changelog entry 2026-05-07 22:13:41 +08:00
CONTRIBUTING.md chore: rename PaperForge Lite -> PaperForge across 27 files 2026-04-28 01:25:51 +08:00
INSTALLATION.md v1.4.17rc4 2026-05-09 17:05:07 +08:00
LICENSE docs: add CC BY-NC-SA 4.0 license and acknowledgments 2026-05-01 11:37:50 +08:00
manifest.json v1.4.17rc4 2026-05-09 17:05:07 +08:00
paperforge.json refactor: __init__.py as single version source; pyproject.toml reads dynamically; paperforge.json drops version field 2026-04-28 22:41:48 +08:00
pyproject.toml v1.4.17rc4 2026-05-09 17:05:07 +08:00
README.en.md fix: CI failures — stub params, ld_deep syntax, PFResult tests, setup_wizard plugin copy 2026-05-09 17:22:11 +08:00
README.md fix: CI failures — stub params, ld_deep syntax, PFResult tests, setup_wizard plugin copy 2026-05-09 17:22:11 +08:00
README.zh-CN.md docs: redesign README with banner and dashboard preview 2026-05-02 14:52:59 +08:00
requirements.txt fix: add textual to requirements.txt 2026-04-23 00:09:00 +08:00

PaperForge banner

PaperForge

Version Python License

简体中文 · English

Forge Knowledge, Empower Insight.

PaperForge is an Obsidian-based literature workspace for researchers. It turns Zotero libraries, PDFs, figures, and OCR output into structured notes, searchable corpora, and AI-ready reading workflows.

The tone of the project is inspired by a forge: raw papers go in, usable knowledge assets come out. The product itself stays practical, installation-focused, and built for real research work.

Download plugin → Enable in Obsidian → Open wizard → Fill config → Click Install → Done

What PaperForge Does

PaperForge connects the full path from source literature to structured insight.

Layer Output Use it for
Index cards Structured metadata records with frontmatter Search, browse, Base views
Full-text corpus OCR-generated fulltext.md LLM workflows, RAG, QA
Figure database Figure images, captions, and figure maps Multimodal analysis and evidence tracing
Deep reading notes 3-pass AI analysis with chart review and critique Reviews, synthesis, writing prep

Why It Feels Different

  • Short setup path: plugin install plus guided wizard, not a terminal-heavy onboarding.
  • Full workflow: sync, OCR, figures, notes, and agent commands live around the same vault.
  • AI-ready outputs: not just files, but research assets that are easy to retrieve, inspect, and reuse.
  • Built around existing tools: PaperForge extends Zotero and Obsidian instead of replacing them.

Install

See INSTALLATION.md for the complete installation guide.

Architecture

paperforge/
├── core/          Contract layer — PFResult/PFError, ErrorCode enum, state machine
│   ├── result.py      PFResult/PFError serialization (JSON round-trip)
│   ├── errors.py      ErrorCode enum (centralized error codes)
│   └── state.py       OcrStatus/PdfStatus/Lifecycle + ALLOWED_TRANSITIONS
├── adapters/      Adapter layer — independently testable modules
│   ├── bbt.py         Better BibTeX JSON parsing
│   ├── zotero_paths.py   Zotero attachment path normalization
│   └── obsidian_frontmatter.py  Frontmatter read/write (YAML parser)
├── services/      Service layer — orchestrates adapters
│   └── sync_service.py  SyncService class
├── setup/         Setup layer — 6 focused classes
│   ├── plan.py         SetupPlan (orchestration)
│   ├── checker.py      SetupChecker (precondition validation)
│   ├── config_writer.py    ConfigWriter (atomic write)
│   ├── vault.py        VaultInitializer (directories/junction)
│   ├── runtime.py      RuntimeInstaller (pip install)
│   └── agent.py        AgentInstaller (skill deployment)
├── schema/        Field registry
│   └── field_registry.yaml  44 field definitions
├── doctor/        Diagnostic validation
│   └── field_validator.py   Field completeness + drift detection
├── worker/        Worker layer — mechanical tasks
│   ├── sync.py         Dispatch shell (thinned by 57 lines)
│   ├── status.py       Status + doctor checks
│   ├── ocr.py          OCR pipeline
│   └── ...
├── commands/      CLI dispatch layer
└── plugin/        Obsidian plugin

All CLI commands output unified PFResult JSON: {ok, command, version, data, error} via --json flag. paperforge doctor validates field schema consistency and detects data drift.

Usage

Action How
Open Dashboard Ctrl+PPaperForge: Open Dashboard, or click the sidebar icon
Sync Literature Dashboard → Sync Library
Run OCR Dashboard → Run OCR
Deep Read /pf-deep <zotero_key>
Quick Query /pf-paper <zotero_key>

Dashboard

PaperForge dashboard

Commands

Obsidian Commands

Command Description
PaperForge: Open Dashboard Open the status panel and quick actions
PaperForge: Sync Library Sync Zotero and generate notes
PaperForge: Run OCR Extract full text and figures

Agent Commands

Command Description Requires
/pf-deep <key> Full 3-pass deep reading OCR complete
/pf-paper <key> Quick paper QA Formal note exists
/pf-sync Sync Zotero Installed
/pf-ocr Run OCR Installed
/pf-status System status Installed

CLI Commands

Command Description
paperforge sync Sync Zotero and generate notes
paperforge ocr Run OCR
paperforge status Show system overview
paperforge doctor Diagnose configuration
paperforge update Update PaperForge

Supported Agent Platforms

Platform Agent Commands Setup
OpenCode Full /pf-* support .opencode/command/ + .opencode/skills/
Claude Code /pf-deep, /pf-paper .claude/skills/
Cursor /pf-deep, /pf-paper .cursor/skills/
GitHub Copilot /pf-deep, /pf-paper .github/skills/
Windsurf /pf-deep, /pf-paper .windsurf/skills/
Codex $pf-deep, $pf-paper .codex/skills/
Cline /pf-deep, /pf-paper .clinerules/

Docs

Document Content
Setup Guide Full setup walkthrough
Installation Guide Full install reference
Post-Install Guide First-use workflow guide
Changelog Version history
Contributing Dev setup and conventions

License

CC BY-NC-SA 4.0. Non-commercial use only.

Acknowledgments

PaperForge builds on excellent open-source foundations:

Project Role
PaddleOCR / PaddleOCR-VL PDF OCR, layout detection, and figure extraction
Obsidian Knowledge workspace and plugin host
Better BibTeX for Zotero Metadata auto-export
PyMuPDF (fitz) Local PDF validation and sanitization
requests OCR API client
tenacity Retry logic
Pillow Figure image processing
tqdm Progress bars
textual TUI components

PaperForge aims to turn scattered papers, figures, and notes into research assets you can actually work with.