Metadata-Version: 2.4
Name: opendraft
Version: 1.6.26
Summary: Generate master-level research papers with real citations in minutes
Author: Federico De Ponte
Maintainer: Federico De Ponte
License: MIT
Project-URL: Homepage, https://opendraft.xyz
Project-URL: Documentation, https://github.com/federicodeponte/opendraft/tree/main/docs
Project-URL: Repository, https://github.com/federicodeponte/opendraft
Project-URL: Changelog, https://github.com/federicodeponte/opendraft/blob/main/CHANGELOG.md
Project-URL: Bug Tracker, https://github.com/federicodeponte/opendraft/issues
Keywords: academic-writing,draft,ai,research,citation-management,llm,pdf-generation,scholarly
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Text Processing :: Markup :: Markdown
Classifier: Topic :: Text Processing :: Markup :: LaTeX
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: anthropic>=0.20.0
Requires-Dist: openai>=1.0.0
Requires-Dist: google-generativeai>=0.8.0
Requires-Dist: pybtex>=0.24.0
Requires-Dist: citeproc-py>=0.6.0
Requires-Dist: PyYAML>=6.0.0
Requires-Dist: markdown>=3.5.0
Requires-Dist: weasyprint>=60.0
Requires-Dist: python-docx>=1.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: lxml>=4.9.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: psutil>=5.9.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: tenacity>=8.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.5.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Provides-Extra: docker
Requires-Dist: streamlit>=1.28.0; extra == "docker"
Provides-Extra: all
Requires-Dist: opendraft[dev,docker]; extra == "all"

# OpenDraft Engine

The Python AI engine that powers thesis draft generation. Contains the 19-agent pipeline, citation research, and export functionality.

## Structure

```
engine/
├── draft_generator.py      # Main 19-stage pipeline orchestrator
├── config.py               # Model settings, API keys, rate limits
├── utils/
│   ├── agent_runner.py     # Agent execution engine
│   ├── api_citations/      # Citation APIs (CrossRef, Semantic Scholar)
│   ├── citation_*.py       # Citation management & validation
│   ├── export_professional.py  # PDF/DOCX export
│   ├── pdf_engines/        # Pandoc, WeasyPrint engines
│   └── deep_research.py    # Research phase utilities
├── prompts/
│   ├── 00_WORKFLOW.md      # Complete agent workflow
│   ├── 01_research/        # Deep Research, Scout, Scribe, Signal
│   ├── 02_structure/       # Architect, Citation Manager, Formatter
│   ├── 03_compose/         # Crafter, Thread, Narrator
│   ├── 04_validate/        # Skeptic, Verifier, Referee
│   ├── 05_refine/          # Citation Verifier, Voice, Entropy, Polish
│   └── 06_enhance/         # Abstract Generator, Enhancer
└── opendraft/              # CLI tools
```

## Usage

### Run Pipeline Directly

```bash
cd engine
python draft_generator.py --topic "Your research topic" --level master
```

### Academic Levels

| Level | Words | Chapters | Time |
|-------|-------|----------|------|
| research_paper | 3-5k | 3-4 | 5-10 min |
| bachelor | 10-15k | 5-7 | 8-15 min |
| master | 20-30k | 7-10 | 10-25 min |
| phd | 50-80k | 10-15 | 20-40 min |

## Environment Variables

Required in `.env` (project root):

```bash
GEMINI_API_KEY=your-key      # Required
PROXY_LIST=...               # Optional: for faster research
SCOUT_PARALLEL_WORKERS=32    # Optional: parallelism
```

## Dependencies

```bash
pip install -r requirements.txt
```
