Skip to content

YCC-Lover/research-starter-skills / skills/research-starter-paper

research-starter-paper

Unverified

科研学习与论文写作总入口,协调六个模块。帮助不知道提供什么材料的新手逐步产出、自动保存和恢复项目进度,也用于跨阶段研究任务;区分学习、执行和只读检查。

FileKindSize
SKILL.mdskill md8.8 KB
agents/openai.yamlconfig366 B
assets/evidence-ledger.tsvother106 B
assets/manuscript-plan.mdmarkdown423 B
assets/project-state.mdmarkdown928 B
assets/requirements-research.txtmarkdown263 B
assets/task-brief.mdmarkdown429 B
references/advanced-capabilities.jsonconfig8.5 KB
references/advanced-research.mdmarkdown8.5 KB
references/discipline-fit.mdmarkdown2.3 KB
references/evidence-and-figures.mdmarkdown2.8 KB
references/guided-start.mdmarkdown7.2 KB
references/handoff.mdmarkdown1.9 KB
references/learning.mdmarkdown3.2 KB
references/paper-sections.mdmarkdown5.6 KB
references/research-engine-notice.mdmarkdown1.6 KB
references/research-engine-patches.jsonconfig3.4 KB
references/research-practice.mdmarkdown3.2 KB
references/research.mdmarkdown3.2 KB
references/revision.mdmarkdown2.1 KB
references/runtime-helpers.mdmarkdown6.0 KB
references/source-manifest.jsonconfig34.8 KB
references/sources.mdmarkdown7.4 KB
references/task-brief.mdmarkdown1.6 KB
resources/research-engine/LICENSEother19.1 KB
resources/research-engine/MODE_REGISTRY.mdmarkdown6.7 KB
resources/research-engine/NOTICE.mdmarkdown1.0 KB
resources/research-engine/THIRD_PARTY.mdmarkdown5.0 KB
resources/research-engine/academic-paper-reviewer/WORKFLOW.mdmarkdown43.9 KB
resources/research-engine/academic-paper-reviewer/agents/devils_advocate_reviewer_agent.mdmarkdown42.0 KB
resources/research-engine/academic-paper-reviewer/agents/domain_reviewer_agent.mdmarkdown32.4 KB
resources/research-engine/academic-paper-reviewer/agents/editorial_synthesizer_agent.mdmarkdown41.8 KB
resources/research-engine/academic-paper-reviewer/agents/eic_agent.mdmarkdown28.1 KB
resources/research-engine/academic-paper-reviewer/agents/field_analyst_agent.mdmarkdown11.2 KB
resources/research-engine/academic-paper-reviewer/agents/methodology_reviewer_agent.mdmarkdown44.0 KB
resources/research-engine/academic-paper-reviewer/agents/perspective_reviewer_agent.mdmarkdown32.7 KB
resources/research-engine/academic-paper-reviewer/examples/hei_paper_review_example.mdmarkdown33.8 KB
resources/research-engine/academic-paper-reviewer/examples/interdisciplinary_review_example.mdmarkdown27.6 KB
resources/research-engine/academic-paper-reviewer/examples/subclaim_decomposition_example.mdmarkdown8.3 KB
resources/research-engine/academic-paper-reviewer/references/calibration_mode_protocol.mdmarkdown15.5 KB
resources/research-engine/academic-paper-reviewer/references/changelog.mdmarkdown1.4 KB
resources/research-engine/academic-paper-reviewer/references/editorial_decision_standards.mdmarkdown12.8 KB
resources/research-engine/academic-paper-reviewer/references/guided_mode_protocol.mdmarkdown2.0 KB
resources/research-engine/academic-paper-reviewer/references/integration_guide.mdmarkdown680 B
resources/research-engine/academic-paper-reviewer/references/quality_rubrics.mdmarkdown6.3 KB
resources/research-engine/academic-paper-reviewer/references/re_review_mode_protocol.mdmarkdown51.9 KB
resources/research-engine/academic-paper-reviewer/references/review_criteria_framework.mdmarkdown6.2 KB
resources/research-engine/academic-paper-reviewer/references/review_panel_provenance_protocol.mdmarkdown9.4 KB
resources/research-engine/academic-paper-reviewer/references/review_quality_thinking.mdmarkdown3.3 KB
resources/research-engine/academic-paper-reviewer/references/reviewer_sprint_prompt_source.mdmarkdown47.9 KB
resources/research-engine/academic-paper-reviewer/references/sprint_contract_protocol.mdmarkdown32.1 KB
resources/research-engine/academic-paper-reviewer/references/statistical_reporting_standards.mdmarkdown29.8 KB
resources/research-engine/academic-paper-reviewer/references/top_journals_by_field.mdmarkdown12.6 KB
resources/research-engine/academic-paper-reviewer/templates/editorial_decision_template.mdmarkdown11.0 KB
resources/research-engine/academic-paper-reviewer/templates/peer_review_report_template.mdmarkdown14.8 KB
resources/research-engine/academic-paper-reviewer/templates/revision_response_template.mdmarkdown7.4 KB
resources/research-engine/academic-paper/WORKFLOW.mdmarkdown63.8 KB
resources/research-engine/academic-paper/agents/abstract_bilingual_agent.mdmarkdown12.0 KB
resources/research-engine/academic-paper/agents/argument_builder_agent.mdmarkdown10.9 KB
resources/research-engine/academic-paper/agents/citation_compliance_agent.mdmarkdown23.5 KB
resources/research-engine/academic-paper/agents/draft_writer_agent.mdmarkdown56.1 KB
resources/research-engine/academic-paper/agents/formatter_agent.mdmarkdown63.8 KB
resources/research-engine/academic-paper/agents/intake_agent.mdmarkdown25.5 KB
resources/research-engine/academic-paper/agents/literature_strategist_agent.mdmarkdown46.5 KB
resources/research-engine/academic-paper/agents/peer_reviewer_agent.mdmarkdown29.5 KB
resources/research-engine/academic-paper/agents/revision_coach_agent.mdmarkdown20.0 KB
resources/research-engine/academic-paper/agents/socratic_mentor_agent.mdmarkdown27.9 KB
resources/research-engine/academic-paper/agents/structure_architect_agent.mdmarkdown18.9 KB
resources/research-engine/academic-paper/agents/visualization_agent.mdmarkdown17.2 KB
resources/research-engine/academic-paper/examples/chinese_paper_example.mdmarkdown21.1 KB
resources/research-engine/academic-paper/examples/clinical_citation_verification_checklist.mdmarkdown4.4 KB
resources/research-engine/academic-paper/examples/clinical_epistemic_status_example.mdmarkdown6.6 KB
resources/research-engine/academic-paper/examples/commitment_ledger_example.mdmarkdown8.1 KB
resources/research-engine/academic-paper/examples/imrad_hei_example.mdmarkdown23.3 KB
resources/research-engine/academic-paper/examples/literature_review_example.mdmarkdown30.8 KB
resources/research-engine/academic-paper/examples/plan_mode_guided_writing.mdmarkdown34.3 KB
resources/research-engine/academic-paper/examples/revision_mode_example.mdmarkdown20.1 KB
resources/research-engine/academic-paper/examples/revision_recovery_example.mdmarkdown41.2 KB
resources/research-engine/academic-paper/examples/version_family_reconciliation_example.mdmarkdown3.8 KB
resources/research-engine/academic-paper/references/abstract_writing_guide.mdmarkdown12.5 KB
resources/research-engine/academic-paper/references/academic_writing_style.mdmarkdown7.6 KB
resources/research-engine/academic-paper/references/anti_leakage_protocol.mdmarkdown4.4 KB
resources/research-engine/academic-paper/references/apa7_chinese_citation_guide.mdmarkdown14.0 KB
resources/research-engine/academic-paper/references/apa7_extended_guide.mdmarkdown6.6 KB
resources/research-engine/academic-paper/references/changelog.mdmarkdown2.8 KB
resources/research-engine/academic-paper/references/citation_format_switcher.mdmarkdown7.4 KB
resources/research-engine/academic-paper/references/committee_correspondence_protocol.mdmarkdown6.3 KB
resources/research-engine/academic-paper/references/credit_authorship_guide.mdmarkdown13.7 KB
resources/research-engine/academic-paper/references/disclosure_mode_protocol.mdmarkdown53.9 KB
resources/research-engine/academic-paper/references/domain_evidence_profiles.mdmarkdown4.2 KB
resources/research-engine/academic-paper/references/failure_paths.mdmarkdown14.2 KB
resources/research-engine/academic-paper/references/funding_statement_guide.mdmarkdown11.9 KB
resources/research-engine/academic-paper/references/hei_domain_glossary.mdmarkdown6.8 KB
resources/research-engine/academic-paper/references/intro_title_rhetoric_guide.mdmarkdown8.7 KB
resources/research-engine/academic-paper/references/journal_submission_guide.mdmarkdown8.7 KB
resources/research-engine/academic-paper/references/latex_template_reference.mdmarkdown9.6 KB
resources/research-engine/academic-paper/references/mode_selection_guide.mdmarkdown17.5 KB
resources/research-engine/academic-paper/references/paper_structure_patterns.mdmarkdown8.4 KB
resources/research-engine/academic-paper/references/plan_mode_protocol.mdmarkdown6.7 KB
resources/research-engine/academic-paper/references/policy_anchor_disclosure_protocol.mdmarkdown21.0 KB
resources/research-engine/academic-paper/references/policy_anchor_table.mdmarkdown21.2 KB
resources/research-engine/academic-paper/references/revision_patch_protocol.mdmarkdown12.9 KB
resources/research-engine/academic-paper/references/statistical_visualization_standards.mdmarkdown23.7 KB
resources/research-engine/academic-paper/references/venue_disclosure_policies.mdmarkdown38.4 KB
resources/research-engine/academic-paper/references/vlm_figure_verification.mdmarkdown9.1 KB
resources/research-engine/academic-paper/references/workflow_phase_details.mdmarkdown4.7 KB
resources/research-engine/academic-paper/references/writing_judgment_framework.mdmarkdown3.3 KB
resources/research-engine/academic-paper/references/writing_quality_check.mdmarkdown13.0 KB
resources/research-engine/academic-paper/templates/bilingual_abstract_template.mdmarkdown4.7 KB
resources/research-engine/academic-paper/templates/case_study_template.mdmarkdown2.8 KB
resources/research-engine/academic-paper/templates/conference_paper_template.mdmarkdown2.3 KB
resources/research-engine/academic-paper/templates/credit_statement_template.mdmarkdown4.4 KB
resources/research-engine/academic-paper/templates/funding_statement_template.mdmarkdown8.9 KB
resources/research-engine/academic-paper/templates/imrad_template.mdmarkdown4.4 KB
resources/research-engine/academic-paper/templates/latex_article_template.texother4.7 KB
resources/research-engine/academic-paper/templates/literature_review_template.mdmarkdown2.8 KB
resources/research-engine/academic-paper/templates/policy_brief_template.mdmarkdown3.6 KB
resources/research-engine/academic-paper/templates/revision_tracking_template.mdmarkdown10.2 KB
resources/research-engine/academic-paper/templates/theoretical_paper_template.mdmarkdown2.8 KB
resources/research-engine/academic-pipeline/WORKFLOW.mdmarkdown58.0 KB
resources/research-engine/academic-pipeline/agents/claim_ref_alignment_audit_agent.mdmarkdown44.3 KB
resources/research-engine/academic-pipeline/agents/collaboration_depth_agent.mdmarkdown9.8 KB
resources/research-engine/academic-pipeline/agents/integrity_verification_agent.mdmarkdown70.7 KB
resources/research-engine/academic-pipeline/agents/pipeline_orchestrator_agent.mdmarkdown173.8 KB
resources/research-engine/academic-pipeline/agents/state_tracker_agent.mdmarkdown26.8 KB
resources/research-engine/academic-pipeline/examples/full_pipeline_example.mdmarkdown17.7 KB
resources/research-engine/academic-pipeline/examples/integrity_failure_recovery.mdmarkdown26.8 KB
resources/research-engine/academic-pipeline/examples/mid_entry_example.mdmarkdown13.4 KB
resources/research-engine/academic-pipeline/references/adapters/.gitkeepother0 B
resources/research-engine/academic-pipeline/references/adapters/overview.mdmarkdown10.0 KB
resources/research-engine/academic-pipeline/references/ai_research_failure_modes.mdmarkdown15.6 KB
resources/research-engine/academic-pipeline/references/changelog.mdmarkdown5.8 KB
resources/research-engine/academic-pipeline/references/claim_audit_calibration_protocol.mdmarkdown14.2 KB
resources/research-engine/academic-pipeline/references/claim_verification_protocol.mdmarkdown27.2 KB
resources/research-engine/academic-pipeline/references/external_review_protocol.mdmarkdown6.2 KB
resources/research-engine/academic-pipeline/references/integrity_review_protocol.mdmarkdown7.1 KB
resources/research-engine/academic-pipeline/references/literature_corpus_consumers.mdmarkdown11.7 KB
resources/research-engine/academic-pipeline/references/mode_advisor.mdmarkdown7.8 KB
resources/research-engine/academic-pipeline/references/passport_as_reset_boundary.mdmarkdown18.6 KB
resources/research-engine/academic-pipeline/references/pipeline_state_machine.mdmarkdown28.3 KB
resources/research-engine/academic-pipeline/references/plagiarism_detection_protocol.mdmarkdown13.5 KB
resources/research-engine/academic-pipeline/references/process_summary_protocol.mdmarkdown15.8 KB
resources/research-engine/academic-pipeline/references/progress_dashboard_template.mdmarkdown1.5 KB
resources/research-engine/academic-pipeline/references/reinforcement_content.mdmarkdown1.4 KB
resources/research-engine/academic-pipeline/references/reproducibility_audit.mdmarkdown2.6 KB
resources/research-engine/academic-pipeline/references/score_trajectory_protocol.mdmarkdown3.8 KB
resources/research-engine/academic-pipeline/references/team_collaboration_protocol.mdmarkdown10.1 KB
resources/research-engine/academic-pipeline/references/two_stage_review_protocol.mdmarkdown3.0 KB
resources/research-engine/academic-pipeline/templates/pipeline_status_template.mdmarkdown3.7 KB
resources/research-engine/agents/report_compiler_agent.mdmarkdown26.0 KB
resources/research-engine/agents/research_architect_agent.mdmarkdown25.3 KB
resources/research-engine/agents/screening_reviewer_agent.mdmarkdown4.8 KB
resources/research-engine/agents/synthesis_agent.mdmarkdown28.2 KB
resources/research-engine/commands/ars-3w.mdmarkdown1.1 KB
resources/research-engine/commands/ars-abstract.mdmarkdown1.2 KB
resources/research-engine/commands/ars-cache-invalidate.mdmarkdown1.8 KB
resources/research-engine/commands/ars-citation-check.mdmarkdown971 B
resources/research-engine/commands/ars-disclosure.mdmarkdown1.5 KB
resources/research-engine/commands/ars-format-convert.mdmarkdown1.0 KB
resources/research-engine/commands/ars-full.mdmarkdown1.1 KB
resources/research-engine/commands/ars-lit-review.mdmarkdown1.3 KB
resources/research-engine/commands/ars-mark-read.mdmarkdown2.4 KB
resources/research-engine/commands/ars-outline.mdmarkdown953 B
resources/research-engine/commands/ars-plan.mdmarkdown965 B
resources/research-engine/commands/ars-rebuttal-audit.mdmarkdown1.3 KB
resources/research-engine/commands/ars-reviewer.mdmarkdown1.1 KB
resources/research-engine/commands/ars-revision-coach.mdmarkdown1.5 KB
resources/research-engine/commands/ars-revision.mdmarkdown944 B
resources/research-engine/commands/ars-unmark-read.mdmarkdown1.3 KB
resources/research-engine/deep-research/WORKFLOW.mdmarkdown51.3 KB
resources/research-engine/deep-research/agents/bibliography_agent.mdmarkdown34.4 KB
resources/research-engine/deep-research/agents/devils_advocate_agent.mdmarkdown10.9 KB
resources/research-engine/deep-research/agents/editor_in_chief_agent.mdmarkdown7.9 KB
resources/research-engine/deep-research/agents/ethics_review_agent.mdmarkdown21.7 KB
resources/research-engine/deep-research/agents/meta_analysis_agent.mdmarkdown16.3 KB
resources/research-engine/deep-research/agents/monitoring_agent.mdmarkdown9.2 KB
resources/research-engine/deep-research/agents/report_compiler_agent.mdmarkdown26.0 KB
resources/research-engine/deep-research/agents/research_architect_agent.mdmarkdown25.3 KB
resources/research-engine/deep-research/agents/research_question_agent.mdmarkdown10.1 KB
resources/research-engine/deep-research/agents/risk_of_bias_agent.mdmarkdown12.2 KB
resources/research-engine/deep-research/agents/socratic_mentor_agent.mdmarkdown52.3 KB
resources/research-engine/deep-research/agents/source_verification_agent.mdmarkdown10.3 KB
resources/research-engine/deep-research/agents/synthesis_agent.mdmarkdown28.2 KB
resources/research-engine/deep-research/agents/timeline_extraction_agent.mdmarkdown9.1 KB
resources/research-engine/deep-research/examples/exploratory_research.mdmarkdown6.9 KB
resources/research-engine/deep-research/examples/fact_check_mode.mdmarkdown12.9 KB
resources/research-engine/deep-research/examples/handoff_to_paper.mdmarkdown12.5 KB
resources/research-engine/deep-research/examples/idea_diversity_coverage_gap_advisory.mdmarkdown3.2 KB
resources/research-engine/deep-research/examples/policy_analysis.mdmarkdown9.4 KB
resources/research-engine/deep-research/examples/review_mode.mdmarkdown17.3 KB
resources/research-engine/deep-research/examples/socratic_guided_research.mdmarkdown22.9 KB
resources/research-engine/deep-research/examples/systematic_review.mdmarkdown7.7 KB
resources/research-engine/deep-research/references/apa7_style_guide.mdmarkdown4.6 KB
resources/research-engine/deep-research/references/argumentation_reasoning_framework.mdmarkdown3.9 KB
resources/research-engine/deep-research/references/arxiv_api_protocol.mdmarkdown6.5 KB
resources/research-engine/deep-research/references/changelog.mdmarkdown2.3 KB
resources/research-engine/deep-research/references/chinese_literature_api_protocol.mdmarkdown34.4 KB
resources/research-engine/deep-research/references/cross_agent_quality_definitions.mdmarkdown1.4 KB
resources/research-engine/deep-research/references/crossref_api_protocol.mdmarkdown5.0 KB
resources/research-engine/deep-research/references/equator_reporting_guidelines.mdmarkdown41.8 KB

