Use when you want to review and improve the OR lecture notes — checks all chapters for mathematical errors, missing content, unclear proofs, and style issues, then fixes everything found
Full review-and-fix pipeline for the Operations Research lecture notes (main.tex + chapters/). Runs parallel agents across all chapters, ranks findings by severity, dispatches parallel fix agents, and rebuilds the PDF cleanly.
Proof style standard (applies to every new or revised proof):
(by X), (definition of Y), (induction hypothesis)Dispatch one agent per pair of chapters (6 agents total for 12 chapters). Each agent reads its two chapters and returns a structured report.
Agent prompt template:
Review chapters/NN-*.tex and chapters/MM-*.tex in the OR notes repo.
Check for ALL of the following:
1. Mathematical errors: wrong numbers, sign errors, wrong variable names, m/n swaps, off-by-one
2. Proof gaps: steps that skip reasoning, conclusions that don't follow cleanly
3. Proof style: does each proof open with an intuition sentence? Does each step have a reason in parentheses? Does it close with a summary?
4. Missing standard content: definitions that are used but not stated, theorems referenced without proof or forward reference, examples missing from topic X
5. LaTeX errors: undefined commands, bad enumerate syntax ([(a)] instead of [label=(\alph*)]), missing packages
6. Consistency: notation matching preamble.tex macros (\basis, \nonbasis, \graph, \vertices, \edges, \Oh, \minimize, \maximize)
For EACH issue found, report:
- File and approximate line number
- Severity: CRITICAL (wrong math) | CONTENT (missing material) | STYLE (proof style) | MINOR (typo/formatting)
- One-line description
- Proposed fix (be specific)
Do NOT make any edits. Return the report only.
Chapter pairs:
Collect all six reports and sort findings into three fix batches:
| Batch | Severity | Examples |
|---|---|---|
| 1 — Critical | CRITICAL | Wrong numbers, sign errors, broken LaTeX |
| 2 — Content | CONTENT | Missing definitions, missing proofs, missing examples |
| 3 — Style | STYLE + MINOR | Proof style, notation, typos |
For each batch, dispatch one agent per chapter (or per natural cluster of 2–3 issues). Agents work in parallel within each batch; batches run sequentially (1 → 2 → 3).
Fix agent prompt template:
Fix the following issues in chapters/NN-*.tex.
[Paste relevant lines from the triage report]
Proof style rule for any new or revised proof:
- Open with one intuition sentence (why is this true?)
- Each step: formal statement + parenthetical reason
- Close with one summary sentence
Read the file first, then make targeted edits. Do not restructure sections that are not affected.
Return a one-line summary of each change made.
After all fix agents finish:
cd /Users/lucasimonetti/Work/uniud-operations-research
latexmk -pdf -interaction=nonstopmode main.tex 2>&1 | tail -30
Check for:
! errorsIf errors remain, dispatch targeted fix agents for those specific errors.
% ✅ GOOD — intuition-first proof
\begin{proof}
The key insight is that any augmenting path strictly increases the flow value,
so the algorithm must terminate in finite steps.
Formally, let $f$ be a feasible flow and $P$ an $s$-$t$ augmenting path in $G_f$.
Define $\delta = \min_{e \in P} r_f(e) > 0$ (minimum residual capacity on $P$).
Augmenting along $P$ by $\delta$ yields flow $f'$ with $|f'| = |f| + \delta > |f|$
(by the augmentation construction).
Since capacities are integer and $\delta \geq 1$, the flow value increases by at least 1
each iteration (integrality of residual capacities).
Hence the algorithm terminates after at most $|f^*|$ iterations,
where $f^*$ is a maximum flow.
In summary, each iteration strictly increases the flow value, guaranteeing termination.
\end{proof}
% ❌ BAD — no intuition, no reasons
\begin{proof}
Let $\delta = \min r_f(e)$. Augmenting gives $|f'| = |f| + \delta$.
The algorithm terminates.
\end{proof}
| Wrong | Correct | Why |
|---|---|---|
\begin{enumerate}[(a)] | \begin{enumerate}[label=(\alph*)] | enumitem syntax |
\begin{enumerate}[(i)] | \begin{enumerate}[label=(\roman*)] | enumitem syntax |
\euro without package | add \usepackage{eurosym} to preamble | undefined command |
△ for symmetric difference | \oplus or \triangle (check context) | notation standard |
Raw \mathcal{B} | \basis | use preamble macro |
Edit calls over full rewrites\label{}/\cref{}