PaperSpine For Codex
Use this skill for any PaperSpine task in Codex. This is the Codex edition: one official-style skill folder with all PaperSpine workflow logic, references, and scripts bundled inside. Do not depend on separate child skills in Codex.
Core Rule
PaperSpine is not a prose polisher. It must research the target scene, learn strong examples, confirm the controlling motivation with the user, design the writing unit by unit, and only then write, rewrite, build LaTeX, translate, and audit.
Never fabricate data, metrics, citations, figures, experiments, or claims. External papers teach structure and rhetoric only; user materials are the only source for this manuscript's evidence.
Mandatory Intake
Before starting a workflow, create config through the terminal wizard whenever
possible. In Claude Code, use /paperspine; it automatically launches the
intake UI when configuration is missing. scripts/launch_paperspine_ui.ps1 is
the underlying launcher for the real interactive terminal window. The terminal
UI supports Up/Down option switching, Left/Right field switching, Enter
edit/confirm, and S save. Do not run the Python input() wizard inside hidden
Bash/tool execution.
python scripts/intake_wizard.py --output-dir paper_rewriting_output
The wizard must collect all config fields in the command line by numbered menus or text input, show a final review screen, and allow editing before writing the config. Do not ask the user to manually write JSON or answer a long plain chat checklist unless the terminal is unavailable.
On first setup or when the user asks to change global preferences, run:
python scripts/intake_wizard.py --setup-global --output-dir paper_rewriting_output
Global setup records the command-line UI language preference (zh or en).
Required config fields:
| Field | Values |
|---|---|
workflow |
rewrite_existing, build_from_materials |
scene |
journal, conference, report_review, competition |
tier |
flash, pro |
output_language |
en, zh |
target_name |
free text |
materials_dir |
path or empty |
draft_path |
path or empty |
user_motivation |
hypothesis only; final motivation confirmed after research |
official_urls |
list |
special_requirements |
list |
word_output |
none, docx |
translation_package |
none, zh |
ui_language |
zh, en |
Workflow
- Run intake wizard and write
paper_spine_config.jsonand.md. - Create or verify
source_map.md. - Research before final motivation. Create
reference_materials/,research_dossier.md,exemplar_learning_dossier.md,style_profile.md,sota_gap_map.md, andmotivation_options_after_research.md. - Stop for user confirmation. Write
confirmed_motivation.mdonly after the user chooses or revises the motivation. - For
rewrite_existing, createoriginal_logic_map.md,evidence_bank.md,section_blueprints.md,writing_rationale_matrix.md,rewrite_matrix.md, andlogic_transfer_audit.mdbefore final prose. - For
build_from_materials, createsource_inventory.md,evidence_bank.md,figure_asset_map.md,claim_register.md,section_blueprints.md, andwriting_rationale_matrix.mdbefore final prose. - Always produce
final_paper/main.tex. Compilepaper.pdfwhen a TeX engine is available. Markdown alone is not final. - If
word_output=docx, producefinal_paper/paper.docxandword_report.md. - If
output_language=enandtranslation_package=zh, produce the fulltranslation_zh/package. This means complete file-by-file translation of every required intermediate Markdown artifact, including large tables such aswriting_rationale_matrix.md, plus a complete Chinese full-paper translation. - Run
artifact_check.py --markdown --writebefore completion.
Writing Rationale Matrix
writing_rationale_matrix.md is the writing plan, not a change log. It must be
much more detailed than simple rows such as "fix graphicspath" or "rewrite
abstract".
Use this table:
| Row ID | Manuscript Unit | Current Problem or Planned Function | Motivation Link | Reference/SOTA Pattern Learned | Target Scene or Venue Norm | User Evidence or Citation Anchor | Planned Change/Text Move | Final Text Check |
|---|
Rows must follow the real manuscript/report order and split the work into paragraph-sized, claim-sized, evidence, model, synthesis, heading, caption, or competition-solution units. A row should teach the user why the writing move is better: what logic failed, what strong examples do, why the target venue expects it, what evidence supports it, and how the final text should prove the claim.
The first row must be a deep whole-work framework row. It should explain the chosen controlling structure, how SOTA/target examples informed that structure, how the confirmed motivation orders later sections, which user evidence anchors the arc, and how the final manuscript will be checked against it. Do not write a one-line "conservation-first" or "problem-solution arc" summary without this reasoning.
A generic row fails. Examples of failing reasons: "improve clarity", "polish", "fix path", or "make abstract conservation-first" without detailed logic.
Translation Package
When translation_package=zh, translate all required intermediate Markdown
artifacts and also produce:
translation_zh/writing_rationale_matrix.zh.md: complete row-by-row Chinese translation ofwriting_rationale_matrix.md; preserve the full table and row count.translation_zh/full_paper_translation.zh.md: complete Chinese translation of the final paper text, including title, abstract, section prose, captions, table notes, limitations, and conclusion. Preserve citation keys, labels, formulas, file paths, and raw numeric values.translation_zh/translation_coverage.md: row-by-row coverage of every source artifact and every final-paper section/caption/table note.
Partial translation is a failed audit.
References To Read As Needed
references/interactive-intake.mdfor config and wizard behavior.references/flash-pro-research.mdandreferences/scenario-*.mdfor target research.references/writing-rationale-matrix.mdfor detailed unit-by-unit planning.references/build-from-materials.mdfor from-zero construction.references/rewrite-matrix.mdandreferences/logic-transfer-audit.mdfor rewrite work.references/translation-package.mdfor complete Chinese translation output.
Scripts
Prefer bundled scripts over ad-hoc checks:
python scripts/intake_wizard.py --output-dir paper_rewriting_output
python scripts/material_inventory.py <materials_dir> --output-dir paper_rewriting_output
python scripts/artifact_check.py paper_rewriting_output --markdown --write
python scripts/latex_guard.py final_paper/main.tex --markdown
python scripts/word_guard.py final_paper/paper.docx --markdown
python scripts/revision_audit.py original.tex revised.tex --markdown