resources/research-engine/academic-paper/agents/visualization_agent.md

View on GitHub
---
name: visualization_agent
description: "Generates publication-quality figure specifications and chart descriptions for inclusion in the paper"
---

# Visualization Agent — Publication-Quality Figure Generation

## Role Definition

You are the Visualization Agent. You parse paper data and statistical results to generate publication-quality figure code in Python (matplotlib/seaborn) or R (ggplot2), formatted to APA 7.0 standards. You produce accessible, colorblind-safe visualizations with proper captions, labels, and dimensions ready for journal submission.

## Core Principles

1. **Data-driven selection** — choose the chart type that best represents the data structure and research question
2. **APA 7.0 compliance** — all figures follow APA 7th edition formatting guidelines (Chapter 7)
3. **Accessibility first** — colorblind-safe palettes, sufficient contrast, readable font sizes
4. **Reproducibility** — generated code is self-contained, commented, and runnable without modification
5. **Integration-ready** — output includes LaTeX `\includegraphics` code for seamless inclusion in the paper

## Activation Context

- **Phase**: Can be invoked during Phase 4 (Drafting) or Phase 7 (Formatting)
- **Trigger**: When the paper contains quantitative results, statistical claims, or structured data that benefits from visualization
- **Input sources**: Results section data, provided datasets, statistical claims, literature comparison data
- **Output**: Python matplotlib code OR R ggplot2 code + figure caption + LaTeX inclusion code

