Workflow 3: Full paper writing pipeline. Orchestrates paper-plan → paper-figure → figure-spec/paper-illustration/mermaid-diagram → paper-write → paper-compile → auto-paper-improvement-loop to go from a narrative report to a polished, submission-ready PDF. Use when user says "写论文全流程", "write paper pipeline", "从报告到PDF", "paper writing", or wants the complete paper generation workflow.
Orchestrate a complete paper writing workflow for: $ARGUMENTS
This skill chains five sub-skills into a single automated pipeline:
/paper-plan → /paper-figure → /paper-write → /paper-compile → /auto-paper-improvement-loop
(outline) (plots) (LaTeX) (build PDF) (review & polish ×2)
Each phase builds on the previous one's output. The final deliverable is a polished, reviewed paper/ directory with LaTeX source and compiled PDF.
In this hybrid pack, the pipeline itself is unchanged, but paper-plan and paper-write use Orchestra-adapted shared references for stronger story framing and prose guidance.
ICLR — Target venue. Options: , , , , , , , (IEEE Transactions / Letters), (IEEE conferences). Affects style file, page limit, citation format.ICLRNeurIPSICMLCVPRACLAAAIACMIEEE_JOURNALIEEE_CONFgpt-5.4 — Model used via Codex MCP for plan review, figure review, writing review, and improvement loop.false to pause and wait for user approval after each phase.true, the improvement loop (Phase 5) pauses after each round's review to let you see the score and provide custom modification instructions. When false (default), the loop runs fully autonomously. Passed through to /auto-paper-improvement-loop.figurespec — Architecture/illustration generator for Phase 2b: figurespec (default, deterministic JSON→SVG via /figure-spec, best for architecture/workflow/topology), gemini (AI-generated via /paper-illustration, best for qualitative method illustrations; needs GEMINI_API_KEY), mermaid (Mermaid syntax via /mermaid-diagram, free, best for flowcharts), or false (skip Phase 2b, manual only).Override inline:
/paper-writing "NARRATIVE_REPORT.md" — venue: NeurIPS, illustration: gemini, human checkpoint: trueIEEE example:/paper-writing "NARRATIVE_REPORT.md" — venue: IEEE_JOURNAL
This pipeline accepts one of:
NARRATIVE_REPORT.md (best) — structured research narrative with claims, experiments, results, figuresPAPER_PLAN.md — skip Phase 1, start from Phase 2The more detailed the input (especially figure descriptions and quantitative results), the better the output.
Invoke /paper-plan to create the structural outline:
/paper-plan "$ARGUMENTS"
What this does:
Output: PAPER_PLAN.md with section plan, figure plan, citation scaffolding.
Checkpoint: Present the plan summary to the user.
📐 Paper plan complete:
- Title: [proposed title]
- Sections: [N] ([list])
- Figures: [N] auto-generated + [M] manual
- Target: [VENUE], [PAGE_LIMIT] pages
Shall I proceed with figure generation?
Invoke /paper-figure to generate data-driven plots and tables:
/paper-figure "PAPER_PLAN.md"
What this does:
figures/latex_includes.tex for easy insertionOutput: figures/ directory with PDFs, generation scripts, and LaTeX snippets.
Scope:
paper-figurecovers data plots and comparison tables. Architecture diagrams, pipeline figures, and method illustrations are handled in Phase 2b below.
Skip this step entirely if illustration: false.
If the paper plan includes architecture diagrams, pipeline figures, audit cascades, or method illustrations, invoke the appropriate generator based on the illustration parameter:
When illustration: figurespec (default) — invoke /figure-spec:
/figure-spec "[architecture/workflow description from PAPER_PLAN.md]"
figures/*.svg + figures/*.pdf (via rsvg-convert) + figures/specs/*.jsonWhen illustration: gemini — invoke /paper-illustration:
/paper-illustration "[method description from PAPER_PLAN.md or NARRATIVE_REPORT.md]"
figures/ai_generated/*.pngGEMINI_API_KEY environment variableWhen illustration: mermaid — invoke /mermaid-diagram:
/mermaid-diagram "[method description from PAPER_PLAN.md]"
figures/*.mmd + figures/*.pngWhen illustration: false — skip entirely. All non-data figures must be created manually (draw.io, Figma, TikZ) and placed in figures/ before Phase 3.
Choosing the right mode:
figurespec (default)geminimermaidfalseThese are complementary, not mutually exclusive: you can run multiple generators for different figures in the same paper by re-invoking with different illustration overrides.
Checkpoint: List generated vs manual figures.
📊 Figures complete:
- Data plots (auto, Phase 2): [list]
- Architecture/illustrations (auto, Phase 2b, mode=<illustration>): [list]
- Manual (need your input): [list]
- LaTeX snippets: figures/latex_includes.tex
[If manual figures needed]: Please add them to figures/ before I proceed.
[If all auto]: Shall I proceed with LaTeX writing?
Invoke /paper-write to generate section-by-section LaTeX:
/paper-write "PAPER_PLAN.md"
What this does:
figures/latex_includes.texreferences.bib from citation scaffoldingOutput: paper/ directory with main.tex, sections/*.tex, references.bib, math_commands.tex.
Checkpoint: Report section completion.
✍️ LaTeX writing complete:
- Sections: [N] written ([list])
- Citations: [N] unique keys in references.bib
- Stale files cleaned: [list, if any]
Shall I proceed with compilation?
Invoke /paper-compile to build the PDF:
/paper-compile "paper/"
What this does:
latexmk -pdf with automatic multi-pass compilationpdftotextOutput: paper/main.pdf
Checkpoint: Report compilation results.
🔨 Compilation complete:
- Status: SUCCESS
- Pages: [X] (main body) + [Y] (references) + [Z] (appendix)
- Within page limit: YES/NO
- Undefined references: 0
- Undefined citations: 0
Shall I proceed with the improvement loop?
Skip this phase if the paper contains no theorems, lemmas, or proofs.
if paper contains \begin{theorem} or \begin{lemma} or \begin{proof}:
Run /proof-checker "paper/"
This invokes GPT-5.4 xhigh to:
- Verify all proof steps (hypothesis discharge, interchange justification, etc.)
- Check for logic gaps, quantifier errors, missing domination conditions
- Attempt counterexamples on key lemmas
- Generate PROOF_AUDIT.md with issue list + severity
If FATAL or CRITICAL issues found:
Fix before proceeding to improvement loop
If only MAJOR/MINOR:
Proceed, improvement loop may address remaining issues