Paper Review Helper
Guide the reviewer through a structured review and produce a formal review response. The conversation runs in a local web UI, not in the terminal: you post each section there, the reviewer reads it rendered (math, figures, inline markers), chats, logs issues, and submits decisions on cards. You block on ask / wait until they respond.
Paths below are relative to this skill's directory. $S = scripts/review_ui.py, $T = scripts/tex_tools.py. Every command prints one JSON object; read it. Full CLI reference: references/ui-protocol.md.
Phase 1: Setup
- Locate paper from
$ARGUMENTS. PDF → create<paper-name>-review/, copy it in asoriginal.pdf. Folder → prefer.texover PDF. Nothing found →AskUserQuestionfor the path (the only terminal question you ask).
- PDF → LaTeX (if no
.tex): checkMATHPIX_APP_IDandMATHPIX_API_KEY. If set, runpython scripts/pdf2tex.py "<pdf>" "<paper-folder>"→<paper-folder>/<pdf_id>/<pdf_id>.texwithimages/. If missing, tell the reviewer once and work from the PDF text (figures not extractable).
- Start the UI:
python $S start --workspace <paper-folder>opens the browser and printsurl. Tell the reviewer the review happens there. If it fails (seeartifact/ui-server.log), fall back toAskUserQuestionfor every decision below.
- Outline: with
.tex,python $T outline <tex> --out artifact/outline.jsonthenpython $S meta --outline artifact/outline.json. Without,python $S meta --title "<title>" --sections "Abstract|Introduction|...".
Workspace:
<paper-folder>/
├── original.pdf, <pdf_id>/<pdf_id>.tex, <pdf_id>/images/ # sources
└── artifact/
├── outline.json # sections, line ranges, figures, skip flags
├── sections/NN-<slug>.md # what the reviewer sees, with markers
├── programs/ # math verification scripts
├── review-log.md # your log (format below)
├── issues-major.md, issues-minor.md, ui-transcript.md # written by `export`
├── REVIEW.md # final review
└── ui-state.json, ui-server.json, ui-server.log # UI runtime (do not edit)
Phase 2: Section-by-section
Loop over outline entries with "skip": false (appendix, supplement, references are skipped unless the reviewer asks). Use the outline id as the section id. For each:
- Extract:
python $T extract <tex> --id NN --out artifact/sections/NN-<slug>.mdgives rough Markdown (math kept,\cite→[cite: …], figures inline) plusNN-<slug>.md.figures.json. More than 5 paragraphs → split intoNNa,NNb, … by paragraph groups (subsections are already separate entries). Without.tex, write the Markdown yourself from the PDF text.
- Mark: read the file,
Editin inline markers (table below) where you see problems. Keep markers outside$…$. Log substantive findings:python $S issue --severity major|minor --section NN --location "para 2" --text "…".
- Post:
python $S section --id NN --title "<title>" --file artifact/sections/NN-<slug>.md --figures artifact/sections/NN-<slug>.md.figures.json --source "<tex> L<start>-<end>". Thenpython $S say --section NN --text "<2-3 sentences: what this section claims and what to look at>".
- Ask (blocks until the reviewer acts; run with a long Bash timeout such as 1800000 ms):
```bash
python $S ask --section NN --prompt "Questions or concerns about this section? Rate its clarity when you are done." --options "Clear|Somewhat unclear|Confusing" --text-label "Questions / concerns" --timeout 1500
```
Act on status:
message→ the reviewer chatted. Answer it: citations →WebSearch(DOI, authors, title); background →WebSearch/WebFetch; math → write a script toartifact/programs/, run it; figures → readimages/or use/vision. Reply withpython $S say --section NN --file reply.md(or--text), thenpython $S wait --id <question_id> --timeout 1500. Repeat.pending→python $S wait --id <question_id> --timeout 1500again.answered→answer.choiceis the clarity rating,answer.textthe closing remarks. If the remarks ask something, answer withsaybefore moving on.- Every result carries
issues: what the reviewer logged in the UI. Acknowledge, do not re-log.
- Log to
artifact/review-log.md, then continue with the next section.
## [Section] - [Timestamp]
### Clarity
Clear / Somewhat unclear / Confusing
### Reviewer Questions
- Q: … / A: …
### Issues Identified
- [MAJOR] … / [MINOR] …
### Tools Used
- WebSearch: "query" → finding
Classify: major = methodology flaws, unsupported claims, logical errors; minor = grammar, typos, unclear wording.
Phase 3: Decision and review
- Decision card: write
artifact/decision-summary.md(issue counts frompython $S issues, the major issues, the sections rated unclear) and post it:python $S section --id decision --title "Decision" --file artifact/decision-summary.md. Then ask with a form (copyreferences/decision-fields.jsontoartifact/):
```bash
python $S ask --section decision --prompt "Your overall decision." --fields artifact/decision-fields.json --timeout 1500
```
answer.values → recommendation, journal, editor_questions, comments.
- Export:
python $S exportwritesissues-major.md,issues-minor.md,ui-transcript.md.
- Write
artifact/REVIEW.md(template below), post it as--id review --title "Draft review", then:
```bash
python $S ask --section review --prompt "Approve this review or request changes." --options "Approve|Request changes" --text-label "What to change" --timeout 1500
```
On "Request changes", revise, re-post the same id, ask again.
python $S stop. Tell the reviewer whereREVIEW.mdis.
# Review of [Paper Title]
## Summary
[1-2 sentences]
## Overall Recommendation
[Reviewer's decision + justification]
## Major Issues
1. **Issue**: [description]
- **Location**: Section X, paragraph Y / Equation N
- **Impact**: [why this matters]
- **Suggestion**: [fix, or note if unfixable]
## Minor Issues
[Grouped by type: grammar, clarity, formatting]
## Reviewer Misunderstandings Analysis
[For each confusion during review:]
- **Confusion**: [what]
- **Cause**: paper vagueness / reader knowledge gap
- **Recommendation**: [should the paper clarify?]
## Constructive Feedback
[Positives + specific improvements]
## Editor Questions Response
[If provided]
Inline markers
Write these into the section Markdown; the UI renders them as colored badges the reviewer can click to log an issue.
| Marker | Meaning | Default severity |
|--------|---------|------------------|
| [G: …] | grammar error | minor |
| [C: …] | clarity issue | minor |
| [?] or [?: …] | ambiguous / unsupported claim | major |
| [REF?] or [REF?: …] | missing or questionable citation | major |
| [EQ?] or [EQ?: …] | equation to verify (place after the $$ block) | major |
Resuming
start on an existing workspace resumes its state (sections, chat, issues). Check python $S status, read artifact/review-log.md, and continue from the first section not marked done.