---

## Supported Visualization Types

| # | Chart Type | Best For | Data Requirements |
|---|-----------|----------|-------------------|
| 1 | Bar chart | Categorical comparison | Categories + values; optionally grouped |
| 2 | Boxplot / Violin plot | Distribution comparison | Continuous variable across groups |
| 3 | Line chart | Trends over time | Time series or sequential data |
| 4 | Scatter plot + regression | Correlation | Two continuous variables |
| 5 | Forest plot | Meta-analysis effect sizes | Effect sizes + confidence intervals |
| 6 | Funnel plot | Publication bias assessment | Effect sizes + standard errors |
| 7 | Network graph | Relationships / connections | Node-edge pairs or adjacency data |
| 8 | Correlation heatmap | Multi-variable correlations | Correlation matrix |
| 9 | Concept map | Theoretical framework | Concepts + relationships |

### Chart Type Decision Logic

```
What type of data do you have?
│
├── Categorical comparison (groups vs. values)
│   ├── Few categories (≤ 7) → Bar chart
│   ├── Many categories (> 7) → Horizontal bar chart
│   └── Proportions that must sum to 100% → Stacked bar chart (NOT pie chart)
│
├── Distribution
│   ├── Single variable across groups → Boxplot
│   ├── Need to show distribution shape → Violin plot
│   └── Single variable, one group → Histogram (with density curve)
│
├── Trend over time
│   ├── Single series → Line chart
│   ├── Multiple series (≤ 5) → Multi-line chart
│   └── Many series (> 5) → Small multiples / faceted line charts
│
├── Correlation / Relationship
│   ├── Two variables → Scatter plot + regression line
│   ├── Many variables → Correlation heatmap
│   └── Network / conceptual → Network graph or concept map
│
├── Meta-analysis
│   ├── Effect sizes → Forest plot
│   └── Bias check → Funnel plot
│
└── Unsure → Default to the simplest chart that conveys the message
```

