| name | prose-writer |
| description | Write `output/DRAFT.md` (or `output/SNAPSHOT.md`) from an approved outline and evidence packs, using only verified citation keys from `citations/ref.bib`. **Trigger**: write draft, prose writer, snapshot, survey writing, 写综述, 生成草稿, section-by-section drafting. **Use when**: structure is approved (`DECISIONS.md` has `Approve C2`) and evidence packs exist (`outline/subsection_briefs.jsonl`, `outline/evidence_drafts.jsonl`). **Skip if**: approvals are missing, or evidence packs are incomplete / scaffolded (missing-fields, TODO markers). **Network**: none. **Guardrail**: do not invent facts or citations; only cite keys present in `citations/ref.bib`; avoid pipeline-jargon leakage in final prose. |
Prose Writer (Evidence-first)
Goal: produce a survey draft that reads like a real paper because it is driven by evidence packs, not by outline placeholders.
This skill should behave like a synthesis engine:
- inputs = subsection briefs + evidence drafts
- output = paragraph-level claim → evidence → synthesis (with citations)
Non-negotiables
- No prose without approval: for surveys, require
Approve C2inDECISIONS.md. - No invented citations: only use keys present in
citations/ref.bib. - No placeholder leakage: if any upstream artifact still contains scaffold markers/ellipsis/TODO, do not write; block and request evidence fixes.
- No pipeline voice: do not leak internal scaffolding terms like “working claim”, “enumerate 2-4”, “scope/design space/evaluation practice”.
Inputs
outline/outline.ymloutline/subsection_briefs.jsonloutline/transitions.mdoutline/evidence_drafts.jsonl- Optional:
outline/tables.md,outline/timeline.md,outline/figures.md - Optional:
outline/claim_evidence_matrix.md citations/ref.bibDECISIONS.md
Outputs
output/DRAFT.mdand/oroutput/SNAPSHOT.md
Decision: snapshot vs draft
- Snapshot: bullets-first, ~1 page; summarize what evidence exists + what is missing.
- Draft: section-by-section prose that follows each subsection’s
paragraph_planand uses paragraph-level citations.
Workflow (v3: planner↔writer, section-by-section)
Before writing, load the structural and coherence inputs: outline/outline.yml (section order) and outline/transitions.md (transition map). Optionally consult outline/claim_evidence_matrix.md as an evidence index.
Gate check (HITL)
- Read
DECISIONS.md. - If
Approve C2is not ticked, write a short request block (what you plan to write + which evidence packs you will rely on), then stop.
- Read
Input integrity check (fail fast)
- Read
outline/subsection_briefs.jsonland confirm every H3 has a brief and the following fields are filled and non-placeholder:scope_rule,rq,axes,clusters,paragraph_plan. - Read
outline/evidence_drafts.jsonland confirm every H3 has an evidence pack with:blocking_missingempty,evidence_snippetsnon-empty,concrete_comparisons>= 3.
- Read
Planner pass (NO PROSE YET)
- For each H3 subsection, read its brief + evidence pack and decide:
- Thesis: 1 sentence that is true for this subsection and would be false in other subsections.
- Two contrasts: 2 sentences of the form “A vs B” where each side is grounded in specific cited works (not “they differ”).
- One limitation/failure mode: 1 sentence grounded in the evidence pack’s
failures_limitationsor snippet provenance. - Cite placement: which citations will appear in which paragraph (so citations are evidence, not decoration).
- If you cannot do this without guessing, stop and push the gap upstream (strengthen briefs/notes/evidence packs) rather than writing template prose.
- For each H3 subsection, read its brief + evidence pack and decide:
Writer pass (write per subsection; avoid global dump)
- Write 2–3 paragraphs per H3 following
paragraph_plan. - Keep prose natural, but make every paragraph an argument: claim → cited evidence → synthesis.
- Evidence note placement: if the run is abstract-only, put a single short evidence note once (e.g., in the introduction or an “Evidence note” subsection). Do not repeat the same “abstract-only” disclaimer sentence in every H3; only mention verification needs when they are subsection-specific.
- Enforce
scope_rulestrictly to prevent silent drift; if you include an out-of-scope paper as a bridge, justify it once and keep it secondary.
- Write 2–3 paragraphs per H3 following
Weave transitions (coherence)
- Between adjacent subsections/sections, add 1–2 transition sentences that reflect the taxonomy logic (not generic “Moreover/However”).
Integrate cross-cutting artifacts
- Insert
outline/tables.md(>=2 tables),outline/timeline.md(>=8 cited milestones), andoutline/figures.md(>=2 specs) into the draft. - Prefer referencing tables in prose over restating an identical “axes list” sentence in every subsection.
- Insert
Self-check + revise (hard fail signals)
- If the draft contains
..., unicode ellipsis…, scaffold phrases (e.g., “enumerate 2-4 …”), or repeated boilerplate sentences, treat it as a pipeline failure signal and rewrite. - If tables contain truncation or instruction-like text, regenerate them upstream (C4) rather than patching them into the prose.
- If the draft contains
Anti-template bans (hard fail)
Do not emit any of the following in final prose (rewrite upstream instead):
- “Scope and definitions … / Design space … / Evaluation practice …”
- “enumerate 2-4 …”
- “We use the following working claim …”
- “Across representative works, the dominant trade-offs …”
- “A useful way to compare approaches is …”
- “abstracts are treated as verification targets …”
- “The main axes we track are …”
Quality checklist
- No
…,TODO,(placeholder), or<!-- SCAFFOLD -->remains inoutput/DRAFT.md. - Every subsection has citations and at least one paragraph with >=2 citations (cross-paper synthesis).
- No undefined citation keys (all keys exist in
citations/ref.bib). - Scope is consistent with
GOAL.mdandscope_rule.
Helper script (bootstrap)
The helper script is a gate wrapper: it blocks until approvals + prerequisites are satisfied and a real output/DRAFT.md exists (no scaffold markers). Writing itself is LLM-driven.
Quick Start
python .codex/skills/prose-writer/scripts/run.py --helppython .codex/skills/prose-writer/scripts/run.py --workspace <workspace_dir>
All Options
- See
--help.
Examples
- Run the gate wrapper after approval (it will block until
output/DRAFT.mdis written):- Tick
Approve C2inDECISIONS.mdthen run: python .codex/skills/prose-writer/scripts/run.py --workspace workspaces/<ws>
- Tick
Troubleshooting
Issue: writer outputs ellipsis / scaffold text
Symptom: output/DRAFT.md contains …, enumerate 2-4 ..., or repeats the same paragraph template.
Causes:
outline/subsection_briefs.jsonlis missing or generic.outline/evidence_drafts.jsonlhasblocking_missingor scaffold markers.
Solutions:
- Fix upstream: regenerate briefs/evidence packs, enrich abstracts/fulltext, and block writing until evidence is concrete.
Issue: scope drift (e.g., T2I vs T2V)
Symptom: subsections cite many out-of-scope papers without justification.
Solutions:
- Tighten
scope_rulein subsection briefs and rerun evidence packs. - Tighten
queries.mdexcludes and rerun retrieval/dedupe/mapping.