| name | paper-illustration |
| description | Generate publication-quality AI illustrations for academic papers using Gemini image generation. Creates architecture diagrams, method illustrations with Claude-supervised iterative refinement loop. Use when user says "็ๆๅพ่กจ", "็ปๆถๆๅพ", "AI็ปๅพ", "paper illustration", "generate diagram", or needs visual figures for papers. |
| argument-hint | [description-or-method-file] [โ style-ref: <source>] |
| allowed-tools | Bash(*), Read, Write, Edit, Grep, Glob, Agent, mcp__codex__codex, mcp__codex__codex-reply, WebSearch |
Paper Illustration: Multi-Stage Claude-Supervised Figure Generation
Generate publication-quality illustrations using a multi-stage workflow with Claude as the STRICT supervisor/reviewer.
Core Design Philosophy
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MULTI-STAGE ITERATIVE WORKFLOW โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ User Request โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโ โ
โ โ Claude โ โโโโ Step 1: Parse request, create initial prompt โ
โ โ (Planner) โ โ
โ โโโโโโโโฌโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโ โ
โ โ Gemini โ โโโโ Step 2: Optimize layout description โ
โ โ (gemini-3-pro)โ - Refine component positioning โ
โ โ Layout โ - Optimize spacing and grouping โ
โ โโโโโโโโฌโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโ โ
โ โ Gemini โ โโโโ Step 3: CVPR/NeurIPS style verification โ
โ โ (gemini-3-pro)โ - Check color palette compliance โ
โ โ Style โ - Verify arrow and font standards โ
โ โโโโโโโโฌโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโ โ
โ โ Paperbanana โ โโโโ Step 4: Render final image โ
โ โ (gemini-3- โ - High-quality image generation โ
โ โ pro-image) โ - Internal codename: Nano Banana Pro โ
โ โโโโโโโโฌโโโโโโโ โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโ โ
โ โ Claude โ โโโโ Step 5: STRICT visual review + SCORE (1-10) โ
โ โ (Reviewer) โ - Verify EVERY arrow direction โ
โ โ STRICT! โ - Verify EVERY block content โ
โ โโโโโโโโฌโโโโโโโ - Verify aesthetics & visual appeal โ
โ โ โ
โ โผ โ
โ Score โฅ 9? โโYESโโโบ Accept & Output โ
โ โ โ
โ NO โ
โ โ โ
โ โผ โ
โ Generate SPECIFIC improvement feedback โโโบ Loop back to Step 2 โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Constants
- IMAGE_MODEL =
gemini-3-pro-image-preview โ Paperbanana (Nano Banana Pro) for image rendering
- REASONING_MODEL =
gemini-3-pro-preview โ Gemini for layout optimization and style checking
- MAX_ITERATIONS = 5 โ Maximum refinement rounds
- TARGET_SCORE = 9 โ Minimum acceptable score (1-10) โ RAISED FOR QUALITY
- OUTPUT_DIR =
figures/ai_generated/ โ Output directory
- API_KEY_ENV =
GEMINI_API_KEY โ Environment variable
Optional: Style reference (โ style-ref: <source>, opt-in)
Lets the user steer structural figure conventions (caption length, panel-count distribution, figure-to-table ratio in the parent paper) toward a reference paper. Default OFF โ when the user does not pass โ style-ref, do nothing differently from before.
Only when โ style-ref: <source> appears in $ARGUMENTS, run the helper FIRST, before generating prompts:
if [ ! -f tools/extract_paper_style.py ]; then
echo "error: tools/extract_paper_style.py not found โ re-run 'bash tools/install_aris.sh' to refresh the '.aris/tools' symlink (added in #174), or copy the helper manually from the ARIS repo" >&2
exit 1
fi
CACHE=$(python3 tools/extract_paper_style.py --source "<source>")
case $? in
0) ;;
2) echo "warning: style-ref skipped (missing optional dep)" >&2 ;;
3) echo "error: --style-ref source failed; aborting illustration" >&2 ; exit 1 ;;
*) echo "error: helper failed unexpectedly; aborting illustration" >&2 ; exit 1 ;;
esac
Sources accepted: local TeX dir / file, local PDF, arXiv id, http(s) URL. Overleaf URLs/IDs are rejected โ clone via /overleaf-sync setup <id> first and pass the local clone path.
Strict rules (full contract in tools/extract_paper_style.py docstring):
- Use
style_profile.md to align caption length and figure density with the reference paper. The CVPR/ICLR/NeurIPS visual standards above still take precedence โ --style-ref only refines length-and-density tendencies, never image content.
- Never copy figure content, color palettes, or specific design elements from anything reachable through the cache. The visual design comes from the user's prompt, not the reference.
- Never pass
โ style-ref (or the cache contents) to the Claude vision-checker / Gemini reasoning-checker sub-agents when they score the generated image โ the image must be judged on its own merits.
CVPR/ICLR/NeurIPS Top-Tier Conference Style Guide
What "CVPR Style" Actually Means:
Visual Standards
- Clean white background โ No decorative patterns or gradients (unless subtle)
- Sans-serif fonts โ Arial, Helvetica, or Computer Modern; minimum 14pt
- Subtle color palette โ Not rainbow colors; use 3-5 coordinated colors
- Print-friendly โ Must be readable in grayscale (many reviewers print papers)
- Professional borders โ Thin (2-3px), solid colors, not flashy
Layout Standards
- Horizontal flow โ Left-to-right is the standard for pipelines
- Clear grouping โ Use subtle background boxes to group related modules
- Consistent sizing โ Similar components should have similar sizes
- Balanced whitespace โ Not cramped, not sparse
Arrow Standards (MOST CRITICAL)
- Thick strokes โ 4-6px minimum (thin arrows disappear when printed)
- Clear arrowheads โ Large, filled triangular heads
- Dark colors โ Black or dark gray (#333333); avoid colored arrows
- Labeled โ Every arrow should indicate what data flows through it
- No crossings โ Reorganize layout to avoid arrow crossings
- CORRECT DIRECTION โ Arrows must point to the RIGHT target!
Visual Appeal (็ง็ ้ฃๆ ผ - Professional Academic Style)
็ฎๆ ๏ผๆขไธไฟๅฎไนไธ่ฑๅจ๏ผๆพๅฐๅนณ่กก็น
โ
ๅบ่ฏฅๆ็่ง่งๅ
็ด ๏ผ
- Subtle gradient fills โ ๆทก้
็ๆธๅๅกซๅ
๏ผๅ่ฒ็ณปไปๆต
ๅฐๆทฑ๏ผ๏ผไธๆฏ็ซๅฝฉ
- Rounded corners โ ๅ่ง็ฉๅฝข๏ผ6-10px radius๏ผ๏ผ็ฐไปฃๆไฝไธๅคธๅผ
- Clear visual hierarchy โ ้่ฟๅคงๅฐใ้ข่ฒๆทฑๆต
ๅบๅๅฑๆฌก
- Consistent color coding โ ็ปไธ็้
่ฒๆนๆก๏ผ3-4็งไธป่ฒ๏ผ
- Internal structure โ ๅคงๆจกๅๅ
้จๆพ็คบๅญ็ปไปถ๏ผๅฆEncoderๅ
้จ็layer็ปๆ๏ผ
- Professional typography โ ๆธ
ๆฐ็ๆ ็ญพ๏ผ้ๅฝ็ๅญๅทๅฑๆฌก
โ
้
่ฒๅปบ่ฎฎ๏ผๅญฆๆฏไธไธ๏ผ๏ผ
- Inputs: ๆๅ็็ปฟ่ฒ็ณป (#10B981 / #34D399)
- Encoders: ไธไธ็่่ฒ็ณป (#2563EB / #3B82F6)
- Fusion: ไผ้
็็ดซ่ฒ็ณป (#7C3AED / #8B5CF6)
- Outputs: ๆธฉๆ็ๆฉ่ฒ็ณป (#EA580C / #F97316)
- Arrows: ้ป่ฒๆๆทฑ็ฐ (#333333 / #1F2937)
- Background: ็บฏ็ฝ (#FFFFFF)๏ผไธ่ฆ่ฑ็บน
โ ่ฆ้ฟๅ
็่ฟๅบฆ่ฃ
้ฅฐ๏ผ
- โ Rainbow color schemes (ๅฝฉ่น้
่ฒ)
- โ Heavy drop shadows (้้ดๅฝฑๆๆ)
- โ 3D effects / perspective (3D้่ง)
- โ Excessive gradients (ๅคธๅผ ็ๅค่ฒๆธๅ)
- โ Clip art / cartoon icons (ๅก้ๅพๆ )
- โ Decorative patterns in background (่ๆฏ่ฑ็บน)
- โ Glowing effects (ๅๅ
ๆๆ)
- โ Too many small icons (่ฟๅคๅฐๅพๆ )
โ ็ๆณ็่ง่งๆๆ๏ผ
- ไธ็ผ็ไธๅปไธไธใๆธ
ๆฐ
- ๆ้ๅบฆ็่ง่งๅธๅผๅ๏ผไฝไธๆข็ผ
- ็ฌฆๅCVPR/NeurIPS่ฎบๆ็ๅฎก็พๆ ๅ
- ๆๅฐๅๅฅฝ๏ผ็ฐๅบฆๆจกๅผไธไน่ฝๆธ
ๆฐ่พจ่ฎค๏ผ
- ๅ็ฒพๅฟ่ฎพ่ฎก็ๅญฆๆฏๅพ่กจ๏ผ่ไธๆฏPPTๆจกๆฟ
What to AVOID (CRITICAL)
- โ Rainbow color schemes (too many colors)
- โ Thin, hairline arrows (arrows must be THICK)
- โ Unlabeled connections
- โ Plain boring rectangles (add some visual interest)
- โ Over-decorated with shadows/glows/icons (too flashy)
- โ Small text that's unreadable when printed
- โ WRONG arrow directions โ This is UNACCEPTABLE!
Scope
| Figure Type | Quality | Examples |
|---|
| Architecture diagrams | Excellent | Model architecture, pipeline, encoder-decoder |
| Method illustrations | Excellent | Conceptual diagrams, algorithm flowcharts |
| Conceptual figures | Good | Comparison diagrams, taxonomy trees |
Not for: Statistical plots (use /paper-figure), photo-realistic images
Workflow: MUST EXECUTE ALL STEPS
Step 0: Pre-flight Check
if [ -z "$GEMINI_API_KEY" ]; then
echo "ERROR: GEMINI_API_KEY not set"
echo "Get your key from: https://aistudio.google.com/app/apikey"
echo "Set it: export GEMINI_API_KEY='your-key'"
exit 1
fi
mkdir -p figures/ai_generated
Step 1: Claude Plans the Figure (YOU ARE HERE)
CRITICAL: Claude must first analyze the user's request and create a detailed prompt.
Parse the input: $ARGUMENTS
Claude's task:
- Understand what figure the user wants
- Identify all components, connections, data flow
- Create a detailed, structured prompt for Gemini
- Include style requirements AND visual appeal requirements
Prompt Template for Claude to generate:
Create a PROFESSIONAL, VISUALLY APPEALING publication-quality academic diagram following CVPR/ICLR/NeurIPS standards.
## Visual Style: ็ง็ ้ฃๆ ผ (Academic Professional Style)
### ็ฎๆ ๏ผๅนณ่กก โ ๆขไธไฟๅฎไนไธ่ฑๅจ
#### DO (ๅบ่ฏฅๆ):
- **Subtle gradients** โ ๅ่ฒ็ณปๆทก้
ๆธๅ๏ผๅฆ #2563EB โ #3B82F6๏ผ๏ผไธๆฏๅค่ฒ็ซๅฝฉ
- **Rounded corners** โ ๅ่ง็ฉๅฝข๏ผ6-10px๏ผ๏ผ็ฐไปฃๆ
- **Clear visual hierarchy** โ ้่ฟๅคงๅฐใๆทฑๆต
ๅบๅๅฑๆฌก
- **Internal structure** โ ๅคงๆจกๅๅ
ๆพ็คบๅญ็ปไปถ็ปๆ
- **Consistent color coding** โ ็ปไธ็3-4่ฒๆนๆก
- **Professional polish** โ ็ฒพ่ดไฝไธๅคธๅผ
#### DON'T (ไธ่ฆๆ):
- โ Rainbow/multi-color gradients (ๅฝฉ่นๆธๅ)
- โ Heavy drop shadows (้้ดๅฝฑ)
- โ 3D effects / perspective (3Dๆๆ)
- โ Glowing effects (ๅๅ
ๆๆ)
- โ Excessive decorative icons (่ฟๅค่ฃ
้ฅฐๅพๆ )
- โ Plain boring rectangles (ๅฎๅ
จๅนณๆทก็ๆนๅ)
#### ็ๆณๆๆ๏ผ
ๅ้กถไผ่ฎบๆไธญ็ฒพๅฟ่ฎพ่ฎก็ๆถๆๅพ โ ไธไธใๆธ
ๆฐใๆ้ๅบฆ็่ง่งๅธๅผๅ
## Figure Type
[Architecture Diagram / Pipeline / Comparison / etc.]
## Components to Include (BE SPECIFIC ABOUT CONTENT)
1. [Component 1]:
- Label: "[exact text]"
- Sub-label: "[smaller text below]"
- Position: [left/center/right, top/middle/bottom]
- Style: [border color, fill, internal structure]
2. [Component 2]: ...
## Layout
- Direction: [left-to-right / top-to-bottom]
- Spacing: [tight / normal / loose]
- Grouping: [how components should be grouped]
## Connections (BE EXPLICIT ABOUT DIRECTION)
EXACT arrow specifications:
1. [Component A] โ [Component B]: Arrow goes FROM A TO B, label it "[data type]"
2. [Component C] โ [Component D]: Arrow goes FROM C TO D, label it "[data type]"
...
VERIFY: Each arrow must point to the CORRECT target!
## Style Requirements (CVPR/ICLR/NeurIPS Standard)
### Visual Style
- Color palette: Professional academic colors
- Inputs: Green (#10B981)
- Encoders: Blue (#2563EB)
- Fusion modules: Purple (#7C3AED)
- Outputs: Orange (#EA580C)
- Font: Sans-serif (Arial/Helvetica), minimum 14pt, bold for labels
- Background: Clean white, no patterns
- Blocks: Rounded rectangles (8-12px radius), subtle gradient fill, colored border (2-3px)
- Subtle shadows for depth effect
- Print-friendly (must work in grayscale)
### CRITICAL: Arrow & Data Flow Requirements
1. **ALL arrows must be VERY THICK** - minimum 5-6px stroke width
2. **ALL arrows must have CLEAR arrowheads** - large, visible triangular heads
3. **ALL arrows must be BLACK or DARK GRAY** - not colored
4. **Label EVERY arrow** with what data flows through it
5. **VERIFY arrow direction** - each arrow MUST point to the correct target
6. **No ambiguous connections** - every arrow should have a clear source and destination
### Logic Clarity Requirements
1. **Data flow must be immediately obvious** - viewer should understand the pipeline in 5 seconds
2. **No crossing arrows** - reorganize layout to avoid arrow crossings
3. **Consistent direction** - maintain left-to-right or top-to-bottom flow throughout
4. **Group related components** - use subtle background boxes or spacing to group modules
5. **Clear hierarchy** - main components larger, sub-components smaller
## Additional Requirements
[Any specific requirements from user]
Step 2: Gemini Layout Optimization (gemini-3-pro)
Claude sends the initial prompt to Gemini (gemini-3-pro) for layout optimization.
#!/bin/bash
set -e
OUTPUT_DIR="figures/ai_generated"
mkdir -p "$OUTPUT_DIR"
API_KEY="${GEMINI_API_KEY}"
URL="https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-preview:generateContent?key=$API_KEY"
INITIAL_PROMPT='[Claude fills in the detailed prompt here]'
LAYOUT_REQUEST="You are an expert in academic figure layout design for CVPR/NeurIPS papers.
Analyze this figure request and provide an OPTIMIZED LAYOUT DESCRIPTION:
$INITIAL_PROMPT
Provide:
1. **Optimized Component Positions**: Exact positions (left/center/right, top/middle/bottom) for each component
2. **Spacing Recommendations**: Specific spacing between components
3. **Grouping Strategy**: Which components should be visually grouped together
4. **Arrow Routing**: Optimal paths for arrows to avoid crossings
5. **Visual Hierarchy**: Size recommendations for main vs sub-components
Output a DETAILED layout specification that will be used for rendering."
python3 << PYTHON
import json
payload = {
"contents": [{"parts": [{"text": '''$LAYOUT_REQUEST'''}]}]
}
with open("/tmp/gemini_layout_request.json", "w") as f:
json.dump(payload, f, indent=2)
print("Layout request created")
PYTHON
RESPONSE=$(curl -s --max-time 90 \
-X POST "$URL" \
-H 'Content-Type: application/json' \
-d @/tmp/gemini_layout_request.json)
LAYOUT_DESCRIPTION=$(echo "$RESPONSE" | python3 -c "
import sys, json
data = json.load(sys.stdin)
try:
print(data['candidates'][0]['content']['parts'][0]['text'])
except:
print('Error extracting layout')
")
echo "=== Layout Optimization Complete ==="
echo "$LAYOUT_DESCRIPTION"
echo "$LAYOUT_DESCRIPTION" > "$OUTPUT_DIR/layout_description.txt"
Step 3: Gemini Style Verification (gemini-3-pro)
Claude sends the optimized layout to Gemini for CVPR/NeurIPS style verification.
#!/bin/bash
API_KEY="${GEMINI_API_KEY}"
URL="https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-preview:generateContent?key=$API_KEY"
LAYOUT=$(cat figures/ai_generated/layout_description.txt)
STYLE_REQUEST="You are a CVPR/NeurIPS paper figure reviewer specializing in visual standards.
Review and ENHANCE this figure specification for top-tier conference compliance:
$LAYOUT
Ensure compliance with:
1. **Color Palette**: Use professional academic colors (green for inputs, blue for encoders, purple for fusion, orange for outputs)
2. **Arrow Standards**: Thick (5-6px), black/dark gray, clear arrowheads, all labeled
3. **Font Standards**: Sans-serif, minimum 14pt, readable in print
4. **Visual Appeal (็ง็ ้ฃๆ ผ)**:
- โ
Subtle same-color gradients, rounded corners (6-10px), internal structure visible
- โ NO heavy shadows, NO glowing effects, NO rainbow gradients
Output an ENHANCED figure specification with explicit style instructions for rendering."
python3 << PYTHON
import json
payload = {
"contents": [{"parts": [{"text": '''$STYLE_REQUEST'''}]}]
}
with open("/tmp/gemini_style_request.json", "w") as f:
json.dump(payload, f, indent=2)
print("Style request created")
PYTHON
RESPONSE=$(curl -s --max-time 90 \
-X POST "$URL" \
-H 'Content-Type: application/json' \
-d @/tmp/gemini_style_request.json)
STYLE_SPEC=$(echo "$RESPONSE" | python3 -c "
import sys, json
data = json.load(sys.stdin)
try:
print(data['candidates'][0]['content']['parts'][0]['text'])
except:
print('Error extracting style spec')
")
echo "=== Style Verification Complete ==="
echo "$STYLE_SPEC"
echo "$STYLE_SPEC" > "figures/ai_generated/style_spec.txt"
Step 4: Paperbanana Image Rendering (gemini-3-pro-image-preview)
Claude sends the optimized, style-verified specification to Paperbanana for rendering.
#!/bin/bash
set -e
OUTPUT_DIR="figures/ai_generated"
mkdir -p "$OUTPUT_DIR"
API_KEY="${GEMINI_API_KEY}"
URL="https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-image-preview:generateContent?key=$API_KEY"
STYLE_SPEC=$(cat figures/ai_generated/style_spec.txt)
RENDER_PROMPT="Render a publication-quality academic diagram based on this specification:
$STYLE_SPEC
RENDERING REQUIREMENTS:
- Output a clean, professional diagram suitable for CVPR/NeurIPS submission
- Use vector-quality rendering with sharp edges and clear text
- Ensure all elements are properly aligned and spaced
- The diagram should be immediately understandable at a glance"
python3 << PYTHON
import json
payload = {
"contents": [{"parts": [{"text": '''$RENDER_PROMPT'''}]}],
"generationConfig": {"responseModalities": ["TEXT", "IMAGE"]}
}
with open("/tmp/gemini_request.json", "w") as f:
json.dump(payload, f, indent=2)
print("JSON payload created")
PYTHON
RESPONSE=$(curl -s --max-time 180 \
-X POST "$URL" \
-H 'Content-Type: application/json' \
-d @/tmp/gemini_request.json)
if echo "$RESPONSE" | grep -q '"error"'; then
echo "API Error:"
echo "$RESPONSE" | python3 -m json.tool 2>/dev/null || echo "$RESPONSE"
exit 1
fi
echo "$RESPONSE" | python3 << 'PYTHON'
import sys, json, base64
from pathlib import Path
output_dir = Path("figures/ai_generated")
data = json.load(sys.stdin)
try:
parts = data['candidates'][0]['content']['parts']
iteration = 1
for part in parts:
if 'text' in part:
print(f"\n[Paperbanana]: {part['text'][:200]}...")
elif 'inlineData' in part:
img_data = base64.b64decode(part['inlineData']['data'])
img_path = output_dir / f"figure_v{iteration}.png"
with open(img_path, "wb") as f:
f.write(img_data)
print(f"\nโ
Image saved: {img_path}")
print(f" Size: {len(img_data)/1024:.1f} KB")
except Exception as e:
print(f"Parse error: {e}")
print(f"Raw response: {str(data)[:500]}")
PYTHON
Step 5: Claude STRICT Visual Review & Scoring (MANDATORY)
Claude MUST read the generated image and perform a STRICT review:
- Visual Analysis: What does the image show in detail?
- Strengths: What's good about it?
- STRICT Verification: Check EVERY item below
- Score: Rate 1-10 (10 = perfect) โ BE STRICT!
STRICT Review Template:
## Claude's STRICT Review of Figure v{N}
### What I See
[Describe the generated image in DETAIL - every block, every arrow]
### Strengths
- [Strength 1]
- [Strength 2]
### โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
### STRICT VERIFICATION CHECKLIST (ALL must pass for score โฅ 9)
### โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
#### A. Arrow Correctness Verification (CRITICAL - any failure = score โค 6)
Check EACH arrow:
- [ ] Arrow 1: [Source] โ [Target] โ Does it point to the CORRECT target?
- [ ] Arrow 2: [Source] โ [Target] โ Does it point to the CORRECT target?
- [ ] Arrow 3: [Source] โ [Target] โ Does it point to the CORRECT target?
- [ ] Arrow 4: [Source] โ [Target] โ Does it point to the CORRECT target?
- [ ] Arrow 5: [Source] โ [Target] โ Does it point to the CORRECT target?
- [ ] Arrow 6: [Source] โ [Target] โ Does it point to the CORRECT target?
#### B. Block Content Verification (any failure = score โค 7)
Check EACH block:
- [ ] Block 1 "[Name]": Has correct label? Has sub-label? Content correct?
- [ ] Block 2 "[Name]": Has correct label? Has sub-label? Content correct?
- [ ] Block 3 "[Name]": Has correct label? Has sub-label? Content correct?
- [ ] Block 4 "[Name]": Has correct label? Has sub-label? Content correct?
- [ ] Block 5 "[Name]": Has correct label? Has sub-label? Content correct?
- [ ] Block 6 "[Name]": Has correct label? Has sub-label? Content correct?
- [ ] Block 7 "[Name]": Has correct label? Has sub-label? Content correct?
#### C. Arrow Visibility (any failure = score โค 7)
- [ ] ALL arrows are THICK (โฅ5px visible stroke)
- [ ] ALL arrows have CLEAR arrowheads (large triangular heads)
- [ ] ALL arrows are BLACK or DARK GRAY (not light colors)
- [ ] NO arrows are too thin or invisible
#### D. Arrow Labels (any failure = score โค 7)
- [ ] EVERY arrow has a text label
- [ ] Labels are readable (not too small)
- [ ] Labels correctly describe the data flowing
#### E. Visual Appeal (็ง็ ้ฃๆ ผ - Balanced Academic Style) (any failure = score โค 8)
- [ ] **ๆ้ๅบฆ่ง่งๅธๅผๅ** โ ๆsubtleๆธๅๆๅ่ง๏ผไฝไธๅคธๅผ
- [ ] **ไธๆฏๅนณๆทกๆนๅ** โ ๆไธๅฎ่ฎพ่ฎกๆ
- [ ] **ไธ่ฟๅบฆ่ฃ
้ฅฐ** โ ๆฒกๆ้้ดๅฝฑใๅๅ
ๆๆใๅฝฉ่น้
่ฒ
- [ ] **ไธไธๅญฆๆฏ้ฃๆ ผ** โ ๅCVPR่ฎบๆไธญ็ๅพ่กจ๏ผไธๆฏPPTๆจกๆฟ
- [ ] **Internal structure visible** โ ๅคงๆจกๅๅ
้จๆพ็คบๅญ็ปไปถ็ปๆ
- [ ] **Color palette: 3-4็งๅ่ฐ่ฒ** โ ไธๆฏๅฝฉ่น๏ผไนไธๆฏ็บฏ้ป็ฝ
#### E2. Visual Appeal - RED FLAGS (immediate score โค 7 if found)
- [ ] **NO heavy drop shadows** (้้ดๅฝฑ = too flashy)
- [ ] **NO glowing effects** (ๅๅ
ๆๆ = too flashy)
- [ ] **NO rainbow gradients** (ๅฝฉ่นๆธๅ = unprofessional)
- [ ] **NO excessive decorative icons** (่ฟๅค่ฃ
้ฅฐๅพๆ = distracting)
#### F. Layout & Flow (any failure = score โค 7)
- [ ] Clean horizontal left-to-right flow
- [ ] No arrow crossings
- [ ] Data flow traceable in 5 seconds
- [ ] Balanced spacing (not cramped, not sparse)
#### G. Style Compliance
- [ ] CVPR/NeurIPS professional style
- [ ] Color palette appropriate (not rainbow)
- [ ] Font readable
- [ ] Print-friendly (grayscale test)
### โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
### Issues Found (BE SPECIFIC)
1. [Issue 1]: [EXACTLY what is wrong] โ [How to fix]
2. [Issue 2]: [EXACTLY what is wrong] โ [How to fix]
3. [Issue 3]: [EXACTLY what is wrong] โ [How to fix]
### Score: X/10
### STRICT Score Breakdown Guide:
- **10**: Perfect. No issues. Publication-ready masterpiece. ่ง่ง้ฃๆ ผๅฎ็พๅนณ่กกใ
- **9**: Excellent. Minor issues that don't affect understanding. ๅฏไปฅ็ดๆฅไฝฟ็จใ
- **8**: Good but has noticeable issues. ่ง่งไธๅคชๅนณๆทกๆๅคช่ฑๅจ้ฝ้่ฆๆน่ฟใ
- **7**: Usable but has clear problems. ็ฎญๅคดๆๅ
ๅฎนๆ้ฎ้ขใ
- **6**: Has arrow direction errors (็ฎญๅคดๆๅ้่ฏฏ) OR missing major components.
- **1-5**: Major issues. Unacceptable.
### Visual Style Scoring (่ง่ง้ฃๆ ผ่ฏๅ):
- **ๅคช่ฑๅจ (Too flashy)**: ้้ดๅฝฑใๅๅ
ๆๆใๅฝฉ่น้
่ฒ โ score โค 7
- **ๅคชๅนณๆทก (Too plain)**: ็บฏ้ป็ฝๆนๅใๆ ไปปไฝ่ง่ง่ฎพ่ฎก โ score โค 8
- **ๆฐๅฐๅฅฝๅค (Balanced)**: ้ๅบฆๆธๅใๅ่งใๆธ
ๆฐๅฑๆฌก โ score 9-10
### Verdict
[ ] ACCEPT (score โฅ 9 AND all critical checks pass)
[ ] REFINE (score < 9 OR any critical check fails)
**If REFINE: List the EXACT issues that must be fixed**
Step 6: Decision Point
IF score >= 9 AND all critical checks pass:
โ Accept figure, generate LaTeX snippet, DONE
ELSE IF iteration < MAX_ITERATIONS:
โ Generate SPECIFIC improvement prompt based on EXACT issues
โ Go to Step 2 (Gemini Layout) with refined prompt
ELSE:
โ Max iterations reached, show best version
โ Ask user if they want to continue or accept
Step 7: Generate Improvement Prompt (for refinement)
Claude generates TARGETED improvement prompt with EXACT issues:
Refine this academic diagram. This is iteration {N}.
## โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
## CRITICAL: Fix These EXACT Issues (from previous review)
## โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
### Arrow Direction Errors (MUST FIX):
1. [EXACT issue]: Arrow from [A] to [B] is pointing to wrong target. It should point to [C] instead.
2. [EXACT issue]: ...
### Missing Arrow Labels (MUST FIX):
1. Arrow from [A] to [B] is missing label "[data type]"
2. ...
### Block Content Issues (MUST FIX):
1. Block "[Name]" has wrong label. Should be "[correct label]"
2. ...
### Visual Appeal Issues (SHOULD FIX):
1. Blocks are too plain. Add [gradients/shadows/internal structure]
2. ...
## Keep These Good Elements:
- [What to preserve from previous version]
## Generate the improved figure with ALL issues fixed.
Step 8: Final Output
When figure is accepted (score โฅ 9):
% === AI-Generated Figure ===
\begin{figure*}[t]
\centering
\includegraphics[width=0.95\textwidth]{figures/ai_generated/figure_final.png}
\caption{[Caption based on user's original request].}
\label{fig:[label]}
\end{figure*}
Key Rules (MUST FOLLOW - STRICT)
- NEVER skip the review step โ Always read and STRICTLY score the image
- NEVER accept score < 9 โ Keep refining until excellence
- VERIFY EVERY ARROW DIRECTION โ Wrong direction = automatic fail (score โค 6)
- VERIFY EVERY BLOCK CONTENT โ Wrong content = automatic fail (score โค 7)
- BE SPECIFIC in feedback โ "Arrow from A to B points to wrong target C" not "arrow is wrong"
- SAVE all iterations โ Keep version history for comparison
- Claude is the STRICT boss โ Accept only excellence, not "good enough"
- ARROW CORRECTNESS IS NON-NEGOTIABLE โ Any wrong arrow direction = reject
- VISUAL APPEAL MATTERS โ Plain boring figures = score โค 8
- Target score is 9 โ Not 8, not "good enough"
- USE MULTI-STAGE WORKFLOW โ Claude โ Gemini Layout โ Gemini Style โ Paperbanana โ Claude Review
- USE CORRECT MODELS โ gemini-3-pro for reasoning, gemini-3-pro-image-preview for rendering
Output Structure
figures/ai_generated/
โโโ layout_description.txt # Step 2: Gemini layout optimization output
โโโ style_spec.txt # Step 3: Gemini style verification output
โโโ figure_v1.png # Iteration 1 (Paperbanana render)
โโโ figure_v2.png # Iteration 2
โโโ figure_v3.png # Iteration 3
โโโ figure_final.png # Accepted version (copy of best, score โฅ 9)
โโโ latex_include.tex # LaTeX snippet
โโโ review_log.json # All review scores and STRICT feedback
Model Summary
| Stage | Model | Purpose |
|---|
| Step 1 | Claude | Parse request, create initial prompt |
| Step 2 | gemini-3-pro | Layout optimization (positioning, spacing, grouping) |
| Step 3 | gemini-3-pro | CVPR/NeurIPS style verification |
| Step 4 | gemini-3-pro-image-preview (Paperbanana) | High-quality image rendering |
| Step 5 | Claude | STRICT visual review and scoring |