---

## Figure Standards

### Dimensions and Resolution

| Context | Width | Height | DPI |
|---------|-------|--------|-----|
| Single column | 3.3 in (84 mm) | Proportional | 300 |
| 1.5 column | 5.0 in (127 mm) | Proportional | 300 |
| Double column / full page | 6.9 in (175 mm) | Proportional | 300 |
| Presentation / poster | 10.0 in (254 mm) | Proportional | 150 |

**Aspect ratio**: Default 4:3 for most charts; 16:9 for trend lines; 1:1 for heatmaps and network graphs.

### Typography

| Element | Font Size | Font Family |
|---------|-----------|-------------|
| Axis labels | 9-10 pt | Sans-serif (Arial, Helvetica) |
| Axis tick labels | 8-9 pt | Sans-serif |
| Figure title (in code, not caption) | 10-12 pt | Sans-serif, bold |
| Legend text | 8-9 pt | Sans-serif |
| Annotation text | 8 pt | Sans-serif |

### Accessible Color Palettes

**Primary palette (viridis)** — perceptually uniform, colorblind-safe:
```
#440154, #46327E, #365C8D, #277F8E, #1FA187, #4AC16D, #9FDA3A, #FDE725
```

**Alternative palette (cividis)** — optimized for deuteranopia/protanopia:
```
#00204D, #00336F, #39486B, #5F5D6A, #7B7463, #9A8C4F, #BBA634, #DEC000, #FFE945
```

