docs-governance

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Documentation Governance

文档治理

Require an explicit scope. Read the applicable
AGENTS.md
, then the owning source or module README before judging prose.
必须明确范围。在评判文案之前,先阅读适用的
AGENTS.md
,然后阅读所属源码或模块 README。

Place the fact

事实归位

  • Cross-cutting and multi-module behavior belongs under
    docs/dev/references/<domain>/
    .
  • Repository process belongs under
    docs/dev/contrib/
    .
  • Module-private behavior belongs beside the module.
  • Durable rationale and rejected alternatives belong in Agent Notes.
  • Standing agent orders belong in the narrowest applicable
    AGENTS.md
    and link their rationale.
Keep one home per fact. A domain README owns its subject and summarizes children with links; it does not copy their implementation detail. A tutorial leads through ordered actions to an observable result. A reference supports lookup and states current behavior.
  • 跨领域及多模块行为应归入
    docs/dev/references/<domain>/
    。
  • 仓库流程应归入
    docs/dev/contrib/
    。
  • 模块私有行为应与模块放在一起。
  • 长期有效的决策依据及被否决的替代方案应记录在 Agent Notes 中。
  • 长期有效的 Agent 指令应放在适用范围最窄的
    AGENTS.md
    中,并链接其决策依据。
每项事实只能有一个归属位置。领域 README 负责其主题,并通过链接概述子文档,不复制其实现细节。教程应按照有序步骤引导读者得到可观察的结果。参考文档应支持信息查询,并说明当前行为。

Inspect code impact

检查代码影响

Run
pnpm change:scope --base <verified-ref>
and
pnpm docs:affected --base <verified-ref>
. Inspect every returned document against the changed behavior. A source-prefix match is a mandatory review prompt, not proof that prose needs a diff.
Reference docs describe current reality. Preserve behavior, failure, timing, ownership, modality, exceptions, and consequences. Remove implementation narration, reasoning transcripts, review history, duplicated rationale, status inventories, and catalogs whose source or generator already owns them.
运行
pnpm change:scope --base <verified-ref>
和
pnpm docs:affected --base <verified-ref>
。对照发生变更的行为,检查每个返回的文档。源码前缀匹配是必须进行审查的提示,但不能证明相关文案需要修改。
参考文档应描述当前实际情况。保留行为、失败情况、时序、归属、交互方式、异常和后果。删除实现过程叙述、推理记录、评审历史、重复的决策依据、状态清单,以及其来源或生成器已经负责维护的目录。

Generated and paired docs

生成文档与配对文档

Reference docs carry
description
and
sources
; contrib and governance docs carry
description
. Never hand-edit
docs/dev/README.md
,
docs/dev/sources-index.json
, or
docs/dev/i18n/terminology.md
.
For an in-scope pair, read the pairing contract, translation rules, and terminology. Update the counterpart minimally and re-record only after semantic review. Use
translate-docs
for new pairs or batch translation.
参考文档应包含
description
和
sources
;贡献与治理文档应包含
description
。禁止手动编辑
docs/dev/README.md
、
docs/dev/sources-index.json
或
docs/dev/i18n/terminology.md
。
对于范围内的一组配对文档,请阅读配对契约、翻译规则和术语。仅对对应文档进行最小化更新,并且仅在语义审查后重新登记。新建配对文档或进行批量翻译时,使用
translate-docs
。

Validation

验证

Documentation-only work runs
pnpm docs:check
. Script, hook, code-comment, or skill changes also run focused tests,
pnpm lint
,
pnpm test:lint
, and
git diff --check
as applicable.
仅修改文档时,运行
pnpm docs:check
。修改脚本、Hook、代码注释或 Skill 时,还应根据情况运行针对性测试、
pnpm lint
、
pnpm test:lint
和
git diff --check
。