$npx -y skills add WILLOSCAR/research-units-pipeline-skills --skill paragraph-curatorDeterministically compact final H3 bodies to the active delivery profile's paragraph budget without deleting prose or changing citation-block order. Trigger: paragraph compaction, paragraph budget, compact H3, 段落压缩, 段落预算. Use when: H3 section files have passed logic polis
| 1 | # Paragraph Curator |
| 2 | |
| 3 | Compact paragraph boundaries without performing a new semantic rewrite. |
| 4 | |
| 5 | This is a deterministic convergence step. It prevents a long drafting loop from |
| 6 | leaving sections outside the delivery profile, while keeping the original prose |
| 7 | and evidence recoverable. It does not rank paragraphs, generate alternatives, |
| 8 | replace evidence, or decide which claims are important. |
| 9 | |
| 10 | ## Inputs |
| 11 | |
| 12 | - `sections/S<subsection-id>.md` |
| 13 | - `queries.md` for `draft_profile` |
| 14 | - upstream logic and writer reports for operator context |
| 15 | |
| 16 | Only H3 files are modified. Front matter (`S1.md`, `S2.md`), H2 lead files, and |
| 17 | global sections are not touched. |
| 18 | |
| 19 | ## Profile Contract |
| 20 | |
| 21 | | Profile | Paragraphs per H3 | |
| 22 | |---|---:| |
| 23 | | `course_paper` | 5-7 | |
| 24 | | `survey` | 10-12 | |
| 25 | | `deep` | 11-13 | |
| 26 | |
| 27 | The script first joins short adjacent body paragraphs while respecting the |
| 28 | profile floor. If a section remains over budget, it repeatedly joins the |
| 29 | shortest eligible adjacent pair. It never truncates a paragraph or drops a |
| 30 | middle block. |
| 31 | |
| 32 | ## Outputs |
| 33 | |
| 34 | - updated H3 files under `sections/` |
| 35 | - `output/PARAGRAPH_CURATION_REPORT.md` |
| 36 | - `sections/paragraphs_curated.refined.ok` on PASS |
| 37 | |
| 38 | The report records the active profile and before/after paragraph counts for |
| 39 | each H3. PASS requires every H3 to be within budget and the sequence of |
| 40 | citation blocks to be unchanged. On FAIL, the marker is removed. |
| 41 | |
| 42 | ## Boundaries |
| 43 | |
| 44 | - If an H3 is below the floor, route to `subsection-writer` or the relevant |
| 45 | evidence unit. Compaction must not invent padding. |
| 46 | - If prose is repetitive or logically weak, route to `writer-selfloop` or |
| 47 | `section-logic-polisher`. This Skill changes paragraph boundaries, not ideas. |
| 48 | - Run `argument-selfloop` after this Skill so the argument ledger and section |
| 49 | manifest describe the final section content. |
| 50 | |
| 51 | ## Run |
| 52 | |
| 53 | ```bash |
| 54 | uv run python .codex/skills/paragraph-curator/scripts/run.py \ |
| 55 | --workspace workspaces/<name> |
| 56 | ``` |
| 57 | |
| 58 | Optional runner fields are `--unit-id`, `--inputs`, `--outputs`, and |
| 59 | `--checkpoint`. |