You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use planner (not visualizer) to decide concept figures, based on idea/findings
Problem: visualizer analyzed empty main.tex template and said "no concept
figures needed". In Dev phase, main.tex is empty when figures are generated.
Fix:
- Use planner agent instead of visualizer for figure planning
- Base decisions on idea, findings.yaml, deep_research.md (available in
Dev phase) instead of main.tex content
- Fallback: if planner returns nothing, auto-create a system overview
figure using the project idea as context
- Every paper gets at least 1 concept figure (system overview)
- main.tex only used as additional context if it has >1000 chars (not
an empty template)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Also check main.tex if it has content (for review phase, not empty template)
653
+
main_tex=self.latex_dir/"main.tex"
654
+
ifmain_tex.exists():
655
+
tex_content=main_tex.read_text()
656
+
# Only use main.tex if it has real content (not just a template skeleton)
657
+
iflen(tex_content) >1000:
658
+
paper_context+=f"\nCurrent paper content:\n{tex_content[:2000]}\n"
643
659
644
-
Do NOT include data plots (bar charts, line charts, scatter plots) — those should remain as matplotlib.
660
+
# Ask PLANNER (not visualizer) to decide what concept figures are needed
661
+
analysis_output=self.run_agent("planner", f"""Based on the research described below, identify concept figures that should be
662
+
AI-generated for this paper. These are architecture diagrams, system overviews, pipeline illustrations,
663
+
mechanism diagrams — NOT data plots (bar charts, line charts etc. are handled separately).
645
664
646
-
For each concept figure, output a JSON block with this exact format:
665
+
## Research Context
666
+
{paper_context[:5000]}
667
+
668
+
## Your Task
669
+
Identify 1-3 concept figures that would best illustrate this research. Every paper needs at least
670
+
one system overview/architecture figure. Output a JSON block:
647
671
648
672
```json
649
673
[
650
674
{{
651
675
"name": "fig_overview",
652
-
"caption": "System architecture overview",
653
-
"section_context": "Detailed description of what the figure should show, including all components, connections, data flows, and key metrics mentioned in the paper. Be as detailed as possible — the more context, the better the generated figure.",
676
+
"caption": "System architecture overview showing the main components and data flow",
677
+
"section_context": "Detailed description of what the figure should show — all components, connections, stages, data flows. Be specific about the research system's structure.",
654
678
"latex_label": "fig:overview",
655
679
"placement": "full_width"
656
680
}}
657
681
]
658
682
```
659
683
660
-
For each figure, you MUST decide the "placement" field:
661
-
- "full_width": for complex figures — multi-stage pipelines, system architectures with many components, diagrams that need horizontal space. Uses `\\begin{{figure*}}` spanning all columns.
662
-
- "single_column": for simpler figures — single concept with few components, small diagrams. Uses `\\begin{{figure}}` in one column.
663
-
664
-
Decision criteria: if the figure has 4+ components, multiple stages, or branching paths → "full_width". If it's a simple 2-3 component relationship → "single_column".
684
+
Rules for "placement":
685
+
- "full_width": for complex multi-stage pipelines, architectures with 4+ components
686
+
- "single_column": for simple 2-3 component diagrams
665
687
666
-
Only include figures that:
667
-
1. Are referenced in LaTeX but have no existing file, OR
668
-
2. Are concept/architecture/mechanism diagrams that could be improved with AI generation
669
-
670
-
If no concept figures are needed, output: NO_CONCEPT_FIGURES
688
+
You MUST output at least 1 figure (system overview). Output up to 3 figures maximum.
689
+
Do NOT output NO_CONCEPT_FIGURES — every paper needs at least one architecture diagram.
0 commit comments