Claude Code Orchestration
Opus model orchestrates the entire workflow while Sonnet agents handle parallel tasks like source analysis and chapter writing.
Learn More
Orchestrate AI agents to transform sources into professional LaTeX documents
The documentation generation system uses a hierarchical multi-agent architecture where Claude Opus serves as the orchestrator, delegating tasks to specialized Sonnet agents that work in parallel.
| Tool | Role | Model |
|---|---|---|
| Claude Code | Primary orchestration & writing | Opus (orchestrator), Sonnet (agents) |
| OpenCode | Alternative multi-provider interface | Configurable |
| Service | Purpose | Output |
|---|---|---|
| NotebookLM | Source document synthesis | Structured summaries, cross-references |
| Perplexity | Current statistics & trends | Market data, recent developments |
| Scopus AI | Academic paper search | BibTeX citations, peer-reviewed sources |
| Component | Technology |
|---|---|
| Document Format | LaTeX with BibLaTeX |
| Build System | pdflatex + biber |
| Version Control | Git |
| Documentation | VitePress |
Model: Claude Opus
Role: Controls workflow, merges context, delegates tasks, makes decisions
Tasks:
Model: Claude Sonnet
Role: Execute parallel tasks efficiently
Tasks:
Model: Claude Sonnet/Opus
Role: Quality assurance & feedback
Tasks:
# Clone template
git clone https://github.com/your-repo/ai-doc-template.git
cd ai-doc-template
# Verify installation
./scripts/verify-setup.sh# Copy source documents
cp ~/research/*.pdf sources/
# Sources will be analyzed by parallel agents# Launch Claude Code with Opus
claude
# The orchestrator will guide the process# Compile LaTeX to PDF
./scripts/compile.sh
# Output: latex/document.pdfCollect all source documents into the sources/ directory. The system supports:
The orchestrator spawns multiple Sonnet agents to read sources simultaneously:
Opus → spawn Agent1 → read sources/thesis1.pdf
→ spawn Agent2 → read sources/thesis2.pdf
→ spawn Agent3 → read sources/report.docx
[All agents work in parallel]
Agent1 → summary → Opus
Agent2 → summary → Opus (Context Merge)
Agent3 → summary → OpusBased on identified gaps, the orchestrator generates prompts for external AI tools:
| Tool | Input | Output |
|---|---|---|
| NotebookLM | Uploaded source PDFs | Cross-referenced synthesis |
| Perplexity | Generated research prompt | Current statistics, trends |
| Scopus AI | Academic search queries | BibTeX citations |
With full context, Opus creates:
Writer agents receive specific assignments and work simultaneously:
Chapter assignments:
├── Agent1 → 01-introduction.tex (4 pages)
├── Agent2 → 02-background.tex (8 pages)
├── Agent3 → 03-methodology.tex (10 pages)
├── Agent4 → 04-implementation.tex (12 pages)
└── Agent5 → 05-results.tex (8 pages)
Each agent receives:
- Relevant source excerpts
- Research data
- Style guidelines
- Page budget
- Chapter templateThe review loop ensures quality: