Paper Illustration Image2
Generate publication-quality paper figures using Claude as the planner/reviewer and a local Codex app-server MCP bridge as the raster renderer.
Core Design Philosophy
┌──────────────────────────────────────────────────────────────────────────┐
│ MULTI-STAGE ITERATIVE WORKFLOW │
├──────────────────────────────────────────────────────────────────────────┤
│ │
│ User Request │
│ │ │
│ ▼ │
│ ┌─────────────┐ │
│ │ Claude │ ◄─── Step 1: Parse request, create initial prompt │
│ │ (Planner) │ - Extract components, labels, and data flow │
│ │ │ - Write a paper-ready figure brief │
│ └──────┬──────┘ │
│ │ │
│ ▼ │
│ ┌─────────────┐ │
│ │Claude/Codex │ ◄─── Step 2: Optimize layout description │
│ │ Layout │ - Refine component positioning │
│ │ Review │ - Optimize spacing and grouping │
│ └──────┬──────┘ │
│ │ │
│ ▼ │
│ ┌─────────────┐ │
│ │Claude/Codex │ ◄─── Step 3: CVPR/NeurIPS style verification │
│ │ Style │ - Check palette, arrows, and label standards │
│ │ Check │ - Tighten the prompt before rendering │
│ └──────┬──────┘ │
│ │ │
│ ▼ │
│ ┌─────────────┐ │
│ │ codex-image2│ ◄─── Step 4: Native image generation via bridge │
│ │ MCP bridge │ - Call generate_start / generate_status │
│ │ + app-server│ - Accept only native imageGeneration output │
│ └──────┬──────┘ │
│ │ │
│ ▼ │
│ ┌─────────────┐ │
│ │ Claude │ ◄─── Step 5: STRICT visual review + SCORE (1-10) │
│ │ (Reviewer) │ - Verify logic, labels, arrows, and aesthetics │
│ │ STRICT! │ - Reject unclear or non-paper-ready figures │
│ └──────┬──────┘ │
│ │ │
│ ▼ │
│ Score ≥ 9? ──YES──► Accept & Output │
│ │ │
│ NO │
│ │ │
│ ▼ │
│ Generate SPECIFIC improvement feedback ──► Loop back to Step 2 │
│ │
└──────────────────────────────────────────────────────────────────────────┘
Constants
-
RENDERER =
codex-image2— Native image generation bridge exposed through local Codex app-server -
OPTIONAL_TEXT_CRITIC =
mcp__codex__codex— Optional text-only second opinion for layout/style checks -
MAX_ITERATIONS = 5 — Maximum refinement rounds
-
TARGET_SCORE = 9 — Minimum acceptable score (1-10)
-
OUTPUT_DIR =
figures/ai_generated/— Output directory -
TEXT_LANGUAGE =
English— Default figure text language unless the user requests otherwise -
NATIVE_IMAGE_REQUIREMENT =
strict— Accept only nativeimageGenerationoutput; reject shell/Python fallbacks -
IMAGE2_HELPER — canonical name
paper_illustration_image2.py, resolved pershared-references/integration-contract.md§2 (Policy A — skill-local gate). Phase 3.2 (Arch C) moved the canonical implementation intoskills/paper-illustration-image2/scripts/;tools/paper_illustration_image2.pyremains as anos.execvshim so legacy resolver layers keep working without a re-install. Resolve via:# Layer 0: self-contained (CC 1.0+ exposes $CLAUDE_SKILL_DIR). IMAGE2_HELPER="" if [ -n "${CLAUDE_SKILL_DIR:-}" ] && [ -f "$CLAUDE_SKILL_DIR/scripts/paper_illustration_image2.py" ]; then IMAGE2_HELPER="$CLAUDE_SKILL_DIR/scripts/paper_illustration_image2.py" fi # Layers 1-3: shared-runtime chain via shim at tools/paper_illustration_image2.py. if [ -z "$IMAGE2_HELPER" ]; then 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 IMAGE2_HELPER=".aris/tools/paper_illustration_image2.py" [ -f "$IMAGE2_HELPER" ] || IMAGE2_HELPER="tools/paper_illustration_image2.py" [ -f "$IMAGE2_HELPER" ] || { [ -n "${ARIS_REPO:-}" ] && IMAGE2_HELPER="$ARIS_REPO/tools/paper_illustration_image2.py"; } [ -f "$IMAGE2_HELPER" ] || IMAGE2_HELPER="" fi [ -z "$IMAGE2_HELPER" ] && { echo "ERROR: paper_illustration_image2.py not resolved (layer 0: \$CLAUDE_SKILL_DIR/scripts/; layers 1-3: .aris/tools/, tools/, \$ARIS_REPO/tools/)." >&2 echo " /paper-illustration-image2 cannot proceed. Fix: rerun bash tools/install_aris.sh, or copy the canonical script from \$ARIS_REPO/skills/paper-illustration-image2/scripts/." >&2 exit 1 }All invocations below use
python3 "$IMAGE2_HELPER" <subcommand>.
CVPR/ICLR/NeurIPS Top-Tier Conference Style Guide
What "CVPR Style" Actually Means:
Visual Standards
- Clean white background — No decorative patterns or gradients unless extremely subtle
- Sans-serif fonts — Arial, Helvetica, or similarly clean paper-friendly typography
- Subtle color palette — Use 3-5 coordinated colors, not rainbow colors
- Print-friendly — Must remain understandable in grayscale
- Professional borders — Thin to medium, clean, and consistent
Layout Standards
- Horizontal flow — Left-to-right is the default for pipelines
- Clear grouping — Use spacing or subtle grouping boxes for related modules
- Consistent sizing — Similar components should have similar sizes
- Balanced whitespace — Avoid both cramped and overly sparse layouts
Arrow Standards (MOST CRITICAL)
- Thick strokes — Arrows must remain visible after paper scaling
- Clear arrowheads — Large, unmistakable arrowheads
- Dark colors — Prefer black or dark gray arrows
- Labeled — Important arrows should show what flows through them
- No crossings — Reorganize the figure to avoid crossings where possible
- CORRECT DIRECTION — Arrows must point to the right target
Visual Appeal (Academic Professional Style)
目标:既不保守也不花哨,找到平衡点
✅ Should have
- Subtle gradients — Gentle same-family gradients are a