Skip to content

Agent Guidelines

Complete guidelines for all AI agents working on documentation generation. These rules ensure consistent, high-quality output across all chapters.

Model Selection

Task TypeRecommended ModelReasoning
Chapter writing (complex)OpusDeep context, creative synthesis
Chapter writing (simple)SonnetFaster, still high quality
Research synthesisOpusComplex analysis required
Code examplesSonnetFast, accurate for code
Bibliography managementSonnetMechanical, pattern-based
Spell/grammar checkHaikuSimple, fast task
TikZ diagram creationSonnetTechnical precision
TranslationSonnetLanguage accuracy
Final reviewOpusComprehensive evaluation

Writing Style Requirements

Prose Style (CRITICAL)

REQUIRED

  • Continuous, flowing academic prose
  • Logical paragraph transitions
  • Citations integrated naturally (\cite{})
  • 4-6 sentences per paragraph
  • Scientific, objective tone

FORBIDDEN

  • Excessive bullet point lists
  • More than 2-3 \begin{itemize} per chapter
  • Starting every section with a list
  • Repetitive sentence structures

Good vs Bad Examples

Bad: Bullet-heavy style

latex
\section{Security Threats}

The main threats are:
\begin{itemize}
    \item Ransomware
    \item Phishing
    \item Supply chain attacks
    \item Social engineering
\end{itemize}

The impacts include:
\begin{itemize}
    \item Financial loss
    \item Data breach
    \item Reputation damage
\end{itemize}

Good: Flowing prose

latex
\section{Security Threats}

Modern organizations face a diverse threat landscape dominated
by ransomware attacks, which have increased by 62\% since 2023
\cite{cybersecurity2024}. These attacks often leverage supply
chain vulnerabilities to gain initial access, subsequently
deploying encryption payloads that can paralyze entire
business operations.

The consequences of successful attacks extend beyond immediate
financial losses. Organizations frequently experience prolonged
operational disruptions, regulatory penalties, and lasting
reputational damage that affects customer trust and market
position.

Code Block Rules

Quantity and Size Limits

RuleLimit
Blocks per chapterMaximum 2-3
Lines per blockMaximum 15-20
Only includeMost illustrative examples

Format Requirements

latex
\begin{lstlisting}[style=pythonstyle, caption={Descriptive caption}]
# Comment in document language
def example_function(param):
    """Brief docstring."""
    result = process(param)
    return result
\end{lstlisting}

Available Styles

StyleLanguage
pythonstylePython
gostyleGo
jsstyleJavaScript
yamlstyleYAML
bashstyleShell scripts

Figures and Tables

Figure Guidelines

latex
\begin{figure}[H]
    \centering
    \includegraphics[width=0.8\textwidth]{image.png}
    \caption{Descriptive caption explaining the figure}
    \label{fig:unique-name}
\end{figure}

Requirements:

  • Use [H] float specifier for precise placement
  • Always include \caption{} and \label{}
  • Reference with \ref{fig:name} in text
  • Scale appropriately (0.7-0.9 for TikZ)

Table Guidelines

latex
\begin{table}[H]
    \centering
    \caption{Descriptive caption}
    \label{tab:unique-name}
    \begin{tabularx}{\textwidth}{|l|X|c|}
        \toprule
        \textbf{Column 1} & \textbf{Column 2} & \textbf{Column 3} \\
        \midrule
        Data 1 & Description text & Value \\
        Data 2 & Description text & Value \\
        \bottomrule
    \end{tabularx}
\end{table}

Requirements:

  • Use booktabs style (\toprule, \midrule, \bottomrule)
  • Use tabularx with \textwidth for full-width tables
  • Keep tables concise (max 10-15 rows typically)

Citations and References

Citation Format

latex
% Single citation
According to Smith \cite{smith2024}, the attack...

% Multiple citations
Recent research \cite{jones2024,wilson2024,lee2024} shows...

% Citation with detail
As demonstrated in Table 3 of \cite{report2024}...

