How federicodeponte/opendraft works
OpenDraft is a research-paper and thesis drafting system, with a separate agent skill for autonomous research. Its principal workflow accepts a topic through the CLI, orchestrates research and writing phases, verifies citations, and produces documents for export. The README documents the six-phase pipeline and citation policy; sampled source and the SOURCE INDEX support the orchestration, research, citation, and CLI relationships shown. Several phase implementations and export details were not sampled, so their internal wiring is left out or attributed only to documented workflow.
Main entry points: draft_generator.py Draft orchestrator · orchestrator.py Citation research · cli.py OpenDraft CLI · research.py Research phase
Components 24
User entry
- OpenDraft CLI
engine/opendraft/cli.py
Draft workflow
- Draft orchestrator
engine/draft_generator.py - Shared draft context
engine/phases/context.py - Agent runner
engine/utils/agent_runner.py - Structure phase
engine/phases/structure.py - Compose phase
engine/phases/compose.py
Research and citations
- Research phase
engine/phases/research.py - Citation phase
engine/phases/citations.py - Citation research
engine/utils/api_citations/orchestrator.py - Query routing
engine/utils/api_citations/query_router.py - Crossref search
engine/utils/api_citations/crossref.py - OpenAlex search
engine/utils/api_citations/openalex.py - Semantic Scholar
engine/utils/api_citations/semantic_scholar.py - Grounded web search
engine/utils/api_citations/gemini_grounded.py - Serper search
engine/utils/api_citations/serper_client.py - Citation database
engine/utils/citation_database.py
Validation and output
- Validation phase
engine/phases/validate.py - Document compilation
engine/phases/compile.py - PDF engines
engine/utils/pdf_engines
Additional capabilities
- Draft revision
engine/utils/revise.py - Paper summary
engine/tldr.py - Document reader
engine/utils/document_reader.py - Autonomous research skill
skills/autonomous-research/scripts
Other components
- Researcher
Connections 24
- Researcher → OpenDraft CLI: provides topic
README.md - OpenDraft CLI → Draft orchestrator: starts drafting
engine/opendraft/cli.py - Draft orchestrator → Research phase: runs phases
README.md - Draft orchestrator → Structure phase: runs phases
README.md - Draft orchestrator → Citation phase: runs phases
README.md - Draft orchestrator → Compose phase: runs phases
README.md - Draft orchestrator → Validation phase: runs phases
README.md - Draft orchestrator → Document compilation: runs phases
README.md - Research phase → Agent runner: uses agents
engine/phases/research.py - Compose phase → Agent runner: uses agents
engine/phases/compose.py - Agent runner → Citation research: creates researcher
engine/utils/agent_runner.py - Citation research → Query routing: routes queries
engine/utils/api_citations/orchestrator.py - Citation research → Crossref search: searches
engine/utils/api_citations/orchestrator.py - Citation research → OpenAlex search: searches
engine/utils/api_citations/orchestrator.py - Citation research → Semantic Scholar: searches
engine/utils/api_citations/orchestrator.py - Citation research → Grounded web search: searches
engine/utils/api_citations/orchestrator.py - Citation research → Serper search: searches
engine/utils/api_citations/orchestrator.py - Research phase → Citation database: adds supplied sources
engine/phases/research.py - Draft orchestrator → Citation database: uses citation data
engine/draft_generator.py - Document compilation → PDF engines: exports documents
- OpenDraft CLI → Draft revision: starts revision
engine/opendraft/cli.py - OpenDraft CLI → Paper summary: requests summary
engine/opendraft/cli.py - Paper summary → Document reader: reads document
engine/tldr.py - Researcher → Autonomous research skill: uses skill
README.md