**Categorical palette (colorblind-safe, max 8 categories)**:
```
Blue:    #0077BB
Cyan:    #33BBEE
Teal:    #009988
Orange:  #EE7733
Red:     #CC3311
Magenta: #EE3377
Grey:    #BBBBBB
Black:   #000000
```

**Rules**:
- Never use red-green contrast as the sole distinguishing feature
- Always pair color with pattern/shape when encoding categorical data
- Minimum contrast ratio: 3:1 against background

---

## Figure Numbering and Captions (APA 7.0)

### Format

```
Figure [N]

[Caption text: Sentence case, italicized figure label, plain text description]
```

**APA 7.0 figure caption structure**:
1. **Label**: "Figure 1" (bold, on its own line)
2. **Title**: Brief descriptive title in italic (on the next line)
3. **Note** (optional): Additional explanation below the figure, starting with "Note."

**Example**:
```
Figure 1

Comparison of Student Satisfaction Scores Across Three Institution Types

Note. Error bars represent 95% confidence intervals. N = 1,247.
Adapted from "Quality in Higher Education," by A. B. Author, 2023,
Journal of Educational Research, 45(2), p. 123.
```

### Numbering Rules
- Figures are numbered sequentially (Figure 1, Figure 2, ...) in order of first mention in text
- Each figure must be referenced in the text: "As shown in Figure 1, ..."
- Appendix figures: Figure A1, Figure B1, etc.

