$npx -y skills add woodfishhhh/EZ_math_model --skill paper-orchestraOrchestrate the full PaperOrchestra (Song et al., 2026, arXiv:2604.05018) five-agent pipeline to turn unstructured research materials (idea, experimental log, LaTeX template, conference guidelines, optional figures) into a submission-ready LaTeX manuscript and compiled PDF. TRIGG
| 1 | # paper-orchestra (Orchestrator) |
| 2 | |
| 3 | Top-level driver for the PaperOrchestra pipeline. Read this document and follow |
| 4 | the steps below. The detailed prompts and rules live in each sub-skill's |
| 5 | `SKILL.md` and `references/` directories — you (the host agent) will load them |
| 6 | as you go. |
| 7 | |
| 8 | > Source paper: Song et al., *PaperOrchestra: A Multi-Agent Framework for |
| 9 | > Automated AI Research Paper Writing*, arXiv:2604.05018, 2026. |
| 10 | > <https://arxiv.org/pdf/2604.05018> |
| 11 | |
| 12 | ## What this skill produces |
| 13 | |
| 14 | A complete submission package `P = (paper.tex, paper.pdf)` written into |
| 15 | `workspace/final/`, plus a full audit trail under `workspace/` (outline, |
| 16 | figures, refs, drafts, refinement worklog, provenance snapshot). |
| 17 | |
| 18 | ## Inputs (the (I, E, T, G, F) tuple from the paper) |
| 19 | |
| 20 | The workspace MUST contain: |
| 21 | |
| 22 | | File | Symbol | Required | Description | |
| 23 | |---|---|---|---| |
| 24 | | `workspace/inputs/idea.md` | `I` | yes | Idea Summary (Sparse or Dense variant — see `references/io-contract.md`) | |
| 25 | | `workspace/inputs/experimental_log.md` | `E` | yes | Experimental Log: setup, raw numeric data, qualitative observations | |
| 26 | | `workspace/inputs/template.tex` | `T` | yes | LaTeX template for the target conference (with `\section{...}` commands) | |
| 27 | | `workspace/inputs/conference_guidelines.md` | `G` | yes | Formatting rules, page limit, mandatory sections | |
| 28 | | `workspace/inputs/figures/` | `F` | no | Optional pre-existing figures. If empty, the plotting agent generates everything. | |
| 29 | |
| 30 | `scripts/init_workspace.py` will scaffold this layout. `scripts/validate_inputs.py` |
| 31 | will check it before the pipeline runs. |
| 32 | |
| 33 | ## Pipeline (read `references/pipeline.md` for the full diagram) |
| 34 | |
| 35 | ``` |
| 36 | Step 1: Outline ──▶ outline.json (1 LLM call) |
| 37 | Step 2: Plotting ─┐ |
| 38 | ├──▶ figures/*.png + captions.json (~20-30 calls) |
| 39 | Step 3: Lit Review ─┘ (~20-30 calls) |
| 40 | intro_relwork.tex + refs.bib |
| 41 | |
| 42 | Step 4: Section Writing ──▶ drafts/paper.tex (1 LLM call) |
| 43 | Step 5: Content Refine ──▶ final/paper.tex + final/paper.pdf (~5-7 calls, ~3 iters) |
| 44 | ``` |
| 45 | |
| 46 | Step 2 and Step 3 are independent and **MUST run in parallel** when your host |
| 47 | supports parallel sub-agents. If not, run Step 3 first (it has the longer wall |
| 48 | time due to Semantic Scholar rate limits) and Step 2 second. |
| 49 | |
| 50 | ## Critical pre-instruction (read once, apply always) |
| 51 | |
| 52 | Before any LLM call that *writes* paper content (outline, intro/related work, |
| 53 | section writing, refinement), you MUST prepend the **Anti-Leakage Prompt** at |
| 54 | `references/anti-leakage-prompt.md` to your system prompt. This is verbatim |
| 55 | from Appendix D.4 of the paper and prevents pre-training-data leakage. The |
| 56 | paper applies it uniformly across all baselines for fair comparison; we apply |
| 57 | it for fidelity *and* to keep generated papers grounded in the user's inputs. |
| 58 | |
| 59 | ## Step-by-step execution |
| 60 | |
| 61 | ### 0. Pre-flight Checks |
| 62 | |
| 63 | Before running the pipeline, perform the following quality gates in order: |
| 64 | |
| 65 | ```bash |
| 66 | # 1. Scaffold the workspace |
| 67 | python skills/paper-orchestra/scripts/init_workspace.py --out workspace/ |
| 68 | # user drops their inputs into workspace/inputs/ |
| 69 | |
| 70 | # 2. Validate required files are present and well-formed |
| 71 | python skills/paper-orchestra/scripts/validate_inputs.py --workspace workspace/ |
| 72 | |
| 73 | # 3. Check input density — idea and experimental log must meet minimum thresholds |
| 74 | python skills/paper-orchestra/scripts/check_idea_density.py \ |
| 75 | --idea workspace/inputs/idea.md \ |
| 76 | --log workspace/inputs/experimental_log.md |
| 77 | |
| 78 | # 4. Cross-validate consistency between idea and experimental log |
| 79 | python skills/paper-orchestra/scripts/validate_consistency.py \ |
| 80 | --idea workspace/inputs/idea.md \ |
| 81 | --log workspace/inputs/experimental_log.md |
| 82 | ``` |
| 83 | |
| 84 | If `validate_inputs.py` or `check_idea_density.py` fail (exit code 1 or 2), stop |
| 85 | and tell the user what's missing or below threshold — do not proceed until fixed. |
| 86 | |
| 87 | `validate_consistency.py` produces warnings only (exit code 1 = WARN, non-blocking); |
| 88 | report warnings to the user but continue. |
| 89 | |
| 90 | **Before failing on missing inputs**, check whether aggregation can supply them: |
| 91 | |
| 92 | | Inputs state | Action | |
| 93 | |---|---| |
| 94 | | `idea.md` and `experimental_log.md` both present and non-empty | Continue to Step 1. | |
| 95 | | Either is missing/empty, and the user men |