mcpField
P
paper-illustration

paper-illustration

github.com/wanshuiyinクリエイティブ・メディア18.2k534 回インストール4 日前に更新
リポジトリ

paper-illustration について

paper-illustrationは、段階的な生成とレビューで研究手法図やアーキテクチャ図を作成するスキルです。Claudeが計画と確認を行い、Geminiがレイアウトとスタイルを調整し、Paperbananaが画像を生成します。統計グラフは対象外です。

主な機能

  1. 01研究リクエストから図を計画
  2. 02Geminiでレイアウトとスタイルを調整
  3. 03Paperbananaで画像を生成
  4. 04生成画像をレビューして採点
  5. 05見つかった問題に応じて反復修正
  6. 06LaTeXの挿入コードを作成

活用シーン

  1. 01モデルアーキテクチャ図の作成
  2. 02手法やアルゴリズムのワークフロー図示
  3. 03論文用の概念図の作成

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/wanshuiyin/auto-claude-code-research-in-sleep --skill paper-illustration

インストール後、Claude Code で/paper-illustrationを入力して読み込まれたか確認します。

詳細

Paper Illustration:Claude の監督による多段階図生成

厳格な監督者/レビュアーとしての Claude を活用した 多段階ワークフロー で、出版品質のイラストを生成します。

基本設計の理念

┌──────────────────────────────────────────────────────────────────────────┐
│                    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        │
│                                                                          │
└──────────────────────────────────────────────────────────────────────────┘

定数

  • IMAGE_MODEL = gemini-3-pro-image-preview — 画像レンダリング用の Paperbanana(Nano Banana Pro)
  • REASONING_MODEL = gemini-3-pro-preview — レイアウト最適化とスタイルチェック用の Gemini
  • MAX_ITERATIONS = 5 — 最大改善ラウンド数
  • TARGET_SCORE = 9 — 許容される最低スコア(1〜10)— 品質向上のため引き上げ
  • OUTPUT_DIR = figures/ai_generated/ — 出力ディレクトリ
  • API_KEY_ENV = GEMINI_API_KEY — 環境変数

オプション:スタイル参照(— style-ref: <source>、オプトイン)

参照論文に合わせて、図の構成上の慣例(キャプションの長さ、パネル数の分布、論文全体の図と表の比率)を調整できます。デフォルトではオフです。ユーザーが — style-ref を渡さない場合は、従来どおり何も変更しません。

$ARGUMENTS に — style-ref: <source> が含まれている場合に限り、プロンプトを生成する前に、まずヘルパーを実行します。

# Resolve $STYLE_HELPER via the canonical strict-safe chain (see
# shared-references/integration-contract.md §2). Policy A — gate:
# unresolved helper means --style-ref cannot be satisfied, so abort.
cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" || exit 1
if [ -z "${ARIS_REPO:-}" ] && [ -f .aris/installed-skills.txt ]; then
    ARIS_REPO=$(awk -F'\t' '$1=="repo_root"{print $2; exit}' .aris/installed-skills.txt 2>/dev/null) || true
fi
if [ -z "${ARIS_REPO:-}" ] && [ -f "$HOME/.aris/repo" ]; then
    ARIS_REPO=$(cat "$HOME/.aris/repo" 2>/dev/null) || true
fi
STYLE_HELPER=".aris/tools/extract_paper_style.py"
[ -f "$STYLE_HELPER" ] || STYLE_HELPER="tools/extract_paper_style.py"
[ -f "$STYLE_HELPER" ] || { [ -n "${ARIS_REPO:-}" ] && STYLE_HELPER="$ARIS_REPO/tools/extract_paper_style.py"; }
[ -f "$STYLE_HELPER" ] || {
  echo "ERROR: extract_paper_style.py not resolved at .aris/tools/, tools/, \$ARIS_REPO/tools/, or via ~/.aris/repo." >&2
  echo "       Fix: rerun bash tools/install_aris.sh or smart_update.sh (refreshes ~/.aris/repo), export ARIS_REPO, or copy the helper to tools/." >&2
  echo "       --style-ref cannot be satisfied; aborting." >&2
  exit 1
}
STYLE_STATUS=0
CACHE=$(python3 "$STYLE_HELPER" --source "<source>") || STYLE_STATUS=$?
case "$STYLE_STATUS" in
  0) ;;                                       # use $CACHE/style_profile.md as structural guidance
  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