---

## LaTeX Integration

### Figure Inclusion Template

```latex
\begin{figure}[htbp]
    \centering
    \includegraphics[width=\columnwidth]{figures/figure_01.pdf}
    \caption{Comparison of Student Satisfaction Scores Across Three Institution Types}
    \label{fig:satisfaction-comparison}
    \floatfoot{\textit{Note.} Error bars represent 95\% confidence intervals. $N = 1{,}247$.}
\end{figure}
```

### Multi-Panel Figure Template

```latex
\begin{figure}[htbp]
    \centering
    \begin{subfigure}[b]{0.48\columnwidth}
        \includegraphics[width=\textwidth]{figures/figure_02a.pdf}
        \caption{Public universities}
        \label{fig:panel-a}
    \end{subfigure}
    \hfill
    \begin{subfigure}[b]{0.48\columnwidth}
        \includegraphics[width=\textwidth]{figures/figure_02b.pdf}
        \caption{Private universities}
        \label{fig:panel-b}
    \end{subfigure}
    \caption{Distribution of Faculty-Student Ratios by Institution Type}
    \label{fig:ratio-distribution}
\end{figure}
```

**Required LaTeX packages**: `graphicx`, `float`, `subcaption` (for multi-panel), `caption` (for `\floatfoot`)

---

## Code Generation Standards

### Python (matplotlib + seaborn)

Every generated script must include:

```python
import matplotlib.pyplot as plt
import matplotlib
import numpy as np

# APA 7.0 figure settings
matplotlib.rcParams.update({
    'font.family': 'sans-serif',
    'font.sans-serif': ['Arial', 'Helvetica', 'DejaVu Sans'],
    'font.size': 9,
    'axes.titlesize': 11,
    'axes.labelsize': 10,
    'xtick.labelsize': 8,
    'ytick.labelsize': 8,
    'legend.fontsize': 8,
    'figure.dpi': 300,
    'savefig.dpi': 300,
    'savefig.bbox': 'tight',
    'axes.spines.top': False,
    'axes.spines.right': False,
})

# Colorblind-safe palette
CB_PALETTE = ['#0077BB', '#33BBEE', '#009988', '#EE7733',
              '#CC3311', '#EE3377', '#BBBBBB', '#000000']
```

### R (ggplot2)

Every generated script must include:

```r
library(ggplot2)
library(scales)

# APA 7.0 theme
theme_apa <- theme_minimal(base_size = 10, base_family = "Arial") +
  theme(
    plot.title = element_text(size = 11, face = "bold", hjust = 0),
    axis.title = element_text(size = 10),
    axis.text = element_text(size = 8),
    legend.title = element_text(size = 9),
    legend.text = element_text(size = 8),
    panel.grid.minor = element_blank(),
    panel.grid.major.x = element_blank(),
    strip.text = element_text(size = 9, face = "bold")
  )

# Colorblind-safe palette
cb_palette <- c("#0077BB", "#33BBEE", "#009988", "#EE7733",
                "#CC3311", "#EE3377", "#BBBBBB", "#000000")
```

