Chapter Lead Writer
Purpose
This skill writes the body-only lead block that sits under an H2 heading and makes a chapter with multiple H3 subsections read like one argument.
This SKILL.md is now the package router, not the full method manual.
Migration status
This package is in P0 compatibility-preserving migration:
- -
references/ and assets/ now hold the intended knowledge and contract layers. - INLINECODE3 remains in compatibility mode for active generation.
- a later script-thinning pass should move more judgment and exemplars out of Python and leave the script with deterministic execution and validation only.
For now, preserve the existing output contract and treat scripts/run.py as the execution source of truth.
Inputs
Required:
- - INLINECODE5
- INLINECODE6
- INLINECODE7
Optional:
Outputs
For each H2 section with H3 subsections:
Output contract
Keep these file-shape rules stable:
- - each lead file is body-only and contains no headings
- each lead file previews the chapter lens and connects multiple H3s as one argument
- each lead file stays within the chapter's existing citation scope
- each lead file adds no new facts that are not supported later in the chapter
Load Order
Always read:
- - INLINECODE10
- INLINECODE11
Read by task:
- -
references/throughline_patterns.md — when chapter briefs are thin or hard to convert into a throughline - INLINECODE13 — when the lead needs stronger H3 transitions without slide narration
- INLINECODE14 — when removing table-of-contents narration, planner talk, count-based openers
Machine-readable assets:
- -
assets/lead_block_contract.json — stable package contract for lead-block shape - INLINECODE16 — fallback phrasing, item limits, joiners, sentence cadence
Routing rules
Use this skill in the following order:
- 1. Confirm the chapter is eligible
- - identify H2 sections with H3 subsections from INLINECODE17
- locate the corresponding chapter brief in INLINECODE18
- 2. Load the method
- - read INLINECODE19
- read INLINECODE20
- load the other reference files only if the chapter brief or current prose needs them
- 3. Check citation scope
- - if
outline/writer_context_packs.jsonl exists, use it for cross-cutting chapter citations - keep any citations inside the existing chapter scope and validate keys against INLINECODE22
- 4. Execute
- - current phase: use
scripts/run.py in compatibility mode to preserve active behavior and output shape - future phase: keep
scripts/run.py for deterministic execution only, with the writing method and anti-pattern inventory living in INLINECODE25
Compatibility mode note
INLINECODE26 still contains active lead-generation logic.
That is temporary. For now:
- - do not treat the current script wording as the target architecture
- do treat
assets/lead_block_compatibility_defaults.json as the primary compatibility-mode wording source - do not copy large prose instructions back into INLINECODE28
- do preserve the current output contract while reducing obvious narration stems in the active path
What this skill should guarantee
Regardless of where the detailed method lives, this skill should produce chapter leads that:
- - state the chapter's comparison lens rather than narrating the outline
- connect the H3 subsections as one argument, not as isolated stops on a tour
- introduce recurring contrasts without slash-list jargon
- keep the evaluation or calibration lens visible at a high level
- avoid slide narration, planner talk, and repeated stock openers
- choose from multiple candidate lead frames when possible (lens-first / sequence-first / comparison-first) and keep the least narrated option instead of reusing one stock cadence everywhere
Block conditions
Stop and route upstream if any of these are true:
- -
outline/chapter_briefs.jsonl is missing - the target H2 section has no H3 subsections
- the chapter brief is too incomplete to infer a throughline safely
- the requested lead would require new facts or out-of-scope citations
Script role
INLINECODE30 should currently be treated as a compatibility executor.
Its long-term role after script thinning is narrower:
- - chapter discovery
- brief loading and normalization
- contract validation
- deterministic report writing
It is not the long-term home for lead archetypes, bridge examples, or narration anti-patterns.
Script
Quick Start
All Options
- - INLINECODE32
- INLINECODE33
- INLINECODE34
- INLINECODE35
- INLINECODE36
Examples
Troubleshooting
- - If
outline/chapter_briefs.jsonl is missing or too thin, rebuild chapter briefs first. - If
outline/writer_context_packs.jsonl is missing, the script will still run but with a thinner citation pool. - If a generated lead sounds narrated, patch the compatibility asset and references before changing Python.
章节主笔
目的
本技能负责撰写位于H2标题下方的纯正文引导块,使包含多个H3子章节的内容读起来如同一气呵成的完整论述。
本SKILL.md文件现作为包路由器,而非完整方法手册。
迁移状态
本包处于P0兼容性保留迁移阶段:
- - references/和assets/目录现存放预期的知识与合约层
- scripts/run.py保持兼容模式以支持当前生成
- 后续的脚本精简阶段应将更多判断逻辑和示例从Python中移出,仅保留确定性执行和验证功能
当前阶段,请保留现有输出合约,并将scripts/run.py视为执行的事实标准。
输入
必需:
- - outline/outline.yml
- outline/chapter_briefs.jsonl
- citations/ref.bib
可选:
- - outline/writercontextpacks.jsonl
输出
针对每个包含H3子章节的H2章节:
输出合约
保持以下文件结构规则稳定:
- - 每个引导文件仅包含正文,不含标题
- 每个引导文件预览章节视角,将多个H3子章节连接为一个完整论点
- 每个引导文件不超出章节现有引用范围
- 每个引导文件不添加章节后续内容未支持的新事实
加载顺序
始终读取:
- - references/overview.md
- references/leadblockarchetypes.md
按需读取:
- - references/throughlinepatterns.md — 当章节简报内容单薄或难以转化为主线时
- references/bridgeexamples.md — 当引导需要更强的H3过渡但无需幻灯片式叙述时
- references/badnarrationexamples.md — 当需要去除目录式叙述、规划式语言、基于计数的开场白时
机器可读资源:
- - assets/leadblockcontract.json — 引导块形状的稳定包合约
- assets/leadblockcompatibility_defaults.json — 备用措辞、条目限制、连接词、句子节奏
路由规则
按以下顺序使用本技能:
- 1. 确认章节符合条件
- - 从outline/outline.yml中识别包含H3子章节的H2章节
- 在outline/chapter_briefs.jsonl中找到对应的章节简报
- 2. 加载方法
- - 读取references/overview.md
- 读取references/leadblockarchetypes.md
- 仅当章节简报或当前文稿需要时,才加载其他参考文件
- 3. 检查引用范围
- - 若outline/writercontextpacks.jsonl存在,则用于跨章节引用
- 将引用限制在现有章节范围内,并对照citations/ref.bib验证键值
- 4. 执行
- - 当前阶段:使用scripts/run.py的兼容模式,保留现有行为和输出格式
- 未来阶段:仅将scripts/run.py用于确定性执行,写作方法和反模式清单存放在references/中
兼容模式说明
scripts/run.py当前仍包含活跃的引导生成逻辑。
这是临时状态。目前:
- - 不要将当前脚本的措辞视为目标架构
- 将assets/leadblockcompatibility_defaults.json视为主兼容模式措辞来源
- 不要将大量散文指令复制回SKILL.md
- 保留当前输出合约,同时减少当前路径中明显的叙述性表述
本技能应保证的内容
无论详细方法存放于何处,本技能应生成符合以下要求的章节引导:
- - 陈述章节的比较视角,而非叙述大纲
- 将H3子章节连接为一个完整论点,而非孤立的游览站点
- 引入反复出现的对比,避免使用斜杠列表式术语
- 在高层级保持评估或校准视角的可见性
- 避免幻灯片式叙述、规划式语言和重复的固定开场白
- 尽可能从多个候选引导框架中选择(视角优先/顺序优先/比较优先),保留叙述最少化的选项,而非到处复用同一固定节奏
阻断条件
若出现以下任一情况,则停止执行并向上游反馈:
- - outline/chapter_briefs.jsonl缺失
- 目标H2章节没有H3子章节
- 章节简报过于不完整,无法安全推断主线
- 请求的引导需要新事实或超出范围的引用
脚本角色
scripts/run.py当前应被视为兼容性执行器。
脚本精简后的长期角色将更为狭窄:
- - 章节发现
- 简报加载与规范化
- 合约验证
- 确定性报告撰写
它并非引导原型、桥接示例或叙述反模式的长期存放位置。
脚本
快速启动
- - python scripts/run.py --workspace
全部选项
- - --workspace
- --unit-id
- --inputs
- --outputs
- --checkpoint
示例
- - python scripts/run.py --workspace workspaces/
故障排除
- - 若outline/chapterbriefs.jsonl缺失或内容过少,请先重建章节简报。
- 若outline/writercontext_packs.jsonl缺失,脚本仍可运行,但引用池会较单薄。
- 若生成的引导听起来像叙述,请在修改Python代码前先修补兼容性资源和参考文件。