본문으로 건너뛰기
cccskills
무료GitHub에 공개

section-merger

Deterministically merge the final fingerprinted section snapshot into `output/DRAFT.md`, preserving outline order and inserting transitions only when explicitly enabled.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md4.2 KB
  • scripts/run.py13.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Section Merger

Triggers & routing

  • 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.

Goal: assemble a paper-like output/DRAFT.md from:

  • sections/ (per-section/per-subsection prose)
  • outline/transitions.md (optional hand-off suggestions; generated by transition-weaver)
  • outline/tables_appendix.md (reader-facing Appendix tables; generated by appendix-table-writer)

Merge order is driven by outline/outline.yml. The draft title is derived from GOAL.md when present. When sections/sections_manifest.jsonl is supplied by the Pipeline contract, every merged section must match its recorded bytes and SHA-256 hash.

This skill is deterministic: it does not rewrite content or invent prose; it only merges already-generated artifacts.

Transitions (explicit opt-in)

  • By default, generated transitions are not inserted.
  • To insert H3 transitions, create outline/transitions.insert_h3.ok.
  • To insert H2 transitions, create outline/transitions.insert_h2.ok.
  • Format contract: H3 entries use - 3.1 -> 3.2: <text>.
  • Compatibility: → is accepted, but -> is the preferred contract (avoids control-character encoding issues).
  • Treat transitions as injected draft text: run post-merge-voice-gate after merging, and route fixes back to outline/transitions.md (do not patch the merged draft).

Tables (two layers)

This pipeline uses two table layers:

  • outline/tables_index.md (internal index; produced by table-filler)

    • planning/debugging artifact
    • should NOT be inserted into the paper
  • outline/tables_appendix.md (reader-facing Appendix tables; produced by appendix-table-writer)

    • publishable tables (clean layout + high information density)
    • inserted by section-merger under a single Appendix heading

Appendix insertion behavior

  • section-merger inserts outline/tables_appendix.md at the end of the draft under ## Appendix: Tables.
  • The inserted block is heading-free (any accidental # headings inside the tables file are stripped).
  • Opt-out (rare): create outline/tables.insert.off in the workspace.

Inputs

  • outline/outline.yml (drives section/subsection order)
  • outline/transitions.md (required)
  • sections/sections_manifest.jsonl (required by the executable survey Pipeline; freshness gate)
  • GOAL.md (optional title)

For arxiv-survey pipelines (default contract):

  • outline/tables_appendix.md (required unless opted out)

Outputs

  • output/DRAFT.md
  • output/MERGE_REPORT.md

Script

Quick Start

  • uv run python .codex/skills/section-merger/scripts/run.py --help
  • uv run python .codex/skills/section-merger/scripts/run.py --workspace <workspace>

All Options

  • --workspace <workspace> (required)
  • --unit-id <id> (optional; used only for runner bookkeeping)
  • --inputs <a;b;c> (optional; override inputs; defaults are profile-aware)
  • --outputs <draft_rel;report_rel> (optional; defaults to output/DRAFT.md;output/MERGE_REPORT.md)
  • --checkpoint <C#> (optional; ignored by the merger)

Examples

  • Merge with defaults (profile-aware table insertion):

    uv run python .codex/skills/section-merger/scripts/run.py --workspace <workspace>

  • Merge with explicit outputs:

    uv run python .codex/skills/section-merger/scripts/run.py --workspace <workspace> --outputs output/DRAFT.md;output/MERGE_REPORT.md

Troubleshooting

Issue: merge report says a subsection file is missing

Likely cause:

  • A required sections/*.md file has not been written yet.

Fix:

  • Write the missing units under sections/ (typically via subsection-writer) and rerun merge.

Issue: Appendix tables are missing in the merged draft

Fix:

  • Ensure outline/tables_appendix.md exists and contains the profile minimum (course paper: >=1; survey/deep: >=2) with no placeholders.
  • Ensure you did not create outline/tables.insert.off.
  • Rerun section-merger.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Internal template for creating or refactoring a skill into the repository's reference-first shape. **Trigger**: reference-first template, blueprint skill, create a reusable skill, refactor a script-heavy skill. **Use when**: you need a lean `SKILL.md`, explicit `references/`, machine-readable `assets/`, and a minimal deterministic `run.py`.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

WILLOSCAR/research-units-pipeline-skills5152026년 10월 5일 업데이트

Download a small corpus of open-access arXiv survey/review PDFs about agentic systems and extract text for style learning.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

WILLOSCAR/research-units-pipeline-skills5152026년 10월 5일 업데이트

Extract per-subsection “anchor facts” (NO PROSE) from evidence packs so the writer is forced to include concrete numbers/benchmarks/limitations instead of generic summaries.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

WILLOSCAR/research-units-pipeline-skills5152026년 10월 5일 업데이트

Curate reader-facing survey tables for the Appendix (clean layout + high information density), using only in-scope evidence and existing citation keys.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

WILLOSCAR/research-units-pipeline-skills5152026년 10월 5일 업데이트

Build a final, machine-readable argument snapshot from current H3 sections and refresh section fingerprints before merge.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

WILLOSCAR/research-units-pipeline-skills5152026년 10월 5일 업데이트

Audit one research Workspace for declared Unit outputs and Pipeline target Artifacts, writing `output/CONTRACT_REPORT.md`; use for mid-Run coverage snapshots or final delivery completeness, not deep provenance integrity.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

WILLOSCAR/research-units-pipeline-skills5152026년 10월 5일 업데이트

WILLOSCAR의 스킬 모두 보기

이 스킬의 문제 신고