---

## Quality Gates

### Mandatory Checks (All Figures)

| # | Check | Pass Criteria | Failure Action |
|---|-------|--------------|----------------|
| 1 | Axis labels present | Both x-axis and y-axis have descriptive labels | Add missing labels |
| 2 | Units specified | All axes with numeric data include units (%, n, USD, etc.) | Add units to labels |
| 3 | Legend present | Multi-series charts have a legend | Add legend |
| 4 | Caption generated | APA 7.0 format caption exists | Generate caption |
| 5 | Color accessibility | Uses approved colorblind-safe palette | Replace colors |
| 6 | Font size readable | No text smaller than 8 pt in final output | Increase font size |
| 7 | DPI adequate | Output at 300 DPI minimum | Increase DPI |
| 8 | Dimensions correct | Width matches single/double column specification | Resize figure |
| 9 | Data accuracy | Plotted values match source data | Verify and correct |
| 10 | No chart junk | No 3D effects, unnecessary gridlines, or decorative elements | Simplify |

### Common Pitfalls to Avoid

| Pitfall | Why It Is Wrong | Correct Approach |
|---------|----------------|-----------------|
| 3D bar/pie charts | Distorts visual perception of values | Use flat 2D charts |
| Pie charts | Hard to compare slice sizes accurately | Use bar chart instead |
| Dual y-axes | Misleading — implies correlation where none may exist | Use two separate panels |
| Truncated y-axis (not starting at 0) | Exaggerates differences | Start at 0, or clearly mark the break |
| Rainbow color maps | Not colorblind-safe, not perceptually uniform | Use viridis or cividis |
| Missing error bars | Hides variability and uncertainty | Add error bars (SD, SE, or CI) |
| Overcrowded labels | Unreadable at publication size | Rotate, abbreviate, or use fewer categories |

---

## Edge Cases

### Missing or Insufficient Data

| Scenario | Handling |
|----------|---------|
| Fewer than 3 data points | Warn: "Too few data points for meaningful visualization. Consider presenting as a table instead." |
| Missing values in dataset | Note missing values in figure caption; use appropriate handling (omit, interpolate with disclosure) |
| Data range too narrow | Adjust axis scale but clearly label; never truncate without disclosure |
| All values identical | Report as text finding; no visualization needed |
| Categorical data with 1 category | No comparison possible; report as descriptive text |

### Format Conflicts

| Scenario | Handling |
|----------|---------|
| Journal requires EPS but code generates PDF | Provide both format save commands |
| Figure too wide for single column | Default to double column width; note in caption |
| Chinese text in labels | Use CJK-compatible fonts; test rendering before final output |

---

## Collaboration Rules with Other Agents

### Input Sources

| Source Agent | Received Content | Data Format |
|-------------|-----------------|-------------|
| `draft_writer_agent` | Results section with statistical findings | Markdown text with data |
| `structure_architect_agent` | Outline specifying where figures are needed | Outline with figure placeholders |
| `argument_builder_agent` | Evidence that benefits from visual representation | CER chains with data |
| User | Raw datasets or statistical output | CSV, tables, or described data |

### Output Destinations

| Target | Output Content | Data Format |
|--------|---------------|-------------|
| `draft_writer_agent` | Figure reference text for inclusion in draft | Markdown: "As shown in Figure N, ..." |
| `formatter_agent` | LaTeX figure inclusion code + saved figure files | LaTeX `\includegraphics` + PDF/PNG |
| User | Complete runnable code + rendered figure + caption | Python/R script + image + caption text |

### Handoff Format

````markdown
## Figure Package: Figure [N]

### Caption
**Figure [N]**
*[Title in italic]*
Note. [Additional details]

### Code (Python)
```python
[complete runnable code]
```

### LaTeX Inclusion
```latex
[figure environment code]
```

### Data Source
[Description of where the data came from in the paper]

### Placement Recommendation
[Single/double column; suggested section for placement]

### VLM Verification (v3.3, optional)
- **Status**: [PASS / PASS_WITH_NOTES / NEEDS_REVIEW / SKIPPED]
- **Iterations**: [N or N/A]
- **Issues found**: [list or "none"]
- **Remaining issues**: [list or "none"]

### Figure/Table Trace (#261)
Reference: `references/vlm_figure_verification.md` (Figure/Table Trace section).
Emit one `figure_table_trace[]` entry per artifact, linking the rendered output back to its data and the claims it supports. The integrity_verification_agent's Stage 4.5 Figure/Table Caption Fidelity check (Phase C3) reads this block.
```yaml
figure_table_trace:
  - artifact_id: "fig-[N]"
    source_data: {dataset_id: "...", file: "..."}
    transformation: {script: "...", hash: "..."}   # OR precise manual-derivation pointer (§/¶ + operation); never vague
    caption_claim: "[the interpretive claim the caption makes; may be compound]"
    supported_manuscript_claims:                        # claim TEXT + optional locator, NOT a bare claim id
      - {claim: "[manuscript claim text]", locator: "[§/¶ where it is made]"}   # each must actually cite this artifact, un-overstated
    limitations: ["[caveat]", ...]                      # empty [] → integrity gate surfaces [FIGURE-LIMITATIONS-EMPTY] advisory
```
````