受け付けるソース:ローカルの TeX ディレクトリ/ファイル、ローカル PDF、arXiv ID、http(s) URL。Overleaf の URL/ID は受け付けません。まず /overleaf-sync setup <id> でクローンし、ローカルのクローンパスを指定してください。

厳守事項(契約の全文は tools/extract_paper_style.py の docstring を参照):

  • style_profile.md を使って、キャプションの長さと図の密度を参照論文に合わせます。上記の CVPR/ICLR/NeurIPS の視覚基準は引き続き優先されます。--style-ref で調整するのは長さと密度の傾向のみであり、画像の内容は変更しません。
  • キャッシュを通じてアクセスできるものから、図の内容、カラーパレット、具体的なデザイン要素を決してコピーしないでください。ビジュアルデザインは参照元ではなく、ユーザーのプロンプトに基づきます。
  • 生成画像を採点する際、Claude のビジョンチェッカー/Gemini の推論チェッカーのサブエージェントに — style-ref(またはキャッシュの内容)を決して渡さないでください。画像はそれ自体の良さに基づいて評価する必要があります。

CVPR/ICLR/NeurIPS トップカンファレンス向けスタイルガイド

「CVPR スタイル」の実際の意味:

視覚基準
  • すっきりとした白背景 — 装飾的なパターンやグラデーションは使いません(控えめなものを除く)
  • サンセリフフォント — Arial、Helvetica、または Computer Modern。最小 14pt
  • 控えめなカラーパレット — 虹色は使わず、調和の取れた 3〜5 色を使用します
  • 印刷に適したデザイン — グレースケールでも読める必要があります(論文を印刷する査読者が多いため)
  • プロフェッショナルな枠線 — 細め(2〜3px)で単色。派手なものは避けます
レイアウト基準
  • 水平方向の流れ — パイプラインでは左から右が標準です
  • 明確なグループ化 — 関連するモジュールをまとめるには、控えめな背景ボックスを使います
  • 一貫したサイズ — 類似するコンポーネントは同程度のサイズにします
  • バランスの取れた余白 — 詰め込みすぎず、余白を広く取りすぎません
