sv-paper
Skill8 starsChanged 2 months agoApache-2.0View on GitHub
Draft the full academic paper for a SocioVerse2 study — abstract/intro/related work/methods/results/discussion — from the study's own artifacts (report, DuckDB trajectory, grounding, literature). Writes paper/paper.md for the dashboard's Paper tab. Use after sv-report. REQUIRES a literature survey: if literature/literature.json is missing, run /sv-lit first and finish it before drafting.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- paper-search-proSkill
- research-paper-writingSkill
- sv-build-environmentSkill
- sv-build-modelSkill
- sv-build-populationSkill
- sv-initSkill
- sv-iterateSkill
- sv-litSkill
- sv-reportSkill
- sv-runSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 55
Stale survey → refresh it: If literature.json predates the current study.yaml (the research question moved since the survey), re-enter …
- Very specific: line 93
Existence is a hard gate: Every ! must resolve to a real file in reports/figures/ or paper/figures/.
- Very specific: line 121
Every key must exist in references.bib — grep for it before you write the sentence, and drop the claim rather than invent the support.
- Very specific: line 127
Never cite a key that is not in references.bib.
- Very specific: line 160
Write clean markdown: pipe tables and !
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
sv-paper — draft the paper (from study to paper)
Turn a completed study into a submission-shaped draft. The paper is evidence-bound: every number in it must be traceable to the study's own data.
Two layers — read this first
This skill owns what goes in the paper (which artifacts, which numbers, which figures,
where the file lives). It does NOT own how the prose reads. That is the vendored
research-paper-writing skill (.claude/skills/research-paper-writing/, MIT, from
Master-cai/Research-Paper-Writing-Skills — see its VENDOR.md).
Load it before you write a word of prose, and load only the section guide you need right now (its own rule — loading all six at once blows the context for no gain):
| writing this section | load |
| Abstract | .claude/skills/research-paper-writing/references/abstract.md |
| Introduction | .claude/skills/research-paper-writing/references/introduction.md |
| Related Work | .claude/skills/research-paper-writing/references/related-work.md |
| Methods | .claude/skills/research-paper-writing/references/method.md |
| Results / Experiments | .claude/skills/research-paper-writing/references/experiments.md |
| Conclusion | .claude/skills/research-paper-writing/references/conclusion.md |
| final self-review | .claude/skills/research-paper-writing/references/paper-review.md |
Its vocabulary is ML/CV-flavored; the translation for a SocioVerse2 study is one-to-one:
- "Method" = B = f(P, E) made concrete — P (population bundle), E (environment bundle), f (the decision protocol), and the metric definitions. Its rule "each subsection states motivation → design → technical advantage" maps onto "why this population/ environment/decision rule is the right one for the research question".
- "Experiments" = the longitudinal run(s): the trajectory, the intervention windows, the forked counterfactual versions. Its baseline/ablation framing maps onto version comparison (v1 factual vs v2 counterfactual, scripted-f vs LLM-f).
- "claim-evidence alignment" is not optional here — it is the same rule as this skill's no-invented-numbers contract, just stated from the reviewer's side.
Two of its habits are worth naming because they are exactly what a simulation paper gets wrong: one paragraph = one message with the message in the first sentence, and reverse outlining after each section (write down the thesis, then each paragraph's topic sentence, then check every paragraph maps to the thesis — cut what doesn't).
Literature gate — run BEFORE anything else, no exceptions
If literature/literature.json does not exist, run /sv-lit first and finish it.
Not "suggest it", not "offer to" — run it, then come back and draft. A paper whose
Related Work was written from the model's memory is the exact artifact this pipeline
exists to prevent: the citations look right, the bibkeys resolve to nothing, and the
positioning claims ("unlike prior work, we…") are unfalsifiable.
Two follow-on rules:
- Stale survey → refresh it. If
literature.jsonpredates the currentstudy.yaml(the research question moved since the survey), re-enter/sv-litwith queries derived from the current question rather than writing against a survey of a different study. - The only way to skip is an explicit user instruction in this conversation ("skip the literature, just give me a draft first"). Then say so in the draft — one line under Related Work stating that the section is unsourced — instead of quietly shipping a paper that looks referenced and is not.
Strict contract
- Read
study.yaml,reports/report.md(+reports/figures/),trajectory/study.duckdb(query for exact values),grounding/grounding.json,literature/literature.json+references.bib(guaranteed present by the gate above). - Write
paper/paper.md(+paper/paper.json:{"title", "language", "updated_at"}). - No invented numbers, no invented citations. Quantitative claims come from the DuckDB
store / report; citations come ONLY from
references.bibbibkeys or grounding sources.
Outline gate (before writing)
Unless the user already specified a structure, confirm the skeleton first via a quick AskUserQuestion (this is a taste decision, not yours to assume): the standard empirical structure (Abstract / Introduction / Related Work / Methods / Results / Discussion / Conclusion) vs expanding along the report's storyline vs a user-defined structure. Also confirm the LANGUAGE (default = the language the user has been speaking; a Chinese paper with Chinese section names plus an English Abstract is a common combination, so ask).
Writing rules
# titleonce, then##numbered sections (the dashboard outline nav reads#/##).- Methods = B = f(P, E) made explicit: P from
population.json(size, stratification, real-data alignment), E fromenvironment.json(layers, events, broadcasts), the decision protocol fromsimulation.json, metrics with their definitions fromstudy.yaml. - Results re-derive from data, not vibes: pull exact values with SQL from
trajectory/study.duckdb; reference figures with. Reuse the report's findings but WRITE UP, don't copy-paste: a paper argues, a report presents.
Figures — cite only what exists; draw what you need
The #1 real-world failure of this stage is a paper citing figures that are not on disk.
Two known traps: after /sv-iterate the live reports/ was WIPED and rebuilt (an earlier
version's figure now exists only in its versions/vN/ snapshot), and it is easy to "remember"
a figure into existence while writing. The rules:
- Existence is a hard gate. Every
must resolve to a real file inreports/figures/orpaper/figures/. Before presenting, run the audit and make it clean:from skills import sv_paper sv_paper.check("studies/<id>") # must end True — else draw or drop each MISS - A needed figure that doesn't exist → draw it NOW from the CURRENT trajectory (this is
expected and encouraged — the paper may well want views the report never rendered:
a cohort breakdown, a zoom on the intervention window, a two-metric scatter):
The dashboard and the Word/LaTeX export (hosted, or the pandoc command under Export) resolvefrom skills import sv_paper plt = sv_paper.mpl_setup() # headless + CJK fonts preconfigured import duckdb con = duckdb.connect("studies/<id>/trajectory/study.duckdb", read_only=True) # ... query panel/metrics, plot ... plt.savefig(sv_paper.fig_dir("studies/<id>") / "<name>.png") # → paper/figures/figures/<name>against BOTHreports/figures/andpaper/figures/— no other wiring needed. - Never copy a figure out of a
versions/vN/snapshot to depict the current version — it renders THAT version's data. The one legitimate case: a section that explicitly discusses that historical version (e.g. factual v1 vs counterfactual v2) may use its snapshot figure, copied intopaper/figures/and clearly labeled with the version in the caption/alt text. - Revision requests can add visualizations at any time — same recipe, then cite the new file. Delete a reference rather than ship it dangling.
- Related Work: 1–2 paragraphs organized by the literature themes; cite as
[bibkey](e.g.[zhang2019cafeteria]); position this study against the closest empirical work. Every key must exist inreferences.bib— grep for it before you write the sentence, and drop the claim rather than invent the support. - Discussion must carry the honesty section: simulation-not-survey caveat, LLM-agent behavioral validity, and the declared assumptions from grounding (name the stylized / proxy anchors). Limitations that the grounding sidecar declares are not optional to mention.
- References section: list the cited bibkeys in readable form (author, year, title, venue).
Never cite a key that is not in
references.bib. - Length: substantial but tight — typically 1,500–3,000 words.
Self-review before presenting (not optional)
Load .claude/skills/research-paper-writing/references/paper-review.md and run its adversarial pass over
the finished draft — read as a skeptical reviewer across contribution / clarity / experimental
strength / evaluation completeness / method soundness, and fix what it surfaces before you
show the user, don't hand them a list of known problems.
Produce a claim–evidence map for every headline claim, in that skill's format:
Claim: <the sentence as it appears in the Abstract/Intro>
Evidence: <the exact figure/table/SQL result it rests on>
Status: supported | needs evidenceAnything that lands on needs evidence gets weakened or cut — a simulation paper that
overclaims is the single most common reason this stage produces something unusable.
Pause & confirm (terminal stage)
Present: the outline actually written, the 2–3 headline claims with their claim–evidence
map, the figure manifest (each cited figure: pre-existing from the report vs newly drawn
this pass — and confirm the sv_paper.check audit passed), and where the draft lives
(paper/paper.md, visible in the dashboard's Paper tab). Then stop.
Section-level revision requests ("rewrite the Discussion section, strengthen the mechanism explanation") edit paper/paper.md in place —
on the hosted workbench they can come from the Paper tab's per-section rewrite buttons; in the local
dashboard there are no such buttons, so the user asks you in the session —
load that section's guide from .claude/skills/research-paper-writing/references/ first, rewrite
paragraph-by-paragraph, then re-run the reverse outline on the section you touched. Update
paper/paper.json.updated_at each time.
Export
Write clean markdown: pipe tables and  convert cleanly. On the hosted workbench
the Paper tab exports Word/LaTeX (pandoc, server-side). The local dashboard has no export button;
when the user wants a file, give them the pandoc command (pandoc must be installed; run it from
the study directory so figures/<name> resolves against paper/figures/ and reports/figures/):
cd studies/<study_id>
pandoc paper/paper.md -o paper.docx --resource-path=paper:reports # Word
pandoc paper/paper.md -s -o paper.tex --resource-path=paper:reports --extract-media=paper_media # LaTeX + its figuresDashboard narrative (optional, non-blocking — L2)
python3 dashboard/hooks/sv_emit.py narrative --study <study_id> --stage sv-paper \
--text "Drafted the paper: 7 sections, 3 figures, 9 references; headline claim = ..."Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