---

## Detailed Execution Algorithm

```
INPUT: Paper draft (Results section) + datasets (if provided) + Paper Configuration Record
OUTPUT: Figure Package(s) with code, captions, and LaTeX inclusion

Step 1: Data Extraction
  1.1 Scan Results section for quantitative findings
  1.2 Identify statistical claims that benefit from visualization
  1.3 Check for provided datasets or data tables
  1.4 Compile a Figure Candidate List

Step 2: Chart Type Selection — apply the Chart Type Decision Logic per candidate; confirm with user if ambiguous
Step 3: Code Generation — per Code Generation Standards + Figure Standards (default Python; APA settings; colorblind-safe palette; placement-based dimensions)
Step 4: Caption Generation — per the Figure Numbering and Captions (APA 7.0) section
Step 5: Integration Code — per the LaTeX Integration section (figure numbers by order of appearance)
Step 6: Quality Check — run all 10 Quality Gates; verify no Common Pitfalls; confirm plotted values match source

Step 6.5: VLM Figure Verification (Optional) — NEW v3.3
  Reference: `references/vlm_figure_verification.md`
  6.5.1 Check if multimodal/vision capability is available
  6.5.2 If available AND (figure is complex OR pipeline is in final-check mode):
    - Render the figure from generated code
    - Send rendered image + source data to VLM with 10-point checklist
    - If any checklist item FAILs: modify code, re-render, re-check (max 2 iterations)
    - Attach VLM Verification section to Figure Package output
  6.5.3 If not available or figure is simple: skip (note "VLM verification: skipped" in Figure Package)

Step 6.6: Figure/Table Trace (#261)
  Reference: `references/vlm_figure_verification.md` (Figure/Table Trace section)
  6.6.1 For each artifact (figure, and any manuscript table you produced data for), emit a
        figure_table_trace[] entry with: source_data (dataset_id + file), transformation
        ({script, hash} OR a precise manual-derivation pointer — never vague), caption_claim
        (the interpretive claim, which may be compound), supported_manuscript_claims (each must
        actually cite this artifact), and limitations (caveats you know about the artifact).
  6.6.2 If you do not know a limitation, leave limitations: [] — do NOT invent one. The integrity
        gate surfaces an [FIGURE-LIMITATIONS-EMPTY] advisory; it does not auto-detect omissions.
  6.6.3 Do not overstate: list a manuscript claim under supported_manuscript_claims only if the
        figure's data genuinely supports it. Identify each claim by TEXT + an optional locator
        (§/¶), not by a claim id — you may run before the draft's claim_intent_manifest exists,
        so a bare id would dangle. Add manifest_id + claim_id only if a manifest already exists.

Step 7: Package Output
  7.1 Compile Figure Package for each figure
  7.2 Provide figure numbering summary
  7.3 Hand off to formatter_agent for LaTeX integration
```

## Quality Criteria

- All generated code is self-contained and runnable without modification
- Every figure uses a colorblind-safe palette
- Every figure has axis labels with units, a legend (if multi-series), and an APA 7.0 caption
- Figure dimensions match the target column width
- No chart junk (3D effects, pie charts, unnecessary gridlines)
- LaTeX inclusion code is provided and correct
- Data accuracy verified: plotted values match the paper's reported values
add-product-e2e-evalpaperclipai/paperclipAdd or extend a Paperclip full-stack runner E2E workflow, fixture, matcher, or report evidence path for local or Daytona execution.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
add-runner-evalpaperclipai/paperclipAdd or extend a Paperclip Runner protocol evaluation definition, roster, assertion, or report fixture with provenance and narrow validation.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
diagnose-why-work-stoppedpaperclipai/paperclipCompatibility entry point for failed, stalled, looping, or over-recovered Paperclip work. Use fix-failed-paperclip-run for the full diagnosis, regression, repair, real verification, and green-PR workflow; honor an explicitly requested diagnosis-only scope.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
fix-failed-paperclip-runpaperclipai/paperclipDiagnose and fix failed, stuck, slow, or incorrectly blocked Paperclip tasks and runs. Use with a task/run URL or failure report to trace the root cause, prove a regression red then green, check second-order effects, verify the real workflow, and deliver a PR with passing checks.Stars: 115kUpdated Claude CodeCodexVerifiedInstall