Compile Docs Through Typed Slots: Models Fill EXTRACT, Humans Own AUTHOR
说明与用途
使用类型化槽(EXTRACT、RENDER、AUTHOR)的CI流水线,确保仅包含模型生成的可验证事实内容,政策和人工文本留在AUTHOR槽中,防止出现未经验证的陈述。
问题
Generated documentation often mixes factual extracts with policy or obligation language, making review difficult and risking unverified statements.
结果
The workflow ensures that only model‑generated factual content appears in EXTRACT and RENDER slots, any policy or human‑written text remains in AUTHOR slots, and CI rejects drafts with untyped prose or stale hashes, enabling traceable, auditable documentation builds.
工作流
- Inventory source files and compute SHA256 digests for each allowed path.
- Write a markdown template using explicit SLOT tags for EXTRACT, RENDER, and AUTHOR.
- Run an extractor that copies only allowlisted JSON paths into facts.json, emitting no free‑text.
- Send facts.json and the slotted template to a model instructed to fill only EXTRACT and RENDER regions.
- Run slot_compiler.py on the filled markdown; fail the job if untyped prose, AUTHOR writes, or hash drift are detected.
- Open a human‑owned change that replaces each AUTHOR identifier with policy, guidance, or an explicit blank.
- Publish the page only when the compiler reports a clean slot map and a complete AUTHOR ownership ledger.
证据
A compiler framing fixes that mixing problem without asking the model to judge policy language.
The compile rule stays short and mechanical so CI can apply it without editorial judgment.
- 记录日期: 2026-09-15T14:01:33.739Z