Adding New References

When a citation doesn't exist:

  1. Check if similar entry exists in bibliography.bib
  2. If not, add in proper BibTeX format:
bibtex
@article{author2024title,
    author = {Author, First and Second, Author},
    title = {Title of the Article},
    journal = {Journal Name},
    year = {2024},
    volume = {10},
    pages = {1-20},
    doi = {10.xxxx/xxxxx}
}
  1. Use consistent key naming: authorYYYY or orgYYYYtopic

Chapter Structure Template

latex
\chapter{Chapter Title}
\label{ch:chapter-label}

% 2-3 sentence introduction
Brief context setting paragraph that introduces the chapter's
scope and connects it to the overall document narrative.

\section{First Section}
\label{sec:first-section}

Flowing prose paragraphs with integrated citations \cite{source2024}.
Each paragraph contains 4-6 sentences building a logical argument.
The writing maintains academic tone while remaining accessible.

Continue with additional paragraphs that develop the section's
main points. Use transitions to connect ideas smoothly.

% Table or figure if needed
\begin{table}[H]
    \centering
    \caption{Comparison of approaches}
    \label{tab:comparison}
    \begin{tabularx}{\textwidth}{|l|X|}
        \toprule
        ...
        \bottomrule
    \end{tabularx}
\end{table}

\section{Second Section}
\label{sec:second-section}

More prose content building on previous sections...

% Code example only if essential
\begin{lstlisting}[style=pythonstyle, caption={Example implementation}]
...
\end{lstlisting}

\section{Summary}
\label{sec:chapter-summary}

Concluding paragraphs synthesizing the chapter's key points
and preparing the reader for subsequent chapters.

% Optional summary box
\begin{keypoints}
\begin{itemize}
    \item Key takeaway 1
    \item Key takeaway 2
    \item Key takeaway 3
\end{itemize}
\end{keypoints}

Hungarian Language Rules

When writing in Hungarian, ALWAYS use proper accents:

WrongCorrect
TamadoTámadó
peldapélda
biztonsagbiztonság
felhasznalofelhasználó
mukodesműködés
ellenorzesellenőrzés
rendszerrendszer (correct)
technologiatechnológia
informacioinformáció

Critical

This applies to ALL text including code comments!

Quality Checklist

Before submitting any chapter output, verify:

  • [ ] Page count within specified limit
  • [ ] Prose style maintained (not bullet-heavy)
  • [ ] Language/accents correct throughout
  • [ ] Code blocks max 2-3, each under 20 lines
  • [ ] Citations present where needed (\cite{})
  • [ ] Tables/figures have captions and labels
  • [ ] Labels are unique (no duplicates)
  • [ ] Tone scientific and objective
  • [ ] Transitions logical between sections

Common LaTeX Errors to Avoid

1. Duplicate Labels

latex
% BAD: Same label in different chapters
\label{sec:introduction}  % Chapter 1
\label{sec:introduction}  % Chapter 3 (ERROR!)

% GOOD: Chapter-prefixed labels
\label{sec:ch01-introduction}
\label{sec:ch03-introduction}

2. Missing Citations

latex
% BAD: Unsupported claim
72% of organizations experienced attacks.

% GOOD: Cited claim
72\% of organizations experienced attacks \cite{report2024}.

3. Overfull hbox

latex
% BAD: Fixed-width image too large
\includegraphics{large-image.png}

% GOOD: Scaled appropriately
\includegraphics[width=0.8\textwidth]{large-image.png}

4. Undefined References

Always run pdflatex twice to resolve references:

bash
pdflatex main.tex
biber main
pdflatex main.tex
pdflatex main.tex

Build Verification

After writing any chapter:

bash
# Quick error check
pdflatex -interaction=nonstopmode main.tex 2>&1 | \
    grep -E "(Error|Warning|Overfull)"

# Full build
./scripts/compile.sh

# Check output
ls -la latex/main.pdf

Next Steps

Multi-Agent Documentation Generation System