paper-covert
$
npx mdskill add GRIND-Lab-Core/night_owl_research_agent/paper-covertConvert the final manuscript in `output/manuscript/` into a submission package for: **$ARGUMENTS**
SKILL.md
.github/skills/paper-covertView on GitHub ↗
---
name: paper-covert
description: Converts the final Markdown manuscript from `paper-draft` / `paper-review-loop` into a submission package for the target venue — modular LaTeX (one file per section), compiled PDF, and Word `.docx`. Venue is read from `output/PAPER_PLAN.md` (or argument) and routed through a small YAML profile. Does not rewrite prose, score, or invent citations.
argument-hint: [venue-or-manuscript-path]
allowed-tools: Bash(*), Read, Write, Edit, Grep, Glob
---
# Skill: paper-covert
Convert the final manuscript in `output/manuscript/` into a submission package for: **$ARGUMENTS**
> Naming: the pipeline in `paper-writing-pipeline` references this as `/paper-convert`. Folder name is `paper-covert` per invocation; they resolve to the same skill.
---
## Constants
- **SRC** — first existing of: `output/manuscript/MANUSCRIPT_REVISED.md` → `output/manuscript/MANUSCRIPT_DRAFT.md` → concatenated `sections_revised/*.md` → concatenated `sections/*.md`.
- **SECTIONS_SRC** — `output/manuscript/sections_revised/` if present, else `sections/`.
- **PLAN = `output/PAPER_PLAN.md`** — for title, keywords, venue, figure/table plan, declarations.
- **OUT = `output/submission/`**
- **VENUE** — argument `venue:<name>` → `PAPER_PLAN.md` §0/§2 → `research_contract.md` → `IJGIS`.
- **PROFILE** — `./profiles/<venue>.yaml`, else `./profiles/generic.yaml`.
Inline override: `/paper-covert — venue: ISPRS, mode: latex`. Modes: `all` (default), `latex`, `pdf`, `docx`.
---
## Inputs
Primary:
- `SRC` (Markdown manuscript)
- `SECTIONS_SRC/*.md`
- `PLAN`
Supporting (read when present):
- `output/manuscript/CLAIM_RISK_REPORT.md`, `COVERAGE_GAPS.md`, `CITATION_GAPS.md` — surface unresolved items into the manifest, do not fix them.
- `output/figures/FIGURE_MANIFEST.md`, `output/figures/FIGURE_CAPTIONS.md`, `output/figures/`
- `memory/paper-cache/*.json`, local `references.bib`
- `data/DATA_MANIFEST.md`, `research_contract.md`
- `./profiles/<venue>.yaml`
---
## Outputs
```
output/submission/
├── SUBMISSION_MANIFEST.md # source, venue, files, readiness, unresolved items
├── latex/
│ ├── main.tex # lean entry: \input's only
│ ├── preamble.tex # packages + placeholder env
│ ├── metadata.tex # title, authors, keywords, highlights
│ ├── references.bib # copied or synthesized; else stub
│ ├── build.sh # latexmk → pdflatex fallback
│ ├── sections/
│ │ ├── 01_abstract.tex
│ │ ├── 02_introduction.tex
│ │ ├── 03_related_work.tex
│ │ ├── 04_data.tex
│ │ ├── 05_methodology.tex
│ │ ├── 06_experiments.tex
│ │ ├── 07_results.tex
│ │ ├── 08_discussion.tex
│ │ ├── 09_limitations.tex
│ │ ├── 10_conclusion.tex
│ │ ├── 11_declarations.tex
│ │ └── appendix_*.tex
│ └── figures/ # copied from output/figures/ per FIGURE_MANIFEST
├── pdf/MANUSCRIPT_SUBMISSION_READY.pdf
└── docx/MANUSCRIPT_SUBMISSION_READY.docx
```
Filenames are stable; overwrite in place. Two-digit zero-padded section prefixes match `paper-draft`.
---
## Workflow
### 1. Resolve source and venue
Pick `SRC` by priority above. Read `PLAN` for title, keywords, venue, declarations, figure/table plan. Load `PROFILE`. Record the source path, venue, and profile choice at the top of `SUBMISSION_MANIFEST.md`.
### 2. Build the LaTeX tree
- Write `main.tex`, `preamble.tex`, `metadata.tex` from `./templates/`, filling in profile fields (`documentclass`, `class_options`, `bib_style`, `bib_engine`) and manuscript metadata (title, keywords, highlights when the venue requires them).
- For each section in `SECTIONS_SRC/`, write one `.tex` file under `latex/sections/` using these conversion rules:
- `#`/`##`/`###` → `\section`/`\subsection`/`\subsubsection` with a `\label{sec:...}`.
- Markdown emphasis, lists, block quotes, inline/display math → LaTeX equivalents.
- Markdown tables → `booktabs` `tabular`; tables ≥ 15 rows extracted to `tables/`.
- Images `` → `figure` env with `\includegraphics`, `\caption`, `\label{fig:X}`.
- Citations: `\cite{key}` kept as-is when resolvable in `references.bib`; `[CITE: topic]` rendered via a visible `\citeplaceholder{topic}` macro and logged in the manifest.
- `[PLACEHOLDER — …]` blocks wrapped in a visible `placeholder` environment so they show in the PDF.
- Copy figures listed in `FIGURE_MANIFEST.md` into `latex/figures/`. Do not reference figures not in the manifest.
Section file mapping adapts to the manuscript's actual section list; `PLAN` §19 is authoritative when it differs from the default 01–11 layout. Appendices use `appendix_<letter>.tex`.
### 3. Wire the bibliography
- If a `.bib` exists under `output/manuscript/` or repo root → copy to `latex/references.bib`.
- Else synthesize from `memory/paper-cache/*.json` — copy only entries whose keys appear in the manuscript; never invent.
- Use `bib_style` and `bib_engine` from the profile. Unresolved `[CITE: …]` or missing keys → list in the manifest's **Bibliography gaps** section; do not fabricate.
### 4. Build the PDF
Write `build.sh` from `./templates/build_script_template.sh`. Run it (`latexmk -pdf`; fallback to `pdflatex + bibtex + pdflatex ×2`). Copy `main.pdf` to `pdf/MANUSCRIPT_SUBMISSION_READY.pdf`. On failure, keep the LaTeX tree intact and record the first error + likely cause in the manifest under **Build**.
### 5. Export the DOCX
Prefer `pandoc latex/main.tex -o docx/MANUSCRIPT_SUBMISSION_READY.docx --citeproc --bibliography=latex/references.bib`. If Pandoc rejects venue LaTeX, fall back to `pandoc` on the source Markdown (concatenated `SECTIONS_SRC/*.md`). If Pandoc is unavailable, record `docx: blocked` in the manifest.
### 6. Write the manifest
Write `SUBMISSION_MANIFEST.md` from `./templates/SUBMISSION_MANIFEST_TEMPLATE.md`:
- source manuscript path + readiness (`reviewed` / `revised` / `draft-only`)
- venue + profile (flag fallback `generic` explicitly)
- files generated with paths
- **Bibliography gaps** (unresolved citations) — carried from `CITATION_GAPS.md` plus anything new.
- **Asset gaps** — figures referenced but missing from the manifest; figures marked `Needs revision`.
- **Content gaps** — `[PLACEHOLDER …]` blocks remaining in the LaTeX.
- **Build** — PDF engine, pass/fail, warning counts; DOCX pathway, pass/fail.
- **Readiness** — honest per-format statement. Do not mark "submission-ready" while any gap above is open or a build failed.
Append one line to `output/PROJ_NOTES.md`:
```
YYYY-MM-DD paper-covert venue=<V> source=<revised|draft> pdf=<ok|fail> docx=<ok|fail> gaps=<K>
```
---
## Decision rules
- **Venue structure**: `PROFILE` defaults → `PLAN` §19 overrides. Log the final structure in the manifest.
- **No publisher class bundled**: use `article` + the profile's bib style; record in the manifest that a publisher re-wrap is needed at submission time. Never claim the output is an official publisher template.
- **Incomplete manuscript**: still produce the package; placeholders stay visible; readiness is `partial`.
- **Mode restriction**: `mode:latex` stops after step 3; `mode:pdf` skips DOCX; `mode:docx` still needs LaTeX for the Pandoc path unless Markdown→DOCX is forced.
---
## Guardrails
Do **not**:
- rewrite, soften, or restructure prose — that is `paper-review-loop`.
- invent citations, bibliographic entries, figure files, or publisher-private rules.
- reference figures not listed in `FIGURE_MANIFEST.md`.
- silently drop content when a format conversion can't handle it — log it.
- label the package "submission-ready" with open gaps or a failed build.
- modify `output/manuscript/`. This skill is read-only on it.
---
## Supporting files
Under this skill:
- `templates/main_template.tex`, `preamble_template.tex`, `metadata_template.tex`, `section_template.tex`, `build_script_template.sh`, `SUBMISSION_MANIFEST_TEMPLATE.md`, `CONVERSION_CHECKLIST.md`, `VENUE_ROUTING_README.md`, `BIBLIOGRAPHY_GAP_CHECKLIST.md`.
- `profiles/`: `generic.yaml`, `ijgis.yaml`, `isprs_jprs.yaml`, `rse.yaml`, `tgis.yaml`, `aag_annals.yaml`, `ieee_tgrs.yaml`. Each profile declares `documentclass`, `class_options`, `bib_style`, `bib_engine`, word/abstract/figure limits, highlights requirement, and a note on publisher-class availability.
## Composing with other skills
```
/paper-draft → /paper-review-loop → /paper-covert → /submit-check
```
`paper-covert` packages; `submit-check` validates venue compliance. They do not overlap.
More from GRIND-Lab-Core/night_owl_research_agent
- data-downloadDiscover, evaluate, and download publicly available datasets from the internet. Infers data needs from a research question or task, selects authoritative sources, downloads reproducibly, validates file integrity, and documents provenance. Pauses for user input when authentication, API keys, or major tradeoffs require a decision. Use when user says "download data", "get data", "find a dataset", "I need boundary files", "download census data", or needs any external dataset for analysis.
- deploy-experimentDeploy and run experiments for ML/DL training (local, remote, or Modal GPU) AND spatial data science / GIScience experiments (local, data-driven). Reads from output/refine-logs/EXPERIMENT_PLAN.md and output/refine-logs/FINAL_PROPOSAL.md, writes to output/experiment/. Use when user says "run experiment", "deploy experiment", "execute experiment plan", or needs to launch training / spatial analysis jobs.
- experiment-design-pipelineRun an end-to-end workflow that chains the skills `refine-research` and `experiment-design`. Use when the user wants a one-shot pipeline from vague research direction to focused final proposal plus detailed experiment roadmap, or asks to build a pipeline, do it end-to-end, or generate both the method and experiment plan together.
- full-pipelineComplete 4-stage end-to-end research pipeline. Orchestrates idea-discovery-pipeline → deploy-experiment → auto-review-loop → generate-report. Reads RESEARCH_PLAN.md (or BRIEF.md as fallback) for context that overrides $ARGUMENTS.
- generate-ideaGenerate and rank research ideas given a broad direction. Use when user input "brainstorm ideas", "generate research ideas", "what can we work on", or wants to explore a research area for publishable directions.
- idea-discovery-pipelineThe full pipeline for idea generation. It generates 8-12 novel research ideas from literature gaps and evaluates each on novelty, feasibility, and domain fit. Orchestrates lit-review → generate-idea → novelty-check → idea-review → experiment-design-pipeline to go from a broad research direction to a validated, pilot-tested idea with a refined proposal and experiment plan. Produces output/IDEA_REPORT.md plus refinement and experiment artifacts.
- lit-reviewRetrieves papers from local folder or ArXiv and Semantic Scholar using domain-aware keyword expansion, builds synthesis matrix, identifies gaps. Calls tools/arxiv_fetch.py and tools/semantic_scholar_fetch.py. Writes to output/paper-cache/ and output/LIT_REVIEW_REPORT.md.
- paper-draftTransforms output/PAPER_PLAN.md into a journal-quality Markdown manuscript draft for GIScience, GeoAI, spatial data science, and remote sensing venues (IJGIS, ISPRS JPRS, RSE, TGIS, AAG Annals). Consults referenced literature, experiment, figure, and claim artifacts; supports full drafts, partial drafts, and skeleton drafts depending on readiness. Never fabricates results, metrics, or citations — produces a claim-to-evidence map and coverage-gap report alongside the manuscript.
- paper-figure-generateGenerates publication-quality figures and diagrams from output/PAPER_PLAN.md for GIScience, GeoAI, and remote sensing journals (IJGIS, ISPRS JPRS, RSE, TGIS). Decides per-figure whether to produce reproducible code-generated plots/maps or structured prompts for external image-generation models (nano banana, ChatGPT image). Produces figure files, source scripts, captions, manifest, and prompt artifacts. Never fabricates results — uses only evidence from project files.
- paper-review-loopReviews the manuscript produced by `paper-draft` (in `output/manuscript/`) as a demanding IJGIS / ISPRS JPRS reviewer-editor, cross-checks it against `output/PAPER_PLAN.md` and its evidence artifacts, then revises it into a stronger draft. Produces a reviewed manuscript, a revised manuscript, a structured review report, a prioritized issue log, a revision log, claim-risk notes, journal-fit notes, and next-loop priorities. Supports full, section-scoped, and mode-scoped review (structural / argument / novelty / methods / results-discussion / journal-fit / language / integrated). Safe on partial or skeletal drafts. Never fabricates results, citations, or figures.