Agent Prompts Overview
This section contains battle-tested prompts used by the multi-agent documentation system. Each prompt is designed for a specific role in the workflow.
Agent Architecture
Available Agents
| Agent | Model | Purpose | Output |
|---|---|---|---|
| Chapter Writer | Sonnet/Opus | Write LaTeX chapters | .tex files |
| Researcher | Sonnet/Opus | Analyze sources | Markdown synthesis |
| Reviewer | Sonnet/Opus | Quality assurance | Review feedback |
Agent Guidelines
All agents follow the Agent Guidelines which define:
- Writing style requirements
- Code block limits
- Citation format
- Language quality standards
- Quality checklist
Model Selection
Recommended Models by Task
| Task | Model | Rationale |
|---|---|---|
| Complex chapter writing | Opus | Deep context understanding |
| Research synthesis | Opus | Complex analysis needed |
| Simple chapter writing | Sonnet | Fast, high quality |
| Code examples | Sonnet | Technical precision |
| Bibliography management | Sonnet | Pattern-based work |
| Quick corrections | Haiku | Simple, fast tasks |
| TikZ diagrams | Sonnet | Technical accuracy |
| Final review | Opus | Comprehensive evaluation |
Prompt Structure
Every agent prompt follows this structure:
markdown
## TASK DETAILS
- Specific assignment
- File locations
- Constraints
## CONTEXT
- Relevant source excerpts
- Research data
- Related chapters
## REQUIREMENTS
- Style guidelines
- Output format
- Quality criteria
## OUTPUT
- Expected deliverable formatInvoking Agents
In Claude Code
bash
# Start Claude Code
claude
# The orchestrator automatically spawns agents
# Or manually invoke:
> "Use the chapter-writer prompt to write chapter 05"Parallel Invocation
The orchestrator can spawn multiple agents simultaneously:
Opus receives: "Write chapters 1-5"
Opus action:
├── Spawn Agent 1 → Chapter 01 (Sonnet)
├── Spawn Agent 2 → Chapter 02 (Sonnet)
├── Spawn Agent 3 → Chapter 03 (Sonnet)
├── Spawn Agent 4 → Chapter 04 (Sonnet)
└── Spawn Agent 5 → Chapter 05 (Sonnet)
[All agents work in parallel]
[Results merged by Opus]Agent Communication
Quick Reference
Chapter Writer Invocation
Write chapter [XX] following agents/AGENT_GUIDELINES.md
CHAPTER DETAILS:
- File: latex/chapters/[XX-filename.tex]
- Title: [Title]
- Max pages: [X]
PRIMARY SOURCES:
- sources/[file1] - [description]
CONTENT:
[Section outline]
Style: Flowing prose, proper formatting, max 2-3 code blocks.Researcher Invocation
Synthesize information about [TOPIC] from the provided sources.
SOURCE DOCUMENTS:
1. sources/[file1.pdf]
2. research-prompts/results/[data.md]
RESEARCH QUESTIONS:
1. [Question 1]
2. [Question 2]
Provide findings with citations and page numbers.Reviewer Invocation
Review latex/chapters/[XX-filename.tex]
CRITERIA:
- Style compliance (prose, not lists)
- Technical accuracy
- Language quality
- Citation completeness
Provide specific corrections and recommendation.Next Steps
- Chapter Writer Prompt - Full chapter writer prompt
- Researcher Prompt - Research synthesis prompt
- Reviewer Prompt - Quality review prompt
- Guidelines - Complete writing guidelines