Models Draft Presence, Humans Own Absence: A Negative-Space Gate for Doc Drafts

本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。

Most generated documentation does not fail because a sentence is wrong; it fails because the sentence that would have prevented a bad decision was never written. Retry limits, unsupported inputs, deprecation paths, quota ceilings, and “do not use this for X” all describe absence, and absence has no line of code you can point a citation at.

大多数生成的文档失败的原因并非因为句子有误,而是因为那些本可以防止错误决策的句子从未被写出来。重试限制、不支持的输入、弃用路径、配额上限以及“请勿将此用于 X”等内容描述的都是“缺失”,而“缺失”在代码中找不到可以引用的具体行。

That asymmetry is the real ownership boundary in model-drafted docs: the model may draft what the repository can prove, and a human must own everything the repository can only omit. This article describes a small, reproducible workflow for that boundary. It splits every page into human-owned fact blocks and model-owned prose, renders the absence claims verbatim, and fails the build when the draft asserts a limitation it cannot source.

这种不对称性是模型起草文档时真正的所有权边界:模型可以起草仓库能够证明的内容,而人类必须负责仓库只能省略的内容。本文介绍了一种针对该边界的小型、可复现的工作流程。它将每个页面拆分为人类拥有的事实块和模型拥有的叙述文本,逐字呈现关于“缺失”的声明,并在草稿断言了无法溯源的限制时使构建失败。

It complements citation and fact-fidelity checks rather than replacing them, because those checks pass silently on a page that never mentions its limits. 1. Why “facts vs. prose” is the wrong split. A fact table expresses presence well, since you can usually resolve a value, a signature, or an example to a file and a line. A fact table expresses absence badly, because nothing in the source tree states that the client refuses non-idempotent retries or that the free tier excludes background jobs.

它补充了引用和事实准确性检查,而不是取代它们,因为这些检查在从未提及限制的页面上会静默通过。1. 为什么“事实与叙述”的划分是错误的。事实表能很好地表达“存在”,因为你通常可以将值、签名或示例定位到具体的文件和行。但事实表很难表达“缺失”,因为源代码树中没有任何地方说明客户端拒绝非幂等重试,或者免费层级排除了后台作业。

When a model drafts a page from code, it reproduces what the code contains and quietly drops what the code lacks. A reviewer skimming a fluent page rarely notices a missing limitation paragraph, and that omission is exactly the content that costs a reader an afternoon. So the split has to be drawn on presence versus absence, not on nouns versus verbs.

当模型根据代码起草页面时,它会复现代码中包含的内容,并悄悄丢弃代码中缺失的内容。审阅者在浏览流畅的页面时,很少会注意到缺失的限制段落,而这种遗漏恰恰是让读者浪费一下午时间的原因。因此,划分标准必须基于“存在”与“缺失”,而不是名词与动词。

  1. Classify each block by who can prove it. Before drafting anything, assign every block of the page to a draft owner. The table below is the one I would apply to an HTTP client library page, and the middle column is the decision you are actually making.

  2. 按谁能证明来分类每个区块。在起草任何内容之前,请为页面的每个区块指定一名起草负责人。下表是我应用于 HTTP 客户端库页面的示例,中间一列是你实际需要做出的决策。

Doc blockDraft ownerEnforcing gate
What the function does, signature, return shapemodelcited fact-fidelity check you already run
Ordered usage steps and code examplesmodelexecutable-example gate
Prerequisites the caller must supplyhumanrequired-key gate
Hard limits and unsupported inputshumanrequired-key gate, rendered verbatim
”Do not use this for…” guidancehumanrequired-key gate, rendered verbatim
Cost, quota, free-tier and expiration claimshumantripwire lint, no exceptions
Deprecation, migration, rollback stepshumanrequired-key gate
文档区块起草负责人强制门控
函数功能、签名、返回形状模型你已运行的引用事实准确性检查
有序使用步骤和代码示例模型可执行示例门控
调用者必须提供的先决条件人类必需键门控
硬性限制和不支持的输入人类必需键门控,逐字呈现
“请勿将此用于…”指导人类必需键门控,逐字呈现
成本、配额、免费层级和过期声明人类绊线检查(无例外)
弃用、迁移、回滚步骤人类必需键门控

Anything that quantifies a resource or a price belongs in the human column even when a config file exists. Configuration is a statement about the default deployment, not a promise about the reader’s account, and a model that reads max_retries: 3 will happily publish it as a product limit.

任何量化资源或价格的内容都属于人类负责的范畴,即使存在配置文件也是如此。配置是对默认部署的说明,而不是对读者账户的承诺;如果模型读取到 max_retries: 3,它会很乐意将其发布为产品限制。

  1. Put the absence claims in a human-owned file. The human artifact is one small YAML file per page, committed under docs/_facts/, with a required block for each negative-space category and no prose styling rules attached. The values must be complete sentences, because they will be rendered into the page without editing.

  2. 将关于“缺失”的声明放入人类负责的文件中。人类负责的产物是每个页面对应的一个小型 YAML 文件,提交在 docs/_facts/ 下,每个负空间类别都有一个必需的区块,且不附带任何叙述样式规则。这些值必须是完整的句子,因为它们将被直接渲染到页面中,无需编辑。

  3. Let the model draft prose with fact markers only. The drafting step writes connective text, headings, and the surrounding explanation, and it may not write any sentence containing a negation, a limit, a cost, or a prescription. When such a sentence is needed, the draft places a marker instead, and the render step substitutes the human sentence.

  4. 让模型仅使用事实标记来起草叙述文本。起草步骤负责编写连接性文本、标题和周围的解释,它不得编写任何包含否定、限制、成本或规定的句子。当需要此类句子时,草稿会放置一个标记,渲染步骤随后会替换为人类编写的句子。

  5. Gate the draft with a negative-space lint. The checker below enforces two rules: every required negative-space block must exist and be cited at least once, and every sentence containing a tripwire word must carry a source marker. It needs only pyyaml, and it is deliberately small enough that a reviewer can read all of it.

  6. 使用负空间检查器来门控草稿。下面的检查器强制执行两条规则:每个必需的负空间区块必须存在且至少被引用一次,并且每个包含“绊线词”的句子必须带有来源标记。它仅需要 pyyaml,且特意保持足够小,以便审阅者可以阅读全部代码。