/spark-to-paper:ts-paper-reviewfrom spark-to-paper
Runs an adversarial peer-review pass on a ts-paper draft to surface weaknesses before finalization. Operates as stage 5 of the ts-paper suite via isolated domain reviewers, merge/dedupe, and a skeptic refutation loop.
Ships in spark-to-paper. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Stage 5 of the ts-paper suite — runs by default after refine, before figure.
The rest of the suite is forward-only: it drafts, then polishes. Nothing argues against the paper the
way a reviewer will. This stage does — a lean version of PaperJury's courtroom engine. It runs by
default as stage 5; skip only on explicit user request for a quick/no-review draft, recorded in
logs/0_route.io.md. It is cost-tiered (it costs extra passes), so tune how heavy it runs, not whether.
ts-paper-refine (before ts-paper-figure/ts-paper-latex) as the
pre-finalization hardening pass, or whenever the user says review / critique / 审稿 / 评审 / harden /
"pick it apart".logs/0_route.io.md), or when the user just wants a single asked-for edit (that is the refine / write
stage). This is not an official-venue rebuttal and not a from-scratch drafter.The algorithm is engine-independent — it runs identically on any of the three execution tiers in "How to run it". Describe it once; the tier changes only HOW issues are produced, never the algorithm or the output. It implements, in order:
close_criterion.raised_by lists every source, carrying its evidence_quote through unchanged; and drop any
candidate that lacks a usable close_criterion into dropped_no_criterion (it is not actionable).refutedCount < ceil(N_angles/2) survives). Bias to keep —
the human gate catches residual noise. This filters plausible-but-wrong issues.dryStop consecutive dry passes, capped by maxRounds (budget-aware).The issue object (identical across all tiers): { severity: blocker|major|minor|nit, section, summary, evidence_quote (EXACT verbatim — "cannot quote ⇒ do not file"), close_criterion, raised_by[] };
after the loop each is sorted by severity (blocker<major<minor<nit) and assigned a final id I-NN.
Returns { issues, refuted, dropped_no_criterion, rounds_run, per_round }.
Invariant: the chosen execution tier changes only HOW issues are produced, never WHICH algorithm or
WHAT output. Every tier emits this exact structure and the same logs/5_review.io.md.
resultsMode)Assemble the paper text. Concatenate sections/*.tex (+ abstract) into one readable blob (strip
pure-LaTeX noise; keep section headings + prose + table/figure captions). This is paperText.
Select the execution tier, then run the algorithm on it. Look at the tools you actually have and
use the highest tier whose tool is available; Tier 3 is the universal floor and always works. The
knobs are the same algorithm params on every tier: lean default maxRounds:2, dryStop:1, verify:true;
cheapest maxRounds:1, verify:false; thorough maxRounds:4, dryStop:2. venueProfile and
resultsMode come from template.json (e.g. "Traitement du Signal journal — rigor, well-read, signal
processing"; proposal|data_aware).
Workflow tool is available): true parallel reviewer isolation —
the gold reference.
Workflow({ scriptPath: "scripts/review_panel.workflow.js", args: {
paperText: "<assembled text>", venueProfile: "<…>", resultsMode: "<proposal|data_aware>",
maxRounds: 2, dryStop: 1, verify: true }})
Task/
Agent tool; this is the normal path at "max tier", and it has the SAME quality as Tier 1
because each subagent is a separate context = true isolation). Per round: (a) spawn the N reviewer
subagents in one message (parallel) — each prompt = the gatekeeper core + its one lens +
venueProfile + the mode note + the isolation rule + the inlined paperText + "return your
ISSUE_TABLE as JSON"; a fresh subagent literally cannot see peers or prior rounds. (b) You merge
the tables in-context (a single reasoning op — no isolation needed) → the round's candidates. (c) For
each candidate, spawn the 3 angle-verifier subagents in parallel (each prompt = one angle +
the issue fields + the inlined paperText + "return VERIFY JSON: {refuted, angle, reason}");
apply the same majority-refute rule. (d) Same dry/round bookkeeping, same sort + I-NN ids, same
return object.evidence_quote copied from the paper, no quote ⇒ not
filed; (iii) write that lens's full ISSUE_TABLE before starting the next. ONLY after all N lenses:
merge/dedupe, then adversarial-verify each candidate by genuinely arguing each of the 3 angles as
a skeptic trying to REFUTE (not confirm) and applying the majority rule. loop-until-dry by
consciously restarting each round from the paper (use the running seen set only to suppress
duplicates at merge). Emit the identical issue structure + 5_review.io.md. Honest note: Tier
3's simulated isolation is a real floor but not equal to Tier 1/2's separate contexts — prefer Tier
2 whenever a subagent tool exists (it almost always does, including "max tier").Triage the returned issues (you, the orchestrator) into three buckets — this is the three-way
verdict, done in-context rather than via a heavy trial:
blocker/major/cheap minor with a clear close_criterion): hand to ts-paper-refine
to edit the named section so it satisfies the close_criterion — a minimal patch, binding strictly
to that one criterion; do not over-rewrite.Re-gate — AFTER the fixes actually land on disk (derive "green", never forecast it). Once every
fix-now edit is written, re-run ../ts-paper-write/scripts/draft_lint.py <workdir> +
../ts-paper-cite/scripts/citations_lint.py <workdir> and capture each linter's JSON (ok,n) plus
a real wall-clock stamp (date -u). A fix must not break a shape contract, a word band, a citation,
or notation completeness — draft_lint now flags notation_incomplete (a symbol added to an
equation by a fix, like a new \psi, must get a notation row or be renamed to a defined symbol).
Do not proceed on a nonzero exit. In data_aware mode the number-audit re-runs too. The 'OUTPUT /
re-gated green' block of the log may be written ONLY now — quoting the captured JSON + timestamp as
evidence; a re-gate whose timestamp pre-dates the edited sections/*.tex is invalid by construction
(this is the lean, ledger-free analogue of PaperJury computing "closed" from applied+stamped state,
never narrating it ahead of the work).
(Optional) re-review for a thorough pass: re-run the workflow on the edited paper until a clean
round (the workflow's own loop already does this within a run; a fresh invocation re-reviews the
post-fix draft). Stop when no surviving major remains.
No durable cross-session ledger, no full trial/jury/12-juror escalation, no recall-audit, no clerk, no docx intake, no auto-mode. Those are PaperJury's heavyweight machinery for iterating a real manuscript over many human rounds; for a single generation run the lean panel + verify is enough. (If you ever want the full courtroom, PaperJury itself is the tool.)
Write logs/5_review.io.md (linked from logs/index.md). The log must mirror real state, not forecast
it — DECISIONS may be written as the panel returns, but OUTPUT only after step 4 (above).
severity/section/evidence_quote/ close_criterion) plus the orchestrator's id and verdict-bucket: id | severity | section | evidence_quote (the EXACT verbatim quote each reviewer filed — this is the anti-skim proof; an issue
with no quote should never have been filed) | close_criterion | verdict-bucket (fix-now / author-
required / drop) | what the fix changed; plus a header line with rounds_run and refuted /
dropped_no_criterion counts (the workflow returns all of these). Each fix-now row is closed only by
citing the landed post-fix snippet that satisfies its close_criterion.draft_lint
ok/n, citations_lint ok/n) + the date -u timestamp from step 4, and any author-required items.
The DECISIONS/OUTPUT contract is identical across tiers — only the recorded tier differs.What SKILL.md sets; muted values are Claude Code's defaults
14 skills in this plugin
/ts-figure-optimizeThe suite's SOLE figure vectorizer: turn ONE raster scientific figure (a PNG/JPG, e.g. a gpt-image-2 schematic) into an editable, publication-ready figure via DrawAI's **key-free HYBRID** — local perception (SAM3 region detection + PaddleOCR + Box-IR layout, no account) then a deterministic hybrid build that keeps the approved render **pixel-exact** (a whole-canvas raster) and lays an **editable <text> overlay** on top (~0.91 SSIM), exported as a self-contained SVG + vector PDF + an editable PPTX. The render's full richness is preserved EXACTLY (it IS the approved image) while every label becomes editable. The original raster is always kept. Hybrid is the ONLY mode used: there is no Codex full-vector redraw (legacy/off — it needs an account, and a redraw of a dense figure loses fidelity) and no Claude-redraw fallback. If this runtime cannot be provisioned, the caller keeps the approved PNG as-is — never a lossy redraw. Independent of the paper pipeline — give it any figure image.
/ts-figure-svgPaperBanana+ — turn a paper's figure brief into a native, editable, publication-grade SVG. Stage 1 runs the OFFICIAL PaperBanana (dwzhu-pku/PaperBanana, pulled by `setup_paperbanana.py`, its own Retriever→Planner→Stylist→Visualizer→Critic pipeline) to produce candidate PNGs. Stage 2 is the "+": Claude LOOKS at the chosen PNG, extracts its DESIGN LANGUAGE (palette, type scale, spacing, idiom) into a style sheet, then redraws the figure FROM THE PAPER'S FACTS as real <rect>/<path>/<text> objects — never tracing pixels, never embedding the PNG. Stage 3 is a measured repair loop: `audit_svg.py` (stdlib, no renderer needed) catches overflow, text-on-text, icons cutting labels, stroke-scaled and canvas-clipped arrowheads, dangling connectors, sub-legible type, font-fallback glyphs, CSS-cascade colour traps and traced path-soup; ≥4 rounds, no upper bound while defects remain. Ends on a vector PDF verified on the real compiled page. Use when a figure must be editable and correct, not merely pretty.
Generated from the plugin's indexed repository (spark-to-paper-skills/spark-to-paper-skills) — no native marketplace selected
npx claudepluginhub p/spark-to-paper-skills-spark-to-paperOther plugins' skills for the same job