Skip to content

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

AgentModelPurposeOutput
Chapter WriterSonnet/OpusWrite LaTeX chapters.tex files
ResearcherSonnet/OpusAnalyze sourcesMarkdown synthesis
ReviewerSonnet/OpusQuality assuranceReview 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

TaskModelRationale
Complex chapter writingOpusDeep context understanding
Research synthesisOpusComplex analysis needed
Simple chapter writingSonnetFast, high quality
Code examplesSonnetTechnical precision
Bibliography managementSonnetPattern-based work
Quick correctionsHaikuSimple, fast tasks
TikZ diagramsSonnetTechnical accuracy
Final reviewOpusComprehensive 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 format

Invoking 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

Multi-Agent Documentation Generation System