Skip to content

docs: declarative register across docs/, plus a style skill and a checker - #452

Merged
Sunrisepeak merged 1 commit into
mainfrom
docs/style-register
Aug 17, 2026
Merged

docs: declarative register across docs/, plus a style skill and a checker#452
Sunrisepeak merged 1 commit into
mainfrom
docs/style-register

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Documentation had drifted into a conversational voice. This restores a
declarative register across docs/**, and adds the rules — plus a checker for
the part of them a script can decide.

What changed in the prose

before after
headings 一段话讲完, 打什么由谁决定, 怎么消费, The whole idea in one paragraph, Consuming one noun phrases: 概述, 打包内容的决定依据, 消费方式, Overview, Consuming a package
figurative coinages 姊妹篇, a package's / "legs", sources that "travel" 相关文档:, 每个 target 的产物, "interface units included in the package"
person 你的工程, "your toolchain", "hands you the path" the object of the action, named directly

Tutorials keep the second person — 00-getting-started, 01-examples and
04-build-from-source are read while doing. That list is written down, not
inferred. Quoted mcpp output keeps its own wording: did you mean 'x86_64-linux-musl'? and your toolchain : … are what the program prints, so
reproducing them verbatim is a requirement rather than a style lapse, and the
checker blanks inline code spans before matching.

Four content gaps the sweep surfaced

Register work is not usually how you find missing sections, but comparing the
two language versions structurally is:

  • docs/zh/05 was missing five sections — §2.6 [dev-dependencies], §2.7
    [toolchain], §2.7.1 [target.*], §2.8 [features], §2.8.3
    [scan_overrides]. [target.*] is the entire platform-conditional
    mechanism; a 简体中文 reader had no page for it.
  • docs/zh/05 also had #### 表形式 filed under namespace resolution
    instead of under [features], where its English original sits. Same heading
    count, different structure — which is why the check compares the level
    sequence and not the count.
  • docs/zh/10 was missing "manifest keys that need a version floor";
    docs/zh/README was missing the specifications index.
  • docs/12 still described kind = "shared" as "Linux/ELF today" in its
    opening example, two days after Mach-O and PE/MinGW landed.

The rules, and what a script can and cannot check

.agents/skills/mcpp-docs-style states them. .github/tools/check_docs_style.sh
enforces the three that are decidable from the text — heading register, second
person in reference docs, bilingual heading structure — and runs in ci-linux
beside the version-pin check: pure text, no toolchain, and it catches drift
(a 简体中文 page falling behind its original) that is invisible to every other
job.

The skill says plainly which rule the script cannot check, and it is the
one that matters most: whether a claim's strength matches its evidence. Its
worked example is a mistake from this repository — an inference about a guard
being inert on native builds, written up as if measured, when reading
resolution.json would have shown it was not.

…t is decidable

The documentation had drifted into a conversational voice: headings phrased as
questions or as asides ("一段话讲完", "打什么由谁决定", "Consuming one", "The
whole idea in one paragraph"), figurative coinages ("姊妹篇", a package's "legs",
sources that "travel"), and the reader addressed as "you"/"你" in reference
material that a person reads to look something up rather than to follow along.

Every heading is now a noun phrase or a declarative statement, and the second
person is gone from the reference documents. Tutorials keep it — 00, 01 and 04
are read while doing, and the list is written down rather than inferred. Quoted
mcpp output keeps its own wording: `did you mean 'x86_64-linux-musl'?` and `your
toolchain : …` are what the program prints, so reproducing them verbatim is a
requirement, not a lapse.

The sweep surfaced four content gaps that no reading would have found:

* docs/zh/05 was missing §2.6, §2.7, §2.7.1, §2.8 and §2.8.3 — five sections of
  a reference manual, including the whole of `[target.*]`;
* docs/zh/05 also had `#### 表形式` filed under the namespace-resolution section
  instead of under `[features]`, which is where its English original sits. Same
  heading COUNT, different structure, which is why the check compares the level
  sequence and not the count;
* docs/zh/10 was missing "manifest keys that need a version floor" and
  docs/zh/README the specifications index;
* docs/12 still said `kind = "shared"` was "Linux/ELF today" in its opening
  example, two days after Mach-O and PE/MinGW landed.

`.agents/skills/mcpp-docs-style` states the rules; `.github/tools/check_docs_style.sh`
enforces the three that are decidable from the text (heading register, second
person, bilingual structure) and runs in ci-linux beside the version-pin check —
same placement, same reason: pure text, no toolchain, and it catches drift that
is invisible to every other job. The skill says plainly which rule the script
cannot check, and it is the most important one: whether a claim's strength
matches its evidence.
@Sunrisepeak
Sunrisepeak merged commit f2f9094 into main Aug 17, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants