chore(gates): flag filler, marketing, and time-relative words in the docs

Merged
TH
2mo ago
+295-25

Summary

Stacked on #3401 (it reuses that PR's docs gate wiring); retarget to main once #3401 merges.

Adds pnpm check:doc-prose and a docs-prose gate that flags words the docs style guide bans. There's no Markdown parser and no new dependency:

  • The check: scripts/check-doc-prose.ts (128 lines) scans website/docs/**/*.md(x) and README.md line by line. It skips frontmatter, fenced code, inline code spans, HTML/JSX tags and comments, link destinations, and bare URLs, so commands and identifiers never trip a rule.

  • One rule table, PROSE_RULES:

    • Filler: just, simply, easy, easily, obvious(ly)
    • Marketing: powerful, seamless(ly), robust, intuitive
    • Time-relative: currently, recently, nowadays, coming soon, as of now, newly added

    Bare new, now and current are allowed.

  • No allowlist or ignore comment. A legitimate hit gets its sentence rewritten. The three hits in the current docs were rewritten in commands.md and installation.md.

  • Wiring: the gate is registered in check-affected, where isUserDocPage now selects both docs gates. It's part of check:tooling. The workflow is renamed docs.yml ("Docs"), and the prose step runs before the site build.

Why a script and not alex/write-good/Vale: alex reported 211 warnings on these docs, almost all on normal technical words ("host", "failed", "crash", "execute"). It also misses the time-relative words. Vale needs a separate binary. A fixed word list catches what the style guide asks for.

Validation

  • pnpm check:affected --run passed on 36440fc55.
  • The new test passes (17/17).
  • pnpm check:doc-prose finds the docs clean (30 files).
  • check:gate-manifest:test passes (56/56).
  • Tooling and docs wording only, so no device runs.

🤖 Generated with Claude Code