← スキル一覧に戻る
name: section-merger
description: |
Deterministically merge per-section files under

section-merger
by WILLOSCAR
section-mergerは、other分野における実用的なスキルです。複雑な課題への対応力を強化し、業務効率と成果の質を改善します。
⭐ 83🍴 10📅 2026年1月24日
SKILL.md
name: section-merger
description: |
Deterministically merge per-section files under sections/ into output/DRAFT.md, preserving outline order and weaving transitions from outline/transitions.md.
Trigger: merge sections, merge draft, combine section files, sections/ -> output/DRAFT.md, 合并小节, 拼接草稿.
Use when: you have per-unit prose files under sections/ and want a single output/DRAFT.md for polishing/review/LaTeX.
Skip if: section files are missing or still contain scaffolding markers (fix subsection-writer first).
Network: none.
Guardrail: deterministic merge only (no new facts/citations); preserve section order from outline/outline.yml.
Section Merger
Goal: assemble a paper-like output/DRAFT.md from:
sections/(per-section/per-subsection prose)outline/transitions.md(short hand-offs; generated bytransition-weaver)- By default,
section-mergerinserts only within-chapter H3→H3 transitions (keeps flow without adding narrator paragraphs between chapters). - Optional: if you want between-H2 transitions inserted too, create
outline/transitions.insert_h2.okin the workspace. - Format contract: only lines matching
- 3.1 → 3.2: <text>are injected by default (within-chapter H3 → next H3); keep<text>as one sentence. - Treat transitions as injected draft text: run
post-merge-voice-gateafter merging, and route fixes back tooutline/transitions.md(do not patch the merged draft). - Keep transitions paper-like (argument bridges), not title narration (avoid "From X to Y" / "Now we turn to").
- If transitions feel templated, fix
outline/subsection_briefs.jsonl(bridge_terms/contrast_hook) and regenerate viatransition-weaver.
- By default,
Evidence-first visuals (outline/tables.md, outline/timeline.md, outline/figures.md) are intermediate artifacts by default. If you want them in the final PDF, weave them into the relevant prose sections intentionally (instead of auto-injecting them as top-level ToC chapters).
This skill is deterministic: it does not rewrite content or invent prose; it only merges already-generated content.
Inputs
outline/outline.yml(drives section/subsection order)outline/transitions.md(required; generated bytransition-weaver)- Optional (diagnostics):
sections/sections_manifest.jsonl - Optional context:
GOAL.md
Outputs
output/DRAFT.mdoutput/MERGE_REPORT.md
Workflow (deterministic)
- Read
GOAL.md(if present) and use its first non-heading line as the draft title. - Read
outline/outline.ymlto determine the expected section/subsection order. - Merge the per-unit files under
sections/. - Insert transitions from
outline/transitions.md(within-chapter H3→H3 by default; between-H2 only ifoutline/transitions.insert_h2.okexists). - Write
output/DRAFT.mdand a deterministicoutput/MERGE_REPORT.md(missing files, ordering).
Script
Quick Start
python .codex/skills/section-merger/scripts/run.py --helppython .codex/skills/section-merger/scripts/run.py --workspace workspaces/<ws>
All Options
--workspace <dir>: workspace root--unit-id <U###>: unit id (optional; for logs)--inputs <semicolon-separated>: override inputs (rare; prefer defaults)--outputs <semicolon-separated>: override outputs (rare; prefer defaults)--checkpoint <C#>: checkpoint id (optional; for logs)
Examples
- Standard merge (outline + transitions + section files):
python .codex/skills/section-merger/scripts/run.py --workspace workspaces/<ws>
Troubleshooting
Issue: merge report says a subsection file is missing
Likely cause:
- A required
sections/*.mdfile has not been written yet (checksections/sections_manifest.jsonlif present to see which units exist).
Fix:
- Write the missing units under
sections/(typically viasubsection-writer) and rerun merge.
スコア
総合スコア
70/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
3ヶ月以内に更新
+5
✓フォーク
10回以上フォークされている
+5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
レビュー
💬
レビュー機能は近日公開予定です