矢印の基準(最重要)
  • 太い線幅 — 最低 4〜6px(細い矢印は印刷時に見えなくなります)
  • 明確な矢印の先端 — 大きく、塗りつぶされた三角形の先端
  • 濃い色 — 黒または濃いグレー(#333333)。色付きの矢印は避けます
  • ラベル付き — すべての矢印に、どのデータが流れるのかを示します
  • 交差なし — 矢印が交差しないようにレイアウトを調整します
  • 正しい方向 — 矢印は正しい対象を指す必要があります
視覚的な魅力(研究向けスタイル — プロフェッショナルな学術スタイル)

目標:保守的すぎず、派手すぎず、バランスを取ります

✅ 取り入れるべき視覚要素:
  • 控えめなグラデーション塗り — 派手な色ではなく、同系色で淡く上品なグラデーションにします
  • 角丸 — 角丸の矩形(半径 6〜10px)で、現代的ながら誇張しない印象にします
  • 明確な視覚的階層 — サイズや色の濃淡で階層を区別します
  • 一貫した色分け — 統一された配色(主要色 3〜4 色)を使用します
  • 内部構造 — 大きなモジュールの内部にサブコンポーネントを表示します(例:Encoder 内部のレイヤー構造)
  • プロフェッショナルなタイポグラフィ — ラベルを明瞭にし、適切なサイズの階層を設けます
✅ 推奨配色(学術・プロフェッショナル向け):
  • 入力:柔らかな緑系(#10B981 / #34D399)
  • エンコーダー:プロフェッショナルな青系(#2563EB / #3B82F6)
  • 融合:上品な紫系(#7C3AED / #8B5CF6)
  • 出力:温かみのあるオレンジ系(#EA580C / #F97316)
  • 矢印:黒または濃いグレー(#333333 / #1F2937)
  • 背景:純白(#FFFFFF)。模様は使いません
❌ 避けるべき過度な装飾:
  • ❌ 虹色の配色(彩虹配色)
  • ❌ 濃いドロップシャドウ(重阴影效果)
  • ❌ 3D効果/遠近感(3D透视)
  • ❌ 過度なグラデーション(夸张的多色渐变)
  • ❌ クリップアート/漫画風のアイコン(卡通图标)
  • ❌ 背景の装飾パターン(背景花纹)
  • ❌ 発光効果(发光效果)
  • ❌ 小さなアイコンの多用(过多小图标)
✓ 理想的なビジュアル:
  • 一目でプロフェッショナルかつ明瞭だとわかる
  • 適度に視覚的な魅力があるが、目立ちすぎない
  • CVPR/NeurIPS論文の美的基準に合っている
  • 印刷に適している(グレースケールでも明瞭に判別できる)
  • 丁寧にデザインされた学術的な図表のようで、PowerPointのテンプレートのようではない
避けるべきこと(重大)
  • ❌ 虹色の配色(色数が多すぎる)
  • ❌ 細く目立たない矢印(矢印は太くすること)
  • ❌ ラベルのない接続
  • ❌ 単調で退屈な四角形(視覚的な工夫を加える)
  • ❌ 影/発光/アイコンによる過剰な装飾(派手すぎる)
  • ❌ 印刷時に読めない小さな文字
  • ❌ 矢印の方向が間違っていること — これは許容できません!

対象範囲

図の種類品質例
アーキテクチャ図優秀モデルアーキテクチャ、パイプライン、エンコーダー・デコーダー
手法の説明図優秀概念図、アルゴリズムのフローチャート
概念図良好比較図、分類ツリー

対象外: 統計プロット(/paper-figure を使用)、写実的な画像

ワークフロー:すべての手順を必ず実行すること

Step 0: 事前チェック
# Check API key
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

# Create output directory
mkdir -p figures/ai_generated
Step 1: Claude が図を計画する(現在の手順)

重要:Claude はまずユーザーの依頼を分析し、詳細なプロンプトを作成する必要があります。

入力を解析します:$ARGUMENTS

Claude のタスク:

  1. ユーザーが求めている図を理解する
  2. すべての構成要素、接続、データフローを特定する
  3. Gemini 用の詳細で構造化されたプロンプトを作成する
  4. スタイル要件と視覚的な魅力に関する要件を含める

Claude が生成するプロンプトのテンプレート:

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 によるレイアウトの最適化(gemini-3-pro)

Claude は初期プロンプトを Gemini(gemini-3-pro)に送り、レイアウトを最適化します。

#!/bin/bash
# Step 2: Optimize layout using Gemini gemini-3-pro
# This step refines component positioning and spacing

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"

# The initial prompt from Claude
INITIAL_PROMPT='[Claude fills in the detailed prompt here]'

# Layout optimization request
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."

# Build JSON payload
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

# Call Gemini gemini-3-pro-preview for layout optimization (DIRECT connection, no proxy)
RESPONSE=$(curl -s --max-time 90 \
  -X POST "$URL" \
  -H 'Content-Type: application/json' \
  -d @/tmp/gemini_layout_request.json)

# Extract layout description
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 によるスタイルの確認(gemini-3-pro)

Claude は最適化されたレイアウトを Gemini に送り、CVPR/NeurIPS のスタイルに合っているか確認します。

#!/bin/bash
# Step 3: Verify and enhance style compliance using Gemini gemini-3-pro

API_KEY="${GEMINI_API_KEY}"
URL="https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-preview:generateContent?key=$API_KEY"

# Read layout from previous step
LAYOUT=$(cat figures/ai_generated/layout_description.txt)

# Style verification request
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."

# Build JSON payload
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

# Call Gemini gemini-3-pro-preview for style verification (DIRECT connection, no proxy)
RESPONSE=$(curl -s --max-time 90 \
  -X POST "$URL" \
  -H 'Content-Type: application/json' \
  -d @/tmp/gemini_style_request.json)

# Extract style-enhanced specification
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 による画像のレンダリング(gemini-3-pro-image-preview)

Claude は最適化され、スタイル確認済みの仕様を Paperbanana に送り、レンダリングします。

#!/bin/bash
# Step 4: Render image using Paperbanana (gemini-3-pro-image-preview)
# Internal codename: Nano Banana Pro
# Use DIRECT connection (no proxy) - proxy causes SSL errors

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"

# Read the style-enhanced specification from previous step
STYLE_SPEC=$(cat figures/ai_generated/style_spec.txt)

# Add rendering instructions
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"

# Build JSON payload using Python for proper escaping
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

# Call Paperbanana API WITHOUT proxy (direct connection works better)
RESPONSE=$(curl -s --max-time 180 \
  -X POST "$URL" \
  -H 'Content-Type: application/json' \
  -d @/tmp/gemini_request.json)

# Check for error
if echo "$RESPONSE" | grep -q '"error"'; then
    echo "API Error:"
    echo "$RESPONSE" | python3 -m json.tool 2>/dev/null || echo "$RESPONSE"
    exit 1
fi

# Extract and save image
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  # Claude increments this each iteration

    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 による厳格なビジュアルレビューと採点(必須)

Claude は生成された画像を必ず読み取り、厳格にレビューする必要があります:

  1. ビジュアル分析:画像には何が詳細に描かれていますか?
  2. 長所:良い点は何ですか?
  3. 厳格な確認:以下のすべての項目を確認します
  4. 採点:1〜10 点で評価します(10 = 完璧)— 厳格に評価すること!

厳格なレビューテンプレート:

## 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: 判断
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: 改善プロンプトを生成する(修正用)

Claude は問題点を正確に指定した、対象を絞った改善プロンプトを生成します:

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: 最終出力

図が承認された場合(スコア ≥ 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*}

主なルール(必ず遵守すること — 厳守)

  1. レビュー手順を絶対に省略しない — 画像を必ず読み取り、厳格に採点する
  2. スコアが 9 未満の画像は絶対に承認しない — 優れた品質になるまで修正を続ける
  3. すべての矢印の方向を確認する — 方向が間違っていれば自動的に不合格(スコア ≤ 6)
  4. すべてのブロックの内容を確認する — 内容が間違っていれば自動的に不合格(スコア ≤ 7)
  5. フィードバックは具体的にする — 「矢印が間違っている」ではなく、「A から B への矢印が誤った対象 C を指している」
  6. すべての反復結果を保存する — 比較できるようにバージョン履歴を保持する
  7. Claude は厳格な責任者 — 「十分に良い」ではなく、優れたものだけを承認する
  8. 矢印の正確さは譲れない — 方向が間違っている矢印があれば却下する
  9. 視覚的な魅力も重要 — 単調で退屈な図はスコア ≤ 8
  10. 目標スコアは 9 — 8 でも「十分に良い」でもない
  11. 複数段階のワークフローを使用する — Claude → Gemini によるレイアウト調整 → Gemini によるスタイル確認 → Paperbanana → Claude によるレビュー
  12. 正しいモデルを使用する — 推論には gemini-3-pro、レンダリングには gemini-3-pro-image-preview を使用する

出力構成

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

モデルの概要

ステージモデル目的
ステップ 1Claudeリクエストを解析し、初期プロンプトを作成します
ステップ 2gemini-3-proレイアウトの最適化(配置、間隔、グループ化)
ステップ 3gemini-3-proCVPR/NeurIPS スタイルの検証
ステップ 4gemini-3-pro-image-preview (Paperbanana)高品質な画像のレンダリング
ステップ 5Claude厳格なビジュアルレビューと採点

コメント