Skip to content

Quick Start

Get your first document generated in 10 minutes.

Prerequisites

Step 1: Setup Project

bash
# Clone the template (repo URL will be added later)
# git clone https://github.com/[TBD]/ai-doc-template.git my-document
cd my-document

# Verify LaTeX installation
./scripts/verify-setup.sh

Expected output:

================================================
Documentation Template - Setup Verification
================================================

Checking Required Tools...
✓ pdfLaTeX: pdfTeX 3.141592653
✓ Biber: biber version 2.19

Checking Project Structure...
✓ Directory: latex/
✓ File: latex/main.tex
✓ Script: scripts/compile.sh (executable)

All checks passed! Ready to generate documentation.
================================================

Step 2: Add Source Documents

bash
# Copy your source PDFs
cp ~/research/thesis.pdf sources/
cp ~/research/report.pdf sources/

# View sources
ls -la sources/

Step 3: Configure Project

Edit .claude/CLAUDE.md with your project details:

markdown
# Project: [Your Document Title]

## Goal
Generate [X]-page research document on [topic].

## Source Files
- sources/thesis.pdf - [description]
- sources/report.pdf - [description]

## Output
- latex/chapters/*.tex - Chapter files
- latex/main.tex - Main document

## Style Guidelines
- Academic prose, not bullet lists
- [Language] with proper accents
- Max 2-3 code blocks per chapter
- Citations using \cite{}

Step 4: Start Claude Code

bash
# Launch Claude Code (or opencode if using OpenCode)
claude

# The orchestrator reads CLAUDE.md and understands your project

Step 5: Analyze Sources

In Claude Code:

> Analyze all documents in sources/ and create a synthesis.
  List the main topics covered and identify research gaps.

The orchestrator spawns Sonnet agents to read sources in parallel.

Step 6: Plan Document

After source analysis:

> Based on the source analysis, create a document plan with:
  - Chapter structure
  - Page budgets
  - Source-to-chapter mapping

  Save to plan/DOCUMENT_PLAN.md

Step 7: Write Chapters

Start parallel chapter writing:

> Write chapters 1-5 following agents/AGENT_GUIDELINES.md
  Each chapter should use flowing prose with proper citations.

Multiple Sonnet agents write chapters simultaneously.

Step 8: Build PDF

After chapters are complete:

bash
# Compile LaTeX to PDF
./scripts/compile.sh

# Check output
open latex/main.pdf

Quick Workflow Summary

Common Commands

Claude Code Commands

CommandPurpose
Analyze sources/Read all source documents
Write chapter XXGenerate specific chapter
Review chapter XXQuality check chapter
Fix LaTeX errorsRepair build issues

Build Commands

bash
# Full build (pdflatex + biber)
./scripts/compile.sh

# Clean build files
./scripts/clean.sh

# Check citations
./scripts/check-citations.sh

# Word count
./scripts/word-count.sh

Troubleshooting

Claude Code Not Found

bash
# Install Claude Code
npm install -g @anthropic-ai/claude-code

# Authenticate
claude auth login

LaTeX Errors

bash
# Clean and rebuild
./scripts/clean.sh
./scripts/compile.sh

# Check log for specific errors
grep -i error latex/main.log

Missing Citations

bash
# Find undefined citations
grep "undefined" latex/main.log

# Add missing entries to bibliography.bib

Multi-Agent Documentation Generation System