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 =
spawn_agent— 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 the Codex-side chain:IMAGE2_HELPER="" cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" || exit 1 if [ -z "${ARIS_REPO:-}" ] && [ -f .aris/installed-skills-codex.txt ]; then ARIS_REPO=$(awk -F'\t' '$1=="repo_root"{print $2; exit}' .aris/installed-skills-codex.txt 2>/dev/null) || true fi [ -f ".agents/skills/paper-illustration-image2/scripts/paper_illustration_image2.py" ] && IMAGE2_HELPER=".agents/skills/paper-illustration-image2/scripts/paper_illustration_image2.py" [ -z "$IMAGE2_HELPER" ] && [ -n "${ARIS_REPO:-}" ] && [ -f "$ARIS_REPO/skills/paper-illustration-image2/scripts/paper_illustration_image2.py" ] && IMAGE2_HELPER="$ARIS_REPO/skills/paper-illustration-image2/scripts/paper_illustration_image2.py" [ -z "$IMAGE2_HELPER" ] && [ -n "${ARIS_REPO:-}" ] && [ -f "$ARIS_REPO/tools/paper_illustration_image2.py" ] && IMAGE2_HELPER="$ARIS_REPO/tools/paper_illustration_image2.py" [ -z "$IMAGE2_HELPER" ] && [ -f tools/paper_illustration_image2.py ] && IMAGE2_HELPER="tools/paper_illustration_image2.py" [ -z "$IMAGE2_HELPER" ] && [ -f ~/.codex/skills/paper-illustration-image2/scripts/paper_illustration_image2.py ] && IMAGE2_HELPER="$HOME/.codex/skills/paper-illustration-image2/scripts/paper_illustration_image2.py" [ -z "$IMAGE2_HELPER" ] && { echo "ERROR: paper_illustration_image2.py not resolved at .agents/skills/, \$ARIS_REPO/skills/, \$ARIS_REPO/tools/, tools/, or ~/.codex/skills/." >&2 echo " /paper-illustration-image2 cannot proceed. Fix: rerun install_aris_codex.sh, export ARIS_REPO, or copy the canonical skill into ~/.codex/skills/." >&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