Skip to content

feat: enable Coder.AmbiguousWords Vale rule - #31182

Merged
nickvigilante merged 2 commits into
mainfrom
superblink/docs-1263-style-guide-add-choose-words-that-have-one-meaning-rule-and
Oct 23, 2026
Merged

nickvigilante merged 2 commits into
mainfrom
superblink/docs-1263-style-guide-add-choose-words-that-have-one-meaning-rule-and

Conversation

@coder

@coder coder Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Note

Recreated from #30792 under coder[bot] by Superblink, at the request of @nickvigilante, so he can review and merge it. An AI agent wrote the original, which was opened from his account. The diff is identical to #30792, squashed onto current main. Superblink reviewed it and ran Vale over docs/ before opening this PR (no new warnings or errors). #30792 should be closed in favor of this one.
Stack: based on #31181 (#31180 → #31181 → #31182 → #31183 → #31184 → #31185). The diff matches #30792 except for the counters in docs/.style/style-guide/README.md, which build on the PRs below this one. make lint/style-claims passes at every level.
Vale run on current main: this rule adds about 655 suggestion-level alerts across docs/. That matches its documented suggestion severity, and make lint/prose never fails on them.

Builds on #30782, which is merged; the branch now merges main.

Adds Coder.AmbiguousWords at suggestion severity.
The rule flags the ensure family, should, since, and may, and suggests the one-meaning replacement from the guide: make sure, must or a recommendation, might or can, and because or after.
It covers docs/** except docs/.style/style-guide/** and the generated docs/reference/{api,cli}/*.md pages.

Baseline: 655 findings on current main, no cleanup commit.
At branch creation it was 663: 128 ensure, 19 ensures, 13 ensuring, 174 should, 58 since, and 271 may.
The rule ships as a suggestion with its backlog, as docs/.style/README.md allows.
DOCS-1283 tracks the cleanup and the promotion to warning.

Known false positives: since and should can be correct in context, such as since for time ("since version 2.20") and a should that states an expectation.
The rule can't tell, so it stays a suggestion.

Linear: DOCS-1263

Decision log
  • Rule type: substitution with one swap per word form, so the message names the replacement.
    Replacements follow the guide's table: make sure, must, recommend, might, can, because, after.
  • Case: ignorecase: false, with [Ee]nsure and [Ss]hould classes, so lowercase may and the month May stay distinct.
  • May: the pattern \bMay\b(?!,?\s+\d) skips the month when a digit follows ("May 5, 2026", "May 2026", "May, 2026").
    Vale compiles lookaheads with a backtracking engine, so the pattern works.
    The sentence-initial May in a list item ("May include minor bugs") is flagged, which is correct.
  • Generated pages: .vale.ini excludes docs/reference/{api,cli}/*.md, as Coder.UnitSpacing does.
    Those pages hold 168 more findings that come from Go comments and CLI flag text.
    With the exclusion the baseline is 663, close to the 664 expected.
  • Footer and table: the section footer names Coder.AmbiguousWords at suggestion severity.
    The checks table gets a row, and the counts move word choice from 2 to 3 tool-checked.
    The formatter widened the Severity column because suggestion is longer than warning.

Test cases, run with vale --config against fixtures that are not committed, in LF and CRLF with identical results:

  • Positive: Ensure, ensures, ensured, ensuring, should, Since, lowercase may, and May in "May the build fail", "Then May is risky", and "May happen".
  • Negative: "May 5, 2026", "May 2026", "May, 2026", "May 12", maybe, mayor, shoulder, sincere, and the same words inside code spans.
  • A plain since in prose is flagged, as intended.

Checks: make lint/style-claims passes, the pre-commit hooks pass, and vale --output=line docs/ reports 663 Coder.AmbiguousWords findings and no new findings from other rules.

Generated by Coder Agents on behalf of @nickvigilante.

Created on behalf of @nickvigilante

@coder
coder Bot requested a review from nickvigilante as a code owner October 23, 2026 08:30
@linear-code

linear-code Bot commented Oct 23, 2026

Copy link
Copy Markdown

DOCS-1263

@github-actions github-actions Bot added the community Pull Requests and issues created by the community. label Oct 23, 2026
@coder
coder Bot force-pushed the superblink/docs-1263-style-guide-add-choose-words-that-have-one-meaning-rule-and branch from f8fe55b to 4140761 Compare October 23, 2026 08:36
coder Bot pushed a commit that referenced this pull request Oct 23, 2026
Recreated from #30785 under coder[bot] so it can be reviewed by its requester. Stacked on #31182.
@coder
coder Bot changed the base branch from main to superblink/docs-431-add-coderlgbtq-vale-rule October 23, 2026 08:36
nickvigilante added a commit that referenced this pull request Oct 23, 2026
> [!NOTE]
> Recreated from #30783 under coder[bot] by Superblink, at the request
of @nickvigilante, so he can review and merge it. An AI agent wrote the
original, which was opened from his account. The diff is identical to
#30783, squashed onto current `main`. Superblink reviewed it and ran
Vale over `docs/` before opening this PR (no new warnings or errors).
#30783 should be closed in favor of this one.
> Stack: this is the bottom of a 6-PR stack (#31180 → #31181 → #31182 →
#31183 → #31184 → #31185). Merge them in that order.

Depends on #30782.

Adds `Coder.AcronymPeriods`, a Vale rule that enforces [No periods in
acronyms](https://github.com/coder/coder/blob/main/docs/.style/style-guide/capitalization-and-punctuation.md#no-periods-in-acronyms).
It flags capitalized acronyms written with periods, such as `A.P.I.` or
`U.S.`.

- Severity: `warning`.
- Scope: `docs/**` except `docs/.style/style-guide/**`, with no other
exclusions.
- Baseline: 0 findings, including the generated
`docs/reference/{api,cli,agent-api}` pages, so no cleanup commit.
- The PR flips the guide footer to enforced, adds the checks-table row,
and updates the coverage counts (10 tool-checked, 32 planned) and the
tooling paragraph (10 of 87).
- Known limitation: a version placeholder such as X.Y.Z in plain prose
matches as "X.Y.". None exist outside code font today, and the guide
asks for code font on placeholders, which Vale skips.

Linear: DOCS-430

<details><summary>Decision log</summary>

- Pattern `\b(?:[A-Z]\.){2,}`. Google.Periods used `{3,}`, but `U.S.` is
a two-letter case the guide's Don't example names, so the rule requires
two or more pairs.
- Google rules aren't loaded, so nothing needed turning off.
- `e.g.` and `i.e.` can't match: the rule is case-sensitive and accepts
capital letters only. A single initial such as `J. Smith` can't match
either.
- Existence rule, `nonword: true`, `ignorecase: false`, same shape as
`UnitSpacing`.
- Test fixtures (not committed) with both LF and CRLF endings:
- Flags: `A.P.I.`, `U.S.`, `E.U.`, and `X.Y.Z` in prose (reported as
`X.Y.`).
- Doesn't flag: `API`, `US`, `e.g.`, `i.e.`, `etc.`, `J. Smith`, `a.m.`,
`p.m.`, code spans, fenced code.
  - LF and CRLF reported identical findings.
- Checks: `vale docs/` reports 0 `Coder.AcronymPeriods` findings, `go
run ./scripts/styleclaims` passes, and the pre-commit-light hook
(markdownlint, emdash, style-claims) passes.

</details>

*Generated by [Coder Agents](https://coder.com/docs/ai-coder/agents) on
behalf of @nickvigilante.*

Created on behalf of @nickvigilante

Co-authored-by: Nick Vigilante <nick.vigilante@coder.com>
@nickvigilante
nickvigilante force-pushed the superblink/docs-431-add-coderlgbtq-vale-rule branch from 4ba5e2c to 7b1aa58 Compare October 23, 2026 16:01
Base automatically changed from superblink/docs-431-add-coderlgbtq-vale-rule to main October 23, 2026 16:08
nickvigilante added a commit that referenced this pull request Oct 23, 2026
> [!NOTE]
> Recreated from #30786 under coder[bot] by Superblink, at the request
of @nickvigilante, so he can review and merge it. An AI agent wrote the
original, which was opened from his account. The diff is identical to
#30786, squashed onto current `main`. Superblink reviewed it and ran
Vale over `docs/` before opening this PR (no new warnings or errors).
#30786 should be closed in favor of this one.
> Stack: based on #31180 (#31180 → #31181 → #31182 → #31183 → #31184 →
#31185). The diff matches #30786 except for the counters in
`docs/.style/style-guide/README.md`, which build on the PRs below this
one. `make lint/style-claims` passes at every level.

Depends on #30782.

Adds `Coder.LGBTQ`, a Vale substitution rule that enforces [Inclusive
LGBTQ
terms](https://github.com/coder/coder/blob/main/docs/.style/style-guide/accessibility-and-inclusion.md#inclusive-lgbtq-terms).
It flags outdated terms for sex, gender, and sexual orientation, and
suggests the current term.

- Severity: `warning`.
- Scope: `docs/**` except `docs/.style/style-guide/**`, with no other
exclusions.
- Baseline: 0 findings, including generated pages, so no cleanup commit.
- Adapted from the [alex](https://github.com/errata-ai/alex) `LGBTQ.yml`
list.
alex is MIT licensed (Copyright (c) 2020 errata.ai), and the YAML header
carries the attribution and a list of changes.
- The rule covers every row of the guide table, and none of the guide's
recommended terms trigger it.
- The PR flips the guide footer to enforced, adds the checks-table row,
and updates the coverage counts (10 tool-checked, 32 planned) and the
tooling paragraph.

Linear: DOCS-431

<details><summary>Decision log</summary>

- Upstream verified at `errata-ai/alex` `alex/LGBTQ.yml`, MIT license.
`/tmp` draft matched upstream.
- Removed `bi`, because it flags "Power BI".
- Removed `special rights`, because permissions docs could use it as a
plain technical phrase.
- Removed `homo`, because it flags "Homo sapiens".
- Added `a transgender` from the guide table.
It matches only when followed by `is`, `was`, `who`, `and`, `or`, `but`,
`that`, `has`, `had`, `can`, `will`, `would`, or `should`, so `a
transgender person` and `a transgender woman` stay clean.
A noun use followed by punctuation (`Ask a transgender.`) isn't caught.
- `preferred pronouns`, `transgendered`, `gender pronouns`,
`biologically female`, `born a man`, `genetically male`, and
`hermaphrodite` come from upstream.
- `homosexual` is flagged in any use, as upstream does, which is
stricter than the guide's "as a noun".
- Upstream's `|` separator in suggestions became ", ", the form the
other Coder substitution rules use.
- Test fixtures (not committed), LF and CRLF, gave identical results:
- Flags: every guide Don't term, plus the `homosexual` compounds,
`sexual preference`, `sex change`, `bathroom bill`, `transgenders`.
- Doesn't flag: `Power BI`, `bi-directional`, `bi-weekly`,
`homogeneous`, `special rights`, the guide's Do terms, `a transgender
person`, `a transgender woman`, and terms inside code spans and fences.
- Checks: `vale docs/` reports 0 `Coder.LGBTQ` findings, `go run
./scripts/styleclaims` passes, and the pre-commit-light hook passes.

</details>

*Generated by [Coder Agents](https://coder.com/docs/ai-coder/agents) on
behalf of @nickvigilante.*

Created on behalf of @nickvigilante

Co-authored-by: Nick Vigilante <nick.vigilante@coder.com>
Recreated from #30792 under coder[bot] so it can be reviewed by its requester. Stacked on #31181.
@nickvigilante
nickvigilante force-pushed the superblink/docs-1263-style-guide-add-choose-words-that-have-one-meaning-rule-and branch from 18e4d90 to c373b55 Compare October 23, 2026 16:11
@nickvigilante
nickvigilante enabled auto-merge (squash) October 23, 2026 16:11
@nickvigilante
nickvigilante merged commit b59fea2 into main Oct 23, 2026
29 checks passed
@nickvigilante
nickvigilante deleted the superblink/docs-1263-style-guide-add-choose-words-that-have-one-meaning-rule-and branch October 23, 2026 16:16
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community Pull Requests and issues created by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant